jruby-activemq 5.5.1-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (302) hide show
  1. data/History.md +6 -0
  2. data/LICENSE +619 -0
  3. data/README.md +15 -0
  4. data/Rakefile +34 -0
  5. data/apache-activemq-5.5.1/LICENSE +619 -0
  6. data/apache-activemq-5.5.1/NOTICE +85 -0
  7. data/apache-activemq-5.5.1/README.txt +63 -0
  8. data/apache-activemq-5.5.1/WebConsole-README.txt +42 -0
  9. data/apache-activemq-5.5.1/activemq-all-5.5.1.jar +0 -0
  10. data/apache-activemq-5.5.1/bin/activemq +653 -0
  11. data/apache-activemq-5.5.1/bin/activemq-admin +155 -0
  12. data/apache-activemq-5.5.1/bin/linux-x86-32/activemq +543 -0
  13. data/apache-activemq-5.5.1/bin/linux-x86-32/libwrapper.so +0 -0
  14. data/apache-activemq-5.5.1/bin/linux-x86-32/wrapper +0 -0
  15. data/apache-activemq-5.5.1/bin/linux-x86-32/wrapper.conf +139 -0
  16. data/apache-activemq-5.5.1/bin/linux-x86-64/activemq +543 -0
  17. data/apache-activemq-5.5.1/bin/linux-x86-64/libwrapper.so +0 -0
  18. data/apache-activemq-5.5.1/bin/linux-x86-64/wrapper +0 -0
  19. data/apache-activemq-5.5.1/bin/linux-x86-64/wrapper.conf +139 -0
  20. data/apache-activemq-5.5.1/bin/macosx/activemq +537 -0
  21. data/apache-activemq-5.5.1/bin/macosx/libwrapper.jnilib +0 -0
  22. data/apache-activemq-5.5.1/bin/macosx/wrapper +0 -0
  23. data/apache-activemq-5.5.1/bin/macosx/wrapper.conf +139 -0
  24. data/apache-activemq-5.5.1/bin/run.jar +0 -0
  25. data/apache-activemq-5.5.1/bin/wrapper.jar +0 -0
  26. data/apache-activemq-5.5.1/conf/activemq-command.xml +52 -0
  27. data/apache-activemq-5.5.1/conf/activemq-demo.xml +289 -0
  28. data/apache-activemq-5.5.1/conf/activemq-dynamic-network-broker1.xml +108 -0
  29. data/apache-activemq-5.5.1/conf/activemq-dynamic-network-broker2.xml +109 -0
  30. data/apache-activemq-5.5.1/conf/activemq-jdbc.xml +98 -0
  31. data/apache-activemq-5.5.1/conf/activemq-scalability.xml +77 -0
  32. data/apache-activemq-5.5.1/conf/activemq-security.xml +132 -0
  33. data/apache-activemq-5.5.1/conf/activemq-specjms.xml +118 -0
  34. data/apache-activemq-5.5.1/conf/activemq-static-network-broker1.xml +100 -0
  35. data/apache-activemq-5.5.1/conf/activemq-static-network-broker2.xml +100 -0
  36. data/apache-activemq-5.5.1/conf/activemq-stomp.xml +133 -0
  37. data/apache-activemq-5.5.1/conf/activemq-throughput.xml +82 -0
  38. data/apache-activemq-5.5.1/conf/activemq.xml +136 -0
  39. data/apache-activemq-5.5.1/conf/broker-localhost.cert +0 -0
  40. data/apache-activemq-5.5.1/conf/broker.ks +0 -0
  41. data/apache-activemq-5.5.1/conf/broker.ts +0 -0
  42. data/apache-activemq-5.5.1/conf/camel.xml +66 -0
  43. data/apache-activemq-5.5.1/conf/client.ks +0 -0
  44. data/apache-activemq-5.5.1/conf/client.ts +0 -0
  45. data/apache-activemq-5.5.1/conf/credentials-enc.properties +22 -0
  46. data/apache-activemq-5.5.1/conf/credentials.properties +22 -0
  47. data/apache-activemq-5.5.1/conf/jetty-realm.properties +20 -0
  48. data/apache-activemq-5.5.1/conf/jetty.xml +112 -0
  49. data/apache-activemq-5.5.1/conf/jmx.access +18 -0
  50. data/apache-activemq-5.5.1/conf/jmx.password +18 -0
  51. data/apache-activemq-5.5.1/conf/log4j.properties +75 -0
  52. data/apache-activemq-5.5.1/conf/logging.properties +25 -0
  53. data/apache-activemq-5.5.1/data/activemq.log +0 -0
  54. data/apache-activemq-5.5.1/docs/index.html +22 -0
  55. data/apache-activemq-5.5.1/example/build.xml +317 -0
  56. data/apache-activemq-5.5.1/example/conf/activemq.xml +41 -0
  57. data/apache-activemq-5.5.1/example/conf/log4j.properties +39 -0
  58. data/apache-activemq-5.5.1/example/conf/resin-web.xml +35 -0
  59. data/apache-activemq-5.5.1/example/conf/web.xml +40 -0
  60. data/apache-activemq-5.5.1/example/perfharness/perfharness-activemq.sh +49 -0
  61. data/apache-activemq-5.5.1/example/ruby/README.txt +27 -0
  62. data/apache-activemq-5.5.1/example/ruby/catstomp.rb +49 -0
  63. data/apache-activemq-5.5.1/example/ruby/listener.rb +51 -0
  64. data/apache-activemq-5.5.1/example/ruby/publisher.rb +67 -0
  65. data/apache-activemq-5.5.1/example/ruby/stompcat.rb +50 -0
  66. data/apache-activemq-5.5.1/example/src/CommandLineSupport.java +120 -0
  67. data/apache-activemq-5.5.1/example/src/ConsumerTool.java +353 -0
  68. data/apache-activemq-5.5.1/example/src/EmbeddedBroker.java +41 -0
  69. data/apache-activemq-5.5.1/example/src/Log4jJMSAppenderExample.java +70 -0
  70. data/apache-activemq-5.5.1/example/src/ProducerAndConsumerTool.java +51 -0
  71. data/apache-activemq-5.5.1/example/src/ProducerTool.java +247 -0
  72. data/apache-activemq-5.5.1/example/src/RequesterTool.java +257 -0
  73. data/apache-activemq-5.5.1/example/src/StompExample.java +59 -0
  74. data/apache-activemq-5.5.1/example/src/TopicListener.java +118 -0
  75. data/apache-activemq-5.5.1/example/src/TopicPublisher.java +205 -0
  76. data/apache-activemq-5.5.1/example/src/jndi.properties +17 -0
  77. data/apache-activemq-5.5.1/example/src/log4j-jms.properties +31 -0
  78. data/apache-activemq-5.5.1/example/transactions/README.txt +40 -0
  79. data/apache-activemq-5.5.1/example/transactions/build.xml +113 -0
  80. data/apache-activemq-5.5.1/example/transactions/src/Retailer.java +107 -0
  81. data/apache-activemq-5.5.1/example/transactions/src/Supplier.java +135 -0
  82. data/apache-activemq-5.5.1/example/transactions/src/TransactionsDemo.java +47 -0
  83. data/apache-activemq-5.5.1/example/transactions/src/Vendor.java +302 -0
  84. data/apache-activemq-5.5.1/lib/a.sh +3 -0
  85. data/apache-activemq-5.5.1/lib/activation-1.1.jar +0 -0
  86. data/apache-activemq-5.5.1/lib/activemq-camel-5.5.1.jar +0 -0
  87. data/apache-activemq-5.5.1/lib/activemq-console-5.5.1.jar +0 -0
  88. data/apache-activemq-5.5.1/lib/activemq-core-5.5.1.jar +0 -0
  89. data/apache-activemq-5.5.1/lib/activemq-jaas-5.5.1.jar +0 -0
  90. data/apache-activemq-5.5.1/lib/activemq-protobuf-1.1.jar +0 -0
  91. data/apache-activemq-5.5.1/lib/activemq-rar.txt +20 -0
  92. data/apache-activemq-5.5.1/lib/activemq-web-5.5.1.jar +0 -0
  93. data/apache-activemq-5.5.1/lib/camel-core-2.7.0.jar +0 -0
  94. data/apache-activemq-5.5.1/lib/camel-jetty-2.7.0.jar +0 -0
  95. data/apache-activemq-5.5.1/lib/camel-jms-2.7.0.jar +0 -0
  96. data/apache-activemq-5.5.1/lib/camel-spring-2.7.0.jar +0 -0
  97. data/apache-activemq-5.5.1/lib/geronimo-j2ee-management_1.1_spec-1.0.1.jar +0 -0
  98. data/apache-activemq-5.5.1/lib/geronimo-jms_1.1_spec-1.1.1.jar +0 -0
  99. data/apache-activemq-5.5.1/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar +0 -0
  100. data/apache-activemq-5.5.1/lib/jaxb-api-2.1.jar +0 -0
  101. data/apache-activemq-5.5.1/lib/jaxb-impl-2.1.6.jar +0 -0
  102. data/apache-activemq-5.5.1/lib/jcl-over-slf4j-1.5.11.jar +0 -0
  103. data/apache-activemq-5.5.1/lib/kahadb-5.5.1.jar +0 -0
  104. data/apache-activemq-5.5.1/lib/optional/activeio-core-3.1.2.jar +0 -0
  105. data/apache-activemq-5.5.1/lib/optional/activemq-jmdns_1.0-5.5.1.jar +0 -0
  106. data/apache-activemq-5.5.1/lib/optional/activemq-optional-5.5.1.jar +0 -0
  107. data/apache-activemq-5.5.1/lib/optional/activemq-pool-5.5.1.jar +0 -0
  108. data/apache-activemq-5.5.1/lib/optional/activemq-spring-5.5.1.jar +0 -0
  109. data/apache-activemq-5.5.1/lib/optional/activemq-xmpp-5.5.1.jar +0 -0
  110. data/apache-activemq-5.5.1/lib/optional/commons-beanutils-1.6.1.jar +0 -0
  111. data/apache-activemq-5.5.1/lib/optional/commons-codec-1.2.jar +0 -0
  112. data/apache-activemq-5.5.1/lib/optional/commons-collections-3.2.1.jar +0 -0
  113. data/apache-activemq-5.5.1/lib/optional/commons-dbcp-1.2.2.jar +0 -0
  114. data/apache-activemq-5.5.1/lib/optional/commons-httpclient-3.1.jar +0 -0
  115. data/apache-activemq-5.5.1/lib/optional/commons-lang-2.4.jar +0 -0
  116. data/apache-activemq-5.5.1/lib/optional/commons-net-2.0.jar +0 -0
  117. data/apache-activemq-5.5.1/lib/optional/commons-pool-1.5.4.jar +0 -0
  118. data/apache-activemq-5.5.1/lib/optional/geronimo-j2ee-connector_1.5_spec-2.0.0.jar +0 -0
  119. data/apache-activemq-5.5.1/lib/optional/jasypt-1.7.jar +0 -0
  120. data/apache-activemq-5.5.1/lib/optional/jettison-1.2.jar +0 -0
  121. data/apache-activemq-5.5.1/lib/optional/josql-1.5.jar +0 -0
  122. data/apache-activemq-5.5.1/lib/optional/log4j-1.2.14.jar +0 -0
  123. data/apache-activemq-5.5.1/lib/optional/slf4j-log4j12-1.5.11.jar +0 -0
  124. data/apache-activemq-5.5.1/lib/optional/spring-aop-3.0.3.RELEASE.jar +0 -0
  125. data/apache-activemq-5.5.1/lib/optional/spring-asm-3.0.3.RELEASE.jar +0 -0
  126. data/apache-activemq-5.5.1/lib/optional/spring-beans-3.0.3.RELEASE.jar +0 -0
  127. data/apache-activemq-5.5.1/lib/optional/spring-context-3.0.3.RELEASE.jar +0 -0
  128. data/apache-activemq-5.5.1/lib/optional/spring-core-3.0.3.RELEASE.jar +0 -0
  129. data/apache-activemq-5.5.1/lib/optional/spring-expression-3.0.3.RELEASE.jar +0 -0
  130. data/apache-activemq-5.5.1/lib/optional/spring-jms-3.0.3.RELEASE.jar +0 -0
  131. data/apache-activemq-5.5.1/lib/optional/spring-oxm-tiger-1.5.8.jar +0 -0
  132. data/apache-activemq-5.5.1/lib/optional/spring-tx-3.0.3.RELEASE.jar +0 -0
  133. data/apache-activemq-5.5.1/lib/optional/stax2-api-3.0.1.jar +0 -0
  134. data/apache-activemq-5.5.1/lib/optional/velocity-1.6.2.jar +0 -0
  135. data/apache-activemq-5.5.1/lib/optional/woodstox-core-asl-4.0.7.jar +0 -0
  136. data/apache-activemq-5.5.1/lib/optional/xbean-spring-3.7.jar +0 -0
  137. data/apache-activemq-5.5.1/lib/optional/xpp3-1.1.4c.jar +0 -0
  138. data/apache-activemq-5.5.1/lib/optional/xstream-1.3.1.jar +0 -0
  139. data/apache-activemq-5.5.1/lib/slf4j-api-1.5.11.jar +0 -0
  140. data/apache-activemq-5.5.1/lib/stax-1.2.0.jar +0 -0
  141. data/apache-activemq-5.5.1/lib/stax-api-1.0.1.jar +0 -0
  142. data/apache-activemq-5.5.1/lib/web/commons-management-1.0.jar +0 -0
  143. data/apache-activemq-5.5.1/lib/web/core-3.1.1.jar +0 -0
  144. data/apache-activemq-5.5.1/lib/web/geronimo-servlet_2.5_spec-1.2.jar +0 -0
  145. data/apache-activemq-5.5.1/lib/web/jdom-1.0.jar +0 -0
  146. data/apache-activemq-5.5.1/lib/web/jetty-all-server-7.1.6.v20100715.jar +0 -0
  147. data/apache-activemq-5.5.1/lib/web/jetty-websocket-7.1.6.v20100715.jar +0 -0
  148. data/apache-activemq-5.5.1/lib/web/jsp-2.1-glassfish-2.1.v20100127.jar +0 -0
  149. data/apache-activemq-5.5.1/lib/web/jsp-api-2.1-glassfish-2.1.v20100127.jar +0 -0
  150. data/apache-activemq-5.5.1/lib/web/rome-0.8.jar +0 -0
  151. data/apache-activemq-5.5.1/lib/web/sitemesh-2.2.1.jar +0 -0
  152. data/apache-activemq-5.5.1/lib/web/spring-web-3.0.3.RELEASE.jar +0 -0
  153. data/apache-activemq-5.5.1/lib/web/spring-webmvc-3.0.3.RELEASE.jar +0 -0
  154. data/apache-activemq-5.5.1/user-guide.html +119 -0
  155. data/apache-activemq-5.5.1/webapps/admin/404.html +137 -0
  156. data/apache-activemq-5.5.1/webapps/admin/500.html +138 -0
  157. data/apache-activemq-5.5.1/webapps/admin/META-INF/LICENSE +1026 -0
  158. data/apache-activemq-5.5.1/webapps/admin/META-INF/NOTICE +107 -0
  159. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/WebConsoleStarter.class +0 -0
  160. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/CopyMessage.class +0 -0
  161. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/CreateDestination.class +0 -0
  162. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/CreateSubscriber.class +0 -0
  163. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/DeleteDestination.class +0 -0
  164. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/DeleteJob.class +0 -0
  165. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/DeleteMessage.class +0 -0
  166. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/DeleteSubscriber.class +0 -0
  167. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/MoveMessage.class +0 -0
  168. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/PurgeDestination.class +0 -0
  169. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/SendMessage.class +0 -0
  170. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/filter/ApplicationContextFilter$1.class +0 -0
  171. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/filter/ApplicationContextFilter$2.class +0 -0
  172. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/filter/ApplicationContextFilter.class +0 -0
  173. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.class +0 -0
  174. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/decorators.xml +30 -0
  175. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/dispatcher-servlet.xml +62 -0
  176. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/jspf/headertags.jspf +21 -0
  177. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/jspf/old.jspf +21 -0
  178. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/checkbox.tag +18 -0
  179. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/forEachMapEntry.tag +29 -0
  180. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/option.tag +20 -0
  181. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/short.tag +29 -0
  182. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/text.tag +30 -0
  183. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/tooltip.tag +29 -0
  184. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/uri.tag +18 -0
  185. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/jms/forEachConnection.tag +35 -0
  186. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/jms/forEachMessage.tag +34 -0
  187. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/jms/formatTimestamp.tag +29 -0
  188. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/jms/persistent.tag +27 -0
  189. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/web.xml +187 -0
  190. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-default.xml +26 -0
  191. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-embedded.xml +45 -0
  192. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-invm.xml +41 -0
  193. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-jndi.xml +39 -0
  194. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-properties.xml +39 -0
  195. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-query.xml +25 -0
  196. data/apache-activemq-5.5.1/webapps/admin/browse.jsp +64 -0
  197. data/apache-activemq-5.5.1/webapps/admin/connection.jsp +138 -0
  198. data/apache-activemq-5.5.1/webapps/admin/connections.jsp +85 -0
  199. data/apache-activemq-5.5.1/webapps/admin/decorators/main.jsp +165 -0
  200. data/apache-activemq-5.5.1/webapps/admin/decorators/panel.jsp +31 -0
  201. data/apache-activemq-5.5.1/webapps/admin/decorators/printable.jsp +31 -0
  202. data/apache-activemq-5.5.1/webapps/admin/graph.jsp +67 -0
  203. data/apache-activemq-5.5.1/webapps/admin/images/activemq-logo.png +0 -0
  204. data/apache-activemq-5.5.1/webapps/admin/images/asf-logo.png +0 -0
  205. data/apache-activemq-5.5.1/webapps/admin/images/big-bullet.png +0 -0
  206. data/apache-activemq-5.5.1/webapps/admin/images/black-footer-bottom.png +0 -0
  207. data/apache-activemq-5.5.1/webapps/admin/images/black-footer-left.png +0 -0
  208. data/apache-activemq-5.5.1/webapps/admin/images/black-footer-right.png +0 -0
  209. data/apache-activemq-5.5.1/webapps/admin/images/bottom-red-bar.png +0 -0
  210. data/apache-activemq-5.5.1/webapps/admin/images/checker-bg.png +0 -0
  211. data/apache-activemq-5.5.1/webapps/admin/images/content-left.png +0 -0
  212. data/apache-activemq-5.5.1/webapps/admin/images/content-right.png +0 -0
  213. data/apache-activemq-5.5.1/webapps/admin/images/feed_atom.png +0 -0
  214. data/apache-activemq-5.5.1/webapps/admin/images/feed_rss.png +0 -0
  215. data/apache-activemq-5.5.1/webapps/admin/images/left-box-bottom.png +0 -0
  216. data/apache-activemq-5.5.1/webapps/admin/images/left-box-right.png +0 -0
  217. data/apache-activemq-5.5.1/webapps/admin/images/left-box-top.png +0 -0
  218. data/apache-activemq-5.5.1/webapps/admin/images/oval-arrow.png +0 -0
  219. data/apache-activemq-5.5.1/webapps/admin/images/right-box-bottom.png +0 -0
  220. data/apache-activemq-5.5.1/webapps/admin/images/right-box-left.png +0 -0
  221. data/apache-activemq-5.5.1/webapps/admin/images/right-box-top.png +0 -0
  222. data/apache-activemq-5.5.1/webapps/admin/images/small-bullet-gray.png +0 -0
  223. data/apache-activemq-5.5.1/webapps/admin/images/small-bullet-red.png +0 -0
  224. data/apache-activemq-5.5.1/webapps/admin/images/spacer.gif +0 -0
  225. data/apache-activemq-5.5.1/webapps/admin/images/top-red-bar.png +0 -0
  226. data/apache-activemq-5.5.1/webapps/admin/images/white-header-left.png +0 -0
  227. data/apache-activemq-5.5.1/webapps/admin/images/white-header-right.png +0 -0
  228. data/apache-activemq-5.5.1/webapps/admin/images/white-header-top.png +0 -0
  229. data/apache-activemq-5.5.1/webapps/admin/index.jsp +65 -0
  230. data/apache-activemq-5.5.1/webapps/admin/js/common.js +121 -0
  231. data/apache-activemq-5.5.1/webapps/admin/js/css.js +145 -0
  232. data/apache-activemq-5.5.1/webapps/admin/js/mochi/MochiKit.js +4804 -0
  233. data/apache-activemq-5.5.1/webapps/admin/js/mochi/__package__.js +14 -0
  234. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/Base.js +332 -0
  235. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/Canvas.js +707 -0
  236. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/Layout.js +588 -0
  237. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/SVG.js +677 -0
  238. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/SweetCanvas.js +281 -0
  239. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/SweetSVG.js +196 -0
  240. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/dummy.svg +15 -0
  241. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/iecanvas.htc +389 -0
  242. data/apache-activemq-5.5.1/webapps/admin/js/prettify.js +1424 -0
  243. data/apache-activemq-5.5.1/webapps/admin/js/standardista-table-sorting.js +434 -0
  244. data/apache-activemq-5.5.1/webapps/admin/message.jsp +185 -0
  245. data/apache-activemq-5.5.1/webapps/admin/network.jsp +52 -0
  246. data/apache-activemq-5.5.1/webapps/admin/queueConsumers.jsp +79 -0
  247. data/apache-activemq-5.5.1/webapps/admin/queueGraph.jsp +68 -0
  248. data/apache-activemq-5.5.1/webapps/admin/queues.jsp +78 -0
  249. data/apache-activemq-5.5.1/webapps/admin/scheduled.jsp +67 -0
  250. data/apache-activemq-5.5.1/webapps/admin/send.jsp +173 -0
  251. data/apache-activemq-5.5.1/webapps/admin/styles/prettify.css +44 -0
  252. data/apache-activemq-5.5.1/webapps/admin/styles/site.css +206 -0
  253. data/apache-activemq-5.5.1/webapps/admin/styles/sorttable.css +70 -0
  254. data/apache-activemq-5.5.1/webapps/admin/styles/type-settings.css +177 -0
  255. data/apache-activemq-5.5.1/webapps/admin/subscribers.jsp +158 -0
  256. data/apache-activemq-5.5.1/webapps/admin/test/dummy.jsp +52 -0
  257. data/apache-activemq-5.5.1/webapps/admin/test/index.jsp +84 -0
  258. data/apache-activemq-5.5.1/webapps/admin/test/systemProperties.jsp +53 -0
  259. data/apache-activemq-5.5.1/webapps/admin/topics.jsp +66 -0
  260. data/apache-activemq-5.5.1/webapps/admin/xml/queues.jsp +34 -0
  261. data/apache-activemq-5.5.1/webapps/admin/xml/topics.jsp +29 -0
  262. data/apache-activemq-5.5.1/webapps/demo/META-INF/LICENSE +494 -0
  263. data/apache-activemq-5.5.1/webapps/demo/META-INF/NOTICE +82 -0
  264. data/apache-activemq-5.5.1/webapps/demo/WEB-INF/web.xml +111 -0
  265. data/apache-activemq-5.5.1/webapps/demo/chat.css +76 -0
  266. data/apache-activemq-5.5.1/webapps/demo/chat.html +219 -0
  267. data/apache-activemq-5.5.1/webapps/demo/index.html +181 -0
  268. data/apache-activemq-5.5.1/webapps/demo/js/amq.js +307 -0
  269. data/apache-activemq-5.5.1/webapps/demo/js/amq_dojo_adapter.js +84 -0
  270. data/apache-activemq-5.5.1/webapps/demo/js/amq_jquery_adapter.js +88 -0
  271. data/apache-activemq-5.5.1/webapps/demo/js/amq_prototype_adapter.js +84 -0
  272. data/apache-activemq-5.5.1/webapps/demo/js/chat.js +209 -0
  273. data/apache-activemq-5.5.1/webapps/demo/js/dojo.js +16 -0
  274. data/apache-activemq-5.5.1/webapps/demo/js/jquery-1.4.2.min.js +154 -0
  275. data/apache-activemq-5.5.1/webapps/demo/js/prototype.js +4874 -0
  276. data/apache-activemq-5.5.1/webapps/demo/portfolio/portfolio.html +87 -0
  277. data/apache-activemq-5.5.1/webapps/demo/portfolio/portfolio.js +91 -0
  278. data/apache-activemq-5.5.1/webapps/demo/sandbox/index.html +31 -0
  279. data/apache-activemq-5.5.1/webapps/demo/sandbox/portfolio.html +93 -0
  280. data/apache-activemq-5.5.1/webapps/demo/sandbox/portfolio.js +49 -0
  281. data/apache-activemq-5.5.1/webapps/demo/sandbox/util.js +52 -0
  282. data/apache-activemq-5.5.1/webapps/demo/sandbox/webmq.js +149 -0
  283. data/apache-activemq-5.5.1/webapps/demo/send.html +51 -0
  284. data/apache-activemq-5.5.1/webapps/demo/style.css +440 -0
  285. data/apache-activemq-5.5.1/webapps/demo/test/amq_test.html +311 -0
  286. data/apache-activemq-5.5.1/webapps/demo/test/assets/README +4 -0
  287. data/apache-activemq-5.5.1/webapps/demo/test/assets/jsunittest.js +1017 -0
  288. data/apache-activemq-5.5.1/webapps/demo/test/assets/unittest.css +54 -0
  289. data/apache-activemq-5.5.1/webapps/favicon.ico +0 -0
  290. data/apache-activemq-5.5.1/webapps/fileserver/META-INF/LICENSE +203 -0
  291. data/apache-activemq-5.5.1/webapps/fileserver/META-INF/NOTICE +5 -0
  292. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/classes/org/apache/activemq/util/FilenameGuardFilter$GuardedHttpServletRequest.class +0 -0
  293. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/classes/org/apache/activemq/util/FilenameGuardFilter.class +0 -0
  294. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/classes/org/apache/activemq/util/IOHelper.class +0 -0
  295. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/classes/org/apache/activemq/util/RestFilter.class +0 -0
  296. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/web.xml +56 -0
  297. data/apache-activemq-5.5.1/webapps/fileserver/index.html +30 -0
  298. data/apache-activemq-5.5.1/webapps/index.html +145 -0
  299. data/apache-activemq-5.5.1/webapps/styles/site.css +206 -0
  300. data/apache-activemq-5.5.1/webapps/styles/type-settings.css +177 -0
  301. data/lib/activemq.rb +11 -0
  302. metadata +382 -0
@@ -0,0 +1,4804 @@
1
+ /***
2
+
3
+ MochiKit.MochiKit 1.3 : PACKED VERSION
4
+
5
+ THIS FILE IS AUTOMATICALLY GENERATED. If creating patches, please
6
+ diff against the source tree, not this file.
7
+
8
+ See <http://mochikit.com/> for documentation, downloads, license, etc.
9
+
10
+ (c) 2005 Bob Ippolito. All rights Reserved.
11
+
12
+ ***/
13
+
14
+ if(typeof (dojo)!="undefined"){
15
+ dojo.provide("MochiKit.Base");
16
+ }
17
+ if(typeof (MochiKit)=="undefined"){
18
+ MochiKit={};
19
+ }
20
+ if(typeof (MochiKit.Base)=="undefined"){
21
+ MochiKit.Base={};
22
+ }
23
+ MochiKit.Base.VERSION="1.3";
24
+ MochiKit.Base.NAME="MochiKit.Base";
25
+ MochiKit.Base.update=function(_1,_2){
26
+ if(_1===null){
27
+ _1={};
28
+ }
29
+ for(var i=1;i<arguments.length;i++){
30
+ var o=arguments[i];
31
+ if(typeof (o)!="undefined"&&o!==null){
32
+ for(var k in o){
33
+ _1[k]=o[k];
34
+ }
35
+ }
36
+ }
37
+ return _1;
38
+ };
39
+ MochiKit.Base.update(MochiKit.Base,{__repr__:function(){
40
+ return "["+this.NAME+" "+this.VERSION+"]";
41
+ },toString:function(){
42
+ return this.__repr__();
43
+ },counter:function(n){
44
+ if(arguments.length===0){
45
+ n=1;
46
+ }
47
+ return function(){
48
+ return n++;
49
+ };
50
+ },clone:function(_7){
51
+ var me=arguments.callee;
52
+ if(arguments.length==1){
53
+ me.prototype=_7;
54
+ return new me();
55
+ }
56
+ },flattenArguments:function(_9){
57
+ var res=[];
58
+ var m=MochiKit.Base;
59
+ var _12=m.extend(null,arguments);
60
+ while(_12.length){
61
+ var o=_12.shift();
62
+ if(o&&typeof (o)=="object"&&typeof (o.length)=="number"){
63
+ for(var i=o.length-1;i>=0;i--){
64
+ _12.unshift(o[i]);
65
+ }
66
+ }else{
67
+ res.push(o);
68
+ }
69
+ }
70
+ return res;
71
+ },extend:function(_13,obj,_15){
72
+ if(!_15){
73
+ _15=0;
74
+ }
75
+ if(obj){
76
+ var l=obj.length;
77
+ if(typeof (l)!="number"){
78
+ if(typeof (MochiKit.Iter)!="undefined"){
79
+ obj=MochiKit.Iter.list(obj);
80
+ l=obj.length;
81
+ }else{
82
+ throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
83
+ }
84
+ }
85
+ if(!_13){
86
+ _13=[];
87
+ }
88
+ for(var i=_15;i<l;i++){
89
+ _13.push(obj[i]);
90
+ }
91
+ }
92
+ return _13;
93
+ },updatetree:function(_17,obj){
94
+ if(_17===null){
95
+ _17={};
96
+ }
97
+ for(var i=1;i<arguments.length;i++){
98
+ var o=arguments[i];
99
+ if(typeof (o)!="undefined"&&o!==null){
100
+ for(var k in o){
101
+ var v=o[k];
102
+ if(typeof (_17[k])=="object"&&typeof (v)=="object"){
103
+ arguments.callee(_17[k],v);
104
+ }else{
105
+ _17[k]=v;
106
+ }
107
+ }
108
+ }
109
+ }
110
+ return _17;
111
+ },setdefault:function(_19,obj){
112
+ if(_19===null){
113
+ _19={};
114
+ }
115
+ for(var i=1;i<arguments.length;i++){
116
+ var o=arguments[i];
117
+ for(var k in o){
118
+ if(!(k in _19)){
119
+ _19[k]=o[k];
120
+ }
121
+ }
122
+ }
123
+ return _19;
124
+ },keys:function(obj){
125
+ var _20=[];
126
+ for(var _21 in obj){
127
+ _20.push(_21);
128
+ }
129
+ return _20;
130
+ },items:function(obj){
131
+ var _22=[];
132
+ var e;
133
+ for(var _24 in obj){
134
+ var v;
135
+ try{
136
+ v=obj[_24];
137
+ }
138
+ catch(e){
139
+ continue;
140
+ }
141
+ _22.push([_24,v]);
142
+ }
143
+ return _22;
144
+ },_newNamedError:function(_25,_26,_27){
145
+ _27.prototype=new MochiKit.Base.NamedError(_25.NAME+"."+_26);
146
+ _25[_26]=_27;
147
+ },operator:{truth:function(a){
148
+ return !!a;
149
+ },lognot:function(a){
150
+ return !a;
151
+ },identity:function(a){
152
+ return a;
153
+ },not:function(a){
154
+ return ~a;
155
+ },neg:function(a){
156
+ return -a;
157
+ },add:function(a,b){
158
+ return a+b;
159
+ },sub:function(a,b){
160
+ return a-b;
161
+ },div:function(a,b){
162
+ return a/b;
163
+ },mod:function(a,b){
164
+ return a%b;
165
+ },mul:function(a,b){
166
+ return a*b;
167
+ },and:function(a,b){
168
+ return a&b;
169
+ },or:function(a,b){
170
+ return a|b;
171
+ },xor:function(a,b){
172
+ return a^b;
173
+ },lshift:function(a,b){
174
+ return a<<b;
175
+ },rshift:function(a,b){
176
+ return a>>b;
177
+ },zrshift:function(a,b){
178
+ return a>>>b;
179
+ },eq:function(a,b){
180
+ return a==b;
181
+ },ne:function(a,b){
182
+ return a!=b;
183
+ },gt:function(a,b){
184
+ return a>b;
185
+ },ge:function(a,b){
186
+ return a>=b;
187
+ },lt:function(a,b){
188
+ return a<b;
189
+ },le:function(a,b){
190
+ return a<=b;
191
+ },ceq:function(a,b){
192
+ return MochiKit.Base.compare(a,b)===0;
193
+ },cne:function(a,b){
194
+ return MochiKit.Base.compare(a,b)!==0;
195
+ },cgt:function(a,b){
196
+ return MochiKit.Base.compare(a,b)==1;
197
+ },cge:function(a,b){
198
+ return MochiKit.Base.compare(a,b)!=-1;
199
+ },clt:function(a,b){
200
+ return MochiKit.Base.compare(a,b)==-1;
201
+ },cle:function(a,b){
202
+ return MochiKit.Base.compare(a,b)!=1;
203
+ },logand:function(a,b){
204
+ return a&&b;
205
+ },logor:function(a,b){
206
+ return a||b;
207
+ },contains:function(a,b){
208
+ return b in a;
209
+ }},forwardCall:function(_30){
210
+ return function(){
211
+ return this[_30].apply(this,arguments);
212
+ };
213
+ },itemgetter:function(_31){
214
+ return function(arg){
215
+ return arg[_31];
216
+ };
217
+ },typeMatcher:function(){
218
+ var _33={};
219
+ for(var i=0;i<arguments.length;i++){
220
+ var typ=arguments[i];
221
+ _33[typ]=typ;
222
+ }
223
+ return function(){
224
+ for(var i=0;i<arguments.length;i++){
225
+ if(!(typeof (arguments[i]) in _33)){
226
+ return false;
227
+ }
228
+ }
229
+ return true;
230
+ };
231
+ },isNull:function(){
232
+ for(var i=0;i<arguments.length;i++){
233
+ if(arguments[i]!==null){
234
+ return false;
235
+ }
236
+ }
237
+ return true;
238
+ },isUndefinedOrNull:function(){
239
+ for(var i=0;i<arguments.length;i++){
240
+ var o=arguments[i];
241
+ if(!(typeof (o)=="undefined"||o===null)){
242
+ return false;
243
+ }
244
+ }
245
+ return true;
246
+ },isEmpty:function(obj){
247
+ return !MochiKit.Base.isNotEmpty.apply(this,arguments);
248
+ },isNotEmpty:function(obj){
249
+ for(var i=0;i<arguments.length;i++){
250
+ var o=arguments[i];
251
+ if(!(o&&o.length)){
252
+ return false;
253
+ }
254
+ }
255
+ return true;
256
+ },isArrayLike:function(){
257
+ for(var i=0;i<arguments.length;i++){
258
+ var o=arguments[i];
259
+ var typ=typeof (o);
260
+ if((typ!="object"&&!(typ=="function"&&typeof (o.item)=="function"))||o===null||typeof (o.length)!="number"){
261
+ return false;
262
+ }
263
+ }
264
+ return true;
265
+ },isDateLike:function(){
266
+ for(var i=0;i<arguments.length;i++){
267
+ var o=arguments[i];
268
+ if(typeof (o)!="object"||o===null||typeof (o.getTime)!="function"){
269
+ return false;
270
+ }
271
+ }
272
+ return true;
273
+ },xmap:function(fn){
274
+ if(fn===null){
275
+ return MochiKit.Base.extend(null,arguments,1);
276
+ }
277
+ var _36=[];
278
+ for(var i=1;i<arguments.length;i++){
279
+ _36.push(fn(arguments[i]));
280
+ }
281
+ return _36;
282
+ },map:function(fn,lst){
283
+ var m=MochiKit.Base;
284
+ var itr=MochiKit.Iter;
285
+ var _39=m.isArrayLike;
286
+ if(arguments.length<=2){
287
+ if(!_39(lst)){
288
+ if(itr){
289
+ lst=itr.list(lst);
290
+ if(fn===null){
291
+ return lst;
292
+ }
293
+ }else{
294
+ throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
295
+ }
296
+ }
297
+ if(fn===null){
298
+ return m.extend(null,lst);
299
+ }
300
+ var _40=[];
301
+ for(var i=0;i<lst.length;i++){
302
+ _40.push(fn(lst[i]));
303
+ }
304
+ return _40;
305
+ }else{
306
+ if(fn===null){
307
+ fn=Array;
308
+ }
309
+ var _41=null;
310
+ for(i=1;i<arguments.length;i++){
311
+ if(!_39(arguments[i])){
312
+ if(itr){
313
+ return itr.list(itr.imap.apply(null,arguments));
314
+ }else{
315
+ throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
316
+ }
317
+ }
318
+ var l=arguments[i].length;
319
+ if(_41===null||_41>l){
320
+ _41=l;
321
+ }
322
+ }
323
+ _40=[];
324
+ for(i=0;i<_41;i++){
325
+ var _42=[];
326
+ for(var j=1;j<arguments.length;j++){
327
+ _42.push(arguments[j][i]);
328
+ }
329
+ _40.push(fn.apply(this,_42));
330
+ }
331
+ return _40;
332
+ }
333
+ },xfilter:function(fn){
334
+ var _44=[];
335
+ if(fn===null){
336
+ fn=MochiKit.Base.operator.truth;
337
+ }
338
+ for(var i=1;i<arguments.length;i++){
339
+ var o=arguments[i];
340
+ if(fn(o)){
341
+ _44.push(o);
342
+ }
343
+ }
344
+ return _44;
345
+ },filter:function(fn,lst,_45){
346
+ var _46=[];
347
+ var m=MochiKit.Base;
348
+ if(!m.isArrayLike(lst)){
349
+ if(MochiKit.Iter){
350
+ lst=MochiKit.Iter.list(lst);
351
+ }else{
352
+ throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
353
+ }
354
+ }
355
+ if(fn===null){
356
+ fn=m.operator.truth;
357
+ }
358
+ if(typeof (Array.prototype.filter)=="function"){
359
+ return Array.prototype.filter.call(lst,fn,_45);
360
+ }else{
361
+ if(typeof (_45)=="undefined"||_45===null){
362
+ for(var i=0;i<lst.length;i++){
363
+ var o=lst[i];
364
+ if(fn(o)){
365
+ _46.push(o);
366
+ }
367
+ }
368
+ }else{
369
+ for(i=0;i<lst.length;i++){
370
+ o=lst[i];
371
+ if(fn.call(_45,o)){
372
+ _46.push(o);
373
+ }
374
+ }
375
+ }
376
+ }
377
+ return _46;
378
+ },_wrapDumbFunction:function(_47){
379
+ return function(){
380
+ switch(arguments.length){
381
+ case 0:
382
+ return _47();
383
+ case 1:
384
+ return _47(arguments[0]);
385
+ case 2:
386
+ return _47(arguments[0],arguments[1]);
387
+ case 3:
388
+ return _47(arguments[0],arguments[1],arguments[2]);
389
+ }
390
+ var _48=[];
391
+ for(var i=0;i<arguments.length;i++){
392
+ _48.push("arguments["+i+"]");
393
+ }
394
+ return eval("(func("+_48.join(",")+"))");
395
+ };
396
+ },method:function(_49,_50){
397
+ var m=MochiKit.Base;
398
+ return m.bind.apply(this,m.extend([_50,_49],arguments,2));
399
+ },bind:function(_51,_52){
400
+ if(typeof (_51)=="string"){
401
+ _51=_52[_51];
402
+ }
403
+ var _53=_51.im_func;
404
+ var _54=_51.im_preargs;
405
+ var _55=_51.im_self;
406
+ var m=MochiKit.Base;
407
+ if(typeof (_51)=="function"&&typeof (_51.apply)=="undefined"){
408
+ _51=m._wrapDumbFunction(_51);
409
+ }
410
+ if(typeof (_53)!="function"){
411
+ _53=_51;
412
+ }
413
+ if(typeof (_52)!="undefined"){
414
+ _55=_52;
415
+ }
416
+ if(typeof (_54)=="undefined"){
417
+ _54=[];
418
+ }else{
419
+ _54=_54.slice();
420
+ }
421
+ m.extend(_54,arguments,2);
422
+ var _56=function(){
423
+ var _57=arguments;
424
+ var me=arguments.callee;
425
+ if(me.im_preargs.length>0){
426
+ _57=m.concat(me.im_preargs,_57);
427
+ }
428
+ var _52=me.im_self;
429
+ if(!_52){
430
+ _52=this;
431
+ }
432
+ return me.im_func.apply(_52,_57);
433
+ };
434
+ _56.im_self=_55;
435
+ _56.im_func=_53;
436
+ _56.im_preargs=_54;
437
+ return _56;
438
+ },bindMethods:function(_58){
439
+ var _59=MochiKit.Base.bind;
440
+ for(var k in _58){
441
+ var _60=_58[k];
442
+ if(typeof (_60)=="function"){
443
+ _58[k]=_59(_60,_58);
444
+ }
445
+ }
446
+ },registerComparator:function(_61,_62,_63,_64){
447
+ MochiKit.Base.comparatorRegistry.register(_61,_62,_63,_64);
448
+ },_primitives:{"bool":true,"string":true,"number":true},compare:function(a,b){
449
+ if(a==b){
450
+ return 0;
451
+ }
452
+ var _65=(typeof (a)=="undefined"||a===null);
453
+ var _66=(typeof (b)=="undefined"||b===null);
454
+ if(_65&&_66){
455
+ return 0;
456
+ }else{
457
+ if(_65){
458
+ return -1;
459
+ }else{
460
+ if(_66){
461
+ return 1;
462
+ }
463
+ }
464
+ }
465
+ var m=MochiKit.Base;
466
+ var _67=m._primitives;
467
+ if(!(typeof (a) in _67&&typeof (b) in _67)){
468
+ try{
469
+ return m.comparatorRegistry.match(a,b);
470
+ }
471
+ catch(e){
472
+ if(e!=m.NotFound){
473
+ throw e;
474
+ }
475
+ }
476
+ }
477
+ if(a<b){
478
+ return -1;
479
+ }else{
480
+ if(a>b){
481
+ return 1;
482
+ }
483
+ }
484
+ var _68=m.repr;
485
+ throw new TypeError(_68(a)+" and "+_68(b)+" can not be compared");
486
+ },compareDateLike:function(a,b){
487
+ return MochiKit.Base.compare(a.getTime(),b.getTime());
488
+ },compareArrayLike:function(a,b){
489
+ var _69=MochiKit.Base.compare;
490
+ var _70=a.length;
491
+ var _71=0;
492
+ if(_70>b.length){
493
+ _71=1;
494
+ _70=b.length;
495
+ }else{
496
+ if(_70<b.length){
497
+ _71=-1;
498
+ }
499
+ }
500
+ for(var i=0;i<_70;i++){
501
+ var cmp=_69(a[i],b[i]);
502
+ if(cmp){
503
+ return cmp;
504
+ }
505
+ }
506
+ return _71;
507
+ },registerRepr:function(_73,_74,_75,_76){
508
+ MochiKit.Base.reprRegistry.register(_73,_74,_75,_76);
509
+ },repr:function(o){
510
+ if(typeof (o)=="undefined"){
511
+ return "undefined";
512
+ }else{
513
+ if(o===null){
514
+ return "null";
515
+ }
516
+ }
517
+ try{
518
+ if(typeof (o.__repr__)=="function"){
519
+ return o.__repr__();
520
+ }else{
521
+ if(typeof (o.repr)=="function"&&o.repr!=arguments.callee){
522
+ return o.repr();
523
+ }
524
+ }
525
+ return MochiKit.Base.reprRegistry.match(o);
526
+ }
527
+ catch(e){
528
+ if(typeof (o.NAME)=="string"&&(o.toString==Function.prototype.toString||o.toString==Object.prototype.toString)){
529
+ return o.NAME;
530
+ }
531
+ }
532
+ try{
533
+ var _77=(o+"");
534
+ }
535
+ catch(e){
536
+ return "["+typeof (o)+"]";
537
+ }
538
+ if(typeof (o)=="function"){
539
+ o=_77.replace(/^\s+/,"");
540
+ var idx=o.indexOf("{");
541
+ if(idx!=-1){
542
+ o=o.substr(0,idx)+"{...}";
543
+ }
544
+ }
545
+ return _77;
546
+ },reprArrayLike:function(o){
547
+ var m=MochiKit.Base;
548
+ return "["+m.map(m.repr,o).join(", ")+"]";
549
+ },reprString:function(o){
550
+ return ("\""+o.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");
551
+ },reprNumber:function(o){
552
+ return o+"";
553
+ },registerJSON:function(_79,_80,_81,_82){
554
+ MochiKit.Base.jsonRegistry.register(_79,_80,_81,_82);
555
+ },evalJSON:function(){
556
+ return eval("("+arguments[0]+")");
557
+ },serializeJSON:function(o){
558
+ var _83=typeof (o);
559
+ if(_83=="undefined"){
560
+ return "undefined";
561
+ }else{
562
+ if(_83=="number"||_83=="boolean"){
563
+ return o+"";
564
+ }else{
565
+ if(o===null){
566
+ return "null";
567
+ }
568
+ }
569
+ }
570
+ var m=MochiKit.Base;
571
+ var _84=m.reprString;
572
+ if(_83=="string"){
573
+ return _84(o);
574
+ }
575
+ var me=arguments.callee;
576
+ var _85;
577
+ if(typeof (o.__json__)=="function"){
578
+ _85=o.__json__();
579
+ if(o!==_85){
580
+ return me(_85);
581
+ }
582
+ }
583
+ if(typeof (o.json)=="function"){
584
+ _85=o.json();
585
+ if(o!==_85){
586
+ return me(_85);
587
+ }
588
+ }
589
+ if(_83!="function"&&typeof (o.length)=="number"){
590
+ var res=[];
591
+ for(var i=0;i<o.length;i++){
592
+ var val=me(o[i]);
593
+ if(typeof (val)!="string"){
594
+ val="undefined";
595
+ }
596
+ res.push(val);
597
+ }
598
+ return "["+res.join(", ")+"]";
599
+ }
600
+ try{
601
+ _85=m.jsonRegistry.match(o);
602
+ return me(_85);
603
+ }
604
+ catch(e){
605
+ if(e!=m.NotFound){
606
+ throw e;
607
+ }
608
+ }
609
+ if(_83=="function"){
610
+ return null;
611
+ }
612
+ res=[];
613
+ for(var k in o){
614
+ var _87;
615
+ if(typeof (k)=="number"){
616
+ _87="\""+k+"\"";
617
+ }else{
618
+ if(typeof (k)=="string"){
619
+ _87=_84(k);
620
+ }else{
621
+ continue;
622
+ }
623
+ }
624
+ val=me(o[k]);
625
+ if(typeof (val)!="string"){
626
+ continue;
627
+ }
628
+ res.push(_87+":"+val);
629
+ }
630
+ return "{"+res.join(", ")+"}";
631
+ },objEqual:function(a,b){
632
+ return (MochiKit.Base.compare(a,b)===0);
633
+ },arrayEqual:function(_88,arr){
634
+ if(_88.length!=arr.length){
635
+ return false;
636
+ }
637
+ return (MochiKit.Base.compare(_88,arr)===0);
638
+ },concat:function(){
639
+ var _90=[];
640
+ var _91=MochiKit.Base.extend;
641
+ for(var i=0;i<arguments.length;i++){
642
+ _91(_90,arguments[i]);
643
+ }
644
+ return _90;
645
+ },keyComparator:function(key){
646
+ var m=MochiKit.Base;
647
+ var _93=m.compare;
648
+ if(arguments.length==1){
649
+ return function(a,b){
650
+ return _93(a[key],b[key]);
651
+ };
652
+ }
653
+ var _94=m.extend(null,arguments);
654
+ return function(a,b){
655
+ var _95=0;
656
+ for(var i=0;(_95===0)&&(i<_94.length);i++){
657
+ var key=_94[i];
658
+ _95=_93(a[key],b[key]);
659
+ }
660
+ return _95;
661
+ };
662
+ },reverseKeyComparator:function(key){
663
+ var _96=MochiKit.Base.keyComparator.apply(this,arguments);
664
+ return function(a,b){
665
+ return _96(b,a);
666
+ };
667
+ },partial:function(_97){
668
+ var m=MochiKit.Base;
669
+ return m.bind.apply(this,m.extend([_97,undefined],arguments,1));
670
+ },listMinMax:function(_98,lst){
671
+ if(lst.length===0){
672
+ return null;
673
+ }
674
+ var cur=lst[0];
675
+ var _100=MochiKit.Base.compare;
676
+ for(var i=1;i<lst.length;i++){
677
+ var o=lst[i];
678
+ if(_100(o,cur)==_98){
679
+ cur=o;
680
+ }
681
+ }
682
+ return cur;
683
+ },objMax:function(){
684
+ return MochiKit.Base.listMinMax(1,arguments);
685
+ },objMin:function(){
686
+ return MochiKit.Base.listMinMax(-1,arguments);
687
+ },findIdentical:function(lst,_101,_102,end){
688
+ if(typeof (end)=="undefined"||end===null){
689
+ end=lst.length;
690
+ }
691
+ for(var i=(_102||0);i<end;i++){
692
+ if(lst[i]===_101){
693
+ return i;
694
+ }
695
+ }
696
+ return -1;
697
+ },findValue:function(lst,_104,_105,end){
698
+ if(typeof (end)=="undefined"||end===null){
699
+ end=lst.length;
700
+ }
701
+ var cmp=MochiKit.Base.compare;
702
+ for(var i=(_105||0);i<end;i++){
703
+ if(cmp(lst[i],_104)===0){
704
+ return i;
705
+ }
706
+ }
707
+ return -1;
708
+ },nodeWalk:function(node,_107){
709
+ var _108=[node];
710
+ var _109=MochiKit.Base.extend;
711
+ while(_108.length){
712
+ var res=_107(_108.shift());
713
+ if(res){
714
+ _109(_108,res);
715
+ }
716
+ }
717
+ },nameFunctions:function(_110){
718
+ var base=_110.NAME;
719
+ if(typeof (base)=="undefined"){
720
+ base="";
721
+ }else{
722
+ base=base+".";
723
+ }
724
+ for(var name in _110){
725
+ var o=_110[name];
726
+ if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){
727
+ try{
728
+ o.NAME=base+name;
729
+ }
730
+ catch(e){
731
+ }
732
+ }
733
+ }
734
+ },queryString:function(_113,_114){
735
+ if(typeof (MochiKit.DOM)!="undefined"&&arguments.length==1&&(typeof (_113)=="string"||(typeof (_113.nodeType)!="undefined"&&_113.nodeType>0))){
736
+ var kv=MochiKit.DOM.formContents(_113);
737
+ _113=kv[0];
738
+ _114=kv[1];
739
+ }else{
740
+ if(arguments.length==1){
741
+ var o=_113;
742
+ _113=[];
743
+ _114=[];
744
+ for(var k in o){
745
+ var v=o[k];
746
+ if(typeof (v)!="function"){
747
+ _113.push(k);
748
+ _114.push(v);
749
+ }
750
+ }
751
+ }
752
+ }
753
+ var rval=[];
754
+ var len=Math.min(_113.length,_114.length);
755
+ var _118=MochiKit.Base.urlEncode;
756
+ for(var i=0;i<len;i++){
757
+ v=_114[i];
758
+ if(typeof (v)!="undefined"&&v!==null){
759
+ rval.push(_118(_113[i])+"="+_118(v));
760
+ }
761
+ }
762
+ return rval.join("&");
763
+ },parseQueryString:function(_119,_120){
764
+ var _121=_119.replace(/\+/g,"%20").split("&");
765
+ var o={};
766
+ var _122;
767
+ if(typeof (decodeURIComponent)!="undefined"){
768
+ _122=decodeURIComponent;
769
+ }else{
770
+ _122=unescape;
771
+ }
772
+ if(_120){
773
+ for(var i=0;i<_121.length;i++){
774
+ var pair=_121[i].split("=");
775
+ var name=_122(pair[0]);
776
+ var arr=o[name];
777
+ if(!(arr instanceof Array)){
778
+ arr=[];
779
+ o[name]=arr;
780
+ }
781
+ arr.push(_122(pair[1]));
782
+ }
783
+ }else{
784
+ for(i=0;i<_121.length;i++){
785
+ pair=_121[i].split("=");
786
+ o[_122(pair[0])]=_122(pair[1]);
787
+ }
788
+ }
789
+ return o;
790
+ }});
791
+ MochiKit.Base.AdapterRegistry=function(){
792
+ this.pairs=[];
793
+ };
794
+ MochiKit.Base.AdapterRegistry.prototype={register:function(name,_124,wrap,_126){
795
+ if(_126){
796
+ this.pairs.unshift([name,_124,wrap]);
797
+ }else{
798
+ this.pairs.push([name,_124,wrap]);
799
+ }
800
+ },match:function(){
801
+ for(var i=0;i<this.pairs.length;i++){
802
+ var pair=this.pairs[i];
803
+ if(pair[1].apply(this,arguments)){
804
+ return pair[2].apply(this,arguments);
805
+ }
806
+ }
807
+ throw MochiKit.Base.NotFound;
808
+ },unregister:function(name){
809
+ for(var i=0;i<this.pairs.length;i++){
810
+ var pair=this.pairs[i];
811
+ if(pair[0]==name){
812
+ this.pairs.splice(i,1);
813
+ return true;
814
+ }
815
+ }
816
+ return false;
817
+ }};
818
+ MochiKit.Base.EXPORT=["counter","clone","extend","update","updatetree","setdefault","keys","items","NamedError","operator","forwardCall","itemgetter","typeMatcher","isCallable","isUndefined","isUndefinedOrNull","isNull","isEmpty","isNotEmpty","isArrayLike","isDateLike","xmap","map","xfilter","filter","bind","bindMethods","NotFound","AdapterRegistry","registerComparator","compare","registerRepr","repr","objEqual","arrayEqual","concat","keyComparator","reverseKeyComparator","partial","merge","listMinMax","listMax","listMin","objMax","objMin","nodeWalk","zip","urlEncode","queryString","serializeJSON","registerJSON","evalJSON","parseQueryString","findValue","findIdentical","flattenArguments","method"];
819
+ MochiKit.Base.EXPORT_OK=["nameFunctions","comparatorRegistry","reprRegistry","jsonRegistry","compareDateLike","compareArrayLike","reprArrayLike","reprString","reprNumber"];
820
+ MochiKit.Base._exportSymbols=function(_127,_128){
821
+ if(typeof (MochiKit.__export__)=="undefined"){
822
+ MochiKit.__export__=(MochiKit.__compat__||(typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined"));
823
+ }
824
+ if(!MochiKit.__export__){
825
+ return;
826
+ }
827
+ var all=_128.EXPORT_TAGS[":all"];
828
+ for(var i=0;i<all.length;i++){
829
+ _127[all[i]]=_128[all[i]];
830
+ }
831
+ };
832
+ MochiKit.Base.__new__=function(){
833
+ var m=this;
834
+ m.forward=m.forwardCall;
835
+ m.find=m.findValue;
836
+ if(typeof (encodeURIComponent)!="undefined"){
837
+ m.urlEncode=function(_130){
838
+ return encodeURIComponent(_130).replace(/\'/g,"%27");
839
+ };
840
+ }else{
841
+ m.urlEncode=function(_131){
842
+ return escape(_131).replace(/\+/g,"%2B").replace(/\"/g,"%22").rval.replace(/\'/g,"%27");
843
+ };
844
+ }
845
+ m.NamedError=function(name){
846
+ this.message=name;
847
+ this.name=name;
848
+ };
849
+ m.NamedError.prototype=new Error();
850
+ m.update(m.NamedError.prototype,{repr:function(){
851
+ if(this.message&&this.message!=this.name){
852
+ return this.name+"("+m.repr(this.message)+")";
853
+ }else{
854
+ return this.name+"()";
855
+ }
856
+ },toString:m.forwardCall("repr")});
857
+ m.NotFound=new m.NamedError("MochiKit.Base.NotFound");
858
+ m.listMax=m.partial(m.listMinMax,1);
859
+ m.listMin=m.partial(m.listMinMax,-1);
860
+ m.isCallable=m.typeMatcher("function");
861
+ m.isUndefined=m.typeMatcher("undefined");
862
+ m.merge=m.partial(m.update,null);
863
+ m.zip=m.partial(m.map,null);
864
+ m.comparatorRegistry=new m.AdapterRegistry();
865
+ m.registerComparator("dateLike",m.isDateLike,m.compareDateLike);
866
+ m.registerComparator("arrayLike",m.isArrayLike,m.compareArrayLike);
867
+ m.reprRegistry=new m.AdapterRegistry();
868
+ m.registerRepr("arrayLike",m.isArrayLike,m.reprArrayLike);
869
+ m.registerRepr("string",m.typeMatcher("string"),m.reprString);
870
+ m.registerRepr("numbers",m.typeMatcher("number","boolean"),m.reprNumber);
871
+ m.jsonRegistry=new m.AdapterRegistry();
872
+ var all=m.concat(m.EXPORT,m.EXPORT_OK);
873
+ m.EXPORT_TAGS={":common":m.concat(m.EXPORT_OK),":all":all};
874
+ m.nameFunctions(this);
875
+ };
876
+ MochiKit.Base.__new__();
877
+ if(!MochiKit.__compat__){
878
+ compare=MochiKit.Base.compare;
879
+ }
880
+ MochiKit.Base._exportSymbols(this,MochiKit.Base);
881
+ if(typeof (dojo)!="undefined"){
882
+ dojo.provide("MochiKit.Iter");
883
+ dojo.require("MochiKit.Base");
884
+ }
885
+ if(typeof (JSAN)!="undefined"){
886
+ JSAN.use("MochiKit.Base",[]);
887
+ }
888
+ try{
889
+ if(typeof (MochiKit.Base)=="undefined"){
890
+ throw "";
891
+ }
892
+ }
893
+ catch(e){
894
+ throw "MochiKit.Iter depends on MochiKit.Base!";
895
+ }
896
+ if(typeof (MochiKit.Iter)=="undefined"){
897
+ MochiKit.Iter={};
898
+ }
899
+ MochiKit.Iter.NAME="MochiKit.Iter";
900
+ MochiKit.Iter.VERSION="1.3";
901
+ MochiKit.Base.update(MochiKit.Iter,{__repr__:function(){
902
+ return "["+this.NAME+" "+this.VERSION+"]";
903
+ },toString:function(){
904
+ return this.__repr__();
905
+ },registerIteratorFactory:function(name,_132,_133,_134){
906
+ MochiKit.Iter.iteratorRegistry.register(name,_132,_133,_134);
907
+ },iter:function(_135,_136){
908
+ var self=MochiKit.Iter;
909
+ if(arguments.length==2){
910
+ return self.takewhile(function(a){
911
+ return a!=_136;
912
+ },_135);
913
+ }
914
+ if(typeof (_135.next)=="function"){
915
+ return _135;
916
+ }else{
917
+ if(typeof (_135.iter)=="function"){
918
+ return _135.iter();
919
+ }
920
+ }
921
+ try{
922
+ return self.iteratorRegistry.match(_135);
923
+ }
924
+ catch(e){
925
+ var m=MochiKit.Base;
926
+ if(e==m.NotFound){
927
+ e=new TypeError(typeof (_135)+": "+m.repr(_135)+" is not iterable");
928
+ }
929
+ throw e;
930
+ }
931
+ },count:function(n){
932
+ if(!n){
933
+ n=0;
934
+ }
935
+ var m=MochiKit.Base;
936
+ return {repr:function(){
937
+ return "count("+n+")";
938
+ },toString:m.forwardCall("repr"),next:m.counter(n)};
939
+ },cycle:function(p){
940
+ var self=MochiKit.Iter;
941
+ var m=MochiKit.Base;
942
+ var lst=[];
943
+ var _139=self.iter(p);
944
+ return {repr:function(){
945
+ return "cycle(...)";
946
+ },toString:m.forwardCall("repr"),next:function(){
947
+ try{
948
+ var rval=_139.next();
949
+ lst.push(rval);
950
+ return rval;
951
+ }
952
+ catch(e){
953
+ if(e!=self.StopIteration){
954
+ throw e;
955
+ }
956
+ if(lst.length===0){
957
+ this.next=function(){
958
+ throw self.StopIteration;
959
+ };
960
+ }else{
961
+ var i=-1;
962
+ this.next=function(){
963
+ i=(i+1)%lst.length;
964
+ return lst[i];
965
+ };
966
+ }
967
+ return this.next();
968
+ }
969
+ }};
970
+ },repeat:function(elem,n){
971
+ var m=MochiKit.Base;
972
+ if(typeof (n)=="undefined"){
973
+ return {repr:function(){
974
+ return "repeat("+m.repr(elem)+")";
975
+ },toString:m.forwardCall("repr"),next:function(){
976
+ return elem;
977
+ }};
978
+ }
979
+ return {repr:function(){
980
+ return "repeat("+m.repr(elem)+", "+n+")";
981
+ },toString:m.forwardCall("repr"),next:function(){
982
+ if(n<=0){
983
+ throw MochiKit.Iter.StopIteration;
984
+ }
985
+ n-=1;
986
+ return elem;
987
+ }};
988
+ },next:function(_141){
989
+ return _141.next();
990
+ },izip:function(p,q){
991
+ var m=MochiKit.Base;
992
+ var next=MochiKit.Iter.next;
993
+ var _144=m.map(iter,arguments);
994
+ return {repr:function(){
995
+ return "izip(...)";
996
+ },toString:m.forwardCall("repr"),next:function(){
997
+ return m.map(next,_144);
998
+ }};
999
+ },ifilter:function(pred,seq){
1000
+ var m=MochiKit.Base;
1001
+ seq=MochiKit.Iter.iter(seq);
1002
+ if(pred===null){
1003
+ pred=m.operator.truth;
1004
+ }
1005
+ return {repr:function(){
1006
+ return "ifilter(...)";
1007
+ },toString:m.forwardCall("repr"),next:function(){
1008
+ while(true){
1009
+ var rval=seq.next();
1010
+ if(pred(rval)){
1011
+ return rval;
1012
+ }
1013
+ }
1014
+ return undefined;
1015
+ }};
1016
+ },ifilterfalse:function(pred,seq){
1017
+ var m=MochiKit.Base;
1018
+ seq=MochiKit.Iter.iter(seq);
1019
+ if(pred===null){
1020
+ pred=m.operator.truth;
1021
+ }
1022
+ return {repr:function(){
1023
+ return "ifilterfalse(...)";
1024
+ },toString:m.forwardCall("repr"),next:function(){
1025
+ while(true){
1026
+ var rval=seq.next();
1027
+ if(!pred(rval)){
1028
+ return rval;
1029
+ }
1030
+ }
1031
+ return undefined;
1032
+ }};
1033
+ },islice:function(seq){
1034
+ var self=MochiKit.Iter;
1035
+ var m=MochiKit.Base;
1036
+ seq=self.iter(seq);
1037
+ var _147=0;
1038
+ var stop=0;
1039
+ var step=1;
1040
+ var i=-1;
1041
+ if(arguments.length==2){
1042
+ stop=arguments[1];
1043
+ }else{
1044
+ if(arguments.length==3){
1045
+ _147=arguments[1];
1046
+ stop=arguments[2];
1047
+ }else{
1048
+ _147=arguments[1];
1049
+ stop=arguments[2];
1050
+ step=arguments[3];
1051
+ }
1052
+ }
1053
+ return {repr:function(){
1054
+ return "islice("+["...",_147,stop,step].join(", ")+")";
1055
+ },toString:m.forwardCall("repr"),next:function(){
1056
+ var rval;
1057
+ while(i<_147){
1058
+ rval=seq.next();
1059
+ i++;
1060
+ }
1061
+ if(_147>=stop){
1062
+ throw self.StopIteration;
1063
+ }
1064
+ _147+=step;
1065
+ return rval;
1066
+ }};
1067
+ },imap:function(fun,p,q){
1068
+ var m=MochiKit.Base;
1069
+ var self=MochiKit.Iter;
1070
+ var _151=m.map(self.iter,m.extend(null,arguments,1));
1071
+ var map=m.map;
1072
+ var next=self.next;
1073
+ return {repr:function(){
1074
+ return "imap(...)";
1075
+ },toString:m.forwardCall("repr"),next:function(){
1076
+ return fun.apply(this,map(next,_151));
1077
+ }};
1078
+ },applymap:function(fun,seq,self){
1079
+ seq=MochiKit.Iter.iter(seq);
1080
+ var m=MochiKit.Base;
1081
+ return {repr:function(){
1082
+ return "applymap(...)";
1083
+ },toString:m.forwardCall("repr"),next:function(){
1084
+ return fun.apply(self,seq.next());
1085
+ }};
1086
+ },chain:function(p,q){
1087
+ var self=MochiKit.Iter;
1088
+ var m=MochiKit.Base;
1089
+ if(arguments.length==1){
1090
+ return self.iter(arguments[0]);
1091
+ }
1092
+ var _153=m.map(self.iter,arguments);
1093
+ return {repr:function(){
1094
+ return "chain(...)";
1095
+ },toString:m.forwardCall("repr"),next:function(){
1096
+ while(_153.length>1){
1097
+ try{
1098
+ return _153[0].next();
1099
+ }
1100
+ catch(e){
1101
+ if(e!=self.StopIteration){
1102
+ throw e;
1103
+ }
1104
+ _153.shift();
1105
+ }
1106
+ }
1107
+ if(_153.length==1){
1108
+ var arg=_153.shift();
1109
+ this.next=m.bind("next",arg);
1110
+ return this.next();
1111
+ }
1112
+ throw self.StopIteration;
1113
+ }};
1114
+ },takewhile:function(pred,seq){
1115
+ var self=MochiKit.Iter;
1116
+ seq=self.iter(seq);
1117
+ return {repr:function(){
1118
+ return "takewhile(...)";
1119
+ },toString:MochiKit.Base.forwardCall("repr"),next:function(){
1120
+ var rval=seq.next();
1121
+ if(!pred(rval)){
1122
+ this.next=function(){
1123
+ throw self.StopIteration;
1124
+ };
1125
+ this.next();
1126
+ }
1127
+ return rval;
1128
+ }};
1129
+ },dropwhile:function(pred,seq){
1130
+ seq=MochiKit.Iter.iter(seq);
1131
+ var m=MochiKit.Base;
1132
+ var bind=m.bind;
1133
+ return {"repr":function(){
1134
+ return "dropwhile(...)";
1135
+ },"toString":m.forwardCall("repr"),"next":function(){
1136
+ while(true){
1137
+ var rval=seq.next();
1138
+ if(!pred(rval)){
1139
+ break;
1140
+ }
1141
+ }
1142
+ this.next=bind("next",seq);
1143
+ return rval;
1144
+ }};
1145
+ },_tee:function(_155,sync,_157){
1146
+ sync.pos[_155]=-1;
1147
+ var m=MochiKit.Base;
1148
+ var _158=m.listMin;
1149
+ return {repr:function(){
1150
+ return "tee("+_155+", ...)";
1151
+ },toString:m.forwardCall("repr"),next:function(){
1152
+ var rval;
1153
+ var i=sync.pos[_155];
1154
+ if(i==sync.max){
1155
+ rval=_157.next();
1156
+ sync.deque.push(rval);
1157
+ sync.max+=1;
1158
+ sync.pos[_155]+=1;
1159
+ }else{
1160
+ rval=sync.deque[i-sync.min];
1161
+ sync.pos[_155]+=1;
1162
+ if(i==sync.min&&_158(sync.pos)!=sync.min){
1163
+ sync.min+=1;
1164
+ sync.deque.shift();
1165
+ }
1166
+ }
1167
+ return rval;
1168
+ }};
1169
+ },tee:function(_159,n){
1170
+ var rval=[];
1171
+ var sync={"pos":[],"deque":[],"max":-1,"min":-1};
1172
+ if(arguments.length==1){
1173
+ n=2;
1174
+ }
1175
+ var self=MochiKit.Iter;
1176
+ _159=self.iter(_159);
1177
+ var _tee=self._tee;
1178
+ for(var i=0;i<n;i++){
1179
+ rval.push(_tee(i,sync,_159));
1180
+ }
1181
+ return rval;
1182
+ },list:function(_161){
1183
+ var m=MochiKit.Base;
1184
+ if(typeof (_161.slice)=="function"){
1185
+ return _161.slice();
1186
+ }else{
1187
+ if(m.isArrayLike(_161)){
1188
+ return m.concat(_161);
1189
+ }
1190
+ }
1191
+ var self=MochiKit.Iter;
1192
+ _161=self.iter(_161);
1193
+ var rval=[];
1194
+ try{
1195
+ while(true){
1196
+ rval.push(_161.next());
1197
+ }
1198
+ }
1199
+ catch(e){
1200
+ if(e!=self.StopIteration){
1201
+ throw e;
1202
+ }
1203
+ return rval;
1204
+ }
1205
+ return undefined;
1206
+ },reduce:function(fn,_162,_163){
1207
+ var i=0;
1208
+ var x=_163;
1209
+ var self=MochiKit.Iter;
1210
+ _162=self.iter(_162);
1211
+ if(arguments.length<3){
1212
+ try{
1213
+ x=_162.next();
1214
+ }
1215
+ catch(e){
1216
+ if(e==self.StopIteration){
1217
+ e=new TypeError("reduce() of empty sequence with no initial value");
1218
+ }
1219
+ throw e;
1220
+ }
1221
+ i++;
1222
+ }
1223
+ try{
1224
+ while(true){
1225
+ x=fn(x,_162.next());
1226
+ }
1227
+ }
1228
+ catch(e){
1229
+ if(e!=self.StopIteration){
1230
+ throw e;
1231
+ }
1232
+ }
1233
+ return x;
1234
+ },range:function(){
1235
+ var _165=0;
1236
+ var stop=0;
1237
+ var step=1;
1238
+ if(arguments.length==1){
1239
+ stop=arguments[0];
1240
+ }else{
1241
+ if(arguments.length==2){
1242
+ _165=arguments[0];
1243
+ stop=arguments[1];
1244
+ }else{
1245
+ if(arguments.length==3){
1246
+ _165=arguments[0];
1247
+ stop=arguments[1];
1248
+ step=arguments[2];
1249
+ }else{
1250
+ throw new TypeError("range() takes 1, 2, or 3 arguments!");
1251
+ }
1252
+ }
1253
+ }
1254
+ if(step===0){
1255
+ throw new TypeError("range() step must not be 0");
1256
+ }
1257
+ return {next:function(){
1258
+ if((step>0&&_165>=stop)||(step<0&&_165<=stop)){
1259
+ throw MochiKit.Iter.StopIteration;
1260
+ }
1261
+ var rval=_165;
1262
+ _165+=step;
1263
+ return rval;
1264
+ },repr:function(){
1265
+ return "range("+[_165,stop,step].join(", ")+")";
1266
+ },toString:MochiKit.Base.forwardCall("repr")};
1267
+ },sum:function(_166,_167){
1268
+ var x=_167||0;
1269
+ var self=MochiKit.Iter;
1270
+ _166=self.iter(_166);
1271
+ try{
1272
+ while(true){
1273
+ x+=_166.next();
1274
+ }
1275
+ }
1276
+ catch(e){
1277
+ if(e!=self.StopIteration){
1278
+ throw e;
1279
+ }
1280
+ }
1281
+ return x;
1282
+ },exhaust:function(_168){
1283
+ var self=MochiKit.Iter;
1284
+ _168=self.iter(_168);
1285
+ try{
1286
+ while(true){
1287
+ _168.next();
1288
+ }
1289
+ }
1290
+ catch(e){
1291
+ if(e!=self.StopIteration){
1292
+ throw e;
1293
+ }
1294
+ }
1295
+ },forEach:function(_169,func,self){
1296
+ var m=MochiKit.Base;
1297
+ if(arguments.length>2){
1298
+ func=m.bind(func,self);
1299
+ }
1300
+ if(m.isArrayLike(_169)){
1301
+ try{
1302
+ for(var i=0;i<_169.length;i++){
1303
+ func(_169[i]);
1304
+ }
1305
+ }
1306
+ catch(e){
1307
+ if(e!=MochiKit.Iter.StopIteration){
1308
+ throw e;
1309
+ }
1310
+ }
1311
+ }else{
1312
+ self=MochiKit.Iter;
1313
+ self.exhaust(self.imap(func,_169));
1314
+ }
1315
+ },every:function(_171,func){
1316
+ var self=MochiKit.Iter;
1317
+ try{
1318
+ self.ifilterfalse(func,_171).next();
1319
+ return false;
1320
+ }
1321
+ catch(e){
1322
+ if(e!=self.StopIteration){
1323
+ throw e;
1324
+ }
1325
+ return true;
1326
+ }
1327
+ },sorted:function(_172,cmp){
1328
+ var rval=MochiKit.Iter.list(_172);
1329
+ if(arguments.length==1){
1330
+ cmp=MochiKit.Base.compare;
1331
+ }
1332
+ rval.sort(cmp);
1333
+ return rval;
1334
+ },reversed:function(_173){
1335
+ var rval=MochiKit.Iter.list(_173);
1336
+ rval.reverse();
1337
+ return rval;
1338
+ },some:function(_174,func){
1339
+ var self=MochiKit.Iter;
1340
+ try{
1341
+ self.ifilter(func,_174).next();
1342
+ return true;
1343
+ }
1344
+ catch(e){
1345
+ if(e!=self.StopIteration){
1346
+ throw e;
1347
+ }
1348
+ return false;
1349
+ }
1350
+ },iextend:function(lst,_175){
1351
+ if(MochiKit.Base.isArrayLike(_175)){
1352
+ for(var i=0;i<_175.length;i++){
1353
+ lst.push(_175[i]);
1354
+ }
1355
+ }else{
1356
+ var self=MochiKit.Iter;
1357
+ _175=self.iter(_175);
1358
+ try{
1359
+ while(true){
1360
+ lst.push(_175.next());
1361
+ }
1362
+ }
1363
+ catch(e){
1364
+ if(e!=self.StopIteration){
1365
+ throw e;
1366
+ }
1367
+ }
1368
+ }
1369
+ return lst;
1370
+ },groupby:function(_176,_177){
1371
+ var m=MochiKit.Base;
1372
+ var self=MochiKit.Iter;
1373
+ if(arguments.length<2){
1374
+ _177=m.operator.identity;
1375
+ }
1376
+ _176=self.iter(_176);
1377
+ var pk=undefined;
1378
+ var k=undefined;
1379
+ var v;
1380
+ function fetch(){
1381
+ v=_176.next();
1382
+ k=_177(v);
1383
+ }
1384
+ function eat(){
1385
+ var ret=v;
1386
+ v=undefined;
1387
+ return ret;
1388
+ }
1389
+ var _180=true;
1390
+ return {repr:function(){
1391
+ return "groupby(...)";
1392
+ },next:function(){
1393
+ while(k==pk){
1394
+ fetch();
1395
+ if(_180){
1396
+ _180=false;
1397
+ break;
1398
+ }
1399
+ }
1400
+ pk=k;
1401
+ return [k,{next:function(){
1402
+ if(v==undefined){
1403
+ fetch();
1404
+ }
1405
+ if(k!=pk){
1406
+ throw self.StopIteration;
1407
+ }
1408
+ return eat();
1409
+ }}];
1410
+ }};
1411
+ },groupby_as_array:function(_181,_182){
1412
+ var m=MochiKit.Base;
1413
+ var self=MochiKit.Iter;
1414
+ if(arguments.length<2){
1415
+ _182=m.operator.identity;
1416
+ }
1417
+ _181=self.iter(_181);
1418
+ var _183=[];
1419
+ var _184=true;
1420
+ var _185;
1421
+ while(true){
1422
+ try{
1423
+ var _186=_181.next();
1424
+ var key=_182(_186);
1425
+ }
1426
+ catch(e){
1427
+ if(e==self.StopIteration){
1428
+ break;
1429
+ }
1430
+ throw e;
1431
+ }
1432
+ if(_184||key!=_185){
1433
+ var _187=[];
1434
+ _183.push([key,_187]);
1435
+ }
1436
+ _187.push(_186);
1437
+ _184=false;
1438
+ _185=key;
1439
+ }
1440
+ return _183;
1441
+ },arrayLikeIter:function(_188){
1442
+ var i=0;
1443
+ return {repr:function(){
1444
+ return "arrayLikeIter(...)";
1445
+ },toString:MochiKit.Base.forwardCall("repr"),next:function(){
1446
+ if(i>=_188.length){
1447
+ throw MochiKit.Iter.StopIteration;
1448
+ }
1449
+ return _188[i++];
1450
+ }};
1451
+ },hasIterateNext:function(_189){
1452
+ return (_189&&typeof (_189.iterateNext)=="function");
1453
+ },iterateNextIter:function(_190){
1454
+ return {repr:function(){
1455
+ return "iterateNextIter(...)";
1456
+ },toString:MochiKit.Base.forwardCall("repr"),next:function(){
1457
+ var rval=_190.iterateNext();
1458
+ if(rval===null||rval===undefined){
1459
+ throw MochiKit.Iter.StopIteration;
1460
+ }
1461
+ return rval;
1462
+ }};
1463
+ }});
1464
+ MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter","hasIterateNext","iterateNextIter",];
1465
+ MochiKit.Iter.EXPORT=["StopIteration","registerIteratorFactory","iter","count","cycle","repeat","next","izip","ifilter","ifilterfalse","islice","imap","applymap","chain","takewhile","dropwhile","tee","list","reduce","range","sum","exhaust","forEach","every","sorted","reversed","some","iextend","groupby","groupby_as_array"];
1466
+ MochiKit.Iter.__new__=function(){
1467
+ var m=MochiKit.Base;
1468
+ this.StopIteration=new m.NamedError("StopIteration");
1469
+ this.iteratorRegistry=new m.AdapterRegistry();
1470
+ this.registerIteratorFactory("arrayLike",m.isArrayLike,this.arrayLikeIter);
1471
+ this.registerIteratorFactory("iterateNext",this.hasIterateNext,this.iterateNextIter);
1472
+ this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
1473
+ m.nameFunctions(this);
1474
+ };
1475
+ MochiKit.Iter.__new__();
1476
+ if(!MochiKit.__compat__){
1477
+ reduce=MochiKit.Iter.reduce;
1478
+ }
1479
+ MochiKit.Base._exportSymbols(this,MochiKit.Iter);
1480
+ if(typeof (dojo)!="undefined"){
1481
+ dojo.provide("MochiKit.Logging");
1482
+ dojo.require("MochiKit.Base");
1483
+ }
1484
+ if(typeof (JSAN)!="undefined"){
1485
+ JSAN.use("MochiKit.Base",[]);
1486
+ }
1487
+ try{
1488
+ if(typeof (MochiKit.Base)=="undefined"){
1489
+ throw "";
1490
+ }
1491
+ }
1492
+ catch(e){
1493
+ throw "MochiKit.Logging depends on MochiKit.Base!";
1494
+ }
1495
+ if(typeof (MochiKit.Logging)=="undefined"){
1496
+ MochiKit.Logging={};
1497
+ }
1498
+ MochiKit.Logging.NAME="MochiKit.Logging";
1499
+ MochiKit.Logging.VERSION="1.3";
1500
+ MochiKit.Logging.__repr__=function(){
1501
+ return "["+this.NAME+" "+this.VERSION+"]";
1502
+ };
1503
+ MochiKit.Logging.toString=function(){
1504
+ return this.__repr__();
1505
+ };
1506
+ MochiKit.Logging.EXPORT=["LogLevel","LogMessage","Logger","alertListener","logger","log","logError","logDebug","logFatal","logWarning"];
1507
+ MochiKit.Logging.EXPORT_OK=["logLevelAtLeast","isLogMessage","compareLogMessage"];
1508
+ MochiKit.Logging.LogMessage=function(num,_192,info){
1509
+ this.num=num;
1510
+ this.level=_192;
1511
+ this.info=info;
1512
+ this.timestamp=new Date();
1513
+ };
1514
+ MochiKit.Logging.LogMessage.prototype={repr:function(){
1515
+ var m=MochiKit.Base;
1516
+ return "LogMessage("+m.map(m.repr,[this.num,this.level,this.info]).join(", ")+")";
1517
+ },toString:MochiKit.Base.forwardCall("repr")};
1518
+ MochiKit.Base.update(MochiKit.Logging,{logLevelAtLeast:function(_194){
1519
+ var self=MochiKit.Logging;
1520
+ if(typeof (_194)=="string"){
1521
+ _194=self.LogLevel[_194];
1522
+ }
1523
+ return function(msg){
1524
+ var _196=msg.level;
1525
+ if(typeof (_196)=="string"){
1526
+ _196=self.LogLevel[_196];
1527
+ }
1528
+ return _196>=_194;
1529
+ };
1530
+ },isLogMessage:function(){
1531
+ var _197=MochiKit.Logging.LogMessage;
1532
+ for(var i=0;i<arguments.length;i++){
1533
+ if(!(arguments[i] instanceof _197)){
1534
+ return false;
1535
+ }
1536
+ }
1537
+ return true;
1538
+ },compareLogMessage:function(a,b){
1539
+ return MochiKit.Base.compare([a.level,a.info],[b.level,b.info]);
1540
+ },alertListener:function(msg){
1541
+ alert("num: "+msg.num+"\nlevel: "+msg.level+"\ninfo: "+msg.info.join(" "));
1542
+ }});
1543
+ MochiKit.Logging.Logger=function(_198){
1544
+ this.counter=0;
1545
+ if(typeof (_198)=="undefined"||_198===null){
1546
+ _198=-1;
1547
+ }
1548
+ this.maxSize=_198;
1549
+ this._messages=[];
1550
+ this.listeners={};
1551
+ this.useNativeConsole=false;
1552
+ };
1553
+ MochiKit.Logging.Logger.prototype={clear:function(){
1554
+ this._messages.splice(0,this._messages.length);
1555
+ },logToConsole:function(msg){
1556
+ if(typeof (window)!="undefined"&&window.console&&window.console.log){
1557
+ window.console.log(msg);
1558
+ }else{
1559
+ if(typeof (opera)!="undefined"&&opera.postError){
1560
+ opera.postError(msg);
1561
+ }else{
1562
+ if(typeof (printfire)=="function"){
1563
+ printfire(msg);
1564
+ }
1565
+ }
1566
+ }
1567
+ },dispatchListeners:function(msg){
1568
+ for(var k in this.listeners){
1569
+ var pair=this.listeners[k];
1570
+ if(pair.ident!=k||(pair[0]&&!pair[0](msg))){
1571
+ continue;
1572
+ }
1573
+ pair[1](msg);
1574
+ }
1575
+ },addListener:function(_199,_200,_201){
1576
+ if(typeof (_200)=="string"){
1577
+ _200=MochiKit.Logging.logLevelAtLeast(_200);
1578
+ }
1579
+ var _202=[_200,_201];
1580
+ _202.ident=_199;
1581
+ this.listeners[_199]=_202;
1582
+ },removeListener:function(_203){
1583
+ delete this.listeners[_203];
1584
+ },baseLog:function(_204,_205){
1585
+ var msg=new MochiKit.Logging.LogMessage(this.counter,_204,MochiKit.Base.extend(null,arguments,1));
1586
+ this._messages.push(msg);
1587
+ this.dispatchListeners(msg);
1588
+ if(this.useNativeConsole){
1589
+ this.logToConsole(msg.level+": "+msg.info.join(" "));
1590
+ }
1591
+ this.counter+=1;
1592
+ while(this.maxSize>=0&&this._messages.length>this.maxSize){
1593
+ this._messages.shift();
1594
+ }
1595
+ },getMessages:function(_206){
1596
+ var _207=0;
1597
+ if(!(typeof (_206)=="undefined"||_206===null)){
1598
+ _207=Math.max(0,this._messages.length-_206);
1599
+ }
1600
+ return this._messages.slice(_207);
1601
+ },getMessageText:function(_208){
1602
+ if(typeof (_208)=="undefined"||_208===null){
1603
+ _208=30;
1604
+ }
1605
+ var _209=this.getMessages(_208);
1606
+ if(_209.length){
1607
+ var lst=map(function(m){
1608
+ return "\n ["+m.num+"] "+m.level+": "+m.info.join(" ");
1609
+ },_209);
1610
+ lst.unshift("LAST "+_209.length+" MESSAGES:");
1611
+ return lst.join("");
1612
+ }
1613
+ return "";
1614
+ },debuggingBookmarklet:function(_210){
1615
+ if(typeof (MochiKit.LoggingPane)=="undefined"){
1616
+ alert(this.getMessageText());
1617
+ }else{
1618
+ MochiKit.LoggingPane.createLoggingPane(_210||false);
1619
+ }
1620
+ }};
1621
+ MochiKit.Logging.__new__=function(){
1622
+ this.LogLevel={ERROR:40,FATAL:50,WARNING:30,INFO:20,DEBUG:10};
1623
+ var m=MochiKit.Base;
1624
+ m.registerComparator("LogMessage",this.isLogMessage,this.compareLogMessage);
1625
+ var _211=m.partial;
1626
+ var _212=this.Logger;
1627
+ var _213=_212.prototype.baseLog;
1628
+ m.update(this.Logger.prototype,{debug:_211(_213,"DEBUG"),log:_211(_213,"INFO"),error:_211(_213,"ERROR"),fatal:_211(_213,"FATAL"),warning:_211(_213,"WARNING")});
1629
+ var self=this;
1630
+ var _214=function(name){
1631
+ return function(){
1632
+ self.logger[name].apply(self.logger,arguments);
1633
+ };
1634
+ };
1635
+ this.log=_214("log");
1636
+ this.logError=_214("error");
1637
+ this.logDebug=_214("debug");
1638
+ this.logFatal=_214("fatal");
1639
+ this.logWarning=_214("warning");
1640
+ this.logger=new _212();
1641
+ this.logger.useNativeConsole=true;
1642
+ this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
1643
+ m.nameFunctions(this);
1644
+ };
1645
+ if(typeof (printfire)=="undefined"&&typeof (document)!="undefined"&&document.createEvent&&typeof (dispatchEvent)!="undefined"){
1646
+ function printfire(){
1647
+ printfire.args=arguments;
1648
+ var ev=document.createEvent("Events");
1649
+ ev.initEvent("printfire",false,true);
1650
+ dispatchEvent(ev);
1651
+ }
1652
+ }
1653
+ MochiKit.Logging.__new__();
1654
+ MochiKit.Base._exportSymbols(this,MochiKit.Logging);
1655
+ if(typeof (dojo)!="undefined"){
1656
+ dojo.provide("MochiKit.DateTime");
1657
+ }
1658
+ if(typeof (MochiKit)=="undefined"){
1659
+ MochiKit={};
1660
+ }
1661
+ if(typeof (MochiKit.DateTime)=="undefined"){
1662
+ MochiKit.DateTime={};
1663
+ }
1664
+ MochiKit.DateTime.NAME="MochiKit.DateTime";
1665
+ MochiKit.DateTime.VERSION="1.3";
1666
+ MochiKit.DateTime.__repr__=function(){
1667
+ return "["+this.NAME+" "+this.VERSION+"]";
1668
+ };
1669
+ MochiKit.DateTime.toString=function(){
1670
+ return this.__repr__();
1671
+ };
1672
+ MochiKit.DateTime.isoDate=function(str){
1673
+ str=str+"";
1674
+ if(typeof (str)!="string"||str.length===0){
1675
+ return null;
1676
+ }
1677
+ var iso=str.split("-");
1678
+ if(iso.length===0){
1679
+ return null;
1680
+ }
1681
+ return new Date(iso[0],iso[1]-1,iso[2]);
1682
+ };
1683
+ MochiKit.DateTime._isoRegexp=/(\d{4,})(?:-(\d{1,2})(?:-(\d{1,2})(?:[T ](\d{1,2}):(\d{1,2})(?::(\d{1,2})(?:\.(\d+))?)?(?:(Z)|([+-])(\d{1,2})(?::(\d{1,2}))?)?)?)?)?/;
1684
+ MochiKit.DateTime.isoTimestamp=function(str){
1685
+ str=str+"";
1686
+ if(typeof (str)!="string"||str.length===0){
1687
+ return null;
1688
+ }
1689
+ var res=str.match(MochiKit.DateTime._isoRegexp);
1690
+ if(typeof (res)=="undefined"||res===null){
1691
+ return null;
1692
+ }
1693
+ var year,month,day,hour,min,sec,msec;
1694
+ year=parseInt(res[1],10);
1695
+ if(typeof (res[2])=="undefined"||res[2]===""){
1696
+ return new Date(year);
1697
+ }
1698
+ month=parseInt(res[2],10)-1;
1699
+ day=parseInt(res[3],10);
1700
+ if(typeof (res[4])=="undefined"||res[4]===""){
1701
+ return new Date(year,month,day);
1702
+ }
1703
+ hour=parseInt(res[4],10);
1704
+ min=parseInt(res[5],10);
1705
+ sec=(typeof (res[6])!="undefined"&&res[6]!=="")?parseInt(res[6],10):0;
1706
+ if(typeof (res[7])!="undefined"&&res[7]!==""){
1707
+ msec=Math.round(1000*parseFloat("0."+res[7]));
1708
+ }else{
1709
+ msec=0;
1710
+ }
1711
+ if((typeof (res[8])=="undefined"||res[8]==="")&&(typeof (res[9])=="undefined"||res[9]==="")){
1712
+ return new Date(year,month,day,hour,min,sec,msec);
1713
+ }
1714
+ var ofs;
1715
+ if(typeof (res[9])!="undefined"&&res[9]!==""){
1716
+ ofs=parseInt(res[10],10)*3600000;
1717
+ if(typeof (res[11])!="undefined"&&res[11]!==""){
1718
+ ofs+=parseInt(res[11],10)*60000;
1719
+ }
1720
+ if(res[9]=="-"){
1721
+ ofs=-ofs;
1722
+ }
1723
+ }else{
1724
+ ofs=0;
1725
+ }
1726
+ return new Date(Date.UTC(year,month,day,hour,min,sec,msec)-ofs);
1727
+ };
1728
+ MochiKit.DateTime.toISOTime=function(date,_221){
1729
+ if(typeof (date)=="undefined"||date===null){
1730
+ return null;
1731
+ }
1732
+ var hh=date.getHours();
1733
+ var mm=date.getMinutes();
1734
+ var ss=date.getSeconds();
1735
+ var lst=[((_221&&(hh<10))?"0"+hh:hh),((mm<10)?"0"+mm:mm),((ss<10)?"0"+ss:ss)];
1736
+ return lst.join(":");
1737
+ };
1738
+ MochiKit.DateTime.toISOTimestamp=function(date,_225){
1739
+ if(typeof (date)=="undefined"||date===null){
1740
+ return null;
1741
+ }
1742
+ var sep=_225?"T":" ";
1743
+ var foot=_225?"Z":"";
1744
+ if(_225){
1745
+ date=new Date(date.getTime()+(date.getTimezoneOffset()*60000));
1746
+ }
1747
+ return MochiKit.DateTime.toISODate(date)+sep+MochiKit.DateTime.toISOTime(date,_225)+foot;
1748
+ };
1749
+ MochiKit.DateTime.toISODate=function(date){
1750
+ if(typeof (date)=="undefined"||date===null){
1751
+ return null;
1752
+ }
1753
+ var _228=MochiKit.DateTime._padTwo;
1754
+ return [date.getFullYear(),_228(date.getMonth()+1),_228(date.getDate())].join("-");
1755
+ };
1756
+ MochiKit.DateTime.americanDate=function(d){
1757
+ d=d+"";
1758
+ if(typeof (d)!="string"||d.length===0){
1759
+ return null;
1760
+ }
1761
+ var a=d.split("/");
1762
+ return new Date(a[2],a[0]-1,a[1]);
1763
+ };
1764
+ MochiKit.DateTime._padTwo=function(n){
1765
+ return (n>9)?n:"0"+n;
1766
+ };
1767
+ MochiKit.DateTime.toPaddedAmericanDate=function(d){
1768
+ if(typeof (d)=="undefined"||d===null){
1769
+ return null;
1770
+ }
1771
+ var _230=MochiKit.DateTime._padTwo;
1772
+ return [_230(d.getMonth()+1),_230(d.getDate()),d.getFullYear()].join("/");
1773
+ };
1774
+ MochiKit.DateTime.toAmericanDate=function(d){
1775
+ if(typeof (d)=="undefined"||d===null){
1776
+ return null;
1777
+ }
1778
+ return [d.getMonth()+1,d.getDate(),d.getFullYear()].join("/");
1779
+ };
1780
+ MochiKit.DateTime.EXPORT=["isoDate","isoTimestamp","toISOTime","toISOTimestamp","toISODate","americanDate","toPaddedAmericanDate","toAmericanDate"];
1781
+ MochiKit.DateTime.EXPORT_OK=[];
1782
+ MochiKit.DateTime.EXPORT_TAGS={":common":MochiKit.DateTime.EXPORT,":all":MochiKit.DateTime.EXPORT};
1783
+ MochiKit.DateTime.__new__=function(){
1784
+ var base=this.NAME+".";
1785
+ for(var k in this){
1786
+ var o=this[k];
1787
+ if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){
1788
+ try{
1789
+ o.NAME=base+k;
1790
+ }
1791
+ catch(e){
1792
+ }
1793
+ }
1794
+ }
1795
+ };
1796
+ MochiKit.DateTime.__new__();
1797
+ if(typeof (MochiKit.Base)!="undefined"){
1798
+ MochiKit.Base._exportSymbols(this,MochiKit.DateTime);
1799
+ }else{
1800
+ (function(_231,_232){
1801
+ if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){
1802
+ var all=_232.EXPORT_TAGS[":all"];
1803
+ for(var i=0;i<all.length;i++){
1804
+ _231[all[i]]=_232[all[i]];
1805
+ }
1806
+ }
1807
+ })(this,MochiKit.DateTime);
1808
+ }
1809
+ if(typeof (dojo)!="undefined"){
1810
+ dojo.provide("MochiKit.Format");
1811
+ }
1812
+ if(typeof (MochiKit)=="undefined"){
1813
+ MochiKit={};
1814
+ }
1815
+ if(typeof (MochiKit.Format)=="undefined"){
1816
+ MochiKit.Format={};
1817
+ }
1818
+ MochiKit.Format.NAME="MochiKit.Format";
1819
+ MochiKit.Format.VERSION="1.3";
1820
+ MochiKit.Format.__repr__=function(){
1821
+ return "["+this.NAME+" "+this.VERSION+"]";
1822
+ };
1823
+ MochiKit.Format.toString=function(){
1824
+ return this.__repr__();
1825
+ };
1826
+ MochiKit.Format._numberFormatter=function(_233,_234,_235,_236,_237,_238,_239,_240,_241){
1827
+ return function(num){
1828
+ num=parseFloat(num);
1829
+ if(typeof (num)=="undefined"||num===null||isNaN(num)){
1830
+ return _233;
1831
+ }
1832
+ var _242=_234;
1833
+ var _243=_235;
1834
+ if(num<0){
1835
+ num=-num;
1836
+ }else{
1837
+ _242=_242.replace(/-/,"");
1838
+ }
1839
+ var me=arguments.callee;
1840
+ var fmt=MochiKit.Format.formatLocale(_236);
1841
+ if(_237){
1842
+ num=num*100;
1843
+ _243=fmt.percent+_243;
1844
+ }
1845
+ num=MochiKit.Format.roundToFixed(num,_238);
1846
+ var _245=num.split(/\./);
1847
+ var _246=_245[0];
1848
+ var frac=(_245.length==1)?"":_245[1];
1849
+ var res="";
1850
+ while(_246.length<_239){
1851
+ _246="0"+_246;
1852
+ }
1853
+ if(_240){
1854
+ while(_246.length>_240){
1855
+ var i=_246.length-_240;
1856
+ res=fmt.separator+_246.substring(i,_246.length)+res;
1857
+ _246=_246.substring(0,i);
1858
+ }
1859
+ }
1860
+ res=_246+res;
1861
+ if(_238>0){
1862
+ while(frac.length<_241){
1863
+ frac=frac+"0";
1864
+ }
1865
+ res=res+fmt.decimal+frac;
1866
+ }
1867
+ return _242+res+_243;
1868
+ };
1869
+ };
1870
+ MochiKit.Format.numberFormatter=function(_248,_249,_250){
1871
+ if(typeof (_249)=="undefined"){
1872
+ _249="";
1873
+ }
1874
+ var _251=_248.match(/((?:[0#]+,)?[0#]+)(?:\.([0#]+))?(%)?/);
1875
+ if(!_251){
1876
+ throw TypeError("Invalid pattern");
1877
+ }
1878
+ var _252=_248.substr(0,_251.index);
1879
+ var _253=_248.substr(_251.index+_251[0].length);
1880
+ if(_252.search(/-/)==-1){
1881
+ _252=_252+"-";
1882
+ }
1883
+ var _254=_251[1];
1884
+ var frac=(typeof (_251[2])=="string"&&_251[2]!="")?_251[2]:"";
1885
+ var _255=(typeof (_251[3])=="string"&&_251[3]!="");
1886
+ var tmp=_254.split(/,/);
1887
+ var _257;
1888
+ if(typeof (_250)=="undefined"){
1889
+ _250="default";
1890
+ }
1891
+ if(tmp.length==1){
1892
+ _257=null;
1893
+ }else{
1894
+ _257=tmp[1].length;
1895
+ }
1896
+ var _258=_254.length-_254.replace(/0/g,"").length;
1897
+ var _259=frac.length-frac.replace(/0/g,"").length;
1898
+ var _260=frac.length;
1899
+ var rval=MochiKit.Format._numberFormatter(_249,_252,_253,_250,_255,_260,_258,_257,_259);
1900
+ var m=MochiKit.Base;
1901
+ if(m){
1902
+ var fn=arguments.callee;
1903
+ var args=m.concat(arguments);
1904
+ rval.repr=function(){
1905
+ return [self.NAME,"(",map(m.repr,args).join(", "),")"].join("");
1906
+ };
1907
+ }
1908
+ return rval;
1909
+ };
1910
+ MochiKit.Format.formatLocale=function(_262){
1911
+ if(typeof (_262)=="undefined"||_262===null){
1912
+ _262="default";
1913
+ }
1914
+ if(typeof (_262)=="string"){
1915
+ var rval=MochiKit.Format.LOCALE[_262];
1916
+ if(typeof (rval)=="string"){
1917
+ rval=arguments.callee(rval);
1918
+ MochiKit.Format.LOCALE[_262]=rval;
1919
+ }
1920
+ return rval;
1921
+ }else{
1922
+ return _262;
1923
+ }
1924
+ };
1925
+ MochiKit.Format.twoDigitAverage=function(_263,_264){
1926
+ if(_264){
1927
+ var res=_263/_264;
1928
+ if(!isNaN(res)){
1929
+ return MochiKit.Format.twoDigitFloat(_263/_264);
1930
+ }
1931
+ }
1932
+ return "0";
1933
+ };
1934
+ MochiKit.Format.twoDigitFloat=function(_265){
1935
+ var sign=(_265<0?"-":"");
1936
+ var s=Math.floor(Math.abs(_265)*100).toString();
1937
+ if(s=="0"){
1938
+ return s;
1939
+ }
1940
+ if(s.length<3){
1941
+ while(s.charAt(s.length-1)=="0"){
1942
+ s=s.substring(0,s.length-1);
1943
+ }
1944
+ return sign+"0."+s;
1945
+ }
1946
+ var head=sign+s.substring(0,s.length-2);
1947
+ var tail=s.substring(s.length-2,s.length);
1948
+ if(tail=="00"){
1949
+ return head;
1950
+ }else{
1951
+ if(tail.charAt(1)=="0"){
1952
+ return head+"."+tail.charAt(0);
1953
+ }else{
1954
+ return head+"."+tail;
1955
+ }
1956
+ }
1957
+ };
1958
+ MochiKit.Format.lstrip=function(str,_270){
1959
+ str=str+"";
1960
+ if(typeof (str)!="string"){
1961
+ return null;
1962
+ }
1963
+ if(!_270){
1964
+ return str.replace(/^\s+/,"");
1965
+ }else{
1966
+ return str.replace(new RegExp("^["+_270+"]+"),"");
1967
+ }
1968
+ };
1969
+ MochiKit.Format.rstrip=function(str,_271){
1970
+ str=str+"";
1971
+ if(typeof (str)!="string"){
1972
+ return null;
1973
+ }
1974
+ if(!_271){
1975
+ return str.replace(/\s+$/,"");
1976
+ }else{
1977
+ return str.replace(new RegExp("["+_271+"]+$"),"");
1978
+ }
1979
+ };
1980
+ MochiKit.Format.strip=function(str,_272){
1981
+ var self=MochiKit.Format;
1982
+ return self.rstrip(self.lstrip(str,_272),_272);
1983
+ };
1984
+ MochiKit.Format.truncToFixed=function(_273,_274){
1985
+ _273=Math.floor(_273*Math.pow(10,_274));
1986
+ var res=(_273*Math.pow(10,-_274)).toFixed(_274);
1987
+ if(res.charAt(0)=="."){
1988
+ res="0"+res;
1989
+ }
1990
+ return res;
1991
+ };
1992
+ MochiKit.Format.roundToFixed=function(_275,_276){
1993
+ return MochiKit.Format.truncToFixed(_275+0.5*Math.pow(10,-_276),_276);
1994
+ };
1995
+ MochiKit.Format.percentFormat=function(_277){
1996
+ return MochiKit.Format.twoDigitFloat(100*_277)+"%";
1997
+ };
1998
+ MochiKit.Format.EXPORT=["truncToFixed","roundToFixed","numberFormatter","formatLocale","twoDigitAverage","twoDigitFloat","percentFormat","lstrip","rstrip","strip"];
1999
+ MochiKit.Format.LOCALE={en_US:{separator:",",decimal:".",percent:"%"},de_DE:{separator:".",decimal:",",percent:"%"},fr_FR:{separator:" ",decimal:",",percent:"%"},"default":"en_US"};
2000
+ MochiKit.Format.EXPORT_OK=[];
2001
+ MochiKit.Format.EXPORT_TAGS={":all":MochiKit.Format.EXPORT,":common":MochiKit.Format.EXPORT};
2002
+ MochiKit.Format.__new__=function(){
2003
+ var base=this.NAME+".";
2004
+ var k,v,o;
2005
+ for(k in this.LOCALE){
2006
+ o=this.LOCALE[k];
2007
+ if(typeof (o)=="object"){
2008
+ o.repr=function(){
2009
+ return this.NAME;
2010
+ };
2011
+ o.NAME=base+"LOCALE."+k;
2012
+ }
2013
+ }
2014
+ for(k in this){
2015
+ o=this[k];
2016
+ if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){
2017
+ try{
2018
+ o.NAME=base+k;
2019
+ }
2020
+ catch(e){
2021
+ }
2022
+ }
2023
+ }
2024
+ };
2025
+ MochiKit.Format.__new__();
2026
+ if(typeof (MochiKit.Base)!="undefined"){
2027
+ MochiKit.Base._exportSymbols(this,MochiKit.Format);
2028
+ }else{
2029
+ (function(_278,_279){
2030
+ if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){
2031
+ var all=_279.EXPORT_TAGS[":all"];
2032
+ for(var i=0;i<all.length;i++){
2033
+ _278[all[i]]=_279[all[i]];
2034
+ }
2035
+ }
2036
+ })(this,MochiKit.Format);
2037
+ }
2038
+ if(typeof (dojo)!="undefined"){
2039
+ dojo.provide("MochiKit.Async");
2040
+ dojo.require("MochiKit.Base");
2041
+ }
2042
+ if(typeof (JSAN)!="undefined"){
2043
+ JSAN.use("MochiKit.Base",[]);
2044
+ }
2045
+ try{
2046
+ if(typeof (MochiKit.Base)=="undefined"){
2047
+ throw "";
2048
+ }
2049
+ }
2050
+ catch(e){
2051
+ throw "MochiKit.Async depends on MochiKit.Base!";
2052
+ }
2053
+ if(typeof (MochiKit.Async)=="undefined"){
2054
+ MochiKit.Async={};
2055
+ }
2056
+ MochiKit.Async.NAME="MochiKit.Async";
2057
+ MochiKit.Async.VERSION="1.3";
2058
+ MochiKit.Async.__repr__=function(){
2059
+ return "["+this.NAME+" "+this.VERSION+"]";
2060
+ };
2061
+ MochiKit.Async.toString=function(){
2062
+ return this.__repr__();
2063
+ };
2064
+ MochiKit.Async.Deferred=function(_280){
2065
+ this.chain=[];
2066
+ this.id=this._nextId();
2067
+ this.fired=-1;
2068
+ this.paused=0;
2069
+ this.results=[null,null];
2070
+ this.canceller=_280;
2071
+ this.silentlyCancelled=false;
2072
+ this.chained=false;
2073
+ };
2074
+ MochiKit.Async.Deferred.prototype={repr:function(){
2075
+ var _281;
2076
+ if(this.fired==-1){
2077
+ _281="unfired";
2078
+ }else{
2079
+ if(this.fired===0){
2080
+ _281="success";
2081
+ }else{
2082
+ _281="error";
2083
+ }
2084
+ }
2085
+ return "Deferred("+this.id+", "+_281+")";
2086
+ },toString:MochiKit.Base.forwardCall("repr"),_nextId:MochiKit.Base.counter(),cancel:function(){
2087
+ var self=MochiKit.Async;
2088
+ if(this.fired==-1){
2089
+ if(this.canceller){
2090
+ this.canceller(this);
2091
+ }else{
2092
+ this.silentlyCancelled=true;
2093
+ }
2094
+ if(this.fired==-1){
2095
+ this.errback(new self.CancelledError(this));
2096
+ }
2097
+ }else{
2098
+ if((this.fired===0)&&(this.results[0] instanceof self.Deferred)){
2099
+ this.results[0].cancel();
2100
+ }
2101
+ }
2102
+ },_pause:function(){
2103
+ this.paused++;
2104
+ },_unpause:function(){
2105
+ this.paused--;
2106
+ if((this.paused===0)&&(this.fired>=0)){
2107
+ this._fire();
2108
+ }
2109
+ },_continue:function(res){
2110
+ this._resback(res);
2111
+ this._unpause();
2112
+ },_resback:function(res){
2113
+ this.fired=((res instanceof Error)?1:0);
2114
+ this.results[this.fired]=res;
2115
+ this._fire();
2116
+ },_check:function(){
2117
+ if(this.fired!=-1){
2118
+ if(!this.silentlyCancelled){
2119
+ throw new MochiKit.Async.AlreadyCalledError(this);
2120
+ }
2121
+ this.silentlyCancelled=false;
2122
+ return;
2123
+ }
2124
+ },callback:function(res){
2125
+ this._check();
2126
+ if(res instanceof MochiKit.Async.Deferred){
2127
+ throw new Error("Deferred instances can only be chained if they are the result of a callback");
2128
+ }
2129
+ this._resback(res);
2130
+ },errback:function(res){
2131
+ this._check();
2132
+ var self=MochiKit.Async;
2133
+ if(res instanceof self.Deferred){
2134
+ throw new Error("Deferred instances can only be chained if they are the result of a callback");
2135
+ }
2136
+ if(!(res instanceof Error)){
2137
+ res=new self.GenericError(res);
2138
+ }
2139
+ this._resback(res);
2140
+ },addBoth:function(fn){
2141
+ if(arguments.length>1){
2142
+ fn=MochiKit.Base.partial.apply(null,arguments);
2143
+ }
2144
+ return this.addCallbacks(fn,fn);
2145
+ },addCallback:function(fn){
2146
+ if(arguments.length>1){
2147
+ fn=MochiKit.Base.partial.apply(null,arguments);
2148
+ }
2149
+ return this.addCallbacks(fn,null);
2150
+ },addErrback:function(fn){
2151
+ if(arguments.length>1){
2152
+ fn=MochiKit.Base.partial.apply(null,arguments);
2153
+ }
2154
+ return this.addCallbacks(null,fn);
2155
+ },addCallbacks:function(cb,eb){
2156
+ if(this.chained){
2157
+ throw new Error("Chained Deferreds can not be re-used");
2158
+ }
2159
+ this.chain.push([cb,eb]);
2160
+ if(this.fired>=0){
2161
+ this._fire();
2162
+ }
2163
+ return this;
2164
+ },_fire:function(){
2165
+ var _284=this.chain;
2166
+ var _285=this.fired;
2167
+ var res=this.results[_285];
2168
+ var self=this;
2169
+ var cb=null;
2170
+ while(_284.length>0&&this.paused===0){
2171
+ var pair=_284.shift();
2172
+ var f=pair[_285];
2173
+ if(f===null){
2174
+ continue;
2175
+ }
2176
+ try{
2177
+ res=f(res);
2178
+ _285=((res instanceof Error)?1:0);
2179
+ if(res instanceof MochiKit.Async.Deferred){
2180
+ cb=function(res){
2181
+ self._continue(res);
2182
+ };
2183
+ this._pause();
2184
+ }
2185
+ }
2186
+ catch(err){
2187
+ _285=1;
2188
+ if(!(err instanceof Error)){
2189
+ err=new MochiKit.Async.GenericError(err);
2190
+ }
2191
+ res=err;
2192
+ }
2193
+ }
2194
+ this.fired=_285;
2195
+ this.results[_285]=res;
2196
+ if(cb&&this.paused){
2197
+ res.addBoth(cb);
2198
+ res.chained=true;
2199
+ }
2200
+ }};
2201
+ MochiKit.Base.update(MochiKit.Async,{evalJSONRequest:function(){
2202
+ return eval("("+arguments[0].responseText+")");
2203
+ },succeed:function(_287){
2204
+ var d=new MochiKit.Async.Deferred();
2205
+ d.callback.apply(d,arguments);
2206
+ return d;
2207
+ },fail:function(_288){
2208
+ var d=new MochiKit.Async.Deferred();
2209
+ d.errback.apply(d,arguments);
2210
+ return d;
2211
+ },getXMLHttpRequest:function(){
2212
+ var self=arguments.callee;
2213
+ if(!self.XMLHttpRequest){
2214
+ var _289=[function(){
2215
+ return new XMLHttpRequest();
2216
+ },function(){
2217
+ return new ActiveXObject("Msxml2.XMLHTTP");
2218
+ },function(){
2219
+ return new ActiveXObject("Microsoft.XMLHTTP");
2220
+ },function(){
2221
+ return new ActiveXObject("Msxml2.XMLHTTP.4.0");
2222
+ },function(){
2223
+ throw new MochiKit.Async.BrowserComplianceError("Browser does not support XMLHttpRequest");
2224
+ }];
2225
+ for(var i=0;i<_289.length;i++){
2226
+ var func=_289[i];
2227
+ try{
2228
+ self.XMLHttpRequest=func;
2229
+ return func();
2230
+ }
2231
+ catch(e){
2232
+ }
2233
+ }
2234
+ }
2235
+ return self.XMLHttpRequest();
2236
+ },sendXMLHttpRequest:function(req,_291){
2237
+ if(_291===null){
2238
+ _291="";
2239
+ }
2240
+ var _292=function(){
2241
+ try{
2242
+ req.onreadystatechange=null;
2243
+ }
2244
+ catch(e){
2245
+ try{
2246
+ req.onreadystatechange=function(){
2247
+ };
2248
+ }
2249
+ catch(e){
2250
+ }
2251
+ }
2252
+ req.abort();
2253
+ };
2254
+ var self=MochiKit.Async;
2255
+ var d=new self.Deferred(_292);
2256
+ var _293=function(){
2257
+ if(req.readyState==4){
2258
+ try{
2259
+ req.onreadystatechange=null;
2260
+ }
2261
+ catch(e){
2262
+ try{
2263
+ req.onreadystatechange=function(){
2264
+ };
2265
+ }
2266
+ catch(e){
2267
+ }
2268
+ }
2269
+ var _294=null;
2270
+ try{
2271
+ _294=req.status;
2272
+ if(!_294&&MochiKit.Base.isNotEmpty(req.responseText)){
2273
+ _294=304;
2274
+ }
2275
+ }
2276
+ catch(e){
2277
+ }
2278
+ if(_294==200||_294==304){
2279
+ d.callback(req);
2280
+ }else{
2281
+ var err=new self.XMLHttpRequestError(req,"Request failed");
2282
+ if(err.number){
2283
+ d.errback(err);
2284
+ }else{
2285
+ d.errback(err);
2286
+ }
2287
+ }
2288
+ }
2289
+ };
2290
+ try{
2291
+ req.onreadystatechange=_293;
2292
+ req.send(_291);
2293
+ }
2294
+ catch(e){
2295
+ try{
2296
+ req.onreadystatechange=null;
2297
+ }
2298
+ catch(ignore){
2299
+ }
2300
+ d.errback(e);
2301
+ }
2302
+ return d;
2303
+ },doSimpleXMLHttpRequest:function(url){
2304
+ var self=MochiKit.Async;
2305
+ var req=self.getXMLHttpRequest();
2306
+ if(arguments.length>1){
2307
+ var m=MochiKit.Base;
2308
+ var qs=m.queryString.apply(null,m.extend(null,arguments,1));
2309
+ if(qs){
2310
+ url+="?"+qs;
2311
+ }
2312
+ }
2313
+ req.open("GET",url,true);
2314
+ return self.sendXMLHttpRequest(req);
2315
+ },loadJSONDoc:function(url){
2316
+ var self=MochiKit.Async;
2317
+ var d=self.doSimpleXMLHttpRequest.apply(self,arguments);
2318
+ d=d.addCallback(self.evalJSONRequest);
2319
+ return d;
2320
+ },wait:function(_298,_299){
2321
+ var d=new MochiKit.Async.Deferred();
2322
+ var m=MochiKit.Base;
2323
+ if(typeof (_299)!="undefined"){
2324
+ d.addCallback(function(){
2325
+ return _299;
2326
+ });
2327
+ }
2328
+ var _300=setTimeout(m.bind("callback",d),Math.floor(_298*1000));
2329
+ d.canceller=function(){
2330
+ try{
2331
+ clearTimeout(_300);
2332
+ }
2333
+ catch(e){
2334
+ }
2335
+ };
2336
+ return d;
2337
+ },callLater:function(_301,func){
2338
+ var m=MochiKit.Base;
2339
+ var _302=m.partial.apply(m,m.extend(null,arguments,1));
2340
+ return MochiKit.Async.wait(_301).addCallback(function(res){
2341
+ return _302();
2342
+ });
2343
+ }});
2344
+ MochiKit.Async.DeferredLock=function(){
2345
+ this.waiting=[];
2346
+ this.locked=false;
2347
+ this.id=this._nextId();
2348
+ };
2349
+ MochiKit.Async.DeferredLock.prototype={__class__:MochiKit.Async.DeferredLock,acquire:function(){
2350
+ d=new MochiKit.Async.Deferred();
2351
+ if(this.locked){
2352
+ this.waiting.push(d);
2353
+ }else{
2354
+ this.locked=true;
2355
+ d.callback(this);
2356
+ }
2357
+ return d;
2358
+ },release:function(){
2359
+ if(!this.locked){
2360
+ throw TypeError("Tried to release an unlocked DeferredLock");
2361
+ }
2362
+ this.locked=false;
2363
+ if(this.waiting.length>0){
2364
+ this.locked=true;
2365
+ this.waiting.shift().callback(this);
2366
+ }
2367
+ },_nextId:MochiKit.Base.counter(),repr:function(){
2368
+ var _303;
2369
+ if(this.locked){
2370
+ _303="locked, "+this.waiting.length+" waiting";
2371
+ }else{
2372
+ _303="unlocked";
2373
+ }
2374
+ return "DeferredLock("+this.id+", "+_303+")";
2375
+ },toString:MochiKit.Base.forwardCall("repr")};
2376
+ MochiKit.Async.DeferredList=function(list,_305,_306,_307,_308){
2377
+ this.list=list;
2378
+ this.resultList=new Array(this.list.length);
2379
+ this.chain=[];
2380
+ this.id=this._nextId();
2381
+ this.fired=-1;
2382
+ this.paused=0;
2383
+ this.results=[null,null];
2384
+ this.canceller=_308;
2385
+ this.silentlyCancelled=false;
2386
+ if(this.list.length===0&&!_305){
2387
+ this.callback(this.resultList);
2388
+ }
2389
+ this.finishedCount=0;
2390
+ this.fireOnOneCallback=_305;
2391
+ this.fireOnOneErrback=_306;
2392
+ this.consumeErrors=_307;
2393
+ var _309=0;
2394
+ MochiKit.Base.map(MochiKit.Base.bind(function(d){
2395
+ d.addCallback(MochiKit.Base.bind(this._cbDeferred,this),_309,true);
2396
+ d.addErrback(MochiKit.Base.bind(this._cbDeferred,this),_309,false);
2397
+ _309+=1;
2398
+ },this),this.list);
2399
+ };
2400
+ MochiKit.Base.update(MochiKit.Async.DeferredList.prototype,MochiKit.Async.Deferred.prototype);
2401
+ MochiKit.Base.update(MochiKit.Async.DeferredList.prototype,{_cbDeferred:function(_310,_311,_312){
2402
+ this.resultList[_310]=[_311,_312];
2403
+ this.finishedCount+=1;
2404
+ if(this.fired!==0){
2405
+ if(_311&&this.fireOnOneCallback){
2406
+ this.callback([_310,_312]);
2407
+ }else{
2408
+ if(!_311&&this.fireOnOneErrback){
2409
+ this.errback(_312);
2410
+ }else{
2411
+ if(this.finishedCount==this.list.length){
2412
+ this.callback(this.resultList);
2413
+ }
2414
+ }
2415
+ }
2416
+ }
2417
+ if(!_311&&this.consumeErrors){
2418
+ _312=null;
2419
+ }
2420
+ return _312;
2421
+ }});
2422
+ MochiKit.Async.gatherResults=function(_313){
2423
+ var d=new MochiKit.Async.DeferredList(_313,false,true,false);
2424
+ d.addCallback(function(_314){
2425
+ var ret=[];
2426
+ for(var i=0;i<_314.length;i++){
2427
+ ret.push(_314[i][1]);
2428
+ }
2429
+ return ret;
2430
+ });
2431
+ return d;
2432
+ };
2433
+ MochiKit.Async.maybeDeferred=function(func){
2434
+ var self=MochiKit.Async;
2435
+ var _315;
2436
+ try{
2437
+ var r=func.apply(null,MochiKit.Base.extend([],arguments,1));
2438
+ if(r instanceof self.Deferred){
2439
+ _315=r;
2440
+ }else{
2441
+ if(r instanceof Error){
2442
+ _315=self.fail(r);
2443
+ }else{
2444
+ _315=self.succeed(r);
2445
+ }
2446
+ }
2447
+ }
2448
+ catch(e){
2449
+ _315=self.fail(e);
2450
+ }
2451
+ return _315;
2452
+ };
2453
+ MochiKit.Async.EXPORT=["AlreadyCalledError","CancelledError","BrowserComplianceError","GenericError","XMLHttpRequestError","Deferred","succeed","fail","getXMLHttpRequest","doSimpleXMLHttpRequest","loadJSONDoc","wait","callLater","sendXMLHttpRequest","DeferredLock","DeferredList","gatherResults","maybeDeferred"];
2454
+ MochiKit.Async.EXPORT_OK=["evalJSONRequest"];
2455
+ MochiKit.Async.__new__=function(){
2456
+ var m=MochiKit.Base;
2457
+ var ne=m.partial(m._newNamedError,this);
2458
+ ne("AlreadyCalledError",function(_318){
2459
+ this.deferred=_318;
2460
+ });
2461
+ ne("CancelledError",function(_319){
2462
+ this.deferred=_319;
2463
+ });
2464
+ ne("BrowserComplianceError",function(msg){
2465
+ this.message=msg;
2466
+ });
2467
+ ne("GenericError",function(msg){
2468
+ this.message=msg;
2469
+ });
2470
+ ne("XMLHttpRequestError",function(req,msg){
2471
+ this.req=req;
2472
+ this.message=msg;
2473
+ try{
2474
+ this.number=req.status;
2475
+ }
2476
+ catch(e){
2477
+ }
2478
+ });
2479
+ this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
2480
+ m.nameFunctions(this);
2481
+ };
2482
+ MochiKit.Async.__new__();
2483
+ MochiKit.Base._exportSymbols(this,MochiKit.Async);
2484
+ if(typeof (dojo)!="undefined"){
2485
+ dojo.provide("MochiKit.DOM");
2486
+ dojo.require("MochiKit.Iter");
2487
+ }
2488
+ if(typeof (JSAN)!="undefined"){
2489
+ JSAN.use("MochiKit.Iter",[]);
2490
+ }
2491
+ try{
2492
+ if(typeof (MochiKit.Iter)=="undefined"){
2493
+ throw "";
2494
+ }
2495
+ }
2496
+ catch(e){
2497
+ throw "MochiKit.DOM depends on MochiKit.Iter!";
2498
+ }
2499
+ if(typeof (MochiKit.DOM)=="undefined"){
2500
+ MochiKit.DOM={};
2501
+ }
2502
+ MochiKit.DOM.NAME="MochiKit.DOM";
2503
+ MochiKit.DOM.VERSION="1.3";
2504
+ MochiKit.DOM.__repr__=function(){
2505
+ return "["+this.NAME+" "+this.VERSION+"]";
2506
+ };
2507
+ MochiKit.DOM.toString=function(){
2508
+ return this.__repr__();
2509
+ };
2510
+ MochiKit.DOM.EXPORT=["formContents","currentWindow","currentDocument","withWindow","withDocument","registerDOMConverter","coerceToDOM","createDOM","createDOMFunc","getNodeAttribute","setNodeAttribute","updateNodeAttributes","appendChildNodes","replaceChildNodes","removeElement","swapDOM","BUTTON","TT","PRE","H1","H2","H3","BR","CANVAS","HR","LABEL","TEXTAREA","FORM","STRONG","SELECT","OPTION","OPTGROUP","LEGEND","FIELDSET","P","UL","OL","LI","TD","TR","THEAD","TBODY","TFOOT","TABLE","TH","INPUT","SPAN","A","DIV","IMG","getElement","$","computedStyle","getElementsByTagAndClassName","addToCallStack","addLoadEvent","focusOnLoad","setElementClass","toggleElementClass","addElementClass","removeElementClass","swapElementClass","hasElementClass","escapeHTML","toHTML","emitHTML","setDisplayForElement","hideElement","showElement","scrapeText","elementDimensions","elementPosition","setElementDimensions","setElementPosition","getViewportDimensions","setOpacity"];
2511
+ MochiKit.DOM.EXPORT_OK=["domConverters"];
2512
+ MochiKit.DOM.Dimensions=function(w,h){
2513
+ this.w=w;
2514
+ this.h=h;
2515
+ };
2516
+ MochiKit.DOM.Dimensions.prototype.repr=function(){
2517
+ var repr=MochiKit.Base.repr;
2518
+ return "{w: "+repr(this.w)+", h: "+repr(this.h)+"}";
2519
+ };
2520
+ MochiKit.DOM.Coordinates=function(x,y){
2521
+ this.x=x;
2522
+ this.y=y;
2523
+ };
2524
+ MochiKit.DOM.Coordinates.prototype.repr=function(){
2525
+ var repr=MochiKit.Base.repr;
2526
+ return "{x: "+repr(this.x)+", y: "+repr(this.y)+"}";
2527
+ };
2528
+ MochiKit.DOM.Coordinates.prototype.toString=function(){
2529
+ return this.repr();
2530
+ };
2531
+ MochiKit.Base.update(MochiKit.DOM,{setOpacity:function(elem,o){
2532
+ elem=MochiKit.DOM.getElement(elem);
2533
+ MochiKit.DOM.updateNodeAttributes(elem,{"style":{"opacity":o,"-moz-opacity":o,"-khtml-opacity":o,"filter":" alpha(opacity="+(o*100)+")"}});
2534
+ },getViewportDimensions:function(){
2535
+ var d=new MochiKit.DOM.Dimensions();
2536
+ var w=MochiKit.DOM._window;
2537
+ var b=MochiKit.DOM._document.body;
2538
+ if(w.innerWidth){
2539
+ d.w=w.innerWidth;
2540
+ d.h=w.innerHeight;
2541
+ }else{
2542
+ if(b.parentElement.clientWidth){
2543
+ d.w=b.parentElement.clientWidth;
2544
+ d.h=b.parentElement.clientHeight;
2545
+ }else{
2546
+ if(b&&b.clientWidth){
2547
+ d.w=b.clientWidth;
2548
+ d.h=b.clientHeight;
2549
+ }
2550
+ }
2551
+ }
2552
+ return d;
2553
+ },elementDimensions:function(elem){
2554
+ var self=MochiKit.DOM;
2555
+ if(typeof (elem.w)=="number"||typeof (elem.h)=="number"){
2556
+ return new self.Dimensions(elem.w||0,elem.h||0);
2557
+ }
2558
+ elem=self.getElement(elem);
2559
+ if(!elem){
2560
+ return undefined;
2561
+ }
2562
+ if(self.computedStyle(elem,"display")!="none"){
2563
+ return new self.Dimensions(elem.offsetWidth||0,elem.offsetHeight||0);
2564
+ }
2565
+ var s=elem.style;
2566
+ var _324=s.visibility;
2567
+ var _325=s.position;
2568
+ s.visibility="hidden";
2569
+ s.position="absolute";
2570
+ s.display="";
2571
+ var _326=elem.offsetWidth;
2572
+ var _327=elem.offsetHeight;
2573
+ s.display="none";
2574
+ s.position=_325;
2575
+ s.visibility=_324;
2576
+ return new self.Dimensions(_326,_327);
2577
+ },elementPosition:function(elem,_328){
2578
+ var self=MochiKit.DOM;
2579
+ elem=self.getElement(elem);
2580
+ if(!elem){
2581
+ return undefined;
2582
+ }
2583
+ var c=new self.Coordinates(0,0);
2584
+ if(elem.x&&elem.y){
2585
+ c.x+=elem.x||0;
2586
+ c.y+=elem.y||0;
2587
+ return c;
2588
+ }else{
2589
+ if(elem.parentNode===null||self.computedStyle(elem,"display")=="none"){
2590
+ return undefined;
2591
+ }
2592
+ }
2593
+ var box=null;
2594
+ var _331=null;
2595
+ var d=MochiKit.DOM._document;
2596
+ var de=d.documentElement;
2597
+ var b=d.body;
2598
+ if(elem.getBoundingClientRect){
2599
+ box=elem.getBoundingClientRect();
2600
+ c.x+=box.left+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||b.clientLeft);
2601
+ c.y+=box.top+(de.scrollTop||b.scrollTop)-(de.clientTop||b.clientTop);
2602
+ }else{
2603
+ if(d.getBoxObjectFor){
2604
+ box=d.getBoxObjectFor(elem);
2605
+ c.x+=box.x;
2606
+ c.y+=box.y;
2607
+ }else{
2608
+ if(elem.offsetParent){
2609
+ c.x+=elem.offsetLeft;
2610
+ c.y+=elem.offsetTop;
2611
+ _331=elem.offsetParent;
2612
+ if(_331!=elem){
2613
+ while(_331){
2614
+ c.x+=_331.offsetLeft;
2615
+ c.y+=_331.offsetTop;
2616
+ _331=_331.offsetParent;
2617
+ }
2618
+ }
2619
+ var ua=navigator.userAgent.toLowerCase();
2620
+ if((typeof (opera)!="undefined"&&parseFloat(opera.version())<9)||(ua.indexOf("safari")!=-1&&self.computedStyle(elem,"position")=="absolute")){
2621
+ c.x-=b.offsetLeft;
2622
+ c.y-=b.offsetTop;
2623
+ }
2624
+ }
2625
+ }
2626
+ }
2627
+ if(typeof (_328)!="undefined"){
2628
+ _328=arguments.callee(_328);
2629
+ if(_328){
2630
+ c.x-=(_328.x||0);
2631
+ c.y-=(_328.y||0);
2632
+ }
2633
+ }
2634
+ if(elem.parentNode){
2635
+ _331=elem.parentNode;
2636
+ }else{
2637
+ _331=null;
2638
+ }
2639
+ while(_331&&_331.tagName!="BODY"&&_331.tagName!="HTML"){
2640
+ c.x-=_331.scrollLeft;
2641
+ c.y-=_331.scrollTop;
2642
+ if(_331.parentNode){
2643
+ _331=_331.parentNode;
2644
+ }else{
2645
+ _331=null;
2646
+ }
2647
+ }
2648
+ return c;
2649
+ },setElementDimensions:function(elem,_334,_335){
2650
+ elem=MochiKit.DOM.getElement(elem);
2651
+ if(typeof (_335)=="undefined"){
2652
+ _335="px";
2653
+ }
2654
+ MochiKit.DOM.updateNodeAttributes(elem,{"style":{"width":_334.w+_335,"height":_334.h+_335}});
2655
+ },setElementPosition:function(elem,_336,_337){
2656
+ elem=MochiKit.DOM.getElement(elem);
2657
+ if(typeof (_337)=="undefined"){
2658
+ _337="px";
2659
+ }
2660
+ MochiKit.DOM.updateNodeAttributes(elem,{"style":{"left":_336.x+_337,"top":_336.y+_337}});
2661
+ },currentWindow:function(){
2662
+ return MochiKit.DOM._window;
2663
+ },currentDocument:function(){
2664
+ return MochiKit.DOM._document;
2665
+ },withWindow:function(win,func){
2666
+ var self=MochiKit.DOM;
2667
+ var _339=self._document;
2668
+ var _340=self._win;
2669
+ var rval;
2670
+ try{
2671
+ self._window=win;
2672
+ self._document=win.document;
2673
+ rval=func();
2674
+ }
2675
+ catch(e){
2676
+ self._window=_340;
2677
+ self._document=_339;
2678
+ throw e;
2679
+ }
2680
+ self._window=_340;
2681
+ self._document=_339;
2682
+ return rval;
2683
+ },formContents:function(elem){
2684
+ var _341=[];
2685
+ var _342=[];
2686
+ var m=MochiKit.Base;
2687
+ var self=MochiKit.DOM;
2688
+ if(typeof (elem)=="undefined"||elem===null){
2689
+ elem=self._document;
2690
+ }else{
2691
+ elem=self.getElement(elem);
2692
+ }
2693
+ m.nodeWalk(elem,function(elem){
2694
+ var name=elem.name;
2695
+ if(m.isNotEmpty(name)){
2696
+ var _343=elem.nodeName;
2697
+ if(_343=="INPUT"&&(elem.type=="radio"||elem.type=="checkbox")&&!elem.checked){
2698
+ return null;
2699
+ }
2700
+ if(_343=="SELECT"){
2701
+ if(elem.selectedIndex>=0){
2702
+ var opt=elem.options[elem.selectedIndex];
2703
+ _341.push(name);
2704
+ _342.push((opt.value)?opt.value:opt.text);
2705
+ return null;
2706
+ }
2707
+ _341.push(name);
2708
+ _342.push("");
2709
+ return null;
2710
+ }
2711
+ if(_343=="FORM"||_343=="P"||_343=="SPAN"||_343=="DIV"){
2712
+ return elem.childNodes;
2713
+ }
2714
+ _341.push(name);
2715
+ _342.push(elem.value||"");
2716
+ return null;
2717
+ }
2718
+ return elem.childNodes;
2719
+ });
2720
+ return [_341,_342];
2721
+ },withDocument:function(doc,func){
2722
+ var self=MochiKit.DOM;
2723
+ var _346=self._document;
2724
+ var rval;
2725
+ try{
2726
+ self._document=doc;
2727
+ rval=func();
2728
+ }
2729
+ catch(e){
2730
+ self._document=_346;
2731
+ throw e;
2732
+ }
2733
+ self._document=_346;
2734
+ return rval;
2735
+ },registerDOMConverter:function(name,_347,wrap,_348){
2736
+ MochiKit.DOM.domConverters.register(name,_347,wrap,_348);
2737
+ },coerceToDOM:function(node,ctx){
2738
+ var im=MochiKit.Iter;
2739
+ var self=MochiKit.DOM;
2740
+ var iter=im.iter;
2741
+ var _352=im.repeat;
2742
+ var imap=im.imap;
2743
+ var _354=self.domConverters;
2744
+ var _355=self.coerceToDOM;
2745
+ var _356=MochiKit.Base.NotFound;
2746
+ while(true){
2747
+ if(typeof (node)=="undefined"||node===null){
2748
+ return null;
2749
+ }
2750
+ if(typeof (node.nodeType)!="undefined"&&node.nodeType>0){
2751
+ return node;
2752
+ }
2753
+ if(typeof (node)=="number"||typeof (node)=="bool"){
2754
+ node=node.toString();
2755
+ }
2756
+ if(typeof (node)=="string"){
2757
+ return self._document.createTextNode(node);
2758
+ }
2759
+ if(typeof (node.toDOM)=="function"){
2760
+ node=node.toDOM(ctx);
2761
+ continue;
2762
+ }
2763
+ if(typeof (node)=="function"){
2764
+ node=node(ctx);
2765
+ continue;
2766
+ }
2767
+ var _357=null;
2768
+ try{
2769
+ _357=iter(node);
2770
+ }
2771
+ catch(e){
2772
+ }
2773
+ if(_357){
2774
+ return imap(_355,_357,_352(ctx));
2775
+ }
2776
+ try{
2777
+ node=_354.match(node,ctx);
2778
+ continue;
2779
+ }
2780
+ catch(e){
2781
+ if(e!=_356){
2782
+ throw e;
2783
+ }
2784
+ }
2785
+ return self._document.createTextNode(node.toString());
2786
+ }
2787
+ return undefined;
2788
+ },setNodeAttribute:function(node,attr,_359){
2789
+ var o={};
2790
+ o[attr]=_359;
2791
+ try{
2792
+ return MochiKit.DOM.updateNodeAttributes(node,o);
2793
+ }
2794
+ catch(e){
2795
+ }
2796
+ return null;
2797
+ },getNodeAttribute:function(node,attr){
2798
+ var self=MochiKit.DOM;
2799
+ var _360=self.attributeArray.renames[attr];
2800
+ node=self.getElement(node);
2801
+ try{
2802
+ if(_360){
2803
+ return node[_360];
2804
+ }
2805
+ return node.getAttribute(attr);
2806
+ }
2807
+ catch(e){
2808
+ }
2809
+ return null;
2810
+ },updateNodeAttributes:function(node,_361){
2811
+ var elem=node;
2812
+ var self=MochiKit.DOM;
2813
+ if(typeof (node)=="string"){
2814
+ elem=self.getElement(node);
2815
+ }
2816
+ if(_361){
2817
+ var _362=MochiKit.Base.updatetree;
2818
+ if(self.attributeArray.compliant){
2819
+ for(var k in _361){
2820
+ var v=_361[k];
2821
+ if(typeof (v)=="object"&&typeof (elem[k])=="object"){
2822
+ _362(elem[k],v);
2823
+ }else{
2824
+ if(k.substring(0,2)=="on"){
2825
+ if(typeof (v)=="string"){
2826
+ v=new Function(v);
2827
+ }
2828
+ elem[k]=v;
2829
+ }else{
2830
+ elem.setAttribute(k,v);
2831
+ }
2832
+ }
2833
+ }
2834
+ }else{
2835
+ var _363=self.attributeArray.renames;
2836
+ for(k in _361){
2837
+ v=_361[k];
2838
+ var _364=_363[k];
2839
+ if(k=="style"&&typeof (v)=="string"){
2840
+ elem.style.cssText=v;
2841
+ }else{
2842
+ if(typeof (_364)=="string"){
2843
+ elem[_364]=v;
2844
+ }else{
2845
+ if(typeof (elem[k])=="object"&&typeof (v)=="object"){
2846
+ _362(elem[k],v);
2847
+ }else{
2848
+ if(k.substring(0,2)=="on"){
2849
+ if(typeof (v)=="string"){
2850
+ v=new Function(v);
2851
+ }
2852
+ elem[k]=v;
2853
+ }else{
2854
+ elem.setAttribute(k,v);
2855
+ }
2856
+ }
2857
+ }
2858
+ }
2859
+ }
2860
+ }
2861
+ }
2862
+ return elem;
2863
+ },appendChildNodes:function(node){
2864
+ var elem=node;
2865
+ var self=MochiKit.DOM;
2866
+ if(typeof (node)=="string"){
2867
+ elem=self.getElement(node);
2868
+ }
2869
+ var _365=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];
2870
+ var _366=MochiKit.Base.concat;
2871
+ while(_365.length){
2872
+ var n=_365.shift();
2873
+ if(typeof (n)=="undefined"||n===null){
2874
+ }else{
2875
+ if(typeof (n.nodeType)=="number"){
2876
+ elem.appendChild(n);
2877
+ }else{
2878
+ _365=_366(n,_365);
2879
+ }
2880
+ }
2881
+ }
2882
+ return elem;
2883
+ },replaceChildNodes:function(node){
2884
+ var elem=node;
2885
+ var self=MochiKit.DOM;
2886
+ if(typeof (node)=="string"){
2887
+ elem=self.getElement(node);
2888
+ arguments[0]=elem;
2889
+ }
2890
+ var _367;
2891
+ while((_367=elem.firstChild)){
2892
+ elem.removeChild(_367);
2893
+ }
2894
+ if(arguments.length<2){
2895
+ return elem;
2896
+ }else{
2897
+ return self.appendChildNodes.apply(this,arguments);
2898
+ }
2899
+ },createDOM:function(name,_368){
2900
+ var elem;
2901
+ var self=MochiKit.DOM;
2902
+ var m=MochiKit.Base;
2903
+ if(typeof (_368)=="string"||typeof (_368)=="number"){
2904
+ var args=m.extend([name,null],arguments,1);
2905
+ return arguments.callee.apply(this,args);
2906
+ }
2907
+ if(typeof (name)=="string"){
2908
+ if(_368&&"name" in _368&&!self.attributeArray.compliant){
2909
+ name=("<"+name+" name=\""+self.escapeHTML(_368.name)+"\">");
2910
+ }
2911
+ elem=self._document.createElement(name);
2912
+ }else{
2913
+ elem=name;
2914
+ }
2915
+ if(_368){
2916
+ self.updateNodeAttributes(elem,_368);
2917
+ }
2918
+ if(arguments.length<=2){
2919
+ return elem;
2920
+ }else{
2921
+ var args=m.extend([elem],arguments,2);
2922
+ return self.appendChildNodes.apply(this,args);
2923
+ }
2924
+ },createDOMFunc:function(){
2925
+ var m=MochiKit.Base;
2926
+ return m.partial.apply(this,m.extend([MochiKit.DOM.createDOM],arguments));
2927
+ },swapDOM:function(dest,src){
2928
+ var self=MochiKit.DOM;
2929
+ dest=self.getElement(dest);
2930
+ var _371=dest.parentNode;
2931
+ if(src){
2932
+ src=self.getElement(src);
2933
+ _371.replaceChild(src,dest);
2934
+ }else{
2935
+ _371.removeChild(dest);
2936
+ }
2937
+ return src;
2938
+ },getElement:function(id){
2939
+ var self=MochiKit.DOM;
2940
+ if(arguments.length==1){
2941
+ return ((typeof (id)=="string")?self._document.getElementById(id):id);
2942
+ }else{
2943
+ return MochiKit.Base.map(self.getElement,arguments);
2944
+ }
2945
+ },computedStyle:function(_373,_374,_375){
2946
+ if(arguments.length==2){
2947
+ _375=_374;
2948
+ }
2949
+ var self=MochiKit.DOM;
2950
+ var el=self.getElement(_373);
2951
+ var _377=self._document;
2952
+ if(!el||el==_377){
2953
+ return undefined;
2954
+ }
2955
+ if(el.currentStyle){
2956
+ return el.currentStyle[_374];
2957
+ }
2958
+ if(typeof (_377.defaultView)=="undefined"){
2959
+ return undefined;
2960
+ }
2961
+ if(_377.defaultView===null){
2962
+ return undefined;
2963
+ }
2964
+ var _378=_377.defaultView.getComputedStyle(el,null);
2965
+ if(typeof (_378)=="undefined"||_378===null){
2966
+ return undefined;
2967
+ }
2968
+ return _378.getPropertyValue(_375);
2969
+ },getElementsByTagAndClassName:function(_379,_380,_381){
2970
+ var self=MochiKit.DOM;
2971
+ if(typeof (_379)=="undefined"||_379===null){
2972
+ _379="*";
2973
+ }
2974
+ if(typeof (_381)=="undefined"||_381===null){
2975
+ _381=self._document;
2976
+ }
2977
+ _381=self.getElement(_381);
2978
+ var _382=(_381.getElementsByTagName(_379)||self._document.all);
2979
+ if(typeof (_380)=="undefined"||_380===null){
2980
+ return MochiKit.Base.extend(null,_382);
2981
+ }
2982
+ var _383=[];
2983
+ for(var i=0;i<_382.length;i++){
2984
+ var _384=_382[i];
2985
+ var _385=_384.className.split(" ");
2986
+ for(var j=0;j<_385.length;j++){
2987
+ if(_385[j]==_380){
2988
+ _383.push(_384);
2989
+ break;
2990
+ }
2991
+ }
2992
+ }
2993
+ return _383;
2994
+ },_newCallStack:function(path,once){
2995
+ var rval=function(){
2996
+ var _388=arguments.callee.callStack;
2997
+ for(var i=0;i<_388.length;i++){
2998
+ if(_388[i].apply(this,arguments)===false){
2999
+ break;
3000
+ }
3001
+ }
3002
+ if(once){
3003
+ try{
3004
+ this[path]=null;
3005
+ }
3006
+ catch(e){
3007
+ }
3008
+ }
3009
+ };
3010
+ rval.callStack=[];
3011
+ return rval;
3012
+ },addToCallStack:function(_389,path,func,once){
3013
+ var self=MochiKit.DOM;
3014
+ var _390=_389[path];
3015
+ var _391=_390;
3016
+ if(!(typeof (_390)=="function"&&typeof (_390.callStack)=="object"&&_390.callStack!==null)){
3017
+ _391=self._newCallStack(path,once);
3018
+ if(typeof (_390)=="function"){
3019
+ _391.callStack.push(_390);
3020
+ }
3021
+ _389[path]=_391;
3022
+ }
3023
+ _391.callStack.push(func);
3024
+ },addLoadEvent:function(func){
3025
+ var self=MochiKit.DOM;
3026
+ self.addToCallStack(self._window,"onload",func,true);
3027
+ },focusOnLoad:function(_392){
3028
+ var self=MochiKit.DOM;
3029
+ self.addLoadEvent(function(){
3030
+ _392=self.getElement(_392);
3031
+ if(_392){
3032
+ _392.focus();
3033
+ }
3034
+ });
3035
+ },setElementClass:function(_393,_394){
3036
+ var self=MochiKit.DOM;
3037
+ var obj=self.getElement(_393);
3038
+ if(self.attributeArray.compliant){
3039
+ obj.setAttribute("class",_394);
3040
+ }else{
3041
+ obj.setAttribute("className",_394);
3042
+ }
3043
+ },toggleElementClass:function(_395){
3044
+ var self=MochiKit.DOM;
3045
+ for(var i=1;i<arguments.length;i++){
3046
+ var obj=self.getElement(arguments[i]);
3047
+ if(!self.addElementClass(obj,_395)){
3048
+ self.removeElementClass(obj,_395);
3049
+ }
3050
+ }
3051
+ },addElementClass:function(_396,_397){
3052
+ var self=MochiKit.DOM;
3053
+ var obj=self.getElement(_396);
3054
+ var cls=obj.className;
3055
+ if(cls.length===0){
3056
+ self.setElementClass(obj,_397);
3057
+ return true;
3058
+ }
3059
+ if(cls==_397){
3060
+ return false;
3061
+ }
3062
+ var _399=obj.className.split(" ");
3063
+ for(var i=0;i<_399.length;i++){
3064
+ if(_399[i]==_397){
3065
+ return false;
3066
+ }
3067
+ }
3068
+ self.setElementClass(obj,cls+" "+_397);
3069
+ return true;
3070
+ },removeElementClass:function(_400,_401){
3071
+ var self=MochiKit.DOM;
3072
+ var obj=self.getElement(_400);
3073
+ var cls=obj.className;
3074
+ if(cls.length===0){
3075
+ return false;
3076
+ }
3077
+ if(cls==_401){
3078
+ self.setElementClass(obj,"");
3079
+ return true;
3080
+ }
3081
+ var _402=obj.className.split(" ");
3082
+ for(var i=0;i<_402.length;i++){
3083
+ if(_402[i]==_401){
3084
+ _402.splice(i,1);
3085
+ self.setElementClass(obj,_402.join(" "));
3086
+ return true;
3087
+ }
3088
+ }
3089
+ return false;
3090
+ },swapElementClass:function(_403,_404,_405){
3091
+ var obj=MochiKit.DOM.getElement(_403);
3092
+ var res=MochiKit.DOM.removeElementClass(obj,_404);
3093
+ if(res){
3094
+ MochiKit.DOM.addElementClass(obj,_405);
3095
+ }
3096
+ return res;
3097
+ },hasElementClass:function(_406,_407){
3098
+ var obj=MochiKit.DOM.getElement(_406);
3099
+ var _408=obj.className.split(" ");
3100
+ for(var i=1;i<arguments.length;i++){
3101
+ var good=false;
3102
+ for(var j=0;j<_408.length;j++){
3103
+ if(_408[j]==arguments[i]){
3104
+ good=true;
3105
+ break;
3106
+ }
3107
+ }
3108
+ if(!good){
3109
+ return false;
3110
+ }
3111
+ }
3112
+ return true;
3113
+ },escapeHTML:function(s){
3114
+ return s.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
3115
+ },toHTML:function(dom){
3116
+ return MochiKit.DOM.emitHTML(dom).join("");
3117
+ },emitHTML:function(dom,lst){
3118
+ if(typeof (lst)=="undefined"||lst===null){
3119
+ lst=[];
3120
+ }
3121
+ var _411=[dom];
3122
+ var self=MochiKit.DOM;
3123
+ var _412=self.escapeHTML;
3124
+ var _413=self.attributeArray;
3125
+ while(_411.length){
3126
+ dom=_411.pop();
3127
+ if(typeof (dom)=="string"){
3128
+ lst.push(dom);
3129
+ }else{
3130
+ if(dom.nodeType==1){
3131
+ lst.push("<"+dom.nodeName.toLowerCase());
3132
+ var _414=[];
3133
+ var _415=_413(dom);
3134
+ for(var i=0;i<_415.length;i++){
3135
+ var a=_415[i];
3136
+ _414.push([" ",a.name,"=\"",_412(a.value),"\""]);
3137
+ }
3138
+ _414.sort();
3139
+ for(i=0;i<_414.length;i++){
3140
+ var _416=_414[i];
3141
+ for(var j=0;j<_416.length;j++){
3142
+ lst.push(_416[j]);
3143
+ }
3144
+ }
3145
+ if(dom.hasChildNodes()){
3146
+ lst.push(">");
3147
+ _411.push("</"+dom.nodeName.toLowerCase()+">");
3148
+ var _417=dom.childNodes;
3149
+ for(i=_417.length-1;i>=0;i--){
3150
+ _411.push(_417[i]);
3151
+ }
3152
+ }else{
3153
+ lst.push("/>");
3154
+ }
3155
+ }else{
3156
+ if(dom.nodeType==3){
3157
+ lst.push(_412(dom.nodeValue));
3158
+ }
3159
+ }
3160
+ }
3161
+ }
3162
+ return lst;
3163
+ },setDisplayForElement:function(_418,_419){
3164
+ var m=MochiKit.Base;
3165
+ var _420=m.extend(null,arguments,1);
3166
+ MochiKit.Iter.forEach(m.filter(null,m.map(MochiKit.DOM.getElement,_420)),function(_419){
3167
+ _419.style.display=_418;
3168
+ });
3169
+ },scrapeText:function(node,_421){
3170
+ var rval=[];
3171
+ (function(node){
3172
+ var cn=node.childNodes;
3173
+ if(cn){
3174
+ for(var i=0;i<cn.length;i++){
3175
+ arguments.callee.call(this,cn[i]);
3176
+ }
3177
+ }
3178
+ var _423=node.nodeValue;
3179
+ if(typeof (_423)=="string"){
3180
+ rval.push(_423);
3181
+ }
3182
+ })(MochiKit.DOM.getElement(node));
3183
+ if(_421){
3184
+ return rval;
3185
+ }else{
3186
+ return rval.join("");
3187
+ }
3188
+ },__new__:function(win){
3189
+ var m=MochiKit.Base;
3190
+ this._document=document;
3191
+ this._window=win;
3192
+ this.domConverters=new m.AdapterRegistry();
3193
+ var _424=this._document.createElement("span");
3194
+ var _425;
3195
+ if(_424&&_424.attributes&&_424.attributes.length>0){
3196
+ var _426=m.filter;
3197
+ _425=function(node){
3198
+ return _426(_425.ignoreAttrFilter,node.attributes);
3199
+ };
3200
+ _425.ignoreAttr={};
3201
+ MochiKit.Iter.forEach(_424.attributes,function(a){
3202
+ _425.ignoreAttr[a.name]=a.value;
3203
+ });
3204
+ _425.ignoreAttrFilter=function(a){
3205
+ return (_425.ignoreAttr[a.name]!=a.value);
3206
+ };
3207
+ _425.compliant=false;
3208
+ _425.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor"};
3209
+ }else{
3210
+ _425=function(node){
3211
+ return node.attributes;
3212
+ };
3213
+ _425.compliant=true;
3214
+ _425.renames={};
3215
+ }
3216
+ this.attributeArray=_425;
3217
+ var _427=this.createDOMFunc;
3218
+ this.UL=_427("ul");
3219
+ this.OL=_427("ol");
3220
+ this.LI=_427("li");
3221
+ this.TD=_427("td");
3222
+ this.TR=_427("tr");
3223
+ this.TBODY=_427("tbody");
3224
+ this.THEAD=_427("thead");
3225
+ this.TFOOT=_427("tfoot");
3226
+ this.TABLE=_427("table");
3227
+ this.TH=_427("th");
3228
+ this.INPUT=_427("input");
3229
+ this.SPAN=_427("span");
3230
+ this.A=_427("a");
3231
+ this.DIV=_427("div");
3232
+ this.IMG=_427("img");
3233
+ this.BUTTON=_427("button");
3234
+ this.TT=_427("tt");
3235
+ this.PRE=_427("pre");
3236
+ this.H1=_427("h1");
3237
+ this.H2=_427("h2");
3238
+ this.H3=_427("h3");
3239
+ this.BR=_427("br");
3240
+ this.HR=_427("hr");
3241
+ this.LABEL=_427("label");
3242
+ this.TEXTAREA=_427("textarea");
3243
+ this.FORM=_427("form");
3244
+ this.P=_427("p");
3245
+ this.SELECT=_427("select");
3246
+ this.OPTION=_427("option");
3247
+ this.OPTGROUP=_427("optgroup");
3248
+ this.LEGEND=_427("legend");
3249
+ this.FIELDSET=_427("fieldset");
3250
+ this.STRONG=_427("strong");
3251
+ this.CANVAS=_427("canvas");
3252
+ this.hideElement=m.partial(this.setDisplayForElement,"none");
3253
+ this.showElement=m.partial(this.setDisplayForElement,"block");
3254
+ this.removeElement=this.swapDOM;
3255
+ this.$=this.getElement;
3256
+ this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
3257
+ m.nameFunctions(this);
3258
+ }});
3259
+ MochiKit.DOM.__new__(((typeof (window)=="undefined")?this:window));
3260
+ if(!MochiKit.__compat__){
3261
+ withWindow=MochiKit.DOM.withWindow;
3262
+ withDocument=MochiKit.DOM.withDocument;
3263
+ }
3264
+ MochiKit.Base._exportSymbols(this,MochiKit.DOM);
3265
+ if(typeof (dojo)!="undefined"){
3266
+ dojo.provide("MochiKit.LoggingPane");
3267
+ dojo.require("MochiKit.Logging");
3268
+ dojo.require("MochiKit.Base");
3269
+ }
3270
+ if(typeof (JSAN)!="undefined"){
3271
+ JSAN.use("MochiKit.Logging",[]);
3272
+ JSAN.use("MochiKit.Base",[]);
3273
+ }
3274
+ try{
3275
+ if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.Logging)=="undefined"){
3276
+ throw "";
3277
+ }
3278
+ }
3279
+ catch(e){
3280
+ throw "MochiKit.LoggingPane depends on MochiKit.Base and MochiKit.Logging!";
3281
+ }
3282
+ if(typeof (MochiKit.LoggingPane)=="undefined"){
3283
+ MochiKit.LoggingPane={};
3284
+ }
3285
+ MochiKit.LoggingPane.NAME="MochiKit.LoggingPane";
3286
+ MochiKit.LoggingPane.VERSION="1.3";
3287
+ MochiKit.LoggingPane.__repr__=function(){
3288
+ return "["+this.NAME+" "+this.VERSION+"]";
3289
+ };
3290
+ MochiKit.LoggingPane.toString=function(){
3291
+ return this.__repr__();
3292
+ };
3293
+ MochiKit.LoggingPane.createLoggingPane=function(_428){
3294
+ var m=MochiKit.LoggingPane;
3295
+ _428=!(!_428);
3296
+ if(m._loggingPane&&m._loggingPane.inline!=_428){
3297
+ m._loggingPane.closePane();
3298
+ m._loggingPane=null;
3299
+ }
3300
+ if(!m._loggingPane||m._loggingPane.closed){
3301
+ m._loggingPane=new m.LoggingPane(_428,MochiKit.Logging.logger);
3302
+ }
3303
+ return m._loggingPane;
3304
+ };
3305
+ MochiKit.LoggingPane.LoggingPane=function(_429,_430){
3306
+ if(typeof (_430)=="undefined"||_430===null){
3307
+ _430=MochiKit.Logging.logger;
3308
+ }
3309
+ this.logger=_430;
3310
+ var _431=MochiKit.Base.update;
3311
+ var _432=MochiKit.Base.updatetree;
3312
+ var bind=MochiKit.Base.bind;
3313
+ var _433=MochiKit.Base.clone;
3314
+ var win=window;
3315
+ var uid="_MochiKit_LoggingPane";
3316
+ if(typeof (MochiKit.DOM)!="undefined"){
3317
+ win=MochiKit.DOM.currentWindow();
3318
+ }
3319
+ if(!_429){
3320
+ var url=win.location.href.split("?")[0].replace(/[:\/.><&]/g,"_");
3321
+ var name=uid+"_"+url;
3322
+ var nwin=win.open("",name,"dependent,resizable,height=200");
3323
+ if(!nwin){
3324
+ alert("Not able to open debugging window due to pop-up blocking.");
3325
+ return undefined;
3326
+ }
3327
+ nwin.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" "+"\"http://www.w3.org/TR/html4/loose.dtd\">"+"<html><head><title>[MochiKit.LoggingPane]</title></head>"+"<body></body></html>");
3328
+ nwin.document.close();
3329
+ nwin.document.title+=" "+win.document.title;
3330
+ win=nwin;
3331
+ }
3332
+ var doc=win.document;
3333
+ this.doc=doc;
3334
+ var _436=doc.getElementById(uid);
3335
+ var _437=!!_436;
3336
+ if(_436&&typeof (_436.loggingPane)!="undefined"){
3337
+ _436.loggingPane.logger=this.logger;
3338
+ _436.loggingPane.buildAndApplyFilter();
3339
+ return _436.loggingPane;
3340
+ }
3341
+ if(_437){
3342
+ var _438;
3343
+ while((_438=_436.firstChild)){
3344
+ _436.removeChild(_438);
3345
+ }
3346
+ }else{
3347
+ _436=doc.createElement("div");
3348
+ _436.id=uid;
3349
+ }
3350
+ _436.loggingPane=this;
3351
+ var _439=doc.createElement("input");
3352
+ var _440=doc.createElement("input");
3353
+ var _441=doc.createElement("button");
3354
+ var _442=doc.createElement("button");
3355
+ var _443=doc.createElement("button");
3356
+ var _444=doc.createElement("button");
3357
+ var _445=doc.createElement("div");
3358
+ var _446=doc.createElement("div");
3359
+ var _447=uid+"_Listener";
3360
+ this.colorTable=_433(this.colorTable);
3361
+ var _448=[];
3362
+ var _449=null;
3363
+ var _450=function(msg){
3364
+ var _451=msg.level;
3365
+ if(typeof (_451)=="number"){
3366
+ _451=MochiKit.Logging.LogLevel[_451];
3367
+ }
3368
+ return _451;
3369
+ };
3370
+ var _452=function(msg){
3371
+ return msg.info.join(" ");
3372
+ };
3373
+ var _453=bind(function(msg){
3374
+ var _454=_450(msg);
3375
+ var text=_452(msg);
3376
+ var c=this.colorTable[_454];
3377
+ var p=doc.createElement("span");
3378
+ p.className="MochiKit-LogMessage MochiKit-LogLevel-"+_454;
3379
+ p.style.cssText="margin: 0px; white-space: -moz-pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; white-space: pre-line; word-wrap: break-word; wrap-option: emergency; color: "+c;
3380
+ p.appendChild(doc.createTextNode(_454+": "+text));
3381
+ _446.appendChild(p);
3382
+ _446.appendChild(doc.createElement("br"));
3383
+ if(_445.offsetHeight>_445.scrollHeight){
3384
+ _445.scrollTop=0;
3385
+ }else{
3386
+ _445.scrollTop=_445.scrollHeight;
3387
+ }
3388
+ },this);
3389
+ var _456=function(msg){
3390
+ _448[_448.length]=msg;
3391
+ _453(msg);
3392
+ };
3393
+ var _457=function(){
3394
+ var _458,infore;
3395
+ try{
3396
+ _458=new RegExp(_439.value);
3397
+ infore=new RegExp(_440.value);
3398
+ }
3399
+ catch(e){
3400
+ logDebug("Error in filter regex: "+e.message);
3401
+ return null;
3402
+ }
3403
+ return function(msg){
3404
+ return (_458.test(_450(msg))&&infore.test(_452(msg)));
3405
+ };
3406
+ };
3407
+ var _459=function(){
3408
+ while(_446.firstChild){
3409
+ _446.removeChild(_446.firstChild);
3410
+ }
3411
+ };
3412
+ var _460=function(){
3413
+ _448=[];
3414
+ _459();
3415
+ };
3416
+ var _461=bind(function(){
3417
+ if(this.closed){
3418
+ return;
3419
+ }
3420
+ this.closed=true;
3421
+ if(MochiKit.LoggingPane._loggingPane==this){
3422
+ MochiKit.LoggingPane._loggingPane=null;
3423
+ }
3424
+ this.logger.removeListener(_447);
3425
+ _436.loggingPane=null;
3426
+ if(_429){
3427
+ _436.parentNode.removeChild(_436);
3428
+ }else{
3429
+ this.win.close();
3430
+ }
3431
+ },this);
3432
+ var _462=function(){
3433
+ _459();
3434
+ for(var i=0;i<_448.length;i++){
3435
+ var msg=_448[i];
3436
+ if(_449===null||_449(msg)){
3437
+ _453(msg);
3438
+ }
3439
+ }
3440
+ };
3441
+ this.buildAndApplyFilter=function(){
3442
+ _449=_457();
3443
+ _462();
3444
+ this.logger.removeListener(_447);
3445
+ this.logger.addListener(_447,_449,_456);
3446
+ };
3447
+ var _463=bind(function(){
3448
+ _448=this.logger.getMessages();
3449
+ _462();
3450
+ },this);
3451
+ var _464=bind(function(_465){
3452
+ _465=_465||window.event;
3453
+ key=_465.which||_465.keyCode;
3454
+ if(key==13){
3455
+ this.buildAndApplyFilter();
3456
+ }
3457
+ },this);
3458
+ var _466="display: block; z-index: 1000; left: 0px; bottom: 0px; position: fixed; width: 100%; background-color: white; font: "+this.logFont;
3459
+ if(_429){
3460
+ _466+="; height: 10em; border-top: 2px solid black";
3461
+ }else{
3462
+ _466+="; height: 100%;";
3463
+ }
3464
+ _436.style.cssText=_466;
3465
+ if(!_437){
3466
+ doc.body.appendChild(_436);
3467
+ }
3468
+ _466={"cssText":"width: 33%; display: inline; font: "+this.logFont};
3469
+ _432(_439,{"value":"FATAL|ERROR|WARNING|INFO|DEBUG","onkeypress":_464,"style":_466});
3470
+ _436.appendChild(_439);
3471
+ _432(_440,{"value":".*","onkeypress":_464,"style":_466});
3472
+ _436.appendChild(_440);
3473
+ _466="width: 8%; display:inline; font: "+this.logFont;
3474
+ _441.appendChild(doc.createTextNode("Filter"));
3475
+ _441.onclick=bind("buildAndApplyFilter",this);
3476
+ _441.style.cssText=_466;
3477
+ _436.appendChild(_441);
3478
+ _442.appendChild(doc.createTextNode("Load"));
3479
+ _442.onclick=_463;
3480
+ _442.style.cssText=_466;
3481
+ _436.appendChild(_442);
3482
+ _443.appendChild(doc.createTextNode("Clear"));
3483
+ _443.onclick=_460;
3484
+ _443.style.cssText=_466;
3485
+ _436.appendChild(_443);
3486
+ _444.appendChild(doc.createTextNode("Close"));
3487
+ _444.onclick=_461;
3488
+ _444.style.cssText=_466;
3489
+ _436.appendChild(_444);
3490
+ _445.style.cssText="overflow: auto; width: 100%";
3491
+ _446.style.cssText="width: 100%; height: "+(_429?"8em":"100%");
3492
+ _445.appendChild(_446);
3493
+ _436.appendChild(_445);
3494
+ this.buildAndApplyFilter();
3495
+ _463();
3496
+ if(_429){
3497
+ this.win=undefined;
3498
+ }else{
3499
+ this.win=win;
3500
+ }
3501
+ this.inline=_429;
3502
+ this.closePane=_461;
3503
+ this.closed=false;
3504
+ return this;
3505
+ };
3506
+ MochiKit.LoggingPane.LoggingPane.prototype={"logFont":"8pt Verdana,sans-serif","colorTable":{"ERROR":"red","FATAL":"darkred","WARNING":"blue","INFO":"black","DEBUG":"green"}};
3507
+ MochiKit.LoggingPane.EXPORT_OK=["LoggingPane"];
3508
+ MochiKit.LoggingPane.EXPORT=["createLoggingPane"];
3509
+ MochiKit.LoggingPane.__new__=function(){
3510
+ this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};
3511
+ MochiKit.Base.nameFunctions(this);
3512
+ MochiKit.LoggingPane._loggingPane=null;
3513
+ };
3514
+ MochiKit.LoggingPane.__new__();
3515
+ MochiKit.Base._exportSymbols(this,MochiKit.LoggingPane);
3516
+ if(typeof (dojo)!="undefined"){
3517
+ dojo.provide("MochiKit.Color");
3518
+ dojo.require("MochiKit.Base");
3519
+ }
3520
+ if(typeof (JSAN)!="undefined"){
3521
+ JSAN.use("MochiKit.Base",[]);
3522
+ }
3523
+ try{
3524
+ if(typeof (MochiKit.Base)=="undefined"){
3525
+ throw "";
3526
+ }
3527
+ }
3528
+ catch(e){
3529
+ throw "MochiKit.Color depends on MochiKit.Base";
3530
+ }
3531
+ if(typeof (MochiKit.Color)=="undefined"){
3532
+ MochiKit.Color={};
3533
+ }
3534
+ MochiKit.Color.NAME="MochiKit.Color";
3535
+ MochiKit.Color.VERSION="1.3";
3536
+ MochiKit.Color.__repr__=function(){
3537
+ return "["+this.NAME+" "+this.VERSION+"]";
3538
+ };
3539
+ MochiKit.Color.toString=function(){
3540
+ return this.__repr__();
3541
+ };
3542
+ MochiKit.Color.Color=function(red,_468,blue,_470){
3543
+ if(typeof (_470)=="undefined"||_470===null){
3544
+ _470=1;
3545
+ }
3546
+ this.rgb={r:red,g:_468,b:blue,a:_470};
3547
+ };
3548
+ MochiKit.Color.Color.prototype={__class__:MochiKit.Color.Color,colorWithAlpha:function(_471){
3549
+ var rgb=this.rgb;
3550
+ var m=MochiKit.Color;
3551
+ return m.Color.fromRGB(rgb.r,rgb.g,rgb.b,_471);
3552
+ },colorWithHue:function(hue){
3553
+ var hsl=this.asHSL();
3554
+ hsl.h=hue;
3555
+ var m=MochiKit.Color;
3556
+ return m.Color.fromHSL(hsl);
3557
+ },colorWithSaturation:function(_475){
3558
+ var hsl=this.asHSL();
3559
+ hsl.s=_475;
3560
+ var m=MochiKit.Color;
3561
+ return m.Color.fromHSL(hsl);
3562
+ },colorWithLightness:function(_476){
3563
+ var hsl=this.asHSL();
3564
+ hsl.l=_476;
3565
+ var m=MochiKit.Color;
3566
+ return m.Color.fromHSL(hsl);
3567
+ },darkerColorWithLevel:function(_477){
3568
+ var hsl=this.asHSL();
3569
+ hsl.l=Math.max(hsl.l-_477,0);
3570
+ var m=MochiKit.Color;
3571
+ return m.Color.fromHSL(hsl);
3572
+ },lighterColorWithLevel:function(_478){
3573
+ var hsl=this.asHSL();
3574
+ hsl.l=Math.min(hsl.l+_478,1);
3575
+ var m=MochiKit.Color;
3576
+ return m.Color.fromHSL(hsl);
3577
+ },blendedColor:function(_479,_480){
3578
+ if(typeof (_480)=="undefined"||_480===null){
3579
+ _480=0.5;
3580
+ }
3581
+ var sf=1-_480;
3582
+ var s=this.rgb;
3583
+ var d=_479.rgb;
3584
+ var df=_480;
3585
+ return MochiKit.Color.Color.fromRGB((s.r*sf)+(d.r*df),(s.g*sf)+(d.g*df),(s.b*sf)+(d.b*df),(s.a*sf)+(d.a*df));
3586
+ },compareRGB:function(_483){
3587
+ var a=this.asRGB();
3588
+ var b=_483.asRGB();
3589
+ return MochiKit.Base.compare([a.r,a.g,a.b,a.a],[b.r,b.g,b.b,b.a]);
3590
+ },isLight:function(){
3591
+ return this.asHSL().b>0.5;
3592
+ },isDark:function(){
3593
+ return (!this.isLight());
3594
+ },toHSLString:function(){
3595
+ var c=this.asHSL();
3596
+ var ccc=MochiKit.Color.clampColorComponent;
3597
+ var rval=this._hslString;
3598
+ if(!rval){
3599
+ var mid=(ccc(c.h,360).toFixed(0)+","+ccc(c.s,100).toPrecision(4)+"%"+","+ccc(c.l,100).toPrecision(4)+"%");
3600
+ var a=c.a;
3601
+ if(a>=1){
3602
+ a=1;
3603
+ rval="hsl("+mid+")";
3604
+ }else{
3605
+ if(a<=0){
3606
+ a=0;
3607
+ }
3608
+ rval="hsla("+mid+","+a+")";
3609
+ }
3610
+ this._hslString=rval;
3611
+ }
3612
+ return rval;
3613
+ },toRGBString:function(){
3614
+ var c=this.rgb;
3615
+ var ccc=MochiKit.Color.clampColorComponent;
3616
+ var rval=this._rgbString;
3617
+ if(!rval){
3618
+ var mid=(ccc(c.r,255).toFixed(0)+","+ccc(c.g,255).toFixed(0)+","+ccc(c.b,255).toFixed(0));
3619
+ if(c.a!=1){
3620
+ rval="rgba("+mid+","+c.a+")";
3621
+ }else{
3622
+ rval="rgb("+mid+")";
3623
+ }
3624
+ this._rgbString=rval;
3625
+ }
3626
+ return rval;
3627
+ },asRGB:function(){
3628
+ return MochiKit.Base.clone(this.rgb);
3629
+ },toHexString:function(){
3630
+ var m=MochiKit.Color;
3631
+ var c=this.rgb;
3632
+ var ccc=MochiKit.Color.clampColorComponent;
3633
+ var rval=this._hexString;
3634
+ if(!rval){
3635
+ rval=("#"+m.toColorPart(ccc(c.r,255))+m.toColorPart(ccc(c.g,255))+m.toColorPart(ccc(c.b,255)));
3636
+ this._hexString=rval;
3637
+ }
3638
+ return rval;
3639
+ },asHSV:function(){
3640
+ var hsv=this.hsv;
3641
+ var c=this.rgb;
3642
+ if(typeof (hsv)=="undefined"||hsv===null){
3643
+ hsv=MochiKit.Color.rgbToHSV(this.rgb);
3644
+ this.hsv=hsv;
3645
+ }
3646
+ return MochiKit.Base.clone(hsv);
3647
+ },asHSL:function(){
3648
+ var hsl=this.hsl;
3649
+ var c=this.rgb;
3650
+ if(typeof (hsl)=="undefined"||hsl===null){
3651
+ hsl=MochiKit.Color.rgbToHSL(this.rgb);
3652
+ this.hsl=hsl;
3653
+ }
3654
+ return MochiKit.Base.clone(hsl);
3655
+ },toString:function(){
3656
+ return this.toRGBString();
3657
+ },repr:function(){
3658
+ var c=this.rgb;
3659
+ var col=[c.r,c.g,c.b,c.a];
3660
+ return this.__class__.NAME+"("+col.join(", ")+")";
3661
+ }};
3662
+ MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_488,blue,_489){
3663
+ var _490=MochiKit.Color.Color;
3664
+ if(arguments.length==1){
3665
+ var rgb=red;
3666
+ red=rgb.r;
3667
+ _488=rgb.g;
3668
+ blue=rgb.b;
3669
+ if(typeof (rgb.a)=="undefined"){
3670
+ _489=undefined;
3671
+ }else{
3672
+ _489=rgb.a;
3673
+ }
3674
+ }
3675
+ return new _490(red,_488,blue,_489);
3676
+ },fromHSL:function(hue,_491,_492,_493){
3677
+ var m=MochiKit.Color;
3678
+ return m.Color.fromRGB(m.hslToRGB.apply(m,arguments));
3679
+ },fromHSV:function(hue,_494,_495,_496){
3680
+ var m=MochiKit.Color;
3681
+ return m.Color.fromRGB(m.hsvToRGB.apply(m,arguments));
3682
+ },fromName:function(name){
3683
+ var _497=MochiKit.Color.Color;
3684
+ if(name.charAt(0)=="\""){
3685
+ name=name.substr(1,name.length-2);
3686
+ }
3687
+ var _498=_497._namedColors[name.toLowerCase()];
3688
+ if(typeof (_498)=="string"){
3689
+ return _497.fromHexString(_498);
3690
+ }else{
3691
+ if(name=="transparent"){
3692
+ return _497.transparentColor();
3693
+ }
3694
+ }
3695
+ return null;
3696
+ },fromString:function(_499){
3697
+ var self=MochiKit.Color.Color;
3698
+ var _500=_499.substr(0,3);
3699
+ if(_500=="rgb"){
3700
+ return self.fromRGBString(_499);
3701
+ }else{
3702
+ if(_500=="hsl"){
3703
+ return self.fromHSLString(_499);
3704
+ }else{
3705
+ if(_499.charAt(0)=="#"){
3706
+ return self.fromHexString(_499);
3707
+ }
3708
+ }
3709
+ }
3710
+ return self.fromName(_499);
3711
+ },fromHexString:function(_501){
3712
+ if(_501.charAt(0)=="#"){
3713
+ _501=_501.substring(1);
3714
+ }
3715
+ var _502=[];
3716
+ var i,hex;
3717
+ if(_501.length==3){
3718
+ for(i=0;i<3;i++){
3719
+ hex=_501.substr(i,1);
3720
+ _502.push(parseInt(hex+hex,16)/255);
3721
+ }
3722
+ }else{
3723
+ for(i=0;i<6;i+=2){
3724
+ hex=_501.substr(i,2);
3725
+ _502.push(parseInt(hex,16)/255);
3726
+ }
3727
+ }
3728
+ var _503=MochiKit.Color.Color;
3729
+ return _503.fromRGB.apply(_503,_502);
3730
+ },_fromColorString:function(pre,_505,_506,_507){
3731
+ if(_507.indexOf(pre)===0){
3732
+ _507=_507.substring(_507.indexOf("(",3)+1,_507.length-1);
3733
+ }
3734
+ var _508=_507.split(/\s*,\s*/);
3735
+ var _509=[];
3736
+ for(var i=0;i<_508.length;i++){
3737
+ var c=_508[i];
3738
+ var val;
3739
+ var _510=c.substring(c.length-3);
3740
+ if(c.charAt(c.length-1)=="%"){
3741
+ val=0.01*parseFloat(c.substring(0,c.length-1));
3742
+ }else{
3743
+ if(_510=="deg"){
3744
+ val=parseFloat(c)/360;
3745
+ }else{
3746
+ if(_510=="rad"){
3747
+ val=parseFloat(c)/(Math.PI*2);
3748
+ }else{
3749
+ val=_506[i]*parseFloat(c);
3750
+ }
3751
+ }
3752
+ }
3753
+ _509.push(val);
3754
+ }
3755
+ return this[_505].apply(this,_509);
3756
+ },fromComputedStyle:function(elem,_511,_512){
3757
+ var d=MochiKit.DOM;
3758
+ var cls=MochiKit.Color.Color;
3759
+ for(elem=d.getElement(elem);elem;elem=elem.parentNode){
3760
+ var _513=d.computedStyle.apply(d,arguments);
3761
+ if(!_513){
3762
+ continue;
3763
+ }
3764
+ var _514=cls.fromString(_513);
3765
+ if(!_514){
3766
+ break;
3767
+ }
3768
+ if(_514.asRGB().a>0){
3769
+ return _514;
3770
+ }
3771
+ }
3772
+ return null;
3773
+ },fromBackground:function(elem){
3774
+ var cls=MochiKit.Color.Color;
3775
+ return cls.fromComputedStyle(elem,"backgroundColor","background-color")||cls.whiteColor();
3776
+ },fromText:function(elem){
3777
+ var cls=MochiKit.Color.Color;
3778
+ return cls.fromComputedStyle(elem,"color","color")||cls.blackColor();
3779
+ },namedColors:function(){
3780
+ return MochiKit.Base.clone(MochiKit.Color.Color._namedColors);
3781
+ }});
3782
+ MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_515){
3783
+ v*=_515;
3784
+ if(v<0){
3785
+ return 0;
3786
+ }else{
3787
+ if(v>_515){
3788
+ return _515;
3789
+ }else{
3790
+ return v;
3791
+ }
3792
+ }
3793
+ },_hslValue:function(n1,n2,hue){
3794
+ if(hue>6){
3795
+ hue-=6;
3796
+ }else{
3797
+ if(hue<0){
3798
+ hue+=6;
3799
+ }
3800
+ }
3801
+ var val;
3802
+ if(hue<1){
3803
+ val=n1+(n2-n1)*hue;
3804
+ }else{
3805
+ if(hue<3){
3806
+ val=n2;
3807
+ }else{
3808
+ if(hue<4){
3809
+ val=n1+(n2-n1)*(4-hue);
3810
+ }else{
3811
+ val=n1;
3812
+ }
3813
+ }
3814
+ }
3815
+ return val;
3816
+ },hsvToRGB:function(hue,_518,_519,_520){
3817
+ if(arguments.length==1){
3818
+ var hsv=hue;
3819
+ hue=hsv.h;
3820
+ _518=hsv.s;
3821
+ _519=hsv.v;
3822
+ _520=hsv.a;
3823
+ }
3824
+ var red;
3825
+ var _521;
3826
+ var blue;
3827
+ if(_518===0){
3828
+ red=0;
3829
+ _521=0;
3830
+ blue=0;
3831
+ }else{
3832
+ var i=Math.floor(hue*6);
3833
+ var f=(hue*6)-i;
3834
+ var p=_519*(1-_518);
3835
+ var q=_519*(1-(_518*f));
3836
+ var t=_519*(1-(_518*(1-f)));
3837
+ switch(i){
3838
+ case 1:
3839
+ red=q;
3840
+ _521=_519;
3841
+ blue=p;
3842
+ break;
3843
+ case 2:
3844
+ red=p;
3845
+ _521=_519;
3846
+ blue=t;
3847
+ break;
3848
+ case 3:
3849
+ red=p;
3850
+ _521=q;
3851
+ blue=_519;
3852
+ break;
3853
+ case 4:
3854
+ red=t;
3855
+ _521=p;
3856
+ blue=_519;
3857
+ break;
3858
+ case 5:
3859
+ red=_519;
3860
+ _521=p;
3861
+ blue=q;
3862
+ break;
3863
+ case 6:
3864
+ case 0:
3865
+ red=_519;
3866
+ _521=t;
3867
+ blue=p;
3868
+ break;
3869
+ }
3870
+ }
3871
+ return {r:red,g:_521,b:blue,a:_520};
3872
+ },hslToRGB:function(hue,_523,_524,_525){
3873
+ if(arguments.length==1){
3874
+ var hsl=hue;
3875
+ hue=hsl.h;
3876
+ _523=hsl.s;
3877
+ _524=hsl.l;
3878
+ _525=hsl.a;
3879
+ }
3880
+ var red;
3881
+ var _526;
3882
+ var blue;
3883
+ if(_523===0){
3884
+ red=_524;
3885
+ _526=_524;
3886
+ blue=_524;
3887
+ }else{
3888
+ var m2;
3889
+ if(_524<=0.5){
3890
+ m2=_524*(1+_523);
3891
+ }else{
3892
+ m2=_524+_523-(_524*_523);
3893
+ }
3894
+ var m1=(2*_524)-m2;
3895
+ var f=MochiKit.Color._hslValue;
3896
+ var h6=hue*6;
3897
+ red=f(m1,m2,h6+2);
3898
+ _526=f(m1,m2,h6);
3899
+ blue=f(m1,m2,h6-2);
3900
+ }
3901
+ return {r:red,g:_526,b:blue,a:_525};
3902
+ },rgbToHSV:function(red,_530,blue,_531){
3903
+ if(arguments.length==1){
3904
+ var rgb=red;
3905
+ red=rgb.r;
3906
+ _530=rgb.g;
3907
+ blue=rgb.b;
3908
+ _531=rgb.a;
3909
+ }
3910
+ var max=Math.max(Math.max(red,_530),blue);
3911
+ var min=Math.min(Math.min(red,_530),blue);
3912
+ var hue;
3913
+ var _534;
3914
+ var _535=max;
3915
+ if(min==max){
3916
+ hue=0;
3917
+ _534=0;
3918
+ }else{
3919
+ var _536=(max-min);
3920
+ _534=_536/max;
3921
+ if(red==max){
3922
+ hue=(_530-blue)/_536;
3923
+ }else{
3924
+ if(_530==max){
3925
+ hue=2+((blue-red)/_536);
3926
+ }else{
3927
+ hue=4+((red-_530)/_536);
3928
+ }
3929
+ }
3930
+ hue/=6;
3931
+ if(hue<0){
3932
+ hue+=1;
3933
+ }
3934
+ if(hue>1){
3935
+ hue-=1;
3936
+ }
3937
+ }
3938
+ return {h:hue,s:_534,v:_535,a:_531};
3939
+ },rgbToHSL:function(red,_537,blue,_538){
3940
+ if(arguments.length==1){
3941
+ var rgb=red;
3942
+ red=rgb.r;
3943
+ _537=rgb.g;
3944
+ blue=rgb.b;
3945
+ _538=rgb.a;
3946
+ }
3947
+ var max=Math.max(red,Math.max(_537,blue));
3948
+ var min=Math.min(red,Math.min(_537,blue));
3949
+ var hue;
3950
+ var _539;
3951
+ var _540=(max+min)/2;
3952
+ var _541=max-min;
3953
+ if(_541===0){
3954
+ hue=0;
3955
+ _539=0;
3956
+ }else{
3957
+ if(_540<=0.5){
3958
+ _539=_541/(max+min);
3959
+ }else{
3960
+ _539=_541/(2-max-min);
3961
+ }
3962
+ if(red==max){
3963
+ hue=(_537-blue)/_541;
3964
+ }else{
3965
+ if(_537==max){
3966
+ hue=2+((blue-red)/_541);
3967
+ }else{
3968
+ hue=4+((red-_537)/_541);
3969
+ }
3970
+ }
3971
+ hue/=6;
3972
+ if(hue<0){
3973
+ hue+=1;
3974
+ }
3975
+ if(hue>1){
3976
+ hue-=1;
3977
+ }
3978
+ }
3979
+ return {h:hue,s:_539,l:_540,a:_538};
3980
+ },toColorPart:function(num){
3981
+ num=Math.round(num);
3982
+ var _542=num.toString(16);
3983
+ if(num<16){
3984
+ return "0"+_542;
3985
+ }
3986
+ return _542;
3987
+ },__new__:function(){
3988
+ var m=MochiKit.Base;
3989
+ this.Color.fromRGBString=m.bind(this.Color._fromColorString,this.Color,"rgb","fromRGB",[1/255,1/255,1/255,1]);
3990
+ this.Color.fromHSLString=m.bind(this.Color._fromColorString,this.Color,"hsl","fromHSL",[1/360,0.01,0.01,1]);
3991
+ var _543=1/3;
3992
+ var _544={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_543,_543,_543],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_543,2*_543,2*_543],magenta:[1,0,1],orange:[1,0.5,0],purple:[0.5,0,0.5],red:[1,0,0],transparent:[0,0,0,0],white:[1,1,1],yellow:[1,1,0]};
3993
+ var _545=function(name,r,g,b,a){
3994
+ var rval=this.fromRGB(r,g,b,a);
3995
+ this[name]=function(){
3996
+ return rval;
3997
+ };
3998
+ return rval;
3999
+ };
4000
+ for(var k in _544){
4001
+ var name=k+"Color";
4002
+ var _547=m.concat([_545,this.Color,name],_544[k]);
4003
+ this.Color[name]=m.bind.apply(null,_547);
4004
+ }
4005
+ var _548=function(){
4006
+ for(var i=0;i<arguments.length;i++){
4007
+ if(!(arguments[i] instanceof Color)){
4008
+ return false;
4009
+ }
4010
+ }
4011
+ return true;
4012
+ };
4013
+ var _549=function(a,b){
4014
+ return a.compareRGB(b);
4015
+ };
4016
+ m.nameFunctions(this);
4017
+ m.registerComparator(this.Color.NAME,_548,_549);
4018
+ this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
4019
+ }});
4020
+ MochiKit.Color.EXPORT=["Color"];
4021
+ MochiKit.Color.EXPORT_OK=["clampColorComponent","rgbToHSL","hslToRGB","rgbToHSV","hsvToRGB","toColorPart"];
4022
+ MochiKit.Color.__new__();
4023
+ MochiKit.Base._exportSymbols(this,MochiKit.Color);
4024
+ MochiKit.Color.Color._namedColors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};
4025
+ if(typeof (dojo)!="undefined"){
4026
+ dojo.provide("MochiKit.Signal");
4027
+ dojo.require("MochiKit.Base");
4028
+ dojo.require("MochiKit.DOM");
4029
+ }
4030
+ if(typeof (JSAN)!="undefined"){
4031
+ JSAN.use("MochiKit.Base",[]);
4032
+ JSAN.use("MochiKit.DOM",[]);
4033
+ }
4034
+ try{
4035
+ if(typeof (MochiKit.Base)=="undefined"){
4036
+ throw "";
4037
+ }
4038
+ }
4039
+ catch(e){
4040
+ throw "MochiKit.Signal depends on MochiKit.Base!";
4041
+ }
4042
+ try{
4043
+ if(typeof (MochiKit.DOM)=="undefined"){
4044
+ throw "";
4045
+ }
4046
+ }
4047
+ catch(e){
4048
+ throw "MochiKit.Signal depends on MochiKit.DOM!";
4049
+ }
4050
+ if(typeof (MochiKit.Signal)=="undefined"){
4051
+ MochiKit.Signal={};
4052
+ }
4053
+ MochiKit.Signal.NAME="MochiKit.Signal";
4054
+ MochiKit.Signal.VERSION="1.3";
4055
+ MochiKit.Signal._observers=[];
4056
+ MochiKit.Signal.Event=function(src,e){
4057
+ this._event=e||window.event;
4058
+ this._src=src;
4059
+ };
4060
+ MochiKit.Base.update(MochiKit.Signal.Event.prototype,{__repr__:function(){
4061
+ var repr=MochiKit.Base.repr;
4062
+ var str="{event(): "+repr(this.event())+", src(): "+repr(this.src())+", type(): "+repr(this.type())+", target(): "+repr(this.target())+", modifier(): "+"{alt: "+repr(this.modifier().alt)+", ctrl: "+repr(this.modifier().ctrl)+", meta: "+repr(this.modifier().meta)+", shift: "+repr(this.modifier().shift)+", any: "+repr(this.modifier().any)+"}";
4063
+ if(this.type()&&this.type().indexOf("key")===0){
4064
+ str+=", key(): {code: "+repr(this.key().code)+", string: "+repr(this.key().string)+"}";
4065
+ }
4066
+ if(this.type()&&(this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu")){
4067
+ str+=", mouse(): {page: "+repr(this.mouse().page)+", client: "+repr(this.mouse().client);
4068
+ if(this.type()!="mousemove"){
4069
+ str+=", button: {left: "+repr(this.mouse().button.left)+", middle: "+repr(this.mouse().button.middle)+", right: "+repr(this.mouse().button.right)+"}}";
4070
+ }else{
4071
+ str+="}";
4072
+ }
4073
+ }
4074
+ if(this.type()=="mouseover"||this.type()=="mouseout"){
4075
+ str+=", relatedTarget(): "+repr(this.relatedTarget());
4076
+ }
4077
+ str+="}";
4078
+ return str;
4079
+ },toString:function(){
4080
+ return this.__repr__();
4081
+ },src:function(){
4082
+ return this._src;
4083
+ },event:function(){
4084
+ return this._event;
4085
+ },type:function(){
4086
+ return this._event.type||undefined;
4087
+ },target:function(){
4088
+ return this._event.target||this._event.srcElement;
4089
+ },relatedTarget:function(){
4090
+ if(this.type()=="mouseover"){
4091
+ return (this._event.relatedTarget||this._event.fromElement);
4092
+ }else{
4093
+ if(this.type()=="mouseout"){
4094
+ return (this._event.relatedTarget||this._event.toElement);
4095
+ }
4096
+ }
4097
+ return undefined;
4098
+ },modifier:function(){
4099
+ var m={};
4100
+ m.alt=this._event.altKey;
4101
+ m.ctrl=this._event.ctrlKey;
4102
+ m.meta=this._event.metaKey||false;
4103
+ m.shift=this._event.shiftKey;
4104
+ m.any=m.alt||m.ctrl||m.shift||m.meta;
4105
+ return m;
4106
+ },key:function(){
4107
+ var k={};
4108
+ if(this.type()&&this.type().indexOf("key")===0){
4109
+ if(this.type()=="keydown"||this.type()=="keyup"){
4110
+ k.code=this._event.keyCode;
4111
+ k.string=(MochiKit.Signal._specialKeys[k.code]||"KEY_UNKNOWN");
4112
+ return k;
4113
+ }else{
4114
+ if(this.type()=="keypress"){
4115
+ k.code=0;
4116
+ k.string="";
4117
+ if(typeof (this._event.charCode)!="undefined"&&this._event.charCode!==0&&!MochiKit.Signal._specialMacKeys[this._event.charCode]){
4118
+ k.code=this._event.charCode;
4119
+ k.string=String.fromCharCode(k.code);
4120
+ }else{
4121
+ if(this._event.keyCode&&typeof (this._event.charCode)=="undefined"){
4122
+ k.code=this._event.keyCode;
4123
+ k.string=String.fromCharCode(k.code);
4124
+ }
4125
+ }
4126
+ return k;
4127
+ }
4128
+ }
4129
+ }
4130
+ return undefined;
4131
+ },mouse:function(){
4132
+ var m={};
4133
+ var e=this._event;
4134
+ if(this.type()&&(this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu")){
4135
+ m.client=new MochiKit.DOM.Coordinates(0,0);
4136
+ if(e.clientX||e.clientY){
4137
+ m.client.x=(!e.clientX||e.clientX<0)?0:e.clientX;
4138
+ m.client.y=(!e.clientY||e.clientY<0)?0:e.clientY;
4139
+ }
4140
+ m.page=new MochiKit.DOM.Coordinates(0,0);
4141
+ if(e.pageX||e.pageY){
4142
+ m.page.x=(!e.pageX||e.pageX<0)?0:e.pageX;
4143
+ m.page.y=(!e.pageY||e.pageY<0)?0:e.pageY;
4144
+ }else{
4145
+ var de=MochiKit.DOM._document.documentElement;
4146
+ var b=MochiKit.DOM._document.body;
4147
+ m.page.x=e.clientX+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||b.clientLeft);
4148
+ m.page.y=e.clientY+(de.scrollTop||b.scrollTop)-(de.clientTop||b.clientTop);
4149
+ }
4150
+ if(this.type()!="mousemove"){
4151
+ m.button={};
4152
+ m.button.left=false;
4153
+ m.button.right=false;
4154
+ m.button.middle=false;
4155
+ if(e.which){
4156
+ m.button.left=(e.which==1);
4157
+ m.button.middle=(e.which==2);
4158
+ m.button.right=(e.which==3);
4159
+ }else{
4160
+ m.button.left=!!(e.button&1);
4161
+ m.button.right=!!(e.button&2);
4162
+ m.button.middle=!!(e.button&4);
4163
+ }
4164
+ }
4165
+ return m;
4166
+ }
4167
+ return undefined;
4168
+ },stop:function(){
4169
+ this.stopPropagation();
4170
+ this.preventDefault();
4171
+ },stopPropagation:function(){
4172
+ if(this._event.stopPropagation){
4173
+ this._event.stopPropagation();
4174
+ }else{
4175
+ this._event.cancelBubble=true;
4176
+ }
4177
+ },preventDefault:function(){
4178
+ if(this._event.preventDefault){
4179
+ this._event.preventDefault();
4180
+ }else{
4181
+ this._event.returnValue=false;
4182
+ }
4183
+ }});
4184
+ MochiKit.Signal._specialMacKeys={3:"KEY_ENTER",63289:"KEY_NUM_PAD_CLEAR",63276:"KEY_PAGE_UP",63277:"KEY_PAGE_DOWN",63275:"KEY_END",63273:"KEY_HOME",63234:"KEY_ARROW_LEFT",63232:"KEY_ARROW_UP",63235:"KEY_ARROW_RIGHT",63233:"KEY_ARROW_DOWN",63302:"KEY_INSERT",63272:"KEY_DELETE"};
4185
+ for(i=63236;i<=63242;i++){
4186
+ MochiKit.Signal._specialMacKeys[i]="KEY_F"+(i-63236+1);
4187
+ }
4188
+ MochiKit.Signal._specialKeys={8:"KEY_BACKSPACE",9:"KEY_TAB",12:"KEY_NUM_PAD_CLEAR",13:"KEY_ENTER",16:"KEY_SHIFT",17:"KEY_CTRL",18:"KEY_ALT",19:"KEY_PAUSE",20:"KEY_CAPS_LOCK",27:"KEY_ESCAPE",32:"KEY_SPACEBAR",33:"KEY_PAGE_UP",34:"KEY_PAGE_DOWN",35:"KEY_END",36:"KEY_HOME",37:"KEY_ARROW_LEFT",38:"KEY_ARROW_UP",39:"KEY_ARROW_RIGHT",40:"KEY_ARROW_DOWN",44:"KEY_PRINT_SCREEN",45:"KEY_INSERT",46:"KEY_DELETE",59:"KEY_SEMICOLON",91:"KEY_WINDOWS_LEFT",92:"KEY_WINDOWS_RIGHT",93:"KEY_SELECT",106:"KEY_NUM_PAD_ASTERISK",107:"KEY_NUM_PAD_PLUS_SIGN",109:"KEY_NUM_PAD_HYPHEN-MINUS",110:"KEY_NUM_PAD_FULL_STOP",111:"KEY_NUM_PAD_SOLIDUS",144:"KEY_NUM_LOCK",145:"KEY_SCROLL_LOCK",186:"KEY_SEMICOLON",187:"KEY_EQUALS_SIGN",188:"KEY_COMMA",189:"KEY_HYPHEN-MINUS",190:"KEY_FULL_STOP",191:"KEY_SOLIDUS",192:"KEY_GRAVE_ACCENT",219:"KEY_LEFT_SQUARE_BRACKET",220:"KEY_REVERSE_SOLIDUS",221:"KEY_RIGHT_SQUARE_BRACKET",222:"KEY_APOSTROPHE"};
4189
+ for(var i=48;i<=57;i++){
4190
+ MochiKit.Signal._specialKeys[i]="KEY_"+(i-48);
4191
+ }
4192
+ for(i=65;i<=90;i++){
4193
+ MochiKit.Signal._specialKeys[i]="KEY_"+String.fromCharCode(i);
4194
+ }
4195
+ for(i=96;i<=105;i++){
4196
+ MochiKit.Signal._specialKeys[i]="KEY_NUM_PAD_"+(i-96);
4197
+ }
4198
+ for(i=112;i<=123;i++){
4199
+ MochiKit.Signal._specialKeys[i]="KEY_F"+(i-112+1);
4200
+ }
4201
+ MochiKit.Base.update(MochiKit.Signal,{__repr__:function(){
4202
+ return "["+this.NAME+" "+this.VERSION+"]";
4203
+ },toString:function(){
4204
+ return this.__repr__();
4205
+ },_unloadCache:function(){
4206
+ var self=MochiKit.Signal;
4207
+ var _550=self._observers;
4208
+ for(var i=0;i<_550.length;i++){
4209
+ self._disconnect(_550[i]);
4210
+ }
4211
+ delete self._observers;
4212
+ try{
4213
+ window.onload=undefined;
4214
+ }
4215
+ catch(e){
4216
+ }
4217
+ try{
4218
+ window.onunload=undefined;
4219
+ }
4220
+ catch(e){
4221
+ }
4222
+ },_listener:function(src,func,obj,_551){
4223
+ var E=MochiKit.Signal.Event;
4224
+ if(!_551){
4225
+ return MochiKit.Base.bind(func,obj);
4226
+ }
4227
+ obj=obj||src;
4228
+ if(typeof (func)=="string"){
4229
+ return function(_553){
4230
+ obj[func].apply(obj,[new E(src,_553)]);
4231
+ };
4232
+ }else{
4233
+ return function(_554){
4234
+ func.apply(obj,[new E(src,_554)]);
4235
+ };
4236
+ }
4237
+ },connect:function(src,sig,_556,_557){
4238
+ src=MochiKit.DOM.getElement(src);
4239
+ var self=MochiKit.Signal;
4240
+ if(typeof (sig)!="string"){
4241
+ throw new Error("'sig' must be a string");
4242
+ }
4243
+ var obj=null;
4244
+ var func=null;
4245
+ if(typeof (_557)!="undefined"){
4246
+ obj=_556;
4247
+ func=_557;
4248
+ if(typeof (_557)=="string"){
4249
+ if(typeof (_556[_557])!="function"){
4250
+ throw new Error("'funcOrStr' must be a function on 'objOrFunc'");
4251
+ }
4252
+ }else{
4253
+ if(typeof (_557)!="function"){
4254
+ throw new Error("'funcOrStr' must be a function or string");
4255
+ }
4256
+ }
4257
+ }else{
4258
+ if(typeof (_556)!="function"){
4259
+ throw new Error("'objOrFunc' must be a function if 'funcOrStr' is not given");
4260
+ }else{
4261
+ func=_556;
4262
+ }
4263
+ }
4264
+ if(typeof (obj)=="undefined"||obj===null){
4265
+ obj=src;
4266
+ }
4267
+ var _558=!!(src.addEventListener||src.attachEvent);
4268
+ var _559=self._listener(src,func,obj,_558);
4269
+ if(src.addEventListener){
4270
+ src.addEventListener(sig.substr(2),_559,false);
4271
+ }else{
4272
+ if(src.attachEvent){
4273
+ src.attachEvent(sig,_559);
4274
+ }
4275
+ }
4276
+ var _560=[src,sig,_559,_558,_556,_557];
4277
+ self._observers.push(_560);
4278
+ return _560;
4279
+ },_disconnect:function(_561){
4280
+ if(!_561[3]){
4281
+ return;
4282
+ }
4283
+ var src=_561[0];
4284
+ var sig=_561[1];
4285
+ var _562=_561[2];
4286
+ if(src.removeEventListener){
4287
+ src.removeEventListener(sig.substr(2),_562,false);
4288
+ }else{
4289
+ if(src.detachEvent){
4290
+ src.detachEvent(sig,_562);
4291
+ }else{
4292
+ throw new Error("'src' must be a DOM element");
4293
+ }
4294
+ }
4295
+ },disconnect:function(_563){
4296
+ var self=MochiKit.Signal;
4297
+ var _564=self._observers;
4298
+ var m=MochiKit.Base;
4299
+ if(arguments.length>1){
4300
+ var src=MochiKit.DOM.getElement(arguments[0]);
4301
+ var sig=arguments[1];
4302
+ var obj=arguments[2];
4303
+ var func=arguments[3];
4304
+ for(var i=_564.length-1;i>=0;i--){
4305
+ var o=_564[i];
4306
+ if(o[0]===src&&o[1]===sig&&o[4]===obj&&o[5]===func){
4307
+ self._disconnect(o);
4308
+ _564.splice(i,1);
4309
+ return true;
4310
+ }
4311
+ }
4312
+ }else{
4313
+ var idx=m.findIdentical(_564,_563);
4314
+ if(idx>=0){
4315
+ self._disconnect(_563);
4316
+ _564.splice(idx,1);
4317
+ return true;
4318
+ }
4319
+ }
4320
+ return false;
4321
+ },disconnectAll:function(src,sig){
4322
+ src=MochiKit.DOM.getElement(src);
4323
+ var m=MochiKit.Base;
4324
+ var _565=m.flattenArguments(m.extend(null,arguments,1));
4325
+ var self=MochiKit.Signal;
4326
+ var _566=self._disconnect;
4327
+ var _567=self._observers;
4328
+ if(_565.length===0){
4329
+ for(var i=_567.length-1;i>=0;i--){
4330
+ var _568=_567[i];
4331
+ if(_568[0]===src){
4332
+ _566(_568);
4333
+ _567.splice(i,1);
4334
+ }
4335
+ }
4336
+ }else{
4337
+ var sigs={};
4338
+ for(var i=0;i<_565.length;i++){
4339
+ sigs[_565[i]]=true;
4340
+ }
4341
+ for(var i=_567.length-1;i>=0;i--){
4342
+ var _568=_567[i];
4343
+ if(_568[0]===src&&_568[1] in sigs){
4344
+ _566(_568);
4345
+ _567.splice(i,1);
4346
+ }
4347
+ }
4348
+ }
4349
+ },signal:function(src,sig){
4350
+ var _570=MochiKit.Signal._observers;
4351
+ src=MochiKit.DOM.getElement(src);
4352
+ var args=MochiKit.Base.extend(null,arguments,2);
4353
+ var _571=[];
4354
+ for(var i=0;i<_570.length;i++){
4355
+ var _572=_570[i];
4356
+ if(_572[0]===src&&_572[1]===sig){
4357
+ try{
4358
+ _572[2].apply(src,args);
4359
+ }
4360
+ catch(e){
4361
+ _571.push(e);
4362
+ }
4363
+ }
4364
+ }
4365
+ if(_571.length==1){
4366
+ throw _571[0];
4367
+ }else{
4368
+ if(_571.length>1){
4369
+ var e=new Error("Multiple errors thrown in handling 'sig', see errors property");
4370
+ e.errors=_571;
4371
+ throw e;
4372
+ }
4373
+ }
4374
+ }});
4375
+ MochiKit.Signal.EXPORT_OK=[];
4376
+ MochiKit.Signal.EXPORT=["connect","disconnect","signal","disconnectAll"];
4377
+ MochiKit.Signal.__new__=function(win){
4378
+ var m=MochiKit.Base;
4379
+ this._document=document;
4380
+ this._window=win;
4381
+ try{
4382
+ this.connect(window,"onunload",this._unloadCache);
4383
+ }
4384
+ catch(e){
4385
+ }
4386
+ this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
4387
+ m.nameFunctions(this);
4388
+ };
4389
+ MochiKit.Signal.__new__(this);
4390
+ if(!MochiKit.__compat__){
4391
+ connect=MochiKit.Signal.connect;
4392
+ disconnect=MochiKit.Signal.disconnect;
4393
+ disconnectAll=MochiKit.Signal.disconnectAll;
4394
+ signal=MochiKit.Signal.signal;
4395
+ }
4396
+ MochiKit.Base._exportSymbols(this,MochiKit.Signal);
4397
+ if(typeof (dojo)!="undefined"){
4398
+ dojo.provide("MochiKit.Visual");
4399
+ dojo.require("MochiKit.Base");
4400
+ dojo.require("MochiKit.DOM");
4401
+ dojo.require("MochiKit.Color");
4402
+ }
4403
+ if(typeof (JSAN)!="undefined"){
4404
+ JSAN.use("MochiKit.Base",[]);
4405
+ JSAN.use("MochiKit.DOM",[]);
4406
+ JSAN.use("MochiKit.Color",[]);
4407
+ }
4408
+ try{
4409
+ if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.DOM)=="undefined"||typeof (MochiKit.Color)=="undefined"){
4410
+ throw "";
4411
+ }
4412
+ }
4413
+ catch(e){
4414
+ throw "MochiKit.Visual depends on MochiKit.Base, MochiKit.DOM and MochiKit.Color!";
4415
+ }
4416
+ if(typeof (MochiKit.Visual)=="undefined"){
4417
+ MochiKit.Visual={};
4418
+ }
4419
+ MochiKit.Visual.NAME="MochiKit.Visual";
4420
+ MochiKit.Visual.VERSION="1.3";
4421
+ MochiKit.Visual.__repr__=function(){
4422
+ return "["+this.NAME+" "+this.VERSION+"]";
4423
+ };
4424
+ MochiKit.Visual.toString=function(){
4425
+ return this.__repr__();
4426
+ };
4427
+ MochiKit.Visual._RoundCorners=function(e,_573){
4428
+ e=MochiKit.DOM.getElement(e);
4429
+ this._setOptions(_573);
4430
+ if(this.options.__unstable__wrapElement){
4431
+ e=this._doWrap(e);
4432
+ }
4433
+ var _574=this.options.color;
4434
+ var C=MochiKit.Color.Color;
4435
+ if(this.options.color=="fromElement"){
4436
+ _574=C.fromBackground(e);
4437
+ }else{
4438
+ if(!(_574 instanceof C)){
4439
+ _574=C.fromString(_574);
4440
+ }
4441
+ }
4442
+ this.isTransparent=(_574.asRGB().a<=0);
4443
+ var _576=this.options.bgColor;
4444
+ if(this.options.bgColor=="fromParent"){
4445
+ _576=C.fromBackground(e.offsetParent);
4446
+ }else{
4447
+ if(!(_576 instanceof C)){
4448
+ _576=C.fromString(_576);
4449
+ }
4450
+ }
4451
+ this._roundCornersImpl(e,_574,_576);
4452
+ };
4453
+ MochiKit.Visual._RoundCorners.prototype={_doWrap:function(e){
4454
+ var _577=e.parentNode;
4455
+ var doc=MochiKit.DOM.currentDocument();
4456
+ if(typeof (doc.defaultView)=="undefined"||doc.defaultView===null){
4457
+ return e;
4458
+ }
4459
+ var _578=doc.defaultView.getComputedStyle(e,null);
4460
+ if(typeof (_578)=="undefined"||_578===null){
4461
+ return e;
4462
+ }
4463
+ var _579=MochiKit.DOM.DIV({"style":{display:"block",marginTop:_578.getPropertyValue("padding-top"),marginRight:_578.getPropertyValue("padding-right"),marginBottom:_578.getPropertyValue("padding-bottom"),marginLeft:_578.getPropertyValue("padding-left"),padding:"0px"}});
4464
+ _579.innerHTML=e.innerHTML;
4465
+ e.innerHTML="";
4466
+ e.appendChild(_579);
4467
+ return e;
4468
+ },_roundCornersImpl:function(e,_580,_581){
4469
+ if(this.options.border){
4470
+ this._renderBorder(e,_581);
4471
+ }
4472
+ if(this._isTopRounded()){
4473
+ this._roundTopCorners(e,_580,_581);
4474
+ }
4475
+ if(this._isBottomRounded()){
4476
+ this._roundBottomCorners(e,_580,_581);
4477
+ }
4478
+ },_renderBorder:function(el,_582){
4479
+ var _583="1px solid "+this._borderColor(_582);
4480
+ var _584="border-left: "+_583;
4481
+ var _585="border-right: "+_583;
4482
+ var _586="style='"+_584+";"+_585+"'";
4483
+ el.innerHTML="<div "+_586+">"+el.innerHTML+"</div>";
4484
+ },_roundTopCorners:function(el,_587,_588){
4485
+ var _589=this._createCorner(_588);
4486
+ for(var i=0;i<this.options.numSlices;i++){
4487
+ _589.appendChild(this._createCornerSlice(_587,_588,i,"top"));
4488
+ }
4489
+ el.style.paddingTop=0;
4490
+ el.insertBefore(_589,el.firstChild);
4491
+ },_roundBottomCorners:function(el,_590,_591){
4492
+ var _592=this._createCorner(_591);
4493
+ for(var i=(this.options.numSlices-1);i>=0;i--){
4494
+ _592.appendChild(this._createCornerSlice(_590,_591,i,"bottom"));
4495
+ }
4496
+ el.style.paddingBottom=0;
4497
+ el.appendChild(_592);
4498
+ },_createCorner:function(_593){
4499
+ var dom=MochiKit.DOM;
4500
+ return dom.DIV({style:{backgroundColor:_593.toString()}});
4501
+ },_createCornerSlice:function(_594,_595,n,_596){
4502
+ var _597=MochiKit.DOM.SPAN();
4503
+ var _598=_597.style;
4504
+ _598.backgroundColor=_594.toString();
4505
+ _598.display="block";
4506
+ _598.height="1px";
4507
+ _598.overflow="hidden";
4508
+ _598.fontSize="1px";
4509
+ var _599=this._borderColor(_594,_595);
4510
+ if(this.options.border&&n===0){
4511
+ _598.borderTopStyle="solid";
4512
+ _598.borderTopWidth="1px";
4513
+ _598.borderLeftWidth="0px";
4514
+ _598.borderRightWidth="0px";
4515
+ _598.borderBottomWidth="0px";
4516
+ _598.height="0px";
4517
+ _598.borderColor=_599.toString();
4518
+ }else{
4519
+ if(_599){
4520
+ _598.borderColor=_599.toString();
4521
+ _598.borderStyle="solid";
4522
+ _598.borderWidth="0px 1px";
4523
+ }
4524
+ }
4525
+ if(!this.options.compact&&(n==(this.options.numSlices-1))){
4526
+ _598.height="2px";
4527
+ }
4528
+ this._setMargin(_597,n,_596);
4529
+ this._setBorder(_597,n,_596);
4530
+ return _597;
4531
+ },_setOptions:function(_600){
4532
+ this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false,__unstable__wrapElement:false};
4533
+ MochiKit.Base.update(this.options,_600);
4534
+ this.options.numSlices=(this.options.compact?2:4);
4535
+ },_whichSideTop:function(){
4536
+ var _601=this.options.corners;
4537
+ if(this._hasString(_601,"all","top")){
4538
+ return "";
4539
+ }
4540
+ var _602=(_601.indexOf("tl")!=-1);
4541
+ var _603=(_601.indexOf("tr")!=-1);
4542
+ if(_602&&_603){
4543
+ return "";
4544
+ }
4545
+ if(_602){
4546
+ return "left";
4547
+ }
4548
+ if(_603){
4549
+ return "right";
4550
+ }
4551
+ return "";
4552
+ },_whichSideBottom:function(){
4553
+ var _604=this.options.corners;
4554
+ if(this._hasString(_604,"all","bottom")){
4555
+ return "";
4556
+ }
4557
+ var _605=(_604.indexOf("bl")!=-1);
4558
+ var _606=(_604.indexOf("br")!=-1);
4559
+ if(_605&&_606){
4560
+ return "";
4561
+ }
4562
+ if(_605){
4563
+ return "left";
4564
+ }
4565
+ if(_606){
4566
+ return "right";
4567
+ }
4568
+ return "";
4569
+ },_borderColor:function(_607,_608){
4570
+ if(_607=="transparent"){
4571
+ return _608;
4572
+ }else{
4573
+ if(this.options.border){
4574
+ return this.options.border;
4575
+ }else{
4576
+ if(this.options.blend){
4577
+ return _608.blendedColor(_607);
4578
+ }
4579
+ }
4580
+ }
4581
+ return "";
4582
+ },_setMargin:function(el,n,_609){
4583
+ var _610=this._marginSize(n)+"px";
4584
+ var _611=(_609=="top"?this._whichSideTop():this._whichSideBottom());
4585
+ var _612=el.style;
4586
+ if(_611=="left"){
4587
+ _612.marginLeft=_610;
4588
+ _612.marginRight="0px";
4589
+ }else{
4590
+ if(_611=="right"){
4591
+ _612.marginRight=_610;
4592
+ _612.marginLeft="0px";
4593
+ }else{
4594
+ _612.marginLeft=_610;
4595
+ _612.marginRight=_610;
4596
+ }
4597
+ }
4598
+ },_setBorder:function(el,n,_613){
4599
+ var _614=this._borderSize(n)+"px";
4600
+ var _615=(_613=="top"?this._whichSideTop():this._whichSideBottom());
4601
+ var _616=el.style;
4602
+ if(_615=="left"){
4603
+ _616.borderLeftWidth=_614;
4604
+ _616.borderRightWidth="0px";
4605
+ }else{
4606
+ if(_615=="right"){
4607
+ _616.borderRightWidth=_614;
4608
+ _616.borderLeftWidth="0px";
4609
+ }else{
4610
+ _616.borderLeftWidth=_614;
4611
+ _616.borderRightWidth=_614;
4612
+ }
4613
+ }
4614
+ },_marginSize:function(n){
4615
+ if(this.isTransparent){
4616
+ return 0;
4617
+ }
4618
+ var o=this.options;
4619
+ if(o.compact&&o.blend){
4620
+ var _617=[1,0];
4621
+ return _617[n];
4622
+ }else{
4623
+ if(o.compact){
4624
+ var _618=[2,1];
4625
+ return _618[n];
4626
+ }else{
4627
+ if(o.blend){
4628
+ var _619=[3,2,1,0];
4629
+ return _619[n];
4630
+ }else{
4631
+ var _620=[5,3,2,1];
4632
+ return _620[n];
4633
+ }
4634
+ }
4635
+ }
4636
+ },_borderSize:function(n){
4637
+ var o=this.options;
4638
+ var _621;
4639
+ if(o.compact&&(o.blend||this.isTransparent)){
4640
+ return 1;
4641
+ }else{
4642
+ if(o.compact){
4643
+ _621=[1,0];
4644
+ }else{
4645
+ if(o.blend){
4646
+ _621=[2,1,1,1];
4647
+ }else{
4648
+ if(o.border){
4649
+ _621=[0,2,0,0];
4650
+ }else{
4651
+ if(this.isTransparent){
4652
+ _621=[5,3,2,1];
4653
+ }else{
4654
+ return 0;
4655
+ }
4656
+ }
4657
+ }
4658
+ }
4659
+ }
4660
+ return _621[n];
4661
+ },_hasString:function(str){
4662
+ for(var i=1;i<arguments.length;i++){
4663
+ if(str.indexOf(arguments[i])!=-1){
4664
+ return true;
4665
+ }
4666
+ }
4667
+ return false;
4668
+ },_isTopRounded:function(){
4669
+ return this._hasString(this.options.corners,"all","top","tl","tr");
4670
+ },_isBottomRounded:function(){
4671
+ return this._hasString(this.options.corners,"all","bottom","bl","br");
4672
+ },_hasSingleTextChild:function(el){
4673
+ return (el.childNodes.length==1&&el.childNodes[0].nodeType==3);
4674
+ }};
4675
+ MochiKit.Visual.roundElement=function(e,_622){
4676
+ new MochiKit.Visual._RoundCorners(e,_622);
4677
+ };
4678
+ MochiKit.Visual.roundClass=function(_623,_624,_625){
4679
+ var _626=MochiKit.DOM.getElementsByTagAndClassName(_623,_624);
4680
+ for(var i=0;i<_626.length;i++){
4681
+ MochiKit.Visual.roundElement(_626[i],_625);
4682
+ }
4683
+ };
4684
+ MochiKit.Visual.Color=MochiKit.Color.Color;
4685
+ MochiKit.Visual.getElementsComputedStyle=MochiKit.DOM.computedStyle;
4686
+ MochiKit.Visual.__new__=function(){
4687
+ var m=MochiKit.Base;
4688
+ m.nameFunctions(this);
4689
+ this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
4690
+ };
4691
+ MochiKit.Visual.EXPORT=["roundElement","roundClass"];
4692
+ MochiKit.Visual.EXPORT_OK=[];
4693
+ MochiKit.Visual.__new__();
4694
+ MochiKit.Base._exportSymbols(this,MochiKit.Visual);
4695
+ if(typeof (MochiKit)=="undefined"){
4696
+ MochiKit={};
4697
+ }
4698
+ if(typeof (MochiKit.MochiKit)=="undefined"){
4699
+ MochiKit.MochiKit={};
4700
+ }
4701
+ MochiKit.MochiKit.NAME="MochiKit.MochiKit";
4702
+ MochiKit.MochiKit.VERSION="1.3";
4703
+ MochiKit.MochiKit.__repr__=function(){
4704
+ return "["+this.NAME+" "+this.VERSION+"]";
4705
+ };
4706
+ MochiKit.MochiKit.toString=function(){
4707
+ return this.__repr__();
4708
+ };
4709
+ MochiKit.MochiKit.SUBMODULES=["Base","Iter","Logging","DateTime","Format","Async","DOM","LoggingPane","Color","Signal","Visual"];
4710
+ if(typeof (JSAN)!="undefined"||typeof (dojo)!="undefined"){
4711
+ if(typeof (dojo)!="undefined"){
4712
+ dojo.provide("MochiKit.MochiKit");
4713
+ dojo.require("MochiKit.*");
4714
+ }
4715
+ if(typeof (JSAN)!="undefined"){
4716
+ JSAN.use("MochiKit.Base",[]);
4717
+ JSAN.use("MochiKit.Iter",[]);
4718
+ JSAN.use("MochiKit.Logging",[]);
4719
+ JSAN.use("MochiKit.DateTime",[]);
4720
+ JSAN.use("MochiKit.Format",[]);
4721
+ JSAN.use("MochiKit.Async",[]);
4722
+ JSAN.use("MochiKit.DOM",[]);
4723
+ JSAN.use("MochiKit.LoggingPane",[]);
4724
+ JSAN.use("MochiKit.Color",[]);
4725
+ JSAN.use("MochiKit.Signal",[]);
4726
+ JSAN.use("MochiKit.Visual",[]);
4727
+ }
4728
+ (function(){
4729
+ var _627=MochiKit.Base.extend;
4730
+ var self=MochiKit.MochiKit;
4731
+ var _628=self.SUBMODULES;
4732
+ var _629=[];
4733
+ var _630=[];
4734
+ var _631={};
4735
+ var i,k,m,all;
4736
+ for(i=0;i<_628.length;i++){
4737
+ m=MochiKit[_628[i]];
4738
+ _627(_629,m.EXPORT);
4739
+ _627(_630,m.EXPORT_OK);
4740
+ for(k in m.EXPORT_TAGS){
4741
+ _631[k]=_627(_631[k],m.EXPORT_TAGS[k]);
4742
+ }
4743
+ all=m.EXPORT_TAGS[":all"];
4744
+ if(!all){
4745
+ all=_627(null,m.EXPORT,m.EXPORT_OK);
4746
+ }
4747
+ var j;
4748
+ for(j=0;j<all.length;j++){
4749
+ k=all[j];
4750
+ self[k]=m[k];
4751
+ }
4752
+ }
4753
+ self.EXPORT=_629;
4754
+ self.EXPORT_OK=_630;
4755
+ self.EXPORT_TAGS=_631;
4756
+ }());
4757
+ }else{
4758
+ if(typeof (MochiKit.__compat__)=="undefined"){
4759
+ MochiKit.__compat__=true;
4760
+ }
4761
+ (function(){
4762
+ var _632=document.getElementsByTagName("script");
4763
+ var _633="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
4764
+ var base=null;
4765
+ var _634=null;
4766
+ var _635={};
4767
+ var i;
4768
+ for(i=0;i<_632.length;i++){
4769
+ var src=_632[i].getAttribute("src");
4770
+ if(!src){
4771
+ continue;
4772
+ }
4773
+ _635[src]=true;
4774
+ if(src.match(/MochiKit.js$/)){
4775
+ base=src.substring(0,src.lastIndexOf("MochiKit.js"));
4776
+ _634=_632[i];
4777
+ }
4778
+ }
4779
+ if(base===null){
4780
+ return;
4781
+ }
4782
+ var _636=MochiKit.MochiKit.SUBMODULES;
4783
+ for(var i=0;i<_636.length;i++){
4784
+ if(MochiKit[_636[i]]){
4785
+ continue;
4786
+ }
4787
+ var uri=base+_636[i]+".js";
4788
+ if(uri in _635){
4789
+ continue;
4790
+ }
4791
+ if(document.documentElement&&document.documentElement.namespaceURI==_633){
4792
+ var s=document.createElementNS(_633,"script");
4793
+ s.setAttribute("id","MochiKit_"+base+_636[i]);
4794
+ s.setAttribute("src",uri);
4795
+ s.setAttribute("type","application/x-javascript");
4796
+ _634.parentNode.appendChild(s);
4797
+ }else{
4798
+ document.write("<script src=\""+uri+"\" type=\"text/javascript\"></script>");
4799
+ }
4800
+ }
4801
+ })();
4802
+ }
4803
+
4804
+