├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── NOTICE ├── README.md ├── composer.json ├── docs ├── classes.svg ├── classes │ ├── Moontoast.Math.BigNumber.html │ └── Moontoast.Math.Exception.ArithmeticException.html ├── css │ ├── bootstrap-responsive.css │ ├── bootstrap-responsive.min.css │ ├── bootstrap.css │ ├── bootstrap.min.css │ ├── jquery.iviewer.css │ ├── prettify.css │ └── template.css ├── deprecated.html ├── errors.html ├── graph_class.html ├── img │ ├── apple-touch-icon-114x114.png │ ├── apple-touch-icon-72x72.png │ ├── apple-touch-icon.png │ ├── favicon.ico │ ├── glyphicons-halflings-white.png │ ├── glyphicons-halflings.png │ ├── icons │ │ ├── arrow_down.png │ │ ├── arrow_right.png │ │ ├── class.png │ │ ├── constant.png │ │ ├── favicon.ico │ │ ├── file-php.png │ │ ├── file.gif │ │ ├── folder.gif │ │ ├── function.png │ │ ├── icon-folder-open-big.png │ │ ├── icon-th-big.png │ │ ├── icon_template.svg │ │ ├── interface.png │ │ ├── method.png │ │ ├── ok.png │ │ ├── property.png │ │ ├── search.gif │ │ ├── variable.png │ │ ├── view_source.png │ │ ├── visibility_private.png │ │ ├── visibility_protected.png │ │ └── visibility_public.png │ ├── iviewer │ │ ├── grab.cur │ │ ├── hand.cur │ │ ├── iviewer.rotate_left.png │ │ ├── iviewer.rotate_right.png │ │ ├── iviewer.zoom_fit.png │ │ ├── iviewer.zoom_fit2.gif │ │ ├── iviewer.zoom_in.png │ │ ├── iviewer.zoom_in2.gif │ │ ├── iviewer.zoom_out.png │ │ ├── iviewer.zoom_out2.gif │ │ ├── iviewer.zoom_zero.png │ │ └── iviewer.zoom_zero2.gif │ └── loader.gif ├── index.html ├── js │ ├── SVGPan.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-1.4.2.min.js │ ├── jquery-1.7.1.min.js │ ├── jquery-ui-1.8.2.custom.min.js │ ├── jquery.cookie.js │ ├── jquery.iviewer.js │ ├── jquery.iviewer.min.js │ ├── jquery.mousewheel.min.js │ ├── jquery.panzoom.js │ ├── jquery.splitter.js │ ├── jquery.tools.min.js │ ├── jquery.treeview.js │ ├── menu.js │ ├── prettify │ │ ├── lang-apollo.js │ │ ├── lang-clj.js │ │ ├── lang-css.js │ │ ├── lang-go.js │ │ ├── lang-hs.js │ │ ├── lang-lisp.js │ │ ├── lang-lua.js │ │ ├── lang-ml.js │ │ ├── lang-n.js │ │ ├── lang-proto.js │ │ ├── lang-scala.js │ │ ├── lang-sql.js │ │ ├── lang-tex.js │ │ ├── lang-vb.js │ │ ├── lang-vhdl.js │ │ ├── lang-wiki.js │ │ ├── lang-xq.js │ │ ├── lang-yaml.js │ │ └── prettify.min.js │ ├── sidebar.js │ └── template.js ├── markers.html ├── namespaces │ ├── Moontoast.Math.Exception.html │ ├── Moontoast.Math.html │ └── Moontoast.html └── packages │ └── Default.html ├── phpdoc.dist.xml ├── phpunit.xml.dist ├── src └── Moontoast │ └── Math │ ├── BigNumber.php │ └── Exception │ └── ArithmeticException.php └── tests ├── Moontoast └── Math │ └── BigNumberTest.php └── bootstrap.php /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | phpunit.xml 3 | composer.lock 4 | build 5 | vendor 6 | *.phar 7 | structure.xml 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.3 5 | - 5.4 6 | - 5.5 7 | - 5.6 8 | - hhvm 9 | 10 | before_script: 11 | - composer self-update || true 12 | - composer install --no-interaction 13 | 14 | script: 15 | - phpunit --coverage-text 16 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | * 1.1.0 (2013-01-19) 2 | 3 | * Break: Division by zero now throws `\Moontoast\Math\Exception\ArithmeticException` instead of `\InvalidArgumentException` 4 | * Regenerated API documentation to include `\Moontoast\Math\Exception\ArithmeticException` 5 | 6 | * 1.0.1 (2013-01-16) 7 | 8 | * Changed copyright name. 9 | 10 | * 1.0.0 (2013-01-10) 11 | 12 | * Initial release 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Moontoast\Math 2 | Copyright (c) 2013 Moontoast, Inc. 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Moontoast Math Library 2 | 3 | [![Build Status](https://travis-ci.org/moontoast/math.png)](https://travis-ci.org/moontoast/math) 4 | 5 | Moontoast\Math is useful for working with integers that are larger than 6 | (or may become larger than, through mathematical computations) PHP's max 7 | integer value for a given system. On 64-bit systems, this number is 8 | 9223372036854775807. On 32-bit systems, it is 2147483647. When overflowing 9 | this boundary, PHP turns the number into a float, reducing precision (see 10 | the PHP manual entry for [Integers][php-integers]). 11 | 12 | Moontoast\Math provides an easy-to-use wrapper around the bcmath extension, 13 | allowing one to perform mathematical calculations on numeric strings, 14 | going well outside the integer range of the system and maintaining arbitrary 15 | precision for more precise calculations. 16 | 17 | See the `docs/` directory for generated API documentation. 18 | 19 | Moontoast\Math requires PHP 5.3+ and the [bcmath extension][]. 20 | 21 | ## Installation 22 | 23 | The preferred method of installation is via [Packagist][], as this provides 24 | the PSR-0 autoloader functionality. The following `composer.json` will download 25 | and install the latest version of the Moontoast\Math library into your project: 26 | 27 | ```json 28 | { 29 | "require": { 30 | "moontoast/math": "*" 31 | } 32 | } 33 | ``` 34 | 35 | ## Examples 36 | 37 | ```php 38 | $bn = new \Moontoast\Math\BigNumber('9,223,372,036,854,775,808'); 39 | $bn->multiply(35); 40 | 41 | var_dump($bn->getValue()); 42 | var_dump($bn->convertToBase(16)); 43 | ``` 44 | 45 | This produces the following output: 46 | 47 | ``` 48 | string(21) "322818021289917153280" 49 | string(18) "118000000000000000" 50 | ``` 51 | 52 | You might want to use BigNumber to work with a UUID, which is an unsigned 53 | 128-bit integer. For example: 54 | 55 | ```php 56 | $uuid = \Moontoast\Math\BigNumber::convertToBase10('ff6f8cb0c57d11e19b210800200c9a66', 16); 57 | ``` 58 | 59 | This utility converts the UUID from hexadecimal (base 16) representation to 60 | a string representation of the unsigned 128-bit integer in decimal (base 10). 61 | You may now create a BigNumber object with it to perform calculations, if you 62 | wish. 63 | 64 | ```php 65 | $bn = new \Moontoast\Math\BigNumber($uuid); 66 | echo $bn; // 339532337419071774305803111643925486182 67 | ``` 68 | 69 | ## License 70 | 71 | Copyright © 2013 Moontoast, Inc. 72 | 73 | Licensed under the Apache License, Version 2.0 (the "License"); 74 | you may not use this file except in compliance with the License. 75 | You may obtain a copy of the License at 76 | 77 | http://www.apache.org/licenses/LICENSE-2.0 78 | 79 | Unless required by applicable law or agreed to in writing, software 80 | distributed under the License is distributed on an "AS IS" BASIS, 81 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 82 | See the License for the specific language governing permissions and 83 | limitations under the License. 84 | 85 | 86 | [phpdoc-md]: https://github.com/evert/phpdoc-md 87 | [bcmath extension]: http://php.net/bcmath 88 | [php-integers]: http://php.net/manual/en/language.types.integer.php 89 | [packagist]: http://packagist.org/ 90 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "moontoast/math", 3 | "description": "A mathematics library, providing functionality for large numbers", 4 | "type": "library", 5 | "keywords": ["math", "bcmath"], 6 | "homepage": "https://github.com/moontoast/math", 7 | "license": "Apache-2.0", 8 | "support": { 9 | "issues": "https://github.com/moontoast/math/issues", 10 | "source": "https://github.com/moontoast/math" 11 | }, 12 | "require": { 13 | "php": ">=5.3.3", 14 | "ext-bcmath": "*" 15 | }, 16 | "autoload": { 17 | "psr-0": {"Moontoast\\Math": "src/"} 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /docs/classes.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | cluster_Moontoast 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Moontoast 22 | 23 | cluster_Moontoast\Math 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | Math 33 | 34 | cluster_Moontoast\Math\Exception 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | Exception 44 | 45 | 46 | \\Moontoast\\Math\\Exception\\ArithmeticException 47 | 48 | 49 | ArithmeticException 50 | 51 | 52 | 53 | \\RuntimeException 54 | 55 | \RuntimeException 56 | 57 | 58 | \\Moontoast\\Math\\Exception\\ArithmeticException->\\RuntimeException 59 | 60 | 61 | 62 | 63 | \\Moontoast\\Math\\BigNumber 64 | 65 | 66 | BigNumber 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /docs/classes/Moontoast.Math.Exception.ArithmeticException.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Moontoast\Math » \Moontoast\Math\Exception\ArithmeticException 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 47 |
48 | 52 |
53 | 81 |
82 | 97 |
98 |

Thrown when an exceptional arithmetic condition has occurred.

99 |
100 |

For example, 101 | an integer "divide by zero" throws an instance of this class.

102 |

103 |  Methods

104 |
105 |

__construct() 106 |

107 |
__construct() 
108 |
109 |
110 |
111 | 112 | 113 | 114 |
inherited_fromException::__construct()
115 |
116 |
117 |
118 |

__toString() 119 |

120 |
__toString() 
121 |
122 |
123 |
124 | 125 | 126 | 127 |
inherited_fromException::__toString()
128 |
129 |
130 |
131 |

getCode() 132 |

133 |
getCode() 
134 |
135 |
136 |
137 | 138 | 139 | 140 |
inherited_fromException::getCode()
141 |
142 |
143 |
144 |

getFile() 145 |

146 |
getFile() 
147 |
148 |
149 |
150 | 151 | 152 | 153 |
inherited_fromException::getFile()
154 |
155 |
156 |
157 |

getLine() 158 |

159 |
getLine() 
160 |
161 |
162 |
163 | 164 | 165 | 166 |
inherited_fromException::getLine()
167 |
168 |
169 |
170 |

getMessage() 171 |

172 |
getMessage() 
173 |
174 |
175 |
176 | 177 | 178 | 179 |
inherited_fromException::getMessage()
180 |
181 |
182 |
183 |

getPrevious() 184 |

185 |
getPrevious() 
186 |
187 |
188 |
189 | 190 | 191 | 192 |
inherited_fromException::getPrevious()
193 |
194 |
195 |
196 |

getTrace() 197 |

198 |
getTrace() 
199 |
200 |
201 |
202 | 203 | 204 | 205 |
inherited_fromException::getTrace()
206 |
207 |
208 |
209 |

getTraceAsString() 210 |

211 |
getTraceAsString() 
212 |
213 |
214 |
215 | 216 | 217 | 218 |
inherited_fromException::getTraceAsString()
219 |
220 |
221 |
222 |
223 |
224 |
225 |
229 |
230 | 231 | 232 | -------------------------------------------------------------------------------- /docs/css/bootstrap-responsive.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.0.0 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */ 10 | .hidden { 11 | display: none; 12 | visibility: hidden; 13 | } 14 | @media (max-width: 480px) { 15 | .nav-collapse { 16 | -webkit-transform: translate3d(0, 0, 0); 17 | } 18 | .page-header h1 small { 19 | display: block; 20 | line-height: 18px; 21 | } 22 | input[class*="span"], 23 | select[class*="span"], 24 | textarea[class*="span"], 25 | .uneditable-input { 26 | display: block; 27 | width: 100%; 28 | height: 28px; 29 | /* Make inputs at least the height of their button counterpart */ 30 | 31 | /* Makes inputs behave like true block-level elements */ 32 | 33 | -webkit-box-sizing: border-box; 34 | /* Older Webkit */ 35 | 36 | -moz-box-sizing: border-box; 37 | /* Older FF */ 38 | 39 | -ms-box-sizing: border-box; 40 | /* IE8 */ 41 | 42 | box-sizing: border-box; 43 | /* CSS3 spec*/ 44 | 45 | } 46 | .input-prepend input[class*="span"], .input-append input[class*="span"] { 47 | width: auto; 48 | } 49 | input[type="checkbox"], input[type="radio"] { 50 | border: 1px solid #ccc; 51 | } 52 | .form-horizontal .control-group > label { 53 | float: none; 54 | width: auto; 55 | padding-top: 0; 56 | text-align: left; 57 | } 58 | .form-horizontal .controls { 59 | margin-left: 0; 60 | } 61 | .form-horizontal .control-list { 62 | padding-top: 0; 63 | } 64 | .form-horizontal .form-actions { 65 | padding-left: 10px; 66 | padding-right: 10px; 67 | } 68 | .modal { 69 | position: absolute; 70 | top: 10px; 71 | left: 10px; 72 | right: 10px; 73 | width: auto; 74 | margin: 0; 75 | } 76 | .modal.fade.in { 77 | top: auto; 78 | } 79 | .modal-header .close { 80 | padding: 10px; 81 | margin: -10px; 82 | } 83 | .carousel-caption { 84 | position: static; 85 | } 86 | } 87 | @media (max-width: 768px) { 88 | .container { 89 | width: auto; 90 | padding: 0 20px; 91 | } 92 | .row-fluid { 93 | width: 100%; 94 | } 95 | .row { 96 | margin-left: 0; 97 | } 98 | .row > [class*="span"], .row-fluid > [class*="span"] { 99 | float: none; 100 | display: block; 101 | width: auto; 102 | margin: 0; 103 | } 104 | } 105 | @media (min-width: 768px) and (max-width: 980px) { 106 | .row { 107 | margin-left: -20px; 108 | *zoom: 1; 109 | } 110 | .row:before, .row:after { 111 | display: table; 112 | content: ""; 113 | } 114 | .row:after { 115 | clear: both; 116 | } 117 | [class*="span"] { 118 | float: left; 119 | margin-left: 20px; 120 | } 121 | .span1 { 122 | width: 42px; 123 | } 124 | .span2 { 125 | width: 104px; 126 | } 127 | .span3 { 128 | width: 166px; 129 | } 130 | .span4 { 131 | width: 228px; 132 | } 133 | .span5 { 134 | width: 290px; 135 | } 136 | .span6 { 137 | width: 352px; 138 | } 139 | .span7 { 140 | width: 414px; 141 | } 142 | .span8 { 143 | width: 476px; 144 | } 145 | .span9 { 146 | width: 538px; 147 | } 148 | .span10 { 149 | width: 600px; 150 | } 151 | .span11 { 152 | width: 662px; 153 | } 154 | .span12, .container { 155 | width: 724px; 156 | } 157 | .offset1 { 158 | margin-left: 82px; 159 | } 160 | .offset2 { 161 | margin-left: 144px; 162 | } 163 | .offset3 { 164 | margin-left: 206px; 165 | } 166 | .offset4 { 167 | margin-left: 268px; 168 | } 169 | .offset5 { 170 | margin-left: 330px; 171 | } 172 | .offset6 { 173 | margin-left: 392px; 174 | } 175 | .offset7 { 176 | margin-left: 454px; 177 | } 178 | .offset8 { 179 | margin-left: 516px; 180 | } 181 | .offset9 { 182 | margin-left: 578px; 183 | } 184 | .offset10 { 185 | margin-left: 640px; 186 | } 187 | .offset11 { 188 | margin-left: 702px; 189 | } 190 | .row-fluid { 191 | width: 100%; 192 | *zoom: 1; 193 | } 194 | .row-fluid:before, .row-fluid:after { 195 | display: table; 196 | content: ""; 197 | } 198 | .row-fluid:after { 199 | clear: both; 200 | } 201 | .row-fluid > [class*="span"] { 202 | float: left; 203 | margin-left: 2.762430939%; 204 | } 205 | .row-fluid > [class*="span"]:first-child { 206 | margin-left: 0; 207 | } 208 | .row-fluid .span1 { 209 | width: 5.801104972%; 210 | } 211 | .row-fluid .span2 { 212 | width: 14.364640883%; 213 | } 214 | .row-fluid .span3 { 215 | width: 22.928176794%; 216 | } 217 | .row-fluid .span4 { 218 | width: 31.491712705%; 219 | } 220 | .row-fluid .span5 { 221 | width: 40.055248616%; 222 | } 223 | .row-fluid .span6 { 224 | width: 48.618784527%; 225 | } 226 | .row-fluid .span7 { 227 | width: 57.182320438000005%; 228 | } 229 | .row-fluid .span8 { 230 | width: 65.74585634900001%; 231 | } 232 | .row-fluid .span9 { 233 | width: 74.30939226%; 234 | } 235 | .row-fluid .span10 { 236 | width: 82.87292817100001%; 237 | } 238 | .row-fluid .span11 { 239 | width: 91.436464082%; 240 | } 241 | .row-fluid .span12 { 242 | width: 99.999999993%; 243 | } 244 | input.span1, textarea.span1, .uneditable-input.span1 { 245 | width: 32px; 246 | } 247 | input.span2, textarea.span2, .uneditable-input.span2 { 248 | width: 94px; 249 | } 250 | input.span3, textarea.span3, .uneditable-input.span3 { 251 | width: 156px; 252 | } 253 | input.span4, textarea.span4, .uneditable-input.span4 { 254 | width: 218px; 255 | } 256 | input.span5, textarea.span5, .uneditable-input.span5 { 257 | width: 280px; 258 | } 259 | input.span6, textarea.span6, .uneditable-input.span6 { 260 | width: 342px; 261 | } 262 | input.span7, textarea.span7, .uneditable-input.span7 { 263 | width: 404px; 264 | } 265 | input.span8, textarea.span8, .uneditable-input.span8 { 266 | width: 466px; 267 | } 268 | input.span9, textarea.span9, .uneditable-input.span9 { 269 | width: 528px; 270 | } 271 | input.span10, textarea.span10, .uneditable-input.span10 { 272 | width: 590px; 273 | } 274 | input.span11, textarea.span11, .uneditable-input.span11 { 275 | width: 652px; 276 | } 277 | input.span12, textarea.span12, .uneditable-input.span12 { 278 | width: 714px; 279 | } 280 | } 281 | @media (max-width: 980px) { 282 | body { 283 | padding-top: 0; 284 | } 285 | .navbar-fixed-top { 286 | position: static; 287 | margin-bottom: 18px; 288 | } 289 | .navbar-fixed-top .navbar-inner { 290 | padding: 5px; 291 | } 292 | .navbar .container { 293 | width: auto; 294 | padding: 0; 295 | } 296 | .navbar .brand { 297 | padding-left: 10px; 298 | padding-right: 10px; 299 | margin: 0 0 0 -5px; 300 | } 301 | .navbar .nav-collapse { 302 | clear: left; 303 | } 304 | .navbar .nav { 305 | float: none; 306 | margin: 0 0 9px; 307 | } 308 | .navbar .nav > li { 309 | float: none; 310 | } 311 | .navbar .nav > li > a { 312 | margin-bottom: 2px; 313 | } 314 | .navbar .nav > .divider-vertical { 315 | display: none; 316 | } 317 | .navbar .nav > li > a, .navbar .dropdown-menu a { 318 | padding: 6px 15px; 319 | font-weight: bold; 320 | color: #999999; 321 | -webkit-border-radius: 3px; 322 | -moz-border-radius: 3px; 323 | border-radius: 3px; 324 | } 325 | .navbar .dropdown-menu li + li a { 326 | margin-bottom: 2px; 327 | } 328 | .navbar .nav > li > a:hover, .navbar .dropdown-menu a:hover { 329 | background-color: #222222; 330 | } 331 | .navbar .dropdown-menu { 332 | position: static; 333 | top: auto; 334 | left: auto; 335 | float: none; 336 | display: block; 337 | max-width: none; 338 | margin: 0 15px; 339 | padding: 0; 340 | background-color: transparent; 341 | border: none; 342 | -webkit-border-radius: 0; 343 | -moz-border-radius: 0; 344 | border-radius: 0; 345 | -webkit-box-shadow: none; 346 | -moz-box-shadow: none; 347 | box-shadow: none; 348 | } 349 | .navbar .dropdown-menu:before, .navbar .dropdown-menu:after { 350 | display: none; 351 | } 352 | .navbar .dropdown-menu .divider { 353 | display: none; 354 | } 355 | .navbar-form, .navbar-search { 356 | float: none; 357 | padding: 9px 15px; 358 | margin: 9px 0; 359 | border-top: 1px solid #222222; 360 | border-bottom: 1px solid #222222; 361 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 362 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 363 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 364 | } 365 | .navbar .nav.pull-right { 366 | float: none; 367 | margin-left: 0; 368 | } 369 | .navbar-static .navbar-inner { 370 | padding-left: 10px; 371 | padding-right: 10px; 372 | } 373 | .btn-navbar { 374 | display: block; 375 | } 376 | .nav-collapse { 377 | overflow: hidden; 378 | height: 0; 379 | } 380 | } 381 | @media (min-width: 980px) { 382 | .nav-collapse.collapse { 383 | height: auto !important; 384 | } 385 | } 386 | @media (min-width: 1200px) { 387 | .row { 388 | margin-left: -30px; 389 | *zoom: 1; 390 | } 391 | .row:before, .row:after { 392 | display: table; 393 | content: ""; 394 | } 395 | .row:after { 396 | clear: both; 397 | } 398 | [class*="span"] { 399 | float: left; 400 | margin-left: 30px; 401 | } 402 | .span1 { 403 | width: 70px; 404 | } 405 | .span2 { 406 | width: 170px; 407 | } 408 | .span3 { 409 | width: 270px; 410 | } 411 | .span4 { 412 | width: 370px; 413 | } 414 | .span5 { 415 | width: 470px; 416 | } 417 | .span6 { 418 | width: 570px; 419 | } 420 | .span7 { 421 | width: 670px; 422 | } 423 | .span8 { 424 | width: 770px; 425 | } 426 | .span9 { 427 | width: 870px; 428 | } 429 | .span10 { 430 | width: 970px; 431 | } 432 | .span11 { 433 | width: 1070px; 434 | } 435 | .span12, .container { 436 | width: 1170px; 437 | } 438 | .offset1 { 439 | margin-left: 130px; 440 | } 441 | .offset2 { 442 | margin-left: 230px; 443 | } 444 | .offset3 { 445 | margin-left: 330px; 446 | } 447 | .offset4 { 448 | margin-left: 430px; 449 | } 450 | .offset5 { 451 | margin-left: 530px; 452 | } 453 | .offset6 { 454 | margin-left: 630px; 455 | } 456 | .offset7 { 457 | margin-left: 730px; 458 | } 459 | .offset8 { 460 | margin-left: 830px; 461 | } 462 | .offset9 { 463 | margin-left: 930px; 464 | } 465 | .offset10 { 466 | margin-left: 1030px; 467 | } 468 | .offset11 { 469 | margin-left: 1130px; 470 | } 471 | .row-fluid { 472 | width: 100%; 473 | *zoom: 1; 474 | } 475 | .row-fluid:before, .row-fluid:after { 476 | display: table; 477 | content: ""; 478 | } 479 | .row-fluid:after { 480 | clear: both; 481 | } 482 | .row-fluid > [class*="span"] { 483 | float: left; 484 | margin-left: 2.564102564%; 485 | } 486 | .row-fluid > [class*="span"]:first-child { 487 | margin-left: 0; 488 | } 489 | .row-fluid .span1 { 490 | width: 5.982905983%; 491 | } 492 | .row-fluid .span2 { 493 | width: 14.529914530000001%; 494 | } 495 | .row-fluid .span3 { 496 | width: 23.076923077%; 497 | } 498 | .row-fluid .span4 { 499 | width: 31.623931624%; 500 | } 501 | .row-fluid .span5 { 502 | width: 40.170940171000005%; 503 | } 504 | .row-fluid .span6 { 505 | width: 48.717948718%; 506 | } 507 | .row-fluid .span7 { 508 | width: 57.264957265%; 509 | } 510 | .row-fluid .span8 { 511 | width: 65.81196581200001%; 512 | } 513 | .row-fluid .span9 { 514 | width: 74.358974359%; 515 | } 516 | .row-fluid .span10 { 517 | width: 82.905982906%; 518 | } 519 | .row-fluid .span11 { 520 | width: 91.45299145300001%; 521 | } 522 | .row-fluid .span12 { 523 | width: 100%; 524 | } 525 | input.span1, textarea.span1, .uneditable-input.span1 { 526 | width: 60px; 527 | } 528 | input.span2, textarea.span2, .uneditable-input.span2 { 529 | width: 160px; 530 | } 531 | input.span3, textarea.span3, .uneditable-input.span3 { 532 | width: 260px; 533 | } 534 | input.span4, textarea.span4, .uneditable-input.span4 { 535 | width: 360px; 536 | } 537 | input.span5, textarea.span5, .uneditable-input.span5 { 538 | width: 460px; 539 | } 540 | input.span6, textarea.span6, .uneditable-input.span6 { 541 | width: 560px; 542 | } 543 | input.span7, textarea.span7, .uneditable-input.span7 { 544 | width: 660px; 545 | } 546 | input.span8, textarea.span8, .uneditable-input.span8 { 547 | width: 760px; 548 | } 549 | input.span9, textarea.span9, .uneditable-input.span9 { 550 | width: 860px; 551 | } 552 | input.span10, textarea.span10, .uneditable-input.span10 { 553 | width: 960px; 554 | } 555 | input.span11, textarea.span11, .uneditable-input.span11 { 556 | width: 1060px; 557 | } 558 | input.span12, textarea.span12, .uneditable-input.span12 { 559 | width: 1160px; 560 | } 561 | .thumbnails { 562 | margin-left: -30px; 563 | } 564 | .thumbnails > li { 565 | margin-left: 30px; 566 | } 567 | } 568 | -------------------------------------------------------------------------------- /docs/css/bootstrap-responsive.min.css: -------------------------------------------------------------------------------- 1 | 2 | .hidden{display:none;visibility:hidden;} 3 | @media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:18px;} input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} .input-prepend input[class*="span"],.input-append input[class*="span"]{width:auto;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .modal{position:absolute;top:10px;left:10px;right:10px;width:auto;margin:0;}.modal.fade.in{top:auto;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (max-width:768px){.container{width:auto;padding:0 20px;} .row-fluid{width:100%;} .row{margin-left:0;} .row>[class*="span"],.row-fluid>[class*="span"]{float:none;display:block;width:auto;margin:0;}}@media (min-width:768px) and (max-width:980px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:20px;} .span1{width:42px;} .span2{width:104px;} .span3{width:166px;} .span4{width:228px;} .span5{width:290px;} .span6{width:352px;} .span7{width:414px;} .span8{width:476px;} .span9{width:538px;} .span10{width:600px;} .span11{width:662px;} .span12,.container{width:724px;} .offset1{margin-left:82px;} .offset2{margin-left:144px;} .offset3{margin-left:206px;} .offset4{margin-left:268px;} .offset5{margin-left:330px;} .offset6{margin-left:392px;} .offset7{margin-left:454px;} .offset8{margin-left:516px;} .offset9{margin-left:578px;} .offset10{margin-left:640px;} .offset11{margin-left:702px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.762430939%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid .span1{width:5.801104972%;} .row-fluid .span2{width:14.364640883%;} .row-fluid .span3{width:22.928176794%;} .row-fluid .span4{width:31.491712705%;} .row-fluid .span5{width:40.055248616%;} .row-fluid .span6{width:48.618784527%;} .row-fluid .span7{width:57.182320438000005%;} .row-fluid .span8{width:65.74585634900001%;} .row-fluid .span9{width:74.30939226%;} .row-fluid .span10{width:82.87292817100001%;} .row-fluid .span11{width:91.436464082%;} .row-fluid .span12{width:99.999999993%;} input.span1,textarea.span1,.uneditable-input.span1{width:32px;} input.span2,textarea.span2,.uneditable-input.span2{width:94px;} input.span3,textarea.span3,.uneditable-input.span3{width:156px;} input.span4,textarea.span4,.uneditable-input.span4{width:218px;} input.span5,textarea.span5,.uneditable-input.span5{width:280px;} input.span6,textarea.span6,.uneditable-input.span6{width:342px;} input.span7,textarea.span7,.uneditable-input.span7{width:404px;} input.span8,textarea.span8,.uneditable-input.span8{width:466px;} input.span9,textarea.span9,.uneditable-input.span9{width:528px;} input.span10,textarea.span10,.uneditable-input.span10{width:590px;} input.span11,textarea.span11,.uneditable-input.span11{width:652px;} input.span12,textarea.span12,.uneditable-input.span12{width:714px;}}@media (max-width:980px){body{padding-top:0;} .navbar-fixed-top{position:static;margin-bottom:18px;} .navbar-fixed-top .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .navbar .nav-collapse{clear:left;} .navbar .nav{float:none;margin:0 0 9px;} .navbar .nav>li{float:none;} .navbar .nav>li>a{margin-bottom:2px;} .navbar .nav>.divider-vertical{display:none;} .navbar .nav>li>a,.navbar .dropdown-menu a{padding:6px 15px;font-weight:bold;color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .navbar .dropdown-menu li+li a{margin-bottom:2px;} .navbar .nav>li>a:hover,.navbar .dropdown-menu a:hover{background-color:#222222;} .navbar .dropdown-menu{position:static;top:auto;left:auto;float:none;display:block;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .navbar .dropdown-menu:before,.navbar .dropdown-menu:after{display:none;} .navbar .dropdown-menu .divider{display:none;} .navbar-form,.navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222222;border-bottom:1px solid #222222;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);} .navbar .nav.pull-right{float:none;margin-left:0;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;} .btn-navbar{display:block;} .nav-collapse{overflow:hidden;height:0;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:30px;} .span1{width:70px;} .span2{width:170px;} .span3{width:270px;} .span4{width:370px;} .span5{width:470px;} .span6{width:570px;} .span7{width:670px;} .span8{width:770px;} .span9{width:870px;} .span10{width:970px;} .span11{width:1070px;} .span12,.container{width:1170px;} .offset1{margin-left:130px;} .offset2{margin-left:230px;} .offset3{margin-left:330px;} .offset4{margin-left:430px;} .offset5{margin-left:530px;} .offset6{margin-left:630px;} .offset7{margin-left:730px;} .offset8{margin-left:830px;} .offset9{margin-left:930px;} .offset10{margin-left:1030px;} .offset11{margin-left:1130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.564102564%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid .span1{width:5.982905983%;} .row-fluid .span2{width:14.529914530000001%;} .row-fluid .span3{width:23.076923077%;} .row-fluid .span4{width:31.623931624%;} .row-fluid .span5{width:40.170940171000005%;} .row-fluid .span6{width:48.717948718%;} .row-fluid .span7{width:57.264957265%;} .row-fluid .span8{width:65.81196581200001%;} .row-fluid .span9{width:74.358974359%;} .row-fluid .span10{width:82.905982906%;} .row-fluid .span11{width:91.45299145300001%;} .row-fluid .span12{width:100%;} input.span1,textarea.span1,.uneditable-input.span1{width:60px;} input.span2,textarea.span2,.uneditable-input.span2{width:160px;} input.span3,textarea.span3,.uneditable-input.span3{width:260px;} input.span4,textarea.span4,.uneditable-input.span4{width:360px;} input.span5,textarea.span5,.uneditable-input.span5{width:460px;} input.span6,textarea.span6,.uneditable-input.span6{width:560px;} input.span7,textarea.span7,.uneditable-input.span7{width:660px;} input.span8,textarea.span8,.uneditable-input.span8{width:760px;} input.span9,textarea.span9,.uneditable-input.span9{width:860px;} input.span10,textarea.span10,.uneditable-input.span10{width:960px;} input.span11,textarea.span11,.uneditable-input.span11{width:1060px;} input.span12,textarea.span12,.uneditable-input.span12{width:1160px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;}} 4 | -------------------------------------------------------------------------------- /docs/css/jquery.iviewer.css: -------------------------------------------------------------------------------- 1 | .iviewer_common { 2 | position:absolute; 3 | bottom:10px; 4 | border: 1px solid #000; 5 | height: 28px; 6 | z-index: 5000; 7 | } 8 | 9 | .iviewer_cursor { 10 | cursor: url(../img/iviewer/hand.cur) 6 8, pointer; 11 | } 12 | 13 | .iviewer_drag_cursor { 14 | cursor: url(../img/iviewer/grab.cur) 6 8, pointer; 15 | } 16 | 17 | .iviewer_button { 18 | width: 28px; 19 | cursor: pointer; 20 | background-position: center center; 21 | background-repeat: no-repeat; 22 | } 23 | 24 | .iviewer_zoom_in { 25 | left: 20px; 26 | background: url(../img/iviewer/iviewer.zoom_in.png); 27 | } 28 | 29 | .iviewer_zoom_out { 30 | left: 55px; 31 | background: url(../img/iviewer/iviewer.zoom_out.png); 32 | } 33 | 34 | .iviewer_zoom_zero { 35 | left: 90px; 36 | background: url(../img/iviewer/iviewer.zoom_zero.png); 37 | } 38 | 39 | .iviewer_zoom_fit { 40 | left: 125px; 41 | background: url(../img/iviewer/iviewer.zoom_fit.png); 42 | } 43 | 44 | .iviewer_zoom_status { 45 | left: 160px; 46 | font: 1em/28px Sans; 47 | color: #000; 48 | background-color: #fff; 49 | text-align: center; 50 | width: 60px; 51 | } 52 | 53 | .iviewer_rotate_left { 54 | left: 227px; 55 | background: #fff url(../img/iviewer/iviewer.rotate_left.png) center center no-repeat; 56 | } 57 | 58 | .iviewer_rotate_right { 59 | left: 262px; 60 | background: #fff url(../img/iviewer/iviewer.rotate_right.png) center center no-repeat; 61 | } 62 | 63 | .viewer 64 | { 65 | width: 100%; 66 | height: 500px; 67 | position: relative; 68 | background: transparent url('../img/loader.gif') no-repeat center center; 69 | } 70 | 71 | .viewer img 72 | { 73 | max-width: none; 74 | } 75 | 76 | .wrapper 77 | { 78 | overflow: hidden; 79 | } 80 | 81 | .iviewer_common 82 | { 83 | border: 0; 84 | bottom: auto; 85 | top: 10px; 86 | } 87 | 88 | .iviewer_zoom_status 89 | { 90 | border: 1px solid black; 91 | } 92 | -------------------------------------------------------------------------------- /docs/css/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} -------------------------------------------------------------------------------- /docs/css/template.css: -------------------------------------------------------------------------------- 1 | @import url(bootstrap.min.css); 2 | @import url(bootstrap-responsive.css); 3 | @import url(prettify.css); 4 | @import url(jquery.iviewer.css); 5 | @import url(http://fonts.googleapis.com/css?family=Crimson+Text|Philosopher|Forum); 6 | 7 | body 8 | { 9 | padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */ 10 | background: #f9f9f9; 11 | color: #444; 12 | } 13 | 14 | a 15 | { 16 | color: #55A72F; 17 | } 18 | 19 | li.l0, li.l1, li.l2, li.l3, li.l5, li.l6, li.l7, li.l8 20 | { 21 | list-style-type: decimal; 22 | } 23 | 24 | a.brand, h2, .hero-unit h1 25 | { 26 | font-family: 'Forum', "Helvetica Neue", Helvetica, Arial, sans-serif; 27 | } 28 | 29 | .element .span4 30 | { 31 | width: 275px; 32 | } 33 | 34 | .namespace-contents hr, .package-contents hr 35 | { 36 | border-top: 3px dotted silver; 37 | } 38 | 39 | .namespace-indent, .package-indent 40 | { 41 | padding-left: 10px; border-left: 1px dashed #f0f0f0; 42 | } 43 | 44 | .element h3 i, .namespace-contents h3 i, .package-contents h3 i 45 | { 46 | margin-top: 2px; 47 | margin-right: 5px; 48 | } 49 | 50 | .element h3, .namespace-contents h3, .package-contents h3 51 | { 52 | margin-top: 25px; 53 | margin-bottom: 20px; 54 | border-bottom: 1px solid silver; 55 | } 56 | 57 | .element h3:first-of-type, .namespace-contents h3:first-of-type, 58 | .package-contents h3:first-of-type 59 | { 60 | margin-top: 30px; 61 | } 62 | 63 | .element h2 64 | { 65 | font-family: inherit; 66 | font-size: 1.2em; 67 | color: black; 68 | } 69 | 70 | .element .type 71 | { 72 | font-weight: bold; 73 | } 74 | 75 | #search-query 76 | { 77 | height: auto; 78 | } 79 | 80 | .hero-unit, div.element, .well 81 | { 82 | border: 1px solid #e0e0e0; 83 | background: white; 84 | } 85 | 86 | .dropdown-menu a{ 87 | overflow: hidden; 88 | text-overflow: ellipsis; 89 | } 90 | h2 91 | { 92 | border-bottom: 1px dashed #55A72F; 93 | margin-bottom: 10px; 94 | padding-bottom: 0; 95 | padding-left: 5px; 96 | color: #e9e9e9; 97 | font-weight: normal; 98 | margin-top: 40px; 99 | } 100 | 101 | h2:first-of-type 102 | { 103 | margin-top: 0; 104 | } 105 | 106 | .hero-unit 107 | { 108 | background: #75a70d; /* Old browsers */ 109 | background: -moz-radial-gradient(center, ellipse cover, #bfd255 0%, #8eb92a 72%, #72aa00 96%, #9ecb2d 100%); /* FF3.6+ */ 110 | background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#bfd255), color-stop(72%,#8eb92a), color-stop(96%,#72aa00), color-stop(100%,#9ecb2d)); /* Chrome,Safari4+ */ 111 | background: -webkit-radial-gradient(center, ellipse cover, #bfd255 0%,#8eb92a 72%,#72aa00 96%,#9ecb2d 100%); /* Chrome10+,Safari5.1+ */ 112 | background: -o-radial-gradient(center, ellipse cover, #bfd255 0%,#8eb92a 72%,#72aa00 96%,#9ecb2d 100%); /* Opera 12+ */ 113 | background: -ms-radial-gradient(center, ellipse cover, #bfd255 0%,#8eb92a 72%,#72aa00 96%,#9ecb2d 100%); /* IE10+ */ 114 | background: radial-gradient(center, ellipse cover, #bfd255 0%,#8eb92a 72%,#72aa00 96%,#9ecb2d 100%); /* W3C */ 115 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bfd255', endColorstr='#9ecb2d',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */ 116 | 117 | padding: 40px 0 15px 0; 118 | box-shadow: inset 0 0 10px gray; 119 | } 120 | 121 | .hero-unit h1 122 | { 123 | text-align: center; 124 | font-weight: normal; 125 | text-align: center; 126 | color: white; 127 | text-shadow: black 0px 0px 15px; 128 | } 129 | 130 | .hero-unit h2 131 | { 132 | border: none; 133 | color: white; 134 | background: rgba(48, 48, 48, 0.5); 135 | padding: 0; 136 | margin: 0; 137 | margin-top: 15px; 138 | text-align: center; 139 | } 140 | 141 | .namespace-contents h2, .package-contents h2 142 | { 143 | padding-left: 44px; 144 | background: transparent url('../img/icons/icon-th-big.png') no-repeat 3px center; 145 | } 146 | 147 | .package-contents h2 148 | { 149 | background-image: url('../img/icons/icon-folder-open-big.png'); 150 | } 151 | 152 | .namespace-contents .element h2, .package-contents .element h2 153 | { 154 | padding-left: 0; 155 | background: none; 156 | } 157 | 158 | div.element 159 | { 160 | border-left: 10px solid #55A72F; 161 | border-radius: 5px; 162 | padding: 7px 7px 2px 7px; 163 | margin-bottom: 15px; 164 | margin-left: 0; 165 | } 166 | 167 | div.element.protected 168 | { 169 | border-left-color: orange; 170 | } 171 | 172 | div.element.private 173 | { 174 | border-left-color: red; 175 | } 176 | 177 | div.element.class, div.element.interface 178 | { 179 | border-left-color: #e0e0e0; 180 | } 181 | 182 | div.element.class.abstract h1, div.element.interface.abstract h1 183 | { 184 | font-style: italic; 185 | } 186 | 187 | div.element h1 188 | { 189 | font-size: 1.2em; 190 | line-height: 1.5em; 191 | margin-bottom: 10px; 192 | padding-left: 22px; 193 | background: transparent no-repeat left 2px; 194 | word-wrap: break-word; 195 | } 196 | 197 | div.element h1 a 198 | { 199 | color: transparent; 200 | margin-left: 10px; 201 | } 202 | 203 | div.element h1:hover a 204 | { 205 | color: silver; 206 | } 207 | 208 | div.element h1 a:hover 209 | { 210 | color: navy; 211 | } 212 | 213 | div.element a.more:hover 214 | { 215 | background: #f0f0f0; 216 | color: #444; 217 | text-decoration: none; 218 | } 219 | 220 | div.element a.more 221 | { 222 | font-weight: bold; 223 | text-align: center; 224 | color: gray; 225 | border-top: 1px dashed silver; 226 | display: block; 227 | margin-top: 5px; 228 | padding: 5px 0; 229 | border-bottom-left-radius: 5px; 230 | border-bottom-right-radius: 5px; 231 | } 232 | 233 | div.element p 234 | { 235 | font-size: 0.9em; 236 | } 237 | 238 | div.element .table 239 | { 240 | font-size: 0.9em; 241 | } 242 | 243 | div.element .table th 244 | { 245 | text-transform: capitalize; 246 | } 247 | 248 | div.detail-description 249 | { 250 | padding-left: 30px; 251 | } 252 | 253 | body.invert 254 | { 255 | background: white; 256 | } 257 | 258 | body.invert div.element 259 | { 260 | background: #f9f9f9; 261 | } 262 | 263 | ul.side-nav 264 | { 265 | clear: both; 266 | } 267 | 268 | ul.side-nav li 269 | { 270 | word-wrap: break-word; 271 | padding-left: 10px; 272 | text-indent: -10px; 273 | } 274 | 275 | ul.side-nav li a 276 | { 277 | background: transparent no-repeat 5px 3px; 278 | padding-bottom: 10px; 279 | font-style: italic; 280 | } 281 | 282 | ul.side-nav li pre 283 | { 284 | font-size: 0.8em; 285 | margin: 5px 15px 0 15px; 286 | padding: 2px 5px; 287 | background-color: #f8f8f8; 288 | color: gray; 289 | font-style: normal; 290 | word-wrap: break-word; 291 | text-indent: 0; 292 | } 293 | 294 | ul.side-nav li.view-simple span.description 295 | { 296 | display: none; 297 | } 298 | 299 | ul.side-nav li.view-simple pre 300 | { 301 | font-size: inherit; 302 | margin: inherit; 303 | padding: inherit; 304 | background-color: inherit; 305 | border: none; 306 | color: inherit; 307 | font-family: inherit; 308 | font-style: inherit; 309 | padding-bottom: 0; 310 | padding-left: 5px; 311 | } 312 | 313 | ul.side-nav li.view-simple a 314 | { 315 | padding-bottom: 0px; 316 | } 317 | 318 | i.icon-custom 319 | { 320 | width: 16px; 321 | height: 16px; 322 | background-position: 0; 323 | } 324 | 325 | .table.markers 326 | { 327 | background: white; 328 | } 329 | 330 | /* JS only functionality; disable by default */ 331 | .btn-group.visibility, .btn-group.view, .btn-group.type-filter 332 | { 333 | display: none; 334 | } 335 | 336 | .btn-group.view 337 | { 338 | margin-left: 20px; 339 | margin-bottom: 20px; 340 | } 341 | 342 | .visibility button 343 | { 344 | height: 24px; 345 | } 346 | 347 | div.element.constant h1, 348 | i.icon-constant { background-image: url('../img/icons/constant.png'); } 349 | 350 | div.element.function h1, 351 | i.icon-function { background-image: url('../img/icons/function.png'); } 352 | 353 | div.element.method h1, 354 | i.icon-method { background-image: url('../img/icons/method.png'); } 355 | 356 | div.element.class h1, 357 | i.icon-class { background-image: url('../img/icons/class.png'); } 358 | 359 | div.element.interface h1, 360 | i.icon-interface { background-image: url('../img/icons/interface.png'); } 361 | 362 | div.element.property h1, 363 | i.icon-property { background-image: url('../img/icons/property.png'); } 364 | 365 | i.icon-show-public { background-image: url('../img/icons/visibility_public.png'); } 366 | i.icon-show-protected { background-image: url('../img/icons/visibility_protected.png'); } 367 | i.icon-show-private { background-image: url('../img/icons/visibility_private.png'); } 368 | 369 | span.empty-namespace 370 | { 371 | color: silver; 372 | } 373 | 374 | footer 375 | { 376 | text-align: right; 377 | font-size: 0.8em; 378 | opacity: 0.5; 379 | } 380 | 381 | #mapHolder 382 | { 383 | border: 4px solid #555; 384 | padding: 0 !important; 385 | overflow: hidden 386 | } 387 | 388 | div.element div.subelement 389 | { 390 | margin-left: 10px; 391 | padding-bottom: 5px; 392 | clear: both; 393 | } 394 | 395 | pre code 396 | { 397 | border: none; 398 | } 399 | 400 | div.element div.subelement > code 401 | { 402 | font-size: 0.8em; 403 | float: left; 404 | margin-right: 10px; 405 | padding: 0 5px; 406 | line-height: 16px; 407 | } 408 | 409 | div.element div.subelement > p 410 | { 411 | margin-left: 20px; 412 | margin-right: 40px; 413 | } 414 | 415 | div.element div.subelement h4 416 | { 417 | color: #666; 418 | margin-bottom: 5px; 419 | } 420 | 421 | div.element div.subelement.response 422 | { 423 | padding-bottom: 15px; 424 | } 425 | 426 | div.labels 427 | { 428 | text-align: right; 429 | } 430 | 431 | .nav-list .nav-header 432 | { 433 | font-size: 13px; 434 | } 435 | 436 | .go_to_top 437 | { 438 | float: right; 439 | margin-right: 20px; 440 | background: #2C2C2C; 441 | color: #999; 442 | padding: 3px 10px; 443 | border-bottom-right-radius: 5px; 444 | border-bottom-left-radius: 5px; 445 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 446 | line-height: 19px; 447 | } 448 | 449 | .visibility .btn { 450 | text-transform: uppercase; 451 | font-size: 0.7em; 452 | font-weight: bold; 453 | } 454 | 455 | .iviewer_common 456 | { 457 | z-index: 100; 458 | } 459 | 460 | @media (min-width: 980px) 461 | { 462 | a[name] 463 | { 464 | margin-top: -50px; 465 | position: absolute; 466 | } 467 | } 468 | 469 | @media (min-width: 1200px) 470 | { 471 | .method .span4 472 | { 473 | width: 345px; 474 | } 475 | } 476 | 477 | /* redefined because twitter bootstrap assumes that bootstrap-responsive.css */ 478 | @media (max-width: 980px) 479 | { 480 | body 481 | { 482 | padding-top: 0; 483 | } 484 | 485 | .go_to_top 486 | { 487 | display: none; 488 | } 489 | 490 | .btn-group.visibility 491 | { 492 | font-size: 0.80em; 493 | margin-bottom: 7px; 494 | display: block; 495 | float: right; 496 | } 497 | } 498 | 499 | @media (max-width: 768px) 500 | { 501 | .hero-unit h1 { 502 | font-size: 30px; 503 | } 504 | .hero-unit h2 { 505 | font-size: 19px; 506 | } 507 | 508 | } 509 | @media (min-width: 768px) and (max-width: 980px) 510 | { 511 | .method .span4 512 | { 513 | width: 203px; 514 | } 515 | } 516 | -------------------------------------------------------------------------------- /docs/deprecated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Moontoast\Math 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 47 |
48 | 52 |
53 |
54 |
55 | 61 |
No deprecated elements have been 62 | found in this project. 63 |
64 |
65 |
66 |
67 |
71 |
72 | 73 | 74 | -------------------------------------------------------------------------------- /docs/errors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Moontoast\Math 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 47 |
48 | 52 |
53 |
60 |
61 | 67 |
No errors have been found in this project.
68 |
69 |
70 |
71 |
72 |
76 |
77 | 78 | 79 | -------------------------------------------------------------------------------- /docs/graph_class.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Moontoast\Math 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 47 |
48 | 52 |
53 |
68 |
69 | 70 | 71 | -------------------------------------------------------------------------------- /docs/img/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /docs/img/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /docs/img/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/favicon.ico -------------------------------------------------------------------------------- /docs/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/img/icons/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/arrow_down.png -------------------------------------------------------------------------------- /docs/img/icons/arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/arrow_right.png -------------------------------------------------------------------------------- /docs/img/icons/class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/class.png -------------------------------------------------------------------------------- /docs/img/icons/constant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/constant.png -------------------------------------------------------------------------------- /docs/img/icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/favicon.ico -------------------------------------------------------------------------------- /docs/img/icons/file-php.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/file-php.png -------------------------------------------------------------------------------- /docs/img/icons/file.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/file.gif -------------------------------------------------------------------------------- /docs/img/icons/folder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/folder.gif -------------------------------------------------------------------------------- /docs/img/icons/function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/function.png -------------------------------------------------------------------------------- /docs/img/icons/icon-folder-open-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/icon-folder-open-big.png -------------------------------------------------------------------------------- /docs/img/icons/icon-th-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/icon-th-big.png -------------------------------------------------------------------------------- /docs/img/icons/icon_template.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 42 | 49 | 50 | 52 | 53 | 55 | image/svg+xml 56 | 58 | 59 | 60 | 61 | 62 | 67 | 73 | 79 | Co 92 | 93 | 94 | -------------------------------------------------------------------------------- /docs/img/icons/interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/interface.png -------------------------------------------------------------------------------- /docs/img/icons/method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/method.png -------------------------------------------------------------------------------- /docs/img/icons/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/ok.png -------------------------------------------------------------------------------- /docs/img/icons/property.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/property.png -------------------------------------------------------------------------------- /docs/img/icons/search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/search.gif -------------------------------------------------------------------------------- /docs/img/icons/variable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/variable.png -------------------------------------------------------------------------------- /docs/img/icons/view_source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/view_source.png -------------------------------------------------------------------------------- /docs/img/icons/visibility_private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/visibility_private.png -------------------------------------------------------------------------------- /docs/img/icons/visibility_protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/visibility_protected.png -------------------------------------------------------------------------------- /docs/img/icons/visibility_public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/icons/visibility_public.png -------------------------------------------------------------------------------- /docs/img/iviewer/grab.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/iviewer/grab.cur -------------------------------------------------------------------------------- /docs/img/iviewer/hand.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/iviewer/hand.cur -------------------------------------------------------------------------------- /docs/img/iviewer/iviewer.rotate_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/iviewer/iviewer.rotate_left.png -------------------------------------------------------------------------------- /docs/img/iviewer/iviewer.rotate_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/iviewer/iviewer.rotate_right.png -------------------------------------------------------------------------------- /docs/img/iviewer/iviewer.zoom_fit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/iviewer/iviewer.zoom_fit.png -------------------------------------------------------------------------------- /docs/img/iviewer/iviewer.zoom_fit2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/iviewer/iviewer.zoom_fit2.gif -------------------------------------------------------------------------------- /docs/img/iviewer/iviewer.zoom_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/iviewer/iviewer.zoom_in.png -------------------------------------------------------------------------------- /docs/img/iviewer/iviewer.zoom_in2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/iviewer/iviewer.zoom_in2.gif -------------------------------------------------------------------------------- /docs/img/iviewer/iviewer.zoom_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/iviewer/iviewer.zoom_out.png -------------------------------------------------------------------------------- /docs/img/iviewer/iviewer.zoom_out2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/iviewer/iviewer.zoom_out2.gif -------------------------------------------------------------------------------- /docs/img/iviewer/iviewer.zoom_zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/iviewer/iviewer.zoom_zero.png -------------------------------------------------------------------------------- /docs/img/iviewer/iviewer.zoom_zero2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/iviewer/iviewer.zoom_zero2.gif -------------------------------------------------------------------------------- /docs/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/img/loader.gif -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Moontoast\Math 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 47 |
48 | 52 |
53 |

Moontoast\Math

54 |

Documentation

55 |
56 |
57 |
58 |
62 |
66 |
67 | 85 |
86 |
90 |
91 | 92 | 93 | -------------------------------------------------------------------------------- /docs/js/SVGPan.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGPan library 1.2 - phpDocumentor1 3 | * ==================== 4 | * 5 | * Given an unique existing element with id "viewport", including the 6 | * the library into any SVG adds the following capabilities: 7 | * 8 | * - Mouse panning 9 | * - Mouse zooming (using the wheel) 10 | * - Object dargging 11 | * 12 | * Known issues: 13 | * 14 | * - Zooming (while panning) on Safari has still some issues 15 | * 16 | * Releases: 17 | * 18 | * 1.2 - phpDocumentor1, Fri Apr 08 19:19:00 CET 2011, Mike van Riel 19 | * Increased zoom speed with 20% 20 | * Disabled element moving functionality 21 | * 22 | * 1.2, Sat Mar 20 08:42:50 GMT 2010, Zeng Xiaohui 23 | * Fixed a bug with browser mouse handler interaction 24 | * 25 | * 1.1, Wed Feb 3 17:39:33 GMT 2010, Zeng Xiaohui 26 | * Updated the zoom code to support the mouse wheel on Safari/Chrome 27 | * 28 | * 1.0, Andrea Leofreddi 29 | * First release 30 | * 31 | * This code is licensed under the following BSD license: 32 | * 33 | * Copyright 2009-2010 Andrea Leofreddi . All rights reserved. 34 | * 35 | * Redistribution and use in source and binary forms, with or without modification, are 36 | * permitted provided that the following conditions are met: 37 | * 38 | * 1. Redistributions of source code must retain the above copyright notice, this list of 39 | * conditions and the following disclaimer. 40 | * 41 | * 2. Redistributions in binary form must reproduce the above copyright notice, this list 42 | * of conditions and the following disclaimer in the documentation and/or other materials 43 | * provided with the distribution. 44 | * 45 | * THIS SOFTWARE IS PROVIDED BY Andrea Leofreddi ``AS IS'' AND ANY EXPRESS OR IMPLIED 46 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 47 | * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Andrea Leofreddi OR 48 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 49 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 50 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 51 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 52 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 53 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 54 | * 55 | * The views and conclusions contained in the software and documentation are those of the 56 | * authors and should not be interpreted as representing official policies, either expressed 57 | * or implied, of Andrea Leofreddi. 58 | */ 59 | 60 | var root = document.documentElement; 61 | 62 | var state = 'none', stateTarget, stateOrigin, stateTf; 63 | 64 | setupHandlers(root); 65 | 66 | /** 67 | * Register handlers 68 | */ 69 | function setupHandlers(root){ 70 | setAttributes(root, { 71 | "onmouseup" : "add(evt)", 72 | "onmousedown" : "handleMouseDown(evt)", 73 | "onmousemove" : "handleMouseMove(evt)", 74 | "onmouseup" : "handleMouseUp(evt)", 75 | // "onmouseout" : "handleMouseUp(evt)" // Decomment this to stop the pan functionality when dragging out of the SVG element 76 | }); 77 | 78 | if(navigator.userAgent.toLowerCase().indexOf('webkit') >= 0) 79 | window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari 80 | else 81 | window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others 82 | } 83 | 84 | /** 85 | * Instance an SVGPoint object with given event coordinates. 86 | */ 87 | function getEventPoint(evt) { 88 | var p = root.createSVGPoint(); 89 | 90 | p.x = evt.clientX; 91 | p.y = evt.clientY; 92 | 93 | return p; 94 | } 95 | 96 | /** 97 | * Sets the current transform matrix of an element. 98 | */ 99 | function setCTM(element, matrix) { 100 | var s = "matrix(" + matrix.a + "," + matrix.b + "," + matrix.c + "," + matrix.d + "," + matrix.e + "," + matrix.f + ")"; 101 | 102 | element.setAttribute("transform", s); 103 | } 104 | 105 | /** 106 | * Dumps a matrix to a string (useful for debug). 107 | */ 108 | function dumpMatrix(matrix) { 109 | var s = "[ " + matrix.a + ", " + matrix.c + ", " + matrix.e + "\n " + matrix.b + ", " + matrix.d + ", " + matrix.f + "\n 0, 0, 1 ]"; 110 | 111 | return s; 112 | } 113 | 114 | /** 115 | * Sets attributes of an element. 116 | */ 117 | function setAttributes(element, attributes){ 118 | for (i in attributes) 119 | element.setAttributeNS(null, i, attributes[i]); 120 | } 121 | 122 | /** 123 | * Handle mouse move event. 124 | */ 125 | function handleMouseWheel(evt) { 126 | if(evt.preventDefault) 127 | evt.preventDefault(); 128 | 129 | evt.returnValue = false; 130 | 131 | var svgDoc = evt.target.ownerDocument; 132 | 133 | var delta; 134 | 135 | if(evt.wheelDelta) 136 | delta = evt.wheelDelta / 3600; // Chrome/Safari 137 | else 138 | delta = evt.detail / -90; // Mozilla 139 | 140 | var z = 1 + (delta * 1.2); // Zoom factor: 0.9/1.1 141 | 142 | var g = svgDoc.getElementById("viewport"); 143 | 144 | var p = getEventPoint(evt); 145 | 146 | p = p.matrixTransform(g.getCTM().inverse()); 147 | 148 | // Compute new scale matrix in current mouse position 149 | var k = root.createSVGMatrix().translate(p.x, p.y).scale(z).translate(-p.x, -p.y); 150 | 151 | setCTM(g, g.getCTM().multiply(k)); 152 | 153 | stateTf = stateTf.multiply(k.inverse()); 154 | } 155 | 156 | /** 157 | * Handle mouse move event. 158 | */ 159 | function handleMouseMove(evt) { 160 | if(evt.preventDefault) 161 | evt.preventDefault(); 162 | 163 | evt.returnValue = false; 164 | 165 | var svgDoc = evt.target.ownerDocument; 166 | 167 | var g = svgDoc.getElementById("viewport"); 168 | 169 | if(state == 'pan') { 170 | // Pan mode 171 | var p = getEventPoint(evt).matrixTransform(stateTf); 172 | 173 | setCTM(g, stateTf.inverse().translate(p.x - stateOrigin.x, p.y - stateOrigin.y)); 174 | } else if(state == 'move') { 175 | // Move mode 176 | var p = getEventPoint(evt).matrixTransform(g.getCTM().inverse()); 177 | 178 | setCTM(stateTarget, root.createSVGMatrix().translate(p.x - stateOrigin.x, p.y - stateOrigin.y).multiply(g.getCTM().inverse()).multiply(stateTarget.getCTM())); 179 | 180 | stateOrigin = p; 181 | } 182 | } 183 | 184 | /** 185 | * Handle click event. 186 | */ 187 | function handleMouseDown(evt) { 188 | if(evt.preventDefault) 189 | evt.preventDefault(); 190 | 191 | evt.returnValue = false; 192 | 193 | var svgDoc = evt.target.ownerDocument; 194 | 195 | var g = svgDoc.getElementById("viewport"); 196 | 197 | // if(evt.target.tagName == "svg") { 198 | // Pan mode 199 | state = 'pan'; 200 | 201 | stateTf = g.getCTM().inverse(); 202 | 203 | stateOrigin = getEventPoint(evt).matrixTransform(stateTf); 204 | // } else { 205 | // Move mode 206 | // state = 'move'; 207 | // 208 | // stateTarget = evt.target; 209 | // 210 | // stateTf = g.getCTM().inverse(); 211 | // 212 | // stateOrigin = getEventPoint(evt).matrixTransform(stateTf); 213 | // } 214 | } 215 | 216 | /** 217 | * Handle mouse button release event. 218 | */ 219 | function handleMouseUp(evt) { 220 | if(evt.preventDefault) 221 | evt.preventDefault(); 222 | 223 | evt.returnValue = false; 224 | 225 | var svgDoc = evt.target.ownerDocument; 226 | 227 | if(state == 'pan' || state == 'move') { 228 | // Quit pan mode 229 | state = ''; 230 | } 231 | } 232 | 233 | -------------------------------------------------------------------------------- /docs/js/jquery.cookie.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Cookie plugin 3 | * 4 | * Copyright (c) 2006 Klaus Hartl (stilbuero.de) 5 | * Dual licensed under the MIT and GPL licenses: 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * http://www.gnu.org/licenses/gpl.html 8 | * 9 | */ 10 | 11 | /** 12 | * Create a cookie with the given name and value and other optional parameters. 13 | * 14 | * @example $.cookie('the_cookie', 'the_value'); 15 | * @desc Set the value of a cookie. 16 | * @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true}); 17 | * @desc Create a cookie with all available options. 18 | * @example $.cookie('the_cookie', 'the_value'); 19 | * @desc Create a session cookie. 20 | * @example $.cookie('the_cookie', null); 21 | * @desc Delete a cookie by passing null as value. 22 | * 23 | * @param String name The name of the cookie. 24 | * @param String value The value of the cookie. 25 | * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. 26 | * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. 27 | * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. 28 | * If set to null or omitted, the cookie will be a session cookie and will not be retained 29 | * when the the browser exits. 30 | * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). 31 | * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). 32 | * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will 33 | * require a secure protocol (like HTTPS). 34 | * @type undefined 35 | * 36 | * @name $.cookie 37 | * @cat Plugins/Cookie 38 | * @author Klaus Hartl/klaus.hartl@stilbuero.de 39 | */ 40 | 41 | /** 42 | * Get the value of a cookie with the given name. 43 | * 44 | * @example $.cookie('the_cookie'); 45 | * @desc Get the value of a cookie. 46 | * 47 | * @param String name The name of the cookie. 48 | * @return The value of the cookie. 49 | * @type String 50 | * 51 | * @name $.cookie 52 | * @cat Plugins/Cookie 53 | * @author Klaus Hartl/klaus.hartl@stilbuero.de 54 | */ 55 | jQuery.cookie = function(name, value, options) 56 | { 57 | if (typeof value != 'undefined') 58 | { // name and value given, set cookie 59 | options = options || {}; 60 | if (value === null) 61 | { 62 | value = ''; 63 | options.expires = -1; 64 | } 65 | var expires = ''; 66 | if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) 67 | { 68 | var date; 69 | if (typeof options.expires == 'number') 70 | { 71 | date = new Date(); 72 | date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); 73 | } 74 | else 75 | { 76 | date = options.expires; 77 | } 78 | expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE 79 | } 80 | var path = options.path ? '; path=' + options.path : ''; 81 | var domain = options.domain ? '; domain=' + options.domain : ''; 82 | var secure = options.secure ? '; secure' : ''; 83 | document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); 84 | } 85 | else 86 | { // only name given, get cookie 87 | var cookieValue = null; 88 | if (document.cookie && document.cookie != '') 89 | { 90 | var cookies = document.cookie.split(';'); 91 | for (var i = 0; i < cookies.length; i++) 92 | { 93 | var cookie = jQuery.trim(cookies[i]); 94 | // Does this cookie string begin with the name we want? 95 | if (cookie.substring(0, name.length + 1) == (name + '=')) 96 | { 97 | cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 98 | break; 99 | } 100 | } 101 | } 102 | return cookieValue; 103 | } 104 | }; -------------------------------------------------------------------------------- /docs/js/jquery.iviewer.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * iviewer Widget for jQuery UI 3 | * https://github.com/can3p/iviewer 4 | * 5 | * Copyright (c) 2009 - 2012 Dmitry Petrov 6 | * Dual licensed under the MIT and GPL licenses. 7 | * - http://www.opensource.org/licenses/mit-license.php 8 | * - http://www.gnu.org/copyleft/gpl.html 9 | * 10 | * Author: Dmitry Petrov 11 | * Version: 0.7 12 | */ 13 | (function($,undefined){var mouseEvents={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"};function makeMouseEvent(event){var touch=event.originalEvent.changedTouches[0];return $.extend(event,{type:mouseEvents[event.type],which:1,pageX:touch.pageX,pageY:touch.pageY,screenX:touch.screenX,screenY:touch.screenY,clientX:touch.clientX,clientY:touch.clientY,isTouchEvent:true})}var mouseProto=$.ui.mouse.prototype,_mouseInit=$.ui.mouse.prototype._mouseInit;mouseProto._mouseInit=function(){var self= 14 | this;self._touchActive=false;this.element.bind("touchstart."+this.widgetName,function(event){self._touchActive=true;return self._mouseDown(makeMouseEvent(event))});var self=this;this._mouseMoveDelegate=function(event){if(self._touchActive)return self._mouseMove(makeMouseEvent(event))};this._mouseUpDelegate=function(event){if(self._touchActive){self._touchActive=false;return self._mouseUp(makeMouseEvent(event))}};$(document).bind("touchmove."+this.widgetName,this._mouseMoveDelegate).bind("touchend."+ 15 | this.widgetName,this._mouseUpDelegate);_mouseInit.apply(this)};var setter=function(setter,getter){return function(val){if(arguments.length===0)return getter.apply(this);else setter.apply(this,arguments)}};var ieTransforms={"0":{marginLeft:0,marginTop:0,filter:'progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=0, M21=0, M22=1, SizingMethod="auto expand")'},"90":{marginLeft:-1,marginTop:1,filter:'progid:DXImageTransform.Microsoft.Matrix(M11=0, M12=-1, M21=1, M22=0, SizingMethod="auto expand")'},"180":{marginLeft:0, 16 | marginTop:0,filter:'progid:DXImageTransform.Microsoft.Matrix(M11=-1, M12=0, M21=0, M22=-1, SizingMethod="auto expand")'},"270":{marginLeft:-1,marginTop:1,filter:'progid:DXImageTransform.Microsoft.Matrix(M11=0, M12=1, M21=-1, M22=0, SizingMethod="auto expand")'}},useIeTransforms=jQuery.browser.msie&&parseInt(jQuery.browser.version,10)<=8;$.widget("ui.iviewer",$.ui.mouse,{widgetEventPrefix:"iviewer",options:{zoom:"fit",zoom_base:100,zoom_max:800,zoom_min:25,zoom_delta:1.4,zoom_animation:true,ui_disabled:false, 17 | update_on_resize:true,onZoom:jQuery.noop,onAfterZoom:jQuery.noop,onStartDrag:jQuery.noop,onDrag:jQuery.noop,onStopDrag:jQuery.noop,onMouseMove:jQuery.noop,onClick:jQuery.noop,onStartLoad:null,onFinishLoad:null},_create:function(){var me=this;this.dx=0;this.dy=0;this.img_object={};this.zoom_object={};this._angle=0;this.current_zoom=this.options.zoom;if(this.options.src===null)return;this.container=this.element;this._updateContainerInfo();this.container.css("overflow","hidden");if(this.options.update_on_resize== 18 | true)$(window).resize(function(){me._updateContainerInfo()});this.img_object=new $.ui.iviewer.ImageObject(this.options.zoom_animation);this.img_object.object().click(function(e){return me._click(e)}).mousewheel(function(ev,delta){var zoom=delta>0?1:-1;me.zoom_by(zoom);return false}).prependTo(this.container);this.container.bind("mousemove",function(ev){me._handleMouseMove(ev)});this.loadImage(this.options.src);if(!this.options.ui_disabled)this.createui();this._mouseInit()},destroy:function(){this._mouseDestroy()}, 19 | _updateContainerInfo:function(){this.options.height=this.container.height();this.options.width=this.container.width()},loadImage:function(src){this.current_zoom=this.options.zoom;var me=this;this._trigger("onStartLoad",0,src);this.img_object.load(src,function(){me.container.addClass("iviewer_cursor");if(me.options.zoom=="fit")me.fit(true);else me.set_zoom(me.options.zoom,true);if(me.options.onFinishLoad)me._trigger("onFinishLoad",0,src)})},fit:function(skip_animation){var aspect_ratio=this.img_object.orig_width()/ 20 | this.img_object.orig_height();var window_ratio=this.options.width/this.options.height;var choose_left=aspect_ratio>window_ratio;var new_zoom=0;if(choose_left)new_zoom=this.options.width/this.img_object.orig_width()*100;else new_zoom=this.options.height/this.img_object.orig_height()*100;this.set_zoom(new_zoom,skip_animation)},center:function(){this.setCoords(-Math.round((this.img_object.display_width()-this.options.width)/2),-Math.round((this.img_object.display_height()-this.options.height)/2))},moveTo:function(x, 21 | y){var dx=x-Math.round(this.options.width/2);var dy=y-Math.round(this.options.height/2);var new_x=this.img_object.x()-dx;var new_y=this.img_object.y()-dy;this.setCoords(new_x,new_y)},getContainerOffset:function(){return jQuery.extend({},this.container.offset())},setCoords:function(x,y){if(!this.img_object.loaded())return;var coords=this._correctCoords(x,y);this.img_object.x(coords.x);this.img_object.y(coords.y)},_correctCoords:function(x,y){x=parseInt(x,10);y=parseInt(y,10);if(y>0)y=0;if(x>0)x=0; 22 | if(y+this.img_object.display_height()this.options.zoom_max)new_zoom=this.options.zoom_max;if(this.current_zoom=="fit"){var old_x=Math.round(this.options.width/2+this.img_object.orig_width()/2);var old_y=Math.round(this.options.height/2+this.img_object.orig_height()/2);this.current_zoom=100}else{var old_x= 25 | -this.img_object.x()+Math.round(this.options.width/2);var old_y=-this.img_object.y()+Math.round(this.options.height/2)}var new_width=util.scaleValue(this.img_object.orig_width(),new_zoom);var new_height=util.scaleValue(this.img_object.orig_height(),new_zoom);var new_x=util.scaleValue(util.descaleValue(old_x,this.current_zoom),new_zoom);var new_y=util.scaleValue(util.descaleValue(old_y,this.current_zoom),new_zoom);new_x=this.options.width/2-new_x;new_y=this.options.height/2-new_y;this.img_object.display_width(new_width); 26 | this.img_object.display_height(new_height);var coords=this._correctCoords(new_x,new_y),self=this;this.img_object.setImageProps(new_width,new_height,coords.x,coords.y,skip_animation,function(){self._trigger("onAfterZoom",0,new_zoom)});this.current_zoom=new_zoom;this.update_status()},zoom_by:function(delta){var closest_rate=this.find_closest_zoom_rate(this.current_zoom);var next_rate=closest_rate+delta;var next_zoom=this.options.zoom_base*Math.pow(this.options.zoom_delta,next_rate);if(delta>0&&next_zoom< 27 | this.current_zoom)next_zoom*=this.options.zoom_delta;if(delta<0&&next_zoom>this.current_zoom)next_zoom/=this.options.zoom_delta;this.set_zoom(next_zoom)},angle:function(deg,abs){if(arguments.length===0)return this.img_object.angle();if(deg<-270||deg>270||deg%90!==0)return;if(!abs)deg+=this.img_object.angle();if(deg<0)deg+=360;if(deg>=360)deg-=360;if(deg===this.img_object.angle())return;this.img_object.angle(deg);this.center();this._trigger("angle",0,{angle:this.img_object.angle()})},find_closest_zoom_rate:function(value){if(value== 28 | this.options.zoom_base)return 0;function div(val1,val2){return val1/val2}function mul(val1,val2){return val1*val2}var func=value>this.options.zoom_base?mul:div;var sgn=value>this.options.zoom_base?1:-1;var mltplr=this.options.zoom_delta;var rate=1;while(Math.abs(func(this.options.zoom_base,Math.pow(mltplr,rate))-value)>Math.abs(func(this.options.zoom_base,Math.pow(mltplr,rate+1))-value))rate++;return sgn*rate},update_status:function(){if(!this.options.ui_disabled){var percent=Math.round(100*this.img_object.display_height()/ 29 | this.img_object.orig_height());if(percent)this.zoom_object.html(percent+"%")}},info:function(param,withoutRotation){if(!param)return;switch(param){case "orig_width":case "orig_height":if(withoutRotation)return this.img_object.angle()%180===0?this.img_object[param]():param==="orig_width"?this.img_object.orig_height():this.img_object.orig_width();else return this.img_object[param]();case "display_width":case "display_height":case "angle":return this.img_object[param]();case "zoom":return this.current_zoom; 30 | case "src":return this.img_object.object().attr("src")}},_mouseStart:function(e){$.ui.mouse.prototype._mouseStart.call(this,e);if(this._trigger("onStartDrag",0,this._getMouseCoords(e))===false)return false;this.container.addClass("iviewer_drag_cursor");this.dx=e.pageX-this.img_object.x();this.dy=e.pageY-this.img_object.y();return true},_mouseCapture:function(e){return true},_handleMouseMove:function(e){this._trigger("onMouseMove",e,this._getMouseCoords(e))},_mouseDrag:function(e){$.ui.mouse.prototype._mouseDrag.call(this, 31 | e);var ltop=e.pageY-this.dy;var lleft=e.pageX-this.dx;this.setCoords(lleft,ltop);this._trigger("onDrag",e,this._getMouseCoords(e));return false},_mouseStop:function(e){$.ui.mouse.prototype._mouseStop.call(this,e);this.container.removeClass("iviewer_drag_cursor");this._trigger("onStopDrag",0,this._getMouseCoords(e))},_click:function(e){this._trigger("onClick",0,this._getMouseCoords(e))},createui:function(){var me=this;$("
",{"class":"iviewer_zoom_in iviewer_common iviewer_button"}).bind("mousedown touchstart", 32 | function(){me.zoom_by(1);return false}).appendTo(this.container);$("
",{"class":"iviewer_zoom_out iviewer_common iviewer_button"}).bind("mousedown touchstart",function(){me.zoom_by(-1);return false}).appendTo(this.container);$("
",{"class":"iviewer_zoom_zero iviewer_common iviewer_button"}).bind("mousedown touchstart",function(){me.set_zoom(100);return false}).appendTo(this.container);$("
",{"class":"iviewer_zoom_fit iviewer_common iviewer_button"}).bind("mousedown touchstart",function(){me.fit(this); 33 | return false}).appendTo(this.container);this.zoom_object=$("
").addClass("iviewer_zoom_status iviewer_common").appendTo(this.container);$("
",{"class":"iviewer_rotate_left iviewer_common iviewer_button"}).bind("mousedown touchstart",function(){me.angle(-90);return false}).appendTo(this.container);$("
",{"class":"iviewer_rotate_right iviewer_common iviewer_button"}).bind("mousedown touchstart",function(){me.angle(90);return false}).appendTo(this.container);this.update_status()}});$.ui.iviewer.ImageObject= 34 | function(do_anim){this._img=$("").css({position:"absolute",top:"0px",left:"0px"});this._loaded=false;this._swapDimensions=false;this._do_anim=do_anim||false;this.x(0,true);this.y(0,true);this.angle(0)};(function(){this._reset=function(w,h){this._angle=0;this._swapDimensions=false;this.x(0);this.y(0);this.orig_width(w);this.orig_height(h);this.display_width(w);this.display_height(h)};this.loaded=function(){return this._loaded};this.load=function(src,loaded){var self=this;loaded=loaded||jQuery.noop; 35 | this._loaded=false;var img=new Image;img.onload=function(){self._loaded=true;self._reset(this.width,this.height);self._img[0].src=src;loaded()};img.src=src;this._img.removeAttr("src").removeAttr("width").removeAttr("height").removeAttr("style").css({position:"absolute",top:"0px",left:"0px"});this.angle(0)};this._dimension=function(prefix,name){var horiz="_"+prefix+"_"+name,vert="_"+prefix+"_"+(name==="height"?"width":"height");return setter(function(val){this[this._swapDimensions?horiz:vert]=val}, 36 | function(){return this[this._swapDimensions?horiz:vert]})};this.display_width=this._dimension("display","width"),this.display_height=this._dimension("display","height"),this.display_diff=function(){return Math.floor(this.display_width()-this.display_height())};this.orig_width=this._dimension("orig","width"),this.orig_height=this._dimension("orig","height"),this.x=setter(function(val,skipCss){this._x=val;if(!skipCss)this._img.css("left",this._x+(this._swapDimensions?this.display_diff()/2:0)+"px")}, 37 | function(){return this._x});this.y=setter(function(val,skipCss){this._y=val;if(!skipCss)this._img.css("top",this._y-(this._swapDimensions?this.display_diff()/2:0)+"px")},function(){return this._y});this.angle=setter(function(deg){var prevSwap=this._swapDimensions;this._angle=deg;this._swapDimensions=deg%180!==0;if(prevSwap!==this._swapDimensions){var verticalMod=this._swapDimensions?-1:1;this.x(this.x()-verticalMod*this.display_diff()/2,true);this.y(this.y()+verticalMod*this.display_diff()/2,true)}var cssVal= 38 | "rotate("+deg+"deg)",img=this._img;jQuery.each(["","-webkit-","-moz-","-o-","-ms-"],function(i,prefix){img.css(prefix+"transform",cssVal)});if(useIeTransforms){jQuery.each(["-ms-",""],function(i,prefix){img.css(prefix+"filter",ieTransforms[deg].filter)});img.css({marginLeft:ieTransforms[deg].marginLeft*this.display_diff()/2,marginTop:ieTransforms[deg].marginTop*this.display_diff()/2})}},function(){return this._angle});this.toOriginalCoords=function(point){switch(this.angle()){case 0:return{x:point.x, 39 | y:point.y};case 90:return{x:point.y,y:this.display_width()-point.x};case 180:return{x:this.display_width()-point.x,y:this.display_height()-point.y};case 270:return{x:this.display_height()-point.y,y:point.x}}};this.toRealCoords=function(point){switch(this.angle()){case 0:return{x:this.x()+point.x,y:this.y()+point.y};case 90:return{x:this.x()+this.display_width()-point.y,y:this.y()+point.x};case 180:return{x:this.x()+this.display_width()-point.x,y:this.y()+this.display_height()-point.y};case 270:return{x:this.x()+ 40 | point.y,y:this.y()+this.display_height()-point.x}}};this.object=setter(jQuery.noop,function(){return this._img});this.setImageProps=function(disp_w,disp_h,x,y,skip_animation,complete){complete=complete||jQuery.noop;this.display_width(disp_w);this.display_height(disp_h);this.x(x,true);this.y(y,true);var w=this._swapDimensions?disp_h:disp_w;var h=this._swapDimensions?disp_w:disp_h;var params={width:w,height:h,top:y-(this._swapDimensions?this.display_diff()/2:0)+"px",left:x+(this._swapDimensions?this.display_diff()/ 41 | 2:0)+"px"};if(useIeTransforms)jQuery.extend(params,{marginLeft:ieTransforms[this.angle()].marginLeft*this.display_diff()/2,marginTop:ieTransforms[this.angle()].marginTop*this.display_diff()/2});var swapDims=this._swapDimensions,img=this._img;if(useIeTransforms&&swapDims){var ieh=this._img.width(),iew=this._img.height(),iedh=params.height-ieh;iedw=params.width-iew;delete params.width;delete params.height}if(this._do_anim&&!skip_animation)this._img.animate(params,{duration:200,complete:complete,step:function(now, 42 | fx){if(useIeTransforms&&swapDims&&fx.prop==="top"){var percent=(now-fx.start)/(fx.end-fx.start);img.height(ieh+iedh*percent);img.width(iew+iedw*percent);img.css("top",now)}}});else{this._img.css(params);setTimeout(complete,0)}}}).apply($.ui.iviewer.ImageObject.prototype);var util={scaleValue:function(value,toZoom){return value*toZoom/100},descaleValue:function(value,fromZoom){return value*100/fromZoom}}})(jQuery,undefined); 43 | -------------------------------------------------------------------------------- /docs/js/jquery.mousewheel.min.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) 2 | * Licensed under the MIT License (LICENSE.txt). 3 | * 4 | * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 5 | * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 6 | * Thanks to: Seamus Leahy for adding deltaX and deltaY 7 | * 8 | * Version: 3.0.6 9 | * 10 | * Requires: 1.2.2+ 11 | */ 12 | (function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]= 13 | d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); -------------------------------------------------------------------------------- /docs/js/jquery.splitter.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery.splitter.js - two-pane splitter window plugin 3 | * 4 | * version 1.51 (2009/01/09) 5 | * 6 | * Dual licensed under the MIT and GPL licenses: 7 | * http://www.opensource.org/licenses/mit-license.php 8 | * http://www.gnu.org/licenses/gpl.html 9 | */ 10 | 11 | /** 12 | * The splitter() plugin implements a two-pane resizable splitter window. 13 | * The selected elements in the jQuery object are converted to a splitter; 14 | * each selected element should have two child elements, used for the panes 15 | * of the splitter. The plugin adds a third child element for the splitbar. 16 | * 17 | * For more details see: http://methvin.com/splitter/ 18 | * 19 | * 20 | * @example $('#MySplitter').splitter(); 21 | * @desc Create a vertical splitter with default settings 22 | * 23 | * @example $('#MySplitter').splitter({type: 'h', accessKey: 'M'}); 24 | * @desc Create a horizontal splitter resizable via Alt+Shift+M 25 | * 26 | * @name splitter 27 | * @type jQuery 28 | * @param Object options Options for the splitter (not required) 29 | * @cat Plugins/Splitter 30 | * @return jQuery 31 | * @author Dave Methvin (dave.methvin@gmail.com) 32 | */ 33 | ; 34 | (function($) { 35 | 36 | $.fn.splitter = function(args) { 37 | args = args || {}; 38 | return this.each(function() { 39 | var zombie; // left-behind splitbar for outline resizes 40 | function startSplitMouse(evt) { 41 | if (opts.outline) 42 | zombie = zombie || bar.clone(false).insertAfter(A); 43 | panes.css("-webkit-user-select", "none"); // Safari selects A/B text on a move 44 | bar.addClass(opts.activeClass); 45 | $('
').insertAfter(bar); 46 | A._posSplit = A[0][opts.pxSplit] - evt[opts.eventPos]; 47 | $(document) 48 | .bind("mousemove", doSplitMouse) 49 | .bind("mouseup", endSplitMouse); 50 | } 51 | 52 | function doSplitMouse(evt) { 53 | var newPos = A._posSplit + evt[opts.eventPos]; 54 | if (opts.outline) { 55 | newPos = Math.max(0, Math.min(newPos, splitter._DA - bar._DA)); 56 | bar.css(opts.origin, newPos); 57 | } else 58 | resplit(newPos); 59 | } 60 | 61 | function endSplitMouse(evt) { 62 | $('div.splitterMask').remove(); 63 | bar.removeClass(opts.activeClass); 64 | var newPos = A._posSplit + evt[opts.eventPos]; 65 | if (opts.outline) { 66 | zombie.remove(); 67 | zombie = null; 68 | resplit(newPos); 69 | } 70 | panes.css("-webkit-user-select", "text"); // let Safari select text again 71 | $(document) 72 | .unbind("mousemove", doSplitMouse) 73 | .unbind("mouseup", endSplitMouse); 74 | } 75 | 76 | function resplit(newPos) { 77 | // Constrain new splitbar position to fit pane size limits 78 | newPos = Math.max(A._min, splitter._DA - B._max, 79 | Math.min(newPos, A._max, splitter._DA - bar._DA - B._min)); 80 | // Resize/position the two panes 81 | bar._DA = bar[0][opts.pxSplit]; // bar size may change during dock 82 | bar.css(opts.origin, newPos).css(opts.fixed, splitter._DF); 83 | A.css(opts.origin, 0).css(opts.split, newPos).css(opts.fixed, splitter._DF); 84 | B.css(opts.origin, newPos + bar._DA) 85 | .css(opts.split, splitter._DA - bar._DA - newPos).css(opts.fixed, splitter._DF); 86 | // IE fires resize for us; all others pay cash 87 | if (!$.browser.msie) 88 | panes.trigger("resize"); 89 | } 90 | 91 | function dimSum(jq, dims) { 92 | // Opera returns -1 for missing min/max width, turn into 0 93 | var sum = 0; 94 | for (var i = 1; i < arguments.length; i++) 95 | sum += Math.max(parseInt(jq.css(arguments[i])) || 0, 0); 96 | return sum; 97 | } 98 | 99 | // Determine settings based on incoming opts, element classes, and defaults 100 | var vh = (args.splitHorizontal ? 'h' : args.splitVertical ? 'v' : args.type) || 'v'; 101 | var opts = $.extend({ 102 | activeClass: 'active', // class name for active splitter 103 | pxPerKey: 8, // splitter px moved per keypress 104 | tabIndex: 0, // tab order indicator 105 | accessKey: '' // accessKey for splitbar 106 | }, { 107 | v: { // Vertical splitters: 108 | keyLeft: 39, keyRight: 37, cursor: "e-resize", 109 | splitbarClass: "vsplitbar", outlineClass: "voutline", 110 | type: 'v', eventPos: "pageX", origin: "left", 111 | split: "width", pxSplit: "offsetWidth", side1: "Left", side2: "Right", 112 | fixed: "height", pxFixed: "offsetHeight", side3: "Top", side4: "Bottom" 113 | }, 114 | h: { // Horizontal splitters: 115 | keyTop: 40, keyBottom: 38, cursor: "n-resize", 116 | splitbarClass: "hsplitbar", outlineClass: "houtline", 117 | type: 'h', eventPos: "pageY", origin: "top", 118 | split: "height", pxSplit: "offsetHeight", side1: "Top", side2: "Bottom", 119 | fixed: "width", pxFixed: "offsetWidth", side3: "Left", side4: "Right" 120 | } 121 | }[vh], args); 122 | 123 | // Create jQuery object closures for splitter and both panes 124 | var splitter = $(this).css({position: "relative"}); 125 | var panes = $(">*", splitter[0]).css({ 126 | position: "absolute", // positioned inside splitter container 127 | "z-index": "1", // splitbar is positioned above 128 | "-moz-outline-style": "none" // don't show dotted outline 129 | }); 130 | var A = $(panes[0]); // left or top 131 | var B = $(panes[1]); // right or bottom 132 | 133 | // Focuser element, provides keyboard support; title is shown by Opera accessKeys 134 | var focuser = $('') 135 | .attr({accessKey: opts.accessKey, tabIndex: opts.tabIndex, title: opts.splitbarClass}) 136 | .bind($.browser.opera ? "click" : "focus", function() { 137 | this.focus(); 138 | bar.addClass(opts.activeClass) 139 | }) 140 | .bind("keydown", function(e) { 141 | var key = e.which || e.keyCode; 142 | var dir = key == opts["key" + opts.side1] ? 1 : key == opts["key" + opts.side2] ? -1 : 0; 143 | if (dir) 144 | resplit(A[0][opts.pxSplit] + dir * opts.pxPerKey, false); 145 | }) 146 | .bind("blur", function() { 147 | bar.removeClass(opts.activeClass) 148 | }); 149 | 150 | // Splitbar element, can be already in the doc or we create one 151 | var bar = $(panes[2] || '
') 152 | .insertAfter(A).css("z-index", "100").append(focuser) 153 | .attr({"class": opts.splitbarClass, unselectable: "on"}) 154 | .css({position: "absolute", "user-select": "none", "-webkit-user-select": "none", 155 | "-khtml-user-select": "none", "-moz-user-select": "none", "top": "0px"}) 156 | .bind("mousedown", startSplitMouse); 157 | // Use our cursor unless the style specifies a non-default cursor 158 | if (/^(auto|default|)$/.test(bar.css("cursor"))) 159 | bar.css("cursor", opts.cursor); 160 | 161 | // Cache several dimensions for speed, rather than re-querying constantly 162 | bar._DA = bar[0][opts.pxSplit]; 163 | splitter._PBF = $.boxModel ? dimSum(splitter, "border" + opts.side3 + "Width", "border" + opts.side4 + "Width") : 0; 164 | splitter._PBA = $.boxModel ? dimSum(splitter, "border" + opts.side1 + "Width", "border" + opts.side2 + "Width") : 0; 165 | A._pane = opts.side1; 166 | B._pane = opts.side2; 167 | $.each([A,B], function() { 168 | this._min = opts["min" + this._pane] || dimSum(this, "min-" + opts.split); 169 | this._max = opts["max" + this._pane] || dimSum(this, "max-" + opts.split) || 9999; 170 | this._init = opts["size" + this._pane] === true ? 171 | parseInt($.curCSS(this[0], opts.split)) : opts["size" + this._pane]; 172 | }); 173 | 174 | // Determine initial position, get from cookie if specified 175 | var initPos = A._init; 176 | if (!isNaN(B._init)) // recalc initial B size as an offset from the top or left side 177 | initPos = splitter[0][opts.pxSplit] - splitter._PBA - B._init - bar._DA; 178 | if (opts.cookie) { 179 | if (!$.cookie) 180 | alert('jQuery.splitter(): jQuery cookie plugin required'); 181 | var ckpos = parseInt($.cookie(opts.cookie)); 182 | if (!isNaN(ckpos)) 183 | initPos = ckpos; 184 | $(window).bind("unload", function() { 185 | var state = String(bar.css(opts.origin)); // current location of splitbar 186 | $.cookie(opts.cookie, state, {expires: opts.cookieExpires || 365, 187 | path: opts.cookiePath || document.location.pathname}); 188 | }); 189 | } 190 | if (isNaN(initPos)) // King Solomon's algorithm 191 | initPos = Math.round((splitter[0][opts.pxSplit] - splitter._PBA - bar._DA) / 2); 192 | 193 | // Resize event propagation and splitter sizing 194 | if (opts.anchorToWindow) { 195 | // Account for margin or border on the splitter container and enforce min height 196 | splitter._hadjust = dimSum(splitter, "borderTopWidth", "borderBottomWidth", "marginBottom"); 197 | splitter._hmin = Math.max(dimSum(splitter, "minHeight"), 20); 198 | $(window).bind("resize", 199 | function() { 200 | var top = splitter.offset().top; 201 | var wh = $(window).height(); 202 | splitter.css("height", Math.max(wh - top - splitter._hadjust, splitter._hmin) + "px"); 203 | if (!$.browser.msie) splitter.trigger("resize"); 204 | }).trigger("resize"); 205 | } 206 | else if (opts.resizeToWidth && !$.browser.msie) 207 | $(window).bind("resize", function() { 208 | splitter.trigger("resize"); 209 | }); 210 | 211 | // Resize event handler; triggered immediately to set initial position 212 | splitter.bind("resize", 213 | function(e, size) { 214 | // Custom events bubble in jQuery 1.3; don't Yo Dawg 215 | if (e.target != this) return; 216 | // Determine new width/height of splitter container 217 | splitter._DF = splitter[0][opts.pxFixed] - splitter._PBF; 218 | splitter._DA = splitter[0][opts.pxSplit] - splitter._PBA; 219 | // Bail if splitter isn't visible or content isn't there yet 220 | if (splitter._DF <= 0 || splitter._DA <= 0) return; 221 | // Re-divvy the adjustable dimension; maintain size of the preferred pane 222 | resplit(!isNaN(size) ? size : (!(opts.sizeRight || opts.sizeBottom) ? A[0][opts.pxSplit] : 223 | splitter._DA - B[0][opts.pxSplit] - bar._DA)); 224 | }).trigger("resize", [initPos]); 225 | }); 226 | }; 227 | 228 | })(jQuery); -------------------------------------------------------------------------------- /docs/js/jquery.treeview.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Treeview 1.5pre - jQuery plugin to hide and show branches of a tree 3 | * 4 | * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ 5 | * http://docs.jquery.com/Plugins/Treeview 6 | * 7 | * Copyright (c) 2007 Jörn Zaefferer 8 | * 9 | * Dual licensed under the MIT and GPL licenses: 10 | * http://www.opensource.org/licenses/mit-license.php 11 | * http://www.gnu.org/licenses/gpl.html 12 | * 13 | * Revision: $Id: jquery.treeview.js 5759 2008-07-01 07:50:28Z joern.zaefferer $ 14 | * 15 | */ 16 | 17 | ;(function($) { 18 | 19 | // TODO rewrite as a widget, removing all the extra plugins 20 | $.extend($.fn, { 21 | swapClass: function(c1, c2) { 22 | var c1Elements = this.filter('.' + c1); 23 | this.filter('.' + c2).removeClass(c2).addClass(c1); 24 | c1Elements.removeClass(c1).addClass(c2); 25 | return this; 26 | }, 27 | replaceClass: function(c1, c2) { 28 | return this.filter('.' + c1).removeClass(c1).addClass(c2).end(); 29 | }, 30 | hoverClass: function(className) { 31 | className = className || "hover"; 32 | return this.hover(function() { 33 | $(this).addClass(className); 34 | }, function() { 35 | $(this).removeClass(className); 36 | }); 37 | }, 38 | heightToggle: function(animated, callback) { 39 | animated ? 40 | this.animate({ height: "toggle" }, animated, callback) : 41 | this.each(function(){ 42 | jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ](); 43 | if(callback) 44 | callback.apply(this, arguments); 45 | }); 46 | }, 47 | heightHide: function(animated, callback) { 48 | if (animated) { 49 | this.animate({ height: "hide" }, animated, callback); 50 | } else { 51 | this.hide(); 52 | if (callback) 53 | this.each(callback); 54 | } 55 | }, 56 | prepareBranches: function(settings) { 57 | if (!settings.prerendered) { 58 | // mark last tree items 59 | this.filter(":last-child:not(ul)").addClass(CLASSES.last); 60 | // collapse whole tree, or only those marked as closed, anyway except those marked as open 61 | this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide(); 62 | } 63 | // return all items with sublists 64 | return this.filter(":has(>ul)"); 65 | }, 66 | applyClasses: function(settings, toggler) { 67 | // TODO use event delegation 68 | this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) { 69 | // don't handle click events on children, eg. checkboxes 70 | if ( this == event.target ) 71 | toggler.apply($(this).next()); 72 | }).add( $("a", this) ).hoverClass(); 73 | 74 | if (!settings.prerendered) { 75 | // handle closed ones first 76 | this.filter(":has(>ul:hidden)") 77 | .addClass(CLASSES.expandable) 78 | .replaceClass(CLASSES.last, CLASSES.lastExpandable); 79 | 80 | // handle open ones 81 | this.not(":has(>ul:hidden)") 82 | .addClass(CLASSES.collapsable) 83 | .replaceClass(CLASSES.last, CLASSES.lastCollapsable); 84 | 85 | // create hitarea if not present 86 | var hitarea = this.find("div." + CLASSES.hitarea); 87 | if (!hitarea.length) 88 | hitarea = this.prepend("
").find("div." + CLASSES.hitarea); 89 | hitarea.removeClass().addClass(CLASSES.hitarea).each(function() { 90 | var classes = ""; 91 | $.each($(this).parent().attr("class").split(" "), function() { 92 | classes += this + "-hitarea "; 93 | }); 94 | $(this).addClass( classes ); 95 | }) 96 | } 97 | 98 | // apply event to hitarea 99 | this.find("div." + CLASSES.hitarea).click( toggler ); 100 | }, 101 | treeview: function(settings) { 102 | 103 | settings = $.extend({ 104 | cookieId: "treeview" 105 | }, settings); 106 | 107 | if ( settings.toggle ) { 108 | var callback = settings.toggle; 109 | settings.toggle = function() { 110 | return callback.apply($(this).parent()[0], arguments); 111 | }; 112 | } 113 | 114 | // factory for treecontroller 115 | function treeController(tree, control) { 116 | // factory for click handlers 117 | function handler(filter) { 118 | return function() { 119 | // reuse toggle event handler, applying the elements to toggle 120 | // start searching for all hitareas 121 | toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() { 122 | // for plain toggle, no filter is provided, otherwise we need to check the parent element 123 | return filter ? $(this).parent("." + filter).length : true; 124 | }) ); 125 | return false; 126 | }; 127 | } 128 | // click on first element to collapse tree 129 | $("a:eq(0)", control).click( handler(CLASSES.collapsable) ); 130 | // click on second to expand tree 131 | $("a:eq(1)", control).click( handler(CLASSES.expandable) ); 132 | // click on third to toggle tree 133 | $("a:eq(2)", control).click( handler() ); 134 | } 135 | 136 | // handle toggle event 137 | function toggler() { 138 | $(this) 139 | .parent() 140 | // swap classes for hitarea 141 | .find(">.hitarea") 142 | .swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea ) 143 | .swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea ) 144 | .end() 145 | // swap classes for parent li 146 | .swapClass( CLASSES.collapsable, CLASSES.expandable ) 147 | .swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable ) 148 | // find child lists 149 | .find( ">ul" ) 150 | // toggle them 151 | .heightToggle( settings.animated, settings.toggle ); 152 | if ( settings.unique ) { 153 | $(this).parent() 154 | .siblings() 155 | // swap classes for hitarea 156 | .find(">.hitarea") 157 | .replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea ) 158 | .replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea ) 159 | .end() 160 | .replaceClass( CLASSES.collapsable, CLASSES.expandable ) 161 | .replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable ) 162 | .find( ">ul" ) 163 | .heightHide( settings.animated, settings.toggle ); 164 | } 165 | } 166 | this.data("toggler", toggler); 167 | 168 | function serialize() { 169 | function binary(arg) { 170 | return arg ? 1 : 0; 171 | } 172 | var data = []; 173 | branches.each(function(i, e) { 174 | data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0; 175 | }); 176 | $.cookie(settings.cookieId, data.join(""), settings.cookieOptions ); 177 | } 178 | 179 | function deserialize() { 180 | var stored = $.cookie(settings.cookieId); 181 | if ( stored ) { 182 | var data = stored.split(""); 183 | branches.each(function(i, e) { 184 | $(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ](); 185 | }); 186 | } 187 | } 188 | 189 | // add treeview class to activate styles 190 | this.addClass("treeview"); 191 | 192 | // prepare branches and find all tree items with child lists 193 | var branches = this.find("li").prepareBranches(settings); 194 | 195 | switch(settings.persist) { 196 | case "cookie": 197 | var toggleCallback = settings.toggle; 198 | settings.toggle = function() { 199 | serialize(); 200 | if (toggleCallback) { 201 | toggleCallback.apply(this, arguments); 202 | } 203 | }; 204 | deserialize(); 205 | break; 206 | case "location": 207 | var current = this.find("a").filter(function() { 208 | return this.href.toLowerCase() == location.href.toLowerCase(); 209 | }); 210 | if ( current.length ) { 211 | // TODO update the open/closed classes 212 | var items = current.addClass("selected").parents("ul, li").add( current.next() ).show(); 213 | if (settings.prerendered) { 214 | // if prerendered is on, replicate the basic class swapping 215 | items.filter("li") 216 | .swapClass( CLASSES.collapsable, CLASSES.expandable ) 217 | .swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable ) 218 | .find(">.hitarea") 219 | .swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea ) 220 | .swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea ); 221 | } 222 | } 223 | break; 224 | } 225 | 226 | branches.applyClasses(settings, toggler); 227 | 228 | // if control option is set, create the treecontroller and show it 229 | if ( settings.control ) { 230 | treeController(this, settings.control); 231 | $(settings.control).show(); 232 | } 233 | 234 | return this; 235 | } 236 | }); 237 | 238 | // classes used by the plugin 239 | // need to be styled via external stylesheet, see first example 240 | $.treeview = {}; 241 | var CLASSES = ($.treeview.classes = { 242 | open: "open", 243 | closed: "closed", 244 | expandable: "expandable", 245 | expandableHitarea: "expandable-hitarea", 246 | lastExpandableHitarea: "lastExpandable-hitarea", 247 | collapsable: "collapsable", 248 | collapsableHitarea: "collapsable-hitarea", 249 | lastCollapsableHitarea: "lastCollapsable-hitarea", 250 | lastCollapsable: "lastCollapsable", 251 | lastExpandable: "lastExpandable", 252 | last: "last", 253 | hitarea: "hitarea" 254 | }); 255 | 256 | })(jQuery); -------------------------------------------------------------------------------- /docs/js/menu.js: -------------------------------------------------------------------------------- 1 | var timeout = 500; 2 | var closetimer = 0; 3 | var ddmenuitem = 0; 4 | 5 | function menu_open() { 6 | menu_canceltimer(); 7 | menu_close(); 8 | ddmenuitem = $(this).find('ul').css('visibility', 'visible'); 9 | } 10 | 11 | function menu_close() { 12 | if (ddmenuitem) ddmenuitem.css('visibility', 'hidden'); 13 | } 14 | 15 | function menu_timer() { 16 | closetimer = window.setTimeout(menu_close, timeout); 17 | } 18 | 19 | function menu_canceltimer() { 20 | if (closetimer) { 21 | window.clearTimeout(closetimer); 22 | closetimer = null; 23 | } 24 | } 25 | 26 | $(document).ready(function() { 27 | $('#file-nav > li').bind('mouseover', menu_open); 28 | $('#file-nav > li').bind('mouseout', menu_timer); 29 | }); 30 | 31 | document.onclick = menu_close; -------------------------------------------------------------------------------- /docs/js/prettify/lang-apollo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/js/prettify/lang-apollo.js -------------------------------------------------------------------------------- /docs/js/prettify/lang-clj.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 Google Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | var a=null; 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a], 18 | ["typ",/^:[\dA-Za-z-]+/]]),["clj"]); 19 | -------------------------------------------------------------------------------- /docs/js/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /docs/js/prettify/lang-go.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/js/prettify/lang-go.js -------------------------------------------------------------------------------- /docs/js/prettify/lang-hs.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n \r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/, 2 | null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]); 3 | -------------------------------------------------------------------------------- /docs/js/prettify/lang-lisp.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a], 3 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]); 4 | -------------------------------------------------------------------------------- /docs/js/prettify/lang-lua.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/js/prettify/lang-lua.js -------------------------------------------------------------------------------- /docs/js/prettify/lang-ml.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/js/prettify/lang-ml.js -------------------------------------------------------------------------------- /docs/js/prettify/lang-n.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/, 3 | a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, 4 | a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]); 5 | -------------------------------------------------------------------------------- /docs/js/prettify/lang-proto.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); 2 | -------------------------------------------------------------------------------- /docs/js/prettify/lang-scala.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/js/prettify/lang-scala.js -------------------------------------------------------------------------------- /docs/js/prettify/lang-sql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/js/prettify/lang-sql.js -------------------------------------------------------------------------------- /docs/js/prettify/lang-tex.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/js/prettify/lang-tex.js -------------------------------------------------------------------------------- /docs/js/prettify/lang-vb.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/js/prettify/lang-vb.js -------------------------------------------------------------------------------- /docs/js/prettify/lang-vhdl.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/js/prettify/lang-vhdl.js -------------------------------------------------------------------------------- /docs/js/prettify/lang-wiki.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moontoast/math/527bb18d290502e55ea4a3cbebd63e5fe8bf0ed2/docs/js/prettify/lang-wiki.js -------------------------------------------------------------------------------- /docs/js/prettify/lang-yaml.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]); 3 | -------------------------------------------------------------------------------- /docs/js/prettify/prettify.min.js: -------------------------------------------------------------------------------- 1 | var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; 2 | (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= 3 | [],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), 9 | l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, 10 | q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, 11 | q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, 12 | "");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), 13 | a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} 14 | for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], 18 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], 19 | H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], 20 | J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ 21 | I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), 22 | ["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", 23 | /^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), 24 | ["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", 25 | hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= 26 | !k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p= 0; 3 | }; 4 | 5 | $(function() { 6 | $("#sidebar-nav").accordion({ 7 | autoHeight: false, 8 | navigation: true, 9 | collapsible: true 10 | }).accordion("activate", false) 11 | .find('a.link').unbind('click').click( 12 | function(ev) { 13 | ev.cancelBubble = true; // IE 14 | if (ev.stopPropagation) { 15 | ev.stopPropagation(); // the rest 16 | } 17 | 18 | return true; 19 | }).prev().prev().remove(); 20 | 21 | $("#sidebar-nav>h3").click(function() { 22 | if ($(this).attr('initialized') == 'true') return; 23 | 24 | $(this).next().find(".sidebar-nav-tree").treeview({ 25 | collapsed: true, 26 | persist: "cookie" 27 | }); 28 | $(this).attr('initialized', true); 29 | }); 30 | }); 31 | 32 | function tree_search(input) { 33 | treeview = $(input).parent().parent().next(); 34 | 35 | // Expand all items 36 | treeview.find('.expandable-hitarea').click(); 37 | 38 | // make all items visible again 39 | treeview.find('li:hidden').show(); 40 | 41 | // hide all items that do not match the given search criteria 42 | if ($(input).val()) { 43 | treeview.find('li').not(':has(a:Contains(' + $(input).val() + '))').hide(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /docs/js/template.js: -------------------------------------------------------------------------------- 1 | $.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase()); 2 | $.browser.ipad = /ipad/.test(navigator.userAgent.toLowerCase()); 3 | 4 | /** 5 | * Initializes page contents for progressive enhancement. 6 | */ 7 | function initializeContents() 8 | { 9 | // hide all more buttons because they are not needed with JS 10 | $(".element a.more").hide(); 11 | 12 | $(".clickable.class,.clickable.interface").click(function() { 13 | document.location = $("a.more", this).attr('href'); 14 | }); 15 | 16 | // change the cursor to a pointer to make it more explicit that this it clickable 17 | // do a background color change on hover to emphasize the clickability eveb more 18 | // we do not use CSS for this because when JS is disabled this behaviour does not 19 | // apply and we do not want the hover 20 | $(".element.method,.element.function,.element.class.clickable,.element.interface.clickable") 21 | .css("cursor", "pointer") 22 | .hover(function() { 23 | $(this).css('backgroundColor', '#F8FDF6') 24 | }, function(){ 25 | $(this).css('backgroundColor', 'white')} 26 | ); 27 | 28 | // do not show tooltips on iPad; it will cause the user having to click twice 29 | if (!$.browser.ipad) { 30 | $('.btn-group.visibility,.btn-group.view,.btn-group.type-filter') 31 | .tooltip({'placement':'bottom'}); 32 | } 33 | 34 | $('.btn-group.visibility,.btn-group.view,.btn-group.type-filter') 35 | .show() 36 | .find('button') 37 | .find('i').click(function(){ $(this).parent().click(); }); 38 | 39 | // set the events for the visibility buttons and enable by default. 40 | $('.visibility button.public').click(function(){ 41 | $('.element.public,.side-nav li.public').toggle($(this).hasClass('active')); 42 | }).click(); 43 | $('.visibility button.protected').click(function(){ 44 | $('.element.protected,.side-nav li.protected').toggle($(this).hasClass('active')); 45 | }).click(); 46 | $('.visibility button.private').click(function(){ 47 | $('.element.private,.side-nav li.private').toggle($(this).hasClass('active')); 48 | }).click(); 49 | $('.visibility button.inherited').click(function(){ 50 | $('.element.inherited,.side-nav li.inherited').toggle($(this).hasClass('active')); 51 | }).click(); 52 | 53 | $('.type-filter button.critical').click(function(){ 54 | $('tr.critical').toggle($(this).hasClass('active')); 55 | }); 56 | $('.type-filter button.error').click(function(){ 57 | $('tr.error').toggle($(this).hasClass('active')); 58 | }); 59 | $('.type-filter button.notice').click(function(){ 60 | $('tr.notice').toggle($(this).hasClass('active')); 61 | }); 62 | 63 | $('.view button.details').click(function(){ 64 | $('.side-nav li.view-simple').removeClass('view-simple'); 65 | }).button('toggle').click(); 66 | 67 | $('.view button.details').click(function(){ 68 | $('.side-nav li.view-simple').removeClass('view-simple'); 69 | }).button('toggle').click(); 70 | $('.view button.simple').click(function(){ 71 | $('.side-nav li').addClass('view-simple'); 72 | }); 73 | 74 | // sorting example 75 | // $('ol li').sort( 76 | // function(a, b) { return a.innerHTML.toLowerCase() > b.innerHTML.toLowerCase() ? 1 : -1; } 77 | // ).appendTo('ol'); 78 | } 79 | 80 | $(document).ready(function() { 81 | prettyPrint(); 82 | 83 | initializeContents(); 84 | 85 | // do not show tooltips on iPad; it will cause the user having to click twice 86 | if(!$.browser.ipad) { 87 | $(".side-nav a").tooltip({'placement': 'top'}); 88 | } 89 | 90 | // chrome cannot deal with certain situations; warn the user about reduced features 91 | if ($.browser.chrome && (window.location.protocol == 'file:')) { 92 | $("body > .container").prepend( 93 | '
×' + 94 | 'You are using Google Chrome in a local environment; AJAX interaction has been ' + 95 | 'disabled because Chrome cannot ' + 96 | 'retrieve files using Ajax.
' 97 | ); 98 | } 99 | 100 | $('ul.nav-namespaces li a, ul.nav-packages li a').click(function(){ 101 | // Google Chrome does not do Ajax locally 102 | if ($.browser.chrome && (window.location.protocol == 'file:')) 103 | { 104 | return true; 105 | } 106 | 107 | $(this).parents('.side-nav').find('.active').removeClass('active'); 108 | $(this).parent().addClass('active'); 109 | $('div.namespace-contents').load( 110 | this.href + ' div.namespace-contents', function(){ 111 | initializeContents(); 112 | $(window).scrollTop($('div.namespace-contents').position().top); 113 | } 114 | ); 115 | $('div.package-contents').load( 116 | this.href + ' div.package-contents', function(){ 117 | initializeContents(); 118 | $(window).scrollTop($('div.package-contents').position().top); 119 | } 120 | ); 121 | 122 | return false; 123 | }); 124 | 125 | function filterPath(string) 126 | { 127 | return string 128 | .replace(/^\//, '') 129 | .replace(/(index|default).[a-zA-Z]{3,4}$/, '') 130 | .replace(/\/$/, ''); 131 | } 132 | 133 | var locationPath = filterPath(location.pathname); 134 | 135 | // the ipad already smoothly scrolls and does not detect the scrollable 136 | // element if top=0; as such we disable this behaviour for the iPad 137 | if (!$.browser.ipad) { 138 | $('a[href*=#]').each(function () 139 | { 140 | var thisPath = filterPath(this.pathname) || locationPath; 141 | if (locationPath == thisPath && (location.hostname == this.hostname || !this.hostname) && this.hash.replace(/#/, '')) 142 | { 143 | var target = decodeURIComponent(this.hash.replace(/#/,'')); 144 | // note: I'm using attribute selector, because id selector can't match elements with '$' 145 | var $target = $('[id="'+target+'"]'); 146 | 147 | if ($target.length > 0) 148 | { 149 | $(this).click(function (event) 150 | { 151 | var scrollElem = scrollableElement('html', 'body'); 152 | var targetOffset = $target.offset().top; 153 | 154 | event.preventDefault(); 155 | $(scrollElem).animate({scrollTop:targetOffset}, 400, function () 156 | { 157 | location.hash = target; 158 | }); 159 | }); 160 | } 161 | } 162 | }); 163 | } 164 | 165 | // use the first element that is "scrollable" 166 | function scrollableElement(els) 167 | { 168 | for (var i = 0, argLength = arguments.length; i < argLength; i++) 169 | { 170 | var el = arguments[i], $scrollElement = $(el); 171 | if ($scrollElement.scrollTop() > 0) 172 | { 173 | return el; 174 | } 175 | else 176 | { 177 | $scrollElement.scrollTop(1); 178 | var isScrollable = $scrollElement.scrollTop() > 0; 179 | $scrollElement.scrollTop(0); 180 | if (isScrollable) 181 | { 182 | return el; 183 | } 184 | } 185 | } 186 | return []; 187 | } 188 | }); 189 | -------------------------------------------------------------------------------- /docs/markers.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Moontoast\Math 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 47 |
48 | 52 |
53 |
57 |
58 | 64 |
65 | The following markers were found: 66 |
  • todo  67 | 1 68 |
69 |
70 |
71 |

72 | BigNumber.php1 73 |

74 |
75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 |
TypeLineDescription
todo455Implement precision digits
86 |
87 |
88 |
89 |
93 |
94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/namespaces/Moontoast.Math.Exception.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Moontoast\Math » Moontoast\Math\Exception 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 47 |
48 | 52 |
53 |
54 |
55 | 56 |
57 | 64 |
65 |
66 | 78 |
79 |

80 | Classes and interfaces

81 |
82 |

ArithmeticException 83 |

84 |

Thrown when an exceptional arithmetic condition has occurred.

85 |
86 | « More » 87 |
88 |
89 |
90 |
91 |
95 |
96 | 97 | 98 | -------------------------------------------------------------------------------- /docs/namespaces/Moontoast.Math.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Moontoast\Math » Moontoast\Math 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 47 |
48 | 52 |
53 |
54 |
55 | 56 |
57 | 66 |
67 |
68 | 77 |
78 |

79 | Classes and interfaces

80 |
81 |

BigNumber 82 |

83 |

Represents a number for use with Binary Calculator computations

84 |
85 | « More » 86 |
87 | 99 |
100 |

101 | Classes and interfaces

102 |
103 |

ArithmeticException 104 |

105 |

Thrown when an exceptional arithmetic condition has occurred.

106 |
107 | « More » 108 |
109 |
110 |
111 |
112 |
113 |
117 |
118 | 119 | 120 | -------------------------------------------------------------------------------- /docs/namespaces/Moontoast.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Moontoast\Math » Moontoast 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 47 |
48 | 52 |
53 |
54 |
55 | 56 |
57 | 68 |
69 |
70 | 76 |
77 |
This namespace does not contain any documentable elements
78 | 87 |
88 |

89 | Classes and interfaces

90 |
91 |

BigNumber 92 |

93 |

Represents a number for use with Binary Calculator computations

94 |
95 | « More » 96 |
97 | 109 |
110 |

111 | Classes and interfaces

112 |
113 |

ArithmeticException 114 |

115 |

Thrown when an exceptional arithmetic condition has occurred.

116 |
117 | « More » 118 |
119 |
120 |
121 |
122 |
123 |
124 |
128 |
129 | 130 | 131 | -------------------------------------------------------------------------------- /docs/packages/Default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Moontoast\Math » Default 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 47 |
48 | 52 |
53 |
54 |
55 | 56 |
57 | 68 |
69 |
70 | 73 |
74 |

75 | Classes and interfaces

76 |
77 |

BigNumber 78 |

79 |

Represents a number for use with Binary Calculator computations

80 |
81 | « More » 82 |
83 |
84 |

ArithmeticException 85 |

86 |

Thrown when an exceptional arithmetic condition has occurred.

87 |
88 | « More » 89 |
90 |
91 |
92 |
93 |
97 |
98 | 99 | 100 | -------------------------------------------------------------------------------- /phpdoc.dist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Moontoast\Math 4 | 5 | build/phpdoc 6 | 7 | 8 | docs 9 | 10 | 11 |