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,3889 @@
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/lib/lang",["require","exports","module"], function(require, exports, module) {
249
+ "use strict";
250
+
251
+ exports.last = function(a) {
252
+ return a[a.length - 1];
253
+ };
254
+
255
+ exports.stringReverse = function(string) {
256
+ return string.split("").reverse().join("");
257
+ };
258
+
259
+ exports.stringRepeat = function (string, count) {
260
+ var result = '';
261
+ while (count > 0) {
262
+ if (count & 1)
263
+ result += string;
264
+
265
+ if (count >>= 1)
266
+ string += string;
267
+ }
268
+ return result;
269
+ };
270
+
271
+ var trimBeginRegexp = /^\s\s*/;
272
+ var trimEndRegexp = /\s\s*$/;
273
+
274
+ exports.stringTrimLeft = function (string) {
275
+ return string.replace(trimBeginRegexp, '');
276
+ };
277
+
278
+ exports.stringTrimRight = function (string) {
279
+ return string.replace(trimEndRegexp, '');
280
+ };
281
+
282
+ exports.copyObject = function(obj) {
283
+ var copy = {};
284
+ for (var key in obj) {
285
+ copy[key] = obj[key];
286
+ }
287
+ return copy;
288
+ };
289
+
290
+ exports.copyArray = function(array){
291
+ var copy = [];
292
+ for (var i=0, l=array.length; i<l; i++) {
293
+ if (array[i] && typeof array[i] == "object")
294
+ copy[i] = this.copyObject( array[i] );
295
+ else
296
+ copy[i] = array[i];
297
+ }
298
+ return copy;
299
+ };
300
+
301
+ exports.deepCopy = function deepCopy(obj) {
302
+ if (typeof obj !== "object" || !obj)
303
+ return obj;
304
+ var copy;
305
+ if (Array.isArray(obj)) {
306
+ copy = [];
307
+ for (var key = 0; key < obj.length; key++) {
308
+ copy[key] = deepCopy(obj[key]);
309
+ }
310
+ return copy;
311
+ }
312
+ var cons = obj.constructor;
313
+ if (cons === RegExp)
314
+ return obj;
315
+
316
+ copy = cons();
317
+ for (var key in obj) {
318
+ copy[key] = deepCopy(obj[key]);
319
+ }
320
+ return copy;
321
+ };
322
+
323
+ exports.arrayToMap = function(arr) {
324
+ var map = {};
325
+ for (var i=0; i<arr.length; i++) {
326
+ map[arr[i]] = 1;
327
+ }
328
+ return map;
329
+
330
+ };
331
+
332
+ exports.createMap = function(props) {
333
+ var map = Object.create(null);
334
+ for (var i in props) {
335
+ map[i] = props[i];
336
+ }
337
+ return map;
338
+ };
339
+ exports.arrayRemove = function(array, value) {
340
+ for (var i = 0; i <= array.length; i++) {
341
+ if (value === array[i]) {
342
+ array.splice(i, 1);
343
+ }
344
+ }
345
+ };
346
+
347
+ exports.escapeRegExp = function(str) {
348
+ return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
349
+ };
350
+
351
+ exports.escapeHTML = function(str) {
352
+ return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
353
+ };
354
+
355
+ exports.getMatchOffsets = function(string, regExp) {
356
+ var matches = [];
357
+
358
+ string.replace(regExp, function(str) {
359
+ matches.push({
360
+ offset: arguments[arguments.length-2],
361
+ length: str.length
362
+ });
363
+ });
364
+
365
+ return matches;
366
+ };
367
+ exports.deferredCall = function(fcn) {
368
+ var timer = null;
369
+ var callback = function() {
370
+ timer = null;
371
+ fcn();
372
+ };
373
+
374
+ var deferred = function(timeout) {
375
+ deferred.cancel();
376
+ timer = setTimeout(callback, timeout || 0);
377
+ return deferred;
378
+ };
379
+
380
+ deferred.schedule = deferred;
381
+
382
+ deferred.call = function() {
383
+ this.cancel();
384
+ fcn();
385
+ return deferred;
386
+ };
387
+
388
+ deferred.cancel = function() {
389
+ clearTimeout(timer);
390
+ timer = null;
391
+ return deferred;
392
+ };
393
+
394
+ deferred.isPending = function() {
395
+ return timer;
396
+ };
397
+
398
+ return deferred;
399
+ };
400
+
401
+
402
+ exports.delayedCall = function(fcn, defaultTimeout) {
403
+ var timer = null;
404
+ var callback = function() {
405
+ timer = null;
406
+ fcn();
407
+ };
408
+
409
+ var _self = function(timeout) {
410
+ if (timer == null)
411
+ timer = setTimeout(callback, timeout || defaultTimeout);
412
+ };
413
+
414
+ _self.delay = function(timeout) {
415
+ timer && clearTimeout(timer);
416
+ timer = setTimeout(callback, timeout || defaultTimeout);
417
+ };
418
+ _self.schedule = _self;
419
+
420
+ _self.call = function() {
421
+ this.cancel();
422
+ fcn();
423
+ };
424
+
425
+ _self.cancel = function() {
426
+ timer && clearTimeout(timer);
427
+ timer = null;
428
+ };
429
+
430
+ _self.isPending = function() {
431
+ return timer;
432
+ };
433
+
434
+ return _self;
435
+ };
436
+ });
437
+
438
+ ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
439
+ "use strict";
440
+ var comparePoints = function(p1, p2) {
441
+ return p1.row - p2.row || p1.column - p2.column;
442
+ };
443
+ var Range = function(startRow, startColumn, endRow, endColumn) {
444
+ this.start = {
445
+ row: startRow,
446
+ column: startColumn
447
+ };
448
+
449
+ this.end = {
450
+ row: endRow,
451
+ column: endColumn
452
+ };
453
+ };
454
+
455
+ (function() {
456
+ this.isEqual = function(range) {
457
+ return this.start.row === range.start.row &&
458
+ this.end.row === range.end.row &&
459
+ this.start.column === range.start.column &&
460
+ this.end.column === range.end.column;
461
+ };
462
+ this.toString = function() {
463
+ return ("Range: [" + this.start.row + "/" + this.start.column +
464
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
465
+ };
466
+
467
+ this.contains = function(row, column) {
468
+ return this.compare(row, column) == 0;
469
+ };
470
+ this.compareRange = function(range) {
471
+ var cmp,
472
+ end = range.end,
473
+ start = range.start;
474
+
475
+ cmp = this.compare(end.row, end.column);
476
+ if (cmp == 1) {
477
+ cmp = this.compare(start.row, start.column);
478
+ if (cmp == 1) {
479
+ return 2;
480
+ } else if (cmp == 0) {
481
+ return 1;
482
+ } else {
483
+ return 0;
484
+ }
485
+ } else if (cmp == -1) {
486
+ return -2;
487
+ } else {
488
+ cmp = this.compare(start.row, start.column);
489
+ if (cmp == -1) {
490
+ return -1;
491
+ } else if (cmp == 1) {
492
+ return 42;
493
+ } else {
494
+ return 0;
495
+ }
496
+ }
497
+ };
498
+ this.comparePoint = function(p) {
499
+ return this.compare(p.row, p.column);
500
+ };
501
+ this.containsRange = function(range) {
502
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
503
+ };
504
+ this.intersects = function(range) {
505
+ var cmp = this.compareRange(range);
506
+ return (cmp == -1 || cmp == 0 || cmp == 1);
507
+ };
508
+ this.isEnd = function(row, column) {
509
+ return this.end.row == row && this.end.column == column;
510
+ };
511
+ this.isStart = function(row, column) {
512
+ return this.start.row == row && this.start.column == column;
513
+ };
514
+ this.setStart = function(row, column) {
515
+ if (typeof row == "object") {
516
+ this.start.column = row.column;
517
+ this.start.row = row.row;
518
+ } else {
519
+ this.start.row = row;
520
+ this.start.column = column;
521
+ }
522
+ };
523
+ this.setEnd = function(row, column) {
524
+ if (typeof row == "object") {
525
+ this.end.column = row.column;
526
+ this.end.row = row.row;
527
+ } else {
528
+ this.end.row = row;
529
+ this.end.column = column;
530
+ }
531
+ };
532
+ this.inside = function(row, column) {
533
+ if (this.compare(row, column) == 0) {
534
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
535
+ return false;
536
+ } else {
537
+ return true;
538
+ }
539
+ }
540
+ return false;
541
+ };
542
+ this.insideStart = function(row, column) {
543
+ if (this.compare(row, column) == 0) {
544
+ if (this.isEnd(row, column)) {
545
+ return false;
546
+ } else {
547
+ return true;
548
+ }
549
+ }
550
+ return false;
551
+ };
552
+ this.insideEnd = function(row, column) {
553
+ if (this.compare(row, column) == 0) {
554
+ if (this.isStart(row, column)) {
555
+ return false;
556
+ } else {
557
+ return true;
558
+ }
559
+ }
560
+ return false;
561
+ };
562
+ this.compare = function(row, column) {
563
+ if (!this.isMultiLine()) {
564
+ if (row === this.start.row) {
565
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
566
+ }
567
+ }
568
+
569
+ if (row < this.start.row)
570
+ return -1;
571
+
572
+ if (row > this.end.row)
573
+ return 1;
574
+
575
+ if (this.start.row === row)
576
+ return column >= this.start.column ? 0 : -1;
577
+
578
+ if (this.end.row === row)
579
+ return column <= this.end.column ? 0 : 1;
580
+
581
+ return 0;
582
+ };
583
+ this.compareStart = function(row, column) {
584
+ if (this.start.row == row && this.start.column == column) {
585
+ return -1;
586
+ } else {
587
+ return this.compare(row, column);
588
+ }
589
+ };
590
+ this.compareEnd = function(row, column) {
591
+ if (this.end.row == row && this.end.column == column) {
592
+ return 1;
593
+ } else {
594
+ return this.compare(row, column);
595
+ }
596
+ };
597
+ this.compareInside = function(row, column) {
598
+ if (this.end.row == row && this.end.column == column) {
599
+ return 1;
600
+ } else if (this.start.row == row && this.start.column == column) {
601
+ return -1;
602
+ } else {
603
+ return this.compare(row, column);
604
+ }
605
+ };
606
+ this.clipRows = function(firstRow, lastRow) {
607
+ if (this.end.row > lastRow)
608
+ var end = {row: lastRow + 1, column: 0};
609
+ else if (this.end.row < firstRow)
610
+ var end = {row: firstRow, column: 0};
611
+
612
+ if (this.start.row > lastRow)
613
+ var start = {row: lastRow + 1, column: 0};
614
+ else if (this.start.row < firstRow)
615
+ var start = {row: firstRow, column: 0};
616
+
617
+ return Range.fromPoints(start || this.start, end || this.end);
618
+ };
619
+ this.extend = function(row, column) {
620
+ var cmp = this.compare(row, column);
621
+
622
+ if (cmp == 0)
623
+ return this;
624
+ else if (cmp == -1)
625
+ var start = {row: row, column: column};
626
+ else
627
+ var end = {row: row, column: column};
628
+
629
+ return Range.fromPoints(start || this.start, end || this.end);
630
+ };
631
+
632
+ this.isEmpty = function() {
633
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
634
+ };
635
+ this.isMultiLine = function() {
636
+ return (this.start.row !== this.end.row);
637
+ };
638
+ this.clone = function() {
639
+ return Range.fromPoints(this.start, this.end);
640
+ };
641
+ this.collapseRows = function() {
642
+ if (this.end.column == 0)
643
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
644
+ else
645
+ return new Range(this.start.row, 0, this.end.row, 0)
646
+ };
647
+ this.toScreenRange = function(session) {
648
+ var screenPosStart = session.documentToScreenPosition(this.start);
649
+ var screenPosEnd = session.documentToScreenPosition(this.end);
650
+
651
+ return new Range(
652
+ screenPosStart.row, screenPosStart.column,
653
+ screenPosEnd.row, screenPosEnd.column
654
+ );
655
+ };
656
+ this.moveBy = function(row, column) {
657
+ this.start.row += row;
658
+ this.start.column += column;
659
+ this.end.row += row;
660
+ this.end.column += column;
661
+ };
662
+
663
+ }).call(Range.prototype);
664
+ Range.fromPoints = function(start, end) {
665
+ return new Range(start.row, start.column, end.row, end.column);
666
+ };
667
+ Range.comparePoints = comparePoints;
668
+
669
+ Range.comparePoints = function(p1, p2) {
670
+ return p1.row - p2.row || p1.column - p2.column;
671
+ };
672
+
673
+
674
+ exports.Range = Range;
675
+ });
676
+
677
+ ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
678
+ "use strict";
679
+
680
+ function throwDeltaError(delta, errorText){
681
+ console.log("Invalid Delta:", delta);
682
+ throw "Invalid Delta: " + errorText;
683
+ }
684
+
685
+ function positionInDocument(docLines, position) {
686
+ return position.row >= 0 && position.row < docLines.length &&
687
+ position.column >= 0 && position.column <= docLines[position.row].length;
688
+ }
689
+
690
+ function validateDelta(docLines, delta) {
691
+ if (delta.action != "insert" && delta.action != "remove")
692
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
693
+ if (!(delta.lines instanceof Array))
694
+ throwDeltaError(delta, "delta.lines must be an Array");
695
+ if (!delta.start || !delta.end)
696
+ throwDeltaError(delta, "delta.start/end must be an present");
697
+ var start = delta.start;
698
+ if (!positionInDocument(docLines, delta.start))
699
+ throwDeltaError(delta, "delta.start must be contained in document");
700
+ var end = delta.end;
701
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
702
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
703
+ var numRangeRows = end.row - start.row;
704
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
705
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
706
+ throwDeltaError(delta, "delta.range must match delta lines");
707
+ }
708
+
709
+ exports.applyDelta = function(docLines, delta, doNotValidate) {
710
+
711
+ var row = delta.start.row;
712
+ var startColumn = delta.start.column;
713
+ var line = docLines[row] || "";
714
+ switch (delta.action) {
715
+ case "insert":
716
+ var lines = delta.lines;
717
+ if (lines.length === 1) {
718
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
719
+ } else {
720
+ var args = [row, 1].concat(delta.lines);
721
+ docLines.splice.apply(docLines, args);
722
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
723
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
724
+ }
725
+ break;
726
+ case "remove":
727
+ var endColumn = delta.end.column;
728
+ var endRow = delta.end.row;
729
+ if (row === endRow) {
730
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
731
+ } else {
732
+ docLines.splice(
733
+ row, endRow - row + 1,
734
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
735
+ );
736
+ }
737
+ break;
738
+ }
739
+ }
740
+ });
741
+
742
+ ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
743
+ "use strict";
744
+
745
+ var EventEmitter = {};
746
+ var stopPropagation = function() { this.propagationStopped = true; };
747
+ var preventDefault = function() { this.defaultPrevented = true; };
748
+
749
+ EventEmitter._emit =
750
+ EventEmitter._dispatchEvent = function(eventName, e) {
751
+ this._eventRegistry || (this._eventRegistry = {});
752
+ this._defaultHandlers || (this._defaultHandlers = {});
753
+
754
+ var listeners = this._eventRegistry[eventName] || [];
755
+ var defaultHandler = this._defaultHandlers[eventName];
756
+ if (!listeners.length && !defaultHandler)
757
+ return;
758
+
759
+ if (typeof e != "object" || !e)
760
+ e = {};
761
+
762
+ if (!e.type)
763
+ e.type = eventName;
764
+ if (!e.stopPropagation)
765
+ e.stopPropagation = stopPropagation;
766
+ if (!e.preventDefault)
767
+ e.preventDefault = preventDefault;
768
+
769
+ listeners = listeners.slice();
770
+ for (var i=0; i<listeners.length; i++) {
771
+ listeners[i](e, this);
772
+ if (e.propagationStopped)
773
+ break;
774
+ }
775
+
776
+ if (defaultHandler && !e.defaultPrevented)
777
+ return defaultHandler(e, this);
778
+ };
779
+
780
+
781
+ EventEmitter._signal = function(eventName, e) {
782
+ var listeners = (this._eventRegistry || {})[eventName];
783
+ if (!listeners)
784
+ return;
785
+ listeners = listeners.slice();
786
+ for (var i=0; i<listeners.length; i++)
787
+ listeners[i](e, this);
788
+ };
789
+
790
+ EventEmitter.once = function(eventName, callback) {
791
+ var _self = this;
792
+ callback && this.addEventListener(eventName, function newCallback() {
793
+ _self.removeEventListener(eventName, newCallback);
794
+ callback.apply(null, arguments);
795
+ });
796
+ };
797
+
798
+
799
+ EventEmitter.setDefaultHandler = function(eventName, callback) {
800
+ var handlers = this._defaultHandlers
801
+ if (!handlers)
802
+ handlers = this._defaultHandlers = {_disabled_: {}};
803
+
804
+ if (handlers[eventName]) {
805
+ var old = handlers[eventName];
806
+ var disabled = handlers._disabled_[eventName];
807
+ if (!disabled)
808
+ handlers._disabled_[eventName] = disabled = [];
809
+ disabled.push(old);
810
+ var i = disabled.indexOf(callback);
811
+ if (i != -1)
812
+ disabled.splice(i, 1);
813
+ }
814
+ handlers[eventName] = callback;
815
+ };
816
+ EventEmitter.removeDefaultHandler = function(eventName, callback) {
817
+ var handlers = this._defaultHandlers
818
+ if (!handlers)
819
+ return;
820
+ var disabled = handlers._disabled_[eventName];
821
+
822
+ if (handlers[eventName] == callback) {
823
+ var old = handlers[eventName];
824
+ if (disabled)
825
+ this.setDefaultHandler(eventName, disabled.pop());
826
+ } else if (disabled) {
827
+ var i = disabled.indexOf(callback);
828
+ if (i != -1)
829
+ disabled.splice(i, 1);
830
+ }
831
+ };
832
+
833
+ EventEmitter.on =
834
+ EventEmitter.addEventListener = function(eventName, callback, capturing) {
835
+ this._eventRegistry = this._eventRegistry || {};
836
+
837
+ var listeners = this._eventRegistry[eventName];
838
+ if (!listeners)
839
+ listeners = this._eventRegistry[eventName] = [];
840
+
841
+ if (listeners.indexOf(callback) == -1)
842
+ listeners[capturing ? "unshift" : "push"](callback);
843
+ return callback;
844
+ };
845
+
846
+ EventEmitter.off =
847
+ EventEmitter.removeListener =
848
+ EventEmitter.removeEventListener = function(eventName, callback) {
849
+ this._eventRegistry = this._eventRegistry || {};
850
+
851
+ var listeners = this._eventRegistry[eventName];
852
+ if (!listeners)
853
+ return;
854
+
855
+ var index = listeners.indexOf(callback);
856
+ if (index !== -1)
857
+ listeners.splice(index, 1);
858
+ };
859
+
860
+ EventEmitter.removeAllListeners = function(eventName) {
861
+ if (this._eventRegistry) this._eventRegistry[eventName] = [];
862
+ };
863
+
864
+ exports.EventEmitter = EventEmitter;
865
+
866
+ });
867
+
868
+ ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
869
+ "use strict";
870
+
871
+ var oop = require("./lib/oop");
872
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
873
+
874
+ var Anchor = exports.Anchor = function(doc, row, column) {
875
+ this.$onChange = this.onChange.bind(this);
876
+ this.attach(doc);
877
+
878
+ if (typeof column == "undefined")
879
+ this.setPosition(row.row, row.column);
880
+ else
881
+ this.setPosition(row, column);
882
+ };
883
+
884
+ (function() {
885
+
886
+ oop.implement(this, EventEmitter);
887
+ this.getPosition = function() {
888
+ return this.$clipPositionToDocument(this.row, this.column);
889
+ };
890
+ this.getDocument = function() {
891
+ return this.document;
892
+ };
893
+ this.$insertRight = false;
894
+ this.onChange = function(delta) {
895
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
896
+ return;
897
+
898
+ if (delta.start.row > this.row)
899
+ return;
900
+
901
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
902
+ this.setPosition(point.row, point.column, true);
903
+ };
904
+
905
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
906
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
907
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
908
+ }
909
+
910
+ function $getTransformedPoint(delta, point, moveIfEqual) {
911
+ var deltaIsInsert = delta.action == "insert";
912
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
913
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
914
+ var deltaStart = delta.start;
915
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
916
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
917
+ return {
918
+ row: point.row,
919
+ column: point.column
920
+ };
921
+ }
922
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
923
+ return {
924
+ row: point.row + deltaRowShift,
925
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
926
+ };
927
+ }
928
+
929
+ return {
930
+ row: deltaStart.row,
931
+ column: deltaStart.column
932
+ };
933
+ }
934
+ this.setPosition = function(row, column, noClip) {
935
+ var pos;
936
+ if (noClip) {
937
+ pos = {
938
+ row: row,
939
+ column: column
940
+ };
941
+ } else {
942
+ pos = this.$clipPositionToDocument(row, column);
943
+ }
944
+
945
+ if (this.row == pos.row && this.column == pos.column)
946
+ return;
947
+
948
+ var old = {
949
+ row: this.row,
950
+ column: this.column
951
+ };
952
+
953
+ this.row = pos.row;
954
+ this.column = pos.column;
955
+ this._signal("change", {
956
+ old: old,
957
+ value: pos
958
+ });
959
+ };
960
+ this.detach = function() {
961
+ this.document.removeEventListener("change", this.$onChange);
962
+ };
963
+ this.attach = function(doc) {
964
+ this.document = doc || this.document;
965
+ this.document.on("change", this.$onChange);
966
+ };
967
+ this.$clipPositionToDocument = function(row, column) {
968
+ var pos = {};
969
+
970
+ if (row >= this.document.getLength()) {
971
+ pos.row = Math.max(0, this.document.getLength() - 1);
972
+ pos.column = this.document.getLine(pos.row).length;
973
+ }
974
+ else if (row < 0) {
975
+ pos.row = 0;
976
+ pos.column = 0;
977
+ }
978
+ else {
979
+ pos.row = row;
980
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
981
+ }
982
+
983
+ if (column < 0)
984
+ pos.column = 0;
985
+
986
+ return pos;
987
+ };
988
+
989
+ }).call(Anchor.prototype);
990
+
991
+ });
992
+
993
+ 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) {
994
+ "use strict";
995
+
996
+ var oop = require("./lib/oop");
997
+ var applyDelta = require("./apply_delta").applyDelta;
998
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
999
+ var Range = require("./range").Range;
1000
+ var Anchor = require("./anchor").Anchor;
1001
+
1002
+ var Document = function(textOrLines) {
1003
+ this.$lines = [""];
1004
+ if (textOrLines.length === 0) {
1005
+ this.$lines = [""];
1006
+ } else if (Array.isArray(textOrLines)) {
1007
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
1008
+ } else {
1009
+ this.insert({row: 0, column:0}, textOrLines);
1010
+ }
1011
+ };
1012
+
1013
+ (function() {
1014
+
1015
+ oop.implement(this, EventEmitter);
1016
+ this.setValue = function(text) {
1017
+ var len = this.getLength() - 1;
1018
+ this.remove(new Range(0, 0, len, this.getLine(len).length));
1019
+ this.insert({row: 0, column: 0}, text);
1020
+ };
1021
+ this.getValue = function() {
1022
+ return this.getAllLines().join(this.getNewLineCharacter());
1023
+ };
1024
+ this.createAnchor = function(row, column) {
1025
+ return new Anchor(this, row, column);
1026
+ };
1027
+ if ("aaa".split(/a/).length === 0) {
1028
+ this.$split = function(text) {
1029
+ return text.replace(/\r\n|\r/g, "\n").split("\n");
1030
+ };
1031
+ } else {
1032
+ this.$split = function(text) {
1033
+ return text.split(/\r\n|\r|\n/);
1034
+ };
1035
+ }
1036
+
1037
+
1038
+ this.$detectNewLine = function(text) {
1039
+ var match = text.match(/^.*?(\r\n|\r|\n)/m);
1040
+ this.$autoNewLine = match ? match[1] : "\n";
1041
+ this._signal("changeNewLineMode");
1042
+ };
1043
+ this.getNewLineCharacter = function() {
1044
+ switch (this.$newLineMode) {
1045
+ case "windows":
1046
+ return "\r\n";
1047
+ case "unix":
1048
+ return "\n";
1049
+ default:
1050
+ return this.$autoNewLine || "\n";
1051
+ }
1052
+ };
1053
+
1054
+ this.$autoNewLine = "";
1055
+ this.$newLineMode = "auto";
1056
+ this.setNewLineMode = function(newLineMode) {
1057
+ if (this.$newLineMode === newLineMode)
1058
+ return;
1059
+
1060
+ this.$newLineMode = newLineMode;
1061
+ this._signal("changeNewLineMode");
1062
+ };
1063
+ this.getNewLineMode = function() {
1064
+ return this.$newLineMode;
1065
+ };
1066
+ this.isNewLine = function(text) {
1067
+ return (text == "\r\n" || text == "\r" || text == "\n");
1068
+ };
1069
+ this.getLine = function(row) {
1070
+ return this.$lines[row] || "";
1071
+ };
1072
+ this.getLines = function(firstRow, lastRow) {
1073
+ return this.$lines.slice(firstRow, lastRow + 1);
1074
+ };
1075
+ this.getAllLines = function() {
1076
+ return this.getLines(0, this.getLength());
1077
+ };
1078
+ this.getLength = function() {
1079
+ return this.$lines.length;
1080
+ };
1081
+ this.getTextRange = function(range) {
1082
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
1083
+ };
1084
+ this.getLinesForRange = function(range) {
1085
+ var lines;
1086
+ if (range.start.row === range.end.row) {
1087
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
1088
+ } else {
1089
+ lines = this.getLines(range.start.row, range.end.row);
1090
+ lines[0] = (lines[0] || "").substring(range.start.column);
1091
+ var l = lines.length - 1;
1092
+ if (range.end.row - range.start.row == l)
1093
+ lines[l] = lines[l].substring(0, range.end.column);
1094
+ }
1095
+ return lines;
1096
+ };
1097
+ this.insertLines = function(row, lines) {
1098
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
1099
+ return this.insertFullLines(row, lines);
1100
+ };
1101
+ this.removeLines = function(firstRow, lastRow) {
1102
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
1103
+ return this.removeFullLines(firstRow, lastRow);
1104
+ };
1105
+ this.insertNewLine = function(position) {
1106
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead.");
1107
+ return this.insertMergedLines(position, ["", ""]);
1108
+ };
1109
+ this.insert = function(position, text) {
1110
+ if (this.getLength() <= 1)
1111
+ this.$detectNewLine(text);
1112
+
1113
+ return this.insertMergedLines(position, this.$split(text));
1114
+ };
1115
+ this.insertInLine = function(position, text) {
1116
+ var start = this.clippedPos(position.row, position.column);
1117
+ var end = this.pos(position.row, position.column + text.length);
1118
+
1119
+ this.applyDelta({
1120
+ start: start,
1121
+ end: end,
1122
+ action: "insert",
1123
+ lines: [text]
1124
+ }, true);
1125
+
1126
+ return this.clonePos(end);
1127
+ };
1128
+
1129
+ this.clippedPos = function(row, column) {
1130
+ var length = this.getLength();
1131
+ if (row === undefined) {
1132
+ row = length;
1133
+ } else if (row < 0) {
1134
+ row = 0;
1135
+ } else if (row >= length) {
1136
+ row = length - 1;
1137
+ column = undefined;
1138
+ }
1139
+ var line = this.getLine(row);
1140
+ if (column == undefined)
1141
+ column = line.length;
1142
+ column = Math.min(Math.max(column, 0), line.length);
1143
+ return {row: row, column: column};
1144
+ };
1145
+
1146
+ this.clonePos = function(pos) {
1147
+ return {row: pos.row, column: pos.column};
1148
+ };
1149
+
1150
+ this.pos = function(row, column) {
1151
+ return {row: row, column: column};
1152
+ };
1153
+
1154
+ this.$clipPosition = function(position) {
1155
+ var length = this.getLength();
1156
+ if (position.row >= length) {
1157
+ position.row = Math.max(0, length - 1);
1158
+ position.column = this.getLine(length - 1).length;
1159
+ } else {
1160
+ position.row = Math.max(0, position.row);
1161
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
1162
+ }
1163
+ return position;
1164
+ };
1165
+ this.insertFullLines = function(row, lines) {
1166
+ row = Math.min(Math.max(row, 0), this.getLength());
1167
+ var column = 0;
1168
+ if (row < this.getLength()) {
1169
+ lines = lines.concat([""]);
1170
+ column = 0;
1171
+ } else {
1172
+ lines = [""].concat(lines);
1173
+ row--;
1174
+ column = this.$lines[row].length;
1175
+ }
1176
+ this.insertMergedLines({row: row, column: column}, lines);
1177
+ };
1178
+ this.insertMergedLines = function(position, lines) {
1179
+ var start = this.clippedPos(position.row, position.column);
1180
+ var end = {
1181
+ row: start.row + lines.length - 1,
1182
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
1183
+ };
1184
+
1185
+ this.applyDelta({
1186
+ start: start,
1187
+ end: end,
1188
+ action: "insert",
1189
+ lines: lines
1190
+ });
1191
+
1192
+ return this.clonePos(end);
1193
+ };
1194
+ this.remove = function(range) {
1195
+ var start = this.clippedPos(range.start.row, range.start.column);
1196
+ var end = this.clippedPos(range.end.row, range.end.column);
1197
+ this.applyDelta({
1198
+ start: start,
1199
+ end: end,
1200
+ action: "remove",
1201
+ lines: this.getLinesForRange({start: start, end: end})
1202
+ });
1203
+ return this.clonePos(start);
1204
+ };
1205
+ this.removeInLine = function(row, startColumn, endColumn) {
1206
+ var start = this.clippedPos(row, startColumn);
1207
+ var end = this.clippedPos(row, endColumn);
1208
+
1209
+ this.applyDelta({
1210
+ start: start,
1211
+ end: end,
1212
+ action: "remove",
1213
+ lines: this.getLinesForRange({start: start, end: end})
1214
+ }, true);
1215
+
1216
+ return this.clonePos(start);
1217
+ };
1218
+ this.removeFullLines = function(firstRow, lastRow) {
1219
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
1220
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
1221
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
1222
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
1223
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
1224
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
1225
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
1226
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
1227
+ var range = new Range(startRow, startCol, endRow, endCol);
1228
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
1229
+
1230
+ this.applyDelta({
1231
+ start: range.start,
1232
+ end: range.end,
1233
+ action: "remove",
1234
+ lines: this.getLinesForRange(range)
1235
+ });
1236
+ return deletedLines;
1237
+ };
1238
+ this.removeNewLine = function(row) {
1239
+ if (row < this.getLength() - 1 && row >= 0) {
1240
+ this.applyDelta({
1241
+ start: this.pos(row, this.getLine(row).length),
1242
+ end: this.pos(row + 1, 0),
1243
+ action: "remove",
1244
+ lines: ["", ""]
1245
+ });
1246
+ }
1247
+ };
1248
+ this.replace = function(range, text) {
1249
+ if (!(range instanceof Range))
1250
+ range = Range.fromPoints(range.start, range.end);
1251
+ if (text.length === 0 && range.isEmpty())
1252
+ return range.start;
1253
+ if (text == this.getTextRange(range))
1254
+ return range.end;
1255
+
1256
+ this.remove(range);
1257
+ var end;
1258
+ if (text) {
1259
+ end = this.insert(range.start, text);
1260
+ }
1261
+ else {
1262
+ end = range.start;
1263
+ }
1264
+
1265
+ return end;
1266
+ };
1267
+ this.applyDeltas = function(deltas) {
1268
+ for (var i=0; i<deltas.length; i++) {
1269
+ this.applyDelta(deltas[i]);
1270
+ }
1271
+ };
1272
+ this.revertDeltas = function(deltas) {
1273
+ for (var i=deltas.length-1; i>=0; i--) {
1274
+ this.revertDelta(deltas[i]);
1275
+ }
1276
+ };
1277
+ this.applyDelta = function(delta, doNotValidate) {
1278
+ var isInsert = delta.action == "insert";
1279
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
1280
+ : !Range.comparePoints(delta.start, delta.end)) {
1281
+ return;
1282
+ }
1283
+
1284
+ if (isInsert && delta.lines.length > 20000)
1285
+ this.$splitAndapplyLargeDelta(delta, 20000);
1286
+ applyDelta(this.$lines, delta, doNotValidate);
1287
+ this._signal("change", delta);
1288
+ };
1289
+
1290
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
1291
+ var lines = delta.lines;
1292
+ var l = lines.length;
1293
+ var row = delta.start.row;
1294
+ var column = delta.start.column;
1295
+ var from = 0, to = 0;
1296
+ do {
1297
+ from = to;
1298
+ to += MAX - 1;
1299
+ var chunk = lines.slice(from, to);
1300
+ if (to > l) {
1301
+ delta.lines = chunk;
1302
+ delta.start.row = row + from;
1303
+ delta.start.column = column;
1304
+ break;
1305
+ }
1306
+ chunk.push("");
1307
+ this.applyDelta({
1308
+ start: this.pos(row + from, column),
1309
+ end: this.pos(row + to, column = 0),
1310
+ action: delta.action,
1311
+ lines: chunk
1312
+ }, true);
1313
+ } while(true);
1314
+ };
1315
+ this.revertDelta = function(delta) {
1316
+ this.applyDelta({
1317
+ start: this.clonePos(delta.start),
1318
+ end: this.clonePos(delta.end),
1319
+ action: (delta.action == "insert" ? "remove" : "insert"),
1320
+ lines: delta.lines.slice()
1321
+ });
1322
+ };
1323
+ this.indexToPosition = function(index, startRow) {
1324
+ var lines = this.$lines || this.getAllLines();
1325
+ var newlineLength = this.getNewLineCharacter().length;
1326
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
1327
+ index -= lines[i].length + newlineLength;
1328
+ if (index < 0)
1329
+ return {row: i, column: index + lines[i].length + newlineLength};
1330
+ }
1331
+ return {row: l-1, column: lines[l-1].length};
1332
+ };
1333
+ this.positionToIndex = function(pos, startRow) {
1334
+ var lines = this.$lines || this.getAllLines();
1335
+ var newlineLength = this.getNewLineCharacter().length;
1336
+ var index = 0;
1337
+ var row = Math.min(pos.row, lines.length);
1338
+ for (var i = startRow || 0; i < row; ++i)
1339
+ index += lines[i].length + newlineLength;
1340
+
1341
+ return index + pos.column;
1342
+ };
1343
+
1344
+ }).call(Document.prototype);
1345
+
1346
+ exports.Document = Document;
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/xml/sax",["require","exports","module"], function(require, exports, module) {
1412
+ var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF
1413
+ var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\u00B7\u0300-\u036F\\ux203F-\u2040]");
1414
+ var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
1415
+ var S_TAG = 0;//tag name offerring
1416
+ var S_ATTR = 1;//attr name offerring
1417
+ var S_ATTR_S=2;//attr name end and space offer
1418
+ var S_EQ = 3;//=space?
1419
+ var S_V = 4;//attr value(no quot value only)
1420
+ var S_E = 5;//attr value end and no space(quot end)
1421
+ var S_S = 6;//(attr value end || tag end ) && (space offer)
1422
+ var S_C = 7;//closed el<el />
1423
+
1424
+ function XMLReader(){
1425
+
1426
+ }
1427
+
1428
+ XMLReader.prototype = {
1429
+ parse:function(source,defaultNSMap,entityMap){
1430
+ var domBuilder = this.domBuilder;
1431
+ domBuilder.startDocument();
1432
+ _copy(defaultNSMap ,defaultNSMap = {})
1433
+ parse(source,defaultNSMap,entityMap,
1434
+ domBuilder,this.errorHandler);
1435
+ domBuilder.endDocument();
1436
+ }
1437
+ }
1438
+ function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){
1439
+ function fixedFromCharCode(code) {
1440
+ if (code > 0xffff) {
1441
+ code -= 0x10000;
1442
+ var surrogate1 = 0xd800 + (code >> 10)
1443
+ , surrogate2 = 0xdc00 + (code & 0x3ff);
1444
+
1445
+ return String.fromCharCode(surrogate1, surrogate2);
1446
+ } else {
1447
+ return String.fromCharCode(code);
1448
+ }
1449
+ }
1450
+ function entityReplacer(a){
1451
+ var k = a.slice(1,-1);
1452
+ if(k in entityMap){
1453
+ return entityMap[k];
1454
+ }else if(k.charAt(0) === '#'){
1455
+ return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))
1456
+ }else{
1457
+ errorHandler.error('entity not found:'+a);
1458
+ return a;
1459
+ }
1460
+ }
1461
+ function appendText(end){//has some bugs
1462
+ var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer);
1463
+ locator&&position(start);
1464
+ domBuilder.characters(xt,0,end-start);
1465
+ start = end
1466
+ }
1467
+ function position(start,m){
1468
+ while(start>=endPos && (m = linePattern.exec(source))){
1469
+ startPos = m.index;
1470
+ endPos = startPos + m[0].length;
1471
+ locator.lineNumber++;
1472
+ }
1473
+ locator.columnNumber = start-startPos+1;
1474
+ }
1475
+ var startPos = 0;
1476
+ var endPos = 0;
1477
+ var linePattern = /.+(?:\r\n?|\n)|.*$/g
1478
+ var locator = domBuilder.locator;
1479
+
1480
+ var parseStack = [{currentNSMap:defaultNSMapCopy}]
1481
+ var closeMap = {};
1482
+ var start = 0;
1483
+ while(true){
1484
+ var i = source.indexOf('<',start);
1485
+ if(i<0){
1486
+ if(!source.substr(start).match(/^\s*$/)){
1487
+ var doc = domBuilder.document;
1488
+ var text = doc.createTextNode(source.substr(start));
1489
+ doc.appendChild(text);
1490
+ domBuilder.currentElement = text;
1491
+ }
1492
+ return;
1493
+ }
1494
+ if(i>start){
1495
+ appendText(i);
1496
+ }
1497
+ switch(source.charAt(i+1)){
1498
+ case '/':
1499
+ var end = source.indexOf('>',i+3);
1500
+ var tagName = source.substring(i+2,end);
1501
+ var config;
1502
+ if (parseStack.length > 1) {
1503
+ config = parseStack.pop();
1504
+ } else {
1505
+ errorHandler.fatalError("end tag name not found for: "+tagName);
1506
+ break;
1507
+ }
1508
+ var localNSMap = config.localNSMap;
1509
+
1510
+ if(config.tagName != tagName){
1511
+ errorHandler.fatalError("end tag name: " + tagName + " does not match the current start tagName: "+config.tagName );
1512
+ }
1513
+ domBuilder.endElement(config.uri,config.localName,tagName);
1514
+ if(localNSMap){
1515
+ for(var prefix in localNSMap){
1516
+ domBuilder.endPrefixMapping(prefix) ;
1517
+ }
1518
+ }
1519
+ end++;
1520
+ break;
1521
+ case '?':// <?...?>
1522
+ locator&&position(i);
1523
+ end = parseInstruction(source,i,domBuilder);
1524
+ break;
1525
+ case '!':// <!doctype,<![CDATA,<!--
1526
+ locator&&position(i);
1527
+ end = parseDCC(source,i,domBuilder,errorHandler);
1528
+ break;
1529
+ default:
1530
+ try{
1531
+ locator&&position(i);
1532
+
1533
+ var el = new ElementAttributes();
1534
+ var end = parseElementStartPart(source,i,el,entityReplacer,errorHandler);
1535
+ var len = el.length;
1536
+ if(len && locator){
1537
+ var backup = copyLocator(locator,{});
1538
+ for(var i = 0;i<len;i++){
1539
+ var a = el[i];
1540
+ position(a.offset);
1541
+ a.offset = copyLocator(locator,{});
1542
+ }
1543
+ copyLocator(backup,locator);
1544
+ }
1545
+ if(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){
1546
+ el.closed = true;
1547
+ if(!entityMap.nbsp){
1548
+ errorHandler.warning('unclosed xml attribute');
1549
+ }
1550
+ }
1551
+ appendElement(el,domBuilder,parseStack);
1552
+
1553
+
1554
+ if(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){
1555
+ end = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)
1556
+ }else{
1557
+ end++;
1558
+ }
1559
+ }catch(e){
1560
+ errorHandler.error('element parse error: '+e);
1561
+ end = -1;
1562
+ }
1563
+
1564
+ }
1565
+ if(end<0){
1566
+ appendText(i+1);
1567
+ }else{
1568
+ start = end;
1569
+ }
1570
+ }
1571
+ }
1572
+ function copyLocator(f,t){
1573
+ t.lineNumber = f.lineNumber;
1574
+ t.columnNumber = f.columnNumber;
1575
+ return t;
1576
+
1577
+ }
1578
+ function parseElementStartPart(source,start,el,entityReplacer,errorHandler){
1579
+ var attrName;
1580
+ var value;
1581
+ var p = ++start;
1582
+ var s = S_TAG;//status
1583
+ while(true){
1584
+ var c = source.charAt(p);
1585
+ switch(c){
1586
+ case '=':
1587
+ if(s === S_ATTR){//attrName
1588
+ attrName = source.slice(start,p);
1589
+ s = S_EQ;
1590
+ }else if(s === S_ATTR_S){
1591
+ s = S_EQ;
1592
+ }else{
1593
+ throw new Error('attribute equal must after attrName');
1594
+ }
1595
+ break;
1596
+ case '\'':
1597
+ case '"':
1598
+ if(s === S_EQ){//equal
1599
+ start = p+1;
1600
+ p = source.indexOf(c,start)
1601
+ if(p>0){
1602
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
1603
+ el.add(attrName,value,start-1);
1604
+ s = S_E;
1605
+ }else{
1606
+ throw new Error('attribute value no end \''+c+'\' match');
1607
+ }
1608
+ }else if(s == S_V){
1609
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
1610
+ el.add(attrName,value,start);
1611
+ errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!');
1612
+ start = p+1;
1613
+ s = S_E
1614
+ }else{
1615
+ throw new Error('attribute value must after "="');
1616
+ }
1617
+ break;
1618
+ case '/':
1619
+ switch(s){
1620
+ case S_TAG:
1621
+ el.setTagName(source.slice(start,p));
1622
+ case S_E:
1623
+ case S_S:
1624
+ case S_C:
1625
+ s = S_C;
1626
+ el.closed = true;
1627
+ case S_V:
1628
+ case S_ATTR:
1629
+ case S_ATTR_S:
1630
+ break;
1631
+ default:
1632
+ throw new Error("attribute invalid close char('/')")
1633
+ }
1634
+ break;
1635
+ case ''://end document
1636
+ errorHandler.error('unexpected end of input');
1637
+ case '>':
1638
+ switch(s){
1639
+ case S_TAG:
1640
+ el.setTagName(source.slice(start,p));
1641
+ case S_E:
1642
+ case S_S:
1643
+ case S_C:
1644
+ break;//normal
1645
+ case S_V://Compatible state
1646
+ case S_ATTR:
1647
+ value = source.slice(start,p);
1648
+ if(value.slice(-1) === '/'){
1649
+ el.closed = true;
1650
+ value = value.slice(0,-1)
1651
+ }
1652
+ case S_ATTR_S:
1653
+ if(s === S_ATTR_S){
1654
+ value = attrName;
1655
+ }
1656
+ if(s == S_V){
1657
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
1658
+ el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start)
1659
+ }else{
1660
+ errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!')
1661
+ el.add(value,value,start)
1662
+ }
1663
+ break;
1664
+ case S_EQ:
1665
+ throw new Error('attribute value missed!!');
1666
+ }
1667
+ return p;
1668
+ case '\u0080':
1669
+ c = ' ';
1670
+ default:
1671
+ if(c<= ' '){//space
1672
+ switch(s){
1673
+ case S_TAG:
1674
+ el.setTagName(source.slice(start,p));//tagName
1675
+ s = S_S;
1676
+ break;
1677
+ case S_ATTR:
1678
+ attrName = source.slice(start,p)
1679
+ s = S_ATTR_S;
1680
+ break;
1681
+ case S_V:
1682
+ var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
1683
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
1684
+ el.add(attrName,value,start)
1685
+ case S_E:
1686
+ s = S_S;
1687
+ break;
1688
+ }
1689
+ }else{//not space
1690
+ switch(s){
1691
+ case S_ATTR_S:
1692
+ errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!')
1693
+ el.add(attrName,attrName,start);
1694
+ start = p;
1695
+ s = S_ATTR;
1696
+ break;
1697
+ case S_E:
1698
+ errorHandler.warning('attribute space is required"'+attrName+'"!!')
1699
+ case S_S:
1700
+ s = S_ATTR;
1701
+ start = p;
1702
+ break;
1703
+ case S_EQ:
1704
+ s = S_V;
1705
+ start = p;
1706
+ break;
1707
+ case S_C:
1708
+ throw new Error("elements closed character '/' and '>' must be connected to");
1709
+ }
1710
+ }
1711
+ }
1712
+ p++;
1713
+ }
1714
+ }
1715
+ function appendElement(el,domBuilder,parseStack){
1716
+ var tagName = el.tagName;
1717
+ var localNSMap = null;
1718
+ var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
1719
+ var i = el.length;
1720
+ while(i--){
1721
+ var a = el[i];
1722
+ var qName = a.qName;
1723
+ var value = a.value;
1724
+ var nsp = qName.indexOf(':');
1725
+ if(nsp>0){
1726
+ var prefix = a.prefix = qName.slice(0,nsp);
1727
+ var localName = qName.slice(nsp+1);
1728
+ var nsPrefix = prefix === 'xmlns' && localName
1729
+ }else{
1730
+ localName = qName;
1731
+ prefix = null
1732
+ nsPrefix = qName === 'xmlns' && ''
1733
+ }
1734
+ a.localName = localName ;
1735
+ if(nsPrefix !== false){//hack!!
1736
+ if(localNSMap == null){
1737
+ localNSMap = {}
1738
+ _copy(currentNSMap,currentNSMap={})
1739
+ }
1740
+ currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
1741
+ a.uri = 'http://www.w3.org/2000/xmlns/'
1742
+ domBuilder.startPrefixMapping(nsPrefix, value)
1743
+ }
1744
+ }
1745
+ var i = el.length;
1746
+ while(i--){
1747
+ a = el[i];
1748
+ var prefix = a.prefix;
1749
+ if(prefix){//no prefix attribute has no namespace
1750
+ if(prefix === 'xml'){
1751
+ a.uri = 'http://www.w3.org/XML/1998/namespace';
1752
+ }if(prefix !== 'xmlns'){
1753
+ a.uri = currentNSMap[prefix]
1754
+ }
1755
+ }
1756
+ }
1757
+ var nsp = tagName.indexOf(':');
1758
+ if(nsp>0){
1759
+ prefix = el.prefix = tagName.slice(0,nsp);
1760
+ localName = el.localName = tagName.slice(nsp+1);
1761
+ }else{
1762
+ prefix = null;//important!!
1763
+ localName = el.localName = tagName;
1764
+ }
1765
+ var ns = el.uri = currentNSMap[prefix || ''];
1766
+ domBuilder.startElement(ns,localName,tagName,el);
1767
+ if(el.closed){
1768
+ domBuilder.endElement(ns,localName,tagName);
1769
+ if(localNSMap){
1770
+ for(prefix in localNSMap){
1771
+ domBuilder.endPrefixMapping(prefix)
1772
+ }
1773
+ }
1774
+ }else{
1775
+ el.currentNSMap = currentNSMap;
1776
+ el.localNSMap = localNSMap;
1777
+ parseStack.push(el);
1778
+ }
1779
+ }
1780
+ function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){
1781
+ if(/^(?:script|textarea)$/i.test(tagName)){
1782
+ var elEndStart = source.indexOf('</'+tagName+'>',elStartEnd);
1783
+ var text = source.substring(elStartEnd+1,elEndStart);
1784
+ if(/[&<]/.test(text)){
1785
+ if(/^script$/i.test(tagName)){
1786
+ domBuilder.characters(text,0,text.length);
1787
+ return elEndStart;
1788
+ }//}else{//text area
1789
+ text = text.replace(/&#?\w+;/g,entityReplacer);
1790
+ domBuilder.characters(text,0,text.length);
1791
+ return elEndStart;
1792
+
1793
+ }
1794
+ }
1795
+ return elStartEnd+1;
1796
+ }
1797
+ function fixSelfClosed(source,elStartEnd,tagName,closeMap){
1798
+ var pos = closeMap[tagName];
1799
+ if(pos == null){
1800
+ pos = closeMap[tagName] = source.lastIndexOf('</'+tagName+'>')
1801
+ }
1802
+ return pos<elStartEnd;
1803
+ }
1804
+ function _copy(source,target){
1805
+ for(var n in source){target[n] = source[n]}
1806
+ }
1807
+ function parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'
1808
+ var next= source.charAt(start+2)
1809
+ switch(next){
1810
+ case '-':
1811
+ if(source.charAt(start + 3) === '-'){
1812
+ var end = source.indexOf('-->',start+4);
1813
+ if(end>start){
1814
+ domBuilder.comment(source,start+4,end-start-4);
1815
+ return end+3;
1816
+ }else{
1817
+ errorHandler.error("Unclosed comment");
1818
+ return -1;
1819
+ }
1820
+ }else{
1821
+ return -1;
1822
+ }
1823
+ default:
1824
+ if(source.substr(start+3,6) == 'CDATA['){
1825
+ var end = source.indexOf(']]>',start+9);
1826
+ domBuilder.startCDATA();
1827
+ domBuilder.characters(source,start+9,end-start-9);
1828
+ domBuilder.endCDATA()
1829
+ return end+3;
1830
+ }
1831
+ var matchs = split(source,start);
1832
+ var len = matchs.length;
1833
+ if(len>1 && /!doctype/i.test(matchs[0][0])){
1834
+ var name = matchs[1][0];
1835
+ var pubid = len>3 && /^public$/i.test(matchs[2][0]) && matchs[3][0]
1836
+ var sysid = len>4 && matchs[4][0];
1837
+ var lastMatch = matchs[len-1]
1838
+ domBuilder.startDTD(name,pubid && pubid.replace(/^(['"])(.*?)\1$/,'$2'),
1839
+ sysid && sysid.replace(/^(['"])(.*?)\1$/,'$2'));
1840
+ domBuilder.endDTD();
1841
+
1842
+ return lastMatch.index+lastMatch[0].length
1843
+ }
1844
+ }
1845
+ return -1;
1846
+ }
1847
+
1848
+
1849
+
1850
+ function parseInstruction(source,start,domBuilder){
1851
+ var end = source.indexOf('?>',start);
1852
+ if(end){
1853
+ var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
1854
+ if(match){
1855
+ var len = match[0].length;
1856
+ domBuilder.processingInstruction(match[1], match[2]) ;
1857
+ return end+2;
1858
+ }else{//error
1859
+ return -1;
1860
+ }
1861
+ }
1862
+ return -1;
1863
+ }
1864
+ function ElementAttributes(source){
1865
+
1866
+ }
1867
+ ElementAttributes.prototype = {
1868
+ setTagName:function(tagName){
1869
+ if(!tagNamePattern.test(tagName)){
1870
+ throw new Error('invalid tagName:'+tagName)
1871
+ }
1872
+ this.tagName = tagName
1873
+ },
1874
+ add:function(qName,value,offset){
1875
+ if(!tagNamePattern.test(qName)){
1876
+ throw new Error('invalid attribute:'+qName)
1877
+ }
1878
+ this[this.length++] = {qName:qName,value:value,offset:offset}
1879
+ },
1880
+ length:0,
1881
+ getLocalName:function(i){return this[i].localName},
1882
+ getOffset:function(i){return this[i].offset},
1883
+ getQName:function(i){return this[i].qName},
1884
+ getURI:function(i){return this[i].uri},
1885
+ getValue:function(i){return this[i].value}
1886
+ }
1887
+
1888
+
1889
+
1890
+
1891
+ function _set_proto_(thiz,parent){
1892
+ thiz.__proto__ = parent;
1893
+ return thiz;
1894
+ }
1895
+ if(!(_set_proto_({},_set_proto_.prototype) instanceof _set_proto_)){
1896
+ _set_proto_ = function(thiz,parent){
1897
+ function p(){};
1898
+ p.prototype = parent;
1899
+ p = new p();
1900
+ for(parent in thiz){
1901
+ p[parent] = thiz[parent];
1902
+ }
1903
+ return p;
1904
+ }
1905
+ }
1906
+
1907
+ function split(source,start){
1908
+ var match;
1909
+ var buf = [];
1910
+ var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;
1911
+ reg.lastIndex = start;
1912
+ reg.exec(source);//skip <
1913
+ while(match = reg.exec(source)){
1914
+ buf.push(match);
1915
+ if(match[1])return buf;
1916
+ }
1917
+ }
1918
+
1919
+ return XMLReader;
1920
+ });
1921
+
1922
+ ace.define("ace/mode/xml/dom",["require","exports","module"], function(require, exports, module) {
1923
+
1924
+ function copy(src,dest){
1925
+ for(var p in src){
1926
+ dest[p] = src[p];
1927
+ }
1928
+ }
1929
+ function _extends(Class,Super){
1930
+ var pt = Class.prototype;
1931
+ if(Object.create){
1932
+ var ppt = Object.create(Super.prototype)
1933
+ pt.__proto__ = ppt;
1934
+ }
1935
+ if(!(pt instanceof Super)){
1936
+ function t(){};
1937
+ t.prototype = Super.prototype;
1938
+ t = new t();
1939
+ copy(pt,t);
1940
+ Class.prototype = pt = t;
1941
+ }
1942
+ if(pt.constructor != Class){
1943
+ if(typeof Class != 'function'){
1944
+ console.error("unknow Class:"+Class)
1945
+ }
1946
+ pt.constructor = Class
1947
+ }
1948
+ }
1949
+ var htmlns = 'http://www.w3.org/1999/xhtml' ;
1950
+ var NodeType = {}
1951
+ var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;
1952
+ var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;
1953
+ var TEXT_NODE = NodeType.TEXT_NODE = 3;
1954
+ var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;
1955
+ var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;
1956
+ var ENTITY_NODE = NodeType.ENTITY_NODE = 6;
1957
+ var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;
1958
+ var COMMENT_NODE = NodeType.COMMENT_NODE = 8;
1959
+ var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;
1960
+ var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;
1961
+ var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;
1962
+ var NOTATION_NODE = NodeType.NOTATION_NODE = 12;
1963
+ var ExceptionCode = {}
1964
+ var ExceptionMessage = {};
1965
+ var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1);
1966
+ var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
1967
+ var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
1968
+ var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
1969
+ var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
1970
+ var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
1971
+ var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
1972
+ var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
1973
+ var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
1974
+ var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
1975
+ var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
1976
+ var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
1977
+ var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
1978
+ var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
1979
+ var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15);
1980
+
1981
+
1982
+ function DOMException(code, message) {
1983
+ if(message instanceof Error){
1984
+ var error = message;
1985
+ }else{
1986
+ error = this;
1987
+ Error.call(this, ExceptionMessage[code]);
1988
+ this.message = ExceptionMessage[code];
1989
+ if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
1990
+ }
1991
+ error.code = code;
1992
+ if(message) this.message = this.message + ": " + message;
1993
+ return error;
1994
+ };
1995
+ DOMException.prototype = Error.prototype;
1996
+ copy(ExceptionCode,DOMException)
1997
+ function NodeList() {
1998
+ };
1999
+ NodeList.prototype = {
2000
+ length:0,
2001
+ item: function(index) {
2002
+ return this[index] || null;
2003
+ }
2004
+ };
2005
+ function LiveNodeList(node,refresh){
2006
+ this._node = node;
2007
+ this._refresh = refresh
2008
+ _updateLiveList(this);
2009
+ }
2010
+ function _updateLiveList(list){
2011
+ var inc = list._node._inc || list._node.ownerDocument._inc;
2012
+ if(list._inc != inc){
2013
+ var ls = list._refresh(list._node);
2014
+ __set__(list,'length',ls.length);
2015
+ copy(ls,list);
2016
+ list._inc = inc;
2017
+ }
2018
+ }
2019
+ LiveNodeList.prototype.item = function(i){
2020
+ _updateLiveList(this);
2021
+ return this[i];
2022
+ }
2023
+
2024
+ _extends(LiveNodeList,NodeList);
2025
+ function NamedNodeMap() {
2026
+ };
2027
+
2028
+ function _findNodeIndex(list,node){
2029
+ var i = list.length;
2030
+ while(i--){
2031
+ if(list[i] === node){return i}
2032
+ }
2033
+ }
2034
+
2035
+ function _addNamedNode(el,list,newAttr,oldAttr){
2036
+ if(oldAttr){
2037
+ list[_findNodeIndex(list,oldAttr)] = newAttr;
2038
+ }else{
2039
+ list[list.length++] = newAttr;
2040
+ }
2041
+ if(el){
2042
+ newAttr.ownerElement = el;
2043
+ var doc = el.ownerDocument;
2044
+ if(doc){
2045
+ oldAttr && _onRemoveAttribute(doc,el,oldAttr);
2046
+ _onAddAttribute(doc,el,newAttr);
2047
+ }
2048
+ }
2049
+ }
2050
+ function _removeNamedNode(el,list,attr){
2051
+ var i = _findNodeIndex(list,attr);
2052
+ if(i>=0){
2053
+ var lastIndex = list.length-1
2054
+ while(i<lastIndex){
2055
+ list[i] = list[++i]
2056
+ }
2057
+ list.length = lastIndex;
2058
+ if(el){
2059
+ var doc = el.ownerDocument;
2060
+ if(doc){
2061
+ _onRemoveAttribute(doc,el,attr);
2062
+ attr.ownerElement = null;
2063
+ }
2064
+ }
2065
+ }else{
2066
+ throw DOMException(NOT_FOUND_ERR,new Error())
2067
+ }
2068
+ }
2069
+ NamedNodeMap.prototype = {
2070
+ length:0,
2071
+ item:NodeList.prototype.item,
2072
+ getNamedItem: function(key) {
2073
+ var i = this.length;
2074
+ while(i--){
2075
+ var attr = this[i];
2076
+ if(attr.nodeName == key){
2077
+ return attr;
2078
+ }
2079
+ }
2080
+ },
2081
+ setNamedItem: function(attr) {
2082
+ var el = attr.ownerElement;
2083
+ if(el && el!=this._ownerElement){
2084
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
2085
+ }
2086
+ var oldAttr = this.getNamedItem(attr.nodeName);
2087
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
2088
+ return oldAttr;
2089
+ },
2090
+ setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR
2091
+ var el = attr.ownerElement, oldAttr;
2092
+ if(el && el!=this._ownerElement){
2093
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
2094
+ }
2095
+ oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);
2096
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
2097
+ return oldAttr;
2098
+ },
2099
+ removeNamedItem: function(key) {
2100
+ var attr = this.getNamedItem(key);
2101
+ _removeNamedNode(this._ownerElement,this,attr);
2102
+ return attr;
2103
+
2104
+
2105
+ },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR
2106
+ removeNamedItemNS:function(namespaceURI,localName){
2107
+ var attr = this.getNamedItemNS(namespaceURI,localName);
2108
+ _removeNamedNode(this._ownerElement,this,attr);
2109
+ return attr;
2110
+ },
2111
+ getNamedItemNS: function(namespaceURI, localName) {
2112
+ var i = this.length;
2113
+ while(i--){
2114
+ var node = this[i];
2115
+ if(node.localName == localName && node.namespaceURI == namespaceURI){
2116
+ return node;
2117
+ }
2118
+ }
2119
+ return null;
2120
+ }
2121
+ };
2122
+ function DOMImplementation(/* Object */ features) {
2123
+ this._features = {};
2124
+ if (features) {
2125
+ for (var feature in features) {
2126
+ this._features = features[feature];
2127
+ }
2128
+ }
2129
+ };
2130
+
2131
+ DOMImplementation.prototype = {
2132
+ hasFeature: function(/* string */ feature, /* string */ version) {
2133
+ var versions = this._features[feature.toLowerCase()];
2134
+ if (versions && (!version || version in versions)) {
2135
+ return true;
2136
+ } else {
2137
+ return false;
2138
+ }
2139
+ },
2140
+ createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR
2141
+ var doc = new Document();
2142
+ doc.implementation = this;
2143
+ doc.childNodes = new NodeList();
2144
+ doc.doctype = doctype;
2145
+ if(doctype){
2146
+ doc.appendChild(doctype);
2147
+ }
2148
+ if(qualifiedName){
2149
+ var root = doc.createElementNS(namespaceURI,qualifiedName);
2150
+ doc.appendChild(root);
2151
+ }
2152
+ return doc;
2153
+ },
2154
+ createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR
2155
+ var node = new DocumentType();
2156
+ node.name = qualifiedName;
2157
+ node.nodeName = qualifiedName;
2158
+ node.publicId = publicId;
2159
+ node.systemId = systemId;
2160
+ return node;
2161
+ }
2162
+ };
2163
+
2164
+ function Node() {
2165
+ };
2166
+
2167
+ Node.prototype = {
2168
+ firstChild : null,
2169
+ lastChild : null,
2170
+ previousSibling : null,
2171
+ nextSibling : null,
2172
+ attributes : null,
2173
+ parentNode : null,
2174
+ childNodes : null,
2175
+ ownerDocument : null,
2176
+ nodeValue : null,
2177
+ namespaceURI : null,
2178
+ prefix : null,
2179
+ localName : null,
2180
+ insertBefore:function(newChild, refChild){//raises
2181
+ return _insertBefore(this,newChild,refChild);
2182
+ },
2183
+ replaceChild:function(newChild, oldChild){//raises
2184
+ this.insertBefore(newChild,oldChild);
2185
+ if(oldChild){
2186
+ this.removeChild(oldChild);
2187
+ }
2188
+ },
2189
+ removeChild:function(oldChild){
2190
+ return _removeChild(this,oldChild);
2191
+ },
2192
+ appendChild:function(newChild){
2193
+ return this.insertBefore(newChild,null);
2194
+ },
2195
+ hasChildNodes:function(){
2196
+ return this.firstChild != null;
2197
+ },
2198
+ cloneNode:function(deep){
2199
+ return cloneNode(this.ownerDocument||this,this,deep);
2200
+ },
2201
+ normalize:function(){
2202
+ var child = this.firstChild;
2203
+ while(child){
2204
+ var next = child.nextSibling;
2205
+ if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){
2206
+ this.removeChild(next);
2207
+ child.appendData(next.data);
2208
+ }else{
2209
+ child.normalize();
2210
+ child = next;
2211
+ }
2212
+ }
2213
+ },
2214
+ isSupported:function(feature, version){
2215
+ return this.ownerDocument.implementation.hasFeature(feature,version);
2216
+ },
2217
+ hasAttributes:function(){
2218
+ return this.attributes.length>0;
2219
+ },
2220
+ lookupPrefix:function(namespaceURI){
2221
+ var el = this;
2222
+ while(el){
2223
+ var map = el._nsMap;
2224
+ if(map){
2225
+ for(var n in map){
2226
+ if(map[n] == namespaceURI){
2227
+ return n;
2228
+ }
2229
+ }
2230
+ }
2231
+ el = el.nodeType == 2?el.ownerDocument : el.parentNode;
2232
+ }
2233
+ return null;
2234
+ },
2235
+ lookupNamespaceURI:function(prefix){
2236
+ var el = this;
2237
+ while(el){
2238
+ var map = el._nsMap;
2239
+ if(map){
2240
+ if(prefix in map){
2241
+ return map[prefix] ;
2242
+ }
2243
+ }
2244
+ el = el.nodeType == 2?el.ownerDocument : el.parentNode;
2245
+ }
2246
+ return null;
2247
+ },
2248
+ isDefaultNamespace:function(namespaceURI){
2249
+ var prefix = this.lookupPrefix(namespaceURI);
2250
+ return prefix == null;
2251
+ }
2252
+ };
2253
+
2254
+
2255
+ function _xmlEncoder(c){
2256
+ return c == '<' && '&lt;' ||
2257
+ c == '>' && '&gt;' ||
2258
+ c == '&' && '&amp;' ||
2259
+ c == '"' && '&quot;' ||
2260
+ '&#'+c.charCodeAt()+';'
2261
+ }
2262
+
2263
+
2264
+ copy(NodeType,Node);
2265
+ copy(NodeType,Node.prototype);
2266
+ function _visitNode(node,callback){
2267
+ if(callback(node)){
2268
+ return true;
2269
+ }
2270
+ if(node = node.firstChild){
2271
+ do{
2272
+ if(_visitNode(node,callback)){return true}
2273
+ }while(node=node.nextSibling)
2274
+ }
2275
+ }
2276
+
2277
+
2278
+
2279
+ function Document(){
2280
+ }
2281
+ function _onAddAttribute(doc,el,newAttr){
2282
+ doc && doc._inc++;
2283
+ var ns = newAttr.namespaceURI ;
2284
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
2285
+ el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value
2286
+ }
2287
+ }
2288
+ function _onRemoveAttribute(doc,el,newAttr,remove){
2289
+ doc && doc._inc++;
2290
+ var ns = newAttr.namespaceURI ;
2291
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
2292
+ delete el._nsMap[newAttr.prefix?newAttr.localName:'']
2293
+ }
2294
+ }
2295
+ function _onUpdateChild(doc,el,newChild){
2296
+ if(doc && doc._inc){
2297
+ doc._inc++;
2298
+ var cs = el.childNodes;
2299
+ if(newChild){
2300
+ cs[cs.length++] = newChild;
2301
+ }else{
2302
+ var child = el.firstChild;
2303
+ var i = 0;
2304
+ while(child){
2305
+ cs[i++] = child;
2306
+ child =child.nextSibling;
2307
+ }
2308
+ cs.length = i;
2309
+ }
2310
+ }
2311
+ }
2312
+ function _removeChild(parentNode,child){
2313
+ var previous = child.previousSibling;
2314
+ var next = child.nextSibling;
2315
+ if(previous){
2316
+ previous.nextSibling = next;
2317
+ }else{
2318
+ parentNode.firstChild = next
2319
+ }
2320
+ if(next){
2321
+ next.previousSibling = previous;
2322
+ }else{
2323
+ parentNode.lastChild = previous;
2324
+ }
2325
+ _onUpdateChild(parentNode.ownerDocument,parentNode);
2326
+ return child;
2327
+ }
2328
+ function _insertBefore(parentNode,newChild,nextChild){
2329
+ var cp = newChild.parentNode;
2330
+ if(cp){
2331
+ cp.removeChild(newChild);//remove and update
2332
+ }
2333
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
2334
+ var newFirst = newChild.firstChild;
2335
+ if (newFirst == null) {
2336
+ return newChild;
2337
+ }
2338
+ var newLast = newChild.lastChild;
2339
+ }else{
2340
+ newFirst = newLast = newChild;
2341
+ }
2342
+ var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;
2343
+
2344
+ newFirst.previousSibling = pre;
2345
+ newLast.nextSibling = nextChild;
2346
+
2347
+
2348
+ if(pre){
2349
+ pre.nextSibling = newFirst;
2350
+ }else{
2351
+ parentNode.firstChild = newFirst;
2352
+ }
2353
+ if(nextChild == null){
2354
+ parentNode.lastChild = newLast;
2355
+ }else{
2356
+ nextChild.previousSibling = newLast;
2357
+ }
2358
+ do{
2359
+ newFirst.parentNode = parentNode;
2360
+ }while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
2361
+ _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);
2362
+ if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {
2363
+ newChild.firstChild = newChild.lastChild = null;
2364
+ }
2365
+ return newChild;
2366
+ }
2367
+ function _appendSingleChild(parentNode,newChild){
2368
+ var cp = newChild.parentNode;
2369
+ if(cp){
2370
+ var pre = parentNode.lastChild;
2371
+ cp.removeChild(newChild);//remove and update
2372
+ var pre = parentNode.lastChild;
2373
+ }
2374
+ var pre = parentNode.lastChild;
2375
+ newChild.parentNode = parentNode;
2376
+ newChild.previousSibling = pre;
2377
+ newChild.nextSibling = null;
2378
+ if(pre){
2379
+ pre.nextSibling = newChild;
2380
+ }else{
2381
+ parentNode.firstChild = newChild;
2382
+ }
2383
+ parentNode.lastChild = newChild;
2384
+ _onUpdateChild(parentNode.ownerDocument,parentNode,newChild);
2385
+ return newChild;
2386
+ }
2387
+ Document.prototype = {
2388
+ nodeName : '#document',
2389
+ nodeType : DOCUMENT_NODE,
2390
+ doctype : null,
2391
+ documentElement : null,
2392
+ _inc : 1,
2393
+
2394
+ insertBefore : function(newChild, refChild){//raises
2395
+ if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){
2396
+ var child = newChild.firstChild;
2397
+ while(child){
2398
+ var next = child.nextSibling;
2399
+ this.insertBefore(child,refChild);
2400
+ child = next;
2401
+ }
2402
+ return newChild;
2403
+ }
2404
+ if(this.documentElement == null && newChild.nodeType == 1){
2405
+ this.documentElement = newChild;
2406
+ }
2407
+
2408
+ return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;
2409
+ },
2410
+ removeChild : function(oldChild){
2411
+ if(this.documentElement == oldChild){
2412
+ this.documentElement = null;
2413
+ }
2414
+ return _removeChild(this,oldChild);
2415
+ },
2416
+ importNode : function(importedNode,deep){
2417
+ return importNode(this,importedNode,deep);
2418
+ },
2419
+ getElementById : function(id){
2420
+ var rtv = null;
2421
+ _visitNode(this.documentElement,function(node){
2422
+ if(node.nodeType == 1){
2423
+ if(node.getAttribute('id') == id){
2424
+ rtv = node;
2425
+ return true;
2426
+ }
2427
+ }
2428
+ })
2429
+ return rtv;
2430
+ },
2431
+ createElement : function(tagName){
2432
+ var node = new Element();
2433
+ node.ownerDocument = this;
2434
+ node.nodeName = tagName;
2435
+ node.tagName = tagName;
2436
+ node.childNodes = new NodeList();
2437
+ var attrs = node.attributes = new NamedNodeMap();
2438
+ attrs._ownerElement = node;
2439
+ return node;
2440
+ },
2441
+ createDocumentFragment : function(){
2442
+ var node = new DocumentFragment();
2443
+ node.ownerDocument = this;
2444
+ node.childNodes = new NodeList();
2445
+ return node;
2446
+ },
2447
+ createTextNode : function(data){
2448
+ var node = new Text();
2449
+ node.ownerDocument = this;
2450
+ node.appendData(data)
2451
+ return node;
2452
+ },
2453
+ createComment : function(data){
2454
+ var node = new Comment();
2455
+ node.ownerDocument = this;
2456
+ node.appendData(data)
2457
+ return node;
2458
+ },
2459
+ createCDATASection : function(data){
2460
+ var node = new CDATASection();
2461
+ node.ownerDocument = this;
2462
+ node.appendData(data)
2463
+ return node;
2464
+ },
2465
+ createProcessingInstruction : function(target,data){
2466
+ var node = new ProcessingInstruction();
2467
+ node.ownerDocument = this;
2468
+ node.tagName = node.target = target;
2469
+ node.nodeValue= node.data = data;
2470
+ return node;
2471
+ },
2472
+ createAttribute : function(name){
2473
+ var node = new Attr();
2474
+ node.ownerDocument = this;
2475
+ node.name = name;
2476
+ node.nodeName = name;
2477
+ node.localName = name;
2478
+ node.specified = true;
2479
+ return node;
2480
+ },
2481
+ createEntityReference : function(name){
2482
+ var node = new EntityReference();
2483
+ node.ownerDocument = this;
2484
+ node.nodeName = name;
2485
+ return node;
2486
+ },
2487
+ createElementNS : function(namespaceURI,qualifiedName){
2488
+ var node = new Element();
2489
+ var pl = qualifiedName.split(':');
2490
+ var attrs = node.attributes = new NamedNodeMap();
2491
+ node.childNodes = new NodeList();
2492
+ node.ownerDocument = this;
2493
+ node.nodeName = qualifiedName;
2494
+ node.tagName = qualifiedName;
2495
+ node.namespaceURI = namespaceURI;
2496
+ if(pl.length == 2){
2497
+ node.prefix = pl[0];
2498
+ node.localName = pl[1];
2499
+ }else{
2500
+ node.localName = qualifiedName;
2501
+ }
2502
+ attrs._ownerElement = node;
2503
+ return node;
2504
+ },
2505
+ createAttributeNS : function(namespaceURI,qualifiedName){
2506
+ var node = new Attr();
2507
+ var pl = qualifiedName.split(':');
2508
+ node.ownerDocument = this;
2509
+ node.nodeName = qualifiedName;
2510
+ node.name = qualifiedName;
2511
+ node.namespaceURI = namespaceURI;
2512
+ node.specified = true;
2513
+ if(pl.length == 2){
2514
+ node.prefix = pl[0];
2515
+ node.localName = pl[1];
2516
+ }else{
2517
+ node.localName = qualifiedName;
2518
+ }
2519
+ return node;
2520
+ }
2521
+ };
2522
+ _extends(Document,Node);
2523
+
2524
+
2525
+ function Element() {
2526
+ this._nsMap = {};
2527
+ };
2528
+ Element.prototype = {
2529
+ nodeType : ELEMENT_NODE,
2530
+ hasAttribute : function(name){
2531
+ return this.getAttributeNode(name)!=null;
2532
+ },
2533
+ getAttribute : function(name){
2534
+ var attr = this.getAttributeNode(name);
2535
+ return attr && attr.value || '';
2536
+ },
2537
+ getAttributeNode : function(name){
2538
+ return this.attributes.getNamedItem(name);
2539
+ },
2540
+ setAttribute : function(name, value){
2541
+ var attr = this.ownerDocument.createAttribute(name);
2542
+ attr.value = attr.nodeValue = "" + value;
2543
+ this.setAttributeNode(attr)
2544
+ },
2545
+ removeAttribute : function(name){
2546
+ var attr = this.getAttributeNode(name)
2547
+ attr && this.removeAttributeNode(attr);
2548
+ },
2549
+ appendChild:function(newChild){
2550
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
2551
+ return this.insertBefore(newChild,null);
2552
+ }else{
2553
+ return _appendSingleChild(this,newChild);
2554
+ }
2555
+ },
2556
+ setAttributeNode : function(newAttr){
2557
+ return this.attributes.setNamedItem(newAttr);
2558
+ },
2559
+ setAttributeNodeNS : function(newAttr){
2560
+ return this.attributes.setNamedItemNS(newAttr);
2561
+ },
2562
+ removeAttributeNode : function(oldAttr){
2563
+ return this.attributes.removeNamedItem(oldAttr.nodeName);
2564
+ },
2565
+ removeAttributeNS : function(namespaceURI, localName){
2566
+ var old = this.getAttributeNodeNS(namespaceURI, localName);
2567
+ old && this.removeAttributeNode(old);
2568
+ },
2569
+
2570
+ hasAttributeNS : function(namespaceURI, localName){
2571
+ return this.getAttributeNodeNS(namespaceURI, localName)!=null;
2572
+ },
2573
+ getAttributeNS : function(namespaceURI, localName){
2574
+ var attr = this.getAttributeNodeNS(namespaceURI, localName);
2575
+ return attr && attr.value || '';
2576
+ },
2577
+ setAttributeNS : function(namespaceURI, qualifiedName, value){
2578
+ var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
2579
+ attr.value = attr.nodeValue = "" + value;
2580
+ this.setAttributeNode(attr)
2581
+ },
2582
+ getAttributeNodeNS : function(namespaceURI, localName){
2583
+ return this.attributes.getNamedItemNS(namespaceURI, localName);
2584
+ },
2585
+
2586
+ getElementsByTagName : function(tagName){
2587
+ return new LiveNodeList(this,function(base){
2588
+ var ls = [];
2589
+ _visitNode(base,function(node){
2590
+ if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){
2591
+ ls.push(node);
2592
+ }
2593
+ });
2594
+ return ls;
2595
+ });
2596
+ },
2597
+ getElementsByTagNameNS : function(namespaceURI, localName){
2598
+ return new LiveNodeList(this,function(base){
2599
+ var ls = [];
2600
+ _visitNode(base,function(node){
2601
+ if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){
2602
+ ls.push(node);
2603
+ }
2604
+ });
2605
+ return ls;
2606
+ });
2607
+ }
2608
+ };
2609
+ Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
2610
+ Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
2611
+
2612
+
2613
+ _extends(Element,Node);
2614
+ function Attr() {
2615
+ };
2616
+ Attr.prototype.nodeType = ATTRIBUTE_NODE;
2617
+ _extends(Attr,Node);
2618
+
2619
+
2620
+ function CharacterData() {
2621
+ };
2622
+ CharacterData.prototype = {
2623
+ data : '',
2624
+ substringData : function(offset, count) {
2625
+ return this.data.substring(offset, offset+count);
2626
+ },
2627
+ appendData: function(text) {
2628
+ text = this.data+text;
2629
+ this.nodeValue = this.data = text;
2630
+ this.length = text.length;
2631
+ },
2632
+ insertData: function(offset,text) {
2633
+ this.replaceData(offset,0,text);
2634
+
2635
+ },
2636
+ appendChild:function(newChild){
2637
+ throw new Error(ExceptionMessage[3])
2638
+ return Node.prototype.appendChild.apply(this,arguments)
2639
+ },
2640
+ deleteData: function(offset, count) {
2641
+ this.replaceData(offset,count,"");
2642
+ },
2643
+ replaceData: function(offset, count, text) {
2644
+ var start = this.data.substring(0,offset);
2645
+ var end = this.data.substring(offset+count);
2646
+ text = start + text + end;
2647
+ this.nodeValue = this.data = text;
2648
+ this.length = text.length;
2649
+ }
2650
+ }
2651
+ _extends(CharacterData,Node);
2652
+ function Text() {
2653
+ };
2654
+ Text.prototype = {
2655
+ nodeName : "#text",
2656
+ nodeType : TEXT_NODE,
2657
+ splitText : function(offset) {
2658
+ var text = this.data;
2659
+ var newText = text.substring(offset);
2660
+ text = text.substring(0, offset);
2661
+ this.data = this.nodeValue = text;
2662
+ this.length = text.length;
2663
+ var newNode = this.ownerDocument.createTextNode(newText);
2664
+ if(this.parentNode){
2665
+ this.parentNode.insertBefore(newNode, this.nextSibling);
2666
+ }
2667
+ return newNode;
2668
+ }
2669
+ }
2670
+ _extends(Text,CharacterData);
2671
+ function Comment() {
2672
+ };
2673
+ Comment.prototype = {
2674
+ nodeName : "#comment",
2675
+ nodeType : COMMENT_NODE
2676
+ }
2677
+ _extends(Comment,CharacterData);
2678
+
2679
+ function CDATASection() {
2680
+ };
2681
+ CDATASection.prototype = {
2682
+ nodeName : "#cdata-section",
2683
+ nodeType : CDATA_SECTION_NODE
2684
+ }
2685
+ _extends(CDATASection,CharacterData);
2686
+
2687
+
2688
+ function DocumentType() {
2689
+ };
2690
+ DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
2691
+ _extends(DocumentType,Node);
2692
+
2693
+ function Notation() {
2694
+ };
2695
+ Notation.prototype.nodeType = NOTATION_NODE;
2696
+ _extends(Notation,Node);
2697
+
2698
+ function Entity() {
2699
+ };
2700
+ Entity.prototype.nodeType = ENTITY_NODE;
2701
+ _extends(Entity,Node);
2702
+
2703
+ function EntityReference() {
2704
+ };
2705
+ EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
2706
+ _extends(EntityReference,Node);
2707
+
2708
+ function DocumentFragment() {
2709
+ };
2710
+ DocumentFragment.prototype.nodeName = "#document-fragment";
2711
+ DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
2712
+ _extends(DocumentFragment,Node);
2713
+
2714
+
2715
+ function ProcessingInstruction() {
2716
+ }
2717
+ ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
2718
+ _extends(ProcessingInstruction,Node);
2719
+ function XMLSerializer(){}
2720
+ XMLSerializer.prototype.serializeToString = function(node){
2721
+ var buf = [];
2722
+ serializeToString(node,buf);
2723
+ return buf.join('');
2724
+ }
2725
+ Node.prototype.toString =function(){
2726
+ return XMLSerializer.prototype.serializeToString(this);
2727
+ }
2728
+ function serializeToString(node,buf){
2729
+ switch(node.nodeType){
2730
+ case ELEMENT_NODE:
2731
+ var attrs = node.attributes;
2732
+ var len = attrs.length;
2733
+ var child = node.firstChild;
2734
+ var nodeName = node.tagName;
2735
+ var isHTML = htmlns === node.namespaceURI
2736
+ buf.push('<',nodeName);
2737
+ for(var i=0;i<len;i++){
2738
+ serializeToString(attrs.item(i),buf,isHTML);
2739
+ }
2740
+ if(child || isHTML && !/^(?:meta|link|img|br|hr|input|button)$/i.test(nodeName)){
2741
+ buf.push('>');
2742
+ if(isHTML && /^script$/i.test(nodeName)){
2743
+ if(child){
2744
+ buf.push(child.data);
2745
+ }
2746
+ }else{
2747
+ while(child){
2748
+ serializeToString(child,buf);
2749
+ child = child.nextSibling;
2750
+ }
2751
+ }
2752
+ buf.push('</',nodeName,'>');
2753
+ }else{
2754
+ buf.push('/>');
2755
+ }
2756
+ return;
2757
+ case DOCUMENT_NODE:
2758
+ case DOCUMENT_FRAGMENT_NODE:
2759
+ var child = node.firstChild;
2760
+ while(child){
2761
+ serializeToString(child,buf);
2762
+ child = child.nextSibling;
2763
+ }
2764
+ return;
2765
+ case ATTRIBUTE_NODE:
2766
+ return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"');
2767
+ case TEXT_NODE:
2768
+ return buf.push(node.data.replace(/[<&]/g,_xmlEncoder));
2769
+ case CDATA_SECTION_NODE:
2770
+ return buf.push( '<![CDATA[',node.data,']]>');
2771
+ case COMMENT_NODE:
2772
+ return buf.push( "<!--",node.data,"-->");
2773
+ case DOCUMENT_TYPE_NODE:
2774
+ var pubid = node.publicId;
2775
+ var sysid = node.systemId;
2776
+ buf.push('<!DOCTYPE ',node.name);
2777
+ if(pubid){
2778
+ buf.push(' PUBLIC "',pubid);
2779
+ if (sysid && sysid!='.') {
2780
+ buf.push( '" "',sysid);
2781
+ }
2782
+ buf.push('">');
2783
+ }else if(sysid && sysid!='.'){
2784
+ buf.push(' SYSTEM "',sysid,'">');
2785
+ }else{
2786
+ var sub = node.internalSubset;
2787
+ if(sub){
2788
+ buf.push(" [",sub,"]");
2789
+ }
2790
+ buf.push(">");
2791
+ }
2792
+ return;
2793
+ case PROCESSING_INSTRUCTION_NODE:
2794
+ return buf.push( "<?",node.target," ",node.data,"?>");
2795
+ case ENTITY_REFERENCE_NODE:
2796
+ return buf.push( '&',node.nodeName,';');
2797
+ default:
2798
+ buf.push('??',node.nodeName);
2799
+ }
2800
+ }
2801
+ function importNode(doc,node,deep){
2802
+ var node2;
2803
+ switch (node.nodeType) {
2804
+ case ELEMENT_NODE:
2805
+ node2 = node.cloneNode(false);
2806
+ node2.ownerDocument = doc;
2807
+ case DOCUMENT_FRAGMENT_NODE:
2808
+ break;
2809
+ case ATTRIBUTE_NODE:
2810
+ deep = true;
2811
+ break;
2812
+ }
2813
+ if(!node2){
2814
+ node2 = node.cloneNode(false);//false
2815
+ }
2816
+ node2.ownerDocument = doc;
2817
+ node2.parentNode = null;
2818
+ if(deep){
2819
+ var child = node.firstChild;
2820
+ while(child){
2821
+ node2.appendChild(importNode(doc,child,deep));
2822
+ child = child.nextSibling;
2823
+ }
2824
+ }
2825
+ return node2;
2826
+ }
2827
+ function cloneNode(doc,node,deep){
2828
+ var node2 = new node.constructor();
2829
+ for(var n in node){
2830
+ var v = node[n];
2831
+ if(typeof v != 'object' ){
2832
+ if(v != node2[n]){
2833
+ node2[n] = v;
2834
+ }
2835
+ }
2836
+ }
2837
+ if(node.childNodes){
2838
+ node2.childNodes = new NodeList();
2839
+ }
2840
+ node2.ownerDocument = doc;
2841
+ switch (node2.nodeType) {
2842
+ case ELEMENT_NODE:
2843
+ var attrs = node.attributes;
2844
+ var attrs2 = node2.attributes = new NamedNodeMap();
2845
+ var len = attrs.length
2846
+ attrs2._ownerElement = node2;
2847
+ for(var i=0;i<len;i++){
2848
+ node2.setAttributeNode(cloneNode(doc,attrs.item(i),true));
2849
+ }
2850
+ break;;
2851
+ case ATTRIBUTE_NODE:
2852
+ deep = true;
2853
+ }
2854
+ if(deep){
2855
+ var child = node.firstChild;
2856
+ while(child){
2857
+ node2.appendChild(cloneNode(doc,child,deep));
2858
+ child = child.nextSibling;
2859
+ }
2860
+ }
2861
+ return node2;
2862
+ }
2863
+
2864
+ function __set__(object,key,value){
2865
+ object[key] = value
2866
+ }
2867
+ try{
2868
+ if(Object.defineProperty){
2869
+ Object.defineProperty(LiveNodeList.prototype,'length',{
2870
+ get:function(){
2871
+ _updateLiveList(this);
2872
+ return this.$$length;
2873
+ }
2874
+ });
2875
+ Object.defineProperty(Node.prototype,'textContent',{
2876
+ get:function(){
2877
+ return getTextContent(this);
2878
+ },
2879
+ set:function(data){
2880
+ switch(this.nodeType){
2881
+ case 1:
2882
+ case 11:
2883
+ while(this.firstChild){
2884
+ this.removeChild(this.firstChild);
2885
+ }
2886
+ if(data || String(data)){
2887
+ this.appendChild(this.ownerDocument.createTextNode(data));
2888
+ }
2889
+ break;
2890
+ default:
2891
+ this.data = data;
2892
+ this.value = value;
2893
+ this.nodeValue = data;
2894
+ }
2895
+ }
2896
+ })
2897
+
2898
+ function getTextContent(node){
2899
+ switch(node.nodeType){
2900
+ case 1:
2901
+ case 11:
2902
+ var buf = [];
2903
+ node = node.firstChild;
2904
+ while(node){
2905
+ if(node.nodeType!==7 && node.nodeType !==8){
2906
+ buf.push(getTextContent(node));
2907
+ }
2908
+ node = node.nextSibling;
2909
+ }
2910
+ return buf.join('');
2911
+ default:
2912
+ return node.nodeValue;
2913
+ }
2914
+ }
2915
+ __set__ = function(object,key,value){
2916
+ object['$$'+key] = value
2917
+ }
2918
+ }
2919
+ }catch(e){//ie8
2920
+ }
2921
+
2922
+ return DOMImplementation;
2923
+ });
2924
+
2925
+ ace.define("ace/mode/xml/dom-parser",["require","exports","module","ace/mode/xml/sax","ace/mode/xml/dom"], function(require, exports, module) {
2926
+ 'use strict';
2927
+
2928
+ var XMLReader = require('./sax'),
2929
+ DOMImplementation = require('./dom');
2930
+
2931
+ function DOMParser(options){
2932
+ this.options = options ||{locator:{}};
2933
+
2934
+ }
2935
+ DOMParser.prototype.parseFromString = function(source,mimeType){
2936
+ var options = this.options;
2937
+ var sax = new XMLReader();
2938
+ var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler
2939
+ var errorHandler = options.errorHandler;
2940
+ var locator = options.locator;
2941
+ var defaultNSMap = options.xmlns||{};
2942
+ var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"}
2943
+ if(locator){
2944
+ domBuilder.setDocumentLocator(locator)
2945
+ }
2946
+
2947
+ sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
2948
+ sax.domBuilder = options.domBuilder || domBuilder;
2949
+ if(/\/x?html?$/.test(mimeType)){
2950
+ entityMap.nbsp = '\xa0';
2951
+ entityMap.copy = '\xa9';
2952
+ defaultNSMap['']= 'http://www.w3.org/1999/xhtml';
2953
+ }
2954
+ if(source){
2955
+ sax.parse(source,defaultNSMap,entityMap);
2956
+ }else{
2957
+ sax.errorHandler.error("invalid document source");
2958
+ }
2959
+ return domBuilder.document;
2960
+ }
2961
+ function buildErrorHandler(errorImpl,domBuilder,locator){
2962
+ if(!errorImpl){
2963
+ if(domBuilder instanceof DOMHandler){
2964
+ return domBuilder;
2965
+ }
2966
+ errorImpl = domBuilder ;
2967
+ }
2968
+ var errorHandler = {}
2969
+ var isCallback = errorImpl instanceof Function;
2970
+ locator = locator||{}
2971
+ function build(key){
2972
+ var fn = errorImpl[key];
2973
+ if(!fn){
2974
+ if(isCallback){
2975
+ fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;
2976
+ }else{
2977
+ var i=arguments.length;
2978
+ while(--i){
2979
+ if(fn = errorImpl[arguments[i]]){
2980
+ break;
2981
+ }
2982
+ }
2983
+ }
2984
+ }
2985
+ errorHandler[key] = fn && function(msg){
2986
+ fn(msg+_locator(locator), msg, locator);
2987
+ }||function(){};
2988
+ }
2989
+ build('warning','warn');
2990
+ build('error','warn','warning');
2991
+ build('fatalError','warn','warning','error');
2992
+ return errorHandler;
2993
+ }
2994
+ function DOMHandler() {
2995
+ this.cdata = false;
2996
+ }
2997
+ function position(locator,node){
2998
+ node.lineNumber = locator.lineNumber;
2999
+ node.columnNumber = locator.columnNumber;
3000
+ }
3001
+ DOMHandler.prototype = {
3002
+ startDocument : function() {
3003
+ this.document = new DOMImplementation().createDocument(null, null, null);
3004
+ if (this.locator) {
3005
+ this.document.documentURI = this.locator.systemId;
3006
+ }
3007
+ },
3008
+ startElement:function(namespaceURI, localName, qName, attrs) {
3009
+ var doc = this.document;
3010
+ var el = doc.createElementNS(namespaceURI, qName||localName);
3011
+ var len = attrs.length;
3012
+ appendElement(this, el);
3013
+ this.currentElement = el;
3014
+
3015
+ this.locator && position(this.locator,el)
3016
+ for (var i = 0 ; i < len; i++) {
3017
+ var namespaceURI = attrs.getURI(i);
3018
+ var value = attrs.getValue(i);
3019
+ var qName = attrs.getQName(i);
3020
+ var attr = doc.createAttributeNS(namespaceURI, qName);
3021
+ if( attr.getOffset){
3022
+ position(attr.getOffset(1),attr)
3023
+ }
3024
+ attr.value = attr.nodeValue = value;
3025
+ el.setAttributeNode(attr)
3026
+ }
3027
+ },
3028
+ endElement:function(namespaceURI, localName, qName) {
3029
+ var current = this.currentElement
3030
+ var tagName = current.tagName;
3031
+ this.currentElement = current.parentNode;
3032
+ },
3033
+ startPrefixMapping:function(prefix, uri) {
3034
+ },
3035
+ endPrefixMapping:function(prefix) {
3036
+ },
3037
+ processingInstruction:function(target, data) {
3038
+ var ins = this.document.createProcessingInstruction(target, data);
3039
+ this.locator && position(this.locator,ins)
3040
+ appendElement(this, ins);
3041
+ },
3042
+ ignorableWhitespace:function(ch, start, length) {
3043
+ },
3044
+ characters:function(chars, start, length) {
3045
+ chars = _toString.apply(this,arguments)
3046
+ if(this.currentElement && chars){
3047
+ if (this.cdata) {
3048
+ var charNode = this.document.createCDATASection(chars);
3049
+ this.currentElement.appendChild(charNode);
3050
+ } else {
3051
+ var charNode = this.document.createTextNode(chars);
3052
+ this.currentElement.appendChild(charNode);
3053
+ }
3054
+ this.locator && position(this.locator,charNode)
3055
+ }
3056
+ },
3057
+ skippedEntity:function(name) {
3058
+ },
3059
+ endDocument:function() {
3060
+ this.document.normalize();
3061
+ },
3062
+ setDocumentLocator:function (locator) {
3063
+ if(this.locator = locator){// && !('lineNumber' in locator)){
3064
+ locator.lineNumber = 0;
3065
+ }
3066
+ },
3067
+ comment:function(chars, start, length) {
3068
+ chars = _toString.apply(this,arguments)
3069
+ var comm = this.document.createComment(chars);
3070
+ this.locator && position(this.locator,comm)
3071
+ appendElement(this, comm);
3072
+ },
3073
+
3074
+ startCDATA:function() {
3075
+ this.cdata = true;
3076
+ },
3077
+ endCDATA:function() {
3078
+ this.cdata = false;
3079
+ },
3080
+
3081
+ startDTD:function(name, publicId, systemId) {
3082
+ var impl = this.document.implementation;
3083
+ if (impl && impl.createDocumentType) {
3084
+ var dt = impl.createDocumentType(name, publicId, systemId);
3085
+ this.locator && position(this.locator,dt)
3086
+ appendElement(this, dt);
3087
+ }
3088
+ },
3089
+ warning:function(error) {
3090
+ console.warn(error,_locator(this.locator));
3091
+ },
3092
+ error:function(error) {
3093
+ console.error(error,_locator(this.locator));
3094
+ },
3095
+ fatalError:function(error) {
3096
+ console.error(error,_locator(this.locator));
3097
+ throw error;
3098
+ }
3099
+ }
3100
+ function _locator(l){
3101
+ if(l){
3102
+ return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'
3103
+ }
3104
+ }
3105
+ function _toString(chars,start,length){
3106
+ if(typeof chars == 'string'){
3107
+ return chars.substr(start,length)
3108
+ }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)")
3109
+ if(chars.length >= start+length || start){
3110
+ return new java.lang.String(chars,start,length)+'';
3111
+ }
3112
+ return chars;
3113
+ }
3114
+ }
3115
+ "endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){
3116
+ DOMHandler.prototype[key] = function(){return null}
3117
+ })
3118
+ function appendElement (hander,node) {
3119
+ if (!hander.currentElement) {
3120
+ hander.document.appendChild(node);
3121
+ } else {
3122
+ hander.currentElement.appendChild(node);
3123
+ }
3124
+ }//appendChild and setAttributeNS are preformance key
3125
+
3126
+ return {
3127
+ DOMParser: DOMParser
3128
+ };
3129
+ });
3130
+
3131
+ ace.define("ace/mode/xml_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/xml/dom-parser"], function(require, exports, module) {
3132
+ "use strict";
3133
+
3134
+ var oop = require("../lib/oop");
3135
+ var lang = require("../lib/lang");
3136
+ var Mirror = require("../worker/mirror").Mirror;
3137
+ var DOMParser = require("./xml/dom-parser").DOMParser;
3138
+
3139
+ var Worker = exports.Worker = function(sender) {
3140
+ Mirror.call(this, sender);
3141
+ this.setTimeout(400);
3142
+ this.context = null;
3143
+ };
3144
+
3145
+ oop.inherits(Worker, Mirror);
3146
+
3147
+ (function() {
3148
+
3149
+ this.setOptions = function(options) {
3150
+ this.context = options.context;
3151
+ };
3152
+
3153
+ this.onUpdate = function() {
3154
+ var value = this.doc.getValue();
3155
+ if (!value)
3156
+ return;
3157
+ var parser = new DOMParser();
3158
+ var errors = [];
3159
+ parser.options.errorHandler = {
3160
+ fatalError: function(fullMsg, errorMsg, locator) {
3161
+ errors.push({
3162
+ row: locator.lineNumber,
3163
+ column: locator.columnNumber,
3164
+ text: errorMsg,
3165
+ type: "error"
3166
+ });
3167
+ },
3168
+ error: function(fullMsg, errorMsg, locator) {
3169
+ errors.push({
3170
+ row: locator.lineNumber,
3171
+ column: locator.columnNumber,
3172
+ text: errorMsg,
3173
+ type: "error"
3174
+ });
3175
+ },
3176
+ warning: function(fullMsg, errorMsg, locator) {
3177
+ errors.push({
3178
+ row: locator.lineNumber,
3179
+ column: locator.columnNumber,
3180
+ text: errorMsg,
3181
+ type: "warning"
3182
+ });
3183
+ }
3184
+ };
3185
+
3186
+ parser.parseFromString(value);
3187
+ this.sender.emit("error", errors);
3188
+ };
3189
+
3190
+ }).call(Worker.prototype);
3191
+
3192
+ });
3193
+
3194
+ ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
3195
+
3196
+ function Empty() {}
3197
+
3198
+ if (!Function.prototype.bind) {
3199
+ Function.prototype.bind = function bind(that) { // .length is 1
3200
+ var target = this;
3201
+ if (typeof target != "function") {
3202
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
3203
+ }
3204
+ var args = slice.call(arguments, 1); // for normal call
3205
+ var bound = function () {
3206
+
3207
+ if (this instanceof bound) {
3208
+
3209
+ var result = target.apply(
3210
+ this,
3211
+ args.concat(slice.call(arguments))
3212
+ );
3213
+ if (Object(result) === result) {
3214
+ return result;
3215
+ }
3216
+ return this;
3217
+
3218
+ } else {
3219
+ return target.apply(
3220
+ that,
3221
+ args.concat(slice.call(arguments))
3222
+ );
3223
+
3224
+ }
3225
+
3226
+ };
3227
+ if(target.prototype) {
3228
+ Empty.prototype = target.prototype;
3229
+ bound.prototype = new Empty();
3230
+ Empty.prototype = null;
3231
+ }
3232
+ return bound;
3233
+ };
3234
+ }
3235
+ var call = Function.prototype.call;
3236
+ var prototypeOfArray = Array.prototype;
3237
+ var prototypeOfObject = Object.prototype;
3238
+ var slice = prototypeOfArray.slice;
3239
+ var _toString = call.bind(prototypeOfObject.toString);
3240
+ var owns = call.bind(prototypeOfObject.hasOwnProperty);
3241
+ var defineGetter;
3242
+ var defineSetter;
3243
+ var lookupGetter;
3244
+ var lookupSetter;
3245
+ var supportsAccessors;
3246
+ if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
3247
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
3248
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
3249
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
3250
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
3251
+ }
3252
+ if ([1,2].splice(0).length != 2) {
3253
+ if(function() { // test IE < 9 to splice bug - see issue #138
3254
+ function makeArray(l) {
3255
+ var a = new Array(l+2);
3256
+ a[0] = a[1] = 0;
3257
+ return a;
3258
+ }
3259
+ var array = [], lengthBefore;
3260
+
3261
+ array.splice.apply(array, makeArray(20));
3262
+ array.splice.apply(array, makeArray(26));
3263
+
3264
+ lengthBefore = array.length; //46
3265
+ array.splice(5, 0, "XXX"); // add one element
3266
+
3267
+ lengthBefore + 1 == array.length
3268
+
3269
+ if (lengthBefore + 1 == array.length) {
3270
+ return true;// has right splice implementation without bugs
3271
+ }
3272
+ }()) {//IE 6/7
3273
+ var array_splice = Array.prototype.splice;
3274
+ Array.prototype.splice = function(start, deleteCount) {
3275
+ if (!arguments.length) {
3276
+ return [];
3277
+ } else {
3278
+ return array_splice.apply(this, [
3279
+ start === void 0 ? 0 : start,
3280
+ deleteCount === void 0 ? (this.length - start) : deleteCount
3281
+ ].concat(slice.call(arguments, 2)))
3282
+ }
3283
+ };
3284
+ } else {//IE8
3285
+ Array.prototype.splice = function(pos, removeCount){
3286
+ var length = this.length;
3287
+ if (pos > 0) {
3288
+ if (pos > length)
3289
+ pos = length;
3290
+ } else if (pos == void 0) {
3291
+ pos = 0;
3292
+ } else if (pos < 0) {
3293
+ pos = Math.max(length + pos, 0);
3294
+ }
3295
+
3296
+ if (!(pos+removeCount < length))
3297
+ removeCount = length - pos;
3298
+
3299
+ var removed = this.slice(pos, pos+removeCount);
3300
+ var insert = slice.call(arguments, 2);
3301
+ var add = insert.length;
3302
+ if (pos === length) {
3303
+ if (add) {
3304
+ this.push.apply(this, insert);
3305
+ }
3306
+ } else {
3307
+ var remove = Math.min(removeCount, length - pos);
3308
+ var tailOldPos = pos + remove;
3309
+ var tailNewPos = tailOldPos + add - remove;
3310
+ var tailCount = length - tailOldPos;
3311
+ var lengthAfterRemove = length - remove;
3312
+
3313
+ if (tailNewPos < tailOldPos) { // case A
3314
+ for (var i = 0; i < tailCount; ++i) {
3315
+ this[tailNewPos+i] = this[tailOldPos+i];
3316
+ }
3317
+ } else if (tailNewPos > tailOldPos) { // case B
3318
+ for (i = tailCount; i--; ) {
3319
+ this[tailNewPos+i] = this[tailOldPos+i];
3320
+ }
3321
+ } // else, add == remove (nothing to do)
3322
+
3323
+ if (add && pos === lengthAfterRemove) {
3324
+ this.length = lengthAfterRemove; // truncate array
3325
+ this.push.apply(this, insert);
3326
+ } else {
3327
+ this.length = lengthAfterRemove + add; // reserves space
3328
+ for (i = 0; i < add; ++i) {
3329
+ this[pos+i] = insert[i];
3330
+ }
3331
+ }
3332
+ }
3333
+ return removed;
3334
+ };
3335
+ }
3336
+ }
3337
+ if (!Array.isArray) {
3338
+ Array.isArray = function isArray(obj) {
3339
+ return _toString(obj) == "[object Array]";
3340
+ };
3341
+ }
3342
+ var boxedString = Object("a"),
3343
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
3344
+
3345
+ if (!Array.prototype.forEach) {
3346
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
3347
+ var object = toObject(this),
3348
+ self = splitString && _toString(this) == "[object String]" ?
3349
+ this.split("") :
3350
+ object,
3351
+ thisp = arguments[1],
3352
+ i = -1,
3353
+ length = self.length >>> 0;
3354
+ if (_toString(fun) != "[object Function]") {
3355
+ throw new TypeError(); // TODO message
3356
+ }
3357
+
3358
+ while (++i < length) {
3359
+ if (i in self) {
3360
+ fun.call(thisp, self[i], i, object);
3361
+ }
3362
+ }
3363
+ };
3364
+ }
3365
+ if (!Array.prototype.map) {
3366
+ Array.prototype.map = function map(fun /*, thisp*/) {
3367
+ var object = toObject(this),
3368
+ self = splitString && _toString(this) == "[object String]" ?
3369
+ this.split("") :
3370
+ object,
3371
+ length = self.length >>> 0,
3372
+ result = Array(length),
3373
+ thisp = arguments[1];
3374
+ if (_toString(fun) != "[object Function]") {
3375
+ throw new TypeError(fun + " is not a function");
3376
+ }
3377
+
3378
+ for (var i = 0; i < length; i++) {
3379
+ if (i in self)
3380
+ result[i] = fun.call(thisp, self[i], i, object);
3381
+ }
3382
+ return result;
3383
+ };
3384
+ }
3385
+ if (!Array.prototype.filter) {
3386
+ Array.prototype.filter = function filter(fun /*, thisp */) {
3387
+ var object = toObject(this),
3388
+ self = splitString && _toString(this) == "[object String]" ?
3389
+ this.split("") :
3390
+ object,
3391
+ length = self.length >>> 0,
3392
+ result = [],
3393
+ value,
3394
+ thisp = arguments[1];
3395
+ if (_toString(fun) != "[object Function]") {
3396
+ throw new TypeError(fun + " is not a function");
3397
+ }
3398
+
3399
+ for (var i = 0; i < length; i++) {
3400
+ if (i in self) {
3401
+ value = self[i];
3402
+ if (fun.call(thisp, value, i, object)) {
3403
+ result.push(value);
3404
+ }
3405
+ }
3406
+ }
3407
+ return result;
3408
+ };
3409
+ }
3410
+ if (!Array.prototype.every) {
3411
+ Array.prototype.every = function every(fun /*, thisp */) {
3412
+ var object = toObject(this),
3413
+ self = splitString && _toString(this) == "[object String]" ?
3414
+ this.split("") :
3415
+ object,
3416
+ length = self.length >>> 0,
3417
+ thisp = arguments[1];
3418
+ if (_toString(fun) != "[object Function]") {
3419
+ throw new TypeError(fun + " is not a function");
3420
+ }
3421
+
3422
+ for (var i = 0; i < length; i++) {
3423
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
3424
+ return false;
3425
+ }
3426
+ }
3427
+ return true;
3428
+ };
3429
+ }
3430
+ if (!Array.prototype.some) {
3431
+ Array.prototype.some = function some(fun /*, thisp */) {
3432
+ var object = toObject(this),
3433
+ self = splitString && _toString(this) == "[object String]" ?
3434
+ this.split("") :
3435
+ object,
3436
+ length = self.length >>> 0,
3437
+ thisp = arguments[1];
3438
+ if (_toString(fun) != "[object Function]") {
3439
+ throw new TypeError(fun + " is not a function");
3440
+ }
3441
+
3442
+ for (var i = 0; i < length; i++) {
3443
+ if (i in self && fun.call(thisp, self[i], i, object)) {
3444
+ return true;
3445
+ }
3446
+ }
3447
+ return false;
3448
+ };
3449
+ }
3450
+ if (!Array.prototype.reduce) {
3451
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
3452
+ var object = toObject(this),
3453
+ self = splitString && _toString(this) == "[object String]" ?
3454
+ this.split("") :
3455
+ object,
3456
+ length = self.length >>> 0;
3457
+ if (_toString(fun) != "[object Function]") {
3458
+ throw new TypeError(fun + " is not a function");
3459
+ }
3460
+ if (!length && arguments.length == 1) {
3461
+ throw new TypeError("reduce of empty array with no initial value");
3462
+ }
3463
+
3464
+ var i = 0;
3465
+ var result;
3466
+ if (arguments.length >= 2) {
3467
+ result = arguments[1];
3468
+ } else {
3469
+ do {
3470
+ if (i in self) {
3471
+ result = self[i++];
3472
+ break;
3473
+ }
3474
+ if (++i >= length) {
3475
+ throw new TypeError("reduce of empty array with no initial value");
3476
+ }
3477
+ } while (true);
3478
+ }
3479
+
3480
+ for (; i < length; i++) {
3481
+ if (i in self) {
3482
+ result = fun.call(void 0, result, self[i], i, object);
3483
+ }
3484
+ }
3485
+
3486
+ return result;
3487
+ };
3488
+ }
3489
+ if (!Array.prototype.reduceRight) {
3490
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
3491
+ var object = toObject(this),
3492
+ self = splitString && _toString(this) == "[object String]" ?
3493
+ this.split("") :
3494
+ object,
3495
+ length = self.length >>> 0;
3496
+ if (_toString(fun) != "[object Function]") {
3497
+ throw new TypeError(fun + " is not a function");
3498
+ }
3499
+ if (!length && arguments.length == 1) {
3500
+ throw new TypeError("reduceRight of empty array with no initial value");
3501
+ }
3502
+
3503
+ var result, i = length - 1;
3504
+ if (arguments.length >= 2) {
3505
+ result = arguments[1];
3506
+ } else {
3507
+ do {
3508
+ if (i in self) {
3509
+ result = self[i--];
3510
+ break;
3511
+ }
3512
+ if (--i < 0) {
3513
+ throw new TypeError("reduceRight of empty array with no initial value");
3514
+ }
3515
+ } while (true);
3516
+ }
3517
+
3518
+ do {
3519
+ if (i in this) {
3520
+ result = fun.call(void 0, result, self[i], i, object);
3521
+ }
3522
+ } while (i--);
3523
+
3524
+ return result;
3525
+ };
3526
+ }
3527
+ if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
3528
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
3529
+ var self = splitString && _toString(this) == "[object String]" ?
3530
+ this.split("") :
3531
+ toObject(this),
3532
+ length = self.length >>> 0;
3533
+
3534
+ if (!length) {
3535
+ return -1;
3536
+ }
3537
+
3538
+ var i = 0;
3539
+ if (arguments.length > 1) {
3540
+ i = toInteger(arguments[1]);
3541
+ }
3542
+ i = i >= 0 ? i : Math.max(0, length + i);
3543
+ for (; i < length; i++) {
3544
+ if (i in self && self[i] === sought) {
3545
+ return i;
3546
+ }
3547
+ }
3548
+ return -1;
3549
+ };
3550
+ }
3551
+ if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
3552
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
3553
+ var self = splitString && _toString(this) == "[object String]" ?
3554
+ this.split("") :
3555
+ toObject(this),
3556
+ length = self.length >>> 0;
3557
+
3558
+ if (!length) {
3559
+ return -1;
3560
+ }
3561
+ var i = length - 1;
3562
+ if (arguments.length > 1) {
3563
+ i = Math.min(i, toInteger(arguments[1]));
3564
+ }
3565
+ i = i >= 0 ? i : length - Math.abs(i);
3566
+ for (; i >= 0; i--) {
3567
+ if (i in self && sought === self[i]) {
3568
+ return i;
3569
+ }
3570
+ }
3571
+ return -1;
3572
+ };
3573
+ }
3574
+ if (!Object.getPrototypeOf) {
3575
+ Object.getPrototypeOf = function getPrototypeOf(object) {
3576
+ return object.__proto__ || (
3577
+ object.constructor ?
3578
+ object.constructor.prototype :
3579
+ prototypeOfObject
3580
+ );
3581
+ };
3582
+ }
3583
+ if (!Object.getOwnPropertyDescriptor) {
3584
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
3585
+ "non-object: ";
3586
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
3587
+ if ((typeof object != "object" && typeof object != "function") || object === null)
3588
+ throw new TypeError(ERR_NON_OBJECT + object);
3589
+ if (!owns(object, property))
3590
+ return;
3591
+
3592
+ var descriptor, getter, setter;
3593
+ descriptor = { enumerable: true, configurable: true };
3594
+ if (supportsAccessors) {
3595
+ var prototype = object.__proto__;
3596
+ object.__proto__ = prototypeOfObject;
3597
+
3598
+ var getter = lookupGetter(object, property);
3599
+ var setter = lookupSetter(object, property);
3600
+ object.__proto__ = prototype;
3601
+
3602
+ if (getter || setter) {
3603
+ if (getter) descriptor.get = getter;
3604
+ if (setter) descriptor.set = setter;
3605
+ return descriptor;
3606
+ }
3607
+ }
3608
+ descriptor.value = object[property];
3609
+ return descriptor;
3610
+ };
3611
+ }
3612
+ if (!Object.getOwnPropertyNames) {
3613
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
3614
+ return Object.keys(object);
3615
+ };
3616
+ }
3617
+ if (!Object.create) {
3618
+ var createEmpty;
3619
+ if (Object.prototype.__proto__ === null) {
3620
+ createEmpty = function () {
3621
+ return { "__proto__": null };
3622
+ };
3623
+ } else {
3624
+ createEmpty = function () {
3625
+ var empty = {};
3626
+ for (var i in empty)
3627
+ empty[i] = null;
3628
+ empty.constructor =
3629
+ empty.hasOwnProperty =
3630
+ empty.propertyIsEnumerable =
3631
+ empty.isPrototypeOf =
3632
+ empty.toLocaleString =
3633
+ empty.toString =
3634
+ empty.valueOf =
3635
+ empty.__proto__ = null;
3636
+ return empty;
3637
+ }
3638
+ }
3639
+
3640
+ Object.create = function create(prototype, properties) {
3641
+ var object;
3642
+ if (prototype === null) {
3643
+ object = createEmpty();
3644
+ } else {
3645
+ if (typeof prototype != "object")
3646
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
3647
+ var Type = function () {};
3648
+ Type.prototype = prototype;
3649
+ object = new Type();
3650
+ object.__proto__ = prototype;
3651
+ }
3652
+ if (properties !== void 0)
3653
+ Object.defineProperties(object, properties);
3654
+ return object;
3655
+ };
3656
+ }
3657
+
3658
+ function doesDefinePropertyWork(object) {
3659
+ try {
3660
+ Object.defineProperty(object, "sentinel", {});
3661
+ return "sentinel" in object;
3662
+ } catch (exception) {
3663
+ }
3664
+ }
3665
+ if (Object.defineProperty) {
3666
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
3667
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
3668
+ doesDefinePropertyWork(document.createElement("div"));
3669
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
3670
+ var definePropertyFallback = Object.defineProperty;
3671
+ }
3672
+ }
3673
+
3674
+ if (!Object.defineProperty || definePropertyFallback) {
3675
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
3676
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
3677
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
3678
+ "on this javascript engine";
3679
+
3680
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
3681
+ if ((typeof object != "object" && typeof object != "function") || object === null)
3682
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
3683
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
3684
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
3685
+ if (definePropertyFallback) {
3686
+ try {
3687
+ return definePropertyFallback.call(Object, object, property, descriptor);
3688
+ } catch (exception) {
3689
+ }
3690
+ }
3691
+ if (owns(descriptor, "value")) {
3692
+
3693
+ if (supportsAccessors && (lookupGetter(object, property) ||
3694
+ lookupSetter(object, property)))
3695
+ {
3696
+ var prototype = object.__proto__;
3697
+ object.__proto__ = prototypeOfObject;
3698
+ delete object[property];
3699
+ object[property] = descriptor.value;
3700
+ object.__proto__ = prototype;
3701
+ } else {
3702
+ object[property] = descriptor.value;
3703
+ }
3704
+ } else {
3705
+ if (!supportsAccessors)
3706
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
3707
+ if (owns(descriptor, "get"))
3708
+ defineGetter(object, property, descriptor.get);
3709
+ if (owns(descriptor, "set"))
3710
+ defineSetter(object, property, descriptor.set);
3711
+ }
3712
+
3713
+ return object;
3714
+ };
3715
+ }
3716
+ if (!Object.defineProperties) {
3717
+ Object.defineProperties = function defineProperties(object, properties) {
3718
+ for (var property in properties) {
3719
+ if (owns(properties, property))
3720
+ Object.defineProperty(object, property, properties[property]);
3721
+ }
3722
+ return object;
3723
+ };
3724
+ }
3725
+ if (!Object.seal) {
3726
+ Object.seal = function seal(object) {
3727
+ return object;
3728
+ };
3729
+ }
3730
+ if (!Object.freeze) {
3731
+ Object.freeze = function freeze(object) {
3732
+ return object;
3733
+ };
3734
+ }
3735
+ try {
3736
+ Object.freeze(function () {});
3737
+ } catch (exception) {
3738
+ Object.freeze = (function freeze(freezeObject) {
3739
+ return function freeze(object) {
3740
+ if (typeof object == "function") {
3741
+ return object;
3742
+ } else {
3743
+ return freezeObject(object);
3744
+ }
3745
+ };
3746
+ })(Object.freeze);
3747
+ }
3748
+ if (!Object.preventExtensions) {
3749
+ Object.preventExtensions = function preventExtensions(object) {
3750
+ return object;
3751
+ };
3752
+ }
3753
+ if (!Object.isSealed) {
3754
+ Object.isSealed = function isSealed(object) {
3755
+ return false;
3756
+ };
3757
+ }
3758
+ if (!Object.isFrozen) {
3759
+ Object.isFrozen = function isFrozen(object) {
3760
+ return false;
3761
+ };
3762
+ }
3763
+ if (!Object.isExtensible) {
3764
+ Object.isExtensible = function isExtensible(object) {
3765
+ if (Object(object) === object) {
3766
+ throw new TypeError(); // TODO message
3767
+ }
3768
+ var name = '';
3769
+ while (owns(object, name)) {
3770
+ name += '?';
3771
+ }
3772
+ object[name] = true;
3773
+ var returnValue = owns(object, name);
3774
+ delete object[name];
3775
+ return returnValue;
3776
+ };
3777
+ }
3778
+ if (!Object.keys) {
3779
+ var hasDontEnumBug = true,
3780
+ dontEnums = [
3781
+ "toString",
3782
+ "toLocaleString",
3783
+ "valueOf",
3784
+ "hasOwnProperty",
3785
+ "isPrototypeOf",
3786
+ "propertyIsEnumerable",
3787
+ "constructor"
3788
+ ],
3789
+ dontEnumsLength = dontEnums.length;
3790
+
3791
+ for (var key in {"toString": null}) {
3792
+ hasDontEnumBug = false;
3793
+ }
3794
+
3795
+ Object.keys = function keys(object) {
3796
+
3797
+ if (
3798
+ (typeof object != "object" && typeof object != "function") ||
3799
+ object === null
3800
+ ) {
3801
+ throw new TypeError("Object.keys called on a non-object");
3802
+ }
3803
+
3804
+ var keys = [];
3805
+ for (var name in object) {
3806
+ if (owns(object, name)) {
3807
+ keys.push(name);
3808
+ }
3809
+ }
3810
+
3811
+ if (hasDontEnumBug) {
3812
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
3813
+ var dontEnum = dontEnums[i];
3814
+ if (owns(object, dontEnum)) {
3815
+ keys.push(dontEnum);
3816
+ }
3817
+ }
3818
+ }
3819
+ return keys;
3820
+ };
3821
+
3822
+ }
3823
+ if (!Date.now) {
3824
+ Date.now = function now() {
3825
+ return new Date().getTime();
3826
+ };
3827
+ }
3828
+ var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
3829
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
3830
+ "\u2029\uFEFF";
3831
+ if (!String.prototype.trim || ws.trim()) {
3832
+ ws = "[" + ws + "]";
3833
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
3834
+ trimEndRegexp = new RegExp(ws + ws + "*$");
3835
+ String.prototype.trim = function trim() {
3836
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
3837
+ };
3838
+ }
3839
+
3840
+ function toInteger(n) {
3841
+ n = +n;
3842
+ if (n !== n) { // isNaN
3843
+ n = 0;
3844
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
3845
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
3846
+ }
3847
+ return n;
3848
+ }
3849
+
3850
+ function isPrimitive(input) {
3851
+ var type = typeof input;
3852
+ return (
3853
+ input === null ||
3854
+ type === "undefined" ||
3855
+ type === "boolean" ||
3856
+ type === "number" ||
3857
+ type === "string"
3858
+ );
3859
+ }
3860
+
3861
+ function toPrimitive(input) {
3862
+ var val, valueOf, toString;
3863
+ if (isPrimitive(input)) {
3864
+ return input;
3865
+ }
3866
+ valueOf = input.valueOf;
3867
+ if (typeof valueOf === "function") {
3868
+ val = valueOf.call(input);
3869
+ if (isPrimitive(val)) {
3870
+ return val;
3871
+ }
3872
+ }
3873
+ toString = input.toString;
3874
+ if (typeof toString === "function") {
3875
+ val = toString.call(input);
3876
+ if (isPrimitive(val)) {
3877
+ return val;
3878
+ }
3879
+ }
3880
+ throw new TypeError();
3881
+ }
3882
+ var toObject = function (o) {
3883
+ if (o == null) { // this matches both null and undefined
3884
+ throw new TypeError("can't convert "+o+" to object");
3885
+ }
3886
+ return Object(o);
3887
+ };
3888
+
3889
+ });