phcthemes_admin_panel_pack 4.0.7 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (313) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -20
  3. data/README.md +2 -0
  4. data/Rakefile +8 -8
  5. data/app/assets/config/phcthemes_admin_panel_pack_manifest.js +9 -9
  6. data/app/assets/javascripts/common/backstretch/jquery.backstretch.js +1602 -1602
  7. data/app/assets/javascripts/common/bootstrap/bootstrap.bundle.js +7023 -7023
  8. data/app/assets/javascripts/common/bootstrap/bootstrap.three.js +2377 -2377
  9. data/app/assets/javascripts/common/bootstrap-datepicker/bootstrap-datepicker.js +2039 -2039
  10. data/app/assets/javascripts/common/bootstrap-markdown/bootstrap-markdown.js +1390 -1390
  11. data/app/assets/javascripts/common/bootstrap-select/bootstrap-select.js +0 -0
  12. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-am_ET.js +0 -0
  13. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-am_ET.js.map +0 -0
  14. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-am_ET.min.js +7 -7
  15. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ar_AR.js +0 -0
  16. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ar_AR.js.map +0 -0
  17. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ar_AR.min.js +7 -7
  18. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-bg_BG.js +0 -0
  19. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-bg_BG.js.map +0 -0
  20. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-bg_BG.min.js +7 -7
  21. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-cs_CZ.js +0 -0
  22. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-cs_CZ.js.map +0 -0
  23. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-cs_CZ.min.js +7 -7
  24. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-da_DK.js +0 -0
  25. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-da_DK.js.map +0 -0
  26. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-da_DK.min.js +7 -7
  27. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-de_DE.js +0 -0
  28. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-de_DE.js.map +0 -0
  29. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-de_DE.min.js +7 -7
  30. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-en_US.js +0 -0
  31. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-en_US.js.map +0 -0
  32. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-en_US.min.js +7 -7
  33. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_CL.js +0 -0
  34. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_CL.js.map +0 -0
  35. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_CL.min.js +7 -7
  36. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_ES.js +0 -0
  37. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_ES.js.map +0 -0
  38. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_ES.min.js +7 -7
  39. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-et_EE.js +0 -0
  40. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-et_EE.js.map +0 -0
  41. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-et_EE.min.js +7 -7
  42. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-eu.js +0 -0
  43. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-eu.js.map +0 -0
  44. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-eu.min.js +7 -7
  45. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fa_IR.js +0 -0
  46. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fa_IR.js.map +0 -0
  47. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fa_IR.min.js +7 -7
  48. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fi_FI.js +0 -0
  49. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fi_FI.js.map +0 -0
  50. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fi_FI.min.js +7 -7
  51. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fr_FR.js +0 -0
  52. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fr_FR.js.map +0 -0
  53. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fr_FR.min.js +7 -7
  54. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hr_HR.js +0 -0
  55. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hr_HR.js.map +0 -0
  56. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hr_HR.min.js +7 -7
  57. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hu_HU.js +0 -0
  58. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hu_HU.js.map +0 -0
  59. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hu_HU.min.js +7 -7
  60. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-id_ID.js +0 -0
  61. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-id_ID.js.map +0 -0
  62. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-id_ID.min.js +7 -7
  63. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-it_IT.js +0 -0
  64. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-it_IT.js.map +0 -0
  65. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-it_IT.min.js +7 -7
  66. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ja_JP.js +0 -0
  67. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ja_JP.js.map +0 -0
  68. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ja_JP.min.js +7 -7
  69. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-kh_KM.js +0 -0
  70. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-kh_KM.js.map +0 -0
  71. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-kh_KM.min.js +7 -7
  72. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ko_KR.js +0 -0
  73. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ko_KR.js.map +0 -0
  74. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ko_KR.min.js +7 -7
  75. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lt_LT.js +0 -0
  76. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lt_LT.js.map +0 -0
  77. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lt_LT.min.js +7 -7
  78. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lv_LV.js +0 -0
  79. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lv_LV.js.map +0 -0
  80. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lv_LV.min.js +7 -7
  81. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nb_NO.js +0 -0
  82. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nb_NO.js.map +0 -0
  83. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nb_NO.min.js +7 -7
  84. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nl_NL.js +0 -0
  85. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nl_NL.js.map +0 -0
  86. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nl_NL.min.js +7 -7
  87. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pl_PL.js +0 -0
  88. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pl_PL.js.map +0 -0
  89. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pl_PL.min.js +7 -7
  90. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_BR.js +0 -0
  91. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_BR.js.map +0 -0
  92. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_BR.min.js +7 -7
  93. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_PT.js +0 -0
  94. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_PT.js.map +0 -0
  95. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_PT.min.js +7 -7
  96. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ro_RO.js +0 -0
  97. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ro_RO.js.map +0 -0
  98. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ro_RO.min.js +7 -7
  99. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ru_RU.js +0 -0
  100. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ru_RU.js.map +0 -0
  101. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ru_RU.min.js +7 -7
  102. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sk_SK.js +0 -0
  103. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sk_SK.js.map +0 -0
  104. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sk_SK.min.js +7 -7
  105. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sl_SI.js +0 -0
  106. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sl_SI.js.map +0 -0
  107. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sl_SI.min.js +7 -7
  108. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sv_SE.js +0 -0
  109. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sv_SE.js.map +0 -0
  110. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sv_SE.min.js +7 -7
  111. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-tr_TR.js +0 -0
  112. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-tr_TR.js.map +0 -0
  113. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-tr_TR.min.js +7 -7
  114. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ua_UA.js +0 -0
  115. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ua_UA.js.map +0 -0
  116. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ua_UA.min.js +7 -7
  117. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-vi_VN.js +0 -0
  118. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-vi_VN.js.map +0 -0
  119. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-vi_VN.min.js +7 -7
  120. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_CN.js +0 -0
  121. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_CN.js.map +0 -0
  122. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_CN.min.js +7 -7
  123. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_TW.js +0 -0
  124. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_TW.js.map +0 -0
  125. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_TW.min.js +7 -7
  126. data/app/assets/javascripts/common/chartjs/chart.js +0 -0
  127. data/app/assets/javascripts/common/ckeditor/ckeditor.js +6 -6
  128. data/app/assets/javascripts/common/ckeditor/ckeditor.js.map +0 -0
  129. data/app/assets/javascripts/common/ckeditor/translations/af.js +0 -0
  130. data/app/assets/javascripts/common/ckeditor/translations/ar.js +0 -0
  131. data/app/assets/javascripts/common/ckeditor/translations/ast.js +0 -0
  132. data/app/assets/javascripts/common/ckeditor/translations/az.js +0 -0
  133. data/app/assets/javascripts/common/ckeditor/translations/bg.js +0 -0
  134. data/app/assets/javascripts/common/ckeditor/translations/ca.js +0 -0
  135. data/app/assets/javascripts/common/ckeditor/translations/cs.js +0 -0
  136. data/app/assets/javascripts/common/ckeditor/translations/da.js +0 -0
  137. data/app/assets/javascripts/common/ckeditor/translations/de-ch.js +0 -0
  138. data/app/assets/javascripts/common/ckeditor/translations/de.js +0 -0
  139. data/app/assets/javascripts/common/ckeditor/translations/el.js +0 -0
  140. data/app/assets/javascripts/common/ckeditor/translations/en-au.js +0 -0
  141. data/app/assets/javascripts/common/ckeditor/translations/en-gb.js +0 -0
  142. data/app/assets/javascripts/common/ckeditor/translations/eo.js +0 -0
  143. data/app/assets/javascripts/common/ckeditor/translations/es.js +0 -0
  144. data/app/assets/javascripts/common/ckeditor/translations/et.js +0 -0
  145. data/app/assets/javascripts/common/ckeditor/translations/eu.js +0 -0
  146. data/app/assets/javascripts/common/ckeditor/translations/fa.js +0 -0
  147. data/app/assets/javascripts/common/ckeditor/translations/fi.js +0 -0
  148. data/app/assets/javascripts/common/ckeditor/translations/fr.js +0 -0
  149. data/app/assets/javascripts/common/ckeditor/translations/gl.js +0 -0
  150. data/app/assets/javascripts/common/ckeditor/translations/gu.js +0 -0
  151. data/app/assets/javascripts/common/ckeditor/translations/he.js +0 -0
  152. data/app/assets/javascripts/common/ckeditor/translations/hr.js +0 -0
  153. data/app/assets/javascripts/common/ckeditor/translations/hu.js +0 -0
  154. data/app/assets/javascripts/common/ckeditor/translations/id.js +0 -0
  155. data/app/assets/javascripts/common/ckeditor/translations/it.js +0 -0
  156. data/app/assets/javascripts/common/ckeditor/translations/ja.js +0 -0
  157. data/app/assets/javascripts/common/ckeditor/translations/km.js +0 -0
  158. data/app/assets/javascripts/common/ckeditor/translations/kn.js +0 -0
  159. data/app/assets/javascripts/common/ckeditor/translations/ko.js +0 -0
  160. data/app/assets/javascripts/common/ckeditor/translations/ku.js +0 -0
  161. data/app/assets/javascripts/common/ckeditor/translations/lt.js +0 -0
  162. data/app/assets/javascripts/common/ckeditor/translations/lv.js +0 -0
  163. data/app/assets/javascripts/common/ckeditor/translations/nb.js +0 -0
  164. data/app/assets/javascripts/common/ckeditor/translations/ne.js +0 -0
  165. data/app/assets/javascripts/common/ckeditor/translations/nl.js +0 -0
  166. data/app/assets/javascripts/common/ckeditor/translations/no.js +0 -0
  167. data/app/assets/javascripts/common/ckeditor/translations/oc.js +0 -0
  168. data/app/assets/javascripts/common/ckeditor/translations/pl.js +0 -0
  169. data/app/assets/javascripts/common/ckeditor/translations/pt-br.js +0 -0
  170. data/app/assets/javascripts/common/ckeditor/translations/pt.js +0 -0
  171. data/app/assets/javascripts/common/ckeditor/translations/ro.js +0 -0
  172. data/app/assets/javascripts/common/ckeditor/translations/ru.js +0 -0
  173. data/app/assets/javascripts/common/ckeditor/translations/si.js +0 -0
  174. data/app/assets/javascripts/common/ckeditor/translations/sk.js +0 -0
  175. data/app/assets/javascripts/common/ckeditor/translations/sl.js +0 -0
  176. data/app/assets/javascripts/common/ckeditor/translations/sq.js +0 -0
  177. data/app/assets/javascripts/common/ckeditor/translations/sr-latn.js +0 -0
  178. data/app/assets/javascripts/common/ckeditor/translations/sr.js +0 -0
  179. data/app/assets/javascripts/common/ckeditor/translations/sv.js +0 -0
  180. data/app/assets/javascripts/common/ckeditor/translations/th.js +0 -0
  181. data/app/assets/javascripts/common/ckeditor/translations/tr.js +0 -0
  182. data/app/assets/javascripts/common/ckeditor/translations/tt.js +0 -0
  183. data/app/assets/javascripts/common/ckeditor/translations/ug.js +0 -0
  184. data/app/assets/javascripts/common/ckeditor/translations/uk.js +0 -0
  185. data/app/assets/javascripts/common/ckeditor/translations/vi.js +0 -0
  186. data/app/assets/javascripts/common/ckeditor/translations/zh-cn.js +0 -0
  187. data/app/assets/javascripts/common/ckeditor/translations/zh.js +0 -0
  188. data/app/assets/javascripts/common/clipboardjs/clipboard.js +977 -977
  189. data/app/assets/javascripts/common/covervid/covervid.js +94 -94
  190. data/app/assets/javascripts/common/custom/custom.js +0 -0
  191. data/app/assets/javascripts/common/datatables/datatables.js +15310 -15310
  192. data/app/assets/javascripts/common/daterangepicker/daterangepicker.js +1565 -1565
  193. data/app/assets/javascripts/common/fastclick/fastclick.js +841 -841
  194. data/app/assets/javascripts/common/flexslider/jquery.flexslider.js +1252 -1252
  195. data/app/assets/javascripts/common/greenstock/greensock.js +35 -35
  196. data/app/assets/javascripts/common/html5sortable/jquery.sortable.js +98 -98
  197. data/app/assets/javascripts/common/icheck/icheck.js +509 -509
  198. data/app/assets/javascripts/common/imagesloaded/imagesloaded.pkgd.js +497 -497
  199. data/app/assets/javascripts/common/isotope/isotope.pkgd.js +3563 -3563
  200. data/app/assets/javascripts/common/jquery/jquery-3.4.1.js +10598 -10598
  201. data/app/assets/javascripts/common/jquery-countdown/jquery.countdown.js +245 -245
  202. data/app/assets/javascripts/common/jquery-filterizer/jquery.filterizr.min.js +0 -0
  203. data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.autogrow.js +37 -37
  204. data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.charcounter.js +53 -53
  205. data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.checkbox.js +54 -54
  206. data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.datepicker.js +59 -59
  207. data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.js +823 -823
  208. data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.masked.js +46 -46
  209. data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.time.js +71 -71
  210. data/app/assets/javascripts/common/jquery-jvectormap/jquery-jvectormap.js +44 -44
  211. data/app/assets/javascripts/common/jquery-placeholder/jquery.placeholder.js +281 -281
  212. data/app/assets/javascripts/common/jquery-slimscroll/jquery.slimscroll.js +474 -474
  213. data/app/assets/javascripts/common/jquery-sparkline/jquery.sparkline.js +3054 -3054
  214. data/app/assets/javascripts/common/jquery-ui/jquery-ui.js +18705 -18705
  215. data/app/assets/javascripts/common/jquery-validation/jquery.validate.js +0 -0
  216. data/app/assets/javascripts/common/jqvmap/jquery.vmap.js +1281 -1281
  217. data/app/assets/javascripts/common/jqvmap/jquery.vmap.min.js +9 -9
  218. data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.africa.js +2 -2
  219. data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.asia.js +2 -2
  220. data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.australia.js +2 -2
  221. data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.europe.js +2 -2
  222. data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.north-america.js +2 -2
  223. data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.south-america.js +2 -2
  224. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.algeria.js +2 -2
  225. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.argentina.js +1 -1
  226. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.brazil.js +2 -2
  227. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.canada.js +1 -1
  228. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.europe.js +2 -2
  229. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.france.js +1 -1
  230. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.germany.js +2 -2
  231. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.greece.js +1 -1
  232. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.iran.js +6 -6
  233. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.iraq.js +1 -1
  234. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.russia.js +2 -2
  235. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.tunisia.js +2 -2
  236. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.turkey.js +11 -11
  237. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.usa.js +2 -2
  238. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.world.js +2 -2
  239. data/app/assets/javascripts/common/js-cookie/js.cookie.js +165 -165
  240. data/app/assets/javascripts/common/layerslider/layerslider.kreaturamedia.jquery.js +12 -12
  241. data/app/assets/javascripts/common/layerslider/layerslider.origami.js +12 -12
  242. data/app/assets/javascripts/common/layerslider/layerslider.timeline.js +12 -12
  243. data/app/assets/javascripts/common/layerslider/layerslider.transitions.js +12 -12
  244. data/app/assets/javascripts/common/lazysizes/lazysizes.js +754 -754
  245. data/app/assets/javascripts/common/leaflet/leaflet.js +4 -4
  246. data/app/assets/javascripts/common/magnific-popup/jquery.magnific-popup.js +1859 -1859
  247. data/app/assets/javascripts/common/mapbox/mapbox.js +51 -51
  248. data/app/assets/javascripts/common/metismenu/metisMenu.js +340 -340
  249. data/app/assets/javascripts/common/moderizer/modernizr.js +11 -11
  250. data/app/assets/javascripts/common/nouislider/nouislider.js +2637 -2637
  251. data/app/assets/javascripts/common/owl-carousel/owl.carousel.js +3448 -3448
  252. data/app/assets/javascripts/common/pace/pace.js +935 -935
  253. data/app/assets/javascripts/common/paroller/jquery.paroller.js +228 -228
  254. data/app/assets/javascripts/common/particlejs/particles.js +1540 -1540
  255. data/app/assets/javascripts/common/perfect-scrollbar/perfect-scrollbar.common.js +1318 -1318
  256. data/app/assets/javascripts/common/perfect-scrollbar/perfect-scrollbar.esm.js +1316 -1316
  257. data/app/assets/javascripts/common/perfect-scrollbar/perfect-scrollbar.js +1324 -1324
  258. data/app/assets/javascripts/common/plyr/plyr.js +9137 -9137
  259. data/app/assets/javascripts/common/rangeslider/rangeslider.js +498 -498
  260. data/app/assets/javascripts/common/retina/retina.js +100 -100
  261. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.actions.js +0 -0
  262. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.carousel.js +0 -0
  263. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.kenburn.js +0 -0
  264. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.layeranimation.js +0 -0
  265. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.migration.js +0 -0
  266. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.navigation.js +0 -0
  267. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.parallax.js +0 -0
  268. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.slideanims.js +0 -0
  269. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.video.js +0 -0
  270. data/app/assets/javascripts/common/rev-slider/jquery.themepunch.revolution.js +0 -0
  271. data/app/assets/javascripts/common/rev-slider/jquery.themepunch.tools.min.js +0 -0
  272. data/app/assets/javascripts/common/scrollme/jquery.scrollme.js +455 -455
  273. data/app/assets/javascripts/common/scrollup/jquery.scrollUp.js +168 -168
  274. data/app/assets/javascripts/common/select2/select2.full.js +6597 -6597
  275. data/app/assets/javascripts/common/selectbox/jquery.selectBox.js +1091 -1091
  276. data/app/assets/javascripts/common/slick/slick.js +3004 -3004
  277. data/app/assets/javascripts/common/smooth-scroll/SmoothScroll.js +788 -788
  278. data/app/assets/javascripts/common/spectrum/spectrum.js +2323 -2323
  279. data/app/assets/javascripts/common/stepper/jquery.fs.stepper.js +339 -339
  280. data/app/assets/javascripts/common/swiper/swiper.js +8124 -8124
  281. data/app/assets/javascripts/common/toaster/toastr.js +476 -476
  282. data/app/assets/javascripts/common/typed/typed.js +1044 -1044
  283. data/app/assets/javascripts/common/visable/jquery.visible.js +68 -68
  284. data/app/assets/javascripts/common/waypoints/jquery.waypoints.js +661 -661
  285. data/app/assets/javascripts/common/wow/wow.js +508 -508
  286. data/app/assets/javascripts/phcthemes_admin_panel_pack_adminlte.js +12 -12
  287. data/app/assets/javascripts/phcthemes_admin_panel_pack_boomerang.js +0 -0
  288. data/app/assets/javascripts/phcthemes_admin_panel_pack_coloradmin.js +5 -5
  289. data/app/assets/javascripts/phcthemes_admin_panel_pack_inspinia.js +10 -10
  290. data/app/assets/javascripts/phcthemes_admin_panel_pack_metronic.js +6 -6
  291. data/app/assets/javascripts/phcthemes_admin_panel_pack_quilpro.js +5 -5
  292. data/app/assets/javascripts/phcthemes_admin_panel_pack_starlight.js +5 -5
  293. data/app/assets/javascripts/themes/adminlte/theme/adminlte.js +1141 -1141
  294. data/app/assets/javascripts/themes/coloradmin/theme/color_admin_app.min.js +0 -0
  295. data/app/assets/javascripts/themes/coloradmin/theme/color_admin_default.js +0 -0
  296. data/app/assets/javascripts/themes/inspinia/theme/inspinia.js +279 -279
  297. data/app/assets/javascripts/themes/metronic/theme/plugins.bundle.js +0 -0
  298. data/app/assets/javascripts/themes/metronic/theme/prismjs.bundle.js +1922 -1922
  299. data/app/assets/javascripts/themes/metronic/theme/scripts.bundle.js +0 -0
  300. data/app/assets/javascripts/themes/metronic/theme/widgets.js +0 -0
  301. data/app/assets/stylesheets/common/hanna_hearts/hanna_hearts.scss +0 -0
  302. data/app/assets/stylesheets/phcthemes_admin_panel_pack_adminlte.scss +16 -16
  303. data/app/assets/stylesheets/phcthemes_admin_panel_pack_boomerang.scss +27 -27
  304. data/app/assets/stylesheets/phcthemes_admin_panel_pack_coloradmin.scss +11 -11
  305. data/app/assets/stylesheets/phcthemes_admin_panel_pack_inspinia.scss +18 -18
  306. data/app/assets/stylesheets/phcthemes_admin_panel_pack_metronic.scss +15 -15
  307. data/app/assets/stylesheets/phcthemes_admin_panel_pack_quilpro.scss +19 -19
  308. data/app/assets/stylesheets/phcthemes_admin_panel_pack_starlight.scss +15 -15
  309. data/lib/phcthemes_admin_panel_pack/engine.rb +20 -20
  310. data/lib/phcthemes_admin_panel_pack/version.rb +3 -3
  311. data/lib/phcthemes_admin_panel_pack.rb +6 -6
  312. data/lib/tasks/phcthemes_admin_panel_pack_tasks.rake +4 -4
  313. metadata +3 -3
@@ -1,935 +1,935 @@
1
- (function() {
2
- var AjaxMonitor, Bar, DocumentMonitor, ElementMonitor, ElementTracker, EventLagMonitor, Evented, Events, NoTargetError, Pace, RequestIntercept, SOURCE_KEYS, Scaler, SocketRequestTracker, XHRRequestTracker, animation, avgAmplitude, bar, cancelAnimation, cancelAnimationFrame, defaultOptions, extend, extendNative, getFromDOM, getIntercept, handlePushState, ignoreStack, init, now, options, paceHideStyle, requestAnimationFrame, result, runAnimation, scalers, shouldIgnoreURL, shouldTrack, source, sources, uniScaler, _WebSocket, _XDomainRequest, _XMLHttpRequest, _i, _intercept, _len, _pushState, _ref, _ref1, _replaceState,
3
- __slice = [].slice,
4
- __hasProp = {}.hasOwnProperty,
5
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
6
- __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
7
-
8
- defaultOptions = {
9
- hidePage: false,
10
- catchupTime: 100,
11
- initialRate: .03,
12
- minTime: 250,
13
- ghostTime: 100,
14
- maxProgressPerFrame: 20,
15
- easeFactor: 1.25,
16
- startOnPageLoad: true,
17
- restartOnPushState: true,
18
- restartOnRequestAfter: 500,
19
- target: 'body',
20
- elements: {
21
- checkInterval: 100,
22
- selectors: ['body']
23
- },
24
- eventLag: {
25
- minSamples: 10,
26
- sampleCount: 3,
27
- lagThreshold: 3
28
- },
29
- ajax: {
30
- trackMethods: ['GET'],
31
- trackWebSockets: true,
32
- ignoreURLs: []
33
- }
34
- };
35
-
36
- now = function() {
37
- var _ref;
38
- return (_ref = typeof performance !== "undefined" && performance !== null ? typeof performance.now === "function" ? performance.now() : void 0 : void 0) != null ? _ref : +(new Date);
39
- };
40
-
41
- requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
42
-
43
- cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame;
44
-
45
- if (requestAnimationFrame == null) {
46
- requestAnimationFrame = function(fn) {
47
- return setTimeout(fn, 50);
48
- };
49
- cancelAnimationFrame = function(id) {
50
- return clearTimeout(id);
51
- };
52
- }
53
-
54
- runAnimation = function(fn) {
55
- var last, tick;
56
- last = now();
57
- tick = function() {
58
- var diff;
59
- diff = now() - last;
60
- if (diff >= 33) {
61
- last = now();
62
- return fn(diff, function() {
63
- return requestAnimationFrame(tick);
64
- });
65
- } else {
66
- return setTimeout(tick, 33 - diff);
67
- }
68
- };
69
- return tick();
70
- };
71
-
72
- result = function() {
73
- var args, key, obj;
74
- obj = arguments[0], key = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : [];
75
- if (typeof obj[key] === 'function') {
76
- return obj[key].apply(obj, args);
77
- } else {
78
- return obj[key];
79
- }
80
- };
81
-
82
- extend = function() {
83
- var key, out, source, sources, val, _i, _len;
84
- out = arguments[0], sources = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
85
- for (_i = 0, _len = sources.length; _i < _len; _i++) {
86
- source = sources[_i];
87
- if (source) {
88
- for (key in source) {
89
- if (!__hasProp.call(source, key)) continue;
90
- val = source[key];
91
- if ((out[key] != null) && typeof out[key] === 'object' && (val != null) && typeof val === 'object') {
92
- extend(out[key], val);
93
- } else {
94
- out[key] = val;
95
- }
96
- }
97
- }
98
- }
99
- return out;
100
- };
101
-
102
- avgAmplitude = function(arr) {
103
- var count, sum, v, _i, _len;
104
- sum = count = 0;
105
- for (_i = 0, _len = arr.length; _i < _len; _i++) {
106
- v = arr[_i];
107
- sum += Math.abs(v);
108
- count++;
109
- }
110
- return sum / count;
111
- };
112
-
113
- getFromDOM = function(key, json) {
114
- var data, e, el;
115
- if (key == null) {
116
- key = 'options';
117
- }
118
- if (json == null) {
119
- json = true;
120
- }
121
- el = document.querySelector("[data-pace-" + key + "]");
122
- if (!el) {
123
- return;
124
- }
125
- data = el.getAttribute("data-pace-" + key);
126
- if (!json) {
127
- return data;
128
- }
129
- try {
130
- return JSON.parse(data);
131
- } catch (_error) {
132
- e = _error;
133
- return typeof console !== "undefined" && console !== null ? console.error("Error parsing inline pace options", e) : void 0;
134
- }
135
- };
136
-
137
- Evented = (function() {
138
- function Evented() {}
139
-
140
- Evented.prototype.on = function(event, handler, ctx, once) {
141
- var _base;
142
- if (once == null) {
143
- once = false;
144
- }
145
- if (this.bindings == null) {
146
- this.bindings = {};
147
- }
148
- if ((_base = this.bindings)[event] == null) {
149
- _base[event] = [];
150
- }
151
- return this.bindings[event].push({
152
- handler: handler,
153
- ctx: ctx,
154
- once: once
155
- });
156
- };
157
-
158
- Evented.prototype.once = function(event, handler, ctx) {
159
- return this.on(event, handler, ctx, true);
160
- };
161
-
162
- Evented.prototype.off = function(event, handler) {
163
- var i, _ref, _results;
164
- if (((_ref = this.bindings) != null ? _ref[event] : void 0) == null) {
165
- return;
166
- }
167
- if (handler == null) {
168
- return delete this.bindings[event];
169
- } else {
170
- i = 0;
171
- _results = [];
172
- while (i < this.bindings[event].length) {
173
- if (this.bindings[event][i].handler === handler) {
174
- _results.push(this.bindings[event].splice(i, 1));
175
- } else {
176
- _results.push(i++);
177
- }
178
- }
179
- return _results;
180
- }
181
- };
182
-
183
- Evented.prototype.trigger = function() {
184
- var args, ctx, event, handler, i, once, _ref, _ref1, _results;
185
- event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
186
- if ((_ref = this.bindings) != null ? _ref[event] : void 0) {
187
- i = 0;
188
- _results = [];
189
- while (i < this.bindings[event].length) {
190
- _ref1 = this.bindings[event][i], handler = _ref1.handler, ctx = _ref1.ctx, once = _ref1.once;
191
- handler.apply(ctx != null ? ctx : this, args);
192
- if (once) {
193
- _results.push(this.bindings[event].splice(i, 1));
194
- } else {
195
- _results.push(i++);
196
- }
197
- }
198
- return _results;
199
- }
200
- };
201
-
202
- return Evented;
203
-
204
- })();
205
-
206
- Pace = window.Pace || {};
207
-
208
- window.Pace = Pace;
209
-
210
- extend(Pace, Evented.prototype);
211
-
212
- options = Pace.options = extend({}, defaultOptions, window.paceOptions, getFromDOM());
213
-
214
- _ref = ['ajax', 'document', 'eventLag', 'elements'];
215
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
216
- source = _ref[_i];
217
- if (options[source] === true) {
218
- options[source] = defaultOptions[source];
219
- }
220
- }
221
-
222
- NoTargetError = (function(_super) {
223
- __extends(NoTargetError, _super);
224
-
225
- function NoTargetError() {
226
- _ref1 = NoTargetError.__super__.constructor.apply(this, arguments);
227
- return _ref1;
228
- }
229
-
230
- return NoTargetError;
231
-
232
- })(Error);
233
-
234
- Bar = (function() {
235
- function Bar() {
236
- this.progress = 0;
237
- }
238
-
239
- Bar.prototype.getElement = function() {
240
- var targetElement;
241
- if (this.el == null) {
242
- targetElement = document.querySelector(options.target);
243
- if (!targetElement) {
244
- throw new NoTargetError;
245
- }
246
- this.el = document.createElement('div');
247
- this.el.className = "pace pace-active";
248
- document.body.className = document.body.className.replace(/pace-done/g, '');
249
- document.body.className += ' pace-running';
250
- this.el.innerHTML = '<div class="pace-progress">\n <div class="pace-progress-inner"></div>\n</div>\n<div class="pace-activity"></div>';
251
- if (targetElement.firstChild != null) {
252
- targetElement.insertBefore(this.el, targetElement.firstChild);
253
- } else {
254
- targetElement.appendChild(this.el);
255
- }
256
- }
257
- return this.el;
258
- };
259
-
260
- Bar.prototype.finish = function() {
261
- var el;
262
- el = this.getElement();
263
- el.className = el.className.replace('pace-active', '');
264
- el.className += ' pace-inactive';
265
- document.body.className = document.body.className.replace('pace-running', '');
266
- return document.body.className += ' pace-done';
267
- };
268
-
269
- Bar.prototype.update = function(prog) {
270
- this.progress = prog;
271
- return this.render();
272
- };
273
-
274
- Bar.prototype.destroy = function() {
275
- try {
276
- this.getElement().parentNode.removeChild(this.getElement());
277
- } catch (_error) {
278
- NoTargetError = _error;
279
- }
280
- return this.el = void 0;
281
- };
282
-
283
- Bar.prototype.render = function() {
284
- var el, progressStr;
285
- if (document.querySelector(options.target) == null) {
286
- return false;
287
- }
288
- el = this.getElement();
289
- el.children[0].style.width = "" + this.progress + "%";
290
- if (!this.lastRenderedProgress || this.lastRenderedProgress | 0 !== this.progress | 0) {
291
- el.children[0].setAttribute('data-progress-text', "" + (this.progress | 0) + "%");
292
- if (this.progress >= 100) {
293
- progressStr = '99';
294
- } else {
295
- progressStr = this.progress < 10 ? "0" : "";
296
- progressStr += this.progress | 0;
297
- }
298
- el.children[0].setAttribute('data-progress', "" + progressStr);
299
- }
300
- return this.lastRenderedProgress = this.progress;
301
- };
302
-
303
- Bar.prototype.done = function() {
304
- return this.progress >= 100;
305
- };
306
-
307
- return Bar;
308
-
309
- })();
310
-
311
- Events = (function() {
312
- function Events() {
313
- this.bindings = {};
314
- }
315
-
316
- Events.prototype.trigger = function(name, val) {
317
- var binding, _j, _len1, _ref2, _results;
318
- if (this.bindings[name] != null) {
319
- _ref2 = this.bindings[name];
320
- _results = [];
321
- for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
322
- binding = _ref2[_j];
323
- _results.push(binding.call(this, val));
324
- }
325
- return _results;
326
- }
327
- };
328
-
329
- Events.prototype.on = function(name, fn) {
330
- var _base;
331
- if ((_base = this.bindings)[name] == null) {
332
- _base[name] = [];
333
- }
334
- return this.bindings[name].push(fn);
335
- };
336
-
337
- return Events;
338
-
339
- })();
340
-
341
- _XMLHttpRequest = window.XMLHttpRequest;
342
-
343
- _XDomainRequest = window.XDomainRequest;
344
-
345
- _WebSocket = window.WebSocket;
346
-
347
- extendNative = function(to, from) {
348
- var e, key, val, _results;
349
- _results = [];
350
- for (key in from.prototype) {
351
- try {
352
- val = from.prototype[key];
353
- if ((to[key] == null) && typeof val !== 'function') {
354
- _results.push(to[key] = val);
355
- } else {
356
- _results.push(void 0);
357
- }
358
- } catch (_error) {
359
- e = _error;
360
- }
361
- }
362
- return _results;
363
- };
364
-
365
- ignoreStack = [];
366
-
367
- Pace.ignore = function() {
368
- var args, fn, ret;
369
- fn = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
370
- ignoreStack.unshift('ignore');
371
- ret = fn.apply(null, args);
372
- ignoreStack.shift();
373
- return ret;
374
- };
375
-
376
- Pace.track = function() {
377
- var args, fn, ret;
378
- fn = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
379
- ignoreStack.unshift('track');
380
- ret = fn.apply(null, args);
381
- ignoreStack.shift();
382
- return ret;
383
- };
384
-
385
- shouldTrack = function(method) {
386
- var _ref2;
387
- if (method == null) {
388
- method = 'GET';
389
- }
390
- if (ignoreStack[0] === 'track') {
391
- return 'force';
392
- }
393
- if (!ignoreStack.length && options.ajax) {
394
- if (method === 'socket' && options.ajax.trackWebSockets) {
395
- return true;
396
- } else if (_ref2 = method.toUpperCase(), __indexOf.call(options.ajax.trackMethods, _ref2) >= 0) {
397
- return true;
398
- }
399
- }
400
- return false;
401
- };
402
-
403
- RequestIntercept = (function(_super) {
404
- __extends(RequestIntercept, _super);
405
-
406
- function RequestIntercept() {
407
- var monitorXHR,
408
- _this = this;
409
- RequestIntercept.__super__.constructor.apply(this, arguments);
410
- monitorXHR = function(req) {
411
- var _open;
412
- _open = req.open;
413
- return req.open = function(type, url, async) {
414
- if (shouldTrack(type)) {
415
- _this.trigger('request', {
416
- type: type,
417
- url: url,
418
- request: req
419
- });
420
- }
421
- return _open.apply(req, arguments);
422
- };
423
- };
424
- window.XMLHttpRequest = function(flags) {
425
- var req;
426
- req = new _XMLHttpRequest(flags);
427
- monitorXHR(req);
428
- return req;
429
- };
430
- try {
431
- extendNative(window.XMLHttpRequest, _XMLHttpRequest);
432
- } catch (_error) {}
433
- if (_XDomainRequest != null) {
434
- window.XDomainRequest = function() {
435
- var req;
436
- req = new _XDomainRequest;
437
- monitorXHR(req);
438
- return req;
439
- };
440
- try {
441
- extendNative(window.XDomainRequest, _XDomainRequest);
442
- } catch (_error) {}
443
- }
444
- if ((_WebSocket != null) && options.ajax.trackWebSockets) {
445
- window.WebSocket = function(url, protocols) {
446
- var req;
447
- if (protocols != null) {
448
- req = new _WebSocket(url, protocols);
449
- } else {
450
- req = new _WebSocket(url);
451
- }
452
- if (shouldTrack('socket')) {
453
- _this.trigger('request', {
454
- type: 'socket',
455
- url: url,
456
- protocols: protocols,
457
- request: req
458
- });
459
- }
460
- return req;
461
- };
462
- try {
463
- extendNative(window.WebSocket, _WebSocket);
464
- } catch (_error) {}
465
- }
466
- }
467
-
468
- return RequestIntercept;
469
-
470
- })(Events);
471
-
472
- _intercept = null;
473
-
474
- getIntercept = function() {
475
- if (_intercept == null) {
476
- _intercept = new RequestIntercept;
477
- }
478
- return _intercept;
479
- };
480
-
481
- shouldIgnoreURL = function(url) {
482
- var pattern, _j, _len1, _ref2;
483
- _ref2 = options.ajax.ignoreURLs;
484
- for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
485
- pattern = _ref2[_j];
486
- if (typeof pattern === 'string') {
487
- if (url.indexOf(pattern) !== -1) {
488
- return true;
489
- }
490
- } else {
491
- if (pattern.test(url)) {
492
- return true;
493
- }
494
- }
495
- }
496
- return false;
497
- };
498
-
499
- getIntercept().on('request', function(_arg) {
500
- var after, args, request, type, url;
501
- type = _arg.type, request = _arg.request, url = _arg.url;
502
- if (shouldIgnoreURL(url)) {
503
- return;
504
- }
505
- if (!Pace.running && (options.restartOnRequestAfter !== false || shouldTrack(type) === 'force')) {
506
- args = arguments;
507
- after = options.restartOnRequestAfter || 0;
508
- if (typeof after === 'boolean') {
509
- after = 0;
510
- }
511
- return setTimeout(function() {
512
- var stillActive, _j, _len1, _ref2, _ref3, _results;
513
- if (type === 'socket') {
514
- stillActive = request.readyState < 2;
515
- } else {
516
- stillActive = (0 < (_ref2 = request.readyState) && _ref2 < 4);
517
- }
518
- if (stillActive) {
519
- Pace.restart();
520
- _ref3 = Pace.sources;
521
- _results = [];
522
- for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
523
- source = _ref3[_j];
524
- if (source instanceof AjaxMonitor) {
525
- source.watch.apply(source, args);
526
- break;
527
- } else {
528
- _results.push(void 0);
529
- }
530
- }
531
- return _results;
532
- }
533
- }, after);
534
- }
535
- });
536
-
537
- AjaxMonitor = (function() {
538
- function AjaxMonitor() {
539
- var _this = this;
540
- this.elements = [];
541
- getIntercept().on('request', function() {
542
- return _this.watch.apply(_this, arguments);
543
- });
544
- }
545
-
546
- AjaxMonitor.prototype.watch = function(_arg) {
547
- var request, tracker, type, url;
548
- type = _arg.type, request = _arg.request, url = _arg.url;
549
- if (shouldIgnoreURL(url)) {
550
- return;
551
- }
552
- if (type === 'socket') {
553
- tracker = new SocketRequestTracker(request);
554
- } else {
555
- tracker = new XHRRequestTracker(request);
556
- }
557
- return this.elements.push(tracker);
558
- };
559
-
560
- return AjaxMonitor;
561
-
562
- })();
563
-
564
- XHRRequestTracker = (function() {
565
- function XHRRequestTracker(request) {
566
- var event, size, _j, _len1, _onreadystatechange, _ref2,
567
- _this = this;
568
- this.progress = 0;
569
- if (window.ProgressEvent != null) {
570
- size = null;
571
- request.addEventListener('progress', function(evt) {
572
- if (evt.lengthComputable) {
573
- return _this.progress = 100 * evt.loaded / evt.total;
574
- } else {
575
- return _this.progress = _this.progress + (100 - _this.progress) / 2;
576
- }
577
- }, false);
578
- _ref2 = ['load', 'abort', 'timeout', 'error'];
579
- for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
580
- event = _ref2[_j];
581
- request.addEventListener(event, function() {
582
- return _this.progress = 100;
583
- }, false);
584
- }
585
- } else {
586
- _onreadystatechange = request.onreadystatechange;
587
- request.onreadystatechange = function() {
588
- var _ref3;
589
- if ((_ref3 = request.readyState) === 0 || _ref3 === 4) {
590
- _this.progress = 100;
591
- } else if (request.readyState === 3) {
592
- _this.progress = 50;
593
- }
594
- return typeof _onreadystatechange === "function" ? _onreadystatechange.apply(null, arguments) : void 0;
595
- };
596
- }
597
- }
598
-
599
- return XHRRequestTracker;
600
-
601
- })();
602
-
603
- SocketRequestTracker = (function() {
604
- function SocketRequestTracker(request) {
605
- var event, _j, _len1, _ref2,
606
- _this = this;
607
- this.progress = 0;
608
- _ref2 = ['error', 'open'];
609
- for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
610
- event = _ref2[_j];
611
- request.addEventListener(event, function() {
612
- return _this.progress = 100;
613
- }, false);
614
- }
615
- }
616
-
617
- return SocketRequestTracker;
618
-
619
- })();
620
-
621
- ElementMonitor = (function() {
622
- function ElementMonitor(options) {
623
- var selector, _j, _len1, _ref2;
624
- if (options == null) {
625
- options = {};
626
- }
627
- this.elements = [];
628
- if (options.selectors == null) {
629
- options.selectors = [];
630
- }
631
- _ref2 = options.selectors;
632
- for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
633
- selector = _ref2[_j];
634
- this.elements.push(new ElementTracker(selector));
635
- }
636
- }
637
-
638
- return ElementMonitor;
639
-
640
- })();
641
-
642
- ElementTracker = (function() {
643
- function ElementTracker(selector) {
644
- this.selector = selector;
645
- this.progress = 0;
646
- this.check();
647
- }
648
-
649
- ElementTracker.prototype.check = function() {
650
- var _this = this;
651
- if (document.querySelector(this.selector)) {
652
- return this.done();
653
- } else {
654
- return setTimeout((function() {
655
- return _this.check();
656
- }), options.elements.checkInterval);
657
- }
658
- };
659
-
660
- ElementTracker.prototype.done = function() {
661
- return this.progress = 100;
662
- };
663
-
664
- return ElementTracker;
665
-
666
- })();
667
-
668
- DocumentMonitor = (function() {
669
- DocumentMonitor.prototype.states = {
670
- loading: 0,
671
- interactive: 50,
672
- complete: 100
673
- };
674
-
675
- function DocumentMonitor() {
676
- var _onreadystatechange, _ref2,
677
- _this = this;
678
- this.progress = (_ref2 = this.states[document.readyState]) != null ? _ref2 : 100;
679
- _onreadystatechange = document.onreadystatechange;
680
- document.onreadystatechange = function() {
681
- if (_this.states[document.readyState] != null) {
682
- _this.progress = _this.states[document.readyState];
683
- }
684
- return typeof _onreadystatechange === "function" ? _onreadystatechange.apply(null, arguments) : void 0;
685
- };
686
- }
687
-
688
- return DocumentMonitor;
689
-
690
- })();
691
-
692
- EventLagMonitor = (function() {
693
- function EventLagMonitor() {
694
- var avg, interval, last, points, samples,
695
- _this = this;
696
- this.progress = 0;
697
- avg = 0;
698
- samples = [];
699
- points = 0;
700
- last = now();
701
- interval = setInterval(function() {
702
- var diff;
703
- diff = now() - last - 50;
704
- last = now();
705
- samples.push(diff);
706
- if (samples.length > options.eventLag.sampleCount) {
707
- samples.shift();
708
- }
709
- avg = avgAmplitude(samples);
710
- if (++points >= options.eventLag.minSamples && avg < options.eventLag.lagThreshold) {
711
- _this.progress = 100;
712
- return clearInterval(interval);
713
- } else {
714
- return _this.progress = 100 * (3 / (avg + 3));
715
- }
716
- }, 50);
717
- }
718
-
719
- return EventLagMonitor;
720
-
721
- })();
722
-
723
- Scaler = (function() {
724
- function Scaler(source) {
725
- this.source = source;
726
- this.last = this.sinceLastUpdate = 0;
727
- this.rate = options.initialRate;
728
- this.catchup = 0;
729
- this.progress = this.lastProgress = 0;
730
- if (this.source != null) {
731
- this.progress = result(this.source, 'progress');
732
- }
733
- }
734
-
735
- Scaler.prototype.tick = function(frameTime, val) {
736
- var scaling;
737
- if (val == null) {
738
- val = result(this.source, 'progress');
739
- }
740
- if (val >= 100) {
741
- this.done = true;
742
- }
743
- if (val === this.last) {
744
- this.sinceLastUpdate += frameTime;
745
- } else {
746
- if (this.sinceLastUpdate) {
747
- this.rate = (val - this.last) / this.sinceLastUpdate;
748
- }
749
- this.catchup = (val - this.progress) / options.catchupTime;
750
- this.sinceLastUpdate = 0;
751
- this.last = val;
752
- }
753
- if (val > this.progress) {
754
- this.progress += this.catchup * frameTime;
755
- }
756
- scaling = 1 - Math.pow(this.progress / 100, options.easeFactor);
757
- this.progress += scaling * this.rate * frameTime;
758
- this.progress = Math.min(this.lastProgress + options.maxProgressPerFrame, this.progress);
759
- this.progress = Math.max(0, this.progress);
760
- this.progress = Math.min(100, this.progress);
761
- this.lastProgress = this.progress;
762
- return this.progress;
763
- };
764
-
765
- return Scaler;
766
-
767
- })();
768
-
769
- sources = null;
770
-
771
- scalers = null;
772
-
773
- bar = null;
774
-
775
- uniScaler = null;
776
-
777
- animation = null;
778
-
779
- cancelAnimation = null;
780
-
781
- Pace.running = false;
782
-
783
- handlePushState = function() {
784
- if (options.restartOnPushState) {
785
- return Pace.restart();
786
- }
787
- };
788
-
789
- if (window.history.pushState != null) {
790
- _pushState = window.history.pushState;
791
- window.history.pushState = function() {
792
- handlePushState();
793
- return _pushState.apply(window.history, arguments);
794
- };
795
- }
796
-
797
- if (window.history.replaceState != null) {
798
- _replaceState = window.history.replaceState;
799
- window.history.replaceState = function() {
800
- handlePushState();
801
- return _replaceState.apply(window.history, arguments);
802
- };
803
- }
804
-
805
- SOURCE_KEYS = {
806
- ajax: AjaxMonitor,
807
- elements: ElementMonitor,
808
- document: DocumentMonitor,
809
- eventLag: EventLagMonitor
810
- };
811
-
812
- (init = function() {
813
- var type, _j, _k, _len1, _len2, _ref2, _ref3, _ref4;
814
- Pace.sources = sources = [];
815
- _ref2 = ['ajax', 'elements', 'document', 'eventLag'];
816
- for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
817
- type = _ref2[_j];
818
- if (options[type] !== false) {
819
- sources.push(new SOURCE_KEYS[type](options[type]));
820
- }
821
- }
822
- _ref4 = (_ref3 = options.extraSources) != null ? _ref3 : [];
823
- for (_k = 0, _len2 = _ref4.length; _k < _len2; _k++) {
824
- source = _ref4[_k];
825
- sources.push(new source(options));
826
- }
827
- Pace.bar = bar = new Bar;
828
- scalers = [];
829
- return uniScaler = new Scaler;
830
- })();
831
-
832
- Pace.stop = function() {
833
- Pace.trigger('stop');
834
- Pace.running = false;
835
- bar.destroy();
836
- cancelAnimation = true;
837
- if (animation != null) {
838
- if (typeof cancelAnimationFrame === "function") {
839
- cancelAnimationFrame(animation);
840
- }
841
- animation = null;
842
- }
843
- return init();
844
- };
845
-
846
- Pace.restart = function() {
847
- Pace.trigger('restart');
848
- Pace.stop();
849
- return Pace.start();
850
- };
851
-
852
- Pace.go = function() {
853
- var start;
854
- Pace.running = true;
855
- bar.render();
856
- start = now();
857
- cancelAnimation = false;
858
- return animation = runAnimation(function(frameTime, enqueueNextFrame) {
859
- var avg, count, done, element, elements, i, j, remaining, scaler, scalerList, sum, _j, _k, _len1, _len2, _ref2;
860
- remaining = 100 - bar.progress;
861
- count = sum = 0;
862
- done = true;
863
- for (i = _j = 0, _len1 = sources.length; _j < _len1; i = ++_j) {
864
- source = sources[i];
865
- scalerList = scalers[i] != null ? scalers[i] : scalers[i] = [];
866
- elements = (_ref2 = source.elements) != null ? _ref2 : [source];
867
- for (j = _k = 0, _len2 = elements.length; _k < _len2; j = ++_k) {
868
- element = elements[j];
869
- scaler = scalerList[j] != null ? scalerList[j] : scalerList[j] = new Scaler(element);
870
- done &= scaler.done;
871
- if (scaler.done) {
872
- continue;
873
- }
874
- count++;
875
- sum += scaler.tick(frameTime);
876
- }
877
- }
878
- avg = sum / count;
879
- bar.update(uniScaler.tick(frameTime, avg));
880
- if (bar.done() || done || cancelAnimation) {
881
- bar.update(100);
882
- Pace.trigger('done');
883
- return setTimeout(function() {
884
- bar.finish();
885
- Pace.running = false;
886
- return Pace.trigger('hide');
887
- }, Math.max(options.ghostTime, Math.max(options.minTime - (now() - start), 0)));
888
- } else {
889
- return enqueueNextFrame();
890
- }
891
- });
892
- };
893
-
894
- paceHideStyle = null;
895
-
896
- Pace.start = function(_options) {
897
- extend(options, _options);
898
- if (options.hidePage) {
899
- if (!paceHideStyle) {
900
- paceHideStyle = document.createElement('style');
901
- document.head.appendChild(paceHideStyle);
902
- }
903
- paceHideStyle.innerHTML = "body > *:not(.pace), body:before, body:after { -webkit-transition: opacity .4s ease-in-out; -moz-transition: opacity .4s ease-in-out; -o-transition: opacity .4s ease-in-out; -ms-transition: opacity .4s ease-in-out; transition: opacity .4s ease-in-out } body:not(.pace-done) > *:not(.pace), body:not(.pace-done):before, body:not(.pace-done):after { opacity: 0 !important }";
904
- } else {
905
- if (paceHideStyle != null) {
906
- paceHideStyle.innerHTML = '';
907
- }
908
- }
909
- Pace.running = true;
910
- try {
911
- bar.render();
912
- } catch (_error) {
913
- NoTargetError = _error;
914
- }
915
- if (!document.querySelector('.pace')) {
916
- return setTimeout(Pace.start, 50);
917
- } else {
918
- Pace.trigger('start');
919
- return Pace.go();
920
- }
921
- };
922
-
923
- if (typeof define === 'function' && define.amd) {
924
- define(function() {
925
- return Pace;
926
- });
927
- } else if (typeof exports === 'object') {
928
- module.exports = Pace;
929
- } else {
930
- if (options.startOnPageLoad) {
931
- Pace.start();
932
- }
933
- }
934
-
935
- }).call(this);
1
+ (function() {
2
+ var AjaxMonitor, Bar, DocumentMonitor, ElementMonitor, ElementTracker, EventLagMonitor, Evented, Events, NoTargetError, Pace, RequestIntercept, SOURCE_KEYS, Scaler, SocketRequestTracker, XHRRequestTracker, animation, avgAmplitude, bar, cancelAnimation, cancelAnimationFrame, defaultOptions, extend, extendNative, getFromDOM, getIntercept, handlePushState, ignoreStack, init, now, options, paceHideStyle, requestAnimationFrame, result, runAnimation, scalers, shouldIgnoreURL, shouldTrack, source, sources, uniScaler, _WebSocket, _XDomainRequest, _XMLHttpRequest, _i, _intercept, _len, _pushState, _ref, _ref1, _replaceState,
3
+ __slice = [].slice,
4
+ __hasProp = {}.hasOwnProperty,
5
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
6
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
7
+
8
+ defaultOptions = {
9
+ hidePage: false,
10
+ catchupTime: 100,
11
+ initialRate: .03,
12
+ minTime: 250,
13
+ ghostTime: 100,
14
+ maxProgressPerFrame: 20,
15
+ easeFactor: 1.25,
16
+ startOnPageLoad: true,
17
+ restartOnPushState: true,
18
+ restartOnRequestAfter: 500,
19
+ target: 'body',
20
+ elements: {
21
+ checkInterval: 100,
22
+ selectors: ['body']
23
+ },
24
+ eventLag: {
25
+ minSamples: 10,
26
+ sampleCount: 3,
27
+ lagThreshold: 3
28
+ },
29
+ ajax: {
30
+ trackMethods: ['GET'],
31
+ trackWebSockets: true,
32
+ ignoreURLs: []
33
+ }
34
+ };
35
+
36
+ now = function() {
37
+ var _ref;
38
+ return (_ref = typeof performance !== "undefined" && performance !== null ? typeof performance.now === "function" ? performance.now() : void 0 : void 0) != null ? _ref : +(new Date);
39
+ };
40
+
41
+ requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
42
+
43
+ cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame;
44
+
45
+ if (requestAnimationFrame == null) {
46
+ requestAnimationFrame = function(fn) {
47
+ return setTimeout(fn, 50);
48
+ };
49
+ cancelAnimationFrame = function(id) {
50
+ return clearTimeout(id);
51
+ };
52
+ }
53
+
54
+ runAnimation = function(fn) {
55
+ var last, tick;
56
+ last = now();
57
+ tick = function() {
58
+ var diff;
59
+ diff = now() - last;
60
+ if (diff >= 33) {
61
+ last = now();
62
+ return fn(diff, function() {
63
+ return requestAnimationFrame(tick);
64
+ });
65
+ } else {
66
+ return setTimeout(tick, 33 - diff);
67
+ }
68
+ };
69
+ return tick();
70
+ };
71
+
72
+ result = function() {
73
+ var args, key, obj;
74
+ obj = arguments[0], key = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : [];
75
+ if (typeof obj[key] === 'function') {
76
+ return obj[key].apply(obj, args);
77
+ } else {
78
+ return obj[key];
79
+ }
80
+ };
81
+
82
+ extend = function() {
83
+ var key, out, source, sources, val, _i, _len;
84
+ out = arguments[0], sources = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
85
+ for (_i = 0, _len = sources.length; _i < _len; _i++) {
86
+ source = sources[_i];
87
+ if (source) {
88
+ for (key in source) {
89
+ if (!__hasProp.call(source, key)) continue;
90
+ val = source[key];
91
+ if ((out[key] != null) && typeof out[key] === 'object' && (val != null) && typeof val === 'object') {
92
+ extend(out[key], val);
93
+ } else {
94
+ out[key] = val;
95
+ }
96
+ }
97
+ }
98
+ }
99
+ return out;
100
+ };
101
+
102
+ avgAmplitude = function(arr) {
103
+ var count, sum, v, _i, _len;
104
+ sum = count = 0;
105
+ for (_i = 0, _len = arr.length; _i < _len; _i++) {
106
+ v = arr[_i];
107
+ sum += Math.abs(v);
108
+ count++;
109
+ }
110
+ return sum / count;
111
+ };
112
+
113
+ getFromDOM = function(key, json) {
114
+ var data, e, el;
115
+ if (key == null) {
116
+ key = 'options';
117
+ }
118
+ if (json == null) {
119
+ json = true;
120
+ }
121
+ el = document.querySelector("[data-pace-" + key + "]");
122
+ if (!el) {
123
+ return;
124
+ }
125
+ data = el.getAttribute("data-pace-" + key);
126
+ if (!json) {
127
+ return data;
128
+ }
129
+ try {
130
+ return JSON.parse(data);
131
+ } catch (_error) {
132
+ e = _error;
133
+ return typeof console !== "undefined" && console !== null ? console.error("Error parsing inline pace options", e) : void 0;
134
+ }
135
+ };
136
+
137
+ Evented = (function() {
138
+ function Evented() {}
139
+
140
+ Evented.prototype.on = function(event, handler, ctx, once) {
141
+ var _base;
142
+ if (once == null) {
143
+ once = false;
144
+ }
145
+ if (this.bindings == null) {
146
+ this.bindings = {};
147
+ }
148
+ if ((_base = this.bindings)[event] == null) {
149
+ _base[event] = [];
150
+ }
151
+ return this.bindings[event].push({
152
+ handler: handler,
153
+ ctx: ctx,
154
+ once: once
155
+ });
156
+ };
157
+
158
+ Evented.prototype.once = function(event, handler, ctx) {
159
+ return this.on(event, handler, ctx, true);
160
+ };
161
+
162
+ Evented.prototype.off = function(event, handler) {
163
+ var i, _ref, _results;
164
+ if (((_ref = this.bindings) != null ? _ref[event] : void 0) == null) {
165
+ return;
166
+ }
167
+ if (handler == null) {
168
+ return delete this.bindings[event];
169
+ } else {
170
+ i = 0;
171
+ _results = [];
172
+ while (i < this.bindings[event].length) {
173
+ if (this.bindings[event][i].handler === handler) {
174
+ _results.push(this.bindings[event].splice(i, 1));
175
+ } else {
176
+ _results.push(i++);
177
+ }
178
+ }
179
+ return _results;
180
+ }
181
+ };
182
+
183
+ Evented.prototype.trigger = function() {
184
+ var args, ctx, event, handler, i, once, _ref, _ref1, _results;
185
+ event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
186
+ if ((_ref = this.bindings) != null ? _ref[event] : void 0) {
187
+ i = 0;
188
+ _results = [];
189
+ while (i < this.bindings[event].length) {
190
+ _ref1 = this.bindings[event][i], handler = _ref1.handler, ctx = _ref1.ctx, once = _ref1.once;
191
+ handler.apply(ctx != null ? ctx : this, args);
192
+ if (once) {
193
+ _results.push(this.bindings[event].splice(i, 1));
194
+ } else {
195
+ _results.push(i++);
196
+ }
197
+ }
198
+ return _results;
199
+ }
200
+ };
201
+
202
+ return Evented;
203
+
204
+ })();
205
+
206
+ Pace = window.Pace || {};
207
+
208
+ window.Pace = Pace;
209
+
210
+ extend(Pace, Evented.prototype);
211
+
212
+ options = Pace.options = extend({}, defaultOptions, window.paceOptions, getFromDOM());
213
+
214
+ _ref = ['ajax', 'document', 'eventLag', 'elements'];
215
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
216
+ source = _ref[_i];
217
+ if (options[source] === true) {
218
+ options[source] = defaultOptions[source];
219
+ }
220
+ }
221
+
222
+ NoTargetError = (function(_super) {
223
+ __extends(NoTargetError, _super);
224
+
225
+ function NoTargetError() {
226
+ _ref1 = NoTargetError.__super__.constructor.apply(this, arguments);
227
+ return _ref1;
228
+ }
229
+
230
+ return NoTargetError;
231
+
232
+ })(Error);
233
+
234
+ Bar = (function() {
235
+ function Bar() {
236
+ this.progress = 0;
237
+ }
238
+
239
+ Bar.prototype.getElement = function() {
240
+ var targetElement;
241
+ if (this.el == null) {
242
+ targetElement = document.querySelector(options.target);
243
+ if (!targetElement) {
244
+ throw new NoTargetError;
245
+ }
246
+ this.el = document.createElement('div');
247
+ this.el.className = "pace pace-active";
248
+ document.body.className = document.body.className.replace(/pace-done/g, '');
249
+ document.body.className += ' pace-running';
250
+ this.el.innerHTML = '<div class="pace-progress">\n <div class="pace-progress-inner"></div>\n</div>\n<div class="pace-activity"></div>';
251
+ if (targetElement.firstChild != null) {
252
+ targetElement.insertBefore(this.el, targetElement.firstChild);
253
+ } else {
254
+ targetElement.appendChild(this.el);
255
+ }
256
+ }
257
+ return this.el;
258
+ };
259
+
260
+ Bar.prototype.finish = function() {
261
+ var el;
262
+ el = this.getElement();
263
+ el.className = el.className.replace('pace-active', '');
264
+ el.className += ' pace-inactive';
265
+ document.body.className = document.body.className.replace('pace-running', '');
266
+ return document.body.className += ' pace-done';
267
+ };
268
+
269
+ Bar.prototype.update = function(prog) {
270
+ this.progress = prog;
271
+ return this.render();
272
+ };
273
+
274
+ Bar.prototype.destroy = function() {
275
+ try {
276
+ this.getElement().parentNode.removeChild(this.getElement());
277
+ } catch (_error) {
278
+ NoTargetError = _error;
279
+ }
280
+ return this.el = void 0;
281
+ };
282
+
283
+ Bar.prototype.render = function() {
284
+ var el, progressStr;
285
+ if (document.querySelector(options.target) == null) {
286
+ return false;
287
+ }
288
+ el = this.getElement();
289
+ el.children[0].style.width = "" + this.progress + "%";
290
+ if (!this.lastRenderedProgress || this.lastRenderedProgress | 0 !== this.progress | 0) {
291
+ el.children[0].setAttribute('data-progress-text', "" + (this.progress | 0) + "%");
292
+ if (this.progress >= 100) {
293
+ progressStr = '99';
294
+ } else {
295
+ progressStr = this.progress < 10 ? "0" : "";
296
+ progressStr += this.progress | 0;
297
+ }
298
+ el.children[0].setAttribute('data-progress', "" + progressStr);
299
+ }
300
+ return this.lastRenderedProgress = this.progress;
301
+ };
302
+
303
+ Bar.prototype.done = function() {
304
+ return this.progress >= 100;
305
+ };
306
+
307
+ return Bar;
308
+
309
+ })();
310
+
311
+ Events = (function() {
312
+ function Events() {
313
+ this.bindings = {};
314
+ }
315
+
316
+ Events.prototype.trigger = function(name, val) {
317
+ var binding, _j, _len1, _ref2, _results;
318
+ if (this.bindings[name] != null) {
319
+ _ref2 = this.bindings[name];
320
+ _results = [];
321
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
322
+ binding = _ref2[_j];
323
+ _results.push(binding.call(this, val));
324
+ }
325
+ return _results;
326
+ }
327
+ };
328
+
329
+ Events.prototype.on = function(name, fn) {
330
+ var _base;
331
+ if ((_base = this.bindings)[name] == null) {
332
+ _base[name] = [];
333
+ }
334
+ return this.bindings[name].push(fn);
335
+ };
336
+
337
+ return Events;
338
+
339
+ })();
340
+
341
+ _XMLHttpRequest = window.XMLHttpRequest;
342
+
343
+ _XDomainRequest = window.XDomainRequest;
344
+
345
+ _WebSocket = window.WebSocket;
346
+
347
+ extendNative = function(to, from) {
348
+ var e, key, val, _results;
349
+ _results = [];
350
+ for (key in from.prototype) {
351
+ try {
352
+ val = from.prototype[key];
353
+ if ((to[key] == null) && typeof val !== 'function') {
354
+ _results.push(to[key] = val);
355
+ } else {
356
+ _results.push(void 0);
357
+ }
358
+ } catch (_error) {
359
+ e = _error;
360
+ }
361
+ }
362
+ return _results;
363
+ };
364
+
365
+ ignoreStack = [];
366
+
367
+ Pace.ignore = function() {
368
+ var args, fn, ret;
369
+ fn = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
370
+ ignoreStack.unshift('ignore');
371
+ ret = fn.apply(null, args);
372
+ ignoreStack.shift();
373
+ return ret;
374
+ };
375
+
376
+ Pace.track = function() {
377
+ var args, fn, ret;
378
+ fn = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
379
+ ignoreStack.unshift('track');
380
+ ret = fn.apply(null, args);
381
+ ignoreStack.shift();
382
+ return ret;
383
+ };
384
+
385
+ shouldTrack = function(method) {
386
+ var _ref2;
387
+ if (method == null) {
388
+ method = 'GET';
389
+ }
390
+ if (ignoreStack[0] === 'track') {
391
+ return 'force';
392
+ }
393
+ if (!ignoreStack.length && options.ajax) {
394
+ if (method === 'socket' && options.ajax.trackWebSockets) {
395
+ return true;
396
+ } else if (_ref2 = method.toUpperCase(), __indexOf.call(options.ajax.trackMethods, _ref2) >= 0) {
397
+ return true;
398
+ }
399
+ }
400
+ return false;
401
+ };
402
+
403
+ RequestIntercept = (function(_super) {
404
+ __extends(RequestIntercept, _super);
405
+
406
+ function RequestIntercept() {
407
+ var monitorXHR,
408
+ _this = this;
409
+ RequestIntercept.__super__.constructor.apply(this, arguments);
410
+ monitorXHR = function(req) {
411
+ var _open;
412
+ _open = req.open;
413
+ return req.open = function(type, url, async) {
414
+ if (shouldTrack(type)) {
415
+ _this.trigger('request', {
416
+ type: type,
417
+ url: url,
418
+ request: req
419
+ });
420
+ }
421
+ return _open.apply(req, arguments);
422
+ };
423
+ };
424
+ window.XMLHttpRequest = function(flags) {
425
+ var req;
426
+ req = new _XMLHttpRequest(flags);
427
+ monitorXHR(req);
428
+ return req;
429
+ };
430
+ try {
431
+ extendNative(window.XMLHttpRequest, _XMLHttpRequest);
432
+ } catch (_error) {}
433
+ if (_XDomainRequest != null) {
434
+ window.XDomainRequest = function() {
435
+ var req;
436
+ req = new _XDomainRequest;
437
+ monitorXHR(req);
438
+ return req;
439
+ };
440
+ try {
441
+ extendNative(window.XDomainRequest, _XDomainRequest);
442
+ } catch (_error) {}
443
+ }
444
+ if ((_WebSocket != null) && options.ajax.trackWebSockets) {
445
+ window.WebSocket = function(url, protocols) {
446
+ var req;
447
+ if (protocols != null) {
448
+ req = new _WebSocket(url, protocols);
449
+ } else {
450
+ req = new _WebSocket(url);
451
+ }
452
+ if (shouldTrack('socket')) {
453
+ _this.trigger('request', {
454
+ type: 'socket',
455
+ url: url,
456
+ protocols: protocols,
457
+ request: req
458
+ });
459
+ }
460
+ return req;
461
+ };
462
+ try {
463
+ extendNative(window.WebSocket, _WebSocket);
464
+ } catch (_error) {}
465
+ }
466
+ }
467
+
468
+ return RequestIntercept;
469
+
470
+ })(Events);
471
+
472
+ _intercept = null;
473
+
474
+ getIntercept = function() {
475
+ if (_intercept == null) {
476
+ _intercept = new RequestIntercept;
477
+ }
478
+ return _intercept;
479
+ };
480
+
481
+ shouldIgnoreURL = function(url) {
482
+ var pattern, _j, _len1, _ref2;
483
+ _ref2 = options.ajax.ignoreURLs;
484
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
485
+ pattern = _ref2[_j];
486
+ if (typeof pattern === 'string') {
487
+ if (url.indexOf(pattern) !== -1) {
488
+ return true;
489
+ }
490
+ } else {
491
+ if (pattern.test(url)) {
492
+ return true;
493
+ }
494
+ }
495
+ }
496
+ return false;
497
+ };
498
+
499
+ getIntercept().on('request', function(_arg) {
500
+ var after, args, request, type, url;
501
+ type = _arg.type, request = _arg.request, url = _arg.url;
502
+ if (shouldIgnoreURL(url)) {
503
+ return;
504
+ }
505
+ if (!Pace.running && (options.restartOnRequestAfter !== false || shouldTrack(type) === 'force')) {
506
+ args = arguments;
507
+ after = options.restartOnRequestAfter || 0;
508
+ if (typeof after === 'boolean') {
509
+ after = 0;
510
+ }
511
+ return setTimeout(function() {
512
+ var stillActive, _j, _len1, _ref2, _ref3, _results;
513
+ if (type === 'socket') {
514
+ stillActive = request.readyState < 2;
515
+ } else {
516
+ stillActive = (0 < (_ref2 = request.readyState) && _ref2 < 4);
517
+ }
518
+ if (stillActive) {
519
+ Pace.restart();
520
+ _ref3 = Pace.sources;
521
+ _results = [];
522
+ for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
523
+ source = _ref3[_j];
524
+ if (source instanceof AjaxMonitor) {
525
+ source.watch.apply(source, args);
526
+ break;
527
+ } else {
528
+ _results.push(void 0);
529
+ }
530
+ }
531
+ return _results;
532
+ }
533
+ }, after);
534
+ }
535
+ });
536
+
537
+ AjaxMonitor = (function() {
538
+ function AjaxMonitor() {
539
+ var _this = this;
540
+ this.elements = [];
541
+ getIntercept().on('request', function() {
542
+ return _this.watch.apply(_this, arguments);
543
+ });
544
+ }
545
+
546
+ AjaxMonitor.prototype.watch = function(_arg) {
547
+ var request, tracker, type, url;
548
+ type = _arg.type, request = _arg.request, url = _arg.url;
549
+ if (shouldIgnoreURL(url)) {
550
+ return;
551
+ }
552
+ if (type === 'socket') {
553
+ tracker = new SocketRequestTracker(request);
554
+ } else {
555
+ tracker = new XHRRequestTracker(request);
556
+ }
557
+ return this.elements.push(tracker);
558
+ };
559
+
560
+ return AjaxMonitor;
561
+
562
+ })();
563
+
564
+ XHRRequestTracker = (function() {
565
+ function XHRRequestTracker(request) {
566
+ var event, size, _j, _len1, _onreadystatechange, _ref2,
567
+ _this = this;
568
+ this.progress = 0;
569
+ if (window.ProgressEvent != null) {
570
+ size = null;
571
+ request.addEventListener('progress', function(evt) {
572
+ if (evt.lengthComputable) {
573
+ return _this.progress = 100 * evt.loaded / evt.total;
574
+ } else {
575
+ return _this.progress = _this.progress + (100 - _this.progress) / 2;
576
+ }
577
+ }, false);
578
+ _ref2 = ['load', 'abort', 'timeout', 'error'];
579
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
580
+ event = _ref2[_j];
581
+ request.addEventListener(event, function() {
582
+ return _this.progress = 100;
583
+ }, false);
584
+ }
585
+ } else {
586
+ _onreadystatechange = request.onreadystatechange;
587
+ request.onreadystatechange = function() {
588
+ var _ref3;
589
+ if ((_ref3 = request.readyState) === 0 || _ref3 === 4) {
590
+ _this.progress = 100;
591
+ } else if (request.readyState === 3) {
592
+ _this.progress = 50;
593
+ }
594
+ return typeof _onreadystatechange === "function" ? _onreadystatechange.apply(null, arguments) : void 0;
595
+ };
596
+ }
597
+ }
598
+
599
+ return XHRRequestTracker;
600
+
601
+ })();
602
+
603
+ SocketRequestTracker = (function() {
604
+ function SocketRequestTracker(request) {
605
+ var event, _j, _len1, _ref2,
606
+ _this = this;
607
+ this.progress = 0;
608
+ _ref2 = ['error', 'open'];
609
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
610
+ event = _ref2[_j];
611
+ request.addEventListener(event, function() {
612
+ return _this.progress = 100;
613
+ }, false);
614
+ }
615
+ }
616
+
617
+ return SocketRequestTracker;
618
+
619
+ })();
620
+
621
+ ElementMonitor = (function() {
622
+ function ElementMonitor(options) {
623
+ var selector, _j, _len1, _ref2;
624
+ if (options == null) {
625
+ options = {};
626
+ }
627
+ this.elements = [];
628
+ if (options.selectors == null) {
629
+ options.selectors = [];
630
+ }
631
+ _ref2 = options.selectors;
632
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
633
+ selector = _ref2[_j];
634
+ this.elements.push(new ElementTracker(selector));
635
+ }
636
+ }
637
+
638
+ return ElementMonitor;
639
+
640
+ })();
641
+
642
+ ElementTracker = (function() {
643
+ function ElementTracker(selector) {
644
+ this.selector = selector;
645
+ this.progress = 0;
646
+ this.check();
647
+ }
648
+
649
+ ElementTracker.prototype.check = function() {
650
+ var _this = this;
651
+ if (document.querySelector(this.selector)) {
652
+ return this.done();
653
+ } else {
654
+ return setTimeout((function() {
655
+ return _this.check();
656
+ }), options.elements.checkInterval);
657
+ }
658
+ };
659
+
660
+ ElementTracker.prototype.done = function() {
661
+ return this.progress = 100;
662
+ };
663
+
664
+ return ElementTracker;
665
+
666
+ })();
667
+
668
+ DocumentMonitor = (function() {
669
+ DocumentMonitor.prototype.states = {
670
+ loading: 0,
671
+ interactive: 50,
672
+ complete: 100
673
+ };
674
+
675
+ function DocumentMonitor() {
676
+ var _onreadystatechange, _ref2,
677
+ _this = this;
678
+ this.progress = (_ref2 = this.states[document.readyState]) != null ? _ref2 : 100;
679
+ _onreadystatechange = document.onreadystatechange;
680
+ document.onreadystatechange = function() {
681
+ if (_this.states[document.readyState] != null) {
682
+ _this.progress = _this.states[document.readyState];
683
+ }
684
+ return typeof _onreadystatechange === "function" ? _onreadystatechange.apply(null, arguments) : void 0;
685
+ };
686
+ }
687
+
688
+ return DocumentMonitor;
689
+
690
+ })();
691
+
692
+ EventLagMonitor = (function() {
693
+ function EventLagMonitor() {
694
+ var avg, interval, last, points, samples,
695
+ _this = this;
696
+ this.progress = 0;
697
+ avg = 0;
698
+ samples = [];
699
+ points = 0;
700
+ last = now();
701
+ interval = setInterval(function() {
702
+ var diff;
703
+ diff = now() - last - 50;
704
+ last = now();
705
+ samples.push(diff);
706
+ if (samples.length > options.eventLag.sampleCount) {
707
+ samples.shift();
708
+ }
709
+ avg = avgAmplitude(samples);
710
+ if (++points >= options.eventLag.minSamples && avg < options.eventLag.lagThreshold) {
711
+ _this.progress = 100;
712
+ return clearInterval(interval);
713
+ } else {
714
+ return _this.progress = 100 * (3 / (avg + 3));
715
+ }
716
+ }, 50);
717
+ }
718
+
719
+ return EventLagMonitor;
720
+
721
+ })();
722
+
723
+ Scaler = (function() {
724
+ function Scaler(source) {
725
+ this.source = source;
726
+ this.last = this.sinceLastUpdate = 0;
727
+ this.rate = options.initialRate;
728
+ this.catchup = 0;
729
+ this.progress = this.lastProgress = 0;
730
+ if (this.source != null) {
731
+ this.progress = result(this.source, 'progress');
732
+ }
733
+ }
734
+
735
+ Scaler.prototype.tick = function(frameTime, val) {
736
+ var scaling;
737
+ if (val == null) {
738
+ val = result(this.source, 'progress');
739
+ }
740
+ if (val >= 100) {
741
+ this.done = true;
742
+ }
743
+ if (val === this.last) {
744
+ this.sinceLastUpdate += frameTime;
745
+ } else {
746
+ if (this.sinceLastUpdate) {
747
+ this.rate = (val - this.last) / this.sinceLastUpdate;
748
+ }
749
+ this.catchup = (val - this.progress) / options.catchupTime;
750
+ this.sinceLastUpdate = 0;
751
+ this.last = val;
752
+ }
753
+ if (val > this.progress) {
754
+ this.progress += this.catchup * frameTime;
755
+ }
756
+ scaling = 1 - Math.pow(this.progress / 100, options.easeFactor);
757
+ this.progress += scaling * this.rate * frameTime;
758
+ this.progress = Math.min(this.lastProgress + options.maxProgressPerFrame, this.progress);
759
+ this.progress = Math.max(0, this.progress);
760
+ this.progress = Math.min(100, this.progress);
761
+ this.lastProgress = this.progress;
762
+ return this.progress;
763
+ };
764
+
765
+ return Scaler;
766
+
767
+ })();
768
+
769
+ sources = null;
770
+
771
+ scalers = null;
772
+
773
+ bar = null;
774
+
775
+ uniScaler = null;
776
+
777
+ animation = null;
778
+
779
+ cancelAnimation = null;
780
+
781
+ Pace.running = false;
782
+
783
+ handlePushState = function() {
784
+ if (options.restartOnPushState) {
785
+ return Pace.restart();
786
+ }
787
+ };
788
+
789
+ if (window.history.pushState != null) {
790
+ _pushState = window.history.pushState;
791
+ window.history.pushState = function() {
792
+ handlePushState();
793
+ return _pushState.apply(window.history, arguments);
794
+ };
795
+ }
796
+
797
+ if (window.history.replaceState != null) {
798
+ _replaceState = window.history.replaceState;
799
+ window.history.replaceState = function() {
800
+ handlePushState();
801
+ return _replaceState.apply(window.history, arguments);
802
+ };
803
+ }
804
+
805
+ SOURCE_KEYS = {
806
+ ajax: AjaxMonitor,
807
+ elements: ElementMonitor,
808
+ document: DocumentMonitor,
809
+ eventLag: EventLagMonitor
810
+ };
811
+
812
+ (init = function() {
813
+ var type, _j, _k, _len1, _len2, _ref2, _ref3, _ref4;
814
+ Pace.sources = sources = [];
815
+ _ref2 = ['ajax', 'elements', 'document', 'eventLag'];
816
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
817
+ type = _ref2[_j];
818
+ if (options[type] !== false) {
819
+ sources.push(new SOURCE_KEYS[type](options[type]));
820
+ }
821
+ }
822
+ _ref4 = (_ref3 = options.extraSources) != null ? _ref3 : [];
823
+ for (_k = 0, _len2 = _ref4.length; _k < _len2; _k++) {
824
+ source = _ref4[_k];
825
+ sources.push(new source(options));
826
+ }
827
+ Pace.bar = bar = new Bar;
828
+ scalers = [];
829
+ return uniScaler = new Scaler;
830
+ })();
831
+
832
+ Pace.stop = function() {
833
+ Pace.trigger('stop');
834
+ Pace.running = false;
835
+ bar.destroy();
836
+ cancelAnimation = true;
837
+ if (animation != null) {
838
+ if (typeof cancelAnimationFrame === "function") {
839
+ cancelAnimationFrame(animation);
840
+ }
841
+ animation = null;
842
+ }
843
+ return init();
844
+ };
845
+
846
+ Pace.restart = function() {
847
+ Pace.trigger('restart');
848
+ Pace.stop();
849
+ return Pace.start();
850
+ };
851
+
852
+ Pace.go = function() {
853
+ var start;
854
+ Pace.running = true;
855
+ bar.render();
856
+ start = now();
857
+ cancelAnimation = false;
858
+ return animation = runAnimation(function(frameTime, enqueueNextFrame) {
859
+ var avg, count, done, element, elements, i, j, remaining, scaler, scalerList, sum, _j, _k, _len1, _len2, _ref2;
860
+ remaining = 100 - bar.progress;
861
+ count = sum = 0;
862
+ done = true;
863
+ for (i = _j = 0, _len1 = sources.length; _j < _len1; i = ++_j) {
864
+ source = sources[i];
865
+ scalerList = scalers[i] != null ? scalers[i] : scalers[i] = [];
866
+ elements = (_ref2 = source.elements) != null ? _ref2 : [source];
867
+ for (j = _k = 0, _len2 = elements.length; _k < _len2; j = ++_k) {
868
+ element = elements[j];
869
+ scaler = scalerList[j] != null ? scalerList[j] : scalerList[j] = new Scaler(element);
870
+ done &= scaler.done;
871
+ if (scaler.done) {
872
+ continue;
873
+ }
874
+ count++;
875
+ sum += scaler.tick(frameTime);
876
+ }
877
+ }
878
+ avg = sum / count;
879
+ bar.update(uniScaler.tick(frameTime, avg));
880
+ if (bar.done() || done || cancelAnimation) {
881
+ bar.update(100);
882
+ Pace.trigger('done');
883
+ return setTimeout(function() {
884
+ bar.finish();
885
+ Pace.running = false;
886
+ return Pace.trigger('hide');
887
+ }, Math.max(options.ghostTime, Math.max(options.minTime - (now() - start), 0)));
888
+ } else {
889
+ return enqueueNextFrame();
890
+ }
891
+ });
892
+ };
893
+
894
+ paceHideStyle = null;
895
+
896
+ Pace.start = function(_options) {
897
+ extend(options, _options);
898
+ if (options.hidePage) {
899
+ if (!paceHideStyle) {
900
+ paceHideStyle = document.createElement('style');
901
+ document.head.appendChild(paceHideStyle);
902
+ }
903
+ paceHideStyle.innerHTML = "body > *:not(.pace), body:before, body:after { -webkit-transition: opacity .4s ease-in-out; -moz-transition: opacity .4s ease-in-out; -o-transition: opacity .4s ease-in-out; -ms-transition: opacity .4s ease-in-out; transition: opacity .4s ease-in-out } body:not(.pace-done) > *:not(.pace), body:not(.pace-done):before, body:not(.pace-done):after { opacity: 0 !important }";
904
+ } else {
905
+ if (paceHideStyle != null) {
906
+ paceHideStyle.innerHTML = '';
907
+ }
908
+ }
909
+ Pace.running = true;
910
+ try {
911
+ bar.render();
912
+ } catch (_error) {
913
+ NoTargetError = _error;
914
+ }
915
+ if (!document.querySelector('.pace')) {
916
+ return setTimeout(Pace.start, 50);
917
+ } else {
918
+ Pace.trigger('start');
919
+ return Pace.go();
920
+ }
921
+ };
922
+
923
+ if (typeof define === 'function' && define.amd) {
924
+ define(function() {
925
+ return Pace;
926
+ });
927
+ } else if (typeof exports === 'object') {
928
+ module.exports = Pace;
929
+ } else {
930
+ if (options.startOnPageLoad) {
931
+ Pace.start();
932
+ }
933
+ }
934
+
935
+ }).call(this);