locomotivecms 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (910) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generators/locomotive/install/templates/mongoid_heroku.yml +3 -3
  3. data/lib/locomotive/version.rb +1 -1
  4. data/spec/requests/locomotive/steam/cache_spec.rb +1 -1
  5. metadata +4 -911
  6. data/vendor/assets/components/locomotive_sources/backbone/LICENSE +0 -22
  7. data/vendor/assets/components/locomotive_sources/backbone/backbone-min.js +0 -2
  8. data/vendor/assets/components/locomotive_sources/backbone/backbone-min.map +0 -1
  9. data/vendor/assets/components/locomotive_sources/backbone/backbone.js +0 -1894
  10. data/vendor/assets/components/locomotive_sources/backbone/bower.json +0 -8
  11. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/Gruntfile.js +0 -82
  12. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/LICENSE +0 -20
  13. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/README.md +0 -92
  14. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/bootstrap-tagsinput.jquery.json +0 -27
  15. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/bower.json +0 -42
  16. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-angular.js +0 -87
  17. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-angular.min.js +0 -7
  18. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-angular.min.js.map +0 -1
  19. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-typeahead.css +0 -49
  20. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.css +0 -55
  21. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.js +0 -663
  22. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.less +0 -50
  23. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js +0 -7
  24. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js.map +0 -1
  25. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.zip +0 -0
  26. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app.css +0 -67
  27. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app.js +0 -15
  28. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app_bs2.js +0 -74
  29. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app_bs3.js +0 -95
  30. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/cities.json +0 -16
  31. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/citynames.json +0 -16
  32. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/bootstrap-2.3.2.html +0 -666
  33. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/index.html +0 -742
  34. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/karma.conf.js +0 -20
  35. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/package.json +0 -47
  36. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput-angular.js +0 -87
  37. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput-typeahead.css +0 -49
  38. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput.css +0 -55
  39. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput.js +0 -663
  40. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/CONTRIBUTING.md +0 -38
  41. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/Gruntfile.js +0 -191
  42. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/LICENSE +0 -21
  43. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/README.md +0 -37
  44. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/bower.json +0 -35
  45. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker-standalone.css +0 -103
  46. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css +0 -373
  47. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css +0 -5
  48. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js +0 -9
  49. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/component.json +0 -9
  50. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/composer.json +0 -28
  51. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/ChangeLog.md +0 -222
  52. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/ContributorsGuide.md +0 -126
  53. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Events.md +0 -96
  54. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Extras.md +0 -95
  55. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/FAQ.md +0 -22
  56. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Functions.md +0 -670
  57. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Installing.md +0 -161
  58. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Options.md +0 -473
  59. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Version 4 Changelog.md +0 -6
  60. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Version 4 Contributors guide.md +0 -6
  61. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/index.md +0 -592
  62. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/mkdocs.yml +0 -17
  63. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/package.json +0 -43
  64. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js +0 -2552
  65. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/less/_bootstrap-datetimepicker.less +0 -352
  66. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/less/bootstrap-datetimepicker-build.less +0 -17
  67. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/nuget/Bootstrap.v3.Datetimepicker.CSS.nuspec +0 -34
  68. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/nuget/Bootstrap.v3.Datetimepicker.nuspec +0 -34
  69. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/nuget/NuGet.exe +0 -0
  70. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/nuget/install.ps1 +0 -2
  71. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/sass/_bootstrap-datetimepicker.scss +0 -343
  72. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/sass/bootstrap-datetimepicker-build.scss +0 -16
  73. data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/tasks/bump_version.js +0 -88
  74. data/vendor/assets/components/locomotive_sources/jquery/MIT-LICENSE.txt +0 -21
  75. data/vendor/assets/components/locomotive_sources/jquery/bower.json +0 -28
  76. data/vendor/assets/components/locomotive_sources/jquery/dist/jquery.js +0 -9210
  77. data/vendor/assets/components/locomotive_sources/jquery/dist/jquery.min.js +0 -5
  78. data/vendor/assets/components/locomotive_sources/jquery/dist/jquery.min.map +0 -1
  79. data/vendor/assets/components/locomotive_sources/jquery/src/ajax.js +0 -786
  80. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/jsonp.js +0 -89
  81. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/load.js +0 -75
  82. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/parseJSON.js +0 -13
  83. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/parseXML.js +0 -28
  84. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/script.js +0 -64
  85. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/var/nonce.js +0 -5
  86. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/var/rquery.js +0 -3
  87. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/xhr.js +0 -136
  88. data/vendor/assets/components/locomotive_sources/jquery/src/attributes.js +0 -11
  89. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/attr.js +0 -141
  90. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/classes.js +0 -158
  91. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/prop.js +0 -94
  92. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/support.js +0 -35
  93. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/val.js +0 -161
  94. data/vendor/assets/components/locomotive_sources/jquery/src/callbacks.js +0 -205
  95. data/vendor/assets/components/locomotive_sources/jquery/src/core.js +0 -502
  96. data/vendor/assets/components/locomotive_sources/jquery/src/core/access.js +0 -60
  97. data/vendor/assets/components/locomotive_sources/jquery/src/core/init.js +0 -123
  98. data/vendor/assets/components/locomotive_sources/jquery/src/core/parseHTML.js +0 -39
  99. data/vendor/assets/components/locomotive_sources/jquery/src/core/ready.js +0 -97
  100. data/vendor/assets/components/locomotive_sources/jquery/src/core/var/rsingleTag.js +0 -4
  101. data/vendor/assets/components/locomotive_sources/jquery/src/css.js +0 -450
  102. data/vendor/assets/components/locomotive_sources/jquery/src/css/addGetHookIf.js +0 -22
  103. data/vendor/assets/components/locomotive_sources/jquery/src/css/curCSS.js +0 -57
  104. data/vendor/assets/components/locomotive_sources/jquery/src/css/defaultDisplay.js +0 -70
  105. data/vendor/assets/components/locomotive_sources/jquery/src/css/hiddenVisibleSelectors.js +0 -15
  106. data/vendor/assets/components/locomotive_sources/jquery/src/css/support.js +0 -96
  107. data/vendor/assets/components/locomotive_sources/jquery/src/css/swap.js +0 -28
  108. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/cssExpand.js +0 -3
  109. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/getStyles.js +0 -12
  110. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/isHidden.js +0 -13
  111. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/rmargin.js +0 -3
  112. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/rnumnonpx.js +0 -5
  113. data/vendor/assets/components/locomotive_sources/jquery/src/data.js +0 -178
  114. data/vendor/assets/components/locomotive_sources/jquery/src/data/Data.js +0 -181
  115. data/vendor/assets/components/locomotive_sources/jquery/src/data/accepts.js +0 -20
  116. data/vendor/assets/components/locomotive_sources/jquery/src/data/var/data_priv.js +0 -5
  117. data/vendor/assets/components/locomotive_sources/jquery/src/data/var/data_user.js +0 -5
  118. data/vendor/assets/components/locomotive_sources/jquery/src/deferred.js +0 -149
  119. data/vendor/assets/components/locomotive_sources/jquery/src/deprecated.js +0 -13
  120. data/vendor/assets/components/locomotive_sources/jquery/src/dimensions.js +0 -50
  121. data/vendor/assets/components/locomotive_sources/jquery/src/effects.js +0 -648
  122. data/vendor/assets/components/locomotive_sources/jquery/src/effects/Tween.js +0 -114
  123. data/vendor/assets/components/locomotive_sources/jquery/src/effects/animatedSelector.js +0 -13
  124. data/vendor/assets/components/locomotive_sources/jquery/src/event.js +0 -868
  125. data/vendor/assets/components/locomotive_sources/jquery/src/event/ajax.js +0 -13
  126. data/vendor/assets/components/locomotive_sources/jquery/src/event/alias.js +0 -39
  127. data/vendor/assets/components/locomotive_sources/jquery/src/event/support.js +0 -9
  128. data/vendor/assets/components/locomotive_sources/jquery/src/exports/amd.js +0 -24
  129. data/vendor/assets/components/locomotive_sources/jquery/src/exports/global.js +0 -32
  130. data/vendor/assets/components/locomotive_sources/jquery/src/intro.js +0 -44
  131. data/vendor/assets/components/locomotive_sources/jquery/src/jquery.js +0 -37
  132. data/vendor/assets/components/locomotive_sources/jquery/src/manipulation.js +0 -580
  133. data/vendor/assets/components/locomotive_sources/jquery/src/manipulation/_evalUrl.js +0 -18
  134. data/vendor/assets/components/locomotive_sources/jquery/src/manipulation/support.js +0 -32
  135. data/vendor/assets/components/locomotive_sources/jquery/src/manipulation/var/rcheckableType.js +0 -3
  136. data/vendor/assets/components/locomotive_sources/jquery/src/offset.js +0 -207
  137. data/vendor/assets/components/locomotive_sources/jquery/src/outro.js +0 -1
  138. data/vendor/assets/components/locomotive_sources/jquery/src/queue.js +0 -142
  139. data/vendor/assets/components/locomotive_sources/jquery/src/queue/delay.js +0 -22
  140. data/vendor/assets/components/locomotive_sources/jquery/src/selector-native.js +0 -172
  141. data/vendor/assets/components/locomotive_sources/jquery/src/selector-sizzle.js +0 -14
  142. data/vendor/assets/components/locomotive_sources/jquery/src/selector.js +0 -1
  143. data/vendor/assets/components/locomotive_sources/jquery/src/serialize.js +0 -111
  144. data/vendor/assets/components/locomotive_sources/jquery/src/sizzle/dist/sizzle.js +0 -2067
  145. data/vendor/assets/components/locomotive_sources/jquery/src/sizzle/dist/sizzle.min.js +0 -3
  146. data/vendor/assets/components/locomotive_sources/jquery/src/sizzle/dist/sizzle.min.map +0 -1
  147. data/vendor/assets/components/locomotive_sources/jquery/src/traversing.js +0 -199
  148. data/vendor/assets/components/locomotive_sources/jquery/src/traversing/findFilter.js +0 -100
  149. data/vendor/assets/components/locomotive_sources/jquery/src/traversing/var/rneedsContext.js +0 -6
  150. data/vendor/assets/components/locomotive_sources/jquery/src/var/arr.js +0 -3
  151. data/vendor/assets/components/locomotive_sources/jquery/src/var/class2type.js +0 -4
  152. data/vendor/assets/components/locomotive_sources/jquery/src/var/concat.js +0 -5
  153. data/vendor/assets/components/locomotive_sources/jquery/src/var/hasOwn.js +0 -5
  154. data/vendor/assets/components/locomotive_sources/jquery/src/var/indexOf.js +0 -5
  155. data/vendor/assets/components/locomotive_sources/jquery/src/var/pnum.js +0 -3
  156. data/vendor/assets/components/locomotive_sources/jquery/src/var/push.js +0 -5
  157. data/vendor/assets/components/locomotive_sources/jquery/src/var/rnotwhite.js +0 -3
  158. data/vendor/assets/components/locomotive_sources/jquery/src/var/slice.js +0 -5
  159. data/vendor/assets/components/locomotive_sources/jquery/src/var/strundefined.js +0 -3
  160. data/vendor/assets/components/locomotive_sources/jquery/src/var/support.js +0 -4
  161. data/vendor/assets/components/locomotive_sources/jquery/src/var/toString.js +0 -5
  162. data/vendor/assets/components/locomotive_sources/jquery/src/wrap.js +0 -79
  163. data/vendor/assets/components/locomotive_sources/moment-timezone/LICENSE +0 -20
  164. data/vendor/assets/components/locomotive_sources/moment-timezone/README.md +0 -36
  165. data/vendor/assets/components/locomotive_sources/moment-timezone/bower.json +0 -18
  166. data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone-with-data-2010-2020.js +0 -1189
  167. data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone-with-data-2010-2020.min.js +0 -7
  168. data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone-with-data.js +0 -1189
  169. data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone-with-data.min.js +0 -7
  170. data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone.min.js +0 -6
  171. data/vendor/assets/components/locomotive_sources/moment-timezone/changelog.md +0 -101
  172. data/vendor/assets/components/locomotive_sources/moment-timezone/composer.json +0 -43
  173. data/vendor/assets/components/locomotive_sources/moment-timezone/data/meta/latest.json +0 -5012
  174. data/vendor/assets/components/locomotive_sources/moment-timezone/data/packed/latest.json +0 -590
  175. data/vendor/assets/components/locomotive_sources/moment-timezone/data/unpacked/latest.json +0 -124081
  176. data/vendor/assets/components/locomotive_sources/moment-timezone/moment-timezone-utils.js +0 -316
  177. data/vendor/assets/components/locomotive_sources/moment-timezone/moment-timezone.js +0 -599
  178. data/vendor/assets/components/locomotive_sources/moment/CHANGELOG.md +0 -496
  179. data/vendor/assets/components/locomotive_sources/moment/LICENSE +0 -22
  180. data/vendor/assets/components/locomotive_sources/moment/README.md +0 -58
  181. data/vendor/assets/components/locomotive_sources/moment/bower.json +0 -22
  182. data/vendor/assets/components/locomotive_sources/moment/locale/af.js +0 -73
  183. data/vendor/assets/components/locomotive_sources/moment/locale/ar-ma.js +0 -59
  184. data/vendor/assets/components/locomotive_sources/moment/locale/ar-sa.js +0 -103
  185. data/vendor/assets/components/locomotive_sources/moment/locale/ar-tn.js +0 -57
  186. data/vendor/assets/components/locomotive_sources/moment/locale/ar.js +0 -136
  187. data/vendor/assets/components/locomotive_sources/moment/locale/az.js +0 -104
  188. data/vendor/assets/components/locomotive_sources/moment/locale/be.js +0 -134
  189. data/vendor/assets/components/locomotive_sources/moment/locale/bg.js +0 -90
  190. data/vendor/assets/components/locomotive_sources/moment/locale/bn.js +0 -113
  191. data/vendor/assets/components/locomotive_sources/moment/locale/bo.js +0 -110
  192. data/vendor/assets/components/locomotive_sources/moment/locale/br.js +0 -107
  193. data/vendor/assets/components/locomotive_sources/moment/locale/bs.js +0 -141
  194. data/vendor/assets/components/locomotive_sources/moment/locale/ca.js +0 -79
  195. data/vendor/assets/components/locomotive_sources/moment/locale/cs.js +0 -171
  196. data/vendor/assets/components/locomotive_sources/moment/locale/cv.js +0 -63
  197. data/vendor/assets/components/locomotive_sources/moment/locale/cy.js +0 -79
  198. data/vendor/assets/components/locomotive_sources/moment/locale/da.js +0 -60
  199. data/vendor/assets/components/locomotive_sources/moment/locale/de-at.js +0 -77
  200. data/vendor/assets/components/locomotive_sources/moment/locale/de.js +0 -76
  201. data/vendor/assets/components/locomotive_sources/moment/locale/dv.js +0 -99
  202. data/vendor/assets/components/locomotive_sources/moment/locale/el.js +0 -98
  203. data/vendor/assets/components/locomotive_sources/moment/locale/en-au.js +0 -66
  204. data/vendor/assets/components/locomotive_sources/moment/locale/en-ca.js +0 -63
  205. data/vendor/assets/components/locomotive_sources/moment/locale/en-gb.js +0 -67
  206. data/vendor/assets/components/locomotive_sources/moment/locale/en-ie.js +0 -67
  207. data/vendor/assets/components/locomotive_sources/moment/locale/en-nz.js +0 -66
  208. data/vendor/assets/components/locomotive_sources/moment/locale/eo.js +0 -73
  209. data/vendor/assets/components/locomotive_sources/moment/locale/es.js +0 -79
  210. data/vendor/assets/components/locomotive_sources/moment/locale/et.js +0 -80
  211. data/vendor/assets/components/locomotive_sources/moment/locale/eu.js +0 -64
  212. data/vendor/assets/components/locomotive_sources/moment/locale/fa.js +0 -105
  213. data/vendor/assets/components/locomotive_sources/moment/locale/fi.js +0 -107
  214. data/vendor/assets/components/locomotive_sources/moment/locale/fo.js +0 -60
  215. data/vendor/assets/components/locomotive_sources/moment/locale/fr-ca.js +0 -58
  216. data/vendor/assets/components/locomotive_sources/moment/locale/fr-ch.js +0 -62
  217. data/vendor/assets/components/locomotive_sources/moment/locale/fr.js +0 -62
  218. data/vendor/assets/components/locomotive_sources/moment/locale/fy.js +0 -71
  219. data/vendor/assets/components/locomotive_sources/moment/locale/gd.js +0 -76
  220. data/vendor/assets/components/locomotive_sources/moment/locale/gl.js +0 -75
  221. data/vendor/assets/components/locomotive_sources/moment/locale/he.js +0 -82
  222. data/vendor/assets/components/locomotive_sources/moment/locale/hi.js +0 -123
  223. data/vendor/assets/components/locomotive_sources/moment/locale/hr.js +0 -143
  224. data/vendor/assets/components/locomotive_sources/moment/locale/hu.js +0 -109
  225. data/vendor/assets/components/locomotive_sources/moment/locale/hy-am.js +0 -95
  226. data/vendor/assets/components/locomotive_sources/moment/locale/id.js +0 -83
  227. data/vendor/assets/components/locomotive_sources/moment/locale/is.js +0 -127
  228. data/vendor/assets/components/locomotive_sources/moment/locale/it.js +0 -70
  229. data/vendor/assets/components/locomotive_sources/moment/locale/ja.js +0 -65
  230. data/vendor/assets/components/locomotive_sources/moment/locale/jv.js +0 -83
  231. data/vendor/assets/components/locomotive_sources/moment/locale/ka.js +0 -89
  232. data/vendor/assets/components/locomotive_sources/moment/locale/kk.js +0 -87
  233. data/vendor/assets/components/locomotive_sources/moment/locale/km.js +0 -58
  234. data/vendor/assets/components/locomotive_sources/moment/locale/ko.js +0 -68
  235. data/vendor/assets/components/locomotive_sources/moment/locale/lb.js +0 -134
  236. data/vendor/assets/components/locomotive_sources/moment/locale/lo.js +0 -69
  237. data/vendor/assets/components/locomotive_sources/moment/locale/lt.js +0 -115
  238. data/vendor/assets/components/locomotive_sources/moment/locale/lv.js +0 -96
  239. data/vendor/assets/components/locomotive_sources/moment/locale/me.js +0 -109
  240. data/vendor/assets/components/locomotive_sources/moment/locale/mk.js +0 -90
  241. data/vendor/assets/components/locomotive_sources/moment/locale/ml.js +0 -71
  242. data/vendor/assets/components/locomotive_sources/moment/locale/mr.js +0 -158
  243. data/vendor/assets/components/locomotive_sources/moment/locale/ms-my.js +0 -82
  244. data/vendor/assets/components/locomotive_sources/moment/locale/ms.js +0 -82
  245. data/vendor/assets/components/locomotive_sources/moment/locale/my.js +0 -93
  246. data/vendor/assets/components/locomotive_sources/moment/locale/nb.js +0 -61
  247. data/vendor/assets/components/locomotive_sources/moment/locale/ne.js +0 -121
  248. data/vendor/assets/components/locomotive_sources/moment/locale/nl.js +0 -71
  249. data/vendor/assets/components/locomotive_sources/moment/locale/nn.js +0 -60
  250. data/vendor/assets/components/locomotive_sources/moment/locale/pl.js +0 -105
  251. data/vendor/assets/components/locomotive_sources/moment/locale/pt-br.js +0 -60
  252. data/vendor/assets/components/locomotive_sources/moment/locale/pt.js +0 -64
  253. data/vendor/assets/components/locomotive_sources/moment/locale/ro.js +0 -74
  254. data/vendor/assets/components/locomotive_sources/moment/locale/ru.js +0 -166
  255. data/vendor/assets/components/locomotive_sources/moment/locale/se.js +0 -61
  256. data/vendor/assets/components/locomotive_sources/moment/locale/si.js +0 -66
  257. data/vendor/assets/components/locomotive_sources/moment/locale/sk.js +0 -150
  258. data/vendor/assets/components/locomotive_sources/moment/locale/sl.js +0 -160
  259. data/vendor/assets/components/locomotive_sources/moment/locale/sq.js +0 -69
  260. data/vendor/assets/components/locomotive_sources/moment/locale/sr-cyrl.js +0 -108
  261. data/vendor/assets/components/locomotive_sources/moment/locale/sr.js +0 -108
  262. data/vendor/assets/components/locomotive_sources/moment/locale/sv.js +0 -67
  263. data/vendor/assets/components/locomotive_sources/moment/locale/sw.js +0 -58
  264. data/vendor/assets/components/locomotive_sources/moment/locale/ta.js +0 -129
  265. data/vendor/assets/components/locomotive_sources/moment/locale/te.js +0 -88
  266. data/vendor/assets/components/locomotive_sources/moment/locale/th.js +0 -65
  267. data/vendor/assets/components/locomotive_sources/moment/locale/tl-ph.js +0 -62
  268. data/vendor/assets/components/locomotive_sources/moment/locale/tlh.js +0 -119
  269. data/vendor/assets/components/locomotive_sources/moment/locale/tr.js +0 -90
  270. data/vendor/assets/components/locomotive_sources/moment/locale/tzl.js +0 -87
  271. data/vendor/assets/components/locomotive_sources/moment/locale/tzm-latn.js +0 -58
  272. data/vendor/assets/components/locomotive_sources/moment/locale/tzm.js +0 -58
  273. data/vendor/assets/components/locomotive_sources/moment/locale/uk.js +0 -146
  274. data/vendor/assets/components/locomotive_sources/moment/locale/uz.js +0 -58
  275. data/vendor/assets/components/locomotive_sources/moment/locale/vi.js +0 -66
  276. data/vendor/assets/components/locomotive_sources/moment/locale/zh-cn.js +0 -127
  277. data/vendor/assets/components/locomotive_sources/moment/locale/zh-tw.js +0 -101
  278. data/vendor/assets/components/locomotive_sources/moment/min/locales.js +0 -7548
  279. data/vendor/assets/components/locomotive_sources/moment/min/locales.min.js +0 -72
  280. data/vendor/assets/components/locomotive_sources/moment/min/moment-with-locales.js +0 -11144
  281. data/vendor/assets/components/locomotive_sources/moment/min/moment-with-locales.min.js +0 -74
  282. data/vendor/assets/components/locomotive_sources/moment/min/moment.min.js +0 -7
  283. data/vendor/assets/components/locomotive_sources/moment/min/tests.js +0 -46196
  284. data/vendor/assets/components/locomotive_sources/moment/moment.js +0 -3606
  285. data/vendor/assets/components/locomotive_sources/moment/src/lib/create/check-overflow.js +0 -34
  286. data/vendor/assets/components/locomotive_sources/moment/src/lib/create/date-from-array.js +0 -21
  287. data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-anything.js +0 -101
  288. data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-array.js +0 -136
  289. data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-object.js +0 -16
  290. data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-string-and-array.js +0 -50
  291. data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-string-and-format.js +0 -104
  292. data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-string.js +0 -120
  293. data/vendor/assets/components/locomotive_sources/moment/src/lib/create/local.js +0 -5
  294. data/vendor/assets/components/locomotive_sources/moment/src/lib/create/parsing-flags.js +0 -22
  295. data/vendor/assets/components/locomotive_sources/moment/src/lib/create/utc.js +0 -5
  296. data/vendor/assets/components/locomotive_sources/moment/src/lib/create/valid.js +0 -37
  297. data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/abs.js +0 -18
  298. data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/add-subtract.js +0 -21
  299. data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/as.js +0 -55
  300. data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/bubble.js +0 -61
  301. data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/constructor.js +0 -41
  302. data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/create.js +0 -117
  303. data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/duration.js +0 -12
  304. data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/get.js +0 -25
  305. data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/humanize.js +0 -64
  306. data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/iso-string.js +0 -52
  307. data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/prototype.js +0 -48
  308. data/vendor/assets/components/locomotive_sources/moment/src/lib/format/format.js +0 -92
  309. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/calendar.js +0 -15
  310. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/constructor.js +0 -2
  311. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/en.js +0 -15
  312. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/formats.js +0 -23
  313. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/invalid.js +0 -5
  314. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/lists.js +0 -48
  315. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/locale.js +0 -35
  316. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/locales.js +0 -118
  317. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/ordinal.js +0 -7
  318. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/pre-post-format.js +0 -3
  319. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/prototype.js +0 -76
  320. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/relative.js +0 -29
  321. data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/set.js +0 -16
  322. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/add-subtract.js +0 -52
  323. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/calendar.js +0 -21
  324. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/clone.js +0 -5
  325. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/compare.js +0 -57
  326. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/constructor.js +0 -74
  327. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/creation-data.js +0 -9
  328. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/diff.js +0 -61
  329. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/format.js +0 -28
  330. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/from.js +0 -17
  331. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/get-set.js +0 -43
  332. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/locale.js +0 -34
  333. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/min-max.js +0 -63
  334. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/moment.js +0 -28
  335. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/now.js +0 -3
  336. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/prototype.js +0 -149
  337. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/start-end-of.js +0 -52
  338. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/to-type.js +0 -34
  339. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/to.js +0 -17
  340. data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/valid.js +0 -15
  341. data/vendor/assets/components/locomotive_sources/moment/src/lib/parse/regex.js +0 -54
  342. data/vendor/assets/components/locomotive_sources/moment/src/lib/parse/token.js +0 -32
  343. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/aliases.js +0 -29
  344. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/constants.js +0 -9
  345. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/day-of-month.js +0 -32
  346. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/day-of-week.js +0 -162
  347. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/day-of-year.js +0 -32
  348. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/hour.js +0 -129
  349. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/millisecond.js +0 -64
  350. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/minute.js +0 -24
  351. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/month.js +0 -209
  352. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/offset.js +0 -219
  353. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/quarter.js +0 -27
  354. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/second.js +0 -24
  355. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/timestamp.js +0 -20
  356. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/timezone.js +0 -16
  357. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/units.js +0 -20
  358. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/week-calendar-utils.js +0 -65
  359. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/week-year.js +0 -101
  360. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/week.js +0 -61
  361. data/vendor/assets/components/locomotive_sources/moment/src/lib/units/year.js +0 -70
  362. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/abs-ceil.js +0 -7
  363. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/abs-floor.js +0 -7
  364. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/compare-arrays.js +0 -16
  365. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/defaults.js +0 -10
  366. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/deprecate.js +0 -33
  367. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/extend.js +0 -19
  368. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/has-own-prop.js +0 -3
  369. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/hooks.js +0 -13
  370. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/is-array.js +0 -3
  371. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/is-date.js +0 -3
  372. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/is-function.js +0 -3
  373. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/is-undefined.js +0 -3
  374. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/map.js +0 -7
  375. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/to-int.js +0 -12
  376. data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/zero-fill.js +0 -7
  377. data/vendor/assets/components/locomotive_sources/moment/src/locale/af.js +0 -63
  378. data/vendor/assets/components/locomotive_sources/moment/src/locale/ar-ma.js +0 -50
  379. data/vendor/assets/components/locomotive_sources/moment/src/locale/ar-sa.js +0 -94
  380. data/vendor/assets/components/locomotive_sources/moment/src/locale/ar-tn.js +0 -48
  381. data/vendor/assets/components/locomotive_sources/moment/src/locale/ar.js +0 -127
  382. data/vendor/assets/components/locomotive_sources/moment/src/locale/az.js +0 -95
  383. data/vendor/assets/components/locomotive_sources/moment/src/locale/be.js +0 -125
  384. data/vendor/assets/components/locomotive_sources/moment/src/locale/bg.js +0 -81
  385. data/vendor/assets/components/locomotive_sources/moment/src/locale/bn.js +0 -104
  386. data/vendor/assets/components/locomotive_sources/moment/src/locale/bo.js +0 -101
  387. data/vendor/assets/components/locomotive_sources/moment/src/locale/br.js +0 -98
  388. data/vendor/assets/components/locomotive_sources/moment/src/locale/bs.js +0 -132
  389. data/vendor/assets/components/locomotive_sources/moment/src/locale/ca.js +0 -70
  390. data/vendor/assets/components/locomotive_sources/moment/src/locale/cs.js +0 -162
  391. data/vendor/assets/components/locomotive_sources/moment/src/locale/cv.js +0 -53
  392. data/vendor/assets/components/locomotive_sources/moment/src/locale/cy.js +0 -70
  393. data/vendor/assets/components/locomotive_sources/moment/src/locale/da.js +0 -51
  394. data/vendor/assets/components/locomotive_sources/moment/src/locale/de-at.js +0 -67
  395. data/vendor/assets/components/locomotive_sources/moment/src/locale/de.js +0 -66
  396. data/vendor/assets/components/locomotive_sources/moment/src/locale/dv.js +0 -89
  397. data/vendor/assets/components/locomotive_sources/moment/src/locale/el.js +0 -86
  398. data/vendor/assets/components/locomotive_sources/moment/src/locale/en-au.js +0 -57
  399. data/vendor/assets/components/locomotive_sources/moment/src/locale/en-ca.js +0 -54
  400. data/vendor/assets/components/locomotive_sources/moment/src/locale/en-gb.js +0 -58
  401. data/vendor/assets/components/locomotive_sources/moment/src/locale/en-ie.js +0 -58
  402. data/vendor/assets/components/locomotive_sources/moment/src/locale/en-nz.js +0 -56
  403. data/vendor/assets/components/locomotive_sources/moment/src/locale/eo.js +0 -64
  404. data/vendor/assets/components/locomotive_sources/moment/src/locale/es.js +0 -70
  405. data/vendor/assets/components/locomotive_sources/moment/src/locale/et.js +0 -71
  406. data/vendor/assets/components/locomotive_sources/moment/src/locale/eu.js +0 -55
  407. data/vendor/assets/components/locomotive_sources/moment/src/locale/fa.js +0 -96
  408. data/vendor/assets/components/locomotive_sources/moment/src/locale/fi.js +0 -98
  409. data/vendor/assets/components/locomotive_sources/moment/src/locale/fo.js +0 -51
  410. data/vendor/assets/components/locomotive_sources/moment/src/locale/fr-ca.js +0 -49
  411. data/vendor/assets/components/locomotive_sources/moment/src/locale/fr-ch.js +0 -53
  412. data/vendor/assets/components/locomotive_sources/moment/src/locale/fr.js +0 -53
  413. data/vendor/assets/components/locomotive_sources/moment/src/locale/fy.js +0 -62
  414. data/vendor/assets/components/locomotive_sources/moment/src/locale/gd.js +0 -67
  415. data/vendor/assets/components/locomotive_sources/moment/src/locale/gl.js +0 -66
  416. data/vendor/assets/components/locomotive_sources/moment/src/locale/he.js +0 -73
  417. data/vendor/assets/components/locomotive_sources/moment/src/locale/hi.js +0 -114
  418. data/vendor/assets/components/locomotive_sources/moment/src/locale/hr.js +0 -134
  419. data/vendor/assets/components/locomotive_sources/moment/src/locale/hu.js +0 -100
  420. data/vendor/assets/components/locomotive_sources/moment/src/locale/hy-am.js +0 -86
  421. data/vendor/assets/components/locomotive_sources/moment/src/locale/id.js +0 -74
  422. data/vendor/assets/components/locomotive_sources/moment/src/locale/is.js +0 -118
  423. data/vendor/assets/components/locomotive_sources/moment/src/locale/it.js +0 -61
  424. data/vendor/assets/components/locomotive_sources/moment/src/locale/ja.js +0 -56
  425. data/vendor/assets/components/locomotive_sources/moment/src/locale/jv.js +0 -73
  426. data/vendor/assets/components/locomotive_sources/moment/src/locale/ka.js +0 -80
  427. data/vendor/assets/components/locomotive_sources/moment/src/locale/kk.js +0 -77
  428. data/vendor/assets/components/locomotive_sources/moment/src/locale/km.js +0 -49
  429. data/vendor/assets/components/locomotive_sources/moment/src/locale/ko.js +0 -59
  430. data/vendor/assets/components/locomotive_sources/moment/src/locale/lb.js +0 -125
  431. data/vendor/assets/components/locomotive_sources/moment/src/locale/lo.js +0 -60
  432. data/vendor/assets/components/locomotive_sources/moment/src/locale/lt.js +0 -106
  433. data/vendor/assets/components/locomotive_sources/moment/src/locale/lv.js +0 -87
  434. data/vendor/assets/components/locomotive_sources/moment/src/locale/me.js +0 -99
  435. data/vendor/assets/components/locomotive_sources/moment/src/locale/mk.js +0 -81
  436. data/vendor/assets/components/locomotive_sources/moment/src/locale/ml.js +0 -62
  437. data/vendor/assets/components/locomotive_sources/moment/src/locale/mr.js +0 -149
  438. data/vendor/assets/components/locomotive_sources/moment/src/locale/ms-my.js +0 -73
  439. data/vendor/assets/components/locomotive_sources/moment/src/locale/ms.js +0 -73
  440. data/vendor/assets/components/locomotive_sources/moment/src/locale/my.js +0 -84
  441. data/vendor/assets/components/locomotive_sources/moment/src/locale/nb.js +0 -52
  442. data/vendor/assets/components/locomotive_sources/moment/src/locale/ne.js +0 -112
  443. data/vendor/assets/components/locomotive_sources/moment/src/locale/nl.js +0 -62
  444. data/vendor/assets/components/locomotive_sources/moment/src/locale/nn.js +0 -51
  445. data/vendor/assets/components/locomotive_sources/moment/src/locale/pl.js +0 -95
  446. data/vendor/assets/components/locomotive_sources/moment/src/locale/pt-br.js +0 -51
  447. data/vendor/assets/components/locomotive_sources/moment/src/locale/pt.js +0 -55
  448. data/vendor/assets/components/locomotive_sources/moment/src/locale/ro.js +0 -65
  449. data/vendor/assets/components/locomotive_sources/moment/src/locale/ru.js +0 -156
  450. data/vendor/assets/components/locomotive_sources/moment/src/locale/se.js +0 -51
  451. data/vendor/assets/components/locomotive_sources/moment/src/locale/si.js +0 -56
  452. data/vendor/assets/components/locomotive_sources/moment/src/locale/sk.js +0 -141
  453. data/vendor/assets/components/locomotive_sources/moment/src/locale/sl.js +0 -150
  454. data/vendor/assets/components/locomotive_sources/moment/src/locale/sq.js +0 -60
  455. data/vendor/assets/components/locomotive_sources/moment/src/locale/sr-cyrl.js +0 -99
  456. data/vendor/assets/components/locomotive_sources/moment/src/locale/sr.js +0 -99
  457. data/vendor/assets/components/locomotive_sources/moment/src/locale/sv.js +0 -58
  458. data/vendor/assets/components/locomotive_sources/moment/src/locale/sw.js +0 -49
  459. data/vendor/assets/components/locomotive_sources/moment/src/locale/ta.js +0 -120
  460. data/vendor/assets/components/locomotive_sources/moment/src/locale/te.js +0 -78
  461. data/vendor/assets/components/locomotive_sources/moment/src/locale/th.js +0 -56
  462. data/vendor/assets/components/locomotive_sources/moment/src/locale/tl-ph.js +0 -53
  463. data/vendor/assets/components/locomotive_sources/moment/src/locale/tlh.js +0 -109
  464. data/vendor/assets/components/locomotive_sources/moment/src/locale/tr.js +0 -81
  465. data/vendor/assets/components/locomotive_sources/moment/src/locale/tzl.js +0 -78
  466. data/vendor/assets/components/locomotive_sources/moment/src/locale/tzm-latn.js +0 -49
  467. data/vendor/assets/components/locomotive_sources/moment/src/locale/tzm.js +0 -49
  468. data/vendor/assets/components/locomotive_sources/moment/src/locale/uk.js +0 -137
  469. data/vendor/assets/components/locomotive_sources/moment/src/locale/uz.js +0 -49
  470. data/vendor/assets/components/locomotive_sources/moment/src/locale/vi.js +0 -57
  471. data/vendor/assets/components/locomotive_sources/moment/src/locale/zh-cn.js +0 -118
  472. data/vendor/assets/components/locomotive_sources/moment/src/locale/zh-tw.js +0 -91
  473. data/vendor/assets/components/locomotive_sources/moment/src/moment.js +0 -71
  474. data/vendor/assets/components/locomotive_sources/moment/templates/amd-named.js +0 -7
  475. data/vendor/assets/components/locomotive_sources/moment/templates/amd.js +0 -7
  476. data/vendor/assets/components/locomotive_sources/moment/templates/default.js +0 -5
  477. data/vendor/assets/components/locomotive_sources/moment/templates/globals.js +0 -5
  478. data/vendor/assets/components/locomotive_sources/moment/templates/locale-header.js +0 -6
  479. data/vendor/assets/components/locomotive_sources/moment/templates/test-header.js +0 -6
  480. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/Gemfile +0 -3
  481. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/Gruntfile.js +0 -110
  482. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/LICENSE +0 -8
  483. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/README.md +0 -91
  484. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/3.3.2.html +0 -4
  485. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/3.4.1.html +0 -4
  486. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/3.4.2.html +0 -4
  487. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/3.4.3.html +0 -4
  488. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/3.4.4.html +0 -4
  489. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/3.4.5.html +0 -4
  490. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/3.5.1.html +0 -4
  491. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/3.5.2.html +0 -4
  492. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/_config.yml +0 -13
  493. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/_includes/footer-links.html +0 -9
  494. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/_includes/footer.html +0 -10
  495. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/_includes/head.html +0 -13
  496. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/_includes/navbar.html +0 -21
  497. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/_includes/select2-select.html +0 -55
  498. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/_layouts/default.html +0 -489
  499. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/_layouts/minimal.html +0 -7
  500. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/_sass/_extends.sass +0 -4
  501. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/_sass/_mixins.sass +0 -9
  502. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/_sass/_select2-result-repository.sass +0 -40
  503. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/_sass/_variables.sass +0 -1
  504. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/css/bootstrap.min.css +0 -5
  505. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/css/gh-pages.sass +0 -103
  506. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/css/select2-bootstrap.css +0 -495
  507. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/favicon.ico +0 -0
  508. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/fonts/glyphicons-halflings-regular.eot +0 -0
  509. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/fonts/glyphicons-halflings-regular.svg +0 -288
  510. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/fonts/glyphicons-halflings-regular.ttf +0 -0
  511. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/fonts/glyphicons-halflings-regular.woff +0 -0
  512. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/fonts/glyphicons-halflings-regular.woff2 +0 -0
  513. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/index.html +0 -77
  514. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/js/bootstrap.min.js +0 -7
  515. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/js/respond.min.js +0 -5
  516. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/_jekyll/master.html +0 -4
  517. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/bower.json +0 -20
  518. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/compass/stylesheets/select2-bootstrap.scss +0 -1
  519. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/3.3.2.html +0 -1668
  520. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/3.4.1.html +0 -1662
  521. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/3.4.2.html +0 -1662
  522. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/3.4.3.html +0 -1662
  523. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/3.4.4.html +0 -1662
  524. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/3.4.5.html +0 -1662
  525. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/3.5.1.html +0 -1662
  526. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/3.5.2.html +0 -1662
  527. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/css/bootstrap.min.css +0 -5
  528. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/css/gh-pages.css +0 -142
  529. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/css/select2-bootstrap.css +0 -495
  530. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/favicon.ico +0 -0
  531. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/fonts/glyphicons-halflings-regular.eot +0 -0
  532. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/fonts/glyphicons-halflings-regular.svg +0 -288
  533. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/fonts/glyphicons-halflings-regular.ttf +0 -0
  534. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/fonts/glyphicons-halflings-regular.woff +0 -0
  535. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/fonts/glyphicons-halflings-regular.woff2 +0 -0
  536. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/index.html +0 -293
  537. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/js/bootstrap.min.js +0 -7
  538. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/js/respond.min.js +0 -5
  539. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/docs/master.html +0 -1662
  540. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/lib/build.less +0 -3
  541. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/lib/build.scss +0 -3
  542. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/lib/select2-bootstrap-css.rb +0 -11
  543. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/lib/select2-bootstrap.less +0 -480
  544. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/lib/select2-bootstrap.scss +0 -480
  545. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/lib/select2-bootstrap/version.rb +0 -9
  546. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/package.json +0 -48
  547. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/select2-bootstrap-css.gemspec +0 -22
  548. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/select2-bootstrap.css +0 -495
  549. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/select2-bootstrap.min.css +0 -1
  550. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/test/less_test.js +0 -25
  551. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/test/scss_test.js +0 -25
  552. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/test/support/less.patch +0 -416
  553. data/vendor/assets/components/locomotive_sources/select2-bootstrap-css/test/support/scss.patch +0 -4
  554. data/vendor/assets/components/locomotive_sources/select2/CONTRIBUTING.md +0 -204
  555. data/vendor/assets/components/locomotive_sources/select2/Gruntfile.js +0 -370
  556. data/vendor/assets/components/locomotive_sources/select2/LICENSE.md +0 -21
  557. data/vendor/assets/components/locomotive_sources/select2/README.md +0 -105
  558. data/vendor/assets/components/locomotive_sources/select2/bower.json +0 -12
  559. data/vendor/assets/components/locomotive_sources/select2/component.json +0 -19
  560. data/vendor/assets/components/locomotive_sources/select2/composer.json +0 -25
  561. data/vendor/assets/components/locomotive_sources/select2/dist/css/select2.css +0 -482
  562. data/vendor/assets/components/locomotive_sources/select2/dist/css/select2.min.css +0 -1
  563. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/ar.js +0 -3
  564. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/az.js +0 -3
  565. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/bg.js +0 -3
  566. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/ca.js +0 -3
  567. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/cs.js +0 -3
  568. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/da.js +0 -3
  569. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/de.js +0 -3
  570. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/en.js +0 -3
  571. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/es.js +0 -3
  572. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/et.js +0 -3
  573. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/eu.js +0 -3
  574. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/fa.js +0 -3
  575. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/fi.js +0 -3
  576. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/fr.js +0 -3
  577. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/gl.js +0 -3
  578. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/he.js +0 -3
  579. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/hi.js +0 -3
  580. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/hr.js +0 -3
  581. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/hu.js +0 -3
  582. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/id.js +0 -3
  583. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/is.js +0 -3
  584. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/it.js +0 -3
  585. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/ja.js +0 -3
  586. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/ko.js +0 -3
  587. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/lt.js +0 -3
  588. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/lv.js +0 -3
  589. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/mk.js +0 -3
  590. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/ms.js +0 -3
  591. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/nb.js +0 -3
  592. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/nl.js +0 -3
  593. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/pl.js +0 -3
  594. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/pt-BR.js +0 -3
  595. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/pt.js +0 -3
  596. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/ro.js +0 -3
  597. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/ru.js +0 -3
  598. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/sk.js +0 -3
  599. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/sr-Cyrl.js +0 -3
  600. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/sr.js +0 -3
  601. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/sv.js +0 -3
  602. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/th.js +0 -3
  603. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/tr.js +0 -3
  604. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/uk.js +0 -3
  605. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/vi.js +0 -3
  606. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/zh-CN.js +0 -3
  607. data/vendor/assets/components/locomotive_sources/select2/dist/js/i18n/zh-TW.js +0 -3
  608. data/vendor/assets/components/locomotive_sources/select2/dist/js/select2.full.js +0 -6281
  609. data/vendor/assets/components/locomotive_sources/select2/dist/js/select2.full.min.js +0 -3
  610. data/vendor/assets/components/locomotive_sources/select2/dist/js/select2.js +0 -5571
  611. data/vendor/assets/components/locomotive_sources/select2/dist/js/select2.min.js +0 -2
  612. data/vendor/assets/components/locomotive_sources/select2/docs/README.md +0 -38
  613. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/basics.html +0 -65
  614. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/data.html +0 -128
  615. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/disabled-mode.html +0 -43
  616. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/disabled-results.html +0 -32
  617. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/hide-search.html +0 -25
  618. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/localization-rtl-diacritics.html +0 -90
  619. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/matcher.html +0 -43
  620. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/multiple-max.html +0 -28
  621. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/placeholders.html +0 -37
  622. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/programmatic-control.html +0 -156
  623. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/tags.html +0 -33
  624. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/themes-templating-responsive-design.html +0 -111
  625. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/examples/tokenizer.html +0 -36
  626. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/footer.html +0 -20
  627. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/ga.html +0 -9
  628. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/head.html +0 -19
  629. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/js-source-states.html +0 -62
  630. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/nav/announcements-4.0.html +0 -26
  631. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/nav/examples.html +0 -96
  632. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/nav/options-old.html +0 -55
  633. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/nav/options.html +0 -77
  634. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/navigation.html +0 -53
  635. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/notice-previous.html +0 -7
  636. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options-old/adapters.html +0 -209
  637. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options-old/backwards-compatibility.html +0 -200
  638. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options-old/core-options.html +0 -790
  639. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options-old/dropdown.html +0 -308
  640. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options-old/events.html +0 -50
  641. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options-old/setting-default-options.html +0 -37
  642. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/compatibility.html +0 -10
  643. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/compatibility/initial-selection.html +0 -50
  644. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/compatibility/introduction.html +0 -18
  645. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/compatibility/matcher.html +0 -50
  646. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/compatibility/query-function.html +0 -50
  647. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/compatibility/text-input.html +0 -32
  648. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/core.html +0 -9
  649. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/core/amd-support.html +0 -38
  650. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/core/data-attributes.html +0 -72
  651. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/core/options.html +0 -58
  652. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/data.html +0 -9
  653. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/data/ajax.html +0 -109
  654. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/data/array.html +0 -53
  655. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/data/select.html +0 -57
  656. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/dropdown.html +0 -9
  657. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/dropdown/filtering.html +0 -23
  658. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/dropdown/placement.html +0 -29
  659. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/dropdown/selections.html +0 -17
  660. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/events.html +0 -8
  661. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/events/internal.html +0 -9
  662. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/events/jquery.html +0 -29
  663. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/introduction.html +0 -9
  664. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/not-written.html +0 -3
  665. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/selections.html +0 -10
  666. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/selections/clearing-selections.html +0 -17
  667. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/selections/multiple.html +0 -17
  668. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/selections/placeholder.html +0 -53
  669. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/options/selections/templating.html +0 -23
  670. data/vendor/assets/components/locomotive_sources/select2/docs/_includes/social-buttons.html +0 -10
  671. data/vendor/assets/components/locomotive_sources/select2/docs/_layouts/default.html +0 -57
  672. data/vendor/assets/components/locomotive_sources/select2/docs/_layouts/home.html +0 -23
  673. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_alert.scss +0 -47
  674. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_anchorjs.scss +0 -27
  675. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_buttons.scss +0 -20
  676. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_code.scss +0 -16
  677. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_examples.scss +0 -90
  678. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_featurette.scss +0 -16
  679. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_footer.scss +0 -42
  680. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_hamburger.scss +0 -49
  681. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_home.scss +0 -31
  682. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_jumbotron.scss +0 -24
  683. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_layout.scss +0 -14
  684. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_nav.scss +0 -58
  685. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_prettify.scss +0 -51
  686. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_result-repository.scss +0 -62
  687. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_sidenav.scss +0 -152
  688. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_social.scss +0 -35
  689. data/vendor/assets/components/locomotive_sources/select2/docs/_sass/_typography.scss +0 -6
  690. data/vendor/assets/components/locomotive_sources/select2/docs/announcements-4.0.html +0 -752
  691. data/vendor/assets/components/locomotive_sources/select2/docs/community.html +0 -154
  692. data/vendor/assets/components/locomotive_sources/select2/docs/css/s2-docs.scss +0 -19
  693. data/vendor/assets/components/locomotive_sources/select2/docs/examples.html +0 -254
  694. data/vendor/assets/components/locomotive_sources/select2/docs/images/logo.png +0 -0
  695. data/vendor/assets/components/locomotive_sources/select2/docs/index.html +0 -238
  696. data/vendor/assets/components/locomotive_sources/select2/docs/options-old.html +0 -37
  697. data/vendor/assets/components/locomotive_sources/select2/docs/options.html +0 -37
  698. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/css/bootstrap.min.css +0 -5
  699. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/css/font-awesome.min.css +0 -4
  700. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/fonts/FontAwesome.otf +0 -0
  701. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/fonts/fontawesome-webfont.eot +0 -0
  702. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/fonts/fontawesome-webfont.svg +0 -655
  703. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/fonts/fontawesome-webfont.ttf +0 -0
  704. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/fonts/fontawesome-webfont.woff +0 -0
  705. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/fonts/fontawesome-webfont.woff2 +0 -0
  706. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ak.png +0 -0
  707. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/al.png +0 -0
  708. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ar.png +0 -0
  709. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/az.png +0 -0
  710. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ca.png +0 -0
  711. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/co.png +0 -0
  712. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ct.png +0 -0
  713. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/de.png +0 -0
  714. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/fl.png +0 -0
  715. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ga.png +0 -0
  716. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/hi.png +0 -0
  717. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ia.png +0 -0
  718. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/id.png +0 -0
  719. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/il.png +0 -0
  720. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/in.png +0 -0
  721. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ks.png +0 -0
  722. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ky.png +0 -0
  723. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/la.png +0 -0
  724. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ma.png +0 -0
  725. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/md.png +0 -0
  726. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/me.png +0 -0
  727. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/mi.png +0 -0
  728. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/mn.png +0 -0
  729. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/mo.png +0 -0
  730. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ms.png +0 -0
  731. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/mt.png +0 -0
  732. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/nc.png +0 -0
  733. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/nd.png +0 -0
  734. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ne.png +0 -0
  735. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/nh.png +0 -0
  736. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/nj.png +0 -0
  737. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/nm.png +0 -0
  738. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/nv.png +0 -0
  739. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ny.png +0 -0
  740. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/oh.png +0 -0
  741. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ok.png +0 -0
  742. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/or.png +0 -0
  743. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/pa.png +0 -0
  744. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ri.png +0 -0
  745. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/sc.png +0 -0
  746. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/sd.png +0 -0
  747. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/tn.png +0 -0
  748. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/tx.png +0 -0
  749. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/ut.png +0 -0
  750. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/va.png +0 -0
  751. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/vt.png +0 -0
  752. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/wa.png +0 -0
  753. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/wi.png +0 -0
  754. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/wv.png +0 -0
  755. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/images/flags/wy.png +0 -0
  756. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/js/anchor.min.js +0 -6
  757. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/js/bootstrap.min.js +0 -6
  758. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/js/jquery.min.js +0 -4
  759. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/js/placeholders.jquery.min.js +0 -2
  760. data/vendor/assets/components/locomotive_sources/select2/docs/vendor/js/prettify.min.js +0 -28
  761. data/vendor/assets/components/locomotive_sources/select2/package.json +0 -66
  762. data/vendor/assets/components/locomotive_sources/select2/select2.jquery.json +0 -32
  763. data/vendor/assets/components/locomotive_sources/select2/src/js/banner.end.js +0 -6
  764. data/vendor/assets/components/locomotive_sources/select2/src/js/banner.start.js +0 -6
  765. data/vendor/assets/components/locomotive_sources/select2/src/js/jquery.mousewheel.shim.js +0 -6
  766. data/vendor/assets/components/locomotive_sources/select2/src/js/jquery.select2.js +0 -58
  767. data/vendor/assets/components/locomotive_sources/select2/src/js/jquery.shim.js +0 -14
  768. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/compat/containerCss.js +0 -56
  769. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/compat/dropdownCss.js +0 -56
  770. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/compat/initSelection.js +0 -42
  771. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/compat/inputData.js +0 -127
  772. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/compat/matcher.js +0 -42
  773. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/compat/query.js +0 -26
  774. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/compat/utils.js +0 -43
  775. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/core.js +0 -545
  776. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/data/ajax.js +0 -101
  777. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/data/array.js +0 -79
  778. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/data/base.js +0 -40
  779. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/data/maximumInputLength.js +0 -31
  780. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/data/maximumSelectionLength.js +0 -31
  781. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/data/minimumInputLength.js +0 -30
  782. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/data/select.js +0 -285
  783. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/data/tags.js +0 -119
  784. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/data/tokenizer.js +0 -93
  785. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/defaults.js +0 -396
  786. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/diacritics.js +0 -847
  787. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/dropdown.js +0 -42
  788. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/dropdown/attachBody.js +0 -216
  789. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/dropdown/attachContainer.js +0 -18
  790. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/dropdown/closeOnSelect.js +0 -32
  791. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/dropdown/hidePlaceholder.js +0 -42
  792. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/dropdown/infiniteScroll.js +0 -89
  793. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/dropdown/minimumResultsForSearch.js +0 -39
  794. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/dropdown/search.js +0 -95
  795. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/dropdown/selectOnClose.js +0 -40
  796. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/dropdown/stopPropagation.js +0 -38
  797. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/ar.js +0 -36
  798. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/az.js +0 -27
  799. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/bg.js +0 -47
  800. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/ca.js +0 -52
  801. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/cs.js +0 -61
  802. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/da.js +0 -40
  803. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/de.js +0 -37
  804. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/en.js +0 -44
  805. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/es.js +0 -52
  806. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/et.js +0 -53
  807. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/eu.js +0 -51
  808. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/fa.js +0 -38
  809. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/fi.js +0 -27
  810. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/fr.js +0 -46
  811. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/gl.js +0 -51
  812. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/he.js +0 -56
  813. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/hi.js +0 -39
  814. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/hr.js +0 -44
  815. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/hu.js +0 -27
  816. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/id.js +0 -30
  817. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/is.js +0 -41
  818. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/it.js +0 -48
  819. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/ja.js +0 -36
  820. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/ko.js +0 -36
  821. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/lt.js +0 -51
  822. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/lv.js +0 -51
  823. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/mk.js +0 -47
  824. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/ms.js +0 -30
  825. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/nb.js +0 -35
  826. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/nl.js +0 -43
  827. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/pl.js +0 -45
  828. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/pt-BR.js +0 -46
  829. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/pt.js +0 -40
  830. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/ro.js +0 -48
  831. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/ru.js +0 -58
  832. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/sk.js +0 -56
  833. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/sr-Cyrl.js +0 -55
  834. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/sr.js +0 -55
  835. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/sv.js +0 -37
  836. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/th.js +0 -33
  837. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/tr.js +0 -33
  838. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/uk.js +0 -43
  839. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/vi.js +0 -37
  840. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/zh-CN.js +0 -36
  841. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/i18n/zh-TW.js +0 -33
  842. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/keys.js +0 -25
  843. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/options.js +0 -122
  844. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/results.js +0 -516
  845. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/selection/allowClear.js +0 -97
  846. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/selection/base.js +0 -158
  847. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/selection/clickMask.js +0 -29
  848. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/selection/eventRelay.js +0 -45
  849. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/selection/multiple.js +0 -109
  850. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/selection/placeholder.js +0 -49
  851. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/selection/search.js +0 -222
  852. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/selection/single.js +0 -93
  853. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/selection/stopPropagation.js +0 -38
  854. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/translation.js +0 -36
  855. data/vendor/assets/components/locomotive_sources/select2/src/js/select2/utils.js +0 -262
  856. data/vendor/assets/components/locomotive_sources/select2/src/js/wrapper.end.js +0 -12
  857. data/vendor/assets/components/locomotive_sources/select2/src/js/wrapper.start.js +0 -23
  858. data/vendor/assets/components/locomotive_sources/select2/src/scss/_dropdown.scss +0 -73
  859. data/vendor/assets/components/locomotive_sources/select2/src/scss/_multiple.scss +0 -35
  860. data/vendor/assets/components/locomotive_sources/select2/src/scss/_single.scss +0 -34
  861. data/vendor/assets/components/locomotive_sources/select2/src/scss/core.scss +0 -48
  862. data/vendor/assets/components/locomotive_sources/select2/src/scss/mixins/_gradients.scss +0 -13
  863. data/vendor/assets/components/locomotive_sources/select2/src/scss/theme/classic/_defaults.scss +0 -34
  864. data/vendor/assets/components/locomotive_sources/select2/src/scss/theme/classic/_multiple.scss +0 -93
  865. data/vendor/assets/components/locomotive_sources/select2/src/scss/theme/classic/_single.scss +0 -124
  866. data/vendor/assets/components/locomotive_sources/select2/src/scss/theme/classic/layout.scss +0 -64
  867. data/vendor/assets/components/locomotive_sources/select2/src/scss/theme/default/_multiple.scss +0 -94
  868. data/vendor/assets/components/locomotive_sources/select2/src/scss/theme/default/_single.scss +0 -83
  869. data/vendor/assets/components/locomotive_sources/select2/src/scss/theme/default/layout.scss +0 -97
  870. data/vendor/assets/components/locomotive_sources/select2/tests/a11y/search-tests.js +0 -51
  871. data/vendor/assets/components/locomotive_sources/select2/tests/a11y/selection-tests.js +0 -154
  872. data/vendor/assets/components/locomotive_sources/select2/tests/data/array-tests.js +0 -290
  873. data/vendor/assets/components/locomotive_sources/select2/tests/data/base-tests.js +0 -29
  874. data/vendor/assets/components/locomotive_sources/select2/tests/data/inputData-tests.js +0 -158
  875. data/vendor/assets/components/locomotive_sources/select2/tests/data/maximumInputLength-tests.js +0 -138
  876. data/vendor/assets/components/locomotive_sources/select2/tests/data/maximumSelectionLength-tests.js +0 -202
  877. data/vendor/assets/components/locomotive_sources/select2/tests/data/minimumInputLength-tests.js +0 -138
  878. data/vendor/assets/components/locomotive_sources/select2/tests/data/select-tests.js +0 -457
  879. data/vendor/assets/components/locomotive_sources/select2/tests/data/tags-tests.js +0 -241
  880. data/vendor/assets/components/locomotive_sources/select2/tests/data/tokenizer-tests.js +0 -171
  881. data/vendor/assets/components/locomotive_sources/select2/tests/dropdown/dropdownCss-tests.js +0 -104
  882. data/vendor/assets/components/locomotive_sources/select2/tests/dropdown/selectOnClose-tests.js +0 -137
  883. data/vendor/assets/components/locomotive_sources/select2/tests/dropdown/stopPropagation-tests.js +0 -33
  884. data/vendor/assets/components/locomotive_sources/select2/tests/helpers.js +0 -46
  885. data/vendor/assets/components/locomotive_sources/select2/tests/integration.html +0 -19
  886. data/vendor/assets/components/locomotive_sources/select2/tests/integration/select2-methods.js +0 -139
  887. data/vendor/assets/components/locomotive_sources/select2/tests/options/data-tests.js +0 -44
  888. data/vendor/assets/components/locomotive_sources/select2/tests/options/deprecated-tests.js +0 -250
  889. data/vendor/assets/components/locomotive_sources/select2/tests/options/translation-tests.js +0 -28
  890. data/vendor/assets/components/locomotive_sources/select2/tests/options/width-tests.js +0 -66
  891. data/vendor/assets/components/locomotive_sources/select2/tests/selection/allowClear-tests.js +0 -218
  892. data/vendor/assets/components/locomotive_sources/select2/tests/selection/containerCss-tests.js +0 -104
  893. data/vendor/assets/components/locomotive_sources/select2/tests/selection/multiple-tests.js +0 -149
  894. data/vendor/assets/components/locomotive_sources/select2/tests/selection/placeholder-tests.js +0 -74
  895. data/vendor/assets/components/locomotive_sources/select2/tests/selection/search-tests.js +0 -139
  896. data/vendor/assets/components/locomotive_sources/select2/tests/selection/single-tests.js +0 -117
  897. data/vendor/assets/components/locomotive_sources/select2/tests/selection/stopPropagation-tests.js +0 -33
  898. data/vendor/assets/components/locomotive_sources/select2/tests/unit.html +0 -91
  899. data/vendor/assets/components/locomotive_sources/select2/tests/utils/decorator-tests.js +0 -189
  900. data/vendor/assets/components/locomotive_sources/select2/tests/utils/escapeMarkup-tests.js +0 -36
  901. data/vendor/assets/components/locomotive_sources/select2/tests/vendor/jquery-1.7.2.js +0 -9404
  902. data/vendor/assets/components/locomotive_sources/select2/tests/vendor/qunit-1.14.0.css +0 -237
  903. data/vendor/assets/components/locomotive_sources/select2/tests/vendor/qunit-1.14.0.js +0 -2288
  904. data/vendor/assets/components/locomotive_sources/select2/vendor/jquery-2.1.0.js +0 -9111
  905. data/vendor/assets/components/locomotive_sources/underscore/LICENSE +0 -23
  906. data/vendor/assets/components/locomotive_sources/underscore/README.md +0 -22
  907. data/vendor/assets/components/locomotive_sources/underscore/bower.json +0 -7
  908. data/vendor/assets/components/locomotive_sources/underscore/underscore-min.js +0 -6
  909. data/vendor/assets/components/locomotive_sources/underscore/underscore-min.map +0 -1
  910. data/vendor/assets/components/locomotive_sources/underscore/underscore.js +0 -1548
@@ -1,22 +0,0 @@
1
- Copyright (c) 2010-2015 Jeremy Ashkenas, DocumentCloud
2
-
3
- Permission is hereby granted, free of charge, to any person
4
- obtaining a copy of this software and associated documentation
5
- files (the "Software"), to deal in the Software without
6
- restriction, including without limitation the rights to use,
7
- copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the
9
- Software is furnished to do so, subject to the following
10
- conditions:
11
-
12
- The above copyright notice and this permission notice shall be
13
- included in all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
- OTHER DEALINGS IN THE SOFTWARE.
@@ -1,2 +0,0 @@
1
- (function(t){var e=typeof self=="object"&&self.self==self&&self||typeof global=="object"&&global.global==global&&global;if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,n){e.Backbone=t(e,n,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore"),r;try{r=require("jquery")}catch(n){}t(e,exports,i,r)}else{e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}})(function(t,e,i,r){var n=t.Backbone;var s=Array.prototype.slice;e.VERSION="1.2.3";e.$=r;e.noConflict=function(){t.Backbone=n;return this};e.emulateHTTP=false;e.emulateJSON=false;var a=function(t,e,r){switch(t){case 1:return function(){return i[e](this[r])};case 2:return function(t){return i[e](this[r],t)};case 3:return function(t,n){return i[e](this[r],h(t,this),n)};case 4:return function(t,n,s){return i[e](this[r],h(t,this),n,s)};default:return function(){var t=s.call(arguments);t.unshift(this[r]);return i[e].apply(i,t)}}};var o=function(t,e,r){i.each(e,function(e,n){if(i[n])t.prototype[n]=a(e,n,r)})};var h=function(t,e){if(i.isFunction(t))return t;if(i.isObject(t)&&!e._isModel(t))return u(t);if(i.isString(t))return function(e){return e.get(t)};return t};var u=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}};var l=e.Events={};var c=/\s+/;var f=function(t,e,r,n,s){var a=0,o;if(r&&typeof r==="object"){if(n!==void 0&&"context"in s&&s.context===void 0)s.context=n;for(o=i.keys(r);a<o.length;a++){e=f(t,e,o[a],r[o[a]],s)}}else if(r&&c.test(r)){for(o=r.split(c);a<o.length;a++){e=t(e,o[a],n,s)}}else{e=t(e,r,n,s)}return e};l.on=function(t,e,i){return d(this,t,e,i)};var d=function(t,e,i,r,n){t._events=f(v,t._events||{},e,i,{context:r,ctx:t,listening:n});if(n){var s=t._listeners||(t._listeners={});s[n.id]=n}return t};l.listenTo=function(t,e,r){if(!t)return this;var n=t._listenId||(t._listenId=i.uniqueId("l"));var s=this._listeningTo||(this._listeningTo={});var a=s[n];if(!a){var o=this._listenId||(this._listenId=i.uniqueId("l"));a=s[n]={obj:t,objId:n,id:o,listeningTo:s,count:0}}d(t,e,r,this,a);return this};var v=function(t,e,i,r){if(i){var n=t[e]||(t[e]=[]);var s=r.context,a=r.ctx,o=r.listening;if(o)o.count++;n.push({callback:i,context:s,ctx:s||a,listening:o})}return t};l.off=function(t,e,i){if(!this._events)return this;this._events=f(g,this._events,t,e,{context:i,listeners:this._listeners});return this};l.stopListening=function(t,e,r){var n=this._listeningTo;if(!n)return this;var s=t?[t._listenId]:i.keys(n);for(var a=0;a<s.length;a++){var o=n[s[a]];if(!o)break;o.obj.off(e,r,this)}if(i.isEmpty(n))this._listeningTo=void 0;return this};var g=function(t,e,r,n){if(!t)return;var s=0,a;var o=n.context,h=n.listeners;if(!e&&!r&&!o){var u=i.keys(h);for(;s<u.length;s++){a=h[u[s]];delete h[a.id];delete a.listeningTo[a.objId]}return}var l=e?[e]:i.keys(t);for(;s<l.length;s++){e=l[s];var c=t[e];if(!c)break;var f=[];for(var d=0;d<c.length;d++){var v=c[d];if(r&&r!==v.callback&&r!==v.callback._callback||o&&o!==v.context){f.push(v)}else{a=v.listening;if(a&&--a.count===0){delete h[a.id];delete a.listeningTo[a.objId]}}}if(f.length){t[e]=f}else{delete t[e]}}if(i.size(t))return t};l.once=function(t,e,r){var n=f(p,{},t,e,i.bind(this.off,this));return this.on(n,void 0,r)};l.listenToOnce=function(t,e,r){var n=f(p,{},e,r,i.bind(this.stopListening,this,t));return this.listenTo(t,n)};var p=function(t,e,r,n){if(r){var s=t[e]=i.once(function(){n(e,s);r.apply(this,arguments)});s._callback=r}return t};l.trigger=function(t){if(!this._events)return this;var e=Math.max(0,arguments.length-1);var i=Array(e);for(var r=0;r<e;r++)i[r]=arguments[r+1];f(m,this._events,t,void 0,i);return this};var m=function(t,e,i,r){if(t){var n=t[e];var s=t.all;if(n&&s)s=s.slice();if(n)_(n,r);if(s)_(s,[e].concat(r))}return t};var _=function(t,e){var i,r=-1,n=t.length,s=e[0],a=e[1],o=e[2];switch(e.length){case 0:while(++r<n)(i=t[r]).callback.call(i.ctx);return;case 1:while(++r<n)(i=t[r]).callback.call(i.ctx,s);return;case 2:while(++r<n)(i=t[r]).callback.call(i.ctx,s,a);return;case 3:while(++r<n)(i=t[r]).callback.call(i.ctx,s,a,o);return;default:while(++r<n)(i=t[r]).callback.apply(i.ctx,e);return}};l.bind=l.on;l.unbind=l.off;i.extend(e,l);var y=e.Model=function(t,e){var r=t||{};e||(e={});this.cid=i.uniqueId(this.cidPrefix);this.attributes={};if(e.collection)this.collection=e.collection;if(e.parse)r=this.parse(r,e)||{};r=i.defaults({},r,i.result(this,"defaults"));this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};i.extend(y.prototype,l,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return this.get(t)!=null},matches:function(t){return!!i.iteratee(t,this)(this.attributes)},set:function(t,e,r){if(t==null)return this;var n;if(typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r||(r={});if(!this._validate(n,r))return false;var s=r.unset;var a=r.silent;var o=[];var h=this._changing;this._changing=true;if(!h){this._previousAttributes=i.clone(this.attributes);this.changed={}}var u=this.attributes;var l=this.changed;var c=this._previousAttributes;for(var f in n){e=n[f];if(!i.isEqual(u[f],e))o.push(f);if(!i.isEqual(c[f],e)){l[f]=e}else{delete l[f]}s?delete u[f]:u[f]=e}this.id=this.get(this.idAttribute);if(!a){if(o.length)this._pending=r;for(var d=0;d<o.length;d++){this.trigger("change:"+o[d],this,u[o[d]],r)}}if(h)return this;if(!a){while(this._pending){r=this._pending;this._pending=false;this.trigger("change",this,r)}}this._pending=false;this._changing=false;return this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:true}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,i.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!i.isEmpty(this.changed);return i.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?i.clone(this.changed):false;var e=this._changing?this._previousAttributes:this.attributes;var r={};for(var n in t){var s=t[n];if(i.isEqual(e[n],s))continue;r[n]=s}return i.size(r)?r:false},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=i.extend({parse:true},t);var e=this;var r=t.success;t.success=function(i){var n=t.parse?e.parse(i,t):i;if(!e.set(n,t))return false;if(r)r.call(t.context,e,i,t);e.trigger("sync",e,i,t)};z(this,t);return this.sync("read",this,t)},save:function(t,e,r){var n;if(t==null||typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r=i.extend({validate:true,parse:true},r);var s=r.wait;if(n&&!s){if(!this.set(n,r))return false}else{if(!this._validate(n,r))return false}var a=this;var o=r.success;var h=this.attributes;r.success=function(t){a.attributes=h;var e=r.parse?a.parse(t,r):t;if(s)e=i.extend({},n,e);if(e&&!a.set(e,r))return false;if(o)o.call(r.context,a,t,r);a.trigger("sync",a,t,r)};z(this,r);if(n&&s)this.attributes=i.extend({},h,n);var u=this.isNew()?"create":r.patch?"patch":"update";if(u==="patch"&&!r.attrs)r.attrs=n;var l=this.sync(u,this,r);this.attributes=h;return l},destroy:function(t){t=t?i.clone(t):{};var e=this;var r=t.success;var n=t.wait;var s=function(){e.stopListening();e.trigger("destroy",e,e.collection,t)};t.success=function(i){if(n)s();if(r)r.call(t.context,e,i,t);if(!e.isNew())e.trigger("sync",e,i,t)};var a=false;if(this.isNew()){i.defer(t.success)}else{z(this,t);a=this.sync("delete",this,t)}if(!n)s();return a},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||F();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.defaults({validate:true},t))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=i.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;if(!r)return true;this.trigger("invalid",this,r,i.extend(e,{validationError:r}));return false}});var b={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};o(y,b,"attributes");var x=e.Collection=function(t,e){e||(e={});if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,i.extend({silent:true},e))};var w={add:true,remove:true,merge:true};var E={add:true,remove:false};var k=function(t,e,i){i=Math.min(Math.max(i,0),t.length);var r=Array(t.length-i);var n=e.length;for(var s=0;s<r.length;s++)r[s]=t[s+i];for(s=0;s<n;s++)t[s+i]=e[s];for(s=0;s<r.length;s++)t[s+n+i]=r[s]};i.extend(x.prototype,l,{model:y,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:false},e,E))},remove:function(t,e){e=i.extend({},e);var r=!i.isArray(t);t=r?[t]:i.clone(t);var n=this._removeModels(t,e);if(!e.silent&&n)this.trigger("update",this,e);return r?n[0]:n},set:function(t,e){if(t==null)return;e=i.defaults({},e,w);if(e.parse&&!this._isModel(t))t=this.parse(t,e);var r=!i.isArray(t);t=r?[t]:t.slice();var n=e.at;if(n!=null)n=+n;if(n<0)n+=this.length+1;var s=[];var a=[];var o=[];var h={};var u=e.add;var l=e.merge;var c=e.remove;var f=false;var d=this.comparator&&n==null&&e.sort!==false;var v=i.isString(this.comparator)?this.comparator:null;var g;for(var p=0;p<t.length;p++){g=t[p];var m=this.get(g);if(m){if(l&&g!==m){var _=this._isModel(g)?g.attributes:g;if(e.parse)_=m.parse(_,e);m.set(_,e);if(d&&!f)f=m.hasChanged(v)}if(!h[m.cid]){h[m.cid]=true;s.push(m)}t[p]=m}else if(u){g=t[p]=this._prepareModel(g,e);if(g){a.push(g);this._addReference(g,e);h[g.cid]=true;s.push(g)}}}if(c){for(p=0;p<this.length;p++){g=this.models[p];if(!h[g.cid])o.push(g)}if(o.length)this._removeModels(o,e)}var y=false;var b=!d&&u&&c;if(s.length&&b){y=this.length!=s.length||i.some(this.models,function(t,e){return t!==s[e]});this.models.length=0;k(this.models,s,0);this.length=this.models.length}else if(a.length){if(d)f=true;k(this.models,a,n==null?this.length:n);this.length=this.models.length}if(f)this.sort({silent:true});if(!e.silent){for(p=0;p<a.length;p++){if(n!=null)e.index=n+p;g=a[p];g.trigger("add",g,this,e)}if(f||y)this.trigger("sort",this,e);if(a.length||o.length)this.trigger("update",this,e)}return r?t[0]:t},reset:function(t,e){e=e?i.clone(e):{};for(var r=0;r<this.models.length;r++){this._removeReference(this.models[r],e)}e.previousModels=this.models;this._reset();t=this.add(t,i.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return s.apply(this.models,arguments)},get:function(t){if(t==null)return void 0;var e=this.modelId(this._isModel(t)?t.attributes:t);return this._byId[t]||this._byId[e]||this._byId[t.cid]},at:function(t){if(t<0)t+=this.length;return this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,true)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var r=e.length;if(i.isFunction(e))e=i.bind(e,this);if(r===1||i.isString(e)){this.models=this.sortBy(e)}else{this.models.sort(e)}if(!t.silent)this.trigger("sort",this,t);return this},pluck:function(t){return i.invoke(this.models,"get",t)},fetch:function(t){t=i.extend({parse:true},t);var e=t.success;var r=this;t.success=function(i){var n=t.reset?"reset":"set";r[n](i,t);if(e)e.call(t.context,r,i,t);r.trigger("sync",r,i,t)};z(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};var r=e.wait;t=this._prepareModel(t,e);if(!t)return false;if(!r)this.add(t,e);var n=this;var s=e.success;e.success=function(t,e,i){if(r)n.add(t,i);if(s)s.call(i.context,t,e,i)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(this._isModel(t)){if(!t.collection)t.collection=this;return t}e=e?i.clone(e):{};e.collection=this;var r=new this.model(t,e);if(!r.validationError)return r;this.trigger("invalid",this,r.validationError,e);return false},_removeModels:function(t,e){var i=[];for(var r=0;r<t.length;r++){var n=this.get(t[r]);if(!n)continue;var s=this.indexOf(n);this.models.splice(s,1);this.length--;if(!e.silent){e.index=s;n.trigger("remove",n,this,e)}i.push(n);this._removeReference(n,e)}return i.length?i:false},_isModel:function(t){return t instanceof y},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes);if(i!=null)this._byId[i]=t;t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes);if(i!=null)delete this._byId[i];if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(t==="change"){var n=this.modelId(e.previousAttributes());var s=this.modelId(e.attributes);if(n!==s){if(n!=null)delete this._byId[n];if(s!=null)this._byId[s]=e}}this.trigger.apply(this,arguments)}});var S={forEach:3,each:3,map:3,collect:3,reduce:4,foldl:4,inject:4,reduceRight:4,foldr:4,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3};o(x,S,"models");var I=e.View=function(t){this.cid=i.uniqueId("view");i.extend(this,i.pick(t,P));this._ensureElement();this.initialize.apply(this,arguments)};var T=/^(\S+)\s*(.*)$/;var P=["model","collection","el","id","attributes","className","tagName","events"];i.extend(I.prototype,l,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this._removeElement();this.stopListening();return this},_removeElement:function(){this.$el.remove()},setElement:function(t){this.undelegateEvents();this._setElement(t);this.delegateEvents();return this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t);this.el=this.$el[0]},delegateEvents:function(t){t||(t=i.result(this,"events"));if(!t)return this;this.undelegateEvents();for(var e in t){var r=t[e];if(!i.isFunction(r))r=this[r];if(!r)continue;var n=e.match(T);this.delegate(n[1],n[2],i.bind(r,this))}return this},delegate:function(t,e,i){this.$el.on(t+".delegateEvents"+this.cid,e,i);return this},undelegateEvents:function(){if(this.$el)this.$el.off(".delegateEvents"+this.cid);return this},undelegate:function(t,e,i){this.$el.off(t+".delegateEvents"+this.cid,e,i);return this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(!this.el){var t=i.extend({},i.result(this,"attributes"));if(this.id)t.id=i.result(this,"id");if(this.className)t["class"]=i.result(this,"className");this.setElement(this._createElement(i.result(this,"tagName")));this._setAttributes(t)}else{this.setElement(i.result(this,"el"))}},_setAttributes:function(t){this.$el.attr(t)}});e.sync=function(t,r,n){var s=H[t];i.defaults(n||(n={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:s,dataType:"json"};if(!n.url){a.url=i.result(r,"url")||F()}if(n.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(n.attrs||r.toJSON(n))}if(n.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(n.emulateHTTP&&(s==="PUT"||s==="DELETE"||s==="PATCH")){a.type="POST";if(n.emulateJSON)a.data._method=s;var o=n.beforeSend;n.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",s);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!n.emulateJSON){a.processData=false}var h=n.error;n.error=function(t,e,i){n.textStatus=e;n.errorThrown=i;if(h)h.call(n.context,t,e,i)};var u=n.xhr=e.ajax(i.extend(a,n));r.trigger("request",r,u,n);return u};var H={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var A=/\((.*?)\)/g;var C=/(\(\?)?:\w+/g;var R=/\*\w+/g;var j=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,l,{initialize:function(){},route:function(t,r,n){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){n=r;r=""}if(!n)n=this[r];var s=this;e.history.route(t,function(i){var a=s._extractParameters(t,i);if(s.execute(n,a,r)!==false){s.trigger.apply(s,["route:"+r].concat(a));s.trigger("route",r,a);e.history.trigger("route",s,r,a)}});return this},execute:function(t,e,i){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(j,"\\$&").replace(A,"(?:$1)?").replace(C,function(t,e){return e?t:"([^/?]+)"}).replace(R,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var M=e.History=function(){this.handlers=[];this.checkUrl=i.bind(this.checkUrl,this);if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var N=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var U=/#.*$/;M.started=false;i.extend(M.prototype,l,{interval:50,atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:function(){var t=this.decodeFragment(this.location.pathname);var e=t.slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return t.charAt(0)==="/"?t.slice(1):t},getFragment:function(t){if(t==null){if(this._usePushState||!this._wantsHashChange){t=this.getPath()}else{t=this.getHash()}}return t.replace(N,"")},start:function(t){if(M.started)throw new Error("Backbone.history has already been started");M.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._hasHashChange="onhashchange"in window&&(document.documentMode===void 0||document.documentMode>7);this._useHashChange=this._wantsHashChange&&this._hasHashChange;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.history&&this.history.pushState);this._usePushState=this._wantsPushState&&this._hasPushState;this.fragment=this.getFragment();this.root=("/"+this.root+"/").replace(O,"/");if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";this.location.replace(e+"#"+this.getPath());return true}else if(this._hasPushState&&this.atRoot()){this.navigate(this.getHash(),{replace:true})}}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe");this.iframe.src="javascript:0";this.iframe.style.display="none";this.iframe.tabIndex=-1;var r=document.body;var n=r.insertBefore(this.iframe,r.firstChild).contentWindow;n.document.open();n.document.close();n.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState){s("popstate",this.checkUrl,false)}else if(this._useHashChange&&!this.iframe){s("hashchange",this.checkUrl,false)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}if(!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};if(this._usePushState){t("popstate",this.checkUrl,false)}else if(this._useHashChange&&!this.iframe){t("hashchange",this.checkUrl,false)}if(this.iframe){document.body.removeChild(this.iframe);this.iframe=null}if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);M.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getHash(this.iframe.contentWindow)}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){if(!this.matchRoot())return false;t=this.fragment=this.getFragment(t);return i.some(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!M.started)return false;if(!e||e===true)e={trigger:!!e};t=this.getFragment(t||"");var i=this.root;if(t===""||t.charAt(0)==="?"){i=i.slice(0,-1)||"/"}var r=i+t;t=this.decodeFragment(t.replace(U,""));if(this.fragment===t)return;this.fragment=t;if(this._usePushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,r)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var n=this.iframe.contentWindow;if(!e.replace){n.document.open();n.document.close()}this._updateHash(n.location,t,e.replace)}}else{return this.location.assign(r)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});e.history=new M;var q=function(t,e){var r=this;var n;if(t&&i.has(t,"constructor")){n=t.constructor}else{n=function(){return r.apply(this,arguments)}}i.extend(n,r,e);var s=function(){this.constructor=n};s.prototype=r.prototype;n.prototype=new s;if(t)i.extend(n.prototype,t);n.__super__=r.prototype;return n};y.extend=x.extend=$.extend=I.extend=M.extend=q;var F=function(){throw new Error('A "url" property or function must be specified')};var z=function(t,e){var i=e.error;e.error=function(r){if(i)i.call(e.context,t,r,e);t.trigger("error",t,r,e)}};return e});
2
- //# sourceMappingURL=backbone-min.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"backbone-min.js","sources":["backbone.js"],"names":["factory","root","self","global","define","amd","_","$","exports","Backbone","require","e","jQuery","Zepto","ender","previousBackbone","slice","Array","prototype","VERSION","noConflict","this","emulateHTTP","emulateJSON","addMethod","length","method","attribute","value","iteratee","context","cb","defaultVal","args","call","arguments","unshift","apply","addUnderscoreMethods","Class","methods","each","instance","isFunction","isObject","_isModel","modelMatcher","isString","model","get","attrs","matcher","matches","attributes","Events","eventSplitter","eventsApi","events","name","callback","opts","i","names","keys","test","split","on","internalOn","obj","listening","_events","onApi","ctx","listeners","_listeners","id","listenTo","_listenId","uniqueId","listeningTo","_listeningTo","thisId","objId","count","options","handlers","push","off","offApi","stopListening","ids","isEmpty","remaining","j","handler","_callback","size","once","onceMap","bind","listenToOnce","map","offer","trigger","Math","max","triggerApi","objEvents","allEvents","all","triggerEvents","concat","ev","l","a1","a2","a3","unbind","extend","Model","cid","cidPrefix","collection","parse","defaults","result","set","changed","initialize","validationError","idAttribute","toJSON","clone","sync","attr","escape","has","key","val","_validate","unset","silent","changes","changing","_changing","_previousAttributes","current","prev","isEqual","_pending","clear","hasChanged","changedAttributes","diff","old","previous","previousAttributes","fetch","success","resp","serverAttrs","wrapError","save","validate","wait","isNew","patch","xhr","destroy","defer","url","base","urlError","replace","encodeURIComponent","constructor","isValid","error","modelMethods","values","pairs","invert","pick","omit","chain","Collection","models","comparator","_reset","reset","setOptions","add","remove","merge","addOptions","splice","array","insert","at","min","tail","singular","isArray","removed","_removeModels","toAdd","toRemove","modelMap","sort","sortable","sortAttr","existing","_prepareModel","_addReference","orderChanged","some","index","_removeReference","previousModels","pop","shift","modelId","_byId","where","first","findWhere","Error","sortBy","pluck","invoke","create","callbackOpts","indexOf","_onModelEvent","event","prevId","collectionMethods","forEach","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","any","include","includes","contains","toArray","head","take","initial","rest","drop","last","without","difference","shuffle","lastIndexOf","sample","partition","groupBy","countBy","indexBy","View","viewOptions","_ensureElement","delegateEventSplitter","tagName","selector","$el","render","_removeElement","setElement","element","undelegateEvents","_setElement","delegateEvents","el","match","delegate","eventName","listener","undelegate","_createElement","document","createElement","className","_setAttributes","type","methodMap","params","dataType","data","contentType","JSON","stringify","_method","beforeSend","setRequestHeader","processData","textStatus","errorThrown","ajax","update","delete","read","Router","routes","_bindRoutes","optionalParam","namedParam","splatParam","escapeRegExp","route","isRegExp","_routeToRegExp","router","history","fragment","_extractParameters","execute","navigate","optional","RegExp","exec","param","decodeURIComponent","History","checkUrl","window","location","routeStripper","rootStripper","pathStripper","started","interval","atRoot","path","pathname","getSearch","matchRoot","decodeFragment","decodeURI","href","getHash","getPath","charAt","getFragment","_usePushState","_wantsHashChange","start","hashChange","_hasHashChange","documentMode","_useHashChange","_wantsPushState","pushState","_hasPushState","iframe","src","style","display","tabIndex","body","iWindow","insertBefore","firstChild","contentWindow","open","close","hash","addEventListener","attachEvent","_checkUrlInterval","setInterval","loadUrl","stop","removeEventListener","detachEvent","removeChild","clearInterval","title","_updateHash","assign","protoProps","staticProps","parent","child","Surrogate","__super__"],"mappings":"CAOC,SAASA,GAIR,GAAIC,SAAeC,OAAQ,UAAYA,KAAKA,MAAQA,MAAQA,YAC1CC,SAAU,UAAYA,OAAOA,QAAUA,QAAUA,MAGnE,UAAWC,UAAW,YAAcA,OAAOC,IAAK,CAC9CD,QAAQ,aAAc,SAAU,WAAY,SAASE,EAAGC,EAAGC,GAGzDP,EAAKQ,SAAWT,EAAQC,EAAMO,EAASF,EAAGC,SAIvC,UAAWC,WAAY,YAAa,CACzC,GAAIF,GAAII,QAAQ,cAAeH,CAC/B,KAAMA,EAAIG,QAAQ,UAAa,MAAMC,IACrCX,EAAQC,EAAMO,QAASF,EAAGC,OAGrB,CACLN,EAAKQ,SAAWT,EAAQC,KAAUA,EAAKK,EAAIL,EAAKW,QAAUX,EAAKY,OAASZ,EAAKa,OAASb,EAAKM,MAG7F,SAASN,EAAMQ,EAAUH,EAAGC,GAO5B,GAAIQ,GAAmBd,EAAKQ,QAG5B,IAAIO,GAAQC,MAAMC,UAAUF,KAG5BP,GAASU,QAAU,OAInBV,GAASF,EAAIA,CAIbE,GAASW,WAAa,WACpBnB,EAAKQ,SAAWM,CAChB,OAAOM,MAMTZ,GAASa,YAAc,KAMvBb,GAASc,YAAc,KASvB,IAAIC,GAAY,SAASC,EAAQC,EAAQC,GACvC,OAAQF,GACN,IAAK,GAAG,MAAO,YACb,MAAOnB,GAAEoB,GAAQL,KAAKM,IAExB,KAAK,GAAG,MAAO,UAASC,GACtB,MAAOtB,GAAEoB,GAAQL,KAAKM,GAAYC,GAEpC,KAAK,GAAG,MAAO,UAASC,EAAUC,GAChC,MAAOxB,GAAEoB,GAAQL,KAAKM,GAAYI,EAAGF,EAAUR,MAAOS,GAExD,KAAK,GAAG,MAAO,UAASD,EAAUG,EAAYF,GAC5C,MAAOxB,GAAEoB,GAA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nE,OAASmM,EAAOnM,OAASwJ,EAAKxJ,OAASwN,EAAQxN,OAASA,CAGlF,IAAIsD,GAAW,WACb,KAAM,IAAIsD,OAAM,kDAIlB,IAAIjE,GAAY,SAASjH,EAAOoC,GAC9B,GAAI6F,GAAQ7F,EAAQ6F,KACpB7F,GAAQ6F,MAAQ,SAASlB,GACvB,GAAIkB,EAAOA,EAAM/I,KAAKkD,EAAQtD,QAASkB,EAAO+G,EAAM3E,EACpDpC,GAAMuD,QAAQ,QAASvD,EAAO+G,EAAM3E,IAIxC,OAAO3E"}
@@ -1,1894 +0,0 @@
1
- // Backbone.js 1.2.3
2
-
3
- // (c) 2010-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
4
- // Backbone may be freely distributed under the MIT license.
5
- // For all details and documentation:
6
- // http://backbonejs.org
7
-
8
- (function(factory) {
9
-
10
- // Establish the root object, `window` (`self`) in the browser, or `global` on the server.
11
- // We use `self` instead of `window` for `WebWorker` support.
12
- var root = (typeof self == 'object' && self.self == self && self) ||
13
- (typeof global == 'object' && global.global == global && global);
14
-
15
- // Set up Backbone appropriately for the environment. Start with AMD.
16
- if (typeof define === 'function' && define.amd) {
17
- define(['underscore', 'jquery', 'exports'], function(_, $, exports) {
18
- // Export global even in AMD case in case this script is loaded with
19
- // others that may still expect a global Backbone.
20
- root.Backbone = factory(root, exports, _, $);
21
- });
22
-
23
- // Next for Node.js or CommonJS. jQuery may not be needed as a module.
24
- } else if (typeof exports !== 'undefined') {
25
- var _ = require('underscore'), $;
26
- try { $ = require('jquery'); } catch(e) {}
27
- factory(root, exports, _, $);
28
-
29
- // Finally, as a browser global.
30
- } else {
31
- root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));
32
- }
33
-
34
- }(function(root, Backbone, _, $) {
35
-
36
- // Initial Setup
37
- // -------------
38
-
39
- // Save the previous value of the `Backbone` variable, so that it can be
40
- // restored later on, if `noConflict` is used.
41
- var previousBackbone = root.Backbone;
42
-
43
- // Create a local reference to a common array method we'll want to use later.
44
- var slice = Array.prototype.slice;
45
-
46
- // Current version of the library. Keep in sync with `package.json`.
47
- Backbone.VERSION = '1.2.3';
48
-
49
- // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
50
- // the `$` variable.
51
- Backbone.$ = $;
52
-
53
- // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
54
- // to its previous owner. Returns a reference to this Backbone object.
55
- Backbone.noConflict = function() {
56
- root.Backbone = previousBackbone;
57
- return this;
58
- };
59
-
60
- // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
61
- // will fake `"PATCH"`, `"PUT"` and `"DELETE"` requests via the `_method` parameter and
62
- // set a `X-Http-Method-Override` header.
63
- Backbone.emulateHTTP = false;
64
-
65
- // Turn on `emulateJSON` to support legacy servers that can't deal with direct
66
- // `application/json` requests ... this will encode the body as
67
- // `application/x-www-form-urlencoded` instead and will send the model in a
68
- // form param named `model`.
69
- Backbone.emulateJSON = false;
70
-
71
- // Proxy Backbone class methods to Underscore functions, wrapping the model's
72
- // `attributes` object or collection's `models` array behind the scenes.
73
- //
74
- // collection.filter(function(model) { return model.get('age') > 10 });
75
- // collection.each(this.addView);
76
- //
77
- // `Function#apply` can be slow so we use the method's arg count, if we know it.
78
- var addMethod = function(length, method, attribute) {
79
- switch (length) {
80
- case 1: return function() {
81
- return _[method](this[attribute]);
82
- };
83
- case 2: return function(value) {
84
- return _[method](this[attribute], value);
85
- };
86
- case 3: return function(iteratee, context) {
87
- return _[method](this[attribute], cb(iteratee, this), context);
88
- };
89
- case 4: return function(iteratee, defaultVal, context) {
90
- return _[method](this[attribute], cb(iteratee, this), defaultVal, context);
91
- };
92
- default: return function() {
93
- var args = slice.call(arguments);
94
- args.unshift(this[attribute]);
95
- return _[method].apply(_, args);
96
- };
97
- }
98
- };
99
- var addUnderscoreMethods = function(Class, methods, attribute) {
100
- _.each(methods, function(length, method) {
101
- if (_[method]) Class.prototype[method] = addMethod(length, method, attribute);
102
- });
103
- };
104
-
105
- // Support `collection.sortBy('attr')` and `collection.findWhere({id: 1})`.
106
- var cb = function(iteratee, instance) {
107
- if (_.isFunction(iteratee)) return iteratee;
108
- if (_.isObject(iteratee) && !instance._isModel(iteratee)) return modelMatcher(iteratee);
109
- if (_.isString(iteratee)) return function(model) { return model.get(iteratee); };
110
- return iteratee;
111
- };
112
- var modelMatcher = function(attrs) {
113
- var matcher = _.matches(attrs);
114
- return function(model) {
115
- return matcher(model.attributes);
116
- };
117
- };
118
-
119
- // Backbone.Events
120
- // ---------------
121
-
122
- // A module that can be mixed in to *any object* in order to provide it with
123
- // a custom event channel. You may bind a callback to an event with `on` or
124
- // remove with `off`; `trigger`-ing an event fires all callbacks in
125
- // succession.
126
- //
127
- // var object = {};
128
- // _.extend(object, Backbone.Events);
129
- // object.on('expand', function(){ alert('expanded'); });
130
- // object.trigger('expand');
131
- //
132
- var Events = Backbone.Events = {};
133
-
134
- // Regular expression used to split event strings.
135
- var eventSplitter = /\s+/;
136
-
137
- // Iterates over the standard `event, callback` (as well as the fancy multiple
138
- // space-separated events `"change blur", callback` and jQuery-style event
139
- // maps `{event: callback}`).
140
- var eventsApi = function(iteratee, events, name, callback, opts) {
141
- var i = 0, names;
142
- if (name && typeof name === 'object') {
143
- // Handle event maps.
144
- if (callback !== void 0 && 'context' in opts && opts.context === void 0) opts.context = callback;
145
- for (names = _.keys(name); i < names.length ; i++) {
146
- events = eventsApi(iteratee, events, names[i], name[names[i]], opts);
147
- }
148
- } else if (name && eventSplitter.test(name)) {
149
- // Handle space separated event names by delegating them individually.
150
- for (names = name.split(eventSplitter); i < names.length; i++) {
151
- events = iteratee(events, names[i], callback, opts);
152
- }
153
- } else {
154
- // Finally, standard events.
155
- events = iteratee(events, name, callback, opts);
156
- }
157
- return events;
158
- };
159
-
160
- // Bind an event to a `callback` function. Passing `"all"` will bind
161
- // the callback to all events fired.
162
- Events.on = function(name, callback, context) {
163
- return internalOn(this, name, callback, context);
164
- };
165
-
166
- // Guard the `listening` argument from the public API.
167
- var internalOn = function(obj, name, callback, context, listening) {
168
- obj._events = eventsApi(onApi, obj._events || {}, name, callback, {
169
- context: context,
170
- ctx: obj,
171
- listening: listening
172
- });
173
-
174
- if (listening) {
175
- var listeners = obj._listeners || (obj._listeners = {});
176
- listeners[listening.id] = listening;
177
- }
178
-
179
- return obj;
180
- };
181
-
182
- // Inversion-of-control versions of `on`. Tell *this* object to listen to
183
- // an event in another object... keeping track of what it's listening to
184
- // for easier unbinding later.
185
- Events.listenTo = function(obj, name, callback) {
186
- if (!obj) return this;
187
- var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
188
- var listeningTo = this._listeningTo || (this._listeningTo = {});
189
- var listening = listeningTo[id];
190
-
191
- // This object is not listening to any other events on `obj` yet.
192
- // Setup the necessary references to track the listening callbacks.
193
- if (!listening) {
194
- var thisId = this._listenId || (this._listenId = _.uniqueId('l'));
195
- listening = listeningTo[id] = {obj: obj, objId: id, id: thisId, listeningTo: listeningTo, count: 0};
196
- }
197
-
198
- // Bind callbacks on obj, and keep track of them on listening.
199
- internalOn(obj, name, callback, this, listening);
200
- return this;
201
- };
202
-
203
- // The reducing API that adds a callback to the `events` object.
204
- var onApi = function(events, name, callback, options) {
205
- if (callback) {
206
- var handlers = events[name] || (events[name] = []);
207
- var context = options.context, ctx = options.ctx, listening = options.listening;
208
- if (listening) listening.count++;
209
-
210
- handlers.push({ callback: callback, context: context, ctx: context || ctx, listening: listening });
211
- }
212
- return events;
213
- };
214
-
215
- // Remove one or many callbacks. If `context` is null, removes all
216
- // callbacks with that function. If `callback` is null, removes all
217
- // callbacks for the event. If `name` is null, removes all bound
218
- // callbacks for all events.
219
- Events.off = function(name, callback, context) {
220
- if (!this._events) return this;
221
- this._events = eventsApi(offApi, this._events, name, callback, {
222
- context: context,
223
- listeners: this._listeners
224
- });
225
- return this;
226
- };
227
-
228
- // Tell this object to stop listening to either specific events ... or
229
- // to every object it's currently listening to.
230
- Events.stopListening = function(obj, name, callback) {
231
- var listeningTo = this._listeningTo;
232
- if (!listeningTo) return this;
233
-
234
- var ids = obj ? [obj._listenId] : _.keys(listeningTo);
235
-
236
- for (var i = 0; i < ids.length; i++) {
237
- var listening = listeningTo[ids[i]];
238
-
239
- // If listening doesn't exist, this object is not currently
240
- // listening to obj. Break out early.
241
- if (!listening) break;
242
-
243
- listening.obj.off(name, callback, this);
244
- }
245
- if (_.isEmpty(listeningTo)) this._listeningTo = void 0;
246
-
247
- return this;
248
- };
249
-
250
- // The reducing API that removes a callback from the `events` object.
251
- var offApi = function(events, name, callback, options) {
252
- if (!events) return;
253
-
254
- var i = 0, listening;
255
- var context = options.context, listeners = options.listeners;
256
-
257
- // Delete all events listeners and "drop" events.
258
- if (!name && !callback && !context) {
259
- var ids = _.keys(listeners);
260
- for (; i < ids.length; i++) {
261
- listening = listeners[ids[i]];
262
- delete listeners[listening.id];
263
- delete listening.listeningTo[listening.objId];
264
- }
265
- return;
266
- }
267
-
268
- var names = name ? [name] : _.keys(events);
269
- for (; i < names.length; i++) {
270
- name = names[i];
271
- var handlers = events[name];
272
-
273
- // Bail out if there are no events stored.
274
- if (!handlers) break;
275
-
276
- // Replace events if there are any remaining. Otherwise, clean up.
277
- var remaining = [];
278
- for (var j = 0; j < handlers.length; j++) {
279
- var handler = handlers[j];
280
- if (
281
- callback && callback !== handler.callback &&
282
- callback !== handler.callback._callback ||
283
- context && context !== handler.context
284
- ) {
285
- remaining.push(handler);
286
- } else {
287
- listening = handler.listening;
288
- if (listening && --listening.count === 0) {
289
- delete listeners[listening.id];
290
- delete listening.listeningTo[listening.objId];
291
- }
292
- }
293
- }
294
-
295
- // Update tail event if the list has any events. Otherwise, clean up.
296
- if (remaining.length) {
297
- events[name] = remaining;
298
- } else {
299
- delete events[name];
300
- }
301
- }
302
- if (_.size(events)) return events;
303
- };
304
-
305
- // Bind an event to only be triggered a single time. After the first time
306
- // the callback is invoked, its listener will be removed. If multiple events
307
- // are passed in using the space-separated syntax, the handler will fire
308
- // once for each event, not once for a combination of all events.
309
- Events.once = function(name, callback, context) {
310
- // Map the event into a `{event: once}` object.
311
- var events = eventsApi(onceMap, {}, name, callback, _.bind(this.off, this));
312
- return this.on(events, void 0, context);
313
- };
314
-
315
- // Inversion-of-control versions of `once`.
316
- Events.listenToOnce = function(obj, name, callback) {
317
- // Map the event into a `{event: once}` object.
318
- var events = eventsApi(onceMap, {}, name, callback, _.bind(this.stopListening, this, obj));
319
- return this.listenTo(obj, events);
320
- };
321
-
322
- // Reduces the event callbacks into a map of `{event: onceWrapper}`.
323
- // `offer` unbinds the `onceWrapper` after it has been called.
324
- var onceMap = function(map, name, callback, offer) {
325
- if (callback) {
326
- var once = map[name] = _.once(function() {
327
- offer(name, once);
328
- callback.apply(this, arguments);
329
- });
330
- once._callback = callback;
331
- }
332
- return map;
333
- };
334
-
335
- // Trigger one or many events, firing all bound callbacks. Callbacks are
336
- // passed the same arguments as `trigger` is, apart from the event name
337
- // (unless you're listening on `"all"`, which will cause your callback to
338
- // receive the true name of the event as the first argument).
339
- Events.trigger = function(name) {
340
- if (!this._events) return this;
341
-
342
- var length = Math.max(0, arguments.length - 1);
343
- var args = Array(length);
344
- for (var i = 0; i < length; i++) args[i] = arguments[i + 1];
345
-
346
- eventsApi(triggerApi, this._events, name, void 0, args);
347
- return this;
348
- };
349
-
350
- // Handles triggering the appropriate event callbacks.
351
- var triggerApi = function(objEvents, name, cb, args) {
352
- if (objEvents) {
353
- var events = objEvents[name];
354
- var allEvents = objEvents.all;
355
- if (events && allEvents) allEvents = allEvents.slice();
356
- if (events) triggerEvents(events, args);
357
- if (allEvents) triggerEvents(allEvents, [name].concat(args));
358
- }
359
- return objEvents;
360
- };
361
-
362
- // A difficult-to-believe, but optimized internal dispatch function for
363
- // triggering events. Tries to keep the usual cases speedy (most internal
364
- // Backbone events have 3 arguments).
365
- var triggerEvents = function(events, args) {
366
- var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];
367
- switch (args.length) {
368
- case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;
369
- case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;
370
- case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;
371
- case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;
372
- default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;
373
- }
374
- };
375
-
376
- // Aliases for backwards compatibility.
377
- Events.bind = Events.on;
378
- Events.unbind = Events.off;
379
-
380
- // Allow the `Backbone` object to serve as a global event bus, for folks who
381
- // want global "pubsub" in a convenient place.
382
- _.extend(Backbone, Events);
383
-
384
- // Backbone.Model
385
- // --------------
386
-
387
- // Backbone **Models** are the basic data object in the framework --
388
- // frequently representing a row in a table in a database on your server.
389
- // A discrete chunk of data and a bunch of useful, related methods for
390
- // performing computations and transformations on that data.
391
-
392
- // Create a new model with the specified attributes. A client id (`cid`)
393
- // is automatically generated and assigned for you.
394
- var Model = Backbone.Model = function(attributes, options) {
395
- var attrs = attributes || {};
396
- options || (options = {});
397
- this.cid = _.uniqueId(this.cidPrefix);
398
- this.attributes = {};
399
- if (options.collection) this.collection = options.collection;
400
- if (options.parse) attrs = this.parse(attrs, options) || {};
401
- attrs = _.defaults({}, attrs, _.result(this, 'defaults'));
402
- this.set(attrs, options);
403
- this.changed = {};
404
- this.initialize.apply(this, arguments);
405
- };
406
-
407
- // Attach all inheritable methods to the Model prototype.
408
- _.extend(Model.prototype, Events, {
409
-
410
- // A hash of attributes whose current and previous value differ.
411
- changed: null,
412
-
413
- // The value returned during the last failed validation.
414
- validationError: null,
415
-
416
- // The default name for the JSON `id` attribute is `"id"`. MongoDB and
417
- // CouchDB users may want to set this to `"_id"`.
418
- idAttribute: 'id',
419
-
420
- // The prefix is used to create the client id which is used to identify models locally.
421
- // You may want to override this if you're experiencing name clashes with model ids.
422
- cidPrefix: 'c',
423
-
424
- // Initialize is an empty function by default. Override it with your own
425
- // initialization logic.
426
- initialize: function(){},
427
-
428
- // Return a copy of the model's `attributes` object.
429
- toJSON: function(options) {
430
- return _.clone(this.attributes);
431
- },
432
-
433
- // Proxy `Backbone.sync` by default -- but override this if you need
434
- // custom syncing semantics for *this* particular model.
435
- sync: function() {
436
- return Backbone.sync.apply(this, arguments);
437
- },
438
-
439
- // Get the value of an attribute.
440
- get: function(attr) {
441
- return this.attributes[attr];
442
- },
443
-
444
- // Get the HTML-escaped value of an attribute.
445
- escape: function(attr) {
446
- return _.escape(this.get(attr));
447
- },
448
-
449
- // Returns `true` if the attribute contains a value that is not null
450
- // or undefined.
451
- has: function(attr) {
452
- return this.get(attr) != null;
453
- },
454
-
455
- // Special-cased proxy to underscore's `_.matches` method.
456
- matches: function(attrs) {
457
- return !!_.iteratee(attrs, this)(this.attributes);
458
- },
459
-
460
- // Set a hash of model attributes on the object, firing `"change"`. This is
461
- // the core primitive operation of a model, updating the data and notifying
462
- // anyone who needs to know about the change in state. The heart of the beast.
463
- set: function(key, val, options) {
464
- if (key == null) return this;
465
-
466
- // Handle both `"key", value` and `{key: value}` -style arguments.
467
- var attrs;
468
- if (typeof key === 'object') {
469
- attrs = key;
470
- options = val;
471
- } else {
472
- (attrs = {})[key] = val;
473
- }
474
-
475
- options || (options = {});
476
-
477
- // Run validation.
478
- if (!this._validate(attrs, options)) return false;
479
-
480
- // Extract attributes and options.
481
- var unset = options.unset;
482
- var silent = options.silent;
483
- var changes = [];
484
- var changing = this._changing;
485
- this._changing = true;
486
-
487
- if (!changing) {
488
- this._previousAttributes = _.clone(this.attributes);
489
- this.changed = {};
490
- }
491
-
492
- var current = this.attributes;
493
- var changed = this.changed;
494
- var prev = this._previousAttributes;
495
-
496
- // For each `set` attribute, update or delete the current value.
497
- for (var attr in attrs) {
498
- val = attrs[attr];
499
- if (!_.isEqual(current[attr], val)) changes.push(attr);
500
- if (!_.isEqual(prev[attr], val)) {
501
- changed[attr] = val;
502
- } else {
503
- delete changed[attr];
504
- }
505
- unset ? delete current[attr] : current[attr] = val;
506
- }
507
-
508
- // Update the `id`.
509
- this.id = this.get(this.idAttribute);
510
-
511
- // Trigger all relevant attribute changes.
512
- if (!silent) {
513
- if (changes.length) this._pending = options;
514
- for (var i = 0; i < changes.length; i++) {
515
- this.trigger('change:' + changes[i], this, current[changes[i]], options);
516
- }
517
- }
518
-
519
- // You might be wondering why there's a `while` loop here. Changes can
520
- // be recursively nested within `"change"` events.
521
- if (changing) return this;
522
- if (!silent) {
523
- while (this._pending) {
524
- options = this._pending;
525
- this._pending = false;
526
- this.trigger('change', this, options);
527
- }
528
- }
529
- this._pending = false;
530
- this._changing = false;
531
- return this;
532
- },
533
-
534
- // Remove an attribute from the model, firing `"change"`. `unset` is a noop
535
- // if the attribute doesn't exist.
536
- unset: function(attr, options) {
537
- return this.set(attr, void 0, _.extend({}, options, {unset: true}));
538
- },
539
-
540
- // Clear all attributes on the model, firing `"change"`.
541
- clear: function(options) {
542
- var attrs = {};
543
- for (var key in this.attributes) attrs[key] = void 0;
544
- return this.set(attrs, _.extend({}, options, {unset: true}));
545
- },
546
-
547
- // Determine if the model has changed since the last `"change"` event.
548
- // If you specify an attribute name, determine if that attribute has changed.
549
- hasChanged: function(attr) {
550
- if (attr == null) return !_.isEmpty(this.changed);
551
- return _.has(this.changed, attr);
552
- },
553
-
554
- // Return an object containing all the attributes that have changed, or
555
- // false if there are no changed attributes. Useful for determining what
556
- // parts of a view need to be updated and/or what attributes need to be
557
- // persisted to the server. Unset attributes will be set to undefined.
558
- // You can also pass an attributes object to diff against the model,
559
- // determining if there *would be* a change.
560
- changedAttributes: function(diff) {
561
- if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
562
- var old = this._changing ? this._previousAttributes : this.attributes;
563
- var changed = {};
564
- for (var attr in diff) {
565
- var val = diff[attr];
566
- if (_.isEqual(old[attr], val)) continue;
567
- changed[attr] = val;
568
- }
569
- return _.size(changed) ? changed : false;
570
- },
571
-
572
- // Get the previous value of an attribute, recorded at the time the last
573
- // `"change"` event was fired.
574
- previous: function(attr) {
575
- if (attr == null || !this._previousAttributes) return null;
576
- return this._previousAttributes[attr];
577
- },
578
-
579
- // Get all of the attributes of the model at the time of the previous
580
- // `"change"` event.
581
- previousAttributes: function() {
582
- return _.clone(this._previousAttributes);
583
- },
584
-
585
- // Fetch the model from the server, merging the response with the model's
586
- // local attributes. Any changed attributes will trigger a "change" event.
587
- fetch: function(options) {
588
- options = _.extend({parse: true}, options);
589
- var model = this;
590
- var success = options.success;
591
- options.success = function(resp) {
592
- var serverAttrs = options.parse ? model.parse(resp, options) : resp;
593
- if (!model.set(serverAttrs, options)) return false;
594
- if (success) success.call(options.context, model, resp, options);
595
- model.trigger('sync', model, resp, options);
596
- };
597
- wrapError(this, options);
598
- return this.sync('read', this, options);
599
- },
600
-
601
- // Set a hash of model attributes, and sync the model to the server.
602
- // If the server returns an attributes hash that differs, the model's
603
- // state will be `set` again.
604
- save: function(key, val, options) {
605
- // Handle both `"key", value` and `{key: value}` -style arguments.
606
- var attrs;
607
- if (key == null || typeof key === 'object') {
608
- attrs = key;
609
- options = val;
610
- } else {
611
- (attrs = {})[key] = val;
612
- }
613
-
614
- options = _.extend({validate: true, parse: true}, options);
615
- var wait = options.wait;
616
-
617
- // If we're not waiting and attributes exist, save acts as
618
- // `set(attr).save(null, opts)` with validation. Otherwise, check if
619
- // the model will be valid when the attributes, if any, are set.
620
- if (attrs && !wait) {
621
- if (!this.set(attrs, options)) return false;
622
- } else {
623
- if (!this._validate(attrs, options)) return false;
624
- }
625
-
626
- // After a successful server-side save, the client is (optionally)
627
- // updated with the server-side state.
628
- var model = this;
629
- var success = options.success;
630
- var attributes = this.attributes;
631
- options.success = function(resp) {
632
- // Ensure attributes are restored during synchronous saves.
633
- model.attributes = attributes;
634
- var serverAttrs = options.parse ? model.parse(resp, options) : resp;
635
- if (wait) serverAttrs = _.extend({}, attrs, serverAttrs);
636
- if (serverAttrs && !model.set(serverAttrs, options)) return false;
637
- if (success) success.call(options.context, model, resp, options);
638
- model.trigger('sync', model, resp, options);
639
- };
640
- wrapError(this, options);
641
-
642
- // Set temporary attributes if `{wait: true}` to properly find new ids.
643
- if (attrs && wait) this.attributes = _.extend({}, attributes, attrs);
644
-
645
- var method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');
646
- if (method === 'patch' && !options.attrs) options.attrs = attrs;
647
- var xhr = this.sync(method, this, options);
648
-
649
- // Restore attributes.
650
- this.attributes = attributes;
651
-
652
- return xhr;
653
- },
654
-
655
- // Destroy this model on the server if it was already persisted.
656
- // Optimistically removes the model from its collection, if it has one.
657
- // If `wait: true` is passed, waits for the server to respond before removal.
658
- destroy: function(options) {
659
- options = options ? _.clone(options) : {};
660
- var model = this;
661
- var success = options.success;
662
- var wait = options.wait;
663
-
664
- var destroy = function() {
665
- model.stopListening();
666
- model.trigger('destroy', model, model.collection, options);
667
- };
668
-
669
- options.success = function(resp) {
670
- if (wait) destroy();
671
- if (success) success.call(options.context, model, resp, options);
672
- if (!model.isNew()) model.trigger('sync', model, resp, options);
673
- };
674
-
675
- var xhr = false;
676
- if (this.isNew()) {
677
- _.defer(options.success);
678
- } else {
679
- wrapError(this, options);
680
- xhr = this.sync('delete', this, options);
681
- }
682
- if (!wait) destroy();
683
- return xhr;
684
- },
685
-
686
- // Default URL for the model's representation on the server -- if you're
687
- // using Backbone's restful methods, override this to change the endpoint
688
- // that will be called.
689
- url: function() {
690
- var base =
691
- _.result(this, 'urlRoot') ||
692
- _.result(this.collection, 'url') ||
693
- urlError();
694
- if (this.isNew()) return base;
695
- var id = this.get(this.idAttribute);
696
- return base.replace(/[^\/]$/, '$&/') + encodeURIComponent(id);
697
- },
698
-
699
- // **parse** converts a response into the hash of attributes to be `set` on
700
- // the model. The default implementation is just to pass the response along.
701
- parse: function(resp, options) {
702
- return resp;
703
- },
704
-
705
- // Create a new model with identical attributes to this one.
706
- clone: function() {
707
- return new this.constructor(this.attributes);
708
- },
709
-
710
- // A model is new if it has never been saved to the server, and lacks an id.
711
- isNew: function() {
712
- return !this.has(this.idAttribute);
713
- },
714
-
715
- // Check if the model is currently in a valid state.
716
- isValid: function(options) {
717
- return this._validate({}, _.defaults({validate: true}, options));
718
- },
719
-
720
- // Run validation against the next complete set of model attributes,
721
- // returning `true` if all is well. Otherwise, fire an `"invalid"` event.
722
- _validate: function(attrs, options) {
723
- if (!options.validate || !this.validate) return true;
724
- attrs = _.extend({}, this.attributes, attrs);
725
- var error = this.validationError = this.validate(attrs, options) || null;
726
- if (!error) return true;
727
- this.trigger('invalid', this, error, _.extend(options, {validationError: error}));
728
- return false;
729
- }
730
-
731
- });
732
-
733
- // Underscore methods that we want to implement on the Model, mapped to the
734
- // number of arguments they take.
735
- var modelMethods = { keys: 1, values: 1, pairs: 1, invert: 1, pick: 0,
736
- omit: 0, chain: 1, isEmpty: 1 };
737
-
738
- // Mix in each Underscore method as a proxy to `Model#attributes`.
739
- addUnderscoreMethods(Model, modelMethods, 'attributes');
740
-
741
- // Backbone.Collection
742
- // -------------------
743
-
744
- // If models tend to represent a single row of data, a Backbone Collection is
745
- // more analogous to a table full of data ... or a small slice or page of that
746
- // table, or a collection of rows that belong together for a particular reason
747
- // -- all of the messages in this particular folder, all of the documents
748
- // belonging to this particular author, and so on. Collections maintain
749
- // indexes of their models, both in order, and for lookup by `id`.
750
-
751
- // Create a new **Collection**, perhaps to contain a specific type of `model`.
752
- // If a `comparator` is specified, the Collection will maintain
753
- // its models in sort order, as they're added and removed.
754
- var Collection = Backbone.Collection = function(models, options) {
755
- options || (options = {});
756
- if (options.model) this.model = options.model;
757
- if (options.comparator !== void 0) this.comparator = options.comparator;
758
- this._reset();
759
- this.initialize.apply(this, arguments);
760
- if (models) this.reset(models, _.extend({silent: true}, options));
761
- };
762
-
763
- // Default options for `Collection#set`.
764
- var setOptions = {add: true, remove: true, merge: true};
765
- var addOptions = {add: true, remove: false};
766
-
767
- // Splices `insert` into `array` at index `at`.
768
- var splice = function(array, insert, at) {
769
- at = Math.min(Math.max(at, 0), array.length);
770
- var tail = Array(array.length - at);
771
- var length = insert.length;
772
- for (var i = 0; i < tail.length; i++) tail[i] = array[i + at];
773
- for (i = 0; i < length; i++) array[i + at] = insert[i];
774
- for (i = 0; i < tail.length; i++) array[i + length + at] = tail[i];
775
- };
776
-
777
- // Define the Collection's inheritable methods.
778
- _.extend(Collection.prototype, Events, {
779
-
780
- // The default model for a collection is just a **Backbone.Model**.
781
- // This should be overridden in most cases.
782
- model: Model,
783
-
784
- // Initialize is an empty function by default. Override it with your own
785
- // initialization logic.
786
- initialize: function(){},
787
-
788
- // The JSON representation of a Collection is an array of the
789
- // models' attributes.
790
- toJSON: function(options) {
791
- return this.map(function(model) { return model.toJSON(options); });
792
- },
793
-
794
- // Proxy `Backbone.sync` by default.
795
- sync: function() {
796
- return Backbone.sync.apply(this, arguments);
797
- },
798
-
799
- // Add a model, or list of models to the set. `models` may be Backbone
800
- // Models or raw JavaScript objects to be converted to Models, or any
801
- // combination of the two.
802
- add: function(models, options) {
803
- return this.set(models, _.extend({merge: false}, options, addOptions));
804
- },
805
-
806
- // Remove a model, or a list of models from the set.
807
- remove: function(models, options) {
808
- options = _.extend({}, options);
809
- var singular = !_.isArray(models);
810
- models = singular ? [models] : _.clone(models);
811
- var removed = this._removeModels(models, options);
812
- if (!options.silent && removed) this.trigger('update', this, options);
813
- return singular ? removed[0] : removed;
814
- },
815
-
816
- // Update a collection by `set`-ing a new list of models, adding new ones,
817
- // removing models that are no longer present, and merging models that
818
- // already exist in the collection, as necessary. Similar to **Model#set**,
819
- // the core operation for updating the data contained by the collection.
820
- set: function(models, options) {
821
- if (models == null) return;
822
-
823
- options = _.defaults({}, options, setOptions);
824
- if (options.parse && !this._isModel(models)) models = this.parse(models, options);
825
-
826
- var singular = !_.isArray(models);
827
- models = singular ? [models] : models.slice();
828
-
829
- var at = options.at;
830
- if (at != null) at = +at;
831
- if (at < 0) at += this.length + 1;
832
-
833
- var set = [];
834
- var toAdd = [];
835
- var toRemove = [];
836
- var modelMap = {};
837
-
838
- var add = options.add;
839
- var merge = options.merge;
840
- var remove = options.remove;
841
-
842
- var sort = false;
843
- var sortable = this.comparator && (at == null) && options.sort !== false;
844
- var sortAttr = _.isString(this.comparator) ? this.comparator : null;
845
-
846
- // Turn bare objects into model references, and prevent invalid models
847
- // from being added.
848
- var model;
849
- for (var i = 0; i < models.length; i++) {
850
- model = models[i];
851
-
852
- // If a duplicate is found, prevent it from being added and
853
- // optionally merge it into the existing model.
854
- var existing = this.get(model);
855
- if (existing) {
856
- if (merge && model !== existing) {
857
- var attrs = this._isModel(model) ? model.attributes : model;
858
- if (options.parse) attrs = existing.parse(attrs, options);
859
- existing.set(attrs, options);
860
- if (sortable && !sort) sort = existing.hasChanged(sortAttr);
861
- }
862
- if (!modelMap[existing.cid]) {
863
- modelMap[existing.cid] = true;
864
- set.push(existing);
865
- }
866
- models[i] = existing;
867
-
868
- // If this is a new, valid model, push it to the `toAdd` list.
869
- } else if (add) {
870
- model = models[i] = this._prepareModel(model, options);
871
- if (model) {
872
- toAdd.push(model);
873
- this._addReference(model, options);
874
- modelMap[model.cid] = true;
875
- set.push(model);
876
- }
877
- }
878
- }
879
-
880
- // Remove stale models.
881
- if (remove) {
882
- for (i = 0; i < this.length; i++) {
883
- model = this.models[i];
884
- if (!modelMap[model.cid]) toRemove.push(model);
885
- }
886
- if (toRemove.length) this._removeModels(toRemove, options);
887
- }
888
-
889
- // See if sorting is needed, update `length` and splice in new models.
890
- var orderChanged = false;
891
- var replace = !sortable && add && remove;
892
- if (set.length && replace) {
893
- orderChanged = this.length != set.length || _.some(this.models, function(model, index) {
894
- return model !== set[index];
895
- });
896
- this.models.length = 0;
897
- splice(this.models, set, 0);
898
- this.length = this.models.length;
899
- } else if (toAdd.length) {
900
- if (sortable) sort = true;
901
- splice(this.models, toAdd, at == null ? this.length : at);
902
- this.length = this.models.length;
903
- }
904
-
905
- // Silently sort the collection if appropriate.
906
- if (sort) this.sort({silent: true});
907
-
908
- // Unless silenced, it's time to fire all appropriate add/sort events.
909
- if (!options.silent) {
910
- for (i = 0; i < toAdd.length; i++) {
911
- if (at != null) options.index = at + i;
912
- model = toAdd[i];
913
- model.trigger('add', model, this, options);
914
- }
915
- if (sort || orderChanged) this.trigger('sort', this, options);
916
- if (toAdd.length || toRemove.length) this.trigger('update', this, options);
917
- }
918
-
919
- // Return the added (or merged) model (or models).
920
- return singular ? models[0] : models;
921
- },
922
-
923
- // When you have more items than you want to add or remove individually,
924
- // you can reset the entire set with a new list of models, without firing
925
- // any granular `add` or `remove` events. Fires `reset` when finished.
926
- // Useful for bulk operations and optimizations.
927
- reset: function(models, options) {
928
- options = options ? _.clone(options) : {};
929
- for (var i = 0; i < this.models.length; i++) {
930
- this._removeReference(this.models[i], options);
931
- }
932
- options.previousModels = this.models;
933
- this._reset();
934
- models = this.add(models, _.extend({silent: true}, options));
935
- if (!options.silent) this.trigger('reset', this, options);
936
- return models;
937
- },
938
-
939
- // Add a model to the end of the collection.
940
- push: function(model, options) {
941
- return this.add(model, _.extend({at: this.length}, options));
942
- },
943
-
944
- // Remove a model from the end of the collection.
945
- pop: function(options) {
946
- var model = this.at(this.length - 1);
947
- return this.remove(model, options);
948
- },
949
-
950
- // Add a model to the beginning of the collection.
951
- unshift: function(model, options) {
952
- return this.add(model, _.extend({at: 0}, options));
953
- },
954
-
955
- // Remove a model from the beginning of the collection.
956
- shift: function(options) {
957
- var model = this.at(0);
958
- return this.remove(model, options);
959
- },
960
-
961
- // Slice out a sub-array of models from the collection.
962
- slice: function() {
963
- return slice.apply(this.models, arguments);
964
- },
965
-
966
- // Get a model from the set by id.
967
- get: function(obj) {
968
- if (obj == null) return void 0;
969
- var id = this.modelId(this._isModel(obj) ? obj.attributes : obj);
970
- return this._byId[obj] || this._byId[id] || this._byId[obj.cid];
971
- },
972
-
973
- // Get the model at the given index.
974
- at: function(index) {
975
- if (index < 0) index += this.length;
976
- return this.models[index];
977
- },
978
-
979
- // Return models with matching attributes. Useful for simple cases of
980
- // `filter`.
981
- where: function(attrs, first) {
982
- return this[first ? 'find' : 'filter'](attrs);
983
- },
984
-
985
- // Return the first model with matching attributes. Useful for simple cases
986
- // of `find`.
987
- findWhere: function(attrs) {
988
- return this.where(attrs, true);
989
- },
990
-
991
- // Force the collection to re-sort itself. You don't need to call this under
992
- // normal circumstances, as the set will maintain sort order as each item
993
- // is added.
994
- sort: function(options) {
995
- var comparator = this.comparator;
996
- if (!comparator) throw new Error('Cannot sort a set without a comparator');
997
- options || (options = {});
998
-
999
- var length = comparator.length;
1000
- if (_.isFunction(comparator)) comparator = _.bind(comparator, this);
1001
-
1002
- // Run sort based on type of `comparator`.
1003
- if (length === 1 || _.isString(comparator)) {
1004
- this.models = this.sortBy(comparator);
1005
- } else {
1006
- this.models.sort(comparator);
1007
- }
1008
- if (!options.silent) this.trigger('sort', this, options);
1009
- return this;
1010
- },
1011
-
1012
- // Pluck an attribute from each model in the collection.
1013
- pluck: function(attr) {
1014
- return _.invoke(this.models, 'get', attr);
1015
- },
1016
-
1017
- // Fetch the default set of models for this collection, resetting the
1018
- // collection when they arrive. If `reset: true` is passed, the response
1019
- // data will be passed through the `reset` method instead of `set`.
1020
- fetch: function(options) {
1021
- options = _.extend({parse: true}, options);
1022
- var success = options.success;
1023
- var collection = this;
1024
- options.success = function(resp) {
1025
- var method = options.reset ? 'reset' : 'set';
1026
- collection[method](resp, options);
1027
- if (success) success.call(options.context, collection, resp, options);
1028
- collection.trigger('sync', collection, resp, options);
1029
- };
1030
- wrapError(this, options);
1031
- return this.sync('read', this, options);
1032
- },
1033
-
1034
- // Create a new instance of a model in this collection. Add the model to the
1035
- // collection immediately, unless `wait: true` is passed, in which case we
1036
- // wait for the server to agree.
1037
- create: function(model, options) {
1038
- options = options ? _.clone(options) : {};
1039
- var wait = options.wait;
1040
- model = this._prepareModel(model, options);
1041
- if (!model) return false;
1042
- if (!wait) this.add(model, options);
1043
- var collection = this;
1044
- var success = options.success;
1045
- options.success = function(model, resp, callbackOpts) {
1046
- if (wait) collection.add(model, callbackOpts);
1047
- if (success) success.call(callbackOpts.context, model, resp, callbackOpts);
1048
- };
1049
- model.save(null, options);
1050
- return model;
1051
- },
1052
-
1053
- // **parse** converts a response into a list of models to be added to the
1054
- // collection. The default implementation is just to pass it through.
1055
- parse: function(resp, options) {
1056
- return resp;
1057
- },
1058
-
1059
- // Create a new collection with an identical list of models as this one.
1060
- clone: function() {
1061
- return new this.constructor(this.models, {
1062
- model: this.model,
1063
- comparator: this.comparator
1064
- });
1065
- },
1066
-
1067
- // Define how to uniquely identify models in the collection.
1068
- modelId: function (attrs) {
1069
- return attrs[this.model.prototype.idAttribute || 'id'];
1070
- },
1071
-
1072
- // Private method to reset all internal state. Called when the collection
1073
- // is first initialized or reset.
1074
- _reset: function() {
1075
- this.length = 0;
1076
- this.models = [];
1077
- this._byId = {};
1078
- },
1079
-
1080
- // Prepare a hash of attributes (or other model) to be added to this
1081
- // collection.
1082
- _prepareModel: function(attrs, options) {
1083
- if (this._isModel(attrs)) {
1084
- if (!attrs.collection) attrs.collection = this;
1085
- return attrs;
1086
- }
1087
- options = options ? _.clone(options) : {};
1088
- options.collection = this;
1089
- var model = new this.model(attrs, options);
1090
- if (!model.validationError) return model;
1091
- this.trigger('invalid', this, model.validationError, options);
1092
- return false;
1093
- },
1094
-
1095
- // Internal method called by both remove and set.
1096
- _removeModels: function(models, options) {
1097
- var removed = [];
1098
- for (var i = 0; i < models.length; i++) {
1099
- var model = this.get(models[i]);
1100
- if (!model) continue;
1101
-
1102
- var index = this.indexOf(model);
1103
- this.models.splice(index, 1);
1104
- this.length--;
1105
-
1106
- if (!options.silent) {
1107
- options.index = index;
1108
- model.trigger('remove', model, this, options);
1109
- }
1110
-
1111
- removed.push(model);
1112
- this._removeReference(model, options);
1113
- }
1114
- return removed.length ? removed : false;
1115
- },
1116
-
1117
- // Method for checking whether an object should be considered a model for
1118
- // the purposes of adding to the collection.
1119
- _isModel: function (model) {
1120
- return model instanceof Model;
1121
- },
1122
-
1123
- // Internal method to create a model's ties to a collection.
1124
- _addReference: function(model, options) {
1125
- this._byId[model.cid] = model;
1126
- var id = this.modelId(model.attributes);
1127
- if (id != null) this._byId[id] = model;
1128
- model.on('all', this._onModelEvent, this);
1129
- },
1130
-
1131
- // Internal method to sever a model's ties to a collection.
1132
- _removeReference: function(model, options) {
1133
- delete this._byId[model.cid];
1134
- var id = this.modelId(model.attributes);
1135
- if (id != null) delete this._byId[id];
1136
- if (this === model.collection) delete model.collection;
1137
- model.off('all', this._onModelEvent, this);
1138
- },
1139
-
1140
- // Internal method called every time a model in the set fires an event.
1141
- // Sets need to update their indexes when models change ids. All other
1142
- // events simply proxy through. "add" and "remove" events that originate
1143
- // in other collections are ignored.
1144
- _onModelEvent: function(event, model, collection, options) {
1145
- if ((event === 'add' || event === 'remove') && collection !== this) return;
1146
- if (event === 'destroy') this.remove(model, options);
1147
- if (event === 'change') {
1148
- var prevId = this.modelId(model.previousAttributes());
1149
- var id = this.modelId(model.attributes);
1150
- if (prevId !== id) {
1151
- if (prevId != null) delete this._byId[prevId];
1152
- if (id != null) this._byId[id] = model;
1153
- }
1154
- }
1155
- this.trigger.apply(this, arguments);
1156
- }
1157
-
1158
- });
1159
-
1160
- // Underscore methods that we want to implement on the Collection.
1161
- // 90% of the core usefulness of Backbone Collections is actually implemented
1162
- // right here:
1163
- var collectionMethods = { forEach: 3, each: 3, map: 3, collect: 3, reduce: 4,
1164
- foldl: 4, inject: 4, reduceRight: 4, foldr: 4, find: 3, detect: 3, filter: 3,
1165
- select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3,
1166
- contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3,
1167
- head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3,
1168
- without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3,
1169
- isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3,
1170
- sortBy: 3, indexBy: 3};
1171
-
1172
- // Mix in each Underscore method as a proxy to `Collection#models`.
1173
- addUnderscoreMethods(Collection, collectionMethods, 'models');
1174
-
1175
- // Backbone.View
1176
- // -------------
1177
-
1178
- // Backbone Views are almost more convention than they are actual code. A View
1179
- // is simply a JavaScript object that represents a logical chunk of UI in the
1180
- // DOM. This might be a single item, an entire list, a sidebar or panel, or
1181
- // even the surrounding frame which wraps your whole app. Defining a chunk of
1182
- // UI as a **View** allows you to define your DOM events declaratively, without
1183
- // having to worry about render order ... and makes it easy for the view to
1184
- // react to specific changes in the state of your models.
1185
-
1186
- // Creating a Backbone.View creates its initial element outside of the DOM,
1187
- // if an existing element is not provided...
1188
- var View = Backbone.View = function(options) {
1189
- this.cid = _.uniqueId('view');
1190
- _.extend(this, _.pick(options, viewOptions));
1191
- this._ensureElement();
1192
- this.initialize.apply(this, arguments);
1193
- };
1194
-
1195
- // Cached regex to split keys for `delegate`.
1196
- var delegateEventSplitter = /^(\S+)\s*(.*)$/;
1197
-
1198
- // List of view options to be set as properties.
1199
- var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];
1200
-
1201
- // Set up all inheritable **Backbone.View** properties and methods.
1202
- _.extend(View.prototype, Events, {
1203
-
1204
- // The default `tagName` of a View's element is `"div"`.
1205
- tagName: 'div',
1206
-
1207
- // jQuery delegate for element lookup, scoped to DOM elements within the
1208
- // current view. This should be preferred to global lookups where possible.
1209
- $: function(selector) {
1210
- return this.$el.find(selector);
1211
- },
1212
-
1213
- // Initialize is an empty function by default. Override it with your own
1214
- // initialization logic.
1215
- initialize: function(){},
1216
-
1217
- // **render** is the core function that your view should override, in order
1218
- // to populate its element (`this.el`), with the appropriate HTML. The
1219
- // convention is for **render** to always return `this`.
1220
- render: function() {
1221
- return this;
1222
- },
1223
-
1224
- // Remove this view by taking the element out of the DOM, and removing any
1225
- // applicable Backbone.Events listeners.
1226
- remove: function() {
1227
- this._removeElement();
1228
- this.stopListening();
1229
- return this;
1230
- },
1231
-
1232
- // Remove this view's element from the document and all event listeners
1233
- // attached to it. Exposed for subclasses using an alternative DOM
1234
- // manipulation API.
1235
- _removeElement: function() {
1236
- this.$el.remove();
1237
- },
1238
-
1239
- // Change the view's element (`this.el` property) and re-delegate the
1240
- // view's events on the new element.
1241
- setElement: function(element) {
1242
- this.undelegateEvents();
1243
- this._setElement(element);
1244
- this.delegateEvents();
1245
- return this;
1246
- },
1247
-
1248
- // Creates the `this.el` and `this.$el` references for this view using the
1249
- // given `el`. `el` can be a CSS selector or an HTML string, a jQuery
1250
- // context or an element. Subclasses can override this to utilize an
1251
- // alternative DOM manipulation API and are only required to set the
1252
- // `this.el` property.
1253
- _setElement: function(el) {
1254
- this.$el = el instanceof Backbone.$ ? el : Backbone.$(el);
1255
- this.el = this.$el[0];
1256
- },
1257
-
1258
- // Set callbacks, where `this.events` is a hash of
1259
- //
1260
- // *{"event selector": "callback"}*
1261
- //
1262
- // {
1263
- // 'mousedown .title': 'edit',
1264
- // 'click .button': 'save',
1265
- // 'click .open': function(e) { ... }
1266
- // }
1267
- //
1268
- // pairs. Callbacks will be bound to the view, with `this` set properly.
1269
- // Uses event delegation for efficiency.
1270
- // Omitting the selector binds the event to `this.el`.
1271
- delegateEvents: function(events) {
1272
- events || (events = _.result(this, 'events'));
1273
- if (!events) return this;
1274
- this.undelegateEvents();
1275
- for (var key in events) {
1276
- var method = events[key];
1277
- if (!_.isFunction(method)) method = this[method];
1278
- if (!method) continue;
1279
- var match = key.match(delegateEventSplitter);
1280
- this.delegate(match[1], match[2], _.bind(method, this));
1281
- }
1282
- return this;
1283
- },
1284
-
1285
- // Add a single event listener to the view's element (or a child element
1286
- // using `selector`). This only works for delegate-able events: not `focus`,
1287
- // `blur`, and not `change`, `submit`, and `reset` in Internet Explorer.
1288
- delegate: function(eventName, selector, listener) {
1289
- this.$el.on(eventName + '.delegateEvents' + this.cid, selector, listener);
1290
- return this;
1291
- },
1292
-
1293
- // Clears all callbacks previously bound to the view by `delegateEvents`.
1294
- // You usually don't need to use this, but may wish to if you have multiple
1295
- // Backbone views attached to the same DOM element.
1296
- undelegateEvents: function() {
1297
- if (this.$el) this.$el.off('.delegateEvents' + this.cid);
1298
- return this;
1299
- },
1300
-
1301
- // A finer-grained `undelegateEvents` for removing a single delegated event.
1302
- // `selector` and `listener` are both optional.
1303
- undelegate: function(eventName, selector, listener) {
1304
- this.$el.off(eventName + '.delegateEvents' + this.cid, selector, listener);
1305
- return this;
1306
- },
1307
-
1308
- // Produces a DOM element to be assigned to your view. Exposed for
1309
- // subclasses using an alternative DOM manipulation API.
1310
- _createElement: function(tagName) {
1311
- return document.createElement(tagName);
1312
- },
1313
-
1314
- // Ensure that the View has a DOM element to render into.
1315
- // If `this.el` is a string, pass it through `$()`, take the first
1316
- // matching element, and re-assign it to `el`. Otherwise, create
1317
- // an element from the `id`, `className` and `tagName` properties.
1318
- _ensureElement: function() {
1319
- if (!this.el) {
1320
- var attrs = _.extend({}, _.result(this, 'attributes'));
1321
- if (this.id) attrs.id = _.result(this, 'id');
1322
- if (this.className) attrs['class'] = _.result(this, 'className');
1323
- this.setElement(this._createElement(_.result(this, 'tagName')));
1324
- this._setAttributes(attrs);
1325
- } else {
1326
- this.setElement(_.result(this, 'el'));
1327
- }
1328
- },
1329
-
1330
- // Set attributes from a hash on this view's element. Exposed for
1331
- // subclasses using an alternative DOM manipulation API.
1332
- _setAttributes: function(attributes) {
1333
- this.$el.attr(attributes);
1334
- }
1335
-
1336
- });
1337
-
1338
- // Backbone.sync
1339
- // -------------
1340
-
1341
- // Override this function to change the manner in which Backbone persists
1342
- // models to the server. You will be passed the type of request, and the
1343
- // model in question. By default, makes a RESTful Ajax request
1344
- // to the model's `url()`. Some possible customizations could be:
1345
- //
1346
- // * Use `setTimeout` to batch rapid-fire updates into a single request.
1347
- // * Send up the models as XML instead of JSON.
1348
- // * Persist models via WebSockets instead of Ajax.
1349
- //
1350
- // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
1351
- // as `POST`, with a `_method` parameter containing the true HTTP method,
1352
- // as well as all requests with the body as `application/x-www-form-urlencoded`
1353
- // instead of `application/json` with the model in a param named `model`.
1354
- // Useful when interfacing with server-side languages like **PHP** that make
1355
- // it difficult to read the body of `PUT` requests.
1356
- Backbone.sync = function(method, model, options) {
1357
- var type = methodMap[method];
1358
-
1359
- // Default options, unless specified.
1360
- _.defaults(options || (options = {}), {
1361
- emulateHTTP: Backbone.emulateHTTP,
1362
- emulateJSON: Backbone.emulateJSON
1363
- });
1364
-
1365
- // Default JSON-request options.
1366
- var params = {type: type, dataType: 'json'};
1367
-
1368
- // Ensure that we have a URL.
1369
- if (!options.url) {
1370
- params.url = _.result(model, 'url') || urlError();
1371
- }
1372
-
1373
- // Ensure that we have the appropriate request data.
1374
- if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
1375
- params.contentType = 'application/json';
1376
- params.data = JSON.stringify(options.attrs || model.toJSON(options));
1377
- }
1378
-
1379
- // For older servers, emulate JSON by encoding the request into an HTML-form.
1380
- if (options.emulateJSON) {
1381
- params.contentType = 'application/x-www-form-urlencoded';
1382
- params.data = params.data ? {model: params.data} : {};
1383
- }
1384
-
1385
- // For older servers, emulate HTTP by mimicking the HTTP method with `_method`
1386
- // And an `X-HTTP-Method-Override` header.
1387
- if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {
1388
- params.type = 'POST';
1389
- if (options.emulateJSON) params.data._method = type;
1390
- var beforeSend = options.beforeSend;
1391
- options.beforeSend = function(xhr) {
1392
- xhr.setRequestHeader('X-HTTP-Method-Override', type);
1393
- if (beforeSend) return beforeSend.apply(this, arguments);
1394
- };
1395
- }
1396
-
1397
- // Don't process data on a non-GET request.
1398
- if (params.type !== 'GET' && !options.emulateJSON) {
1399
- params.processData = false;
1400
- }
1401
-
1402
- // Pass along `textStatus` and `errorThrown` from jQuery.
1403
- var error = options.error;
1404
- options.error = function(xhr, textStatus, errorThrown) {
1405
- options.textStatus = textStatus;
1406
- options.errorThrown = errorThrown;
1407
- if (error) error.call(options.context, xhr, textStatus, errorThrown);
1408
- };
1409
-
1410
- // Make the request, allowing the user to override any Ajax options.
1411
- var xhr = options.xhr = Backbone.ajax(_.extend(params, options));
1412
- model.trigger('request', model, xhr, options);
1413
- return xhr;
1414
- };
1415
-
1416
- // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
1417
- var methodMap = {
1418
- 'create': 'POST',
1419
- 'update': 'PUT',
1420
- 'patch': 'PATCH',
1421
- 'delete': 'DELETE',
1422
- 'read': 'GET'
1423
- };
1424
-
1425
- // Set the default implementation of `Backbone.ajax` to proxy through to `$`.
1426
- // Override this if you'd like to use a different library.
1427
- Backbone.ajax = function() {
1428
- return Backbone.$.ajax.apply(Backbone.$, arguments);
1429
- };
1430
-
1431
- // Backbone.Router
1432
- // ---------------
1433
-
1434
- // Routers map faux-URLs to actions, and fire events when routes are
1435
- // matched. Creating a new one sets its `routes` hash, if not set statically.
1436
- var Router = Backbone.Router = function(options) {
1437
- options || (options = {});
1438
- if (options.routes) this.routes = options.routes;
1439
- this._bindRoutes();
1440
- this.initialize.apply(this, arguments);
1441
- };
1442
-
1443
- // Cached regular expressions for matching named param parts and splatted
1444
- // parts of route strings.
1445
- var optionalParam = /\((.*?)\)/g;
1446
- var namedParam = /(\(\?)?:\w+/g;
1447
- var splatParam = /\*\w+/g;
1448
- var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g;
1449
-
1450
- // Set up all inheritable **Backbone.Router** properties and methods.
1451
- _.extend(Router.prototype, Events, {
1452
-
1453
- // Initialize is an empty function by default. Override it with your own
1454
- // initialization logic.
1455
- initialize: function(){},
1456
-
1457
- // Manually bind a single named route to a callback. For example:
1458
- //
1459
- // this.route('search/:query/p:num', 'search', function(query, num) {
1460
- // ...
1461
- // });
1462
- //
1463
- route: function(route, name, callback) {
1464
- if (!_.isRegExp(route)) route = this._routeToRegExp(route);
1465
- if (_.isFunction(name)) {
1466
- callback = name;
1467
- name = '';
1468
- }
1469
- if (!callback) callback = this[name];
1470
- var router = this;
1471
- Backbone.history.route(route, function(fragment) {
1472
- var args = router._extractParameters(route, fragment);
1473
- if (router.execute(callback, args, name) !== false) {
1474
- router.trigger.apply(router, ['route:' + name].concat(args));
1475
- router.trigger('route', name, args);
1476
- Backbone.history.trigger('route', router, name, args);
1477
- }
1478
- });
1479
- return this;
1480
- },
1481
-
1482
- // Execute a route handler with the provided parameters. This is an
1483
- // excellent place to do pre-route setup or post-route cleanup.
1484
- execute: function(callback, args, name) {
1485
- if (callback) callback.apply(this, args);
1486
- },
1487
-
1488
- // Simple proxy to `Backbone.history` to save a fragment into the history.
1489
- navigate: function(fragment, options) {
1490
- Backbone.history.navigate(fragment, options);
1491
- return this;
1492
- },
1493
-
1494
- // Bind all defined routes to `Backbone.history`. We have to reverse the
1495
- // order of the routes here to support behavior where the most general
1496
- // routes can be defined at the bottom of the route map.
1497
- _bindRoutes: function() {
1498
- if (!this.routes) return;
1499
- this.routes = _.result(this, 'routes');
1500
- var route, routes = _.keys(this.routes);
1501
- while ((route = routes.pop()) != null) {
1502
- this.route(route, this.routes[route]);
1503
- }
1504
- },
1505
-
1506
- // Convert a route string into a regular expression, suitable for matching
1507
- // against the current location hash.
1508
- _routeToRegExp: function(route) {
1509
- route = route.replace(escapeRegExp, '\\$&')
1510
- .replace(optionalParam, '(?:$1)?')
1511
- .replace(namedParam, function(match, optional) {
1512
- return optional ? match : '([^/?]+)';
1513
- })
1514
- .replace(splatParam, '([^?]*?)');
1515
- return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
1516
- },
1517
-
1518
- // Given a route, and a URL fragment that it matches, return the array of
1519
- // extracted decoded parameters. Empty or unmatched parameters will be
1520
- // treated as `null` to normalize cross-browser behavior.
1521
- _extractParameters: function(route, fragment) {
1522
- var params = route.exec(fragment).slice(1);
1523
- return _.map(params, function(param, i) {
1524
- // Don't decode the search params.
1525
- if (i === params.length - 1) return param || null;
1526
- return param ? decodeURIComponent(param) : null;
1527
- });
1528
- }
1529
-
1530
- });
1531
-
1532
- // Backbone.History
1533
- // ----------------
1534
-
1535
- // Handles cross-browser history management, based on either
1536
- // [pushState](http://diveintohtml5.info/history.html) and real URLs, or
1537
- // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
1538
- // and URL fragments. If the browser supports neither (old IE, natch),
1539
- // falls back to polling.
1540
- var History = Backbone.History = function() {
1541
- this.handlers = [];
1542
- this.checkUrl = _.bind(this.checkUrl, this);
1543
-
1544
- // Ensure that `History` can be used outside of the browser.
1545
- if (typeof window !== 'undefined') {
1546
- this.location = window.location;
1547
- this.history = window.history;
1548
- }
1549
- };
1550
-
1551
- // Cached regex for stripping a leading hash/slash and trailing space.
1552
- var routeStripper = /^[#\/]|\s+$/g;
1553
-
1554
- // Cached regex for stripping leading and trailing slashes.
1555
- var rootStripper = /^\/+|\/+$/g;
1556
-
1557
- // Cached regex for stripping urls of hash.
1558
- var pathStripper = /#.*$/;
1559
-
1560
- // Has the history handling already been started?
1561
- History.started = false;
1562
-
1563
- // Set up all inheritable **Backbone.History** properties and methods.
1564
- _.extend(History.prototype, Events, {
1565
-
1566
- // The default interval to poll for hash changes, if necessary, is
1567
- // twenty times a second.
1568
- interval: 50,
1569
-
1570
- // Are we at the app root?
1571
- atRoot: function() {
1572
- var path = this.location.pathname.replace(/[^\/]$/, '$&/');
1573
- return path === this.root && !this.getSearch();
1574
- },
1575
-
1576
- // Does the pathname match the root?
1577
- matchRoot: function() {
1578
- var path = this.decodeFragment(this.location.pathname);
1579
- var root = path.slice(0, this.root.length - 1) + '/';
1580
- return root === this.root;
1581
- },
1582
-
1583
- // Unicode characters in `location.pathname` are percent encoded so they're
1584
- // decoded for comparison. `%25` should not be decoded since it may be part
1585
- // of an encoded parameter.
1586
- decodeFragment: function(fragment) {
1587
- return decodeURI(fragment.replace(/%25/g, '%2525'));
1588
- },
1589
-
1590
- // In IE6, the hash fragment and search params are incorrect if the
1591
- // fragment contains `?`.
1592
- getSearch: function() {
1593
- var match = this.location.href.replace(/#.*/, '').match(/\?.+/);
1594
- return match ? match[0] : '';
1595
- },
1596
-
1597
- // Gets the true hash value. Cannot use location.hash directly due to bug
1598
- // in Firefox where location.hash will always be decoded.
1599
- getHash: function(window) {
1600
- var match = (window || this).location.href.match(/#(.*)$/);
1601
- return match ? match[1] : '';
1602
- },
1603
-
1604
- // Get the pathname and search params, without the root.
1605
- getPath: function() {
1606
- var path = this.decodeFragment(
1607
- this.location.pathname + this.getSearch()
1608
- ).slice(this.root.length - 1);
1609
- return path.charAt(0) === '/' ? path.slice(1) : path;
1610
- },
1611
-
1612
- // Get the cross-browser normalized URL fragment from the path or hash.
1613
- getFragment: function(fragment) {
1614
- if (fragment == null) {
1615
- if (this._usePushState || !this._wantsHashChange) {
1616
- fragment = this.getPath();
1617
- } else {
1618
- fragment = this.getHash();
1619
- }
1620
- }
1621
- return fragment.replace(routeStripper, '');
1622
- },
1623
-
1624
- // Start the hash change handling, returning `true` if the current URL matches
1625
- // an existing route, and `false` otherwise.
1626
- start: function(options) {
1627
- if (History.started) throw new Error('Backbone.history has already been started');
1628
- History.started = true;
1629
-
1630
- // Figure out the initial configuration. Do we need an iframe?
1631
- // Is pushState desired ... is it available?
1632
- this.options = _.extend({root: '/'}, this.options, options);
1633
- this.root = this.options.root;
1634
- this._wantsHashChange = this.options.hashChange !== false;
1635
- this._hasHashChange = 'onhashchange' in window && (document.documentMode === void 0 || document.documentMode > 7);
1636
- this._useHashChange = this._wantsHashChange && this._hasHashChange;
1637
- this._wantsPushState = !!this.options.pushState;
1638
- this._hasPushState = !!(this.history && this.history.pushState);
1639
- this._usePushState = this._wantsPushState && this._hasPushState;
1640
- this.fragment = this.getFragment();
1641
-
1642
- // Normalize root to always include a leading and trailing slash.
1643
- this.root = ('/' + this.root + '/').replace(rootStripper, '/');
1644
-
1645
- // Transition from hashChange to pushState or vice versa if both are
1646
- // requested.
1647
- if (this._wantsHashChange && this._wantsPushState) {
1648
-
1649
- // If we've started off with a route from a `pushState`-enabled
1650
- // browser, but we're currently in a browser that doesn't support it...
1651
- if (!this._hasPushState && !this.atRoot()) {
1652
- var root = this.root.slice(0, -1) || '/';
1653
- this.location.replace(root + '#' + this.getPath());
1654
- // Return immediately as browser will do redirect to new url
1655
- return true;
1656
-
1657
- // Or if we've started out with a hash-based route, but we're currently
1658
- // in a browser where it could be `pushState`-based instead...
1659
- } else if (this._hasPushState && this.atRoot()) {
1660
- this.navigate(this.getHash(), {replace: true});
1661
- }
1662
-
1663
- }
1664
-
1665
- // Proxy an iframe to handle location events if the browser doesn't
1666
- // support the `hashchange` event, HTML5 history, or the user wants
1667
- // `hashChange` but not `pushState`.
1668
- if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) {
1669
- this.iframe = document.createElement('iframe');
1670
- this.iframe.src = 'javascript:0';
1671
- this.iframe.style.display = 'none';
1672
- this.iframe.tabIndex = -1;
1673
- var body = document.body;
1674
- // Using `appendChild` will throw on IE < 9 if the document is not ready.
1675
- var iWindow = body.insertBefore(this.iframe, body.firstChild).contentWindow;
1676
- iWindow.document.open();
1677
- iWindow.document.close();
1678
- iWindow.location.hash = '#' + this.fragment;
1679
- }
1680
-
1681
- // Add a cross-platform `addEventListener` shim for older browsers.
1682
- var addEventListener = window.addEventListener || function (eventName, listener) {
1683
- return attachEvent('on' + eventName, listener);
1684
- };
1685
-
1686
- // Depending on whether we're using pushState or hashes, and whether
1687
- // 'onhashchange' is supported, determine how we check the URL state.
1688
- if (this._usePushState) {
1689
- addEventListener('popstate', this.checkUrl, false);
1690
- } else if (this._useHashChange && !this.iframe) {
1691
- addEventListener('hashchange', this.checkUrl, false);
1692
- } else if (this._wantsHashChange) {
1693
- this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
1694
- }
1695
-
1696
- if (!this.options.silent) return this.loadUrl();
1697
- },
1698
-
1699
- // Disable Backbone.history, perhaps temporarily. Not useful in a real app,
1700
- // but possibly useful for unit testing Routers.
1701
- stop: function() {
1702
- // Add a cross-platform `removeEventListener` shim for older browsers.
1703
- var removeEventListener = window.removeEventListener || function (eventName, listener) {
1704
- return detachEvent('on' + eventName, listener);
1705
- };
1706
-
1707
- // Remove window listeners.
1708
- if (this._usePushState) {
1709
- removeEventListener('popstate', this.checkUrl, false);
1710
- } else if (this._useHashChange && !this.iframe) {
1711
- removeEventListener('hashchange', this.checkUrl, false);
1712
- }
1713
-
1714
- // Clean up the iframe if necessary.
1715
- if (this.iframe) {
1716
- document.body.removeChild(this.iframe);
1717
- this.iframe = null;
1718
- }
1719
-
1720
- // Some environments will throw when clearing an undefined interval.
1721
- if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
1722
- History.started = false;
1723
- },
1724
-
1725
- // Add a route to be tested when the fragment changes. Routes added later
1726
- // may override previous routes.
1727
- route: function(route, callback) {
1728
- this.handlers.unshift({route: route, callback: callback});
1729
- },
1730
-
1731
- // Checks the current URL to see if it has changed, and if it has,
1732
- // calls `loadUrl`, normalizing across the hidden iframe.
1733
- checkUrl: function(e) {
1734
- var current = this.getFragment();
1735
-
1736
- // If the user pressed the back button, the iframe's hash will have
1737
- // changed and we should use that for comparison.
1738
- if (current === this.fragment && this.iframe) {
1739
- current = this.getHash(this.iframe.contentWindow);
1740
- }
1741
-
1742
- if (current === this.fragment) return false;
1743
- if (this.iframe) this.navigate(current);
1744
- this.loadUrl();
1745
- },
1746
-
1747
- // Attempt to load the current URL fragment. If a route succeeds with a
1748
- // match, returns `true`. If no defined routes matches the fragment,
1749
- // returns `false`.
1750
- loadUrl: function(fragment) {
1751
- // If the root doesn't match, no routes can match either.
1752
- if (!this.matchRoot()) return false;
1753
- fragment = this.fragment = this.getFragment(fragment);
1754
- return _.some(this.handlers, function(handler) {
1755
- if (handler.route.test(fragment)) {
1756
- handler.callback(fragment);
1757
- return true;
1758
- }
1759
- });
1760
- },
1761
-
1762
- // Save a fragment into the hash history, or replace the URL state if the
1763
- // 'replace' option is passed. You are responsible for properly URL-encoding
1764
- // the fragment in advance.
1765
- //
1766
- // The options object can contain `trigger: true` if you wish to have the
1767
- // route callback be fired (not usually desirable), or `replace: true`, if
1768
- // you wish to modify the current URL without adding an entry to the history.
1769
- navigate: function(fragment, options) {
1770
- if (!History.started) return false;
1771
- if (!options || options === true) options = {trigger: !!options};
1772
-
1773
- // Normalize the fragment.
1774
- fragment = this.getFragment(fragment || '');
1775
-
1776
- // Don't include a trailing slash on the root.
1777
- var root = this.root;
1778
- if (fragment === '' || fragment.charAt(0) === '?') {
1779
- root = root.slice(0, -1) || '/';
1780
- }
1781
- var url = root + fragment;
1782
-
1783
- // Strip the hash and decode for matching.
1784
- fragment = this.decodeFragment(fragment.replace(pathStripper, ''));
1785
-
1786
- if (this.fragment === fragment) return;
1787
- this.fragment = fragment;
1788
-
1789
- // If pushState is available, we use it to set the fragment as a real URL.
1790
- if (this._usePushState) {
1791
- this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
1792
-
1793
- // If hash changes haven't been explicitly disabled, update the hash
1794
- // fragment to store history.
1795
- } else if (this._wantsHashChange) {
1796
- this._updateHash(this.location, fragment, options.replace);
1797
- if (this.iframe && (fragment !== this.getHash(this.iframe.contentWindow))) {
1798
- var iWindow = this.iframe.contentWindow;
1799
-
1800
- // Opening and closing the iframe tricks IE7 and earlier to push a
1801
- // history entry on hash-tag change. When replace is true, we don't
1802
- // want this.
1803
- if (!options.replace) {
1804
- iWindow.document.open();
1805
- iWindow.document.close();
1806
- }
1807
-
1808
- this._updateHash(iWindow.location, fragment, options.replace);
1809
- }
1810
-
1811
- // If you've told us that you explicitly don't want fallback hashchange-
1812
- // based history, then `navigate` becomes a page refresh.
1813
- } else {
1814
- return this.location.assign(url);
1815
- }
1816
- if (options.trigger) return this.loadUrl(fragment);
1817
- },
1818
-
1819
- // Update the hash location, either replacing the current entry, or adding
1820
- // a new one to the browser history.
1821
- _updateHash: function(location, fragment, replace) {
1822
- if (replace) {
1823
- var href = location.href.replace(/(javascript:|#).*$/, '');
1824
- location.replace(href + '#' + fragment);
1825
- } else {
1826
- // Some browsers require that `hash` contains a leading #.
1827
- location.hash = '#' + fragment;
1828
- }
1829
- }
1830
-
1831
- });
1832
-
1833
- // Create the default Backbone.history.
1834
- Backbone.history = new History;
1835
-
1836
- // Helpers
1837
- // -------
1838
-
1839
- // Helper function to correctly set up the prototype chain for subclasses.
1840
- // Similar to `goog.inherits`, but uses a hash of prototype properties and
1841
- // class properties to be extended.
1842
- var extend = function(protoProps, staticProps) {
1843
- var parent = this;
1844
- var child;
1845
-
1846
- // The constructor function for the new subclass is either defined by you
1847
- // (the "constructor" property in your `extend` definition), or defaulted
1848
- // by us to simply call the parent constructor.
1849
- if (protoProps && _.has(protoProps, 'constructor')) {
1850
- child = protoProps.constructor;
1851
- } else {
1852
- child = function(){ return parent.apply(this, arguments); };
1853
- }
1854
-
1855
- // Add static properties to the constructor function, if supplied.
1856
- _.extend(child, parent, staticProps);
1857
-
1858
- // Set the prototype chain to inherit from `parent`, without calling
1859
- // `parent` constructor function.
1860
- var Surrogate = function(){ this.constructor = child; };
1861
- Surrogate.prototype = parent.prototype;
1862
- child.prototype = new Surrogate;
1863
-
1864
- // Add prototype properties (instance properties) to the subclass,
1865
- // if supplied.
1866
- if (protoProps) _.extend(child.prototype, protoProps);
1867
-
1868
- // Set a convenience property in case the parent's prototype is needed
1869
- // later.
1870
- child.__super__ = parent.prototype;
1871
-
1872
- return child;
1873
- };
1874
-
1875
- // Set up inheritance for the model, collection, router, view and history.
1876
- Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;
1877
-
1878
- // Throw an error when a URL is needed, and none is supplied.
1879
- var urlError = function() {
1880
- throw new Error('A "url" property or function must be specified');
1881
- };
1882
-
1883
- // Wrap an optional error callback with a fallback error event.
1884
- var wrapError = function(model, options) {
1885
- var error = options.error;
1886
- options.error = function(resp) {
1887
- if (error) error.call(options.context, model, resp, options);
1888
- model.trigger('error', model, resp, options);
1889
- };
1890
- };
1891
-
1892
- return Backbone;
1893
-
1894
- }));