treport 0.2.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (950) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/connect.rb +12 -10
  3. data/app/models/db.rb +52 -0
  4. data/app/models/map.rb +25 -0
  5. data/app/models/map_requirement.rb +54 -0
  6. data/app/models/report.rb +40 -14
  7. data/app/models/requirement.rb +17 -5
  8. data/app/views/layouts/report_admin.html.erb +177 -0
  9. data/db/migrate/_create_reports.rb +70 -0
  10. data/lib/generators/treport/install_generator.rb +23 -0
  11. data/lib/treport/engine.rb +4 -0
  12. data/lib/treport.rb +3 -2
  13. data/public/{report → treport}/css/AdminLTE.min.css +0 -0
  14. data/public/treport/css/ace-ie.min.css +1 -0
  15. data/public/treport/css/ace-part2.min.css +1 -0
  16. data/public/treport/css/ace-rtl.min.css +1 -0
  17. data/public/treport/css/ace-skins.min.css +1 -0
  18. data/public/treport/css/ace.min.css +1 -0
  19. data/public/treport/css/blue.css +62 -0
  20. data/public/treport/css/blue.png +0 -0
  21. data/public/treport/css/blue@2x.png +0 -0
  22. data/public/treport/css/bootstrap-colorpicker.min.css +9 -0
  23. data/public/treport/css/bootstrap-datepicker3.min.css +7 -0
  24. data/public/treport/css/bootstrap-datetimepicker.min.css +5 -0
  25. data/public/treport/css/bootstrap-duallistbox.min.css +1 -0
  26. data/public/treport/css/bootstrap-editable.min.css +12 -0
  27. data/public/treport/css/bootstrap-multiselect.min.css +1 -0
  28. data/public/treport/css/bootstrap-timepicker.min.css +10 -0
  29. data/public/treport/css/bootstrap.min.css +5 -0
  30. data/public/treport/css/chosen.min.css +11 -0
  31. data/public/treport/css/colorbox.min.css +1 -0
  32. data/public/treport/css/daterangepicker.min.css +1 -0
  33. data/public/treport/css/dropzone.min.css +1 -0
  34. data/public/treport/css/font-awesome.min.css +4 -0
  35. data/public/treport/css/fonts.googleapis.com.css +12 -0
  36. data/public/treport/css/fullcalendar.min.css +5 -0
  37. data/public/treport/css/ionicons.min.css +11 -0
  38. data/public/treport/css/jquery-ui.custom.min.css +4 -0
  39. data/public/treport/css/jquery-ui.min.css +4 -0
  40. data/public/treport/css/jquery.gritter.min.css +1 -0
  41. data/public/treport/css/lkmain.css +1 -0
  42. data/public/treport/css/prettify.min.css +1 -0
  43. data/public/treport/css/select2.min.css +1 -0
  44. data/public/treport/css/test.html +221 -0
  45. data/public/treport/css/ui.jqgrid.min.css +1 -0
  46. data/public/treport/font-awesome/4.5.0/css/font-awesome.min.css +4 -0
  47. data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.eot +0 -0
  48. data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.svg +655 -0
  49. data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.ttf +0 -0
  50. data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.woff +0 -0
  51. data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.woff2 +0 -0
  52. data/public/treport/fonts/glyphicons-halflings-regular.eot +0 -0
  53. data/public/treport/fonts/glyphicons-halflings-regular.svg +288 -0
  54. data/public/treport/fonts/glyphicons-halflings-regular.ttf +0 -0
  55. data/public/treport/fonts/glyphicons-halflings-regular.woff +0 -0
  56. data/public/treport/fonts/glyphicons-halflings-regular.woff2 +0 -0
  57. data/public/treport/images/avatars/avatar.png +0 -0
  58. data/public/treport/images/avatars/avatar1.png +0 -0
  59. data/public/treport/images/avatars/avatar2.png +0 -0
  60. data/public/treport/images/avatars/avatar3.png +0 -0
  61. data/public/treport/images/avatars/avatar4.png +0 -0
  62. data/public/treport/images/avatars/avatar5.png +0 -0
  63. data/public/treport/images/avatars/profile-pic.jpg +0 -0
  64. data/public/treport/images/avatars/user.jpg +0 -0
  65. data/public/treport/images/bootstrap-colorpicker/alpha-horizontal.png +0 -0
  66. data/public/treport/images/bootstrap-colorpicker/alpha.png +0 -0
  67. data/public/treport/images/bootstrap-colorpicker/hue-horizontal.png +0 -0
  68. data/public/treport/images/bootstrap-colorpicker/hue.png +0 -0
  69. data/public/treport/images/bootstrap-colorpicker/saturation.png +0 -0
  70. data/public/treport/images/email/email1.png +0 -0
  71. data/public/treport/images/email/email2.png +0 -0
  72. data/public/treport/images/email/email3.png +0 -0
  73. data/public/treport/images/email/email4.png +0 -0
  74. data/public/treport/images/gallery/image-1.jpg +0 -0
  75. data/public/treport/images/gallery/image-2.jpg +0 -0
  76. data/public/treport/images/gallery/image-3.jpg +0 -0
  77. data/public/treport/images/gallery/image-4.jpg +0 -0
  78. data/public/treport/images/gallery/image-5.jpg +0 -0
  79. data/public/treport/images/gallery/image-6.jpg +0 -0
  80. data/public/treport/images/gallery/thumb-1.jpg +0 -0
  81. data/public/treport/images/gallery/thumb-2.jpg +0 -0
  82. data/public/treport/images/gallery/thumb-3.jpg +0 -0
  83. data/public/treport/images/gallery/thumb-4.jpg +0 -0
  84. data/public/treport/images/gallery/thumb-5.jpg +0 -0
  85. data/public/treport/images/gallery/thumb-6.jpg +0 -0
  86. data/public/treport/images/placeholder/165x90.png +0 -0
  87. data/public/treport/images/placeholder/255x150.png +0 -0
  88. data/public/treport/images/placeholder/530x270.png +0 -0
  89. data/public/treport/images/placeholder/550x280.png +0 -0
  90. data/public/treport/images/ui-icons_ffffff_256x240.png +0 -0
  91. data/public/treport/js/ace-editable.min.js +4 -0
  92. data/public/treport/js/ace-elements.min.js +5 -0
  93. data/public/treport/js/ace-extra.min.js +1 -0
  94. data/public/treport/js/ace.min.js +5 -0
  95. data/public/treport/js/autosize.min.js +6 -0
  96. data/public/treport/js/bootbox.js +6 -0
  97. data/public/treport/js/bootstrap-colorpicker.min.js +11 -0
  98. data/public/treport/js/bootstrap-datepicker.min.js +9 -0
  99. data/public/treport/js/bootstrap-datetimepicker.min.js +9 -0
  100. data/public/treport/js/bootstrap-editable.min.js +6 -0
  101. data/public/treport/js/bootstrap-markdown.min.js +19 -0
  102. data/public/treport/js/bootstrap-multiselect.min.js +44 -0
  103. data/public/treport/js/bootstrap-tag.min.js +19 -0
  104. data/public/treport/js/bootstrap-timepicker.min.js +11 -0
  105. data/public/treport/js/bootstrap-wysiwyg.min.js +2 -0
  106. data/public/treport/js/bootstrap.min.js +7 -0
  107. data/public/treport/js/buttons.colVis.min.js +5 -0
  108. data/public/treport/js/buttons.flash.min.js +8 -0
  109. data/public/treport/js/buttons.html5.min.js +8 -0
  110. data/public/treport/js/buttons.print.min.js +5 -0
  111. data/public/treport/js/chosen.jquery.min.js +1 -0
  112. data/public/treport/js/dataTables.buttons.min.js +4 -0
  113. data/public/treport/js/dataTables.select.min.js +4 -0
  114. data/public/treport/js/daterangepicker.min.js +9 -0
  115. data/public/treport/js/dropzone.min.js +2 -0
  116. data/public/{report → treport}/js/echarts.min.js +0 -0
  117. data/public/treport/js/excanvas.min.js +1 -0
  118. data/public/treport/js/fullcalendar.min.js +9 -0
  119. data/public/treport/js/grid.locale-en.js +1 -0
  120. data/public/treport/js/holder.min.js +13 -0
  121. data/public/treport/js/html5shiv.min.js +4 -0
  122. data/public/treport/js/jquery-1.11.3.min.js +6 -0
  123. data/public/treport/js/jquery-2.1.4.min.js +5 -0
  124. data/public/treport/js/jquery-additional-methods.min.js +9 -0
  125. data/public/treport/js/jquery-typeahead.js +6 -0
  126. data/public/treport/js/jquery-ui.custom.min.js +8 -0
  127. data/public/treport/js/jquery-ui.min.js +12 -0
  128. data/public/treport/js/jquery.bootstrap-duallistbox.min.js +9 -0
  129. data/public/treport/js/jquery.colorbox.min.js +6 -0
  130. data/public/treport/js/jquery.dataTables.bootstrap.min.js +2 -0
  131. data/public/treport/js/jquery.dataTables.min.js +6 -0
  132. data/public/treport/js/jquery.easypiechart.min.js +9 -0
  133. data/public/treport/js/jquery.flot.min.js +8 -0
  134. data/public/treport/js/jquery.flot.pie.min.js +57 -0
  135. data/public/treport/js/jquery.flot.resize.min.js +13 -0
  136. data/public/treport/js/jquery.gritter.min.js +11 -0
  137. data/public/treport/js/jquery.hotkeys.index.min.js +3 -0
  138. data/public/treport/js/jquery.inputlimiter.min.js +28 -0
  139. data/public/treport/js/jquery.jqGrid.min.js +17 -0
  140. data/public/treport/js/jquery.knob.min.js +1 -0
  141. data/public/treport/js/jquery.maskedinput.min.js +7 -0
  142. data/public/treport/js/jquery.mobile.custom.min.js +10 -0
  143. data/public/treport/js/jquery.nestable.min.js +5 -0
  144. data/public/treport/js/jquery.raty.min.js +11 -0
  145. data/public/treport/js/jquery.sparkline.index.min.js +203 -0
  146. data/public/treport/js/jquery.ui.touch-punch.min.js +11 -0
  147. data/public/treport/js/jquery.validate.min.js +9 -0
  148. data/public/treport/js/markdown.min.js +3 -0
  149. data/public/treport/js/moment.min.js +5 -0
  150. data/public/treport/js/prettify.min.js +30 -0
  151. data/public/treport/js/respond.min.js +5 -0
  152. data/public/treport/js/select2.min.js +9 -0
  153. data/public/treport/js/spin.js +32 -0
  154. data/public/treport/js/spinbox.min.js +8 -0
  155. data/public/treport/js/tree.min.js +8 -0
  156. data/public/treport/js/wizard.min.js +8 -0
  157. data/public/treport/plugins/datePicker/My97DatePicker.htm +49 -0
  158. data/public/treport/plugins/datePicker/WdatePicker.js +53 -0
  159. data/public/treport/plugins/datePicker/calendar.js +5 -0
  160. data/public/treport/plugins/datePicker/config.js +17 -0
  161. data/public/treport/plugins/datePicker/lang/en.js +14 -0
  162. data/public/treport/plugins/datePicker/lang/zh-cn.js +14 -0
  163. data/public/treport/plugins/datePicker/lang/zh-tw.js +14 -0
  164. data/public/treport/plugins/datePicker/skin/Thumbs.db +0 -0
  165. data/public/treport/plugins/datePicker/skin/WdatePicker.css +10 -0
  166. data/public/treport/plugins/datePicker/skin/areo/Thumbs.db +0 -0
  167. data/public/treport/plugins/datePicker/skin/areo/datepicker.css +302 -0
  168. data/public/treport/plugins/datePicker/skin/areo/dateselect.gif +0 -0
  169. data/public/treport/plugins/datePicker/skin/areo/glass-bg.gif +0 -0
  170. data/public/treport/plugins/datePicker/skin/areo/hd-sprite.gif +0 -0
  171. data/public/treport/plugins/datePicker/skin/areo/img.gif +0 -0
  172. data/public/treport/plugins/datePicker/skin/areo/left-btn.gif +0 -0
  173. data/public/treport/plugins/datePicker/skin/areo/left-btn2.gif +0 -0
  174. data/public/treport/plugins/datePicker/skin/areo/right-btn.gif +0 -0
  175. data/public/treport/plugins/datePicker/skin/areo/right-btn2.gif +0 -0
  176. data/public/treport/plugins/datePicker/skin/armyGreen/Thumbs.db +0 -0
  177. data/public/treport/plugins/datePicker/skin/armyGreen/datepicker.css +302 -0
  178. data/public/treport/plugins/datePicker/skin/armyGreen/dateselect.gif +0 -0
  179. data/public/treport/plugins/datePicker/skin/armyGreen/glass-bg.gif +0 -0
  180. data/public/treport/plugins/datePicker/skin/armyGreen/hd-sprite.gif +0 -0
  181. data/public/treport/plugins/datePicker/skin/armyGreen/img.gif +0 -0
  182. data/public/treport/plugins/datePicker/skin/armyGreen/left-btn.gif +0 -0
  183. data/public/treport/plugins/datePicker/skin/armyGreen/left-btn2.gif +0 -0
  184. data/public/treport/plugins/datePicker/skin/armyGreen/right-btn.gif +0 -0
  185. data/public/treport/plugins/datePicker/skin/armyGreen/right-btn2.gif +0 -0
  186. data/public/treport/plugins/datePicker/skin/blue/Thumbs.db +0 -0
  187. data/public/treport/plugins/datePicker/skin/blue/bg.gif +0 -0
  188. data/public/treport/plugins/datePicker/skin/blue/datepicker.css +115 -0
  189. data/public/treport/plugins/datePicker/skin/blue/dateselect.gif +0 -0
  190. data/public/treport/plugins/datePicker/skin/blue/glass-bg.gif +0 -0
  191. data/public/treport/plugins/datePicker/skin/blue/hd-sprite.gif +0 -0
  192. data/public/treport/plugins/datePicker/skin/blue/img.gif +0 -0
  193. data/public/treport/plugins/datePicker/skin/blue/left-btn.gif +0 -0
  194. data/public/treport/plugins/datePicker/skin/blue/left-btn2.gif +0 -0
  195. data/public/treport/plugins/datePicker/skin/blue/qs.jpg +0 -0
  196. data/public/treport/plugins/datePicker/skin/blue/right-btn.gif +0 -0
  197. data/public/treport/plugins/datePicker/skin/blue/right-btn2.gif +0 -0
  198. data/public/treport/plugins/datePicker/skin/blueGreen/Thumbs.db +0 -0
  199. data/public/treport/plugins/datePicker/skin/blueGreen/datepicker.css +302 -0
  200. data/public/treport/plugins/datePicker/skin/blueGreen/dateselect.gif +0 -0
  201. data/public/treport/plugins/datePicker/skin/blueGreen/glass-bg.gif +0 -0
  202. data/public/treport/plugins/datePicker/skin/blueGreen/hd-sprite.gif +0 -0
  203. data/public/treport/plugins/datePicker/skin/blueGreen/img.gif +0 -0
  204. data/public/treport/plugins/datePicker/skin/blueGreen/left-btn.gif +0 -0
  205. data/public/treport/plugins/datePicker/skin/blueGreen/left-btn2.gif +0 -0
  206. data/public/treport/plugins/datePicker/skin/blueGreen/right-btn.gif +0 -0
  207. data/public/treport/plugins/datePicker/skin/blueGreen/right-btn2.gif +0 -0
  208. data/public/treport/plugins/datePicker/skin/darkBlue/Thumbs.db +0 -0
  209. data/public/treport/plugins/datePicker/skin/darkBlue/datepicker.css +309 -0
  210. data/public/treport/plugins/datePicker/skin/darkBlue/dateselect.gif +0 -0
  211. data/public/treport/plugins/datePicker/skin/darkBlue/glass-bg.gif +0 -0
  212. data/public/treport/plugins/datePicker/skin/darkBlue/hd-sprite.gif +0 -0
  213. data/public/treport/plugins/datePicker/skin/darkBlue/img.gif +0 -0
  214. data/public/treport/plugins/datePicker/skin/darkBlue/left-btn.gif +0 -0
  215. data/public/treport/plugins/datePicker/skin/darkBlue/left-btn2.gif +0 -0
  216. data/public/treport/plugins/datePicker/skin/darkBlue/right-btn.gif +0 -0
  217. data/public/treport/plugins/datePicker/skin/darkBlue/right-btn2.gif +0 -0
  218. data/public/treport/plugins/datePicker/skin/darkYellow/Thumbs.db +0 -0
  219. data/public/treport/plugins/datePicker/skin/darkYellow/bg.gif +0 -0
  220. data/public/treport/plugins/datePicker/skin/darkYellow/datepicker.css +115 -0
  221. data/public/treport/plugins/datePicker/skin/darkYellow/qs.jpg +0 -0
  222. data/public/treport/plugins/datePicker/skin/datePicker.gif +0 -0
  223. data/public/treport/plugins/datePicker/skin/deepBlue/Thumbs.db +0 -0
  224. data/public/treport/plugins/datePicker/skin/deepBlue/datepicker.css +301 -0
  225. data/public/treport/plugins/datePicker/skin/deepBlue/dateselect.gif +0 -0
  226. data/public/treport/plugins/datePicker/skin/deepBlue/glass-bg.gif +0 -0
  227. data/public/treport/plugins/datePicker/skin/deepBlue/hd-sprite.gif +0 -0
  228. data/public/treport/plugins/datePicker/skin/deepBlue/img.gif +0 -0
  229. data/public/treport/plugins/datePicker/skin/deepBlue/left-btn.gif +0 -0
  230. data/public/treport/plugins/datePicker/skin/deepBlue/left-btn2.gif +0 -0
  231. data/public/treport/plugins/datePicker/skin/deepBlue/right-btn.gif +0 -0
  232. data/public/treport/plugins/datePicker/skin/deepBlue/right-btn2.gif +0 -0
  233. data/public/treport/plugins/datePicker/skin/default/Thumbs.db +0 -0
  234. data/public/treport/plugins/datePicker/skin/default/datepicker.css +246 -0
  235. data/public/treport/plugins/datePicker/skin/default/img.gif +0 -0
  236. data/public/treport/plugins/datePicker/skin/green/Thumbs.db +0 -0
  237. data/public/treport/plugins/datePicker/skin/green/bg.gif +0 -0
  238. data/public/treport/plugins/datePicker/skin/green/datepicker.css +115 -0
  239. data/public/treport/plugins/datePicker/skin/green/dateselect.gif +0 -0
  240. data/public/treport/plugins/datePicker/skin/green/glass-bg.gif +0 -0
  241. data/public/treport/plugins/datePicker/skin/green/hd-sprite.gif +0 -0
  242. data/public/treport/plugins/datePicker/skin/green/img.gif +0 -0
  243. data/public/treport/plugins/datePicker/skin/green/left-btn.gif +0 -0
  244. data/public/treport/plugins/datePicker/skin/green/left-btn2.gif +0 -0
  245. data/public/treport/plugins/datePicker/skin/green/qs.jpg +0 -0
  246. data/public/treport/plugins/datePicker/skin/green/right-btn.gif +0 -0
  247. data/public/treport/plugins/datePicker/skin/green/right-btn2.gif +0 -0
  248. data/public/treport/plugins/datePicker/skin/lightBlue/Thumbs.db +0 -0
  249. data/public/treport/plugins/datePicker/skin/lightBlue/bg.gif +0 -0
  250. data/public/treport/plugins/datePicker/skin/lightBlue/btn.jpg +0 -0
  251. data/public/treport/plugins/datePicker/skin/lightBlue/datepicker.css +115 -0
  252. data/public/treport/plugins/datePicker/skin/lightBlue/dateselect.gif +0 -0
  253. data/public/treport/plugins/datePicker/skin/lightBlue/glass-bg.gif +0 -0
  254. data/public/treport/plugins/datePicker/skin/lightBlue/hd-sprite.gif +0 -0
  255. data/public/treport/plugins/datePicker/skin/lightBlue/img.gif +0 -0
  256. data/public/treport/plugins/datePicker/skin/lightBlue/left-btn.gif +0 -0
  257. data/public/treport/plugins/datePicker/skin/lightBlue/left-btn2.gif +0 -0
  258. data/public/treport/plugins/datePicker/skin/lightBlue/qs.jpg +0 -0
  259. data/public/treport/plugins/datePicker/skin/lightBlue/right-btn.gif +0 -0
  260. data/public/treport/plugins/datePicker/skin/lightBlue/right-btn2.gif +0 -0
  261. data/public/treport/plugins/datePicker/skin/lightBlue/titlebar.jpg +0 -0
  262. data/public/treport/plugins/datePicker/skin/modernBlue/Thumbs.db +0 -0
  263. data/public/treport/plugins/datePicker/skin/modernBlue/datepicker.css +302 -0
  264. data/public/treport/plugins/datePicker/skin/modernBlue/dateselect.gif +0 -0
  265. data/public/treport/plugins/datePicker/skin/modernBlue/glass-bg.gif +0 -0
  266. data/public/treport/plugins/datePicker/skin/modernBlue/hd-sprite.gif +0 -0
  267. data/public/treport/plugins/datePicker/skin/modernBlue/img.gif +0 -0
  268. data/public/treport/plugins/datePicker/skin/modernBlue/left-btn.gif +0 -0
  269. data/public/treport/plugins/datePicker/skin/modernBlue/left-btn2.gif +0 -0
  270. data/public/treport/plugins/datePicker/skin/modernBlue/right-btn.gif +0 -0
  271. data/public/treport/plugins/datePicker/skin/modernBlue/right-btn2.gif +0 -0
  272. data/public/treport/plugins/datePicker/skin/orange/Thumbs.db +0 -0
  273. data/public/treport/plugins/datePicker/skin/orange/datepicker.css +115 -0
  274. data/public/treport/plugins/datePicker/skin/orange/dateselect.gif +0 -0
  275. data/public/treport/plugins/datePicker/skin/orange/glass-bg.gif +0 -0
  276. data/public/treport/plugins/datePicker/skin/orange/hd-sprite.gif +0 -0
  277. data/public/treport/plugins/datePicker/skin/orange/img.gif +0 -0
  278. data/public/treport/plugins/datePicker/skin/orange/left-btn.gif +0 -0
  279. data/public/treport/plugins/datePicker/skin/orange/left-btn2.gif +0 -0
  280. data/public/treport/plugins/datePicker/skin/orange/right-btn.gif +0 -0
  281. data/public/treport/plugins/datePicker/skin/orange/right-btn2.gif +0 -0
  282. data/public/treport/plugins/datePicker/skin/red/Thumbs.db +0 -0
  283. data/public/treport/plugins/datePicker/skin/red/bg.gif +0 -0
  284. data/public/treport/plugins/datePicker/skin/red/datepicker.css +115 -0
  285. data/public/treport/plugins/datePicker/skin/red/dateselect.gif +0 -0
  286. data/public/treport/plugins/datePicker/skin/red/glass-bg.gif +0 -0
  287. data/public/treport/plugins/datePicker/skin/red/hd-sprite.gif +0 -0
  288. data/public/treport/plugins/datePicker/skin/red/img.gif +0 -0
  289. data/public/treport/plugins/datePicker/skin/red/left-btn.gif +0 -0
  290. data/public/treport/plugins/datePicker/skin/red/left-btn2.gif +0 -0
  291. data/public/treport/plugins/datePicker/skin/red/qs.jpg +0 -0
  292. data/public/treport/plugins/datePicker/skin/red/right-btn.gif +0 -0
  293. data/public/treport/plugins/datePicker/skin/red/right-btn2.gif +0 -0
  294. data/public/treport/plugins/datePicker/skin/whyGreen/Thumbs.db +0 -0
  295. data/public/treport/plugins/datePicker/skin/whyGreen/bg.jpg +0 -0
  296. data/public/treport/plugins/datePicker/skin/whyGreen/datepicker.css +256 -0
  297. data/public/treport/plugins/datePicker/skin/whyGreen/img.gif +0 -0
  298. data/public/treport/plugins/datePicker/skin/yellowGreen/Thumbs.db +0 -0
  299. data/public/treport/plugins/datePicker/skin/yellowGreen/bg.gif +0 -0
  300. data/public/treport/plugins/datePicker/skin/yellowGreen/datepicker.css +115 -0
  301. data/public/treport/plugins/datePicker/skin/yellowGreen/qs.jpg +0 -0
  302. data/public/treport/plugins/datePicker//351/222/203/346/277/212/345/243/212/351/220/250/356/206/277/345/201/206/351/217/200/347/221/260/345/217/276/346/265/240/346/240/255/356/227/223/351/217/215_txt +1 -0
  303. data/public/treport/plugins/heandlebars/handlebars-v4.0.5.js +4608 -0
  304. data/public/treport/plugins/jquery-ui/iframeTab.js +42 -0
  305. data/public/treport/plugins/jquery-ui/images/ui-icons_444444_256x240.png +0 -0
  306. data/public/treport/plugins/jquery-ui/images/ui-icons_555555_256x240.png +0 -0
  307. data/public/treport/plugins/jquery-ui/images/ui-icons_777620_256x240.png +0 -0
  308. data/public/treport/plugins/jquery-ui/images/ui-icons_777777_256x240.png +0 -0
  309. data/public/treport/plugins/jquery-ui/images/ui-icons_cc0000_256x240.png +0 -0
  310. data/public/treport/plugins/jquery-ui/images/ui-icons_ffffff_256x240.png +0 -0
  311. data/public/treport/plugins/jquery-ui/jquery-ui.css +1312 -0
  312. data/public/treport/plugins/jquery-ui/jquery-ui.js +18706 -0
  313. data/public/treport/plugins/layer/layer.js +2 -0
  314. data/public/treport/plugins/layer/mobile/layer.js +2 -0
  315. data/public/treport/plugins/layer/mobile/need/layer.css +1 -0
  316. data/public/treport/plugins/layer/skin/default/icon-ext.png +0 -0
  317. data/public/treport/plugins/layer/skin/default/icon.png +0 -0
  318. data/public/treport/plugins/layer/skin/default/layer.css +1 -0
  319. data/public/treport/plugins/layer/skin/default/loading-0.gif +0 -0
  320. data/public/treport/plugins/layer/skin/default/loading-1.gif +0 -0
  321. data/public/treport/plugins/layer/skin/default/loading-2.gif +0 -0
  322. data/public/treport/plugins/selectize/css/selectize.bootstrap2.css +494 -0
  323. data/public/treport/plugins/selectize/css/selectize.bootstrap3.css +408 -0
  324. data/public/treport/plugins/selectize/css/selectize.css +324 -0
  325. data/public/treport/plugins/selectize/css/selectize.default.css +394 -0
  326. data/public/treport/plugins/selectize/css/selectize.legacy.css +371 -0
  327. data/public/treport/plugins/selectize/js/selectize.js +3193 -0
  328. data/public/treport/plugins/selectize/js/selectize.min.js +3 -0
  329. data/public/treport/plugins/selectize/js/standalone/selectize.js +3829 -0
  330. data/public/treport/plugins/selectize/js/standalone/selectize.min.js +3 -0
  331. data/public/treport/plugins/selectize/less/plugins/drag_drop.less +16 -0
  332. data/public/treport/plugins/selectize/less/plugins/dropdown_header.less +20 -0
  333. data/public/treport/plugins/selectize/less/plugins/optgroup_columns.less +17 -0
  334. data/public/treport/plugins/selectize/less/plugins/remove_button.less +43 -0
  335. data/public/treport/plugins/selectize/less/selectize.bootstrap2.less +161 -0
  336. data/public/treport/plugins/selectize/less/selectize.bootstrap3.less +150 -0
  337. data/public/treport/plugins/selectize/less/selectize.default.less +84 -0
  338. data/public/treport/plugins/selectize/less/selectize.legacy.less +75 -0
  339. data/public/treport/plugins/selectize/less/selectize.less +296 -0
  340. data/public/treport/plugins/tools/tab_enter.js +30 -0
  341. data/public/treport/plugins/typeahead/typeahead.bundle.js +2451 -0
  342. data/public/treport/plugins/validationEngine/jquery.validationEngine-zh_CN.js +181 -0
  343. data/public/treport/plugins/validationEngine/jquery.validationEngine.js +2160 -0
  344. data/public/treport/plugins/validationEngine/template.css +125 -0
  345. data/public/treport/plugins/validationEngine/validationEngine.jquery.css +182 -0
  346. data/public/treport/plugins/zDialog/dialog.js +1313 -0
  347. data/public/treport/plugins/zDialog/drag.js +92 -0
  348. data/public/treport/plugins/zDialog/skins/blue/dialog_bg.jpg +0 -0
  349. data/public/treport/plugins/zDialog/skins/blue/dialog_cb.gif +0 -0
  350. data/public/treport/plugins/zDialog/skins/blue/dialog_cb.png +0 -0
  351. data/public/treport/plugins/zDialog/skins/blue/dialog_closebtn.gif +0 -0
  352. data/public/treport/plugins/zDialog/skins/blue/dialog_closebtn_over.gif +0 -0
  353. data/public/treport/plugins/zDialog/skins/blue/dialog_ct.gif +0 -0
  354. data/public/treport/plugins/zDialog/skins/blue/dialog_ct.png +0 -0
  355. data/public/treport/plugins/zDialog/skins/blue/dialog_lb.gif +0 -0
  356. data/public/treport/plugins/zDialog/skins/blue/dialog_lb.png +0 -0
  357. data/public/treport/plugins/zDialog/skins/blue/dialog_lt.gif +0 -0
  358. data/public/treport/plugins/zDialog/skins/blue/dialog_lt.png +0 -0
  359. data/public/treport/plugins/zDialog/skins/blue/dialog_mlm.gif +0 -0
  360. data/public/treport/plugins/zDialog/skins/blue/dialog_mlm.png +0 -0
  361. data/public/treport/plugins/zDialog/skins/blue/dialog_mrm.gif +0 -0
  362. data/public/treport/plugins/zDialog/skins/blue/dialog_mrm.png +0 -0
  363. data/public/treport/plugins/zDialog/skins/blue/dialog_rb.gif +0 -0
  364. data/public/treport/plugins/zDialog/skins/blue/dialog_rb.png +0 -0
  365. data/public/treport/plugins/zDialog/skins/blue/dialog_rt.gif +0 -0
  366. data/public/treport/plugins/zDialog/skins/blue/dialog_rt.png +0 -0
  367. data/public/treport/plugins/zDialog/skins/blue/dir.txt +24 -0
  368. data/public/treport/plugins/zDialog/skins/blue/icon_alert.gif +0 -0
  369. data/public/treport/plugins/zDialog/skins/blue/icon_dialog.gif +0 -0
  370. data/public/treport/plugins/zDialog/skins/blue/icon_query.gif +0 -0
  371. data/public/treport/plugins/zDialog/skins/blue/window.gif +0 -0
  372. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_bg.jpg +0 -0
  373. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_cb.gif +0 -0
  374. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_cb.png +0 -0
  375. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_closebtn.gif +0 -0
  376. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_closebtn_over.gif +0 -0
  377. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_ct.gif +0 -0
  378. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_ct.png +0 -0
  379. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_lb.gif +0 -0
  380. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_lb.png +0 -0
  381. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_lt.gif +0 -0
  382. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_lt.png +0 -0
  383. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_mlm.gif +0 -0
  384. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_mlm.png +0 -0
  385. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_mrm.gif +0 -0
  386. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_mrm.png +0 -0
  387. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_rb.gif +0 -0
  388. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_rb.png +0 -0
  389. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_rt.gif +0 -0
  390. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_rt.png +0 -0
  391. data/public/treport/plugins/zDialog/skins/darkBlue/dir.txt +24 -0
  392. data/public/treport/plugins/zDialog/skins/darkBlue/icon_alert.gif +0 -0
  393. data/public/treport/plugins/zDialog/skins/darkBlue/icon_dialog.gif +0 -0
  394. data/public/treport/plugins/zDialog/skins/darkBlue/icon_query.gif +0 -0
  395. data/public/treport/plugins/zDialog/skins/darkBlue/window.gif +0 -0
  396. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_bg.jpg +0 -0
  397. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_cb.gif +0 -0
  398. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_cb.png +0 -0
  399. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_closebtn.gif +0 -0
  400. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_closebtn_over.gif +0 -0
  401. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_ct.gif +0 -0
  402. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_ct.png +0 -0
  403. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_lb.gif +0 -0
  404. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_lb.png +0 -0
  405. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_lt.gif +0 -0
  406. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_lt.png +0 -0
  407. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_mlm.gif +0 -0
  408. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_mlm.png +0 -0
  409. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_mrm.gif +0 -0
  410. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_mrm.png +0 -0
  411. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_rb.gif +0 -0
  412. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_rb.png +0 -0
  413. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_rt.gif +0 -0
  414. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_rt.png +0 -0
  415. data/public/treport/plugins/zDialog/skins/darkYellow/dir.txt +24 -0
  416. data/public/treport/plugins/zDialog/skins/darkYellow/icon_alert.gif +0 -0
  417. data/public/treport/plugins/zDialog/skins/darkYellow/icon_dialog.gif +0 -0
  418. data/public/treport/plugins/zDialog/skins/darkYellow/icon_query.gif +0 -0
  419. data/public/treport/plugins/zDialog/skins/darkYellow/window.gif +0 -0
  420. data/public/treport/plugins/zDialog/skins/green/dialog_bg.jpg +0 -0
  421. data/public/treport/plugins/zDialog/skins/green/dialog_cb.gif +0 -0
  422. data/public/treport/plugins/zDialog/skins/green/dialog_cb.png +0 -0
  423. data/public/treport/plugins/zDialog/skins/green/dialog_closebtn.gif +0 -0
  424. data/public/treport/plugins/zDialog/skins/green/dialog_closebtn_over.gif +0 -0
  425. data/public/treport/plugins/zDialog/skins/green/dialog_ct.gif +0 -0
  426. data/public/treport/plugins/zDialog/skins/green/dialog_ct.png +0 -0
  427. data/public/treport/plugins/zDialog/skins/green/dialog_lb.gif +0 -0
  428. data/public/treport/plugins/zDialog/skins/green/dialog_lb.png +0 -0
  429. data/public/treport/plugins/zDialog/skins/green/dialog_lt.gif +0 -0
  430. data/public/treport/plugins/zDialog/skins/green/dialog_lt.png +0 -0
  431. data/public/treport/plugins/zDialog/skins/green/dialog_mlm.gif +0 -0
  432. data/public/treport/plugins/zDialog/skins/green/dialog_mlm.png +0 -0
  433. data/public/treport/plugins/zDialog/skins/green/dialog_mrm.gif +0 -0
  434. data/public/treport/plugins/zDialog/skins/green/dialog_mrm.png +0 -0
  435. data/public/treport/plugins/zDialog/skins/green/dialog_rb.gif +0 -0
  436. data/public/treport/plugins/zDialog/skins/green/dialog_rb.png +0 -0
  437. data/public/treport/plugins/zDialog/skins/green/dialog_rt.gif +0 -0
  438. data/public/treport/plugins/zDialog/skins/green/dialog_rt.png +0 -0
  439. data/public/treport/plugins/zDialog/skins/green/dir.txt +24 -0
  440. data/public/treport/plugins/zDialog/skins/green/icon_alert.gif +0 -0
  441. data/public/treport/plugins/zDialog/skins/green/icon_dialog.gif +0 -0
  442. data/public/treport/plugins/zDialog/skins/green/icon_query.gif +0 -0
  443. data/public/treport/plugins/zDialog/skins/green/window.gif +0 -0
  444. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_bg.jpg +0 -0
  445. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_cb.gif +0 -0
  446. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_cb.png +0 -0
  447. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_closebtn.gif +0 -0
  448. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_closebtn_over.gif +0 -0
  449. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_ct.gif +0 -0
  450. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_ct.png +0 -0
  451. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_lb.gif +0 -0
  452. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_lb.png +0 -0
  453. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_lt.gif +0 -0
  454. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_lt.png +0 -0
  455. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_mlm.gif +0 -0
  456. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_mlm.png +0 -0
  457. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_mrm.gif +0 -0
  458. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_mrm.png +0 -0
  459. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_rb.gif +0 -0
  460. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_rb.png +0 -0
  461. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_rt.gif +0 -0
  462. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_rt.png +0 -0
  463. data/public/treport/plugins/zDialog/skins/lightBlue/dir.txt +24 -0
  464. data/public/treport/plugins/zDialog/skins/lightBlue/icon_alert.gif +0 -0
  465. data/public/treport/plugins/zDialog/skins/lightBlue/icon_dialog.gif +0 -0
  466. data/public/treport/plugins/zDialog/skins/lightBlue/icon_query.gif +0 -0
  467. data/public/treport/plugins/zDialog/skins/lightBlue/window.gif +0 -0
  468. data/public/treport/plugins/zDialog/skins/orange/dialog_bg.jpg +0 -0
  469. data/public/treport/plugins/zDialog/skins/orange/dialog_cb.gif +0 -0
  470. data/public/treport/plugins/zDialog/skins/orange/dialog_cb.png +0 -0
  471. data/public/treport/plugins/zDialog/skins/orange/dialog_closebtn.gif +0 -0
  472. data/public/treport/plugins/zDialog/skins/orange/dialog_closebtn_over.gif +0 -0
  473. data/public/treport/plugins/zDialog/skins/orange/dialog_ct.gif +0 -0
  474. data/public/treport/plugins/zDialog/skins/orange/dialog_ct.png +0 -0
  475. data/public/treport/plugins/zDialog/skins/orange/dialog_decreasebtn.gif +0 -0
  476. data/public/treport/plugins/zDialog/skins/orange/dialog_lb.gif +0 -0
  477. data/public/treport/plugins/zDialog/skins/orange/dialog_lb.png +0 -0
  478. data/public/treport/plugins/zDialog/skins/orange/dialog_lt.gif +0 -0
  479. data/public/treport/plugins/zDialog/skins/orange/dialog_lt.png +0 -0
  480. data/public/treport/plugins/zDialog/skins/orange/dialog_maxbtn.gif +0 -0
  481. data/public/treport/plugins/zDialog/skins/orange/dialog_minbtn.gif +0 -0
  482. data/public/treport/plugins/zDialog/skins/orange/dialog_mlm.gif +0 -0
  483. data/public/treport/plugins/zDialog/skins/orange/dialog_mlm.png +0 -0
  484. data/public/treport/plugins/zDialog/skins/orange/dialog_mrm.gif +0 -0
  485. data/public/treport/plugins/zDialog/skins/orange/dialog_mrm.png +0 -0
  486. data/public/treport/plugins/zDialog/skins/orange/dialog_rb.gif +0 -0
  487. data/public/treport/plugins/zDialog/skins/orange/dialog_rb.png +0 -0
  488. data/public/treport/plugins/zDialog/skins/orange/dialog_rt.gif +0 -0
  489. data/public/treport/plugins/zDialog/skins/orange/dialog_rt.png +0 -0
  490. data/public/treport/plugins/zDialog/skins/orange/icon_alert.gif +0 -0
  491. data/public/treport/plugins/zDialog/skins/orange/icon_dialog.gif +0 -0
  492. data/public/treport/plugins/zDialog/skins/orange/icon_dialog.png +0 -0
  493. data/public/treport/plugins/zDialog/skins/orange/icon_query.gif +0 -0
  494. data/public/treport/plugins/zDialog/skins/orange/item_leftBtn.gif +0 -0
  495. data/public/treport/plugins/zDialog/skins/orange/item_rightBtn.gif +0 -0
  496. data/public/treport/plugins/zDialog/skins/orange/shadow_cb.gif +0 -0
  497. data/public/treport/plugins/zDialog/skins/orange/shadow_cb.png +0 -0
  498. data/public/treport/plugins/zDialog/skins/orange/shadow_ct.gif +0 -0
  499. data/public/treport/plugins/zDialog/skins/orange/shadow_lb.gif +0 -0
  500. data/public/treport/plugins/zDialog/skins/orange/shadow_lb.png +0 -0
  501. data/public/treport/plugins/zDialog/skins/orange/shadow_lm.gif +0 -0
  502. data/public/treport/plugins/zDialog/skins/orange/shadow_lt.gif +0 -0
  503. data/public/treport/plugins/zDialog/skins/orange/shadow_rb.gif +0 -0
  504. data/public/treport/plugins/zDialog/skins/orange/shadow_rb.png +0 -0
  505. data/public/treport/plugins/zDialog/skins/orange/shadow_rm.gif +0 -0
  506. data/public/treport/plugins/zDialog/skins/orange/shadow_rt.gif +0 -0
  507. data/public/treport/plugins/zDialog/skins/orange/simple_bottomLine.gif +0 -0
  508. data/public/treport/plugins/zDialog/skins/orange/simple_close.gif +0 -0
  509. data/public/treport/plugins/zDialog/skins/orange/simple_tip.gif +0 -0
  510. data/public/treport/plugins/zDialog/skins/orange/simple_tip.png +0 -0
  511. data/public/treport/plugins/zDialog/skins/orange/taskBar.jpg +0 -0
  512. data/public/treport/plugins/zDialog/skins/orange/taskItemLeft.jpg +0 -0
  513. data/public/treport/plugins/zDialog/skins/orange/taskItemLeftCurrent.jpg +0 -0
  514. data/public/treport/plugins/zDialog/skins/orange/taskItemRight.jpg +0 -0
  515. data/public/treport/plugins/zDialog/skins/orange/taskItemRightCurrent.jpg +0 -0
  516. data/public/treport/plugins/zDialog/skins/orange/trans.gif +0 -0
  517. data/public/treport/plugins/zDialog/skins/orange/window.gif +0 -0
  518. data/public/treport/plugins/zDialog/skins/red/dialog_bg.jpg +0 -0
  519. data/public/treport/plugins/zDialog/skins/red/dialog_cb.gif +0 -0
  520. data/public/treport/plugins/zDialog/skins/red/dialog_cb.png +0 -0
  521. data/public/treport/plugins/zDialog/skins/red/dialog_closebtn.gif +0 -0
  522. data/public/treport/plugins/zDialog/skins/red/dialog_closebtn_over.gif +0 -0
  523. data/public/treport/plugins/zDialog/skins/red/dialog_ct.gif +0 -0
  524. data/public/treport/plugins/zDialog/skins/red/dialog_ct.png +0 -0
  525. data/public/treport/plugins/zDialog/skins/red/dialog_lb.gif +0 -0
  526. data/public/treport/plugins/zDialog/skins/red/dialog_lb.png +0 -0
  527. data/public/treport/plugins/zDialog/skins/red/dialog_lt.gif +0 -0
  528. data/public/treport/plugins/zDialog/skins/red/dialog_lt.png +0 -0
  529. data/public/treport/plugins/zDialog/skins/red/dialog_mlm.gif +0 -0
  530. data/public/treport/plugins/zDialog/skins/red/dialog_mlm.png +0 -0
  531. data/public/treport/plugins/zDialog/skins/red/dialog_mrm.gif +0 -0
  532. data/public/treport/plugins/zDialog/skins/red/dialog_mrm.png +0 -0
  533. data/public/treport/plugins/zDialog/skins/red/dialog_rb.gif +0 -0
  534. data/public/treport/plugins/zDialog/skins/red/dialog_rb.png +0 -0
  535. data/public/treport/plugins/zDialog/skins/red/dialog_rt.gif +0 -0
  536. data/public/treport/plugins/zDialog/skins/red/dialog_rt.png +0 -0
  537. data/public/treport/plugins/zDialog/skins/red/dir.txt +24 -0
  538. data/public/treport/plugins/zDialog/skins/red/icon_alert.gif +0 -0
  539. data/public/treport/plugins/zDialog/skins/red/icon_dialog.gif +0 -0
  540. data/public/treport/plugins/zDialog/skins/red/icon_query.gif +0 -0
  541. data/public/treport/plugins/zDialog/skins/red/window.gif +0 -0
  542. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_bg.jpg +0 -0
  543. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_cb.gif +0 -0
  544. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_cb.png +0 -0
  545. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_closebtn.gif +0 -0
  546. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_closebtn_over.gif +0 -0
  547. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_ct.gif +0 -0
  548. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_ct.png +0 -0
  549. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_lb.gif +0 -0
  550. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_lb.png +0 -0
  551. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_lt.gif +0 -0
  552. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_lt.png +0 -0
  553. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_mlm.gif +0 -0
  554. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_mlm.png +0 -0
  555. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_mrm.gif +0 -0
  556. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_mrm.png +0 -0
  557. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_rb.gif +0 -0
  558. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_rb.png +0 -0
  559. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_rt.gif +0 -0
  560. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_rt.png +0 -0
  561. data/public/treport/plugins/zDialog/skins/yellowGreen/dir.txt +24 -0
  562. data/public/treport/plugins/zDialog/skins/yellowGreen/icon_alert.gif +0 -0
  563. data/public/treport/plugins/zDialog/skins/yellowGreen/icon_dialog.gif +0 -0
  564. data/public/treport/plugins/zDialog/skins/yellowGreen/icon_query.gif +0 -0
  565. data/public/treport/plugins/zDialog/skins/yellowGreen/window.gif +0 -0
  566. data/public/treport/plugins/zDialog/zDialog.js +764 -0
  567. data/public/treport/plugins/zDialog/zDrag.js +1 -0
  568. data/public/treport/src-noconflict/ace.js +18673 -0
  569. data/public/treport/src-noconflict/ext-beautify.js +334 -0
  570. data/public/treport/src-noconflict/ext-chromevox.js +540 -0
  571. data/public/treport/src-noconflict/ext-elastic_tabstops_lite.js +274 -0
  572. data/public/treport/src-noconflict/ext-emmet.js +1218 -0
  573. data/public/treport/src-noconflict/ext-error_marker.js +6 -0
  574. data/public/treport/src-noconflict/ext-keybinding_menu.js +170 -0
  575. data/public/treport/src-noconflict/ext-language_tools.js +1938 -0
  576. data/public/treport/src-noconflict/ext-linking.js +52 -0
  577. data/public/treport/src-noconflict/ext-modelist.js +201 -0
  578. data/public/treport/src-noconflict/ext-old_ie.js +501 -0
  579. data/public/treport/src-noconflict/ext-searchbox.js +416 -0
  580. data/public/treport/src-noconflict/ext-settings_menu.js +653 -0
  581. data/public/treport/src-noconflict/ext-spellcheck.js +71 -0
  582. data/public/treport/src-noconflict/ext-split.js +246 -0
  583. data/public/treport/src-noconflict/ext-static_highlight.js +161 -0
  584. data/public/treport/src-noconflict/ext-statusbar.js +53 -0
  585. data/public/treport/src-noconflict/ext-textarea.js +559 -0
  586. data/public/treport/src-noconflict/ext-themelist.js +60 -0
  587. data/public/treport/src-noconflict/ext-whitespace.js +185 -0
  588. data/public/treport/src-noconflict/keybinding-emacs.js +1181 -0
  589. data/public/treport/src-noconflict/keybinding-vim.js +5580 -0
  590. data/public/treport/src-noconflict/mode-abap.js +214 -0
  591. data/public/treport/src-noconflict/mode-abc.js +260 -0
  592. data/public/treport/src-noconflict/mode-actionscript.js +266 -0
  593. data/public/treport/src-noconflict/mode-ada.js +87 -0
  594. data/public/treport/src-noconflict/mode-apache_conf.js +355 -0
  595. data/public/treport/src-noconflict/mode-applescript.js +271 -0
  596. data/public/treport/src-noconflict/mode-asciidoc.js +342 -0
  597. data/public/treport/src-noconflict/mode-assembly_x86.js +185 -0
  598. data/public/treport/src-noconflict/mode-autohotkey.js +234 -0
  599. data/public/treport/src-noconflict/mode-batchfile.js +222 -0
  600. data/public/treport/src-noconflict/mode-c9search.js +275 -0
  601. data/public/treport/src-noconflict/mode-c_cpp.js +845 -0
  602. data/public/treport/src-noconflict/mode-cirru.js +202 -0
  603. data/public/treport/src-noconflict/mode-clojure.js +306 -0
  604. data/public/treport/src-noconflict/mode-cobol.js +94 -0
  605. data/public/treport/src-noconflict/mode-coffee.js +393 -0
  606. data/public/treport/src-noconflict/mode-coldfusion.js +2867 -0
  607. data/public/treport/src-noconflict/mode-csharp.js +853 -0
  608. data/public/treport/src-noconflict/mode-css.js +1008 -0
  609. data/public/treport/src-noconflict/mode-curly.js +2836 -0
  610. data/public/treport/src-noconflict/mode-d.js +512 -0
  611. data/public/treport/src-noconflict/mode-dart.js +1049 -0
  612. data/public/treport/src-noconflict/mode-diff.js +139 -0
  613. data/public/treport/src-noconflict/mode-django.js +2870 -0
  614. data/public/treport/src-noconflict/mode-dockerfile.js +849 -0
  615. data/public/treport/src-noconflict/mode-dot.js +412 -0
  616. data/public/treport/src-noconflict/mode-eiffel.js +128 -0
  617. data/public/treport/src-noconflict/mode-ejs.js +3294 -0
  618. data/public/treport/src-noconflict/mode-elixir.js +493 -0
  619. data/public/treport/src-noconflict/mode-elm.js +296 -0
  620. data/public/treport/src-noconflict/mode-erlang.js +1001 -0
  621. data/public/treport/src-noconflict/mode-forth.js +289 -0
  622. data/public/treport/src-noconflict/mode-ftl.js +1137 -0
  623. data/public/treport/src-noconflict/mode-gcode.js +85 -0
  624. data/public/treport/src-noconflict/mode-gherkin.js +162 -0
  625. data/public/treport/src-noconflict/mode-gitignore.js +51 -0
  626. data/public/treport/src-noconflict/mode-glsl.js +922 -0
  627. data/public/treport/src-noconflict/mode-gobstones.js +1273 -0
  628. data/public/treport/src-noconflict/mode-golang.js +763 -0
  629. data/public/treport/src-noconflict/mode-groovy.js +1332 -0
  630. data/public/treport/src-noconflict/mode-haml.js +1482 -0
  631. data/public/treport/src-noconflict/mode-handlebars.js +2895 -0
  632. data/public/treport/src-noconflict/mode-haskell.js +371 -0
  633. data/public/treport/src-noconflict/mode-haxe.js +737 -0
  634. data/public/treport/src-noconflict/mode-html.js +2780 -0
  635. data/public/treport/src-noconflict/mode-html_elixir.js +3358 -0
  636. data/public/treport/src-noconflict/mode-html_ruby.js +3311 -0
  637. data/public/treport/src-noconflict/mode-ini.js +154 -0
  638. data/public/treport/src-noconflict/mode-io.js +246 -0
  639. data/public/treport/src-noconflict/mode-jack.js +696 -0
  640. data/public/treport/src-noconflict/mode-jade.js +2066 -0
  641. data/public/treport/src-noconflict/mode-java.js +1287 -0
  642. data/public/treport/src-noconflict/mode-javascript.js +1140 -0
  643. data/public/treport/src-noconflict/mode-json.js +668 -0
  644. data/public/treport/src-noconflict/mode-jsoniq.js +2956 -0
  645. data/public/treport/src-noconflict/mode-jsp.js +1701 -0
  646. data/public/treport/src-noconflict/mode-jsx.js +762 -0
  647. data/public/treport/src-noconflict/mode-julia.js +295 -0
  648. data/public/treport/src-noconflict/mode-latex.js +223 -0
  649. data/public/treport/src-noconflict/mode-lean.js +281 -0
  650. data/public/treport/src-noconflict/mode-less.js +1129 -0
  651. data/public/treport/src-noconflict/mode-liquid.js +1139 -0
  652. data/public/treport/src-noconflict/mode-lisp.js +104 -0
  653. data/public/treport/src-noconflict/mode-live_script.js +481 -0
  654. data/public/treport/src-noconflict/mode-livescript.js +271 -0
  655. data/public/treport/src-noconflict/mode-logiql.js +667 -0
  656. data/public/treport/src-noconflict/mode-lsl.js +692 -0
  657. data/public/treport/src-noconflict/mode-lua.js +423 -0
  658. data/public/treport/src-noconflict/mode-luapage.js +3277 -0
  659. data/public/treport/src-noconflict/mode-lucene.js +69 -0
  660. data/public/treport/src-noconflict/mode-makefile.js +403 -0
  661. data/public/treport/src-noconflict/mode-markdown.js +3165 -0
  662. data/public/treport/src-noconflict/mode-mask.js +2099 -0
  663. data/public/treport/src-noconflict/mode-matlab.js +256 -0
  664. data/public/treport/src-noconflict/mode-mavens_mate_log.js +160 -0
  665. data/public/treport/src-noconflict/mode-maze.js +283 -0
  666. data/public/treport/src-noconflict/mode-mel.js +613 -0
  667. data/public/treport/src-noconflict/mode-mips_assembler.js +235 -0
  668. data/public/treport/src-noconflict/mode-mipsassembler.js +196 -0
  669. data/public/treport/src-noconflict/mode-mushcode.js +673 -0
  670. data/public/treport/src-noconflict/mode-mysql.js +160 -0
  671. data/public/treport/src-noconflict/mode-nix.js +989 -0
  672. data/public/treport/src-noconflict/mode-nsis.js +304 -0
  673. data/public/treport/src-noconflict/mode-objectivec.js +726 -0
  674. data/public/treport/src-noconflict/mode-ocaml.js +414 -0
  675. data/public/treport/src-noconflict/mode-pascal.js +197 -0
  676. data/public/treport/src-noconflict/mode-perl.js +373 -0
  677. data/public/treport/src-noconflict/mode-pgsql.js +1489 -0
  678. data/public/treport/src-noconflict/mode-php.js +13328 -0
  679. data/public/treport/src-noconflict/mode-plain_text.js +25 -0
  680. data/public/treport/src-noconflict/mode-powershell.js +768 -0
  681. data/public/treport/src-noconflict/mode-praat.js +468 -0
  682. data/public/treport/src-noconflict/mode-prolog.js +363 -0
  683. data/public/treport/src-noconflict/mode-properties.js +72 -0
  684. data/public/treport/src-noconflict/mode-protobuf.js +936 -0
  685. data/public/treport/src-noconflict/mode-python.js +264 -0
  686. data/public/treport/src-noconflict/mode-r.js +302 -0
  687. data/public/treport/src-noconflict/mode-razor.js +3136 -0
  688. data/public/treport/src-noconflict/mode-rdoc.js +205 -0
  689. data/public/treport/src-noconflict/mode-rhtml.js +3079 -0
  690. data/public/treport/src-noconflict/mode-rst.js +249 -0
  691. data/public/treport/src-noconflict/mode-ruby.js +843 -0
  692. data/public/treport/src-noconflict/mode-rust.js +270 -0
  693. data/public/treport/src-noconflict/mode-sass.js +412 -0
  694. data/public/treport/src-noconflict/mode-scad.js +766 -0
  695. data/public/treport/src-noconflict/mode-scala.js +1329 -0
  696. data/public/treport/src-noconflict/mode-scheme.js +224 -0
  697. data/public/treport/src-noconflict/mode-scss.js +922 -0
  698. data/public/treport/src-noconflict/mode-sh.js +798 -0
  699. data/public/treport/src-noconflict/mode-sjs.js +1357 -0
  700. data/public/treport/src-noconflict/mode-smarty.js +2906 -0
  701. data/public/treport/src-noconflict/mode-snippets.js +198 -0
  702. data/public/treport/src-noconflict/mode-soy_template.js +3119 -0
  703. data/public/treport/src-noconflict/mode-space.js +159 -0
  704. data/public/treport/src-noconflict/mode-sql.js +100 -0
  705. data/public/treport/src-noconflict/mode-sqlserver.js +437 -0
  706. data/public/treport/src-noconflict/mode-stylus.js +414 -0
  707. data/public/treport/src-noconflict/mode-svg.js +1916 -0
  708. data/public/treport/src-noconflict/mode-swift.js +738 -0
  709. data/public/treport/src-noconflict/mode-swig.js +1099 -0
  710. data/public/treport/src-noconflict/mode-tcl.js +375 -0
  711. data/public/treport/src-noconflict/mode-tex.js +151 -0
  712. data/public/treport/src-noconflict/mode-text.js +1 -0
  713. data/public/treport/src-noconflict/mode-textile.js +141 -0
  714. data/public/treport/src-noconflict/mode-toml.js +145 -0
  715. data/public/treport/src-noconflict/mode-twig.js +2964 -0
  716. data/public/treport/src-noconflict/mode-typescript.js +1223 -0
  717. data/public/treport/src-noconflict/mode-vala.js +1026 -0
  718. data/public/treport/src-noconflict/mode-vbscript.js +226 -0
  719. data/public/treport/src-noconflict/mode-velocity.js +3062 -0
  720. data/public/treport/src-noconflict/mode-verilog.js +103 -0
  721. data/public/treport/src-noconflict/mode-vhdl.js +110 -0
  722. data/public/treport/src-noconflict/mode-wollok.js +1256 -0
  723. data/public/treport/src-noconflict/mode-xml.js +661 -0
  724. data/public/treport/src-noconflict/mode-xquery.js +2968 -0
  725. data/public/treport/src-noconflict/mode-yaml.js +256 -0
  726. data/public/treport/src-noconflict/snippets/abap.js +7 -0
  727. data/public/treport/src-noconflict/snippets/abc.js +38 -0
  728. data/public/treport/src-noconflict/snippets/actionscript.js +164 -0
  729. data/public/treport/src-noconflict/snippets/ada.js +7 -0
  730. data/public/treport/src-noconflict/snippets/apache_conf.js +7 -0
  731. data/public/treport/src-noconflict/snippets/applescript.js +7 -0
  732. data/public/treport/src-noconflict/snippets/asciidoc.js +7 -0
  733. data/public/treport/src-noconflict/snippets/assembly_x86.js +7 -0
  734. data/public/treport/src-noconflict/snippets/autohotkey.js +7 -0
  735. data/public/treport/src-noconflict/snippets/batchfile.js +7 -0
  736. data/public/treport/src-noconflict/snippets/c9search.js +7 -0
  737. data/public/treport/src-noconflict/snippets/c_cpp.js +138 -0
  738. data/public/treport/src-noconflict/snippets/cirru.js +7 -0
  739. data/public/treport/src-noconflict/snippets/clojure.js +97 -0
  740. data/public/treport/src-noconflict/snippets/cobol.js +7 -0
  741. data/public/treport/src-noconflict/snippets/coffee.js +102 -0
  742. data/public/treport/src-noconflict/snippets/coldfusion.js +7 -0
  743. data/public/treport/src-noconflict/snippets/csharp.js +7 -0
  744. data/public/treport/src-noconflict/snippets/css.js +974 -0
  745. data/public/treport/src-noconflict/snippets/curly.js +7 -0
  746. data/public/treport/src-noconflict/snippets/d.js +7 -0
  747. data/public/treport/src-noconflict/snippets/dart.js +90 -0
  748. data/public/treport/src-noconflict/snippets/diff.js +18 -0
  749. data/public/treport/src-noconflict/snippets/django.js +115 -0
  750. data/public/treport/src-noconflict/snippets/dockerfile.js +7 -0
  751. data/public/treport/src-noconflict/snippets/dot.js +7 -0
  752. data/public/treport/src-noconflict/snippets/eiffel.js +7 -0
  753. data/public/treport/src-noconflict/snippets/ejs.js +7 -0
  754. data/public/treport/src-noconflict/snippets/elixir.js +7 -0
  755. data/public/treport/src-noconflict/snippets/elm.js +7 -0
  756. data/public/treport/src-noconflict/snippets/erlang.js +167 -0
  757. data/public/treport/src-noconflict/snippets/forth.js +7 -0
  758. data/public/treport/src-noconflict/snippets/ftl.js +7 -0
  759. data/public/treport/src-noconflict/snippets/gcode.js +7 -0
  760. data/public/treport/src-noconflict/snippets/gherkin.js +7 -0
  761. data/public/treport/src-noconflict/snippets/gitignore.js +7 -0
  762. data/public/treport/src-noconflict/snippets/glsl.js +7 -0
  763. data/public/treport/src-noconflict/snippets/gobstones.js +41 -0
  764. data/public/treport/src-noconflict/snippets/golang.js +7 -0
  765. data/public/treport/src-noconflict/snippets/groovy.js +7 -0
  766. data/public/treport/src-noconflict/snippets/haml.js +27 -0
  767. data/public/treport/src-noconflict/snippets/handlebars.js +7 -0
  768. data/public/treport/src-noconflict/snippets/haskell.js +89 -0
  769. data/public/treport/src-noconflict/snippets/haxe.js +7 -0
  770. data/public/treport/src-noconflict/snippets/html.js +835 -0
  771. data/public/treport/src-noconflict/snippets/html_elixir.js +7 -0
  772. data/public/treport/src-noconflict/snippets/html_ruby.js +7 -0
  773. data/public/treport/src-noconflict/snippets/ini.js +7 -0
  774. data/public/treport/src-noconflict/snippets/io.js +69 -0
  775. data/public/treport/src-noconflict/snippets/jack.js +7 -0
  776. data/public/treport/src-noconflict/snippets/jade.js +7 -0
  777. data/public/treport/src-noconflict/snippets/java.js +247 -0
  778. data/public/treport/src-noconflict/snippets/javascript.js +202 -0
  779. data/public/treport/src-noconflict/snippets/json.js +7 -0
  780. data/public/treport/src-noconflict/snippets/jsoniq.js +68 -0
  781. data/public/treport/src-noconflict/snippets/jsp.js +106 -0
  782. data/public/treport/src-noconflict/snippets/jsx.js +7 -0
  783. data/public/treport/src-noconflict/snippets/julia.js +7 -0
  784. data/public/treport/src-noconflict/snippets/latex.js +7 -0
  785. data/public/treport/src-noconflict/snippets/lean.js +7 -0
  786. data/public/treport/src-noconflict/snippets/less.js +7 -0
  787. data/public/treport/src-noconflict/snippets/liquid.js +7 -0
  788. data/public/treport/src-noconflict/snippets/lisp.js +7 -0
  789. data/public/treport/src-noconflict/snippets/live_script.js +7 -0
  790. data/public/treport/src-noconflict/snippets/livescript.js +7 -0
  791. data/public/treport/src-noconflict/snippets/logiql.js +7 -0
  792. data/public/treport/src-noconflict/snippets/lsl.js +1239 -0
  793. data/public/treport/src-noconflict/snippets/lua.js +28 -0
  794. data/public/treport/src-noconflict/snippets/luapage.js +7 -0
  795. data/public/treport/src-noconflict/snippets/lucene.js +7 -0
  796. data/public/treport/src-noconflict/snippets/makefile.js +11 -0
  797. data/public/treport/src-noconflict/snippets/markdown.js +95 -0
  798. data/public/treport/src-noconflict/snippets/mask.js +7 -0
  799. data/public/treport/src-noconflict/snippets/matlab.js +7 -0
  800. data/public/treport/src-noconflict/snippets/maze.js +16 -0
  801. data/public/treport/src-noconflict/snippets/mel.js +7 -0
  802. data/public/treport/src-noconflict/snippets/mips_assembler.js +7 -0
  803. data/public/treport/src-noconflict/snippets/mipsassembler.js +7 -0
  804. data/public/treport/src-noconflict/snippets/mushcode.js +7 -0
  805. data/public/treport/src-noconflict/snippets/mysql.js +7 -0
  806. data/public/treport/src-noconflict/snippets/nix.js +7 -0
  807. data/public/treport/src-noconflict/snippets/nsis.js +7 -0
  808. data/public/treport/src-noconflict/snippets/objectivec.js +7 -0
  809. data/public/treport/src-noconflict/snippets/ocaml.js +7 -0
  810. data/public/treport/src-noconflict/snippets/pascal.js +7 -0
  811. data/public/treport/src-noconflict/snippets/perl.js +354 -0
  812. data/public/treport/src-noconflict/snippets/pgsql.js +7 -0
  813. data/public/treport/src-noconflict/snippets/php.js +384 -0
  814. data/public/treport/src-noconflict/snippets/plain_text.js +7 -0
  815. data/public/treport/src-noconflict/snippets/powershell.js +7 -0
  816. data/public/treport/src-noconflict/snippets/praat.js +7 -0
  817. data/public/treport/src-noconflict/snippets/prolog.js +7 -0
  818. data/public/treport/src-noconflict/snippets/properties.js +7 -0
  819. data/public/treport/src-noconflict/snippets/protobuf.js +7 -0
  820. data/public/treport/src-noconflict/snippets/python.js +165 -0
  821. data/public/treport/src-noconflict/snippets/r.js +128 -0
  822. data/public/treport/src-noconflict/snippets/razor.js +10 -0
  823. data/public/treport/src-noconflict/snippets/rdoc.js +7 -0
  824. data/public/treport/src-noconflict/snippets/rhtml.js +7 -0
  825. data/public/treport/src-noconflict/snippets/rst.js +7 -0
  826. data/public/treport/src-noconflict/snippets/ruby.js +935 -0
  827. data/public/treport/src-noconflict/snippets/rust.js +7 -0
  828. data/public/treport/src-noconflict/snippets/sass.js +7 -0
  829. data/public/treport/src-noconflict/snippets/scad.js +7 -0
  830. data/public/treport/src-noconflict/snippets/scala.js +7 -0
  831. data/public/treport/src-noconflict/snippets/scheme.js +7 -0
  832. data/public/treport/src-noconflict/snippets/scss.js +7 -0
  833. data/public/treport/src-noconflict/snippets/sh.js +90 -0
  834. data/public/treport/src-noconflict/snippets/sjs.js +7 -0
  835. data/public/treport/src-noconflict/snippets/smarty.js +7 -0
  836. data/public/treport/src-noconflict/snippets/snippets.js +16 -0
  837. data/public/treport/src-noconflict/snippets/soy_template.js +7 -0
  838. data/public/treport/src-noconflict/snippets/space.js +7 -0
  839. data/public/treport/src-noconflict/snippets/sql.js +33 -0
  840. data/public/treport/src-noconflict/snippets/sqlserver.js +76 -0
  841. data/public/treport/src-noconflict/snippets/stylus.js +7 -0
  842. data/public/treport/src-noconflict/snippets/svg.js +7 -0
  843. data/public/treport/src-noconflict/snippets/swift.js +7 -0
  844. data/public/treport/src-noconflict/snippets/swig.js +7 -0
  845. data/public/treport/src-noconflict/snippets/tcl.js +99 -0
  846. data/public/treport/src-noconflict/snippets/tex.js +197 -0
  847. data/public/treport/src-noconflict/snippets/text.js +7 -0
  848. data/public/treport/src-noconflict/snippets/textile.js +37 -0
  849. data/public/treport/src-noconflict/snippets/toml.js +7 -0
  850. data/public/treport/src-noconflict/snippets/twig.js +7 -0
  851. data/public/treport/src-noconflict/snippets/typescript.js +7 -0
  852. data/public/treport/src-noconflict/snippets/vala.js +193 -0
  853. data/public/treport/src-noconflict/snippets/vbscript.js +7 -0
  854. data/public/treport/src-noconflict/snippets/velocity.js +36 -0
  855. data/public/treport/src-noconflict/snippets/verilog.js +7 -0
  856. data/public/treport/src-noconflict/snippets/vhdl.js +7 -0
  857. data/public/treport/src-noconflict/snippets/wollok.js +91 -0
  858. data/public/treport/src-noconflict/snippets/xml.js +7 -0
  859. data/public/treport/src-noconflict/snippets/xquery.js +68 -0
  860. data/public/treport/src-noconflict/snippets/yaml.js +7 -0
  861. data/public/treport/src-noconflict/theme-ambiance.js +182 -0
  862. data/public/treport/src-noconflict/theme-chaos.js +156 -0
  863. data/public/treport/src-noconflict/theme-chrome.js +128 -0
  864. data/public/treport/src-noconflict/theme-clouds.js +95 -0
  865. data/public/treport/src-noconflict/theme-clouds_midnight.js +96 -0
  866. data/public/treport/src-noconflict/theme-cobalt.js +113 -0
  867. data/public/treport/src-noconflict/theme-crimson_editor.js +118 -0
  868. data/public/treport/src-noconflict/theme-dawn.js +108 -0
  869. data/public/treport/src-noconflict/theme-dreamweaver.js +141 -0
  870. data/public/treport/src-noconflict/theme-eclipse.js +98 -0
  871. data/public/treport/src-noconflict/theme-github.js +103 -0
  872. data/public/treport/src-noconflict/theme-idle_fingers.js +96 -0
  873. data/public/treport/src-noconflict/theme-iplastic.js +121 -0
  874. data/public/treport/src-noconflict/theme-katzenmilch.js +121 -0
  875. data/public/treport/src-noconflict/theme-kr_theme.js +104 -0
  876. data/public/treport/src-noconflict/theme-kuroir.js +61 -0
  877. data/public/treport/src-noconflict/theme-merbivore.js +95 -0
  878. data/public/treport/src-noconflict/theme-merbivore_soft.js +96 -0
  879. data/public/treport/src-noconflict/theme-mono_industrial.js +107 -0
  880. data/public/treport/src-noconflict/theme-monokai.js +105 -0
  881. data/public/treport/src-noconflict/theme-pastel_on_dark.js +108 -0
  882. data/public/treport/src-noconflict/theme-solarized_dark.js +88 -0
  883. data/public/treport/src-noconflict/theme-solarized_light.js +91 -0
  884. data/public/treport/src-noconflict/theme-sqlserver.js +138 -0
  885. data/public/treport/src-noconflict/theme-terminal.js +114 -0
  886. data/public/treport/src-noconflict/theme-textmate.js +129 -0
  887. data/public/treport/src-noconflict/theme-tomorrow.js +108 -0
  888. data/public/treport/src-noconflict/theme-tomorrow_night.js +108 -0
  889. data/public/treport/src-noconflict/theme-tomorrow_night_blue.js +106 -0
  890. data/public/treport/src-noconflict/theme-tomorrow_night_bright.js +121 -0
  891. data/public/treport/src-noconflict/theme-tomorrow_night_eighties.js +108 -0
  892. data/public/treport/src-noconflict/theme-twilight.js +109 -0
  893. data/public/treport/src-noconflict/theme-vibrant_ink.js +94 -0
  894. data/public/treport/src-noconflict/theme-xcode.js +88 -0
  895. data/public/treport/src-noconflict/worker-coffee.js +2159 -0
  896. data/public/treport/src-noconflict/worker-css.js +8762 -0
  897. data/public/treport/src-noconflict/worker-html.js +11607 -0
  898. data/public/treport/src-noconflict/worker-javascript.js +12530 -0
  899. data/public/treport/src-noconflict/worker-json.js +2398 -0
  900. data/public/treport/src-noconflict/worker-lua.js +3634 -0
  901. data/public/treport/src-noconflict/worker-php.js +7021 -0
  902. data/public/treport/src-noconflict/worker-xml.js +3889 -0
  903. data/public/treport/src-noconflict/worker-xquery.js +49612 -0
  904. data/public/treport/swf/flashExport.swf +0 -0
  905. metadata +906 -54
  906. data/app/controllers/connects_controller.rb +0 -56
  907. data/app/controllers/dictionaries_controller.rb +0 -56
  908. data/app/controllers/reports_controller.rb +0 -62
  909. data/app/controllers/requirements_controller.rb +0 -60
  910. data/app/controllers/series_controller.rb +0 -60
  911. data/app/models/.keep +0 -0
  912. data/app/models/dictionary.rb +0 -4
  913. data/app/models/series.rb +0 -4
  914. data/app/views/connects/_form.html.erb +0 -68
  915. data/app/views/connects/edit.html.erb +0 -1
  916. data/app/views/connects/index.html.erb +0 -48
  917. data/app/views/connects/new.html.erb +0 -1
  918. data/app/views/dictionaries/_form.html.erb +0 -49
  919. data/app/views/dictionaries/edit.html.erb +0 -1
  920. data/app/views/dictionaries/index.html.erb +0 -42
  921. data/app/views/dictionaries/new.html.erb +0 -1
  922. data/app/views/layouts/report.html.erb +0 -54
  923. data/app/views/reports/_form.html.erb +0 -65
  924. data/app/views/reports/edit.html.erb +0 -1
  925. data/app/views/reports/index.html.erb +0 -50
  926. data/app/views/reports/new.html.erb +0 -1
  927. data/app/views/requirements/_form.html.erb +0 -72
  928. data/app/views/requirements/edit.html.erb +0 -1
  929. data/app/views/requirements/index.html.erb +0 -51
  930. data/app/views/requirements/new.html.erb +0 -1
  931. data/app/views/series/_form.html.erb +0 -47
  932. data/app/views/series/edit.html.erb +0 -1
  933. data/app/views/series/index.html.erb +0 -40
  934. data/app/views/series/new.html.erb +0 -1
  935. data/app/views/templates/public_one.html.erb +0 -75
  936. data/app/views/templates/public_two.html.erb +0 -76
  937. data/app/views/templates/text.html.erb +0 -9
  938. data/db/migrate/20160607002137_create_connects.rb +0 -15
  939. data/db/migrate/20160608123333_create_reports.rb +0 -15
  940. data/db/migrate/20160608124539_create_requirements.rb +0 -16
  941. data/db/migrate/20160608124549_create_dictionaries.rb +0 -12
  942. data/db/migrate/20160608124602_create_series.rb +0 -11
  943. data/lib/generators/report/install_generator.rb +0 -26
  944. data/lib/treport/db.rb +0 -49
  945. data/public/report/css/AdminLTE.css +0 -4906
  946. data/public/report/css/bootstrap.min.css +0 -6
  947. data/public/report/css/skins/_all-skins.css +0 -1799
  948. data/public/report/css/skins/_all-skins.min.css +0 -1
  949. data/public/report/js/app.js +0 -44
  950. data/treport.gemspec +0 -12
@@ -0,0 +1,3634 @@
1
+ "no use strict";
2
+ ;(function(window) {
3
+ if (typeof window.window != "undefined" && window.document)
4
+ return;
5
+ if (window.require && window.define)
6
+ return;
7
+
8
+ if (!window.console) {
9
+ window.console = function() {
10
+ var msgs = Array.prototype.slice.call(arguments, 0);
11
+ postMessage({type: "log", data: msgs});
12
+ };
13
+ window.console.error =
14
+ window.console.warn =
15
+ window.console.log =
16
+ window.console.trace = window.console;
17
+ }
18
+ window.window = window;
19
+ window.ace = window;
20
+
21
+ window.onerror = function(message, file, line, col, err) {
22
+ postMessage({type: "error", data: {
23
+ message: message,
24
+ data: err.data,
25
+ file: file,
26
+ line: line,
27
+ col: col,
28
+ stack: err.stack
29
+ }});
30
+ };
31
+
32
+ window.normalizeModule = function(parentId, moduleName) {
33
+ // normalize plugin requires
34
+ if (moduleName.indexOf("!") !== -1) {
35
+ var chunks = moduleName.split("!");
36
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
37
+ }
38
+ // normalize relative requires
39
+ if (moduleName.charAt(0) == ".") {
40
+ var base = parentId.split("/").slice(0, -1).join("/");
41
+ moduleName = (base ? base + "/" : "") + moduleName;
42
+
43
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
44
+ var previous = moduleName;
45
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
46
+ }
47
+ }
48
+
49
+ return moduleName;
50
+ };
51
+
52
+ window.require = function require(parentId, id) {
53
+ if (!id) {
54
+ id = parentId;
55
+ parentId = null;
56
+ }
57
+ if (!id.charAt)
58
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
59
+
60
+ id = window.normalizeModule(parentId, id);
61
+
62
+ var module = window.require.modules[id];
63
+ if (module) {
64
+ if (!module.initialized) {
65
+ module.initialized = true;
66
+ module.exports = module.factory().exports;
67
+ }
68
+ return module.exports;
69
+ }
70
+
71
+ if (!window.require.tlns)
72
+ return console.log("unable to load " + id);
73
+
74
+ var path = resolveModuleId(id, window.require.tlns);
75
+ if (path.slice(-3) != ".js") path += ".js";
76
+
77
+ window.require.id = id;
78
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
79
+ importScripts(path);
80
+ return window.require(parentId, id);
81
+ };
82
+ function resolveModuleId(id, paths) {
83
+ var testPath = id, tail = "";
84
+ while (testPath) {
85
+ var alias = paths[testPath];
86
+ if (typeof alias == "string") {
87
+ return alias + tail;
88
+ } else if (alias) {
89
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
90
+ } else if (alias === false) {
91
+ return "";
92
+ }
93
+ var i = testPath.lastIndexOf("/");
94
+ if (i === -1) break;
95
+ tail = testPath.substr(i) + tail;
96
+ testPath = testPath.slice(0, i);
97
+ }
98
+ return id;
99
+ }
100
+ window.require.modules = {};
101
+ window.require.tlns = {};
102
+
103
+ window.define = function(id, deps, factory) {
104
+ if (arguments.length == 2) {
105
+ factory = deps;
106
+ if (typeof id != "string") {
107
+ deps = id;
108
+ id = window.require.id;
109
+ }
110
+ } else if (arguments.length == 1) {
111
+ factory = id;
112
+ deps = [];
113
+ id = window.require.id;
114
+ }
115
+
116
+ if (typeof factory != "function") {
117
+ window.require.modules[id] = {
118
+ exports: factory,
119
+ initialized: true
120
+ };
121
+ return;
122
+ }
123
+
124
+ if (!deps.length)
125
+ // If there is no dependencies, we inject "require", "exports" and
126
+ // "module" as dependencies, to provide CommonJS compatibility.
127
+ deps = ["require", "exports", "module"];
128
+
129
+ var req = function(childId) {
130
+ return window.require(id, childId);
131
+ };
132
+
133
+ window.require.modules[id] = {
134
+ exports: {},
135
+ factory: function() {
136
+ var module = this;
137
+ var returnExports = factory.apply(this, deps.map(function(dep) {
138
+ switch (dep) {
139
+ // Because "require", "exports" and "module" aren't actual
140
+ // dependencies, we must handle them seperately.
141
+ case "require": return req;
142
+ case "exports": return module.exports;
143
+ case "module": return module;
144
+ // But for all other dependencies, we can just go ahead and
145
+ // require them.
146
+ default: return req(dep);
147
+ }
148
+ }));
149
+ if (returnExports)
150
+ module.exports = returnExports;
151
+ return module;
152
+ }
153
+ };
154
+ };
155
+ window.define.amd = {};
156
+ require.tlns = {};
157
+ window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
158
+ for (var i in topLevelNamespaces)
159
+ require.tlns[i] = topLevelNamespaces[i];
160
+ };
161
+
162
+ window.initSender = function initSender() {
163
+
164
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
165
+ var oop = window.require("ace/lib/oop");
166
+
167
+ var Sender = function() {};
168
+
169
+ (function() {
170
+
171
+ oop.implement(this, EventEmitter);
172
+
173
+ this.callback = function(data, callbackId) {
174
+ postMessage({
175
+ type: "call",
176
+ id: callbackId,
177
+ data: data
178
+ });
179
+ };
180
+
181
+ this.emit = function(name, data) {
182
+ postMessage({
183
+ type: "event",
184
+ name: name,
185
+ data: data
186
+ });
187
+ };
188
+
189
+ }).call(Sender.prototype);
190
+
191
+ return new Sender();
192
+ };
193
+
194
+ var main = window.main = null;
195
+ var sender = window.sender = null;
196
+
197
+ window.onmessage = function(e) {
198
+ var msg = e.data;
199
+ if (msg.event && sender) {
200
+ sender._signal(msg.event, msg.data);
201
+ }
202
+ else if (msg.command) {
203
+ if (main[msg.command])
204
+ main[msg.command].apply(main, msg.args);
205
+ else if (window[msg.command])
206
+ window[msg.command].apply(window, msg.args);
207
+ else
208
+ throw new Error("Unknown command:" + msg.command);
209
+ }
210
+ else if (msg.init) {
211
+ window.initBaseUrls(msg.tlns);
212
+ require("ace/lib/es5-shim");
213
+ sender = window.sender = window.initSender();
214
+ var clazz = require(msg.module)[msg.classname];
215
+ main = window.main = new clazz(sender);
216
+ }
217
+ };
218
+ })(this);
219
+
220
+ ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
221
+ "use strict";
222
+
223
+ exports.inherits = function(ctor, superCtor) {
224
+ ctor.super_ = superCtor;
225
+ ctor.prototype = Object.create(superCtor.prototype, {
226
+ constructor: {
227
+ value: ctor,
228
+ enumerable: false,
229
+ writable: true,
230
+ configurable: true
231
+ }
232
+ });
233
+ };
234
+
235
+ exports.mixin = function(obj, mixin) {
236
+ for (var key in mixin) {
237
+ obj[key] = mixin[key];
238
+ }
239
+ return obj;
240
+ };
241
+
242
+ exports.implement = function(proto, mixin) {
243
+ exports.mixin(proto, mixin);
244
+ };
245
+
246
+ });
247
+
248
+ ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
249
+ "use strict";
250
+ var comparePoints = function(p1, p2) {
251
+ return p1.row - p2.row || p1.column - p2.column;
252
+ };
253
+ var Range = function(startRow, startColumn, endRow, endColumn) {
254
+ this.start = {
255
+ row: startRow,
256
+ column: startColumn
257
+ };
258
+
259
+ this.end = {
260
+ row: endRow,
261
+ column: endColumn
262
+ };
263
+ };
264
+
265
+ (function() {
266
+ this.isEqual = function(range) {
267
+ return this.start.row === range.start.row &&
268
+ this.end.row === range.end.row &&
269
+ this.start.column === range.start.column &&
270
+ this.end.column === range.end.column;
271
+ };
272
+ this.toString = function() {
273
+ return ("Range: [" + this.start.row + "/" + this.start.column +
274
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
275
+ };
276
+
277
+ this.contains = function(row, column) {
278
+ return this.compare(row, column) == 0;
279
+ };
280
+ this.compareRange = function(range) {
281
+ var cmp,
282
+ end = range.end,
283
+ start = range.start;
284
+
285
+ cmp = this.compare(end.row, end.column);
286
+ if (cmp == 1) {
287
+ cmp = this.compare(start.row, start.column);
288
+ if (cmp == 1) {
289
+ return 2;
290
+ } else if (cmp == 0) {
291
+ return 1;
292
+ } else {
293
+ return 0;
294
+ }
295
+ } else if (cmp == -1) {
296
+ return -2;
297
+ } else {
298
+ cmp = this.compare(start.row, start.column);
299
+ if (cmp == -1) {
300
+ return -1;
301
+ } else if (cmp == 1) {
302
+ return 42;
303
+ } else {
304
+ return 0;
305
+ }
306
+ }
307
+ };
308
+ this.comparePoint = function(p) {
309
+ return this.compare(p.row, p.column);
310
+ };
311
+ this.containsRange = function(range) {
312
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
313
+ };
314
+ this.intersects = function(range) {
315
+ var cmp = this.compareRange(range);
316
+ return (cmp == -1 || cmp == 0 || cmp == 1);
317
+ };
318
+ this.isEnd = function(row, column) {
319
+ return this.end.row == row && this.end.column == column;
320
+ };
321
+ this.isStart = function(row, column) {
322
+ return this.start.row == row && this.start.column == column;
323
+ };
324
+ this.setStart = function(row, column) {
325
+ if (typeof row == "object") {
326
+ this.start.column = row.column;
327
+ this.start.row = row.row;
328
+ } else {
329
+ this.start.row = row;
330
+ this.start.column = column;
331
+ }
332
+ };
333
+ this.setEnd = function(row, column) {
334
+ if (typeof row == "object") {
335
+ this.end.column = row.column;
336
+ this.end.row = row.row;
337
+ } else {
338
+ this.end.row = row;
339
+ this.end.column = column;
340
+ }
341
+ };
342
+ this.inside = function(row, column) {
343
+ if (this.compare(row, column) == 0) {
344
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
345
+ return false;
346
+ } else {
347
+ return true;
348
+ }
349
+ }
350
+ return false;
351
+ };
352
+ this.insideStart = function(row, column) {
353
+ if (this.compare(row, column) == 0) {
354
+ if (this.isEnd(row, column)) {
355
+ return false;
356
+ } else {
357
+ return true;
358
+ }
359
+ }
360
+ return false;
361
+ };
362
+ this.insideEnd = function(row, column) {
363
+ if (this.compare(row, column) == 0) {
364
+ if (this.isStart(row, column)) {
365
+ return false;
366
+ } else {
367
+ return true;
368
+ }
369
+ }
370
+ return false;
371
+ };
372
+ this.compare = function(row, column) {
373
+ if (!this.isMultiLine()) {
374
+ if (row === this.start.row) {
375
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
376
+ }
377
+ }
378
+
379
+ if (row < this.start.row)
380
+ return -1;
381
+
382
+ if (row > this.end.row)
383
+ return 1;
384
+
385
+ if (this.start.row === row)
386
+ return column >= this.start.column ? 0 : -1;
387
+
388
+ if (this.end.row === row)
389
+ return column <= this.end.column ? 0 : 1;
390
+
391
+ return 0;
392
+ };
393
+ this.compareStart = function(row, column) {
394
+ if (this.start.row == row && this.start.column == column) {
395
+ return -1;
396
+ } else {
397
+ return this.compare(row, column);
398
+ }
399
+ };
400
+ this.compareEnd = function(row, column) {
401
+ if (this.end.row == row && this.end.column == column) {
402
+ return 1;
403
+ } else {
404
+ return this.compare(row, column);
405
+ }
406
+ };
407
+ this.compareInside = function(row, column) {
408
+ if (this.end.row == row && this.end.column == column) {
409
+ return 1;
410
+ } else if (this.start.row == row && this.start.column == column) {
411
+ return -1;
412
+ } else {
413
+ return this.compare(row, column);
414
+ }
415
+ };
416
+ this.clipRows = function(firstRow, lastRow) {
417
+ if (this.end.row > lastRow)
418
+ var end = {row: lastRow + 1, column: 0};
419
+ else if (this.end.row < firstRow)
420
+ var end = {row: firstRow, column: 0};
421
+
422
+ if (this.start.row > lastRow)
423
+ var start = {row: lastRow + 1, column: 0};
424
+ else if (this.start.row < firstRow)
425
+ var start = {row: firstRow, column: 0};
426
+
427
+ return Range.fromPoints(start || this.start, end || this.end);
428
+ };
429
+ this.extend = function(row, column) {
430
+ var cmp = this.compare(row, column);
431
+
432
+ if (cmp == 0)
433
+ return this;
434
+ else if (cmp == -1)
435
+ var start = {row: row, column: column};
436
+ else
437
+ var end = {row: row, column: column};
438
+
439
+ return Range.fromPoints(start || this.start, end || this.end);
440
+ };
441
+
442
+ this.isEmpty = function() {
443
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
444
+ };
445
+ this.isMultiLine = function() {
446
+ return (this.start.row !== this.end.row);
447
+ };
448
+ this.clone = function() {
449
+ return Range.fromPoints(this.start, this.end);
450
+ };
451
+ this.collapseRows = function() {
452
+ if (this.end.column == 0)
453
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
454
+ else
455
+ return new Range(this.start.row, 0, this.end.row, 0)
456
+ };
457
+ this.toScreenRange = function(session) {
458
+ var screenPosStart = session.documentToScreenPosition(this.start);
459
+ var screenPosEnd = session.documentToScreenPosition(this.end);
460
+
461
+ return new Range(
462
+ screenPosStart.row, screenPosStart.column,
463
+ screenPosEnd.row, screenPosEnd.column
464
+ );
465
+ };
466
+ this.moveBy = function(row, column) {
467
+ this.start.row += row;
468
+ this.start.column += column;
469
+ this.end.row += row;
470
+ this.end.column += column;
471
+ };
472
+
473
+ }).call(Range.prototype);
474
+ Range.fromPoints = function(start, end) {
475
+ return new Range(start.row, start.column, end.row, end.column);
476
+ };
477
+ Range.comparePoints = comparePoints;
478
+
479
+ Range.comparePoints = function(p1, p2) {
480
+ return p1.row - p2.row || p1.column - p2.column;
481
+ };
482
+
483
+
484
+ exports.Range = Range;
485
+ });
486
+
487
+ ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
488
+ "use strict";
489
+
490
+ function throwDeltaError(delta, errorText){
491
+ console.log("Invalid Delta:", delta);
492
+ throw "Invalid Delta: " + errorText;
493
+ }
494
+
495
+ function positionInDocument(docLines, position) {
496
+ return position.row >= 0 && position.row < docLines.length &&
497
+ position.column >= 0 && position.column <= docLines[position.row].length;
498
+ }
499
+
500
+ function validateDelta(docLines, delta) {
501
+ if (delta.action != "insert" && delta.action != "remove")
502
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
503
+ if (!(delta.lines instanceof Array))
504
+ throwDeltaError(delta, "delta.lines must be an Array");
505
+ if (!delta.start || !delta.end)
506
+ throwDeltaError(delta, "delta.start/end must be an present");
507
+ var start = delta.start;
508
+ if (!positionInDocument(docLines, delta.start))
509
+ throwDeltaError(delta, "delta.start must be contained in document");
510
+ var end = delta.end;
511
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
512
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
513
+ var numRangeRows = end.row - start.row;
514
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
515
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
516
+ throwDeltaError(delta, "delta.range must match delta lines");
517
+ }
518
+
519
+ exports.applyDelta = function(docLines, delta, doNotValidate) {
520
+
521
+ var row = delta.start.row;
522
+ var startColumn = delta.start.column;
523
+ var line = docLines[row] || "";
524
+ switch (delta.action) {
525
+ case "insert":
526
+ var lines = delta.lines;
527
+ if (lines.length === 1) {
528
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
529
+ } else {
530
+ var args = [row, 1].concat(delta.lines);
531
+ docLines.splice.apply(docLines, args);
532
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
533
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
534
+ }
535
+ break;
536
+ case "remove":
537
+ var endColumn = delta.end.column;
538
+ var endRow = delta.end.row;
539
+ if (row === endRow) {
540
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
541
+ } else {
542
+ docLines.splice(
543
+ row, endRow - row + 1,
544
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
545
+ );
546
+ }
547
+ break;
548
+ }
549
+ }
550
+ });
551
+
552
+ ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
553
+ "use strict";
554
+
555
+ var EventEmitter = {};
556
+ var stopPropagation = function() { this.propagationStopped = true; };
557
+ var preventDefault = function() { this.defaultPrevented = true; };
558
+
559
+ EventEmitter._emit =
560
+ EventEmitter._dispatchEvent = function(eventName, e) {
561
+ this._eventRegistry || (this._eventRegistry = {});
562
+ this._defaultHandlers || (this._defaultHandlers = {});
563
+
564
+ var listeners = this._eventRegistry[eventName] || [];
565
+ var defaultHandler = this._defaultHandlers[eventName];
566
+ if (!listeners.length && !defaultHandler)
567
+ return;
568
+
569
+ if (typeof e != "object" || !e)
570
+ e = {};
571
+
572
+ if (!e.type)
573
+ e.type = eventName;
574
+ if (!e.stopPropagation)
575
+ e.stopPropagation = stopPropagation;
576
+ if (!e.preventDefault)
577
+ e.preventDefault = preventDefault;
578
+
579
+ listeners = listeners.slice();
580
+ for (var i=0; i<listeners.length; i++) {
581
+ listeners[i](e, this);
582
+ if (e.propagationStopped)
583
+ break;
584
+ }
585
+
586
+ if (defaultHandler && !e.defaultPrevented)
587
+ return defaultHandler(e, this);
588
+ };
589
+
590
+
591
+ EventEmitter._signal = function(eventName, e) {
592
+ var listeners = (this._eventRegistry || {})[eventName];
593
+ if (!listeners)
594
+ return;
595
+ listeners = listeners.slice();
596
+ for (var i=0; i<listeners.length; i++)
597
+ listeners[i](e, this);
598
+ };
599
+
600
+ EventEmitter.once = function(eventName, callback) {
601
+ var _self = this;
602
+ callback && this.addEventListener(eventName, function newCallback() {
603
+ _self.removeEventListener(eventName, newCallback);
604
+ callback.apply(null, arguments);
605
+ });
606
+ };
607
+
608
+
609
+ EventEmitter.setDefaultHandler = function(eventName, callback) {
610
+ var handlers = this._defaultHandlers
611
+ if (!handlers)
612
+ handlers = this._defaultHandlers = {_disabled_: {}};
613
+
614
+ if (handlers[eventName]) {
615
+ var old = handlers[eventName];
616
+ var disabled = handlers._disabled_[eventName];
617
+ if (!disabled)
618
+ handlers._disabled_[eventName] = disabled = [];
619
+ disabled.push(old);
620
+ var i = disabled.indexOf(callback);
621
+ if (i != -1)
622
+ disabled.splice(i, 1);
623
+ }
624
+ handlers[eventName] = callback;
625
+ };
626
+ EventEmitter.removeDefaultHandler = function(eventName, callback) {
627
+ var handlers = this._defaultHandlers
628
+ if (!handlers)
629
+ return;
630
+ var disabled = handlers._disabled_[eventName];
631
+
632
+ if (handlers[eventName] == callback) {
633
+ var old = handlers[eventName];
634
+ if (disabled)
635
+ this.setDefaultHandler(eventName, disabled.pop());
636
+ } else if (disabled) {
637
+ var i = disabled.indexOf(callback);
638
+ if (i != -1)
639
+ disabled.splice(i, 1);
640
+ }
641
+ };
642
+
643
+ EventEmitter.on =
644
+ EventEmitter.addEventListener = function(eventName, callback, capturing) {
645
+ this._eventRegistry = this._eventRegistry || {};
646
+
647
+ var listeners = this._eventRegistry[eventName];
648
+ if (!listeners)
649
+ listeners = this._eventRegistry[eventName] = [];
650
+
651
+ if (listeners.indexOf(callback) == -1)
652
+ listeners[capturing ? "unshift" : "push"](callback);
653
+ return callback;
654
+ };
655
+
656
+ EventEmitter.off =
657
+ EventEmitter.removeListener =
658
+ EventEmitter.removeEventListener = function(eventName, callback) {
659
+ this._eventRegistry = this._eventRegistry || {};
660
+
661
+ var listeners = this._eventRegistry[eventName];
662
+ if (!listeners)
663
+ return;
664
+
665
+ var index = listeners.indexOf(callback);
666
+ if (index !== -1)
667
+ listeners.splice(index, 1);
668
+ };
669
+
670
+ EventEmitter.removeAllListeners = function(eventName) {
671
+ if (this._eventRegistry) this._eventRegistry[eventName] = [];
672
+ };
673
+
674
+ exports.EventEmitter = EventEmitter;
675
+
676
+ });
677
+
678
+ ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
679
+ "use strict";
680
+
681
+ var oop = require("./lib/oop");
682
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
683
+
684
+ var Anchor = exports.Anchor = function(doc, row, column) {
685
+ this.$onChange = this.onChange.bind(this);
686
+ this.attach(doc);
687
+
688
+ if (typeof column == "undefined")
689
+ this.setPosition(row.row, row.column);
690
+ else
691
+ this.setPosition(row, column);
692
+ };
693
+
694
+ (function() {
695
+
696
+ oop.implement(this, EventEmitter);
697
+ this.getPosition = function() {
698
+ return this.$clipPositionToDocument(this.row, this.column);
699
+ };
700
+ this.getDocument = function() {
701
+ return this.document;
702
+ };
703
+ this.$insertRight = false;
704
+ this.onChange = function(delta) {
705
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
706
+ return;
707
+
708
+ if (delta.start.row > this.row)
709
+ return;
710
+
711
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
712
+ this.setPosition(point.row, point.column, true);
713
+ };
714
+
715
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
716
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
717
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
718
+ }
719
+
720
+ function $getTransformedPoint(delta, point, moveIfEqual) {
721
+ var deltaIsInsert = delta.action == "insert";
722
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
723
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
724
+ var deltaStart = delta.start;
725
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
726
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
727
+ return {
728
+ row: point.row,
729
+ column: point.column
730
+ };
731
+ }
732
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
733
+ return {
734
+ row: point.row + deltaRowShift,
735
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
736
+ };
737
+ }
738
+
739
+ return {
740
+ row: deltaStart.row,
741
+ column: deltaStart.column
742
+ };
743
+ }
744
+ this.setPosition = function(row, column, noClip) {
745
+ var pos;
746
+ if (noClip) {
747
+ pos = {
748
+ row: row,
749
+ column: column
750
+ };
751
+ } else {
752
+ pos = this.$clipPositionToDocument(row, column);
753
+ }
754
+
755
+ if (this.row == pos.row && this.column == pos.column)
756
+ return;
757
+
758
+ var old = {
759
+ row: this.row,
760
+ column: this.column
761
+ };
762
+
763
+ this.row = pos.row;
764
+ this.column = pos.column;
765
+ this._signal("change", {
766
+ old: old,
767
+ value: pos
768
+ });
769
+ };
770
+ this.detach = function() {
771
+ this.document.removeEventListener("change", this.$onChange);
772
+ };
773
+ this.attach = function(doc) {
774
+ this.document = doc || this.document;
775
+ this.document.on("change", this.$onChange);
776
+ };
777
+ this.$clipPositionToDocument = function(row, column) {
778
+ var pos = {};
779
+
780
+ if (row >= this.document.getLength()) {
781
+ pos.row = Math.max(0, this.document.getLength() - 1);
782
+ pos.column = this.document.getLine(pos.row).length;
783
+ }
784
+ else if (row < 0) {
785
+ pos.row = 0;
786
+ pos.column = 0;
787
+ }
788
+ else {
789
+ pos.row = row;
790
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
791
+ }
792
+
793
+ if (column < 0)
794
+ pos.column = 0;
795
+
796
+ return pos;
797
+ };
798
+
799
+ }).call(Anchor.prototype);
800
+
801
+ });
802
+
803
+ ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
804
+ "use strict";
805
+
806
+ var oop = require("./lib/oop");
807
+ var applyDelta = require("./apply_delta").applyDelta;
808
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
809
+ var Range = require("./range").Range;
810
+ var Anchor = require("./anchor").Anchor;
811
+
812
+ var Document = function(textOrLines) {
813
+ this.$lines = [""];
814
+ if (textOrLines.length === 0) {
815
+ this.$lines = [""];
816
+ } else if (Array.isArray(textOrLines)) {
817
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
818
+ } else {
819
+ this.insert({row: 0, column:0}, textOrLines);
820
+ }
821
+ };
822
+
823
+ (function() {
824
+
825
+ oop.implement(this, EventEmitter);
826
+ this.setValue = function(text) {
827
+ var len = this.getLength() - 1;
828
+ this.remove(new Range(0, 0, len, this.getLine(len).length));
829
+ this.insert({row: 0, column: 0}, text);
830
+ };
831
+ this.getValue = function() {
832
+ return this.getAllLines().join(this.getNewLineCharacter());
833
+ };
834
+ this.createAnchor = function(row, column) {
835
+ return new Anchor(this, row, column);
836
+ };
837
+ if ("aaa".split(/a/).length === 0) {
838
+ this.$split = function(text) {
839
+ return text.replace(/\r\n|\r/g, "\n").split("\n");
840
+ };
841
+ } else {
842
+ this.$split = function(text) {
843
+ return text.split(/\r\n|\r|\n/);
844
+ };
845
+ }
846
+
847
+
848
+ this.$detectNewLine = function(text) {
849
+ var match = text.match(/^.*?(\r\n|\r|\n)/m);
850
+ this.$autoNewLine = match ? match[1] : "\n";
851
+ this._signal("changeNewLineMode");
852
+ };
853
+ this.getNewLineCharacter = function() {
854
+ switch (this.$newLineMode) {
855
+ case "windows":
856
+ return "\r\n";
857
+ case "unix":
858
+ return "\n";
859
+ default:
860
+ return this.$autoNewLine || "\n";
861
+ }
862
+ };
863
+
864
+ this.$autoNewLine = "";
865
+ this.$newLineMode = "auto";
866
+ this.setNewLineMode = function(newLineMode) {
867
+ if (this.$newLineMode === newLineMode)
868
+ return;
869
+
870
+ this.$newLineMode = newLineMode;
871
+ this._signal("changeNewLineMode");
872
+ };
873
+ this.getNewLineMode = function() {
874
+ return this.$newLineMode;
875
+ };
876
+ this.isNewLine = function(text) {
877
+ return (text == "\r\n" || text == "\r" || text == "\n");
878
+ };
879
+ this.getLine = function(row) {
880
+ return this.$lines[row] || "";
881
+ };
882
+ this.getLines = function(firstRow, lastRow) {
883
+ return this.$lines.slice(firstRow, lastRow + 1);
884
+ };
885
+ this.getAllLines = function() {
886
+ return this.getLines(0, this.getLength());
887
+ };
888
+ this.getLength = function() {
889
+ return this.$lines.length;
890
+ };
891
+ this.getTextRange = function(range) {
892
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
893
+ };
894
+ this.getLinesForRange = function(range) {
895
+ var lines;
896
+ if (range.start.row === range.end.row) {
897
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
898
+ } else {
899
+ lines = this.getLines(range.start.row, range.end.row);
900
+ lines[0] = (lines[0] || "").substring(range.start.column);
901
+ var l = lines.length - 1;
902
+ if (range.end.row - range.start.row == l)
903
+ lines[l] = lines[l].substring(0, range.end.column);
904
+ }
905
+ return lines;
906
+ };
907
+ this.insertLines = function(row, lines) {
908
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
909
+ return this.insertFullLines(row, lines);
910
+ };
911
+ this.removeLines = function(firstRow, lastRow) {
912
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
913
+ return this.removeFullLines(firstRow, lastRow);
914
+ };
915
+ this.insertNewLine = function(position) {
916
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead.");
917
+ return this.insertMergedLines(position, ["", ""]);
918
+ };
919
+ this.insert = function(position, text) {
920
+ if (this.getLength() <= 1)
921
+ this.$detectNewLine(text);
922
+
923
+ return this.insertMergedLines(position, this.$split(text));
924
+ };
925
+ this.insertInLine = function(position, text) {
926
+ var start = this.clippedPos(position.row, position.column);
927
+ var end = this.pos(position.row, position.column + text.length);
928
+
929
+ this.applyDelta({
930
+ start: start,
931
+ end: end,
932
+ action: "insert",
933
+ lines: [text]
934
+ }, true);
935
+
936
+ return this.clonePos(end);
937
+ };
938
+
939
+ this.clippedPos = function(row, column) {
940
+ var length = this.getLength();
941
+ if (row === undefined) {
942
+ row = length;
943
+ } else if (row < 0) {
944
+ row = 0;
945
+ } else if (row >= length) {
946
+ row = length - 1;
947
+ column = undefined;
948
+ }
949
+ var line = this.getLine(row);
950
+ if (column == undefined)
951
+ column = line.length;
952
+ column = Math.min(Math.max(column, 0), line.length);
953
+ return {row: row, column: column};
954
+ };
955
+
956
+ this.clonePos = function(pos) {
957
+ return {row: pos.row, column: pos.column};
958
+ };
959
+
960
+ this.pos = function(row, column) {
961
+ return {row: row, column: column};
962
+ };
963
+
964
+ this.$clipPosition = function(position) {
965
+ var length = this.getLength();
966
+ if (position.row >= length) {
967
+ position.row = Math.max(0, length - 1);
968
+ position.column = this.getLine(length - 1).length;
969
+ } else {
970
+ position.row = Math.max(0, position.row);
971
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
972
+ }
973
+ return position;
974
+ };
975
+ this.insertFullLines = function(row, lines) {
976
+ row = Math.min(Math.max(row, 0), this.getLength());
977
+ var column = 0;
978
+ if (row < this.getLength()) {
979
+ lines = lines.concat([""]);
980
+ column = 0;
981
+ } else {
982
+ lines = [""].concat(lines);
983
+ row--;
984
+ column = this.$lines[row].length;
985
+ }
986
+ this.insertMergedLines({row: row, column: column}, lines);
987
+ };
988
+ this.insertMergedLines = function(position, lines) {
989
+ var start = this.clippedPos(position.row, position.column);
990
+ var end = {
991
+ row: start.row + lines.length - 1,
992
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
993
+ };
994
+
995
+ this.applyDelta({
996
+ start: start,
997
+ end: end,
998
+ action: "insert",
999
+ lines: lines
1000
+ });
1001
+
1002
+ return this.clonePos(end);
1003
+ };
1004
+ this.remove = function(range) {
1005
+ var start = this.clippedPos(range.start.row, range.start.column);
1006
+ var end = this.clippedPos(range.end.row, range.end.column);
1007
+ this.applyDelta({
1008
+ start: start,
1009
+ end: end,
1010
+ action: "remove",
1011
+ lines: this.getLinesForRange({start: start, end: end})
1012
+ });
1013
+ return this.clonePos(start);
1014
+ };
1015
+ this.removeInLine = function(row, startColumn, endColumn) {
1016
+ var start = this.clippedPos(row, startColumn);
1017
+ var end = this.clippedPos(row, endColumn);
1018
+
1019
+ this.applyDelta({
1020
+ start: start,
1021
+ end: end,
1022
+ action: "remove",
1023
+ lines: this.getLinesForRange({start: start, end: end})
1024
+ }, true);
1025
+
1026
+ return this.clonePos(start);
1027
+ };
1028
+ this.removeFullLines = function(firstRow, lastRow) {
1029
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
1030
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
1031
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
1032
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
1033
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
1034
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
1035
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
1036
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
1037
+ var range = new Range(startRow, startCol, endRow, endCol);
1038
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
1039
+
1040
+ this.applyDelta({
1041
+ start: range.start,
1042
+ end: range.end,
1043
+ action: "remove",
1044
+ lines: this.getLinesForRange(range)
1045
+ });
1046
+ return deletedLines;
1047
+ };
1048
+ this.removeNewLine = function(row) {
1049
+ if (row < this.getLength() - 1 && row >= 0) {
1050
+ this.applyDelta({
1051
+ start: this.pos(row, this.getLine(row).length),
1052
+ end: this.pos(row + 1, 0),
1053
+ action: "remove",
1054
+ lines: ["", ""]
1055
+ });
1056
+ }
1057
+ };
1058
+ this.replace = function(range, text) {
1059
+ if (!(range instanceof Range))
1060
+ range = Range.fromPoints(range.start, range.end);
1061
+ if (text.length === 0 && range.isEmpty())
1062
+ return range.start;
1063
+ if (text == this.getTextRange(range))
1064
+ return range.end;
1065
+
1066
+ this.remove(range);
1067
+ var end;
1068
+ if (text) {
1069
+ end = this.insert(range.start, text);
1070
+ }
1071
+ else {
1072
+ end = range.start;
1073
+ }
1074
+
1075
+ return end;
1076
+ };
1077
+ this.applyDeltas = function(deltas) {
1078
+ for (var i=0; i<deltas.length; i++) {
1079
+ this.applyDelta(deltas[i]);
1080
+ }
1081
+ };
1082
+ this.revertDeltas = function(deltas) {
1083
+ for (var i=deltas.length-1; i>=0; i--) {
1084
+ this.revertDelta(deltas[i]);
1085
+ }
1086
+ };
1087
+ this.applyDelta = function(delta, doNotValidate) {
1088
+ var isInsert = delta.action == "insert";
1089
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
1090
+ : !Range.comparePoints(delta.start, delta.end)) {
1091
+ return;
1092
+ }
1093
+
1094
+ if (isInsert && delta.lines.length > 20000)
1095
+ this.$splitAndapplyLargeDelta(delta, 20000);
1096
+ applyDelta(this.$lines, delta, doNotValidate);
1097
+ this._signal("change", delta);
1098
+ };
1099
+
1100
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
1101
+ var lines = delta.lines;
1102
+ var l = lines.length;
1103
+ var row = delta.start.row;
1104
+ var column = delta.start.column;
1105
+ var from = 0, to = 0;
1106
+ do {
1107
+ from = to;
1108
+ to += MAX - 1;
1109
+ var chunk = lines.slice(from, to);
1110
+ if (to > l) {
1111
+ delta.lines = chunk;
1112
+ delta.start.row = row + from;
1113
+ delta.start.column = column;
1114
+ break;
1115
+ }
1116
+ chunk.push("");
1117
+ this.applyDelta({
1118
+ start: this.pos(row + from, column),
1119
+ end: this.pos(row + to, column = 0),
1120
+ action: delta.action,
1121
+ lines: chunk
1122
+ }, true);
1123
+ } while(true);
1124
+ };
1125
+ this.revertDelta = function(delta) {
1126
+ this.applyDelta({
1127
+ start: this.clonePos(delta.start),
1128
+ end: this.clonePos(delta.end),
1129
+ action: (delta.action == "insert" ? "remove" : "insert"),
1130
+ lines: delta.lines.slice()
1131
+ });
1132
+ };
1133
+ this.indexToPosition = function(index, startRow) {
1134
+ var lines = this.$lines || this.getAllLines();
1135
+ var newlineLength = this.getNewLineCharacter().length;
1136
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
1137
+ index -= lines[i].length + newlineLength;
1138
+ if (index < 0)
1139
+ return {row: i, column: index + lines[i].length + newlineLength};
1140
+ }
1141
+ return {row: l-1, column: lines[l-1].length};
1142
+ };
1143
+ this.positionToIndex = function(pos, startRow) {
1144
+ var lines = this.$lines || this.getAllLines();
1145
+ var newlineLength = this.getNewLineCharacter().length;
1146
+ var index = 0;
1147
+ var row = Math.min(pos.row, lines.length);
1148
+ for (var i = startRow || 0; i < row; ++i)
1149
+ index += lines[i].length + newlineLength;
1150
+
1151
+ return index + pos.column;
1152
+ };
1153
+
1154
+ }).call(Document.prototype);
1155
+
1156
+ exports.Document = Document;
1157
+ });
1158
+
1159
+ ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
1160
+ "use strict";
1161
+
1162
+ exports.last = function(a) {
1163
+ return a[a.length - 1];
1164
+ };
1165
+
1166
+ exports.stringReverse = function(string) {
1167
+ return string.split("").reverse().join("");
1168
+ };
1169
+
1170
+ exports.stringRepeat = function (string, count) {
1171
+ var result = '';
1172
+ while (count > 0) {
1173
+ if (count & 1)
1174
+ result += string;
1175
+
1176
+ if (count >>= 1)
1177
+ string += string;
1178
+ }
1179
+ return result;
1180
+ };
1181
+
1182
+ var trimBeginRegexp = /^\s\s*/;
1183
+ var trimEndRegexp = /\s\s*$/;
1184
+
1185
+ exports.stringTrimLeft = function (string) {
1186
+ return string.replace(trimBeginRegexp, '');
1187
+ };
1188
+
1189
+ exports.stringTrimRight = function (string) {
1190
+ return string.replace(trimEndRegexp, '');
1191
+ };
1192
+
1193
+ exports.copyObject = function(obj) {
1194
+ var copy = {};
1195
+ for (var key in obj) {
1196
+ copy[key] = obj[key];
1197
+ }
1198
+ return copy;
1199
+ };
1200
+
1201
+ exports.copyArray = function(array){
1202
+ var copy = [];
1203
+ for (var i=0, l=array.length; i<l; i++) {
1204
+ if (array[i] && typeof array[i] == "object")
1205
+ copy[i] = this.copyObject( array[i] );
1206
+ else
1207
+ copy[i] = array[i];
1208
+ }
1209
+ return copy;
1210
+ };
1211
+
1212
+ exports.deepCopy = function deepCopy(obj) {
1213
+ if (typeof obj !== "object" || !obj)
1214
+ return obj;
1215
+ var copy;
1216
+ if (Array.isArray(obj)) {
1217
+ copy = [];
1218
+ for (var key = 0; key < obj.length; key++) {
1219
+ copy[key] = deepCopy(obj[key]);
1220
+ }
1221
+ return copy;
1222
+ }
1223
+ var cons = obj.constructor;
1224
+ if (cons === RegExp)
1225
+ return obj;
1226
+
1227
+ copy = cons();
1228
+ for (var key in obj) {
1229
+ copy[key] = deepCopy(obj[key]);
1230
+ }
1231
+ return copy;
1232
+ };
1233
+
1234
+ exports.arrayToMap = function(arr) {
1235
+ var map = {};
1236
+ for (var i=0; i<arr.length; i++) {
1237
+ map[arr[i]] = 1;
1238
+ }
1239
+ return map;
1240
+
1241
+ };
1242
+
1243
+ exports.createMap = function(props) {
1244
+ var map = Object.create(null);
1245
+ for (var i in props) {
1246
+ map[i] = props[i];
1247
+ }
1248
+ return map;
1249
+ };
1250
+ exports.arrayRemove = function(array, value) {
1251
+ for (var i = 0; i <= array.length; i++) {
1252
+ if (value === array[i]) {
1253
+ array.splice(i, 1);
1254
+ }
1255
+ }
1256
+ };
1257
+
1258
+ exports.escapeRegExp = function(str) {
1259
+ return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
1260
+ };
1261
+
1262
+ exports.escapeHTML = function(str) {
1263
+ return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
1264
+ };
1265
+
1266
+ exports.getMatchOffsets = function(string, regExp) {
1267
+ var matches = [];
1268
+
1269
+ string.replace(regExp, function(str) {
1270
+ matches.push({
1271
+ offset: arguments[arguments.length-2],
1272
+ length: str.length
1273
+ });
1274
+ });
1275
+
1276
+ return matches;
1277
+ };
1278
+ exports.deferredCall = function(fcn) {
1279
+ var timer = null;
1280
+ var callback = function() {
1281
+ timer = null;
1282
+ fcn();
1283
+ };
1284
+
1285
+ var deferred = function(timeout) {
1286
+ deferred.cancel();
1287
+ timer = setTimeout(callback, timeout || 0);
1288
+ return deferred;
1289
+ };
1290
+
1291
+ deferred.schedule = deferred;
1292
+
1293
+ deferred.call = function() {
1294
+ this.cancel();
1295
+ fcn();
1296
+ return deferred;
1297
+ };
1298
+
1299
+ deferred.cancel = function() {
1300
+ clearTimeout(timer);
1301
+ timer = null;
1302
+ return deferred;
1303
+ };
1304
+
1305
+ deferred.isPending = function() {
1306
+ return timer;
1307
+ };
1308
+
1309
+ return deferred;
1310
+ };
1311
+
1312
+
1313
+ exports.delayedCall = function(fcn, defaultTimeout) {
1314
+ var timer = null;
1315
+ var callback = function() {
1316
+ timer = null;
1317
+ fcn();
1318
+ };
1319
+
1320
+ var _self = function(timeout) {
1321
+ if (timer == null)
1322
+ timer = setTimeout(callback, timeout || defaultTimeout);
1323
+ };
1324
+
1325
+ _self.delay = function(timeout) {
1326
+ timer && clearTimeout(timer);
1327
+ timer = setTimeout(callback, timeout || defaultTimeout);
1328
+ };
1329
+ _self.schedule = _self;
1330
+
1331
+ _self.call = function() {
1332
+ this.cancel();
1333
+ fcn();
1334
+ };
1335
+
1336
+ _self.cancel = function() {
1337
+ timer && clearTimeout(timer);
1338
+ timer = null;
1339
+ };
1340
+
1341
+ _self.isPending = function() {
1342
+ return timer;
1343
+ };
1344
+
1345
+ return _self;
1346
+ };
1347
+ });
1348
+
1349
+ ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) {
1350
+ "use strict";
1351
+
1352
+ var Range = require("../range").Range;
1353
+ var Document = require("../document").Document;
1354
+ var lang = require("../lib/lang");
1355
+
1356
+ var Mirror = exports.Mirror = function(sender) {
1357
+ this.sender = sender;
1358
+ var doc = this.doc = new Document("");
1359
+
1360
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
1361
+
1362
+ var _self = this;
1363
+ sender.on("change", function(e) {
1364
+ var data = e.data;
1365
+ if (data[0].start) {
1366
+ doc.applyDeltas(data);
1367
+ } else {
1368
+ for (var i = 0; i < data.length; i += 2) {
1369
+ if (Array.isArray(data[i+1])) {
1370
+ var d = {action: "insert", start: data[i], lines: data[i+1]};
1371
+ } else {
1372
+ var d = {action: "remove", start: data[i], end: data[i+1]};
1373
+ }
1374
+ doc.applyDelta(d, true);
1375
+ }
1376
+ }
1377
+ if (_self.$timeout)
1378
+ return deferredUpdate.schedule(_self.$timeout);
1379
+ _self.onUpdate();
1380
+ });
1381
+ };
1382
+
1383
+ (function() {
1384
+
1385
+ this.$timeout = 500;
1386
+
1387
+ this.setTimeout = function(timeout) {
1388
+ this.$timeout = timeout;
1389
+ };
1390
+
1391
+ this.setValue = function(value) {
1392
+ this.doc.setValue(value);
1393
+ this.deferredUpdate.schedule(this.$timeout);
1394
+ };
1395
+
1396
+ this.getValue = function(callbackId) {
1397
+ this.sender.callback(this.doc.getValue(), callbackId);
1398
+ };
1399
+
1400
+ this.onUpdate = function() {
1401
+ };
1402
+
1403
+ this.isPending = function() {
1404
+ return this.deferredUpdate.isPending();
1405
+ };
1406
+
1407
+ }).call(Mirror.prototype);
1408
+
1409
+ });
1410
+
1411
+ ace.define("ace/mode/lua/luaparse",["require","exports","module"], function(require, exports, module) {
1412
+
1413
+ (function (root, name, factory) {
1414
+ factory(exports)
1415
+ }(this, 'luaparse', function (exports) {
1416
+ 'use strict';
1417
+
1418
+ exports.version = '0.1.4';
1419
+
1420
+ var input, options, length;
1421
+ var defaultOptions = exports.defaultOptions = {
1422
+ wait: false
1423
+ , comments: true
1424
+ , scope: false
1425
+ , locations: false
1426
+ , ranges: false
1427
+ };
1428
+
1429
+ var EOF = 1, StringLiteral = 2, Keyword = 4, Identifier = 8
1430
+ , NumericLiteral = 16, Punctuator = 32, BooleanLiteral = 64
1431
+ , NilLiteral = 128, VarargLiteral = 256;
1432
+
1433
+ exports.tokenTypes = { EOF: EOF, StringLiteral: StringLiteral
1434
+ , Keyword: Keyword, Identifier: Identifier, NumericLiteral: NumericLiteral
1435
+ , Punctuator: Punctuator, BooleanLiteral: BooleanLiteral
1436
+ , NilLiteral: NilLiteral, VarargLiteral: VarargLiteral
1437
+ };
1438
+
1439
+ var errors = exports.errors = {
1440
+ unexpected: 'Unexpected %1 \'%2\' near \'%3\''
1441
+ , expected: '\'%1\' expected near \'%2\''
1442
+ , expectedToken: '%1 expected near \'%2\''
1443
+ , unfinishedString: 'unfinished string near \'%1\''
1444
+ , malformedNumber: 'malformed number near \'%1\''
1445
+ };
1446
+
1447
+ var ast = exports.ast = {
1448
+ labelStatement: function(label) {
1449
+ return {
1450
+ type: 'LabelStatement'
1451
+ , label: label
1452
+ };
1453
+ }
1454
+
1455
+ , breakStatement: function() {
1456
+ return {
1457
+ type: 'BreakStatement'
1458
+ };
1459
+ }
1460
+
1461
+ , gotoStatement: function(label) {
1462
+ return {
1463
+ type: 'GotoStatement'
1464
+ , label: label
1465
+ };
1466
+ }
1467
+
1468
+ , returnStatement: function(args) {
1469
+ return {
1470
+ type: 'ReturnStatement'
1471
+ , 'arguments': args
1472
+ };
1473
+ }
1474
+
1475
+ , ifStatement: function(clauses) {
1476
+ return {
1477
+ type: 'IfStatement'
1478
+ , clauses: clauses
1479
+ };
1480
+ }
1481
+ , ifClause: function(condition, body) {
1482
+ return {
1483
+ type: 'IfClause'
1484
+ , condition: condition
1485
+ , body: body
1486
+ };
1487
+ }
1488
+ , elseifClause: function(condition, body) {
1489
+ return {
1490
+ type: 'ElseifClause'
1491
+ , condition: condition
1492
+ , body: body
1493
+ };
1494
+ }
1495
+ , elseClause: function(body) {
1496
+ return {
1497
+ type: 'ElseClause'
1498
+ , body: body
1499
+ };
1500
+ }
1501
+
1502
+ , whileStatement: function(condition, body) {
1503
+ return {
1504
+ type: 'WhileStatement'
1505
+ , condition: condition
1506
+ , body: body
1507
+ };
1508
+ }
1509
+
1510
+ , doStatement: function(body) {
1511
+ return {
1512
+ type: 'DoStatement'
1513
+ , body: body
1514
+ };
1515
+ }
1516
+
1517
+ , repeatStatement: function(condition, body) {
1518
+ return {
1519
+ type: 'RepeatStatement'
1520
+ , condition: condition
1521
+ , body: body
1522
+ };
1523
+ }
1524
+
1525
+ , localStatement: function(variables, init) {
1526
+ return {
1527
+ type: 'LocalStatement'
1528
+ , variables: variables
1529
+ , init: init
1530
+ };
1531
+ }
1532
+
1533
+ , assignmentStatement: function(variables, init) {
1534
+ return {
1535
+ type: 'AssignmentStatement'
1536
+ , variables: variables
1537
+ , init: init
1538
+ };
1539
+ }
1540
+
1541
+ , callStatement: function(expression) {
1542
+ return {
1543
+ type: 'CallStatement'
1544
+ , expression: expression
1545
+ };
1546
+ }
1547
+
1548
+ , functionStatement: function(identifier, parameters, isLocal, body) {
1549
+ return {
1550
+ type: 'FunctionDeclaration'
1551
+ , identifier: identifier
1552
+ , isLocal: isLocal
1553
+ , parameters: parameters
1554
+ , body: body
1555
+ };
1556
+ }
1557
+
1558
+ , forNumericStatement: function(variable, start, end, step, body) {
1559
+ return {
1560
+ type: 'ForNumericStatement'
1561
+ , variable: variable
1562
+ , start: start
1563
+ , end: end
1564
+ , step: step
1565
+ , body: body
1566
+ };
1567
+ }
1568
+
1569
+ , forGenericStatement: function(variables, iterators, body) {
1570
+ return {
1571
+ type: 'ForGenericStatement'
1572
+ , variables: variables
1573
+ , iterators: iterators
1574
+ , body: body
1575
+ };
1576
+ }
1577
+
1578
+ , chunk: function(body) {
1579
+ return {
1580
+ type: 'Chunk'
1581
+ , body: body
1582
+ };
1583
+ }
1584
+
1585
+ , identifier: function(name) {
1586
+ return {
1587
+ type: 'Identifier'
1588
+ , name: name
1589
+ };
1590
+ }
1591
+
1592
+ , literal: function(type, value, raw) {
1593
+ type = (type === StringLiteral) ? 'StringLiteral'
1594
+ : (type === NumericLiteral) ? 'NumericLiteral'
1595
+ : (type === BooleanLiteral) ? 'BooleanLiteral'
1596
+ : (type === NilLiteral) ? 'NilLiteral'
1597
+ : 'VarargLiteral';
1598
+
1599
+ return {
1600
+ type: type
1601
+ , value: value
1602
+ , raw: raw
1603
+ };
1604
+ }
1605
+
1606
+ , tableKey: function(key, value) {
1607
+ return {
1608
+ type: 'TableKey'
1609
+ , key: key
1610
+ , value: value
1611
+ };
1612
+ }
1613
+ , tableKeyString: function(key, value) {
1614
+ return {
1615
+ type: 'TableKeyString'
1616
+ , key: key
1617
+ , value: value
1618
+ };
1619
+ }
1620
+ , tableValue: function(value) {
1621
+ return {
1622
+ type: 'TableValue'
1623
+ , value: value
1624
+ };
1625
+ }
1626
+
1627
+
1628
+ , tableConstructorExpression: function(fields) {
1629
+ return {
1630
+ type: 'TableConstructorExpression'
1631
+ , fields: fields
1632
+ };
1633
+ }
1634
+ , binaryExpression: function(operator, left, right) {
1635
+ var type = ('and' === operator || 'or' === operator) ?
1636
+ 'LogicalExpression' :
1637
+ 'BinaryExpression';
1638
+
1639
+ return {
1640
+ type: type
1641
+ , operator: operator
1642
+ , left: left
1643
+ , right: right
1644
+ };
1645
+ }
1646
+ , unaryExpression: function(operator, argument) {
1647
+ return {
1648
+ type: 'UnaryExpression'
1649
+ , operator: operator
1650
+ , argument: argument
1651
+ };
1652
+ }
1653
+ , memberExpression: function(base, indexer, identifier) {
1654
+ return {
1655
+ type: 'MemberExpression'
1656
+ , indexer: indexer
1657
+ , identifier: identifier
1658
+ , base: base
1659
+ };
1660
+ }
1661
+
1662
+ , indexExpression: function(base, index) {
1663
+ return {
1664
+ type: 'IndexExpression'
1665
+ , base: base
1666
+ , index: index
1667
+ };
1668
+ }
1669
+
1670
+ , callExpression: function(base, args) {
1671
+ return {
1672
+ type: 'CallExpression'
1673
+ , base: base
1674
+ , 'arguments': args
1675
+ };
1676
+ }
1677
+
1678
+ , tableCallExpression: function(base, args) {
1679
+ return {
1680
+ type: 'TableCallExpression'
1681
+ , base: base
1682
+ , 'arguments': args
1683
+ };
1684
+ }
1685
+
1686
+ , stringCallExpression: function(base, argument) {
1687
+ return {
1688
+ type: 'StringCallExpression'
1689
+ , base: base
1690
+ , argument: argument
1691
+ };
1692
+ }
1693
+
1694
+ , comment: function(value, raw) {
1695
+ return {
1696
+ type: 'Comment'
1697
+ , value: value
1698
+ , raw: raw
1699
+ };
1700
+ }
1701
+ };
1702
+
1703
+ function finishNode(node) {
1704
+ if (trackLocations) {
1705
+ var location = locations.pop();
1706
+ location.complete();
1707
+ if (options.locations) node.loc = location.loc;
1708
+ if (options.ranges) node.range = location.range;
1709
+ }
1710
+ return node;
1711
+ }
1712
+
1713
+ var slice = Array.prototype.slice
1714
+ , toString = Object.prototype.toString
1715
+ , indexOf = function indexOf(array, element) {
1716
+ for (var i = 0, length = array.length; i < length; i++) {
1717
+ if (array[i] === element) return i;
1718
+ }
1719
+ return -1;
1720
+ };
1721
+
1722
+ function indexOfObject(array, property, element) {
1723
+ for (var i = 0, length = array.length; i < length; i++) {
1724
+ if (array[i][property] === element) return i;
1725
+ }
1726
+ return -1;
1727
+ }
1728
+
1729
+ function sprintf(format) {
1730
+ var args = slice.call(arguments, 1);
1731
+ format = format.replace(/%(\d)/g, function (match, index) {
1732
+ return '' + args[index - 1] || '';
1733
+ });
1734
+ return format;
1735
+ }
1736
+
1737
+ function extend() {
1738
+ var args = slice.call(arguments)
1739
+ , dest = {}
1740
+ , src, prop;
1741
+
1742
+ for (var i = 0, length = args.length; i < length; i++) {
1743
+ src = args[i];
1744
+ for (prop in src) if (src.hasOwnProperty(prop)) {
1745
+ dest[prop] = src[prop];
1746
+ }
1747
+ }
1748
+ return dest;
1749
+ }
1750
+
1751
+ function raise(token) {
1752
+ var message = sprintf.apply(null, slice.call(arguments, 1))
1753
+ , error, col;
1754
+
1755
+ if ('undefined' !== typeof token.line) {
1756
+ col = token.range[0] - token.lineStart;
1757
+ error = new SyntaxError(sprintf('[%1:%2] %3', token.line, col, message));
1758
+ error.line = token.line;
1759
+ error.index = token.range[0];
1760
+ error.column = col;
1761
+ } else {
1762
+ col = index - lineStart + 1;
1763
+ error = new SyntaxError(sprintf('[%1:%2] %3', line, col, message));
1764
+ error.index = index;
1765
+ error.line = line;
1766
+ error.column = col;
1767
+ }
1768
+ throw error;
1769
+ }
1770
+
1771
+ function raiseUnexpectedToken(type, token) {
1772
+ raise(token, errors.expectedToken, type, token.value);
1773
+ }
1774
+
1775
+ function unexpected(found, near) {
1776
+ if ('undefined' === typeof near) near = lookahead.value;
1777
+ if ('undefined' !== typeof found.type) {
1778
+ var type;
1779
+ switch (found.type) {
1780
+ case StringLiteral: type = 'string'; break;
1781
+ case Keyword: type = 'keyword'; break;
1782
+ case Identifier: type = 'identifier'; break;
1783
+ case NumericLiteral: type = 'number'; break;
1784
+ case Punctuator: type = 'symbol'; break;
1785
+ case BooleanLiteral: type = 'boolean'; break;
1786
+ case NilLiteral:
1787
+ return raise(found, errors.unexpected, 'symbol', 'nil', near);
1788
+ }
1789
+ return raise(found, errors.unexpected, type, found.value, near);
1790
+ }
1791
+ return raise(found, errors.unexpected, 'symbol', found, near);
1792
+ }
1793
+
1794
+ var index
1795
+ , token
1796
+ , previousToken
1797
+ , lookahead
1798
+ , comments
1799
+ , tokenStart
1800
+ , line
1801
+ , lineStart;
1802
+
1803
+ exports.lex = lex;
1804
+
1805
+ function lex() {
1806
+ skipWhiteSpace();
1807
+ while (45 === input.charCodeAt(index) &&
1808
+ 45 === input.charCodeAt(index + 1)) {
1809
+ scanComment();
1810
+ skipWhiteSpace();
1811
+ }
1812
+ if (index >= length) return {
1813
+ type : EOF
1814
+ , value: '<eof>'
1815
+ , line: line
1816
+ , lineStart: lineStart
1817
+ , range: [index, index]
1818
+ };
1819
+
1820
+ var charCode = input.charCodeAt(index)
1821
+ , next = input.charCodeAt(index + 1);
1822
+ tokenStart = index;
1823
+ if (isIdentifierStart(charCode)) return scanIdentifierOrKeyword();
1824
+
1825
+ switch (charCode) {
1826
+ case 39: case 34: // '"
1827
+ return scanStringLiteral();
1828
+ case 48: case 49: case 50: case 51: case 52: case 53:
1829
+ case 54: case 55: case 56: case 57:
1830
+ return scanNumericLiteral();
1831
+
1832
+ case 46: // .
1833
+ if (isDecDigit(next)) return scanNumericLiteral();
1834
+ if (46 === next) {
1835
+ if (46 === input.charCodeAt(index + 2)) return scanVarargLiteral();
1836
+ return scanPunctuator('..');
1837
+ }
1838
+ return scanPunctuator('.');
1839
+
1840
+ case 61: // =
1841
+ if (61 === next) return scanPunctuator('==');
1842
+ return scanPunctuator('=');
1843
+
1844
+ case 62: // >
1845
+ if (61 === next) return scanPunctuator('>=');
1846
+ return scanPunctuator('>');
1847
+
1848
+ case 60: // <
1849
+ if (61 === next) return scanPunctuator('<=');
1850
+ return scanPunctuator('<');
1851
+
1852
+ case 126: // ~
1853
+ if (61 === next) return scanPunctuator('~=');
1854
+ return raise({}, errors.expected, '=', '~');
1855
+
1856
+ case 58: // :
1857
+ if (58 === next) return scanPunctuator('::');
1858
+ return scanPunctuator(':');
1859
+
1860
+ case 91: // [
1861
+ if (91 === next || 61 === next) return scanLongStringLiteral();
1862
+ return scanPunctuator('[');
1863
+ case 42: case 47: case 94: case 37: case 44: case 123: case 125:
1864
+ case 93: case 40: case 41: case 59: case 35: case 45: case 43:
1865
+ return scanPunctuator(input.charAt(index));
1866
+ }
1867
+
1868
+ return unexpected(input.charAt(index));
1869
+ }
1870
+
1871
+ function skipWhiteSpace() {
1872
+ while (index < length) {
1873
+ var charCode = input.charCodeAt(index);
1874
+ if (isWhiteSpace(charCode)) {
1875
+ index++;
1876
+ } else if (isLineTerminator(charCode)) {
1877
+ line++;
1878
+ lineStart = ++index;
1879
+ } else {
1880
+ break;
1881
+ }
1882
+ }
1883
+ }
1884
+
1885
+ function scanIdentifierOrKeyword() {
1886
+ var value, type;
1887
+ while (isIdentifierPart(input.charCodeAt(++index)));
1888
+ value = input.slice(tokenStart, index);
1889
+ if (isKeyword(value)) {
1890
+ type = Keyword;
1891
+ } else if ('true' === value || 'false' === value) {
1892
+ type = BooleanLiteral;
1893
+ value = ('true' === value);
1894
+ } else if ('nil' === value) {
1895
+ type = NilLiteral;
1896
+ value = null;
1897
+ } else {
1898
+ type = Identifier;
1899
+ }
1900
+
1901
+ return {
1902
+ type: type
1903
+ , value: value
1904
+ , line: line
1905
+ , lineStart: lineStart
1906
+ , range: [tokenStart, index]
1907
+ };
1908
+ }
1909
+
1910
+ function scanPunctuator(value) {
1911
+ index += value.length;
1912
+ return {
1913
+ type: Punctuator
1914
+ , value: value
1915
+ , line: line
1916
+ , lineStart: lineStart
1917
+ , range: [tokenStart, index]
1918
+ };
1919
+ }
1920
+
1921
+ function scanVarargLiteral() {
1922
+ index += 3;
1923
+ return {
1924
+ type: VarargLiteral
1925
+ , value: '...'
1926
+ , line: line
1927
+ , lineStart: lineStart
1928
+ , range: [tokenStart, index]
1929
+ };
1930
+ }
1931
+
1932
+ function scanStringLiteral() {
1933
+ var delimiter = input.charCodeAt(index++)
1934
+ , stringStart = index
1935
+ , string = ''
1936
+ , charCode;
1937
+
1938
+ while (index < length) {
1939
+ charCode = input.charCodeAt(index++);
1940
+ if (delimiter === charCode) break;
1941
+ if (92 === charCode) { // \
1942
+ string += input.slice(stringStart, index - 1) + readEscapeSequence();
1943
+ stringStart = index;
1944
+ }
1945
+ else if (index >= length || isLineTerminator(charCode)) {
1946
+ string += input.slice(stringStart, index - 1);
1947
+ raise({}, errors.unfinishedString, string + String.fromCharCode(charCode));
1948
+ }
1949
+ }
1950
+ string += input.slice(stringStart, index - 1);
1951
+
1952
+ return {
1953
+ type: StringLiteral
1954
+ , value: string
1955
+ , line: line
1956
+ , lineStart: lineStart
1957
+ , range: [tokenStart, index]
1958
+ };
1959
+ }
1960
+
1961
+ function scanLongStringLiteral() {
1962
+ var string = readLongString();
1963
+ if (false === string) raise(token, errors.expected, '[', token.value);
1964
+
1965
+ return {
1966
+ type: StringLiteral
1967
+ , value: string
1968
+ , line: line
1969
+ , lineStart: lineStart
1970
+ , range: [tokenStart, index]
1971
+ };
1972
+ }
1973
+
1974
+ function scanNumericLiteral() {
1975
+ var character = input.charAt(index)
1976
+ , next = input.charAt(index + 1);
1977
+
1978
+ var value = ('0' === character && 'xX'.indexOf(next || null) >= 0) ?
1979
+ readHexLiteral() : readDecLiteral();
1980
+
1981
+ return {
1982
+ type: NumericLiteral
1983
+ , value: value
1984
+ , line: line
1985
+ , lineStart: lineStart
1986
+ , range: [tokenStart, index]
1987
+ };
1988
+ }
1989
+
1990
+ function readHexLiteral() {
1991
+ var fraction = 0 // defaults to 0 as it gets summed
1992
+ , binaryExponent = 1 // defaults to 1 as it gets multiplied
1993
+ , binarySign = 1 // positive
1994
+ , digit, fractionStart, exponentStart, digitStart;
1995
+
1996
+ digitStart = index += 2; // Skip 0x part
1997
+ if (!isHexDigit(input.charCodeAt(index)))
1998
+ raise({}, errors.malformedNumber, input.slice(tokenStart, index));
1999
+
2000
+ while (isHexDigit(input.charCodeAt(index))) index++;
2001
+ digit = parseInt(input.slice(digitStart, index), 16);
2002
+ if ('.' === input.charAt(index)) {
2003
+ fractionStart = ++index;
2004
+
2005
+ while (isHexDigit(input.charCodeAt(index))) index++;
2006
+ fraction = input.slice(fractionStart, index);
2007
+ fraction = (fractionStart === index) ? 0
2008
+ : parseInt(fraction, 16) / Math.pow(16, index - fractionStart);
2009
+ }
2010
+ if ('pP'.indexOf(input.charAt(index) || null) >= 0) {
2011
+ index++;
2012
+ if ('+-'.indexOf(input.charAt(index) || null) >= 0)
2013
+ binarySign = ('+' === input.charAt(index++)) ? 1 : -1;
2014
+
2015
+ exponentStart = index;
2016
+ if (!isDecDigit(input.charCodeAt(index)))
2017
+ raise({}, errors.malformedNumber, input.slice(tokenStart, index));
2018
+
2019
+ while (isDecDigit(input.charCodeAt(index))) index++;
2020
+ binaryExponent = input.slice(exponentStart, index);
2021
+ binaryExponent = Math.pow(2, binaryExponent * binarySign);
2022
+ }
2023
+
2024
+ return (digit + fraction) * binaryExponent;
2025
+ }
2026
+
2027
+ function readDecLiteral() {
2028
+ while (isDecDigit(input.charCodeAt(index))) index++;
2029
+ if ('.' === input.charAt(index)) {
2030
+ index++;
2031
+ while (isDecDigit(input.charCodeAt(index))) index++;
2032
+ }
2033
+ if ('eE'.indexOf(input.charAt(index) || null) >= 0) {
2034
+ index++;
2035
+ if ('+-'.indexOf(input.charAt(index) || null) >= 0) index++;
2036
+ if (!isDecDigit(input.charCodeAt(index)))
2037
+ raise({}, errors.malformedNumber, input.slice(tokenStart, index));
2038
+
2039
+ while (isDecDigit(input.charCodeAt(index))) index++;
2040
+ }
2041
+
2042
+ return parseFloat(input.slice(tokenStart, index));
2043
+ }
2044
+
2045
+ function readEscapeSequence() {
2046
+ var sequenceStart = index;
2047
+ switch (input.charAt(index)) {
2048
+ case 'n': index++; return '\n';
2049
+ case 'r': index++; return '\r';
2050
+ case 't': index++; return '\t';
2051
+ case 'v': index++; return '\x0B';
2052
+ case 'b': index++; return '\b';
2053
+ case 'f': index++; return '\f';
2054
+ case 'z': index++; skipWhiteSpace(); return '';
2055
+ case 'x':
2056
+ if (isHexDigit(input.charCodeAt(index + 1)) &&
2057
+ isHexDigit(input.charCodeAt(index + 2))) {
2058
+ index += 3;
2059
+ return '\\' + input.slice(sequenceStart, index);
2060
+ }
2061
+ return '\\' + input.charAt(index++);
2062
+ default:
2063
+ if (isDecDigit(input.charCodeAt(index))) {
2064
+ while (isDecDigit(input.charCodeAt(++index)));
2065
+ return '\\' + input.slice(sequenceStart, index);
2066
+ }
2067
+ return input.charAt(index++);
2068
+ }
2069
+ }
2070
+
2071
+ function scanComment() {
2072
+ tokenStart = index;
2073
+ index += 2; // --
2074
+
2075
+ var character = input.charAt(index)
2076
+ , content = ''
2077
+ , isLong = false
2078
+ , commentStart = index
2079
+ , lineStartComment = lineStart
2080
+ , lineComment = line;
2081
+
2082
+ if ('[' === character) {
2083
+ content = readLongString();
2084
+ if (false === content) content = character;
2085
+ else isLong = true;
2086
+ }
2087
+ if (!isLong) {
2088
+ while (index < length) {
2089
+ if (isLineTerminator(input.charCodeAt(index))) break;
2090
+ index++;
2091
+ }
2092
+ if (options.comments) content = input.slice(commentStart, index);
2093
+ }
2094
+
2095
+ if (options.comments) {
2096
+ var node = ast.comment(content, input.slice(tokenStart, index));
2097
+ if (options.locations) {
2098
+ node.loc = {
2099
+ start: { line: lineComment, column: tokenStart - lineStartComment }
2100
+ , end: { line: line, column: index - lineStart }
2101
+ };
2102
+ }
2103
+ if (options.ranges) {
2104
+ node.range = [tokenStart, index];
2105
+ }
2106
+ comments.push(node);
2107
+ }
2108
+ }
2109
+
2110
+ function readLongString() {
2111
+ var level = 0
2112
+ , content = ''
2113
+ , terminator = false
2114
+ , character, stringStart;
2115
+
2116
+ index++; // [
2117
+ while ('=' === input.charAt(index + level)) level++;
2118
+ if ('[' !== input.charAt(index + level)) return false;
2119
+
2120
+ index += level + 1;
2121
+ if (isLineTerminator(input.charCodeAt(index))) {
2122
+ line++;
2123
+ lineStart = index++;
2124
+ }
2125
+
2126
+ stringStart = index;
2127
+ while (index < length) {
2128
+ character = input.charAt(index++);
2129
+ if (isLineTerminator(character.charCodeAt(0))) {
2130
+ line++;
2131
+ lineStart = index;
2132
+ }
2133
+ if (']' === character) {
2134
+ terminator = true;
2135
+ for (var i = 0; i < level; i++) {
2136
+ if ('=' !== input.charAt(index + i)) terminator = false;
2137
+ }
2138
+ if (']' !== input.charAt(index + level)) terminator = false;
2139
+ }
2140
+ if (terminator) break;
2141
+ }
2142
+ content += input.slice(stringStart, index - 1);
2143
+ index += level + 1;
2144
+
2145
+ return content;
2146
+ }
2147
+
2148
+ function next() {
2149
+ previousToken = token;
2150
+ token = lookahead;
2151
+ lookahead = lex();
2152
+ }
2153
+
2154
+ function consume(value) {
2155
+ if (value === token.value) {
2156
+ next();
2157
+ return true;
2158
+ }
2159
+ return false;
2160
+ }
2161
+
2162
+ function expect(value) {
2163
+ if (value === token.value) next();
2164
+ else raise(token, errors.expected, value, token.value);
2165
+ }
2166
+
2167
+ function isWhiteSpace(charCode) {
2168
+ return 9 === charCode || 32 === charCode || 0xB === charCode || 0xC === charCode;
2169
+ }
2170
+
2171
+ function isLineTerminator(charCode) {
2172
+ return 10 === charCode || 13 === charCode;
2173
+ }
2174
+
2175
+ function isDecDigit(charCode) {
2176
+ return charCode >= 48 && charCode <= 57;
2177
+ }
2178
+
2179
+ function isHexDigit(charCode) {
2180
+ return (charCode >= 48 && charCode <= 57) || (charCode >= 97 && charCode <= 102) || (charCode >= 65 && charCode <= 70);
2181
+ }
2182
+
2183
+ function isIdentifierStart(charCode) {
2184
+ return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode;
2185
+ }
2186
+
2187
+ function isIdentifierPart(charCode) {
2188
+ return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode || (charCode >= 48 && charCode <= 57);
2189
+ }
2190
+
2191
+ function isKeyword(id) {
2192
+ switch (id.length) {
2193
+ case 2:
2194
+ return 'do' === id || 'if' === id || 'in' === id || 'or' === id;
2195
+ case 3:
2196
+ return 'and' === id || 'end' === id || 'for' === id || 'not' === id;
2197
+ case 4:
2198
+ return 'else' === id || 'goto' === id || 'then' === id;
2199
+ case 5:
2200
+ return 'break' === id || 'local' === id || 'until' === id || 'while' === id;
2201
+ case 6:
2202
+ return 'elseif' === id || 'repeat' === id || 'return' === id;
2203
+ case 8:
2204
+ return 'function' === id;
2205
+ }
2206
+ return false;
2207
+ }
2208
+
2209
+ function isUnary(token) {
2210
+ if (Punctuator === token.type) return '#-'.indexOf(token.value) >= 0;
2211
+ if (Keyword === token.type) return 'not' === token.value;
2212
+ return false;
2213
+ }
2214
+ function isCallExpression(expression) {
2215
+ switch (expression.type) {
2216
+ case 'CallExpression':
2217
+ case 'TableCallExpression':
2218
+ case 'StringCallExpression':
2219
+ return true;
2220
+ }
2221
+ return false;
2222
+ }
2223
+
2224
+ function isBlockFollow(token) {
2225
+ if (EOF === token.type) return true;
2226
+ if (Keyword !== token.type) return false;
2227
+ switch (token.value) {
2228
+ case 'else': case 'elseif':
2229
+ case 'end': case 'until':
2230
+ return true;
2231
+ default:
2232
+ return false;
2233
+ }
2234
+ }
2235
+ var scopes
2236
+ , scopeDepth
2237
+ , globals;
2238
+ function createScope() {
2239
+ scopes.push(Array.apply(null, scopes[scopeDepth++]));
2240
+ }
2241
+ function exitScope() {
2242
+ scopes.pop();
2243
+ scopeDepth--;
2244
+ }
2245
+ function scopeIdentifierName(name) {
2246
+ if (-1 !== indexOf(scopes[scopeDepth], name)) return;
2247
+ scopes[scopeDepth].push(name);
2248
+ }
2249
+ function scopeIdentifier(node) {
2250
+ scopeIdentifierName(node.name);
2251
+ attachScope(node, true);
2252
+ }
2253
+ function attachScope(node, isLocal) {
2254
+ if (!isLocal && -1 === indexOfObject(globals, 'name', node.name))
2255
+ globals.push(node);
2256
+
2257
+ node.isLocal = isLocal;
2258
+ }
2259
+ function scopeHasName(name) {
2260
+ return (-1 !== indexOf(scopes[scopeDepth], name));
2261
+ }
2262
+
2263
+ var locations = []
2264
+ , trackLocations;
2265
+
2266
+ function createLocationMarker() {
2267
+ return new Marker(token);
2268
+ }
2269
+
2270
+ function Marker(token) {
2271
+ if (options.locations) {
2272
+ this.loc = {
2273
+ start: {
2274
+ line: token.line
2275
+ , column: token.range[0] - token.lineStart
2276
+ }
2277
+ , end: {
2278
+ line: 0
2279
+ , column: 0
2280
+ }
2281
+ };
2282
+ }
2283
+ if (options.ranges) this.range = [token.range[0], 0];
2284
+ }
2285
+ Marker.prototype.complete = function() {
2286
+ if (options.locations) {
2287
+ this.loc.end.line = previousToken.line;
2288
+ this.loc.end.column = previousToken.range[1] - previousToken.lineStart;
2289
+ }
2290
+ if (options.ranges) {
2291
+ this.range[1] = previousToken.range[1];
2292
+ }
2293
+ };
2294
+ function markLocation() {
2295
+ if (trackLocations) locations.push(createLocationMarker());
2296
+ }
2297
+ function pushLocation(marker) {
2298
+ if (trackLocations) locations.push(marker);
2299
+ }
2300
+
2301
+ function parseChunk() {
2302
+ next();
2303
+ markLocation();
2304
+ var body = parseBlock();
2305
+ if (EOF !== token.type) unexpected(token);
2306
+ if (trackLocations && !body.length) previousToken = token;
2307
+ return finishNode(ast.chunk(body));
2308
+ }
2309
+
2310
+ function parseBlock(terminator) {
2311
+ var block = []
2312
+ , statement;
2313
+ if (options.scope) createScope();
2314
+
2315
+ while (!isBlockFollow(token)) {
2316
+ if ('return' === token.value) {
2317
+ block.push(parseStatement());
2318
+ break;
2319
+ }
2320
+ statement = parseStatement();
2321
+ if (statement) block.push(statement);
2322
+ }
2323
+
2324
+ if (options.scope) exitScope();
2325
+ return block;
2326
+ }
2327
+
2328
+ function parseStatement() {
2329
+ markLocation();
2330
+ if (Keyword === token.type) {
2331
+ switch (token.value) {
2332
+ case 'local': next(); return parseLocalStatement();
2333
+ case 'if': next(); return parseIfStatement();
2334
+ case 'return': next(); return parseReturnStatement();
2335
+ case 'function': next();
2336
+ var name = parseFunctionName();
2337
+ return parseFunctionDeclaration(name);
2338
+ case 'while': next(); return parseWhileStatement();
2339
+ case 'for': next(); return parseForStatement();
2340
+ case 'repeat': next(); return parseRepeatStatement();
2341
+ case 'break': next(); return parseBreakStatement();
2342
+ case 'do': next(); return parseDoStatement();
2343
+ case 'goto': next(); return parseGotoStatement();
2344
+ }
2345
+ }
2346
+
2347
+ if (Punctuator === token.type) {
2348
+ if (consume('::')) return parseLabelStatement();
2349
+ }
2350
+ if (trackLocations) locations.pop();
2351
+ if (consume(';')) return;
2352
+
2353
+ return parseAssignmentOrCallStatement();
2354
+ }
2355
+
2356
+ function parseLabelStatement() {
2357
+ var name = token.value
2358
+ , label = parseIdentifier();
2359
+
2360
+ if (options.scope) {
2361
+ scopeIdentifierName('::' + name + '::');
2362
+ attachScope(label, true);
2363
+ }
2364
+
2365
+ expect('::');
2366
+ return finishNode(ast.labelStatement(label));
2367
+ }
2368
+
2369
+ function parseBreakStatement() {
2370
+ return finishNode(ast.breakStatement());
2371
+ }
2372
+
2373
+ function parseGotoStatement() {
2374
+ var name = token.value
2375
+ , label = parseIdentifier();
2376
+
2377
+ if (options.scope) label.isLabel = scopeHasName('::' + name + '::');
2378
+ return finishNode(ast.gotoStatement(label));
2379
+ }
2380
+
2381
+ function parseDoStatement() {
2382
+ var body = parseBlock();
2383
+ expect('end');
2384
+ return finishNode(ast.doStatement(body));
2385
+ }
2386
+
2387
+ function parseWhileStatement() {
2388
+ var condition = parseExpectedExpression();
2389
+ expect('do');
2390
+ var body = parseBlock();
2391
+ expect('end');
2392
+ return finishNode(ast.whileStatement(condition, body));
2393
+ }
2394
+
2395
+ function parseRepeatStatement() {
2396
+ var body = parseBlock();
2397
+ expect('until');
2398
+ var condition = parseExpectedExpression();
2399
+ return finishNode(ast.repeatStatement(condition, body));
2400
+ }
2401
+
2402
+ function parseReturnStatement() {
2403
+ var expressions = [];
2404
+
2405
+ if ('end' !== token.value) {
2406
+ var expression = parseExpression();
2407
+ if (null != expression) expressions.push(expression);
2408
+ while (consume(',')) {
2409
+ expression = parseExpectedExpression();
2410
+ expressions.push(expression);
2411
+ }
2412
+ consume(';'); // grammar tells us ; is optional here.
2413
+ }
2414
+ return finishNode(ast.returnStatement(expressions));
2415
+ }
2416
+
2417
+ function parseIfStatement() {
2418
+ var clauses = []
2419
+ , condition
2420
+ , body
2421
+ , marker;
2422
+ if (trackLocations) {
2423
+ marker = locations[locations.length - 1];
2424
+ locations.push(marker);
2425
+ }
2426
+ condition = parseExpectedExpression();
2427
+ expect('then');
2428
+ body = parseBlock();
2429
+ clauses.push(finishNode(ast.ifClause(condition, body)));
2430
+
2431
+ if (trackLocations) marker = createLocationMarker();
2432
+ while (consume('elseif')) {
2433
+ pushLocation(marker);
2434
+ condition = parseExpectedExpression();
2435
+ expect('then');
2436
+ body = parseBlock();
2437
+ clauses.push(finishNode(ast.elseifClause(condition, body)));
2438
+ if (trackLocations) marker = createLocationMarker();
2439
+ }
2440
+
2441
+ if (consume('else')) {
2442
+ if (trackLocations) {
2443
+ marker = new Marker(previousToken);
2444
+ locations.push(marker);
2445
+ }
2446
+ body = parseBlock();
2447
+ clauses.push(finishNode(ast.elseClause(body)));
2448
+ }
2449
+
2450
+ expect('end');
2451
+ return finishNode(ast.ifStatement(clauses));
2452
+ }
2453
+
2454
+ function parseForStatement() {
2455
+ var variable = parseIdentifier()
2456
+ , body;
2457
+ if (options.scope) scopeIdentifier(variable);
2458
+ if (consume('=')) {
2459
+ var start = parseExpectedExpression();
2460
+ expect(',');
2461
+ var end = parseExpectedExpression();
2462
+ var step = consume(',') ? parseExpectedExpression() : null;
2463
+
2464
+ expect('do');
2465
+ body = parseBlock();
2466
+ expect('end');
2467
+
2468
+ return finishNode(ast.forNumericStatement(variable, start, end, step, body));
2469
+ }
2470
+ else {
2471
+ var variables = [variable];
2472
+ while (consume(',')) {
2473
+ variable = parseIdentifier();
2474
+ if (options.scope) scopeIdentifier(variable);
2475
+ variables.push(variable);
2476
+ }
2477
+ expect('in');
2478
+ var iterators = [];
2479
+ do {
2480
+ var expression = parseExpectedExpression();
2481
+ iterators.push(expression);
2482
+ } while (consume(','));
2483
+
2484
+ expect('do');
2485
+ body = parseBlock();
2486
+ expect('end');
2487
+
2488
+ return finishNode(ast.forGenericStatement(variables, iterators, body));
2489
+ }
2490
+ }
2491
+
2492
+ function parseLocalStatement() {
2493
+ var name;
2494
+
2495
+ if (Identifier === token.type) {
2496
+ var variables = []
2497
+ , init = [];
2498
+
2499
+ do {
2500
+ name = parseIdentifier();
2501
+
2502
+ variables.push(name);
2503
+ } while (consume(','));
2504
+
2505
+ if (consume('=')) {
2506
+ do {
2507
+ var expression = parseExpectedExpression();
2508
+ init.push(expression);
2509
+ } while (consume(','));
2510
+ }
2511
+ if (options.scope) {
2512
+ for (var i = 0, l = variables.length; i < l; i++) {
2513
+ scopeIdentifier(variables[i]);
2514
+ }
2515
+ }
2516
+
2517
+ return finishNode(ast.localStatement(variables, init));
2518
+ }
2519
+ if (consume('function')) {
2520
+ name = parseIdentifier();
2521
+ if (options.scope) scopeIdentifier(name);
2522
+ return parseFunctionDeclaration(name, true);
2523
+ } else {
2524
+ raiseUnexpectedToken('<name>', token);
2525
+ }
2526
+ }
2527
+
2528
+ function parseAssignmentOrCallStatement() {
2529
+ var previous = token
2530
+ , expression, marker;
2531
+
2532
+ if (trackLocations) marker = createLocationMarker();
2533
+ expression = parsePrefixExpression();
2534
+
2535
+ if (null == expression) return unexpected(token);
2536
+ if (',='.indexOf(token.value) >= 0) {
2537
+ var variables = [expression]
2538
+ , init = []
2539
+ , exp;
2540
+
2541
+ while (consume(',')) {
2542
+ exp = parsePrefixExpression();
2543
+ if (null == exp) raiseUnexpectedToken('<expression>', token);
2544
+ variables.push(exp);
2545
+ }
2546
+ expect('=');
2547
+ do {
2548
+ exp = parseExpectedExpression();
2549
+ init.push(exp);
2550
+ } while (consume(','));
2551
+
2552
+ pushLocation(marker);
2553
+ return finishNode(ast.assignmentStatement(variables, init));
2554
+ }
2555
+ if (isCallExpression(expression)) {
2556
+ pushLocation(marker);
2557
+ return finishNode(ast.callStatement(expression));
2558
+ }
2559
+ return unexpected(previous);
2560
+ }
2561
+
2562
+ function parseIdentifier() {
2563
+ markLocation();
2564
+ var identifier = token.value;
2565
+ if (Identifier !== token.type) raiseUnexpectedToken('<name>', token);
2566
+ next();
2567
+ return finishNode(ast.identifier(identifier));
2568
+ }
2569
+
2570
+ function parseFunctionDeclaration(name, isLocal) {
2571
+ var parameters = [];
2572
+ expect('(');
2573
+ if (!consume(')')) {
2574
+ while (true) {
2575
+ if (Identifier === token.type) {
2576
+ var parameter = parseIdentifier();
2577
+ if (options.scope) scopeIdentifier(parameter);
2578
+
2579
+ parameters.push(parameter);
2580
+
2581
+ if (consume(',')) continue;
2582
+ else if (consume(')')) break;
2583
+ }
2584
+ else if (VarargLiteral === token.type) {
2585
+ parameters.push(parsePrimaryExpression());
2586
+ expect(')');
2587
+ break;
2588
+ } else {
2589
+ raiseUnexpectedToken('<name> or \'...\'', token);
2590
+ }
2591
+ }
2592
+ }
2593
+
2594
+ var body = parseBlock();
2595
+ expect('end');
2596
+
2597
+ isLocal = isLocal || false;
2598
+ return finishNode(ast.functionStatement(name, parameters, isLocal, body));
2599
+ }
2600
+
2601
+ function parseFunctionName() {
2602
+ var base, name, marker;
2603
+
2604
+ if (trackLocations) marker = createLocationMarker();
2605
+ base = parseIdentifier();
2606
+
2607
+ if (options.scope) attachScope(base, false);
2608
+
2609
+ while (consume('.')) {
2610
+ pushLocation(marker);
2611
+ name = parseIdentifier();
2612
+ if (options.scope) attachScope(name, false);
2613
+ base = finishNode(ast.memberExpression(base, '.', name));
2614
+ }
2615
+
2616
+ if (consume(':')) {
2617
+ pushLocation(marker);
2618
+ name = parseIdentifier();
2619
+ if (options.scope) attachScope(name, false);
2620
+ base = finishNode(ast.memberExpression(base, ':', name));
2621
+ }
2622
+
2623
+ return base;
2624
+ }
2625
+
2626
+ function parseTableConstructor() {
2627
+ var fields = []
2628
+ , key, value;
2629
+
2630
+ while (true) {
2631
+ markLocation();
2632
+ if (Punctuator === token.type && consume('[')) {
2633
+ key = parseExpectedExpression();
2634
+ expect(']');
2635
+ expect('=');
2636
+ value = parseExpectedExpression();
2637
+ fields.push(finishNode(ast.tableKey(key, value)));
2638
+ } else if (Identifier === token.type) {
2639
+ key = parseExpectedExpression();
2640
+ if (consume('=')) {
2641
+ value = parseExpectedExpression();
2642
+ fields.push(finishNode(ast.tableKeyString(key, value)));
2643
+ } else {
2644
+ fields.push(finishNode(ast.tableValue(key)));
2645
+ }
2646
+ } else {
2647
+ if (null == (value = parseExpression())) {
2648
+ locations.pop();
2649
+ break;
2650
+ }
2651
+ fields.push(finishNode(ast.tableValue(value)));
2652
+ }
2653
+ if (',;'.indexOf(token.value) >= 0) {
2654
+ next();
2655
+ continue;
2656
+ }
2657
+ if ('}' === token.value) break;
2658
+ }
2659
+ expect('}');
2660
+ return finishNode(ast.tableConstructorExpression(fields));
2661
+ }
2662
+
2663
+ function parseExpression() {
2664
+ var expression = parseSubExpression(0);
2665
+ return expression;
2666
+ }
2667
+
2668
+ function parseExpectedExpression() {
2669
+ var expression = parseExpression();
2670
+ if (null == expression) raiseUnexpectedToken('<expression>', token);
2671
+ else return expression;
2672
+ }
2673
+
2674
+ function binaryPrecedence(operator) {
2675
+ var charCode = operator.charCodeAt(0)
2676
+ , length = operator.length;
2677
+
2678
+ if (1 === length) {
2679
+ switch (charCode) {
2680
+ case 94: return 10; // ^
2681
+ case 42: case 47: case 37: return 7; // * / %
2682
+ case 43: case 45: return 6; // + -
2683
+ case 60: case 62: return 3; // < >
2684
+ }
2685
+ } else if (2 === length) {
2686
+ switch (charCode) {
2687
+ case 46: return 5; // ..
2688
+ case 60: case 62: case 61: case 126: return 3; // <= >= == ~=
2689
+ case 111: return 1; // or
2690
+ }
2691
+ } else if (97 === charCode && 'and' === operator) return 2;
2692
+ return 0;
2693
+ }
2694
+
2695
+ function parseSubExpression(minPrecedence) {
2696
+ var operator = token.value
2697
+ , expression, marker;
2698
+
2699
+ if (trackLocations) marker = createLocationMarker();
2700
+ if (isUnary(token)) {
2701
+ markLocation();
2702
+ next();
2703
+ var argument = parseSubExpression(8);
2704
+ if (argument == null) raiseUnexpectedToken('<expression>', token);
2705
+ expression = finishNode(ast.unaryExpression(operator, argument));
2706
+ }
2707
+ if (null == expression) {
2708
+ expression = parsePrimaryExpression();
2709
+ if (null == expression) {
2710
+ expression = parsePrefixExpression();
2711
+ }
2712
+ }
2713
+ if (null == expression) return null;
2714
+
2715
+ var precedence;
2716
+ while (true) {
2717
+ operator = token.value;
2718
+
2719
+ precedence = (Punctuator === token.type || Keyword === token.type) ?
2720
+ binaryPrecedence(operator) : 0;
2721
+
2722
+ if (precedence === 0 || precedence <= minPrecedence) break;
2723
+ if ('^' === operator || '..' === operator) precedence--;
2724
+ next();
2725
+ var right = parseSubExpression(precedence);
2726
+ if (null == right) raiseUnexpectedToken('<expression>', token);
2727
+ if (trackLocations) locations.push(marker);
2728
+ expression = finishNode(ast.binaryExpression(operator, expression, right));
2729
+
2730
+ }
2731
+ return expression;
2732
+ }
2733
+
2734
+ function parsePrefixExpression() {
2735
+ var base, name, marker
2736
+ , isLocal;
2737
+
2738
+ if (trackLocations) marker = createLocationMarker();
2739
+ if (Identifier === token.type) {
2740
+ name = token.value;
2741
+ base = parseIdentifier();
2742
+ if (options.scope) attachScope(base, isLocal = scopeHasName(name));
2743
+ } else if (consume('(')) {
2744
+ base = parseExpectedExpression();
2745
+ expect(')');
2746
+ if (options.scope) isLocal = base.isLocal;
2747
+ } else {
2748
+ return null;
2749
+ }
2750
+ var expression, identifier;
2751
+ while (true) {
2752
+ if (Punctuator === token.type) {
2753
+ switch (token.value) {
2754
+ case '[':
2755
+ pushLocation(marker);
2756
+ next();
2757
+ expression = parseExpectedExpression();
2758
+ base = finishNode(ast.indexExpression(base, expression));
2759
+ expect(']');
2760
+ break;
2761
+ case '.':
2762
+ pushLocation(marker);
2763
+ next();
2764
+ identifier = parseIdentifier();
2765
+ if (options.scope) attachScope(identifier, isLocal);
2766
+ base = finishNode(ast.memberExpression(base, '.', identifier));
2767
+ break;
2768
+ case ':':
2769
+ pushLocation(marker);
2770
+ next();
2771
+ identifier = parseIdentifier();
2772
+ if (options.scope) attachScope(identifier, isLocal);
2773
+ base = finishNode(ast.memberExpression(base, ':', identifier));
2774
+ pushLocation(marker);
2775
+ base = parseCallExpression(base);
2776
+ break;
2777
+ case '(': case '{': // args
2778
+ pushLocation(marker);
2779
+ base = parseCallExpression(base);
2780
+ break;
2781
+ default:
2782
+ return base;
2783
+ }
2784
+ } else if (StringLiteral === token.type) {
2785
+ pushLocation(marker);
2786
+ base = parseCallExpression(base);
2787
+ } else {
2788
+ break;
2789
+ }
2790
+ }
2791
+
2792
+ return base;
2793
+ }
2794
+
2795
+ function parseCallExpression(base) {
2796
+ if (Punctuator === token.type) {
2797
+ switch (token.value) {
2798
+ case '(':
2799
+ next();
2800
+ var expressions = [];
2801
+ var expression = parseExpression();
2802
+ if (null != expression) expressions.push(expression);
2803
+ while (consume(',')) {
2804
+ expression = parseExpectedExpression();
2805
+ expressions.push(expression);
2806
+ }
2807
+
2808
+ expect(')');
2809
+ return finishNode(ast.callExpression(base, expressions));
2810
+
2811
+ case '{':
2812
+ markLocation();
2813
+ next();
2814
+ var table = parseTableConstructor();
2815
+ return finishNode(ast.tableCallExpression(base, table));
2816
+ }
2817
+ } else if (StringLiteral === token.type) {
2818
+ return finishNode(ast.stringCallExpression(base, parsePrimaryExpression()));
2819
+ }
2820
+
2821
+ raiseUnexpectedToken('function arguments', token);
2822
+ }
2823
+
2824
+ function parsePrimaryExpression() {
2825
+ var literals = StringLiteral | NumericLiteral | BooleanLiteral | NilLiteral | VarargLiteral
2826
+ , value = token.value
2827
+ , type = token.type
2828
+ , marker;
2829
+
2830
+ if (trackLocations) marker = createLocationMarker();
2831
+
2832
+ if (type & literals) {
2833
+ pushLocation(marker);
2834
+ var raw = input.slice(token.range[0], token.range[1]);
2835
+ next();
2836
+ return finishNode(ast.literal(type, value, raw));
2837
+ } else if (Keyword === type && 'function' === value) {
2838
+ pushLocation(marker);
2839
+ next();
2840
+ return parseFunctionDeclaration(null);
2841
+ } else if (consume('{')) {
2842
+ pushLocation(marker);
2843
+ return parseTableConstructor();
2844
+ }
2845
+ }
2846
+
2847
+ exports.parse = parse;
2848
+
2849
+ function parse(_input, _options) {
2850
+ if ('undefined' === typeof _options && 'object' === typeof _input) {
2851
+ _options = _input;
2852
+ _input = undefined;
2853
+ }
2854
+ if (!_options) _options = {};
2855
+
2856
+ input = _input || '';
2857
+ options = extend(defaultOptions, _options);
2858
+ index = 0;
2859
+ line = 1;
2860
+ lineStart = 0;
2861
+ length = input.length;
2862
+ scopes = [[]];
2863
+ scopeDepth = 0;
2864
+ globals = [];
2865
+ locations = [];
2866
+
2867
+ if (options.comments) comments = [];
2868
+ if (!options.wait) return end();
2869
+ return exports;
2870
+ }
2871
+ exports.write = write;
2872
+
2873
+ function write(_input) {
2874
+ input += String(_input);
2875
+ length = input.length;
2876
+ return exports;
2877
+ }
2878
+ exports.end = end;
2879
+
2880
+ function end(_input) {
2881
+ if ('undefined' !== typeof _input) write(_input);
2882
+
2883
+ length = input.length;
2884
+ trackLocations = options.locations || options.ranges;
2885
+ lookahead = lex();
2886
+
2887
+ var chunk = parseChunk();
2888
+ if (options.comments) chunk.comments = comments;
2889
+ if (options.scope) chunk.globals = globals;
2890
+
2891
+ if (locations.length > 0)
2892
+ throw new Error('Location tracking failed. This is most likely a bug in luaparse');
2893
+
2894
+ return chunk;
2895
+ }
2896
+
2897
+ }));
2898
+
2899
+ });
2900
+
2901
+ ace.define("ace/mode/lua_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/lua/luaparse"], function(require, exports, module) {
2902
+ "use strict";
2903
+
2904
+ var oop = require("../lib/oop");
2905
+ var Mirror = require("../worker/mirror").Mirror;
2906
+ var luaparse = require("../mode/lua/luaparse");
2907
+
2908
+ var Worker = exports.Worker = function(sender) {
2909
+ Mirror.call(this, sender);
2910
+ this.setTimeout(500);
2911
+ };
2912
+
2913
+ oop.inherits(Worker, Mirror);
2914
+
2915
+ (function() {
2916
+
2917
+ this.onUpdate = function() {
2918
+ var value = this.doc.getValue();
2919
+ var errors = [];
2920
+ try {
2921
+ luaparse.parse(value);
2922
+ } catch(e) {
2923
+ if (e instanceof SyntaxError) {
2924
+ errors.push({
2925
+ row: e.line - 1,
2926
+ column: e.column,
2927
+ text: e.message,
2928
+ type: "error"
2929
+ });
2930
+ }
2931
+ }
2932
+ this.sender.emit("annotate", errors);
2933
+ };
2934
+
2935
+ }).call(Worker.prototype);
2936
+
2937
+ });
2938
+
2939
+ ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
2940
+
2941
+ function Empty() {}
2942
+
2943
+ if (!Function.prototype.bind) {
2944
+ Function.prototype.bind = function bind(that) { // .length is 1
2945
+ var target = this;
2946
+ if (typeof target != "function") {
2947
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
2948
+ }
2949
+ var args = slice.call(arguments, 1); // for normal call
2950
+ var bound = function () {
2951
+
2952
+ if (this instanceof bound) {
2953
+
2954
+ var result = target.apply(
2955
+ this,
2956
+ args.concat(slice.call(arguments))
2957
+ );
2958
+ if (Object(result) === result) {
2959
+ return result;
2960
+ }
2961
+ return this;
2962
+
2963
+ } else {
2964
+ return target.apply(
2965
+ that,
2966
+ args.concat(slice.call(arguments))
2967
+ );
2968
+
2969
+ }
2970
+
2971
+ };
2972
+ if(target.prototype) {
2973
+ Empty.prototype = target.prototype;
2974
+ bound.prototype = new Empty();
2975
+ Empty.prototype = null;
2976
+ }
2977
+ return bound;
2978
+ };
2979
+ }
2980
+ var call = Function.prototype.call;
2981
+ var prototypeOfArray = Array.prototype;
2982
+ var prototypeOfObject = Object.prototype;
2983
+ var slice = prototypeOfArray.slice;
2984
+ var _toString = call.bind(prototypeOfObject.toString);
2985
+ var owns = call.bind(prototypeOfObject.hasOwnProperty);
2986
+ var defineGetter;
2987
+ var defineSetter;
2988
+ var lookupGetter;
2989
+ var lookupSetter;
2990
+ var supportsAccessors;
2991
+ if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
2992
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
2993
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
2994
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
2995
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
2996
+ }
2997
+ if ([1,2].splice(0).length != 2) {
2998
+ if(function() { // test IE < 9 to splice bug - see issue #138
2999
+ function makeArray(l) {
3000
+ var a = new Array(l+2);
3001
+ a[0] = a[1] = 0;
3002
+ return a;
3003
+ }
3004
+ var array = [], lengthBefore;
3005
+
3006
+ array.splice.apply(array, makeArray(20));
3007
+ array.splice.apply(array, makeArray(26));
3008
+
3009
+ lengthBefore = array.length; //46
3010
+ array.splice(5, 0, "XXX"); // add one element
3011
+
3012
+ lengthBefore + 1 == array.length
3013
+
3014
+ if (lengthBefore + 1 == array.length) {
3015
+ return true;// has right splice implementation without bugs
3016
+ }
3017
+ }()) {//IE 6/7
3018
+ var array_splice = Array.prototype.splice;
3019
+ Array.prototype.splice = function(start, deleteCount) {
3020
+ if (!arguments.length) {
3021
+ return [];
3022
+ } else {
3023
+ return array_splice.apply(this, [
3024
+ start === void 0 ? 0 : start,
3025
+ deleteCount === void 0 ? (this.length - start) : deleteCount
3026
+ ].concat(slice.call(arguments, 2)))
3027
+ }
3028
+ };
3029
+ } else {//IE8
3030
+ Array.prototype.splice = function(pos, removeCount){
3031
+ var length = this.length;
3032
+ if (pos > 0) {
3033
+ if (pos > length)
3034
+ pos = length;
3035
+ } else if (pos == void 0) {
3036
+ pos = 0;
3037
+ } else if (pos < 0) {
3038
+ pos = Math.max(length + pos, 0);
3039
+ }
3040
+
3041
+ if (!(pos+removeCount < length))
3042
+ removeCount = length - pos;
3043
+
3044
+ var removed = this.slice(pos, pos+removeCount);
3045
+ var insert = slice.call(arguments, 2);
3046
+ var add = insert.length;
3047
+ if (pos === length) {
3048
+ if (add) {
3049
+ this.push.apply(this, insert);
3050
+ }
3051
+ } else {
3052
+ var remove = Math.min(removeCount, length - pos);
3053
+ var tailOldPos = pos + remove;
3054
+ var tailNewPos = tailOldPos + add - remove;
3055
+ var tailCount = length - tailOldPos;
3056
+ var lengthAfterRemove = length - remove;
3057
+
3058
+ if (tailNewPos < tailOldPos) { // case A
3059
+ for (var i = 0; i < tailCount; ++i) {
3060
+ this[tailNewPos+i] = this[tailOldPos+i];
3061
+ }
3062
+ } else if (tailNewPos > tailOldPos) { // case B
3063
+ for (i = tailCount; i--; ) {
3064
+ this[tailNewPos+i] = this[tailOldPos+i];
3065
+ }
3066
+ } // else, add == remove (nothing to do)
3067
+
3068
+ if (add && pos === lengthAfterRemove) {
3069
+ this.length = lengthAfterRemove; // truncate array
3070
+ this.push.apply(this, insert);
3071
+ } else {
3072
+ this.length = lengthAfterRemove + add; // reserves space
3073
+ for (i = 0; i < add; ++i) {
3074
+ this[pos+i] = insert[i];
3075
+ }
3076
+ }
3077
+ }
3078
+ return removed;
3079
+ };
3080
+ }
3081
+ }
3082
+ if (!Array.isArray) {
3083
+ Array.isArray = function isArray(obj) {
3084
+ return _toString(obj) == "[object Array]";
3085
+ };
3086
+ }
3087
+ var boxedString = Object("a"),
3088
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
3089
+
3090
+ if (!Array.prototype.forEach) {
3091
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
3092
+ var object = toObject(this),
3093
+ self = splitString && _toString(this) == "[object String]" ?
3094
+ this.split("") :
3095
+ object,
3096
+ thisp = arguments[1],
3097
+ i = -1,
3098
+ length = self.length >>> 0;
3099
+ if (_toString(fun) != "[object Function]") {
3100
+ throw new TypeError(); // TODO message
3101
+ }
3102
+
3103
+ while (++i < length) {
3104
+ if (i in self) {
3105
+ fun.call(thisp, self[i], i, object);
3106
+ }
3107
+ }
3108
+ };
3109
+ }
3110
+ if (!Array.prototype.map) {
3111
+ Array.prototype.map = function map(fun /*, thisp*/) {
3112
+ var object = toObject(this),
3113
+ self = splitString && _toString(this) == "[object String]" ?
3114
+ this.split("") :
3115
+ object,
3116
+ length = self.length >>> 0,
3117
+ result = Array(length),
3118
+ thisp = arguments[1];
3119
+ if (_toString(fun) != "[object Function]") {
3120
+ throw new TypeError(fun + " is not a function");
3121
+ }
3122
+
3123
+ for (var i = 0; i < length; i++) {
3124
+ if (i in self)
3125
+ result[i] = fun.call(thisp, self[i], i, object);
3126
+ }
3127
+ return result;
3128
+ };
3129
+ }
3130
+ if (!Array.prototype.filter) {
3131
+ Array.prototype.filter = function filter(fun /*, thisp */) {
3132
+ var object = toObject(this),
3133
+ self = splitString && _toString(this) == "[object String]" ?
3134
+ this.split("") :
3135
+ object,
3136
+ length = self.length >>> 0,
3137
+ result = [],
3138
+ value,
3139
+ thisp = arguments[1];
3140
+ if (_toString(fun) != "[object Function]") {
3141
+ throw new TypeError(fun + " is not a function");
3142
+ }
3143
+
3144
+ for (var i = 0; i < length; i++) {
3145
+ if (i in self) {
3146
+ value = self[i];
3147
+ if (fun.call(thisp, value, i, object)) {
3148
+ result.push(value);
3149
+ }
3150
+ }
3151
+ }
3152
+ return result;
3153
+ };
3154
+ }
3155
+ if (!Array.prototype.every) {
3156
+ Array.prototype.every = function every(fun /*, thisp */) {
3157
+ var object = toObject(this),
3158
+ self = splitString && _toString(this) == "[object String]" ?
3159
+ this.split("") :
3160
+ object,
3161
+ length = self.length >>> 0,
3162
+ thisp = arguments[1];
3163
+ if (_toString(fun) != "[object Function]") {
3164
+ throw new TypeError(fun + " is not a function");
3165
+ }
3166
+
3167
+ for (var i = 0; i < length; i++) {
3168
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
3169
+ return false;
3170
+ }
3171
+ }
3172
+ return true;
3173
+ };
3174
+ }
3175
+ if (!Array.prototype.some) {
3176
+ Array.prototype.some = function some(fun /*, thisp */) {
3177
+ var object = toObject(this),
3178
+ self = splitString && _toString(this) == "[object String]" ?
3179
+ this.split("") :
3180
+ object,
3181
+ length = self.length >>> 0,
3182
+ thisp = arguments[1];
3183
+ if (_toString(fun) != "[object Function]") {
3184
+ throw new TypeError(fun + " is not a function");
3185
+ }
3186
+
3187
+ for (var i = 0; i < length; i++) {
3188
+ if (i in self && fun.call(thisp, self[i], i, object)) {
3189
+ return true;
3190
+ }
3191
+ }
3192
+ return false;
3193
+ };
3194
+ }
3195
+ if (!Array.prototype.reduce) {
3196
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
3197
+ var object = toObject(this),
3198
+ self = splitString && _toString(this) == "[object String]" ?
3199
+ this.split("") :
3200
+ object,
3201
+ length = self.length >>> 0;
3202
+ if (_toString(fun) != "[object Function]") {
3203
+ throw new TypeError(fun + " is not a function");
3204
+ }
3205
+ if (!length && arguments.length == 1) {
3206
+ throw new TypeError("reduce of empty array with no initial value");
3207
+ }
3208
+
3209
+ var i = 0;
3210
+ var result;
3211
+ if (arguments.length >= 2) {
3212
+ result = arguments[1];
3213
+ } else {
3214
+ do {
3215
+ if (i in self) {
3216
+ result = self[i++];
3217
+ break;
3218
+ }
3219
+ if (++i >= length) {
3220
+ throw new TypeError("reduce of empty array with no initial value");
3221
+ }
3222
+ } while (true);
3223
+ }
3224
+
3225
+ for (; i < length; i++) {
3226
+ if (i in self) {
3227
+ result = fun.call(void 0, result, self[i], i, object);
3228
+ }
3229
+ }
3230
+
3231
+ return result;
3232
+ };
3233
+ }
3234
+ if (!Array.prototype.reduceRight) {
3235
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
3236
+ var object = toObject(this),
3237
+ self = splitString && _toString(this) == "[object String]" ?
3238
+ this.split("") :
3239
+ object,
3240
+ length = self.length >>> 0;
3241
+ if (_toString(fun) != "[object Function]") {
3242
+ throw new TypeError(fun + " is not a function");
3243
+ }
3244
+ if (!length && arguments.length == 1) {
3245
+ throw new TypeError("reduceRight of empty array with no initial value");
3246
+ }
3247
+
3248
+ var result, i = length - 1;
3249
+ if (arguments.length >= 2) {
3250
+ result = arguments[1];
3251
+ } else {
3252
+ do {
3253
+ if (i in self) {
3254
+ result = self[i--];
3255
+ break;
3256
+ }
3257
+ if (--i < 0) {
3258
+ throw new TypeError("reduceRight of empty array with no initial value");
3259
+ }
3260
+ } while (true);
3261
+ }
3262
+
3263
+ do {
3264
+ if (i in this) {
3265
+ result = fun.call(void 0, result, self[i], i, object);
3266
+ }
3267
+ } while (i--);
3268
+
3269
+ return result;
3270
+ };
3271
+ }
3272
+ if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
3273
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
3274
+ var self = splitString && _toString(this) == "[object String]" ?
3275
+ this.split("") :
3276
+ toObject(this),
3277
+ length = self.length >>> 0;
3278
+
3279
+ if (!length) {
3280
+ return -1;
3281
+ }
3282
+
3283
+ var i = 0;
3284
+ if (arguments.length > 1) {
3285
+ i = toInteger(arguments[1]);
3286
+ }
3287
+ i = i >= 0 ? i : Math.max(0, length + i);
3288
+ for (; i < length; i++) {
3289
+ if (i in self && self[i] === sought) {
3290
+ return i;
3291
+ }
3292
+ }
3293
+ return -1;
3294
+ };
3295
+ }
3296
+ if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
3297
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
3298
+ var self = splitString && _toString(this) == "[object String]" ?
3299
+ this.split("") :
3300
+ toObject(this),
3301
+ length = self.length >>> 0;
3302
+
3303
+ if (!length) {
3304
+ return -1;
3305
+ }
3306
+ var i = length - 1;
3307
+ if (arguments.length > 1) {
3308
+ i = Math.min(i, toInteger(arguments[1]));
3309
+ }
3310
+ i = i >= 0 ? i : length - Math.abs(i);
3311
+ for (; i >= 0; i--) {
3312
+ if (i in self && sought === self[i]) {
3313
+ return i;
3314
+ }
3315
+ }
3316
+ return -1;
3317
+ };
3318
+ }
3319
+ if (!Object.getPrototypeOf) {
3320
+ Object.getPrototypeOf = function getPrototypeOf(object) {
3321
+ return object.__proto__ || (
3322
+ object.constructor ?
3323
+ object.constructor.prototype :
3324
+ prototypeOfObject
3325
+ );
3326
+ };
3327
+ }
3328
+ if (!Object.getOwnPropertyDescriptor) {
3329
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
3330
+ "non-object: ";
3331
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
3332
+ if ((typeof object != "object" && typeof object != "function") || object === null)
3333
+ throw new TypeError(ERR_NON_OBJECT + object);
3334
+ if (!owns(object, property))
3335
+ return;
3336
+
3337
+ var descriptor, getter, setter;
3338
+ descriptor = { enumerable: true, configurable: true };
3339
+ if (supportsAccessors) {
3340
+ var prototype = object.__proto__;
3341
+ object.__proto__ = prototypeOfObject;
3342
+
3343
+ var getter = lookupGetter(object, property);
3344
+ var setter = lookupSetter(object, property);
3345
+ object.__proto__ = prototype;
3346
+
3347
+ if (getter || setter) {
3348
+ if (getter) descriptor.get = getter;
3349
+ if (setter) descriptor.set = setter;
3350
+ return descriptor;
3351
+ }
3352
+ }
3353
+ descriptor.value = object[property];
3354
+ return descriptor;
3355
+ };
3356
+ }
3357
+ if (!Object.getOwnPropertyNames) {
3358
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
3359
+ return Object.keys(object);
3360
+ };
3361
+ }
3362
+ if (!Object.create) {
3363
+ var createEmpty;
3364
+ if (Object.prototype.__proto__ === null) {
3365
+ createEmpty = function () {
3366
+ return { "__proto__": null };
3367
+ };
3368
+ } else {
3369
+ createEmpty = function () {
3370
+ var empty = {};
3371
+ for (var i in empty)
3372
+ empty[i] = null;
3373
+ empty.constructor =
3374
+ empty.hasOwnProperty =
3375
+ empty.propertyIsEnumerable =
3376
+ empty.isPrototypeOf =
3377
+ empty.toLocaleString =
3378
+ empty.toString =
3379
+ empty.valueOf =
3380
+ empty.__proto__ = null;
3381
+ return empty;
3382
+ }
3383
+ }
3384
+
3385
+ Object.create = function create(prototype, properties) {
3386
+ var object;
3387
+ if (prototype === null) {
3388
+ object = createEmpty();
3389
+ } else {
3390
+ if (typeof prototype != "object")
3391
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
3392
+ var Type = function () {};
3393
+ Type.prototype = prototype;
3394
+ object = new Type();
3395
+ object.__proto__ = prototype;
3396
+ }
3397
+ if (properties !== void 0)
3398
+ Object.defineProperties(object, properties);
3399
+ return object;
3400
+ };
3401
+ }
3402
+
3403
+ function doesDefinePropertyWork(object) {
3404
+ try {
3405
+ Object.defineProperty(object, "sentinel", {});
3406
+ return "sentinel" in object;
3407
+ } catch (exception) {
3408
+ }
3409
+ }
3410
+ if (Object.defineProperty) {
3411
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
3412
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
3413
+ doesDefinePropertyWork(document.createElement("div"));
3414
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
3415
+ var definePropertyFallback = Object.defineProperty;
3416
+ }
3417
+ }
3418
+
3419
+ if (!Object.defineProperty || definePropertyFallback) {
3420
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
3421
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
3422
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
3423
+ "on this javascript engine";
3424
+
3425
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
3426
+ if ((typeof object != "object" && typeof object != "function") || object === null)
3427
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
3428
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
3429
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
3430
+ if (definePropertyFallback) {
3431
+ try {
3432
+ return definePropertyFallback.call(Object, object, property, descriptor);
3433
+ } catch (exception) {
3434
+ }
3435
+ }
3436
+ if (owns(descriptor, "value")) {
3437
+
3438
+ if (supportsAccessors && (lookupGetter(object, property) ||
3439
+ lookupSetter(object, property)))
3440
+ {
3441
+ var prototype = object.__proto__;
3442
+ object.__proto__ = prototypeOfObject;
3443
+ delete object[property];
3444
+ object[property] = descriptor.value;
3445
+ object.__proto__ = prototype;
3446
+ } else {
3447
+ object[property] = descriptor.value;
3448
+ }
3449
+ } else {
3450
+ if (!supportsAccessors)
3451
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
3452
+ if (owns(descriptor, "get"))
3453
+ defineGetter(object, property, descriptor.get);
3454
+ if (owns(descriptor, "set"))
3455
+ defineSetter(object, property, descriptor.set);
3456
+ }
3457
+
3458
+ return object;
3459
+ };
3460
+ }
3461
+ if (!Object.defineProperties) {
3462
+ Object.defineProperties = function defineProperties(object, properties) {
3463
+ for (var property in properties) {
3464
+ if (owns(properties, property))
3465
+ Object.defineProperty(object, property, properties[property]);
3466
+ }
3467
+ return object;
3468
+ };
3469
+ }
3470
+ if (!Object.seal) {
3471
+ Object.seal = function seal(object) {
3472
+ return object;
3473
+ };
3474
+ }
3475
+ if (!Object.freeze) {
3476
+ Object.freeze = function freeze(object) {
3477
+ return object;
3478
+ };
3479
+ }
3480
+ try {
3481
+ Object.freeze(function () {});
3482
+ } catch (exception) {
3483
+ Object.freeze = (function freeze(freezeObject) {
3484
+ return function freeze(object) {
3485
+ if (typeof object == "function") {
3486
+ return object;
3487
+ } else {
3488
+ return freezeObject(object);
3489
+ }
3490
+ };
3491
+ })(Object.freeze);
3492
+ }
3493
+ if (!Object.preventExtensions) {
3494
+ Object.preventExtensions = function preventExtensions(object) {
3495
+ return object;
3496
+ };
3497
+ }
3498
+ if (!Object.isSealed) {
3499
+ Object.isSealed = function isSealed(object) {
3500
+ return false;
3501
+ };
3502
+ }
3503
+ if (!Object.isFrozen) {
3504
+ Object.isFrozen = function isFrozen(object) {
3505
+ return false;
3506
+ };
3507
+ }
3508
+ if (!Object.isExtensible) {
3509
+ Object.isExtensible = function isExtensible(object) {
3510
+ if (Object(object) === object) {
3511
+ throw new TypeError(); // TODO message
3512
+ }
3513
+ var name = '';
3514
+ while (owns(object, name)) {
3515
+ name += '?';
3516
+ }
3517
+ object[name] = true;
3518
+ var returnValue = owns(object, name);
3519
+ delete object[name];
3520
+ return returnValue;
3521
+ };
3522
+ }
3523
+ if (!Object.keys) {
3524
+ var hasDontEnumBug = true,
3525
+ dontEnums = [
3526
+ "toString",
3527
+ "toLocaleString",
3528
+ "valueOf",
3529
+ "hasOwnProperty",
3530
+ "isPrototypeOf",
3531
+ "propertyIsEnumerable",
3532
+ "constructor"
3533
+ ],
3534
+ dontEnumsLength = dontEnums.length;
3535
+
3536
+ for (var key in {"toString": null}) {
3537
+ hasDontEnumBug = false;
3538
+ }
3539
+
3540
+ Object.keys = function keys(object) {
3541
+
3542
+ if (
3543
+ (typeof object != "object" && typeof object != "function") ||
3544
+ object === null
3545
+ ) {
3546
+ throw new TypeError("Object.keys called on a non-object");
3547
+ }
3548
+
3549
+ var keys = [];
3550
+ for (var name in object) {
3551
+ if (owns(object, name)) {
3552
+ keys.push(name);
3553
+ }
3554
+ }
3555
+
3556
+ if (hasDontEnumBug) {
3557
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
3558
+ var dontEnum = dontEnums[i];
3559
+ if (owns(object, dontEnum)) {
3560
+ keys.push(dontEnum);
3561
+ }
3562
+ }
3563
+ }
3564
+ return keys;
3565
+ };
3566
+
3567
+ }
3568
+ if (!Date.now) {
3569
+ Date.now = function now() {
3570
+ return new Date().getTime();
3571
+ };
3572
+ }
3573
+ var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
3574
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
3575
+ "\u2029\uFEFF";
3576
+ if (!String.prototype.trim || ws.trim()) {
3577
+ ws = "[" + ws + "]";
3578
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
3579
+ trimEndRegexp = new RegExp(ws + ws + "*$");
3580
+ String.prototype.trim = function trim() {
3581
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
3582
+ };
3583
+ }
3584
+
3585
+ function toInteger(n) {
3586
+ n = +n;
3587
+ if (n !== n) { // isNaN
3588
+ n = 0;
3589
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
3590
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
3591
+ }
3592
+ return n;
3593
+ }
3594
+
3595
+ function isPrimitive(input) {
3596
+ var type = typeof input;
3597
+ return (
3598
+ input === null ||
3599
+ type === "undefined" ||
3600
+ type === "boolean" ||
3601
+ type === "number" ||
3602
+ type === "string"
3603
+ );
3604
+ }
3605
+
3606
+ function toPrimitive(input) {
3607
+ var val, valueOf, toString;
3608
+ if (isPrimitive(input)) {
3609
+ return input;
3610
+ }
3611
+ valueOf = input.valueOf;
3612
+ if (typeof valueOf === "function") {
3613
+ val = valueOf.call(input);
3614
+ if (isPrimitive(val)) {
3615
+ return val;
3616
+ }
3617
+ }
3618
+ toString = input.toString;
3619
+ if (typeof toString === "function") {
3620
+ val = toString.call(input);
3621
+ if (isPrimitive(val)) {
3622
+ return val;
3623
+ }
3624
+ }
3625
+ throw new TypeError();
3626
+ }
3627
+ var toObject = function (o) {
3628
+ if (o == null) { // this matches both null and undefined
3629
+ throw new TypeError("can't convert "+o+" to object");
3630
+ }
3631
+ return Object(o);
3632
+ };
3633
+
3634
+ });