bootstrapped-rails 1.1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. data/.DS_Store +0 -0
  2. data/.gitignore +4 -0
  3. data/Gemfile +4 -0
  4. data/Rakefile +1 -0
  5. data/bootstrapped-rails.gemspec +24 -0
  6. data/lib/.DS_Store +0 -0
  7. data/lib/bootstrapped-rails.rb +11 -0
  8. data/lib/bootstrapped-rails/.DS_Store +0 -0
  9. data/lib/bootstrapped-rails/engine.rb +6 -0
  10. data/lib/bootstrapped-rails/ie_hex_str.rb +16 -0
  11. data/lib/bootstrapped-rails/railtie.rb +6 -0
  12. data/lib/bootstrapped-rails/version.rb +5 -0
  13. data/vendor/.DS_Store +0 -0
  14. data/vendor/images/.DS_Store +0 -0
  15. data/vendor/images/glyphicons-halflings-white.png +0 -0
  16. data/vendor/images/glyphicons-halflings.png +0 -0
  17. data/vendor/javascripts/.DS_Store +0 -0
  18. data/vendor/javascripts/bootstrapped.js +1 -0
  19. data/vendor/javascripts/bootstrapped/.DS_Store +0 -0
  20. data/vendor/javascripts/bootstrapped/bootstrap-alert.js +91 -0
  21. data/vendor/javascripts/bootstrapped/bootstrap-button.js +98 -0
  22. data/vendor/javascripts/bootstrapped/bootstrap-carousel.js +154 -0
  23. data/vendor/javascripts/bootstrapped/bootstrap-collapse.js +136 -0
  24. data/vendor/javascripts/bootstrapped/bootstrap-dropdown.js +92 -0
  25. data/vendor/javascripts/bootstrapped/bootstrap-modal.js +209 -0
  26. data/vendor/javascripts/bootstrapped/bootstrap-popover.js +95 -0
  27. data/vendor/javascripts/bootstrapped/bootstrap-scrollspy.js +125 -0
  28. data/vendor/javascripts/bootstrapped/bootstrap-tab.js +130 -0
  29. data/vendor/javascripts/bootstrapped/bootstrap-tooltip.js +270 -0
  30. data/vendor/javascripts/bootstrapped/bootstrap-transition.js +51 -0
  31. data/vendor/javascripts/bootstrapped/bootstrap-typeahead.js +271 -0
  32. data/vendor/stylesheets/.DS_Store +0 -0
  33. data/vendor/stylesheets/bootstrapped-rails.css +3 -0
  34. data/vendor/stylesheets/bootstrapped/.DS_Store +0 -0
  35. data/vendor/stylesheets/bootstrapped/accordion.scss +28 -0
  36. data/vendor/stylesheets/bootstrapped/alerts.scss +70 -0
  37. data/vendor/stylesheets/bootstrapped/bootstrap.scss +62 -0
  38. data/vendor/stylesheets/bootstrapped/breadcrumbs.scss +22 -0
  39. data/vendor/stylesheets/bootstrapped/button-groups.scss +147 -0
  40. data/vendor/stylesheets/bootstrapped/buttons.scss +183 -0
  41. data/vendor/stylesheets/bootstrapped/carousel.scss +121 -0
  42. data/vendor/stylesheets/bootstrapped/close.scss +18 -0
  43. data/vendor/stylesheets/bootstrapped/code.scss +44 -0
  44. data/vendor/stylesheets/bootstrapped/component-animations.scss +18 -0
  45. data/vendor/stylesheets/bootstrapped/dropdowns.scss +131 -0
  46. data/vendor/stylesheets/bootstrapped/forms.scss +516 -0
  47. data/vendor/stylesheets/bootstrapped/grid.scss +8 -0
  48. data/vendor/stylesheets/bootstrapped/hero-unit.scss +20 -0
  49. data/vendor/stylesheets/bootstrapped/labels.scss +16 -0
  50. data/vendor/stylesheets/bootstrapped/layouts.scss +17 -0
  51. data/vendor/stylesheets/bootstrapped/mixins.scss +511 -0
  52. data/vendor/stylesheets/bootstrapped/modals.scss +72 -0
  53. data/vendor/stylesheets/bootstrapped/navbar.scss +292 -0
  54. data/vendor/stylesheets/bootstrapped/navs.scss +344 -0
  55. data/vendor/stylesheets/bootstrapped/pager.scss +30 -0
  56. data/vendor/stylesheets/bootstrapped/pagination.scss +55 -0
  57. data/vendor/stylesheets/bootstrapped/popovers.scss +49 -0
  58. data/vendor/stylesheets/bootstrapped/progress-bars.scss +95 -0
  59. data/vendor/stylesheets/bootstrapped/reset.scss +126 -0
  60. data/vendor/stylesheets/bootstrapped/responsive.scss +323 -0
  61. data/vendor/stylesheets/bootstrapped/scaffolding.scss +29 -0
  62. data/vendor/stylesheets/bootstrapped/sprites.scss +158 -0
  63. data/vendor/stylesheets/bootstrapped/tables.scss +130 -0
  64. data/vendor/stylesheets/bootstrapped/thumbnails.scss +35 -0
  65. data/vendor/stylesheets/bootstrapped/tooltip.scss +35 -0
  66. data/vendor/stylesheets/bootstrapped/type.scss +217 -0
  67. data/vendor/stylesheets/bootstrapped/utilities.scss +23 -0
  68. data/vendor/stylesheets/bootstrapped/variables.scss +99 -0
  69. data/vendor/stylesheets/bootstrapped/wells.scss +17 -0
  70. data/vendor/twitter/.gitignore +33 -0
  71. data/vendor/twitter/LICENSE +13 -0
  72. data/vendor/twitter/Makefile +59 -0
  73. data/vendor/twitter/README.md +94 -0
  74. data/vendor/twitter/docs/assets/bootstrap.zip +0 -0
  75. data/vendor/twitter/docs/assets/css/bootstrap-responsive.css +567 -0
  76. data/vendor/twitter/docs/assets/css/bootstrap.css +3365 -0
  77. data/vendor/twitter/docs/assets/css/docs.css +790 -0
  78. data/vendor/twitter/docs/assets/ico/bootstrap-apple-114x114.png +0 -0
  79. data/vendor/twitter/docs/assets/ico/bootstrap-apple-57x57.png +0 -0
  80. data/vendor/twitter/docs/assets/ico/bootstrap-apple-72x72.png +0 -0
  81. data/vendor/twitter/docs/assets/ico/favicon.ico +0 -0
  82. data/vendor/twitter/docs/assets/img/bird.png +0 -0
  83. data/vendor/twitter/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg +0 -0
  84. data/vendor/twitter/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg +0 -0
  85. data/vendor/twitter/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg +0 -0
  86. data/vendor/twitter/docs/assets/img/browsers.png +0 -0
  87. data/vendor/twitter/docs/assets/img/example-diagram-01.png +0 -0
  88. data/vendor/twitter/docs/assets/img/example-diagram-02.png +0 -0
  89. data/vendor/twitter/docs/assets/img/example-diagram-03.png +0 -0
  90. data/vendor/twitter/docs/assets/img/example-sites/bartop.png +0 -0
  91. data/vendor/twitter/docs/assets/img/example-sites/fleetio.png +0 -0
  92. data/vendor/twitter/docs/assets/img/example-sites/jshint.png +0 -0
  93. data/vendor/twitter/docs/assets/img/example-sites/kippt.png +0 -0
  94. data/vendor/twitter/docs/assets/img/example-sites/railwayjs.png +0 -0
  95. data/vendor/twitter/docs/assets/img/example-sites/totalwireframe.png +0 -0
  96. data/vendor/twitter/docs/assets/img/examples/bootstrap-example-fluid.jpg +0 -0
  97. data/vendor/twitter/docs/assets/img/examples/bootstrap-example-hero.jpg +0 -0
  98. data/vendor/twitter/docs/assets/img/examples/bootstrap-example-starter.jpg +0 -0
  99. data/vendor/twitter/docs/assets/img/github-16px.png +0 -0
  100. data/vendor/twitter/docs/assets/img/glyphicons-halflings-white.png +0 -0
  101. data/vendor/twitter/docs/assets/img/glyphicons-halflings.png +0 -0
  102. data/vendor/twitter/docs/assets/img/glyphicons/glyphicons_009_magic.png +0 -0
  103. data/vendor/twitter/docs/assets/img/glyphicons/glyphicons_042_group.png +0 -0
  104. data/vendor/twitter/docs/assets/img/glyphicons/glyphicons_079_podium.png +0 -0
  105. data/vendor/twitter/docs/assets/img/glyphicons/glyphicons_082_roundabout.png +0 -0
  106. data/vendor/twitter/docs/assets/img/glyphicons/glyphicons_155_show_thumbnails.png +0 -0
  107. data/vendor/twitter/docs/assets/img/glyphicons/glyphicons_163_iphone.png +0 -0
  108. data/vendor/twitter/docs/assets/img/glyphicons/glyphicons_214_resize_small.png +0 -0
  109. data/vendor/twitter/docs/assets/img/glyphicons/glyphicons_266_book_open.png +0 -0
  110. data/vendor/twitter/docs/assets/img/grid-18px-masked.png +0 -0
  111. data/vendor/twitter/docs/assets/img/icon-css3.png +0 -0
  112. data/vendor/twitter/docs/assets/img/icon-github.png +0 -0
  113. data/vendor/twitter/docs/assets/img/icon-html5.png +0 -0
  114. data/vendor/twitter/docs/assets/img/icon-twitter.png +0 -0
  115. data/vendor/twitter/docs/assets/img/less-logo-large.png +0 -0
  116. data/vendor/twitter/docs/assets/img/less-small.png +0 -0
  117. data/vendor/twitter/docs/assets/img/responsive-illustrations.png +0 -0
  118. data/vendor/twitter/docs/assets/js/README.md +106 -0
  119. data/vendor/twitter/docs/assets/js/application.js +180 -0
  120. data/vendor/twitter/docs/assets/js/bootstrap-alert.js +91 -0
  121. data/vendor/twitter/docs/assets/js/bootstrap-button.js +98 -0
  122. data/vendor/twitter/docs/assets/js/bootstrap-carousel.js +154 -0
  123. data/vendor/twitter/docs/assets/js/bootstrap-collapse.js +136 -0
  124. data/vendor/twitter/docs/assets/js/bootstrap-dropdown.js +92 -0
  125. data/vendor/twitter/docs/assets/js/bootstrap-modal.js +209 -0
  126. data/vendor/twitter/docs/assets/js/bootstrap-popover.js +95 -0
  127. data/vendor/twitter/docs/assets/js/bootstrap-scrollspy.js +125 -0
  128. data/vendor/twitter/docs/assets/js/bootstrap-tab.js +130 -0
  129. data/vendor/twitter/docs/assets/js/bootstrap-tooltip.js +270 -0
  130. data/vendor/twitter/docs/assets/js/bootstrap-transition.js +51 -0
  131. data/vendor/twitter/docs/assets/js/bootstrap-typeahead.js +271 -0
  132. data/vendor/twitter/docs/assets/js/google-code-prettify/prettify.css +30 -0
  133. data/vendor/twitter/docs/assets/js/google-code-prettify/prettify.js +28 -0
  134. data/vendor/twitter/docs/assets/js/jquery.js +9252 -0
  135. data/vendor/twitter/docs/base-css.html +1582 -0
  136. data/vendor/twitter/docs/build/index.js +33 -0
  137. data/vendor/twitter/docs/build/node_modules/.bin/hulk +93 -0
  138. data/vendor/twitter/docs/build/node_modules/hogan.js/.git_ignore +1 -0
  139. data/vendor/twitter/docs/build/node_modules/hogan.js/.gitmodules +3 -0
  140. data/vendor/twitter/docs/build/node_modules/hogan.js/LICENSE +177 -0
  141. data/vendor/twitter/docs/build/node_modules/hogan.js/Makefile +62 -0
  142. data/vendor/twitter/docs/build/node_modules/hogan.js/README.md +93 -0
  143. data/vendor/twitter/docs/build/node_modules/hogan.js/bin/hulk +93 -0
  144. data/vendor/twitter/docs/build/node_modules/hogan.js/lib/compiler.js +348 -0
  145. data/vendor/twitter/docs/build/node_modules/hogan.js/lib/hogan.js +20 -0
  146. data/vendor/twitter/docs/build/node_modules/hogan.js/lib/template.js +233 -0
  147. data/vendor/twitter/docs/build/node_modules/hogan.js/package.json +20 -0
  148. data/vendor/twitter/docs/build/node_modules/hogan.js/test/html/list.html +8 -0
  149. data/vendor/twitter/docs/build/node_modules/hogan.js/test/index.html +13 -0
  150. data/vendor/twitter/docs/build/node_modules/hogan.js/test/index.js +848 -0
  151. data/vendor/twitter/docs/build/node_modules/hogan.js/test/mustache.js +90 -0
  152. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec.js +77 -0
  153. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/Changes +31 -0
  154. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/README.md +65 -0
  155. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/Rakefile +27 -0
  156. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/TESTING.md +46 -0
  157. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/comments.json +1 -0
  158. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/comments.yml +103 -0
  159. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.json +1 -0
  160. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.yml +158 -0
  161. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.json +1 -0
  162. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.yml +230 -0
  163. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/inverted.json +1 -0
  164. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/inverted.yml +193 -0
  165. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/partials.json +1 -0
  166. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/partials.yml +109 -0
  167. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/sections.json +1 -0
  168. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/sections.yml +256 -0
  169. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.json +1 -0
  170. data/vendor/twitter/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.yml +149 -0
  171. data/vendor/twitter/docs/build/node_modules/hogan.js/test/templates/list.mustache +8 -0
  172. data/vendor/twitter/docs/build/node_modules/hogan.js/tools/release.js +74 -0
  173. data/vendor/twitter/docs/build/node_modules/hogan.js/tools/web_templates.js +32 -0
  174. data/vendor/twitter/docs/build/node_modules/hogan.js/web/1.0.0/hogan.js +500 -0
  175. data/vendor/twitter/docs/build/node_modules/hogan.js/web/1.0.0/hogan.min.js +14 -0
  176. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.js +500 -0
  177. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.min.js +14 -0
  178. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.js +545 -0
  179. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.min.js +5 -0
  180. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.amd.js +576 -0
  181. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.common.js +576 -0
  182. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.js +572 -0
  183. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.amd.js +5 -0
  184. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.common.js +5 -0
  185. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.js +5 -0
  186. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.mustache.js +5 -0
  187. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.mustache.js +619 -0
  188. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.js +233 -0
  189. data/vendor/twitter/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.min.js +5 -0
  190. data/vendor/twitter/docs/build/node_modules/hogan.js/web/favicon.ico +0 -0
  191. data/vendor/twitter/docs/build/node_modules/hogan.js/web/images/logo.png +0 -0
  192. data/vendor/twitter/docs/build/node_modules/hogan.js/web/images/noise.png +0 -0
  193. data/vendor/twitter/docs/build/node_modules/hogan.js/web/images/small-hogan-icon.png +0 -0
  194. data/vendor/twitter/docs/build/node_modules/hogan.js/web/images/stripes.png +0 -0
  195. data/vendor/twitter/docs/build/node_modules/hogan.js/web/index.html.mustache +139 -0
  196. data/vendor/twitter/docs/build/node_modules/hogan.js/web/stylesheets/layout.css +206 -0
  197. data/vendor/twitter/docs/build/node_modules/hogan.js/web/stylesheets/skeleton.css +236 -0
  198. data/vendor/twitter/docs/build/node_modules/hogan.js/wrappers/amd.js.mustache +21 -0
  199. data/vendor/twitter/docs/build/node_modules/hogan.js/wrappers/common.js.mustache +21 -0
  200. data/vendor/twitter/docs/build/node_modules/hogan.js/wrappers/js.mustache +17 -0
  201. data/vendor/twitter/docs/build/node_modules/hogan.js/wrappers/mustache.js.mustache +64 -0
  202. data/vendor/twitter/docs/build/package.json +6 -0
  203. data/vendor/twitter/docs/components.html +1517 -0
  204. data/vendor/twitter/docs/download.html +362 -0
  205. data/vendor/twitter/docs/examples.html +145 -0
  206. data/vendor/twitter/docs/examples/fluid.html +150 -0
  207. data/vendor/twitter/docs/examples/hero.html +107 -0
  208. data/vendor/twitter/docs/examples/starter-template.html +77 -0
  209. data/vendor/twitter/docs/index.html +249 -0
  210. data/vendor/twitter/docs/javascript.html +1465 -0
  211. data/vendor/twitter/docs/less.html +795 -0
  212. data/vendor/twitter/docs/scaffolding.html +438 -0
  213. data/vendor/twitter/docs/templates/layout.mustache +132 -0
  214. data/vendor/twitter/docs/templates/pages/base-css.mustache +1468 -0
  215. data/vendor/twitter/docs/templates/pages/components.mustache +1403 -0
  216. data/vendor/twitter/docs/templates/pages/download.mustache +248 -0
  217. data/vendor/twitter/docs/templates/pages/examples.mustache +31 -0
  218. data/vendor/twitter/docs/templates/pages/index.mustache +136 -0
  219. data/vendor/twitter/docs/templates/pages/javascript.mustache +1352 -0
  220. data/vendor/twitter/docs/templates/pages/less.mustache +681 -0
  221. data/vendor/twitter/docs/templates/pages/scaffolding.mustache +324 -0
  222. data/vendor/twitter/docs/templates/pages/upgrading.mustache +183 -0
  223. data/vendor/twitter/docs/upgrading.html +297 -0
  224. data/vendor/twitter/img/glyphicons-halflings-white.png +0 -0
  225. data/vendor/twitter/img/glyphicons-halflings.png +0 -0
  226. data/vendor/twitter/js/README.md +106 -0
  227. data/vendor/twitter/js/bootstrap-alert.js +91 -0
  228. data/vendor/twitter/js/bootstrap-button.js +98 -0
  229. data/vendor/twitter/js/bootstrap-carousel.js +154 -0
  230. data/vendor/twitter/js/bootstrap-collapse.js +136 -0
  231. data/vendor/twitter/js/bootstrap-dropdown.js +92 -0
  232. data/vendor/twitter/js/bootstrap-modal.js +209 -0
  233. data/vendor/twitter/js/bootstrap-popover.js +95 -0
  234. data/vendor/twitter/js/bootstrap-scrollspy.js +125 -0
  235. data/vendor/twitter/js/bootstrap-tab.js +130 -0
  236. data/vendor/twitter/js/bootstrap-tooltip.js +270 -0
  237. data/vendor/twitter/js/bootstrap-transition.js +51 -0
  238. data/vendor/twitter/js/bootstrap-typeahead.js +271 -0
  239. data/vendor/twitter/js/tests/index.html +49 -0
  240. data/vendor/twitter/js/tests/unit/bootstrap-alert.js +41 -0
  241. data/vendor/twitter/js/tests/unit/bootstrap-button.js +54 -0
  242. data/vendor/twitter/js/tests/unit/bootstrap-collapse.js +25 -0
  243. data/vendor/twitter/js/tests/unit/bootstrap-dropdown.js +53 -0
  244. data/vendor/twitter/js/tests/unit/bootstrap-modal.js +85 -0
  245. data/vendor/twitter/js/tests/unit/bootstrap-popover.js +93 -0
  246. data/vendor/twitter/js/tests/unit/bootstrap-scrollspy.js +31 -0
  247. data/vendor/twitter/js/tests/unit/bootstrap-tab.js +45 -0
  248. data/vendor/twitter/js/tests/unit/bootstrap-tooltip.js +62 -0
  249. data/vendor/twitter/js/tests/unit/bootstrap-transition.js +13 -0
  250. data/vendor/twitter/js/tests/unit/bootstrap-typeahead.js +128 -0
  251. data/vendor/twitter/js/tests/vendor/jquery.js +9252 -0
  252. data/vendor/twitter/js/tests/vendor/qunit.css +232 -0
  253. data/vendor/twitter/js/tests/vendor/qunit.js +1510 -0
  254. data/vendor/twitter/scss/accordion.scss +28 -0
  255. data/vendor/twitter/scss/alerts.scss +70 -0
  256. data/vendor/twitter/scss/bootstrap.scss +62 -0
  257. data/vendor/twitter/scss/breadcrumbs.scss +22 -0
  258. data/vendor/twitter/scss/button-groups.scss +147 -0
  259. data/vendor/twitter/scss/buttons.scss +168 -0
  260. data/vendor/twitter/scss/carousel.scss +121 -0
  261. data/vendor/twitter/scss/close.scss +18 -0
  262. data/vendor/twitter/scss/code.scss +44 -0
  263. data/vendor/twitter/scss/component-animations.scss +18 -0
  264. data/vendor/twitter/scss/dropdowns.scss +131 -0
  265. data/vendor/twitter/scss/forms.scss +516 -0
  266. data/vendor/twitter/scss/grid.scss +8 -0
  267. data/vendor/twitter/scss/hero-unit.scss +20 -0
  268. data/vendor/twitter/scss/labels.scss +16 -0
  269. data/vendor/twitter/scss/layouts.scss +17 -0
  270. data/vendor/twitter/scss/mixins.scss +500 -0
  271. data/vendor/twitter/scss/modals.scss +72 -0
  272. data/vendor/twitter/scss/navbar.scss +292 -0
  273. data/vendor/twitter/scss/navs.scss +344 -0
  274. data/vendor/twitter/scss/pager.scss +30 -0
  275. data/vendor/twitter/scss/pagination.scss +55 -0
  276. data/vendor/twitter/scss/popovers.scss +49 -0
  277. data/vendor/twitter/scss/progress-bars.scss +95 -0
  278. data/vendor/twitter/scss/reset.scss +126 -0
  279. data/vendor/twitter/scss/responsive.scss +323 -0
  280. data/vendor/twitter/scss/scaffolding.scss +29 -0
  281. data/vendor/twitter/scss/sprites.scss +158 -0
  282. data/vendor/twitter/scss/tables.scss +130 -0
  283. data/vendor/twitter/scss/thumbnails.scss +35 -0
  284. data/vendor/twitter/scss/tooltip.scss +35 -0
  285. data/vendor/twitter/scss/type.scss +217 -0
  286. data/vendor/twitter/scss/utilities.scss +23 -0
  287. data/vendor/twitter/scss/variables.scss +99 -0
  288. data/vendor/twitter/scss/wells.scss +17 -0
  289. metadata +368 -0
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @preserve Copyright 2012 Twitter, Inc.
3
+ * @license http://www.apache.org/licenses/LICENSE-2.0.txt
4
+ */
5
+ var Hogan={};(function(a){function h(a){return a=String(a===null||a===undefined?"":a),g.test(a)?a.replace(b,"&amp;").replace(c,"&lt;").replace(d,"&gt;").replace(e,"&#39;").replace(f,"&quot;"):a}a.Template=function j(a,b,c){a&&(this.r=a),this.c=c,this.text=b||""},a.Template.prototype={r:function(a,b,c){return""},v:h,render:function(b,c,d){return this.ri([b],c||{},d)},ri:function(a,b,c){return this.r(a,b,c)},rp:function(a,b,c,d){var e=c[a];return e?(this.c&&typeof e=="string"&&(e=this.c.compile(e)),e.ri(b,c,d)):""},rs:function(a,b,c){var d="",e=a[a.length-1];if(!i(e))return d=c(a,b);for(var f=0;f<e.length;f++)a.push(e[f]),d+=c(a,b),a.pop();return d},s:function(a,b,c,d,e,f,g){var h;return i(a)&&a.length===0?!1:(typeof a=="function"&&(a=this.ls(a,b,c,d,e,f,g)),h=a===""||!!a,!d&&h&&b&&b.push(typeof a=="object"?a:b[b.length-1]),h)},d:function(a,b,c,d){var e=a.split("."),f=this.f(e[0],b,c,d),g=null;if(a==="."&&i(b[b.length-2]))return b[b.length-1];for(var h=1;h<e.length;h++)f&&typeof f=="object"&&e[h]in f?(g=f,f=f[e[h]]):f="";return d&&!f?!1:(!d&&typeof f=="function"&&(b.push(g),f=this.lv(f,b,c),b.pop()),f)},f:function(a,b,c,d){var e=!1,f=null,g=!1;for(var h=b.length-1;h>=0;h--){f=b[h];if(f&&typeof f=="object"&&a in f){e=f[a],g=!0;break}}return g?(!d&&typeof e=="function"&&(e=this.lv(e,b,c)),e):d?!1:""},ho:function(a,b,c,d,e){var f=this.c,g=a.call(b,d,function(a){return f.compile(a,{delimiters:e}).render(b,c)}),h=f.compile(g.toString(),{delimiters:e}).render(b,c);return this.b=h,!1},b:"",ls:function(a,b,c,d,e,f,g){var h=b[b.length-1],i=null;if(!d&&this.c&&a.length>0)return this.ho(a,h,c,this.text.substring(e,f),g);i=a.call(h);if(typeof i=="function"){if(d)return!0;if(this.c)return this.ho(i,h,c,this.text.substring(e,f),g)}return i},lv:function(a,b,c){var d=b[b.length-1],e=a.call(d);return typeof e=="function"&&(e=e.call(d)),e=e.toString(),this.c&&~e.indexOf("{{")?this.c.compile(e).render(d,c):e}};var b=/&/g,c=/</g,d=/>/g,e=/\'/g,f=/\"/g,g=/[&<>\"\']/,i=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"}})(typeof exports!="undefined"?exports:Hogan),function(a){function h(a){a.n.substr(a.n.length-1)==="}"&&(a.n=a.n.substring(0,a.n.length-1))}function i(a){return a.trim?a.trim():a.replace(/^\s*|\s*$/g,"")}function j(a,b,c){if(b.charAt(c)!=a.charAt(0))return!1;for(var d=1,e=a.length;d<e;d++)if(b.charAt(c+d)!=a.charAt(d))return!1;return!0}function k(a,b,c,d){var e=[],f=null,g=null;while(a.length>0){g=a.shift();if(g.tag=="#"||g.tag=="^"||l(g,d))c.push(g),g.nodes=k(a,g.tag,c,d),e.push(g);else{if(g.tag=="/"){if(c.length===0)throw new Error("Closing tag without opener: /"+g.n);f=c.pop();if(g.n!=f.n&&!m(g.n,f.n,d))throw new Error("Nesting error: "+f.n+" vs. "+g.n);return f.end=g.i,e}e.push(g)}}if(c.length>0)throw new Error("missing closing tag: "+c.pop().n);return e}function l(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c].o==a.n)return a.tag="#",!0}function m(a,b,c){for(var d=0,e=c.length;d<e;d++)if(c[d].c==a&&c[d].o==b)return!0}function n(a){return'i = i || "";var b = i + "";var _ = this;'+q(a)+"return b;"}function o(a){return a.replace(f,"\\\\").replace(c,'\\"').replace(d,"\\n").replace(e,"\\r")}function p(a){return~a.indexOf(".")?"d":"f"}function q(a){var b="";for(var c=0,d=a.length;c<d;c++){var e=a[c].tag;e=="#"?b+=r(a[c].nodes,a[c].n,p(a[c].n),a[c].i,a[c].end,a[c].otag+" "+a[c].ctag):e=="^"?b+=s(a[c].nodes,a[c].n,p(a[c].n)):e=="<"||e==">"?b+=t(a[c]):e=="{"||e=="&"?b+=u(a[c].n,p(a[c].n)):e=="\n"?b+=w('"\\n"'+(a.length-1==c?"":" + i")):e=="_v"?b+=v(a[c].n,p(a[c].n)):e===undefined&&(b+=w('"'+o(a[c])+'"'))}return b}function r(a,b,c,d,e,f){return"if(_.s(_."+c+'("'+o(b)+'",c,p,1),'+"c,p,0,"+d+","+e+', "'+f+'")){'+"b += _.rs(c,p,"+'function(c,p){ var b = "";'+q(a)+"return b;});c.pop();}"+'else{b += _.b; _.b = ""};'}function s(a,b,c){return"if (!_.s(_."+c+'("'+o(b)+'",c,p,1),c,p,1,0,0,"")){'+q(a)+"};"}function t(a){return'b += _.rp("'+o(a.n)+'",c,p,"'+(a.indent||"")+'");'}function u(a,b){return"b += (_."+b+'("'+o(a)+'",c,p,0));'}function v(a,b){return"b += (_.v(_."+b+'("'+o(a)+'",c,p,0)));'}function w(a){return"b += "+a+";"}var b=/\S/,c=/\"/g,d=/\n/g,e=/\r/g,f=/\\/g,g={"#":1,"^":2,"/":3,"!":4,">":5,"<":6,"=":7,_v:8,"{":9,"&":10};a.scan=function(c,d){function w(){p.length>0&&(q.push(new String(p)),p="")}function x(){var a=!0;for(var c=t;c<q.length;c++){a=q[c].tag&&g[q[c].tag]<g._v||!q[c].tag&&q[c].match(b)===null;if(!a)return!1}return a}function y(a,b){w();if(a&&x())for(var c=t,d;c<q.length;c++)q[c].tag||((d=q[c+1])&&d.tag==">"&&(d.indent=q[c].toString()),q.splice(c,1));else b||q.push({tag:"\n"});r=!1,t=q.length}function z(a,b){var c="="+v,d=a.indexOf(c,b),e=i(a.substring(a.indexOf("=",b)+1,d)).split(" ");return u=e[0],v=e[1],d+c.length-1}var e=c.length,f=0,k=1,l=2,m=f,n=null,o=null,p="",q=[],r=!1,s=0,t=0,u="{{",v="}}";d&&(d=d.split(" "),u=d[0],v=d[1]);for(s=0;s<e;s++)m==f?j(u,c,s)?(--s,w(),m=k):c.charAt(s)=="\n"?y(r):p+=c.charAt(s):m==k?(s+=u.length-1,o=g[c.charAt(s+1)],n=o?c.charAt(s+1):"_v",n=="="?(s=z(c,s),m=f):(o&&s++,m=l),r=s):j(v,c,s)?(q.push({tag:n,n:i(p),otag:u,ctag:v,i:n=="/"?r-v.length:s+u.length}),p="",s+=v.length-1,m=f,n=="{"&&(v=="}}"?s++:h(q[q.length-1]))):p+=c.charAt(s);return y(r,!0),q},a.generate=function(b,c,d){return d.asString?"function(c,p,i){"+b+";}":new a.Template(new Function("c","p","i",b),c,a)},a.parse=function(a,b){return b=b||{},k(a,"",[],b.sectionTags||[])},a.cache={},a.compile=function(a,b){b=b||{};var c=a+"||"+!!b.asString,d=this.cache[c];return d?d:(d=this.generate(n(this.parse(this.scan(a,b.delimiters),b)),a,b),this.cache[c]=d)}}(typeof exports!="undefined"?exports:Hogan),typeof define=="function"&&define.amd&&define(Hogan)
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @preserve Copyright 2012 Twitter, Inc.
3
+ * @license http://www.apache.org/licenses/LICENSE-2.0.txt
4
+ */
5
+ var Hogan={};(function(a){function h(a){return a=String(a===null||a===undefined?"":a),g.test(a)?a.replace(b,"&amp;").replace(c,"&lt;").replace(d,"&gt;").replace(e,"&#39;").replace(f,"&quot;"):a}a.Template=function j(a,b,c){a&&(this.r=a),this.c=c,this.text=b||""},a.Template.prototype={r:function(a,b,c){return""},v:h,render:function(b,c,d){return this.ri([b],c||{},d)},ri:function(a,b,c){return this.r(a,b,c)},rp:function(a,b,c,d){var e=c[a];return e?(this.c&&typeof e=="string"&&(e=this.c.compile(e)),e.ri(b,c,d)):""},rs:function(a,b,c){var d="",e=a[a.length-1];if(!i(e))return d=c(a,b);for(var f=0;f<e.length;f++)a.push(e[f]),d+=c(a,b),a.pop();return d},s:function(a,b,c,d,e,f,g){var h;return i(a)&&a.length===0?!1:(typeof a=="function"&&(a=this.ls(a,b,c,d,e,f,g)),h=a===""||!!a,!d&&h&&b&&b.push(typeof a=="object"?a:b[b.length-1]),h)},d:function(a,b,c,d){var e=a.split("."),f=this.f(e[0],b,c,d),g=null;if(a==="."&&i(b[b.length-2]))return b[b.length-1];for(var h=1;h<e.length;h++)f&&typeof f=="object"&&e[h]in f?(g=f,f=f[e[h]]):f="";return d&&!f?!1:(!d&&typeof f=="function"&&(b.push(g),f=this.lv(f,b,c),b.pop()),f)},f:function(a,b,c,d){var e=!1,f=null,g=!1;for(var h=b.length-1;h>=0;h--){f=b[h];if(f&&typeof f=="object"&&a in f){e=f[a],g=!0;break}}return g?(!d&&typeof e=="function"&&(e=this.lv(e,b,c)),e):d?!1:""},ho:function(a,b,c,d,e){var f=this.c,g=a.call(b,d,function(a){return f.compile(a,{delimiters:e}).render(b,c)}),h=f.compile(g.toString(),{delimiters:e}).render(b,c);return this.b=h,!1},b:"",ls:function(a,b,c,d,e,f,g){var h=b[b.length-1],i=null;if(!d&&this.c&&a.length>0)return this.ho(a,h,c,this.text.substring(e,f),g);i=a.call(h);if(typeof i=="function"){if(d)return!0;if(this.c)return this.ho(i,h,c,this.text.substring(e,f),g)}return i},lv:function(a,b,c){var d=b[b.length-1],e=a.call(d);return typeof e=="function"&&(e=e.call(d)),e=e.toString(),this.c&&~e.indexOf("{{")?this.c.compile(e).render(d,c):e}};var b=/&/g,c=/</g,d=/>/g,e=/\'/g,f=/\"/g,g=/[&<>\"\']/,i=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"}})(typeof exports!="undefined"?exports:Hogan),function(a){function h(a){a.n.substr(a.n.length-1)==="}"&&(a.n=a.n.substring(0,a.n.length-1))}function i(a){return a.trim?a.trim():a.replace(/^\s*|\s*$/g,"")}function j(a,b,c){if(b.charAt(c)!=a.charAt(0))return!1;for(var d=1,e=a.length;d<e;d++)if(b.charAt(c+d)!=a.charAt(d))return!1;return!0}function k(a,b,c,d){var e=[],f=null,g=null;while(a.length>0){g=a.shift();if(g.tag=="#"||g.tag=="^"||l(g,d))c.push(g),g.nodes=k(a,g.tag,c,d),e.push(g);else{if(g.tag=="/"){if(c.length===0)throw new Error("Closing tag without opener: /"+g.n);f=c.pop();if(g.n!=f.n&&!m(g.n,f.n,d))throw new Error("Nesting error: "+f.n+" vs. "+g.n);return f.end=g.i,e}e.push(g)}}if(c.length>0)throw new Error("missing closing tag: "+c.pop().n);return e}function l(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c].o==a.n)return a.tag="#",!0}function m(a,b,c){for(var d=0,e=c.length;d<e;d++)if(c[d].c==a&&c[d].o==b)return!0}function n(a){return'i = i || "";var b = i + "";var _ = this;'+q(a)+"return b;"}function o(a){return a.replace(f,"\\\\").replace(c,'\\"').replace(d,"\\n").replace(e,"\\r")}function p(a){return~a.indexOf(".")?"d":"f"}function q(a){var b="";for(var c=0,d=a.length;c<d;c++){var e=a[c].tag;e=="#"?b+=r(a[c].nodes,a[c].n,p(a[c].n),a[c].i,a[c].end,a[c].otag+" "+a[c].ctag):e=="^"?b+=s(a[c].nodes,a[c].n,p(a[c].n)):e=="<"||e==">"?b+=t(a[c]):e=="{"||e=="&"?b+=u(a[c].n,p(a[c].n)):e=="\n"?b+=w('"\\n"'+(a.length-1==c?"":" + i")):e=="_v"?b+=v(a[c].n,p(a[c].n)):e===undefined&&(b+=w('"'+o(a[c])+'"'))}return b}function r(a,b,c,d,e,f){return"if(_.s(_."+c+'("'+o(b)+'",c,p,1),'+"c,p,0,"+d+","+e+', "'+f+'")){'+"b += _.rs(c,p,"+'function(c,p){ var b = "";'+q(a)+"return b;});c.pop();}"+'else{b += _.b; _.b = ""};'}function s(a,b,c){return"if (!_.s(_."+c+'("'+o(b)+'",c,p,1),c,p,1,0,0,"")){'+q(a)+"};"}function t(a){return'b += _.rp("'+o(a.n)+'",c,p,"'+(a.indent||"")+'");'}function u(a,b){return"b += (_."+b+'("'+o(a)+'",c,p,0));'}function v(a,b){return"b += (_.v(_."+b+'("'+o(a)+'",c,p,0)));'}function w(a){return"b += "+a+";"}var b=/\S/,c=/\"/g,d=/\n/g,e=/\r/g,f=/\\/g,g={"#":1,"^":2,"/":3,"!":4,">":5,"<":6,"=":7,_v:8,"{":9,"&":10};a.scan=function(c,d){function w(){p.length>0&&(q.push(new String(p)),p="")}function x(){var a=!0;for(var c=t;c<q.length;c++){a=q[c].tag&&g[q[c].tag]<g._v||!q[c].tag&&q[c].match(b)===null;if(!a)return!1}return a}function y(a,b){w();if(a&&x())for(var c=t,d;c<q.length;c++)q[c].tag||((d=q[c+1])&&d.tag==">"&&(d.indent=q[c].toString()),q.splice(c,1));else b||q.push({tag:"\n"});r=!1,t=q.length}function z(a,b){var c="="+v,d=a.indexOf(c,b),e=i(a.substring(a.indexOf("=",b)+1,d)).split(" ");return u=e[0],v=e[1],d+c.length-1}var e=c.length,f=0,k=1,l=2,m=f,n=null,o=null,p="",q=[],r=!1,s=0,t=0,u="{{",v="}}";d&&(d=d.split(" "),u=d[0],v=d[1]);for(s=0;s<e;s++)m==f?j(u,c,s)?(--s,w(),m=k):c.charAt(s)=="\n"?y(r):p+=c.charAt(s):m==k?(s+=u.length-1,o=g[c.charAt(s+1)],n=o?c.charAt(s+1):"_v",n=="="?(s=z(c,s),m=f):(o&&s++,m=l),r=s):j(v,c,s)?(q.push({tag:n,n:i(p),otag:u,ctag:v,i:n=="/"?r-v.length:s+u.length}),p="",s+=v.length-1,m=f,n=="{"&&(v=="}}"?s++:h(q[q.length-1]))):p+=c.charAt(s);return y(r,!0),q},a.generate=function(b,c,d){return d.asString?"function(c,p,i){"+b+";}":new a.Template(new Function("c","p","i",b),c,a)},a.parse=function(a,b){return b=b||{},k(a,"",[],b.sectionTags||[])},a.cache={},a.compile=function(a,b){b=b||{};var c=a+"||"+!!b.asString,d=this.cache[c];return d?d:(d=this.generate(n(this.parse(this.scan(a,b.delimiters),b)),a,b),this.cache[c]=d)}}(typeof exports!="undefined"?exports:Hogan),typeof module!="undefined"&&module.exports&&(module.exports=Hogan)
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @preserve Copyright 2012 Twitter, Inc.
3
+ * @license http://www.apache.org/licenses/LICENSE-2.0.txt
4
+ */
5
+ var Hogan={};(function(a){function h(a){return a=String(a===null||a===undefined?"":a),g.test(a)?a.replace(b,"&amp;").replace(c,"&lt;").replace(d,"&gt;").replace(e,"&#39;").replace(f,"&quot;"):a}a.Template=function j(a,b,c){a&&(this.r=a),this.c=c,this.text=b||""},a.Template.prototype={r:function(a,b,c){return""},v:h,render:function(b,c,d){return this.ri([b],c||{},d)},ri:function(a,b,c){return this.r(a,b,c)},rp:function(a,b,c,d){var e=c[a];return e?(this.c&&typeof e=="string"&&(e=this.c.compile(e)),e.ri(b,c,d)):""},rs:function(a,b,c){var d="",e=a[a.length-1];if(!i(e))return d=c(a,b);for(var f=0;f<e.length;f++)a.push(e[f]),d+=c(a,b),a.pop();return d},s:function(a,b,c,d,e,f,g){var h;return i(a)&&a.length===0?!1:(typeof a=="function"&&(a=this.ls(a,b,c,d,e,f,g)),h=a===""||!!a,!d&&h&&b&&b.push(typeof a=="object"?a:b[b.length-1]),h)},d:function(a,b,c,d){var e=a.split("."),f=this.f(e[0],b,c,d),g=null;if(a==="."&&i(b[b.length-2]))return b[b.length-1];for(var h=1;h<e.length;h++)f&&typeof f=="object"&&e[h]in f?(g=f,f=f[e[h]]):f="";return d&&!f?!1:(!d&&typeof f=="function"&&(b.push(g),f=this.lv(f,b,c),b.pop()),f)},f:function(a,b,c,d){var e=!1,f=null,g=!1;for(var h=b.length-1;h>=0;h--){f=b[h];if(f&&typeof f=="object"&&a in f){e=f[a],g=!0;break}}return g?(!d&&typeof e=="function"&&(e=this.lv(e,b,c)),e):d?!1:""},ho:function(a,b,c,d,e){var f=this.c,g=a.call(b,d,function(a){return f.compile(a,{delimiters:e}).render(b,c)}),h=f.compile(g.toString(),{delimiters:e}).render(b,c);return this.b=h,!1},b:"",ls:function(a,b,c,d,e,f,g){var h=b[b.length-1],i=null;if(!d&&this.c&&a.length>0)return this.ho(a,h,c,this.text.substring(e,f),g);i=a.call(h);if(typeof i=="function"){if(d)return!0;if(this.c)return this.ho(i,h,c,this.text.substring(e,f),g)}return i},lv:function(a,b,c){var d=b[b.length-1],e=a.call(d);return typeof e=="function"&&(e=e.call(d)),e=e.toString(),this.c&&~e.indexOf("{{")?this.c.compile(e).render(d,c):e}};var b=/&/g,c=/</g,d=/>/g,e=/\'/g,f=/\"/g,g=/[&<>\"\']/,i=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"}})(typeof exports!="undefined"?exports:Hogan),function(a){function h(a){a.n.substr(a.n.length-1)==="}"&&(a.n=a.n.substring(0,a.n.length-1))}function i(a){return a.trim?a.trim():a.replace(/^\s*|\s*$/g,"")}function j(a,b,c){if(b.charAt(c)!=a.charAt(0))return!1;for(var d=1,e=a.length;d<e;d++)if(b.charAt(c+d)!=a.charAt(d))return!1;return!0}function k(a,b,c,d){var e=[],f=null,g=null;while(a.length>0){g=a.shift();if(g.tag=="#"||g.tag=="^"||l(g,d))c.push(g),g.nodes=k(a,g.tag,c,d),e.push(g);else{if(g.tag=="/"){if(c.length===0)throw new Error("Closing tag without opener: /"+g.n);f=c.pop();if(g.n!=f.n&&!m(g.n,f.n,d))throw new Error("Nesting error: "+f.n+" vs. "+g.n);return f.end=g.i,e}e.push(g)}}if(c.length>0)throw new Error("missing closing tag: "+c.pop().n);return e}function l(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c].o==a.n)return a.tag="#",!0}function m(a,b,c){for(var d=0,e=c.length;d<e;d++)if(c[d].c==a&&c[d].o==b)return!0}function n(a){return'i = i || "";var b = i + "";var _ = this;'+q(a)+"return b;"}function o(a){return a.replace(f,"\\\\").replace(c,'\\"').replace(d,"\\n").replace(e,"\\r")}function p(a){return~a.indexOf(".")?"d":"f"}function q(a){var b="";for(var c=0,d=a.length;c<d;c++){var e=a[c].tag;e=="#"?b+=r(a[c].nodes,a[c].n,p(a[c].n),a[c].i,a[c].end,a[c].otag+" "+a[c].ctag):e=="^"?b+=s(a[c].nodes,a[c].n,p(a[c].n)):e=="<"||e==">"?b+=t(a[c]):e=="{"||e=="&"?b+=u(a[c].n,p(a[c].n)):e=="\n"?b+=w('"\\n"'+(a.length-1==c?"":" + i")):e=="_v"?b+=v(a[c].n,p(a[c].n)):e===undefined&&(b+=w('"'+o(a[c])+'"'))}return b}function r(a,b,c,d,e,f){return"if(_.s(_."+c+'("'+o(b)+'",c,p,1),'+"c,p,0,"+d+","+e+', "'+f+'")){'+"b += _.rs(c,p,"+'function(c,p){ var b = "";'+q(a)+"return b;});c.pop();}"+'else{b += _.b; _.b = ""};'}function s(a,b,c){return"if (!_.s(_."+c+'("'+o(b)+'",c,p,1),c,p,1,0,0,"")){'+q(a)+"};"}function t(a){return'b += _.rp("'+o(a.n)+'",c,p,"'+(a.indent||"")+'");'}function u(a,b){return"b += (_."+b+'("'+o(a)+'",c,p,0));'}function v(a,b){return"b += (_.v(_."+b+'("'+o(a)+'",c,p,0)));'}function w(a){return"b += "+a+";"}var b=/\S/,c=/\"/g,d=/\n/g,e=/\r/g,f=/\\/g,g={"#":1,"^":2,"/":3,"!":4,">":5,"<":6,"=":7,_v:8,"{":9,"&":10};a.scan=function(c,d){function w(){p.length>0&&(q.push(new String(p)),p="")}function x(){var a=!0;for(var c=t;c<q.length;c++){a=q[c].tag&&g[q[c].tag]<g._v||!q[c].tag&&q[c].match(b)===null;if(!a)return!1}return a}function y(a,b){w();if(a&&x())for(var c=t,d;c<q.length;c++)q[c].tag||((d=q[c+1])&&d.tag==">"&&(d.indent=q[c].toString()),q.splice(c,1));else b||q.push({tag:"\n"});r=!1,t=q.length}function z(a,b){var c="="+v,d=a.indexOf(c,b),e=i(a.substring(a.indexOf("=",b)+1,d)).split(" ");return u=e[0],v=e[1],d+c.length-1}var e=c.length,f=0,k=1,l=2,m=f,n=null,o=null,p="",q=[],r=!1,s=0,t=0,u="{{",v="}}";d&&(d=d.split(" "),u=d[0],v=d[1]);for(s=0;s<e;s++)m==f?j(u,c,s)?(--s,w(),m=k):c.charAt(s)=="\n"?y(r):p+=c.charAt(s):m==k?(s+=u.length-1,o=g[c.charAt(s+1)],n=o?c.charAt(s+1):"_v",n=="="?(s=z(c,s),m=f):(o&&s++,m=l),r=s):j(v,c,s)?(q.push({tag:n,n:i(p),otag:u,ctag:v,i:n=="/"?r-v.length:s+u.length}),p="",s+=v.length-1,m=f,n=="{"&&(v=="}}"?s++:h(q[q.length-1]))):p+=c.charAt(s);return y(r,!0),q},a.generate=function(b,c,d){return d.asString?"function(c,p,i){"+b+";}":new a.Template(new Function("c","p","i",b),c,a)},a.parse=function(a,b){return b=b||{},k(a,"",[],b.sectionTags||[])},a.cache={},a.compile=function(a,b){b=b||{};var c=a+"||"+!!b.asString,d=this.cache[c];return d?d:(d=this.generate(n(this.parse(this.scan(a,b.delimiters),b)),a,b),this.cache[c]=d)}}(typeof exports!="undefined"?exports:Hogan)
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @preserve Copyright 2012 Twitter, Inc.
3
+ * @license http://www.apache.org/licenses/LICENSE-2.0.txt
4
+ */
5
+ var Hogan={};(function(a){function h(a){return a=String(a===null||a===undefined?"":a),g.test(a)?a.replace(b,"&amp;").replace(c,"&lt;").replace(d,"&gt;").replace(e,"&#39;").replace(f,"&quot;"):a}a.Template=function j(a,b,c){a&&(this.r=a),this.c=c,this.text=b||""},a.Template.prototype={r:function(a,b,c){return""},v:h,render:function(b,c,d){return this.ri([b],c||{},d)},ri:function(a,b,c){return this.r(a,b,c)},rp:function(a,b,c,d){var e=c[a];return e?(this.c&&typeof e=="string"&&(e=this.c.compile(e)),e.ri(b,c,d)):""},rs:function(a,b,c){var d="",e=a[a.length-1];if(!i(e))return d=c(a,b);for(var f=0;f<e.length;f++)a.push(e[f]),d+=c(a,b),a.pop();return d},s:function(a,b,c,d,e,f,g){var h;return i(a)&&a.length===0?!1:(typeof a=="function"&&(a=this.ls(a,b,c,d,e,f,g)),h=a===""||!!a,!d&&h&&b&&b.push(typeof a=="object"?a:b[b.length-1]),h)},d:function(a,b,c,d){var e=a.split("."),f=this.f(e[0],b,c,d),g=null;if(a==="."&&i(b[b.length-2]))return b[b.length-1];for(var h=1;h<e.length;h++)f&&typeof f=="object"&&e[h]in f?(g=f,f=f[e[h]]):f="";return d&&!f?!1:(!d&&typeof f=="function"&&(b.push(g),f=this.lv(f,b,c),b.pop()),f)},f:function(a,b,c,d){var e=!1,f=null,g=!1;for(var h=b.length-1;h>=0;h--){f=b[h];if(f&&typeof f=="object"&&a in f){e=f[a],g=!0;break}}return g?(!d&&typeof e=="function"&&(e=this.lv(e,b,c)),e):d?!1:""},ho:function(a,b,c,d,e){var f=this.c,g=a.call(b,d,function(a){return f.compile(a,{delimiters:e}).render(b,c)}),h=f.compile(g.toString(),{delimiters:e}).render(b,c);return this.b=h,!1},b:"",ls:function(a,b,c,d,e,f,g){var h=b[b.length-1],i=null;if(!d&&this.c&&a.length>0)return this.ho(a,h,c,this.text.substring(e,f),g);i=a.call(h);if(typeof i=="function"){if(d)return!0;if(this.c)return this.ho(i,h,c,this.text.substring(e,f),g)}return i},lv:function(a,b,c){var d=b[b.length-1],e=a.call(d);return typeof e=="function"&&(e=e.call(d)),e=e.toString(),this.c&&~e.indexOf("{{")?this.c.compile(e).render(d,c):e}};var b=/&/g,c=/</g,d=/>/g,e=/\'/g,f=/\"/g,g=/[&<>\"\']/,i=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"}})(typeof exports!="undefined"?exports:Hogan),function(a){function h(a){a.n.substr(a.n.length-1)==="}"&&(a.n=a.n.substring(0,a.n.length-1))}function i(a){return a.trim?a.trim():a.replace(/^\s*|\s*$/g,"")}function j(a,b,c){if(b.charAt(c)!=a.charAt(0))return!1;for(var d=1,e=a.length;d<e;d++)if(b.charAt(c+d)!=a.charAt(d))return!1;return!0}function k(a,b,c,d){var e=[],f=null,g=null;while(a.length>0){g=a.shift();if(g.tag=="#"||g.tag=="^"||l(g,d))c.push(g),g.nodes=k(a,g.tag,c,d),e.push(g);else{if(g.tag=="/"){if(c.length===0)throw new Error("Closing tag without opener: /"+g.n);f=c.pop();if(g.n!=f.n&&!m(g.n,f.n,d))throw new Error("Nesting error: "+f.n+" vs. "+g.n);return f.end=g.i,e}e.push(g)}}if(c.length>0)throw new Error("missing closing tag: "+c.pop().n);return e}function l(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c].o==a.n)return a.tag="#",!0}function m(a,b,c){for(var d=0,e=c.length;d<e;d++)if(c[d].c==a&&c[d].o==b)return!0}function n(a){return'i = i || "";var b = i + "";var _ = this;'+q(a)+"return b;"}function o(a){return a.replace(f,"\\\\").replace(c,'\\"').replace(d,"\\n").replace(e,"\\r")}function p(a){return~a.indexOf(".")?"d":"f"}function q(a){var b="";for(var c=0,d=a.length;c<d;c++){var e=a[c].tag;e=="#"?b+=r(a[c].nodes,a[c].n,p(a[c].n),a[c].i,a[c].end,a[c].otag+" "+a[c].ctag):e=="^"?b+=s(a[c].nodes,a[c].n,p(a[c].n)):e=="<"||e==">"?b+=t(a[c]):e=="{"||e=="&"?b+=u(a[c].n,p(a[c].n)):e=="\n"?b+=w('"\\n"'+(a.length-1==c?"":" + i")):e=="_v"?b+=v(a[c].n,p(a[c].n)):e===undefined&&(b+=w('"'+o(a[c])+'"'))}return b}function r(a,b,c,d,e,f){return"if(_.s(_."+c+'("'+o(b)+'",c,p,1),'+"c,p,0,"+d+","+e+', "'+f+'")){'+"b += _.rs(c,p,"+'function(c,p){ var b = "";'+q(a)+"return b;});c.pop();}"+'else{b += _.b; _.b = ""};'}function s(a,b,c){return"if (!_.s(_."+c+'("'+o(b)+'",c,p,1),c,p,1,0,0,"")){'+q(a)+"};"}function t(a){return'b += _.rp("'+o(a.n)+'",c,p,"'+(a.indent||"")+'");'}function u(a,b){return"b += (_."+b+'("'+o(a)+'",c,p,0));'}function v(a,b){return"b += (_.v(_."+b+'("'+o(a)+'",c,p,0)));'}function w(a){return"b += "+a+";"}var b=/\S/,c=/\"/g,d=/\n/g,e=/\r/g,f=/\\/g,g={"#":1,"^":2,"/":3,"!":4,">":5,"<":6,"=":7,_v:8,"{":9,"&":10};a.scan=function(c,d){function w(){p.length>0&&(q.push(new String(p)),p="")}function x(){var a=!0;for(var c=t;c<q.length;c++){a=q[c].tag&&g[q[c].tag]<g._v||!q[c].tag&&q[c].match(b)===null;if(!a)return!1}return a}function y(a,b){w();if(a&&x())for(var c=t,d;c<q.length;c++)q[c].tag||((d=q[c+1])&&d.tag==">"&&(d.indent=q[c].toString()),q.splice(c,1));else b||q.push({tag:"\n"});r=!1,t=q.length}function z(a,b){var c="="+v,d=a.indexOf(c,b),e=i(a.substring(a.indexOf("=",b)+1,d)).split(" ");return u=e[0],v=e[1],d+c.length-1}var e=c.length,f=0,k=1,l=2,m=f,n=null,o=null,p="",q=[],r=!1,s=0,t=0,u="{{",v="}}";d&&(d=d.split(" "),u=d[0],v=d[1]);for(s=0;s<e;s++)m==f?j(u,c,s)?(--s,w(),m=k):c.charAt(s)=="\n"?y(r):p+=c.charAt(s):m==k?(s+=u.length-1,o=g[c.charAt(s+1)],n=o?c.charAt(s+1):"_v",n=="="?(s=z(c,s),m=f):(o&&s++,m=l),r=s):j(v,c,s)?(q.push({tag:n,n:i(p),otag:u,ctag:v,i:n=="/"?r-v.length:s+u.length}),p="",s+=v.length-1,m=f,n=="{"&&(v=="}}"?s++:h(q[q.length-1]))):p+=c.charAt(s);return y(r,!0),q},a.generate=function(b,c,d){return d.asString?"function(c,p,i){"+b+";}":new a.Template(new Function("c","p","i",b),c,a)},a.parse=function(a,b){return b=b||{},k(a,"",[],b.sectionTags||[])},a.cache={},a.compile=function(a,b){b=b||{};var c=a+"||"+!!b.asString,d=this.cache[c];return d?d:(d=this.generate(n(this.parse(this.scan(a,b.delimiters),b)),a,b),this.cache[c]=d)}}(typeof exports!="undefined"?exports:Hogan);var Mustache=function(a){function b(b,c,d,e){var f=this.f(b,c,d,0),g=c;return f&&(g=g.concat(f)),a.Template.prototype.rp.call(this,b,g,d,e)}var c=function(c,d,e){this.rp=b,a.Template.call(this,c,d,e)};c.prototype=a.Template.prototype;var d,e=function(){this.cache={},this.generate=function(a,b,e){return new c(new Function("c","p","i",a),b,d)}};return e.prototype=a,d=new e,{to_html:function(a,b,c,e){var f=d.compile(a),g=f.render(b,c);if(!e)return g;e(g)}}}(Hogan)
@@ -0,0 +1,619 @@
1
+ /*
2
+ * Copyright 2011 Twitter, Inc.
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+
16
+ // A wrapper for compatibility with Mustache.js, quirks and all
17
+
18
+
19
+
20
+ var Hogan = {};
21
+
22
+ (function (Hogan) {
23
+ Hogan.Template = function constructor(renderFunc, text, compiler) {
24
+ if (renderFunc) {
25
+ this.r = renderFunc;
26
+ }
27
+ this.c = compiler;
28
+ this.text = text || '';
29
+ }
30
+
31
+ Hogan.Template.prototype = {
32
+ // render: replaced by generated code.
33
+ r: function (context, partials, indent) { return ''; },
34
+
35
+ // variable escaping
36
+ v: hoganEscape,
37
+
38
+ render: function render(context, partials, indent) {
39
+ return this.ri([context], partials || {}, indent);
40
+ },
41
+
42
+ // render internal -- a hook for overrides that catches partials too
43
+ ri: function (context, partials, indent) {
44
+ return this.r(context, partials, indent);
45
+ },
46
+
47
+ // tries to find a partial in the curent scope and render it
48
+ rp: function(name, context, partials, indent) {
49
+ var partial = partials[name];
50
+
51
+ if (!partial) {
52
+ return '';
53
+ }
54
+
55
+ if (this.c && typeof partial == 'string') {
56
+ partial = this.c.compile(partial);
57
+ }
58
+
59
+ return partial.ri(context, partials, indent);
60
+ },
61
+
62
+ // render a section
63
+ rs: function(context, partials, section) {
64
+ var buf = '',
65
+ tail = context[context.length - 1];
66
+
67
+ if (!isArray(tail)) {
68
+ return buf = section(context, partials);
69
+ }
70
+
71
+ for (var i = 0; i < tail.length; i++) {
72
+ context.push(tail[i]);
73
+ buf += section(context, partials);
74
+ context.pop();
75
+ }
76
+
77
+ return buf;
78
+ },
79
+
80
+ // maybe start a section
81
+ s: function(val, ctx, partials, inverted, start, end, tags) {
82
+ var pass;
83
+
84
+ if (isArray(val) && val.length === 0) {
85
+ return false;
86
+ }
87
+
88
+ if (typeof val == 'function') {
89
+ val = this.ls(val, ctx, partials, inverted, start, end, tags);
90
+ }
91
+
92
+ pass = (val === '') || !!val;
93
+
94
+ if (!inverted && pass && ctx) {
95
+ ctx.push((typeof val == 'object') ? val : ctx[ctx.length - 1]);
96
+ }
97
+
98
+ return pass;
99
+ },
100
+
101
+ // find values with dotted names
102
+ d: function(key, ctx, partials, returnFound) {
103
+ var names = key.split('.'),
104
+ val = this.f(names[0], ctx, partials, returnFound),
105
+ cx = null;
106
+
107
+ if (key === '.' && isArray(ctx[ctx.length - 2])) {
108
+ return ctx[ctx.length - 1];
109
+ }
110
+
111
+ for (var i = 1; i < names.length; i++) {
112
+ if (val && typeof val == 'object' && names[i] in val) {
113
+ cx = val;
114
+ val = val[names[i]];
115
+ } else {
116
+ val = '';
117
+ }
118
+ }
119
+
120
+ if (returnFound && !val) {
121
+ return false;
122
+ }
123
+
124
+ if (!returnFound && typeof val == 'function') {
125
+ ctx.push(cx);
126
+ val = this.lv(val, ctx, partials);
127
+ ctx.pop();
128
+ }
129
+
130
+ return val;
131
+ },
132
+
133
+ // find values with normal names
134
+ f: function(key, ctx, partials, returnFound) {
135
+ var val = false,
136
+ v = null,
137
+ found = false;
138
+
139
+ for (var i = ctx.length - 1; i >= 0; i--) {
140
+ v = ctx[i];
141
+ if (v && typeof v == 'object' && key in v) {
142
+ val = v[key];
143
+ found = true;
144
+ break;
145
+ }
146
+ }
147
+
148
+ if (!found) {
149
+ return (returnFound) ? false : "";
150
+ }
151
+
152
+ if (!returnFound && typeof val == 'function') {
153
+ val = this.lv(val, ctx, partials);
154
+ }
155
+
156
+ return val;
157
+ },
158
+
159
+ // higher order templates
160
+ ho: function(val, cx, partials, text, tags) {
161
+ var compiler = this.c;
162
+ var t = val.call(cx, text, function(t) {
163
+ return compiler.compile(t, {delimiters: tags}).render(cx, partials);
164
+ });
165
+ var s = compiler.compile(t.toString(), {delimiters: tags}).render(cx, partials);
166
+ this.b = s;
167
+ return false;
168
+ },
169
+
170
+ // higher order template result buffer
171
+ b: '',
172
+
173
+ // lambda replace section
174
+ ls: function(val, ctx, partials, inverted, start, end, tags) {
175
+ var cx = ctx[ctx.length - 1],
176
+ t = null;
177
+
178
+ if (!inverted && this.c && val.length > 0) {
179
+ return this.ho(val, cx, partials, this.text.substring(start, end), tags);
180
+ }
181
+
182
+ t = val.call(cx);
183
+
184
+ if (typeof t == 'function') {
185
+ if (inverted) {
186
+ return true;
187
+ } else if (this.c) {
188
+ return this.ho(t, cx, partials, this.text.substring(start, end), tags);
189
+ }
190
+ }
191
+
192
+ return t;
193
+ },
194
+
195
+ // lambda replace variable
196
+ lv: function(val, ctx, partials) {
197
+ var cx = ctx[ctx.length - 1];
198
+ var result = val.call(cx);
199
+ if (typeof result == 'function') {
200
+ result = result.call(cx);
201
+ }
202
+ result = result.toString();
203
+
204
+ if (this.c && ~result.indexOf("{{")) {
205
+ return this.c.compile(result).render(cx, partials);
206
+ }
207
+
208
+ return result;
209
+ }
210
+
211
+ };
212
+
213
+ var rAmp = /&/g,
214
+ rLt = /</g,
215
+ rGt = />/g,
216
+ rApos =/\'/g,
217
+ rQuot = /\"/g,
218
+ hChars =/[&<>\"\']/;
219
+
220
+ function hoganEscape(str) {
221
+ str = String((str === null || str === undefined) ? '' : str);
222
+ return hChars.test(str) ?
223
+ str
224
+ .replace(rAmp,'&amp;')
225
+ .replace(rLt,'&lt;')
226
+ .replace(rGt,'&gt;')
227
+ .replace(rApos,'&#39;')
228
+ .replace(rQuot, '&quot;') :
229
+ str;
230
+ }
231
+
232
+ var isArray = Array.isArray || function(a) {
233
+ return Object.prototype.toString.call(a) === '[object Array]';
234
+ };
235
+
236
+ })(typeof exports !== 'undefined' ? exports : Hogan);
237
+
238
+
239
+
240
+
241
+ (function (Hogan) {
242
+ // Setup regex assignments
243
+ // remove whitespace according to Mustache spec
244
+ var rIsWhitespace = /\S/,
245
+ rQuot = /\"/g,
246
+ rNewline = /\n/g,
247
+ rCr = /\r/g,
248
+ rSlash = /\\/g,
249
+ tagTypes = {
250
+ '#': 1, '^': 2, '/': 3, '!': 4, '>': 5,
251
+ '<': 6, '=': 7, '_v': 8, '{': 9, '&': 10
252
+ };
253
+
254
+ Hogan.scan = function scan(text, delimiters) {
255
+ var len = text.length,
256
+ IN_TEXT = 0,
257
+ IN_TAG_TYPE = 1,
258
+ IN_TAG = 2,
259
+ state = IN_TEXT,
260
+ tagType = null,
261
+ tag = null,
262
+ buf = '',
263
+ tokens = [],
264
+ seenTag = false,
265
+ i = 0,
266
+ lineStart = 0,
267
+ otag = '{{',
268
+ ctag = '}}';
269
+
270
+ function addBuf() {
271
+ if (buf.length > 0) {
272
+ tokens.push(new String(buf));
273
+ buf = '';
274
+ }
275
+ }
276
+
277
+ function lineIsWhitespace() {
278
+ var isAllWhitespace = true;
279
+ for (var j = lineStart; j < tokens.length; j++) {
280
+ isAllWhitespace =
281
+ (tokens[j].tag && tagTypes[tokens[j].tag] < tagTypes['_v']) ||
282
+ (!tokens[j].tag && tokens[j].match(rIsWhitespace) === null);
283
+ if (!isAllWhitespace) {
284
+ return false;
285
+ }
286
+ }
287
+
288
+ return isAllWhitespace;
289
+ }
290
+
291
+ function filterLine(haveSeenTag, noNewLine) {
292
+ addBuf();
293
+
294
+ if (haveSeenTag && lineIsWhitespace()) {
295
+ for (var j = lineStart, next; j < tokens.length; j++) {
296
+ if (!tokens[j].tag) {
297
+ if ((next = tokens[j+1]) && next.tag == '>') {
298
+ // set indent to token value
299
+ next.indent = tokens[j].toString()
300
+ }
301
+ tokens.splice(j, 1);
302
+ }
303
+ }
304
+ } else if (!noNewLine) {
305
+ tokens.push({tag:'\n'});
306
+ }
307
+
308
+ seenTag = false;
309
+ lineStart = tokens.length;
310
+ }
311
+
312
+ function changeDelimiters(text, index) {
313
+ var close = '=' + ctag,
314
+ closeIndex = text.indexOf(close, index),
315
+ delimiters = trim(
316
+ text.substring(text.indexOf('=', index) + 1, closeIndex)
317
+ ).split(' ');
318
+
319
+ otag = delimiters[0];
320
+ ctag = delimiters[1];
321
+
322
+ return closeIndex + close.length - 1;
323
+ }
324
+
325
+ if (delimiters) {
326
+ delimiters = delimiters.split(' ');
327
+ otag = delimiters[0];
328
+ ctag = delimiters[1];
329
+ }
330
+
331
+ for (i = 0; i < len; i++) {
332
+ if (state == IN_TEXT) {
333
+ if (tagChange(otag, text, i)) {
334
+ --i;
335
+ addBuf();
336
+ state = IN_TAG_TYPE;
337
+ } else {
338
+ if (text.charAt(i) == '\n') {
339
+ filterLine(seenTag);
340
+ } else {
341
+ buf += text.charAt(i);
342
+ }
343
+ }
344
+ } else if (state == IN_TAG_TYPE) {
345
+ i += otag.length - 1;
346
+ tag = tagTypes[text.charAt(i + 1)];
347
+ tagType = tag ? text.charAt(i + 1) : '_v';
348
+ if (tagType == '=') {
349
+ i = changeDelimiters(text, i);
350
+ state = IN_TEXT;
351
+ } else {
352
+ if (tag) {
353
+ i++;
354
+ }
355
+ state = IN_TAG;
356
+ }
357
+ seenTag = i;
358
+ } else {
359
+ if (tagChange(ctag, text, i)) {
360
+ tokens.push({tag: tagType, n: trim(buf), otag: otag, ctag: ctag,
361
+ i: (tagType == '/') ? seenTag - ctag.length : i + otag.length});
362
+ buf = '';
363
+ i += ctag.length - 1;
364
+ state = IN_TEXT;
365
+ if (tagType == '{') {
366
+ if (ctag == '}}') {
367
+ i++;
368
+ } else {
369
+ cleanTripleStache(tokens[tokens.length - 1]);
370
+ }
371
+ }
372
+ } else {
373
+ buf += text.charAt(i);
374
+ }
375
+ }
376
+ }
377
+
378
+ filterLine(seenTag, true);
379
+
380
+ return tokens;
381
+ }
382
+
383
+ function cleanTripleStache(token) {
384
+ if (token.n.substr(token.n.length - 1) === '}') {
385
+ token.n = token.n.substring(0, token.n.length - 1);
386
+ }
387
+ }
388
+
389
+ function trim(s) {
390
+ if (s.trim) {
391
+ return s.trim();
392
+ }
393
+
394
+ return s.replace(/^\s*|\s*$/g, '');
395
+ }
396
+
397
+ function tagChange(tag, text, index) {
398
+ if (text.charAt(index) != tag.charAt(0)) {
399
+ return false;
400
+ }
401
+
402
+ for (var i = 1, l = tag.length; i < l; i++) {
403
+ if (text.charAt(index + i) != tag.charAt(i)) {
404
+ return false;
405
+ }
406
+ }
407
+
408
+ return true;
409
+ }
410
+
411
+ function buildTree(tokens, kind, stack, customTags) {
412
+ var instructions = [],
413
+ opener = null,
414
+ token = null;
415
+
416
+ while (tokens.length > 0) {
417
+ token = tokens.shift();
418
+ if (token.tag == '#' || token.tag == '^' || isOpener(token, customTags)) {
419
+ stack.push(token);
420
+ token.nodes = buildTree(tokens, token.tag, stack, customTags);
421
+ instructions.push(token);
422
+ } else if (token.tag == '/') {
423
+ if (stack.length === 0) {
424
+ throw new Error('Closing tag without opener: /' + token.n);
425
+ }
426
+ opener = stack.pop();
427
+ if (token.n != opener.n && !isCloser(token.n, opener.n, customTags)) {
428
+ throw new Error('Nesting error: ' + opener.n + ' vs. ' + token.n);
429
+ }
430
+ opener.end = token.i;
431
+ return instructions;
432
+ } else {
433
+ instructions.push(token);
434
+ }
435
+ }
436
+
437
+ if (stack.length > 0) {
438
+ throw new Error('missing closing tag: ' + stack.pop().n);
439
+ }
440
+
441
+ return instructions;
442
+ }
443
+
444
+ function isOpener(token, tags) {
445
+ for (var i = 0, l = tags.length; i < l; i++) {
446
+ if (tags[i].o == token.n) {
447
+ token.tag = '#';
448
+ return true;
449
+ }
450
+ }
451
+ }
452
+
453
+ function isCloser(close, open, tags) {
454
+ for (var i = 0, l = tags.length; i < l; i++) {
455
+ if (tags[i].c == close && tags[i].o == open) {
456
+ return true;
457
+ }
458
+ }
459
+ }
460
+
461
+ function writeCode(tree) {
462
+ return 'i = i || "";var b = i + "";var _ = this;' + walk(tree) + 'return b;';
463
+ }
464
+
465
+ Hogan.generate = function (code, text, options) {
466
+ if (options.asString) {
467
+ return 'function(c,p,i){' + code + ';}';
468
+ }
469
+
470
+ return new Hogan.Template(new Function('c', 'p', 'i', code), text, Hogan);
471
+ }
472
+
473
+ function esc(s) {
474
+ return s.replace(rSlash, '\\\\')
475
+ .replace(rQuot, '\\\"')
476
+ .replace(rNewline, '\\n')
477
+ .replace(rCr, '\\r');
478
+ }
479
+
480
+ function chooseMethod(s) {
481
+ return (~s.indexOf('.')) ? 'd' : 'f';
482
+ }
483
+
484
+ function walk(tree) {
485
+ var code = '';
486
+ for (var i = 0, l = tree.length; i < l; i++) {
487
+ var tag = tree[i].tag;
488
+ if (tag == '#') {
489
+ code += section(tree[i].nodes, tree[i].n, chooseMethod(tree[i].n),
490
+ tree[i].i, tree[i].end, tree[i].otag + " " + tree[i].ctag);
491
+ } else if (tag == '^') {
492
+ code += invertedSection(tree[i].nodes, tree[i].n,
493
+ chooseMethod(tree[i].n));
494
+ } else if (tag == '<' || tag == '>') {
495
+ code += partial(tree[i]);
496
+ } else if (tag == '{' || tag == '&') {
497
+ code += tripleStache(tree[i].n, chooseMethod(tree[i].n));
498
+ } else if (tag == '\n') {
499
+ code += text('"\\n"' + (tree.length-1 == i ? '' : ' + i'));
500
+ } else if (tag == '_v') {
501
+ code += variable(tree[i].n, chooseMethod(tree[i].n));
502
+ } else if (tag === undefined) {
503
+ code += text('"' + esc(tree[i]) + '"');
504
+ }
505
+ }
506
+ return code;
507
+ }
508
+
509
+ function section(nodes, id, method, start, end, tags) {
510
+ return 'if(_.s(_.' + method + '("' + esc(id) + '",c,p,1),' +
511
+ 'c,p,0,' + start + ',' + end + ', "' + tags + '")){' +
512
+ 'b += _.rs(c,p,' +
513
+ 'function(c,p){ var b = "";' +
514
+ walk(nodes) +
515
+ 'return b;});c.pop();}' +
516
+ 'else{b += _.b; _.b = ""};';
517
+ }
518
+
519
+ function invertedSection(nodes, id, method) {
520
+ return 'if (!_.s(_.' + method + '("' + esc(id) + '",c,p,1),c,p,1,0,0,"")){' +
521
+ walk(nodes) +
522
+ '};';
523
+ }
524
+
525
+ function partial(tok) {
526
+ return 'b += _.rp("' + esc(tok.n) + '",c,p,"' + (tok.indent || '') + '");';
527
+ }
528
+
529
+ function tripleStache(id, method) {
530
+ return 'b += (_.' + method + '("' + esc(id) + '",c,p,0));';
531
+ }
532
+
533
+ function variable(id, method) {
534
+ return 'b += (_.v(_.' + method + '("' + esc(id) + '",c,p,0)));';
535
+ }
536
+
537
+ function text(id) {
538
+ return 'b += ' + id + ';';
539
+ }
540
+
541
+ Hogan.parse = function(tokens, options) {
542
+ options = options || {};
543
+ return buildTree(tokens, '', [], options.sectionTags || []);
544
+ },
545
+
546
+ Hogan.cache = {};
547
+
548
+ Hogan.compile = function(text, options) {
549
+ // options
550
+ //
551
+ // asString: false (default)
552
+ //
553
+ // sectionTags: [{o: '_foo', c: 'foo'}]
554
+ // An array of object with o and c fields that indicate names for custom
555
+ // section tags. The example above allows parsing of {{_foo}}{{/foo}}.
556
+ //
557
+ // delimiters: A string that overrides the default delimiters.
558
+ // Example: "<% %>"
559
+ //
560
+ options = options || {};
561
+
562
+ var key = text + '||' + !!options.asString;
563
+
564
+ var t = this.cache[key];
565
+
566
+ if (t) {
567
+ return t;
568
+ }
569
+
570
+ t = this.generate(writeCode(this.parse(this.scan(text, options.delimiters), options)), text, options);
571
+ return this.cache[key] = t;
572
+ };
573
+ })(typeof exports !== 'undefined' ? exports : Hogan);
574
+
575
+
576
+ var Mustache = (function (Hogan) {
577
+
578
+ // Mustache.js has non-spec partial context behavior
579
+ function mustachePartial(name, context, partials, indent) {
580
+ var partialScope = this.f(name, context, partials, 0);
581
+ var cx = context;
582
+ if (partialScope) {
583
+ cx = cx.concat(partialScope);
584
+ }
585
+
586
+ return Hogan.Template.prototype.rp.call(this, name, cx, partials, indent);
587
+ }
588
+
589
+ var HoganTemplateWrapper = function(renderFunc, text, compiler){
590
+ this.rp = mustachePartial;
591
+ Hogan.Template.call(this, renderFunc, text, compiler);
592
+ };
593
+ HoganTemplateWrapper.prototype = Hogan.Template.prototype;
594
+
595
+ // Add a wrapper for Hogan's generate method. Mustache and Hogan keep
596
+ // separate caches, and Mustache returns wrapped templates.
597
+ var wrapper;
598
+ var HoganWrapper = function(){
599
+ this.cache = {};
600
+ this.generate = function(code, text, options) {
601
+ return new HoganTemplateWrapper(new Function('c', 'p', 'i', code), text, wrapper);
602
+ }
603
+ };
604
+ HoganWrapper.prototype = Hogan;
605
+ wrapper = new HoganWrapper();
606
+
607
+ return {
608
+ to_html: function(text, data, partials, sendFun) {
609
+ var template = wrapper.compile(text);
610
+ var result = template.render(data, partials);
611
+ if (!sendFun) {
612
+ return result;
613
+ }
614
+
615
+ sendFun(result);
616
+ }
617
+ }
618
+
619
+ })(Hogan);