@jocmp/mercury-parser 2.4.10 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (695) hide show
  1. package/README.md +2 -9
  2. package/dist/generate-custom-parser.js +2854 -2413
  3. package/dist/generate-custom-parser.js.map +1 -1
  4. package/dist/mercury.js +1863 -1913
  5. package/dist/mercury.js.map +1 -1
  6. package/dist/mercury.web.js +3 -1
  7. package/dist/mercury.web.js.map +1 -1
  8. package/package.json +38 -55
  9. package/node_modules/browser-request/.gitignore +0 -3
  10. package/node_modules/browser-request/.npmignore +0 -3
  11. package/node_modules/jquery/AUTHORS.txt +0 -331
  12. package/node_modules/jquery/LICENSE.txt +0 -20
  13. package/node_modules/jquery/README.md +0 -62
  14. package/node_modules/jquery/bower.json +0 -14
  15. package/node_modules/jquery/dist/jquery.js +0 -10881
  16. package/node_modules/jquery/dist/jquery.min.js +0 -2
  17. package/node_modules/jquery/dist/jquery.min.map +0 -1
  18. package/node_modules/jquery/dist/jquery.slim.js +0 -8782
  19. package/node_modules/jquery/dist/jquery.slim.min.js +0 -2
  20. package/node_modules/jquery/dist/jquery.slim.min.map +0 -1
  21. package/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
  22. package/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2478
  23. package/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
  24. package/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
  25. package/node_modules/jquery/package.json +0 -116
  26. package/node_modules/jquery/src/ajax/jsonp.js +0 -103
  27. package/node_modules/jquery/src/ajax/load.js +0 -77
  28. package/node_modules/jquery/src/ajax/script.js +0 -74
  29. package/node_modules/jquery/src/ajax/var/location.js +0 -5
  30. package/node_modules/jquery/src/ajax/var/nonce.js +0 -5
  31. package/node_modules/jquery/src/ajax/var/rquery.js +0 -5
  32. package/node_modules/jquery/src/ajax/xhr.js +0 -170
  33. package/node_modules/jquery/src/ajax.js +0 -876
  34. package/node_modules/jquery/src/attributes/attr.js +0 -141
  35. package/node_modules/jquery/src/attributes/classes.js +0 -186
  36. package/node_modules/jquery/src/attributes/prop.js +0 -143
  37. package/node_modules/jquery/src/attributes/support.js +0 -33
  38. package/node_modules/jquery/src/attributes/val.js +0 -191
  39. package/node_modules/jquery/src/attributes.js +0 -13
  40. package/node_modules/jquery/src/callbacks.js +0 -236
  41. package/node_modules/jquery/src/core/DOMEval.js +0 -43
  42. package/node_modules/jquery/src/core/access.js +0 -72
  43. package/node_modules/jquery/src/core/camelCase.js +0 -23
  44. package/node_modules/jquery/src/core/init.js +0 -129
  45. package/node_modules/jquery/src/core/isAttached.js +0 -26
  46. package/node_modules/jquery/src/core/nodeName.js +0 -13
  47. package/node_modules/jquery/src/core/parseHTML.js +0 -65
  48. package/node_modules/jquery/src/core/parseXML.js +0 -35
  49. package/node_modules/jquery/src/core/ready-no-deferred.js +0 -97
  50. package/node_modules/jquery/src/core/ready.js +0 -86
  51. package/node_modules/jquery/src/core/readyException.js +0 -13
  52. package/node_modules/jquery/src/core/stripAndCollapse.js +0 -14
  53. package/node_modules/jquery/src/core/support.js +0 -20
  54. package/node_modules/jquery/src/core/toType.js +0 -20
  55. package/node_modules/jquery/src/core/var/rsingleTag.js +0 -7
  56. package/node_modules/jquery/src/core.js +0 -400
  57. package/node_modules/jquery/src/css/addGetHookIf.js +0 -26
  58. package/node_modules/jquery/src/css/adjustCSS.js +0 -74
  59. package/node_modules/jquery/src/css/curCSS.js +0 -65
  60. package/node_modules/jquery/src/css/finalPropName.js +0 -42
  61. package/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -15
  62. package/node_modules/jquery/src/css/showHide.js +0 -105
  63. package/node_modules/jquery/src/css/support.js +0 -152
  64. package/node_modules/jquery/src/css/var/cssExpand.js +0 -5
  65. package/node_modules/jquery/src/css/var/getStyles.js +0 -17
  66. package/node_modules/jquery/src/css/var/isHiddenWithinTree.js +0 -34
  67. package/node_modules/jquery/src/css/var/rboxStyle.js +0 -7
  68. package/node_modules/jquery/src/css/var/rnumnonpx.js +0 -7
  69. package/node_modules/jquery/src/css/var/swap.js +0 -26
  70. package/node_modules/jquery/src/css.js +0 -494
  71. package/node_modules/jquery/src/data/Data.js +0 -162
  72. package/node_modules/jquery/src/data/var/acceptData.js +0 -19
  73. package/node_modules/jquery/src/data/var/dataPriv.js +0 -7
  74. package/node_modules/jquery/src/data/var/dataUser.js +0 -7
  75. package/node_modules/jquery/src/data.js +0 -180
  76. package/node_modules/jquery/src/deferred/exceptionHook.js +0 -21
  77. package/node_modules/jquery/src/deferred.js +0 -399
  78. package/node_modules/jquery/src/deprecated/ajax-event-alias.js +0 -22
  79. package/node_modules/jquery/src/deprecated/event.js +0 -50
  80. package/node_modules/jquery/src/deprecated.js +0 -87
  81. package/node_modules/jquery/src/dimensions.js +0 -60
  82. package/node_modules/jquery/src/effects/Tween.js +0 -125
  83. package/node_modules/jquery/src/effects/animatedSelector.js +0 -15
  84. package/node_modules/jquery/src/effects.js +0 -702
  85. package/node_modules/jquery/src/event/focusin.js +0 -58
  86. package/node_modules/jquery/src/event/support.js +0 -11
  87. package/node_modules/jquery/src/event/trigger.js +0 -199
  88. package/node_modules/jquery/src/event.js +0 -874
  89. package/node_modules/jquery/src/exports/amd.js +0 -26
  90. package/node_modules/jquery/src/exports/global.js +0 -34
  91. package/node_modules/jquery/src/jquery.js +0 -41
  92. package/node_modules/jquery/src/manipulation/_evalUrl.js +0 -32
  93. package/node_modules/jquery/src/manipulation/buildFragment.js +0 -106
  94. package/node_modules/jquery/src/manipulation/getAll.js +0 -32
  95. package/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -22
  96. package/node_modules/jquery/src/manipulation/support.js +0 -41
  97. package/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -5
  98. package/node_modules/jquery/src/manipulation/var/rtagName.js +0 -8
  99. package/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
  100. package/node_modules/jquery/src/manipulation.js +0 -480
  101. package/node_modules/jquery/src/offset.js +0 -232
  102. package/node_modules/jquery/src/queue/delay.js +0 -24
  103. package/node_modules/jquery/src/queue.js +0 -145
  104. package/node_modules/jquery/src/selector-native.js +0 -241
  105. package/node_modules/jquery/src/selector-sizzle.js +0 -19
  106. package/node_modules/jquery/src/selector.js +0 -3
  107. package/node_modules/jquery/src/serialize.js +0 -134
  108. package/node_modules/jquery/src/traversing/findFilter.js +0 -97
  109. package/node_modules/jquery/src/traversing/var/dir.js +0 -22
  110. package/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -8
  111. package/node_modules/jquery/src/traversing/var/siblings.js +0 -17
  112. package/node_modules/jquery/src/traversing.js +0 -198
  113. package/node_modules/jquery/src/var/ObjectFunctionString.js +0 -7
  114. package/node_modules/jquery/src/var/arr.js +0 -5
  115. package/node_modules/jquery/src/var/class2type.js +0 -6
  116. package/node_modules/jquery/src/var/document.js +0 -5
  117. package/node_modules/jquery/src/var/documentElement.js +0 -7
  118. package/node_modules/jquery/src/var/flat.js +0 -16
  119. package/node_modules/jquery/src/var/fnToString.js +0 -7
  120. package/node_modules/jquery/src/var/getProto.js +0 -5
  121. package/node_modules/jquery/src/var/hasOwn.js +0 -7
  122. package/node_modules/jquery/src/var/indexOf.js +0 -7
  123. package/node_modules/jquery/src/var/isFunction.js +0 -17
  124. package/node_modules/jquery/src/var/isWindow.js +0 -8
  125. package/node_modules/jquery/src/var/pnum.js +0 -5
  126. package/node_modules/jquery/src/var/push.js +0 -7
  127. package/node_modules/jquery/src/var/rcheckableType.js +0 -5
  128. package/node_modules/jquery/src/var/rcssNum.js +0 -9
  129. package/node_modules/jquery/src/var/rnothtmlwhite.js +0 -8
  130. package/node_modules/jquery/src/var/slice.js +0 -7
  131. package/node_modules/jquery/src/var/support.js +0 -6
  132. package/node_modules/jquery/src/var/toString.js +0 -7
  133. package/node_modules/jquery/src/wrap.js +0 -78
  134. package/node_modules/moment/CHANGELOG.md +0 -996
  135. package/node_modules/moment/LICENSE +0 -22
  136. package/node_modules/moment/README.md +0 -55
  137. package/node_modules/moment/dist/locale/af.js +0 -71
  138. package/node_modules/moment/dist/locale/ar-dz.js +0 -156
  139. package/node_modules/moment/dist/locale/ar-kw.js +0 -55
  140. package/node_modules/moment/dist/locale/ar-ly.js +0 -171
  141. package/node_modules/moment/dist/locale/ar-ma.js +0 -56
  142. package/node_modules/moment/dist/locale/ar-ps.js +0 -112
  143. package/node_modules/moment/dist/locale/ar-sa.js +0 -105
  144. package/node_modules/moment/dist/locale/ar-tn.js +0 -55
  145. package/node_modules/moment/dist/locale/ar.js +0 -189
  146. package/node_modules/moment/dist/locale/az.js +0 -102
  147. package/node_modules/moment/dist/locale/be.js +0 -142
  148. package/node_modules/moment/dist/locale/bg.js +0 -87
  149. package/node_modules/moment/dist/locale/bm.js +0 -52
  150. package/node_modules/moment/dist/locale/bn-bd.js +0 -129
  151. package/node_modules/moment/dist/locale/bn.js +0 -119
  152. package/node_modules/moment/dist/locale/bo.js +0 -124
  153. package/node_modules/moment/dist/locale/br.js +0 -168
  154. package/node_modules/moment/dist/locale/bs.js +0 -160
  155. package/node_modules/moment/dist/locale/ca.js +0 -100
  156. package/node_modules/moment/dist/locale/cs.js +0 -181
  157. package/node_modules/moment/dist/locale/cv.js +0 -63
  158. package/node_modules/moment/dist/locale/cy.js +0 -98
  159. package/node_modules/moment/dist/locale/da.js +0 -53
  160. package/node_modules/moment/dist/locale/de-at.js +0 -79
  161. package/node_modules/moment/dist/locale/de-ch.js +0 -78
  162. package/node_modules/moment/dist/locale/de.js +0 -78
  163. package/node_modules/moment/dist/locale/dv.js +0 -90
  164. package/node_modules/moment/dist/locale/el.js +0 -106
  165. package/node_modules/moment/dist/locale/en-au.js +0 -68
  166. package/node_modules/moment/dist/locale/en-ca.js +0 -64
  167. package/node_modules/moment/dist/locale/en-gb.js +0 -68
  168. package/node_modules/moment/dist/locale/en-ie.js +0 -68
  169. package/node_modules/moment/dist/locale/en-il.js +0 -64
  170. package/node_modules/moment/dist/locale/en-in.js +0 -68
  171. package/node_modules/moment/dist/locale/en-nz.js +0 -68
  172. package/node_modules/moment/dist/locale/en-sg.js +0 -68
  173. package/node_modules/moment/dist/locale/eo.js +0 -68
  174. package/node_modules/moment/dist/locale/es-do.js +0 -108
  175. package/node_modules/moment/dist/locale/es-mx.js +0 -110
  176. package/node_modules/moment/dist/locale/es-us.js +0 -110
  177. package/node_modules/moment/dist/locale/es.js +0 -110
  178. package/node_modules/moment/dist/locale/et.js +0 -78
  179. package/node_modules/moment/dist/locale/eu.js +0 -65
  180. package/node_modules/moment/dist/locale/fa.js +0 -113
  181. package/node_modules/moment/dist/locale/fi.js +0 -124
  182. package/node_modules/moment/dist/locale/fil.js +0 -58
  183. package/node_modules/moment/dist/locale/fo.js +0 -57
  184. package/node_modules/moment/dist/locale/fr-ca.js +0 -70
  185. package/node_modules/moment/dist/locale/fr-ch.js +0 -74
  186. package/node_modules/moment/dist/locale/fr.js +0 -108
  187. package/node_modules/moment/dist/locale/fy.js +0 -75
  188. package/node_modules/moment/dist/locale/ga.js +0 -95
  189. package/node_modules/moment/dist/locale/gd.js +0 -95
  190. package/node_modules/moment/dist/locale/gl.js +0 -75
  191. package/node_modules/moment/dist/locale/gom-deva.js +0 -126
  192. package/node_modules/moment/dist/locale/gom-latn.js +0 -124
  193. package/node_modules/moment/dist/locale/gu.js +0 -122
  194. package/node_modules/moment/dist/locale/he.js +0 -94
  195. package/node_modules/moment/dist/locale/hi.js +0 -168
  196. package/node_modules/moment/dist/locale/hr.js +0 -156
  197. package/node_modules/moment/dist/locale/hu.js +0 -118
  198. package/node_modules/moment/dist/locale/hy-am.js +0 -94
  199. package/node_modules/moment/dist/locale/id.js +0 -76
  200. package/node_modules/moment/dist/locale/is.js +0 -140
  201. package/node_modules/moment/dist/locale/it-ch.js +0 -64
  202. package/node_modules/moment/dist/locale/it.js +0 -106
  203. package/node_modules/moment/dist/locale/ja.js +0 -148
  204. package/node_modules/moment/dist/locale/jv.js +0 -76
  205. package/node_modules/moment/dist/locale/ka.js +0 -92
  206. package/node_modules/moment/dist/locale/kk.js +0 -82
  207. package/node_modules/moment/dist/locale/km.js +0 -103
  208. package/node_modules/moment/dist/locale/kn.js +0 -124
  209. package/node_modules/moment/dist/locale/ko.js +0 -75
  210. package/node_modules/moment/dist/locale/ku-kmr.js +0 -121
  211. package/node_modules/moment/dist/locale/ku.js +0 -118
  212. package/node_modules/moment/dist/locale/ky.js +0 -84
  213. package/node_modules/moment/dist/locale/lb.js +0 -137
  214. package/node_modules/moment/dist/locale/lo.js +0 -66
  215. package/node_modules/moment/dist/locale/lt.js +0 -125
  216. package/node_modules/moment/dist/locale/lv.js +0 -94
  217. package/node_modules/moment/dist/locale/me.js +0 -117
  218. package/node_modules/moment/dist/locale/mi.js +0 -60
  219. package/node_modules/moment/dist/locale/mk.js +0 -85
  220. package/node_modules/moment/dist/locale/ml.js +0 -82
  221. package/node_modules/moment/dist/locale/mn.js +0 -100
  222. package/node_modules/moment/dist/locale/mr.js +0 -203
  223. package/node_modules/moment/dist/locale/ms-my.js +0 -76
  224. package/node_modules/moment/dist/locale/ms.js +0 -75
  225. package/node_modules/moment/dist/locale/mt.js +0 -56
  226. package/node_modules/moment/dist/locale/my.js +0 -91
  227. package/node_modules/moment/dist/locale/nb.js +0 -60
  228. package/node_modules/moment/dist/locale/ne.js +0 -121
  229. package/node_modules/moment/dist/locale/nl-be.js +0 -102
  230. package/node_modules/moment/dist/locale/nl.js +0 -104
  231. package/node_modules/moment/dist/locale/nn.js +0 -59
  232. package/node_modules/moment/dist/locale/oc-lnc.js +0 -85
  233. package/node_modules/moment/dist/locale/pa-in.js +0 -122
  234. package/node_modules/moment/dist/locale/pl.js +0 -140
  235. package/node_modules/moment/dist/locale/pt-br.js +0 -58
  236. package/node_modules/moment/dist/locale/pt.js +0 -63
  237. package/node_modules/moment/dist/locale/ro.js +0 -76
  238. package/node_modules/moment/dist/locale/ru.js +0 -213
  239. package/node_modules/moment/dist/locale/sd.js +0 -81
  240. package/node_modules/moment/dist/locale/se.js +0 -57
  241. package/node_modules/moment/dist/locale/si.js +0 -69
  242. package/node_modules/moment/dist/locale/sk.js +0 -145
  243. package/node_modules/moment/dist/locale/sl.js +0 -171
  244. package/node_modules/moment/dist/locale/sq.js +0 -65
  245. package/node_modules/moment/dist/locale/sr-cyrl.js +0 -127
  246. package/node_modules/moment/dist/locale/sr.js +0 -129
  247. package/node_modules/moment/dist/locale/ss.js +0 -84
  248. package/node_modules/moment/dist/locale/sv.js +0 -68
  249. package/node_modules/moment/dist/locale/sw.js +0 -55
  250. package/node_modules/moment/dist/locale/ta.js +0 -131
  251. package/node_modules/moment/dist/locale/te.js +0 -88
  252. package/node_modules/moment/dist/locale/tet.js +0 -68
  253. package/node_modules/moment/dist/locale/tg.js +0 -117
  254. package/node_modules/moment/dist/locale/th.js +0 -65
  255. package/node_modules/moment/dist/locale/tk.js +0 -91
  256. package/node_modules/moment/dist/locale/tl-ph.js +0 -57
  257. package/node_modules/moment/dist/locale/tlh.js +0 -124
  258. package/node_modules/moment/dist/locale/tr.js +0 -106
  259. package/node_modules/moment/dist/locale/tzl.js +0 -89
  260. package/node_modules/moment/dist/locale/tzm-latn.js +0 -54
  261. package/node_modules/moment/dist/locale/tzm.js +0 -54
  262. package/node_modules/moment/dist/locale/ug-cn.js +0 -111
  263. package/node_modules/moment/dist/locale/uk.js +0 -167
  264. package/node_modules/moment/dist/locale/ur.js +0 -82
  265. package/node_modules/moment/dist/locale/uz-latn.js +0 -54
  266. package/node_modules/moment/dist/locale/uz.js +0 -51
  267. package/node_modules/moment/dist/locale/vi.js +0 -80
  268. package/node_modules/moment/dist/locale/x-pseudo.js +0 -73
  269. package/node_modules/moment/dist/locale/yo.js +0 -53
  270. package/node_modules/moment/dist/locale/zh-cn.js +0 -120
  271. package/node_modules/moment/dist/locale/zh-hk.js +0 -101
  272. package/node_modules/moment/dist/locale/zh-mo.js +0 -100
  273. package/node_modules/moment/dist/locale/zh-tw.js +0 -99
  274. package/node_modules/moment/dist/moment.js +0 -5680
  275. package/node_modules/moment/ender.js +0 -1
  276. package/node_modules/moment/locale/af.js +0 -82
  277. package/node_modules/moment/locale/ar-dz.js +0 -167
  278. package/node_modules/moment/locale/ar-kw.js +0 -66
  279. package/node_modules/moment/locale/ar-ly.js +0 -182
  280. package/node_modules/moment/locale/ar-ma.js +0 -67
  281. package/node_modules/moment/locale/ar-ps.js +0 -123
  282. package/node_modules/moment/locale/ar-sa.js +0 -116
  283. package/node_modules/moment/locale/ar-tn.js +0 -66
  284. package/node_modules/moment/locale/ar.js +0 -200
  285. package/node_modules/moment/locale/az.js +0 -113
  286. package/node_modules/moment/locale/be.js +0 -153
  287. package/node_modules/moment/locale/bg.js +0 -98
  288. package/node_modules/moment/locale/bm.js +0 -62
  289. package/node_modules/moment/locale/bn-bd.js +0 -140
  290. package/node_modules/moment/locale/bn.js +0 -130
  291. package/node_modules/moment/locale/bo.js +0 -135
  292. package/node_modules/moment/locale/br.js +0 -179
  293. package/node_modules/moment/locale/bs.js +0 -171
  294. package/node_modules/moment/locale/ca.js +0 -111
  295. package/node_modules/moment/locale/cs.js +0 -192
  296. package/node_modules/moment/locale/cv.js +0 -74
  297. package/node_modules/moment/locale/cy.js +0 -109
  298. package/node_modules/moment/locale/da.js +0 -64
  299. package/node_modules/moment/locale/de-at.js +0 -90
  300. package/node_modules/moment/locale/de-ch.js +0 -87
  301. package/node_modules/moment/locale/de.js +0 -89
  302. package/node_modules/moment/locale/dv.js +0 -101
  303. package/node_modules/moment/locale/el.js +0 -117
  304. package/node_modules/moment/locale/en-au.js +0 -79
  305. package/node_modules/moment/locale/en-ca.js +0 -75
  306. package/node_modules/moment/locale/en-gb.js +0 -79
  307. package/node_modules/moment/locale/en-ie.js +0 -79
  308. package/node_modules/moment/locale/en-il.js +0 -75
  309. package/node_modules/moment/locale/en-in.js +0 -79
  310. package/node_modules/moment/locale/en-nz.js +0 -79
  311. package/node_modules/moment/locale/en-sg.js +0 -79
  312. package/node_modules/moment/locale/eo.js +0 -79
  313. package/node_modules/moment/locale/es-do.js +0 -119
  314. package/node_modules/moment/locale/es-mx.js +0 -121
  315. package/node_modules/moment/locale/es-us.js +0 -121
  316. package/node_modules/moment/locale/es.js +0 -121
  317. package/node_modules/moment/locale/et.js +0 -89
  318. package/node_modules/moment/locale/eu.js +0 -76
  319. package/node_modules/moment/locale/fa.js +0 -124
  320. package/node_modules/moment/locale/fi.js +0 -135
  321. package/node_modules/moment/locale/fil.js +0 -69
  322. package/node_modules/moment/locale/fo.js +0 -68
  323. package/node_modules/moment/locale/fr-ca.js +0 -81
  324. package/node_modules/moment/locale/fr-ch.js +0 -85
  325. package/node_modules/moment/locale/fr.js +0 -119
  326. package/node_modules/moment/locale/fy.js +0 -86
  327. package/node_modules/moment/locale/ga.js +0 -106
  328. package/node_modules/moment/locale/gd.js +0 -106
  329. package/node_modules/moment/locale/gl.js +0 -86
  330. package/node_modules/moment/locale/gom-deva.js +0 -137
  331. package/node_modules/moment/locale/gom-latn.js +0 -135
  332. package/node_modules/moment/locale/gu.js +0 -133
  333. package/node_modules/moment/locale/he.js +0 -105
  334. package/node_modules/moment/locale/hi.js +0 -179
  335. package/node_modules/moment/locale/hr.js +0 -167
  336. package/node_modules/moment/locale/hu.js +0 -129
  337. package/node_modules/moment/locale/hy-am.js +0 -105
  338. package/node_modules/moment/locale/id.js +0 -87
  339. package/node_modules/moment/locale/is.js +0 -151
  340. package/node_modules/moment/locale/it-ch.js +0 -75
  341. package/node_modules/moment/locale/it.js +0 -117
  342. package/node_modules/moment/locale/ja.js +0 -159
  343. package/node_modules/moment/locale/jv.js +0 -87
  344. package/node_modules/moment/locale/ka.js +0 -103
  345. package/node_modules/moment/locale/kk.js +0 -93
  346. package/node_modules/moment/locale/km.js +0 -114
  347. package/node_modules/moment/locale/kn.js +0 -135
  348. package/node_modules/moment/locale/ko.js +0 -86
  349. package/node_modules/moment/locale/ku-kmr.js +0 -125
  350. package/node_modules/moment/locale/ku.js +0 -129
  351. package/node_modules/moment/locale/ky.js +0 -95
  352. package/node_modules/moment/locale/lb.js +0 -148
  353. package/node_modules/moment/locale/lo.js +0 -77
  354. package/node_modules/moment/locale/lt.js +0 -136
  355. package/node_modules/moment/locale/lv.js +0 -105
  356. package/node_modules/moment/locale/me.js +0 -128
  357. package/node_modules/moment/locale/mi.js +0 -71
  358. package/node_modules/moment/locale/mk.js +0 -97
  359. package/node_modules/moment/locale/ml.js +0 -93
  360. package/node_modules/moment/locale/mn.js +0 -111
  361. package/node_modules/moment/locale/mr.js +0 -214
  362. package/node_modules/moment/locale/ms-my.js +0 -87
  363. package/node_modules/moment/locale/ms.js +0 -86
  364. package/node_modules/moment/locale/mt.js +0 -67
  365. package/node_modules/moment/locale/my.js +0 -102
  366. package/node_modules/moment/locale/nb.js +0 -71
  367. package/node_modules/moment/locale/ne.js +0 -132
  368. package/node_modules/moment/locale/nl-be.js +0 -113
  369. package/node_modules/moment/locale/nl.js +0 -115
  370. package/node_modules/moment/locale/nn.js +0 -70
  371. package/node_modules/moment/locale/oc-lnc.js +0 -96
  372. package/node_modules/moment/locale/pa-in.js +0 -133
  373. package/node_modules/moment/locale/pl.js +0 -151
  374. package/node_modules/moment/locale/pt-br.js +0 -69
  375. package/node_modules/moment/locale/pt.js +0 -74
  376. package/node_modules/moment/locale/ro.js +0 -87
  377. package/node_modules/moment/locale/ru.js +0 -224
  378. package/node_modules/moment/locale/sd.js +0 -92
  379. package/node_modules/moment/locale/se.js +0 -68
  380. package/node_modules/moment/locale/si.js +0 -80
  381. package/node_modules/moment/locale/sk.js +0 -156
  382. package/node_modules/moment/locale/sl.js +0 -182
  383. package/node_modules/moment/locale/sq.js +0 -76
  384. package/node_modules/moment/locale/sr-cyrl.js +0 -138
  385. package/node_modules/moment/locale/sr.js +0 -140
  386. package/node_modules/moment/locale/ss.js +0 -95
  387. package/node_modules/moment/locale/sv.js +0 -79
  388. package/node_modules/moment/locale/sw.js +0 -66
  389. package/node_modules/moment/locale/ta.js +0 -142
  390. package/node_modules/moment/locale/te.js +0 -99
  391. package/node_modules/moment/locale/tet.js +0 -79
  392. package/node_modules/moment/locale/tg.js +0 -128
  393. package/node_modules/moment/locale/th.js +0 -76
  394. package/node_modules/moment/locale/tk.js +0 -102
  395. package/node_modules/moment/locale/tl-ph.js +0 -68
  396. package/node_modules/moment/locale/tlh.js +0 -135
  397. package/node_modules/moment/locale/tr.js +0 -117
  398. package/node_modules/moment/locale/tzl.js +0 -100
  399. package/node_modules/moment/locale/tzm-latn.js +0 -65
  400. package/node_modules/moment/locale/tzm.js +0 -65
  401. package/node_modules/moment/locale/ug-cn.js +0 -122
  402. package/node_modules/moment/locale/uk.js +0 -178
  403. package/node_modules/moment/locale/ur.js +0 -93
  404. package/node_modules/moment/locale/uz-latn.js +0 -65
  405. package/node_modules/moment/locale/uz.js +0 -62
  406. package/node_modules/moment/locale/vi.js +0 -91
  407. package/node_modules/moment/locale/x-pseudo.js +0 -84
  408. package/node_modules/moment/locale/yo.js +0 -64
  409. package/node_modules/moment/locale/zh-cn.js +0 -131
  410. package/node_modules/moment/locale/zh-hk.js +0 -112
  411. package/node_modules/moment/locale/zh-mo.js +0 -111
  412. package/node_modules/moment/locale/zh-tw.js +0 -110
  413. package/node_modules/moment/min/locales.js +0 -12800
  414. package/node_modules/moment/min/locales.min.js +0 -2
  415. package/node_modules/moment/min/locales.min.js.map +0 -1
  416. package/node_modules/moment/min/moment-with-locales.js +0 -18472
  417. package/node_modules/moment/min/moment-with-locales.min.js +0 -2
  418. package/node_modules/moment/min/moment-with-locales.min.js.map +0 -1
  419. package/node_modules/moment/min/moment.min.js +0 -2
  420. package/node_modules/moment/min/moment.min.js.map +0 -1
  421. package/node_modules/moment/moment.d.ts +0 -796
  422. package/node_modules/moment/moment.js +0 -5688
  423. package/node_modules/moment/package.js +0 -11
  424. package/node_modules/moment/package.json +0 -116
  425. package/node_modules/moment/src/lib/create/check-overflow.js +0 -57
  426. package/node_modules/moment/src/lib/create/date-from-array.js +0 -35
  427. package/node_modules/moment/src/lib/create/from-anything.js +0 -117
  428. package/node_modules/moment/src/lib/create/from-array.js +0 -187
  429. package/node_modules/moment/src/lib/create/from-object.js +0 -20
  430. package/node_modules/moment/src/lib/create/from-string-and-array.js +0 -67
  431. package/node_modules/moment/src/lib/create/from-string-and-format.js +0 -135
  432. package/node_modules/moment/src/lib/create/from-string.js +0 -258
  433. package/node_modules/moment/src/lib/create/local.js +0 -5
  434. package/node_modules/moment/src/lib/create/parsing-flags.js +0 -28
  435. package/node_modules/moment/src/lib/create/utc.js +0 -5
  436. package/node_modules/moment/src/lib/create/valid.js +0 -51
  437. package/node_modules/moment/src/lib/duration/abs.js +0 -18
  438. package/node_modules/moment/src/lib/duration/add-subtract.js +0 -21
  439. package/node_modules/moment/src/lib/duration/as.js +0 -76
  440. package/node_modules/moment/src/lib/duration/bubble.js +0 -68
  441. package/node_modules/moment/src/lib/duration/clone.js +0 -5
  442. package/node_modules/moment/src/lib/duration/constructor.js +0 -42
  443. package/node_modules/moment/src/lib/duration/create.js +0 -133
  444. package/node_modules/moment/src/lib/duration/duration.js +0 -16
  445. package/node_modules/moment/src/lib/duration/get.js +0 -27
  446. package/node_modules/moment/src/lib/duration/humanize.js +0 -114
  447. package/node_modules/moment/src/lib/duration/iso-string.js +0 -68
  448. package/node_modules/moment/src/lib/duration/prototype.js +0 -78
  449. package/node_modules/moment/src/lib/duration/valid.js +0 -55
  450. package/node_modules/moment/src/lib/format/format.js +0 -104
  451. package/node_modules/moment/src/lib/locale/base-config.js +0 -41
  452. package/node_modules/moment/src/lib/locale/calendar.js +0 -15
  453. package/node_modules/moment/src/lib/locale/constructor.js +0 -5
  454. package/node_modules/moment/src/lib/locale/en.js +0 -39
  455. package/node_modules/moment/src/lib/locale/formats.js +0 -36
  456. package/node_modules/moment/src/lib/locale/invalid.js +0 -5
  457. package/node_modules/moment/src/lib/locale/lists.js +0 -93
  458. package/node_modules/moment/src/lib/locale/locale.js +0 -45
  459. package/node_modules/moment/src/lib/locale/locales.js +0 -249
  460. package/node_modules/moment/src/lib/locale/ordinal.js +0 -8
  461. package/node_modules/moment/src/lib/locale/pre-post-format.js +0 -3
  462. package/node_modules/moment/src/lib/locale/prototype.js +0 -88
  463. package/node_modules/moment/src/lib/locale/relative.js +0 -32
  464. package/node_modules/moment/src/lib/locale/set.js +0 -56
  465. package/node_modules/moment/src/lib/moment/add-subtract.js +0 -61
  466. package/node_modules/moment/src/lib/moment/calendar.js +0 -53
  467. package/node_modules/moment/src/lib/moment/clone.js +0 -5
  468. package/node_modules/moment/src/lib/moment/compare.js +0 -72
  469. package/node_modules/moment/src/lib/moment/constructor.js +0 -80
  470. package/node_modules/moment/src/lib/moment/creation-data.js +0 -9
  471. package/node_modules/moment/src/lib/moment/diff.js +0 -79
  472. package/node_modules/moment/src/lib/moment/format.js +0 -78
  473. package/node_modules/moment/src/lib/moment/from.js +0 -20
  474. package/node_modules/moment/src/lib/moment/get-set.js +0 -117
  475. package/node_modules/moment/src/lib/moment/locale.js +0 -34
  476. package/node_modules/moment/src/lib/moment/min-max.js +0 -62
  477. package/node_modules/moment/src/lib/moment/moment.js +0 -28
  478. package/node_modules/moment/src/lib/moment/now.js +0 -3
  479. package/node_modules/moment/src/lib/moment/prototype.js +0 -197
  480. package/node_modules/moment/src/lib/moment/start-end-of.js +0 -164
  481. package/node_modules/moment/src/lib/moment/to-type.js +0 -42
  482. package/node_modules/moment/src/lib/moment/to.js +0 -20
  483. package/node_modules/moment/src/lib/moment/valid.js +0 -15
  484. package/node_modules/moment/src/lib/parse/regex.js +0 -84
  485. package/node_modules/moment/src/lib/parse/token.js +0 -36
  486. package/node_modules/moment/src/lib/units/aliases.js +0 -75
  487. package/node_modules/moment/src/lib/units/constants.js +0 -9
  488. package/node_modules/moment/src/lib/units/day-of-month.js +0 -35
  489. package/node_modules/moment/src/lib/units/day-of-week.js +0 -432
  490. package/node_modules/moment/src/lib/units/day-of-year.js +0 -28
  491. package/node_modules/moment/src/lib/units/era.js +0 -293
  492. package/node_modules/moment/src/lib/units/hour.js +0 -152
  493. package/node_modules/moment/src/lib/units/millisecond.js +0 -66
  494. package/node_modules/moment/src/lib/units/minute.js +0 -24
  495. package/node_modules/moment/src/lib/units/month.js +0 -340
  496. package/node_modules/moment/src/lib/units/offset.js +0 -249
  497. package/node_modules/moment/src/lib/units/priorities.js +0 -34
  498. package/node_modules/moment/src/lib/units/quarter.js +0 -24
  499. package/node_modules/moment/src/lib/units/second.js +0 -24
  500. package/node_modules/moment/src/lib/units/timestamp.js +0 -20
  501. package/node_modules/moment/src/lib/units/timezone.js +0 -16
  502. package/node_modules/moment/src/lib/units/units.js +0 -20
  503. package/node_modules/moment/src/lib/units/week-calendar-utils.js +0 -66
  504. package/node_modules/moment/src/lib/units/week-year.js +0 -128
  505. package/node_modules/moment/src/lib/units/week.js +0 -62
  506. package/node_modules/moment/src/lib/units/year.js +0 -75
  507. package/node_modules/moment/src/lib/utils/abs-ceil.js +0 -7
  508. package/node_modules/moment/src/lib/utils/abs-floor.js +0 -8
  509. package/node_modules/moment/src/lib/utils/abs-round.js +0 -7
  510. package/node_modules/moment/src/lib/utils/compare-arrays.js +0 -18
  511. package/node_modules/moment/src/lib/utils/defaults.js +0 -10
  512. package/node_modules/moment/src/lib/utils/deprecate.js +0 -69
  513. package/node_modules/moment/src/lib/utils/extend.js +0 -19
  514. package/node_modules/moment/src/lib/utils/has-own-prop.js +0 -3
  515. package/node_modules/moment/src/lib/utils/hooks.js +0 -13
  516. package/node_modules/moment/src/lib/utils/index-of.js +0 -18
  517. package/node_modules/moment/src/lib/utils/is-array.js +0 -6
  518. package/node_modules/moment/src/lib/utils/is-calendar-spec.js +0 -25
  519. package/node_modules/moment/src/lib/utils/is-date.js +0 -6
  520. package/node_modules/moment/src/lib/utils/is-function.js +0 -6
  521. package/node_modules/moment/src/lib/utils/is-leap-year.js +0 -3
  522. package/node_modules/moment/src/lib/utils/is-moment-input.js +0 -75
  523. package/node_modules/moment/src/lib/utils/is-number.js +0 -6
  524. package/node_modules/moment/src/lib/utils/is-object-empty.js +0 -15
  525. package/node_modules/moment/src/lib/utils/is-object.js +0 -8
  526. package/node_modules/moment/src/lib/utils/is-string.js +0 -3
  527. package/node_modules/moment/src/lib/utils/is-undefined.js +0 -3
  528. package/node_modules/moment/src/lib/utils/keys.js +0 -20
  529. package/node_modules/moment/src/lib/utils/map.js +0 -9
  530. package/node_modules/moment/src/lib/utils/mod.js +0 -3
  531. package/node_modules/moment/src/lib/utils/some.js +0 -20
  532. package/node_modules/moment/src/lib/utils/to-int.js +0 -12
  533. package/node_modules/moment/src/lib/utils/zero-fill.js +0 -10
  534. package/node_modules/moment/src/locale/af.js +0 -71
  535. package/node_modules/moment/src/locale/ar-dz.js +0 -156
  536. package/node_modules/moment/src/locale/ar-kw.js +0 -55
  537. package/node_modules/moment/src/locale/ar-ly.js +0 -171
  538. package/node_modules/moment/src/locale/ar-ma.js +0 -56
  539. package/node_modules/moment/src/locale/ar-ps.js +0 -112
  540. package/node_modules/moment/src/locale/ar-sa.js +0 -105
  541. package/node_modules/moment/src/locale/ar-tn.js +0 -55
  542. package/node_modules/moment/src/locale/ar.js +0 -189
  543. package/node_modules/moment/src/locale/az.js +0 -102
  544. package/node_modules/moment/src/locale/be.js +0 -142
  545. package/node_modules/moment/src/locale/bg.js +0 -87
  546. package/node_modules/moment/src/locale/bm.js +0 -52
  547. package/node_modules/moment/src/locale/bn-bd.js +0 -129
  548. package/node_modules/moment/src/locale/bn.js +0 -119
  549. package/node_modules/moment/src/locale/bo.js +0 -124
  550. package/node_modules/moment/src/locale/br.js +0 -168
  551. package/node_modules/moment/src/locale/bs.js +0 -160
  552. package/node_modules/moment/src/locale/ca.js +0 -100
  553. package/node_modules/moment/src/locale/cs.js +0 -181
  554. package/node_modules/moment/src/locale/cv.js +0 -63
  555. package/node_modules/moment/src/locale/cy.js +0 -98
  556. package/node_modules/moment/src/locale/da.js +0 -53
  557. package/node_modules/moment/src/locale/de-at.js +0 -79
  558. package/node_modules/moment/src/locale/de-ch.js +0 -78
  559. package/node_modules/moment/src/locale/de.js +0 -78
  560. package/node_modules/moment/src/locale/dv.js +0 -90
  561. package/node_modules/moment/src/locale/el.js +0 -106
  562. package/node_modules/moment/src/locale/en-au.js +0 -68
  563. package/node_modules/moment/src/locale/en-ca.js +0 -64
  564. package/node_modules/moment/src/locale/en-gb.js +0 -68
  565. package/node_modules/moment/src/locale/en-ie.js +0 -68
  566. package/node_modules/moment/src/locale/en-il.js +0 -64
  567. package/node_modules/moment/src/locale/en-in.js +0 -68
  568. package/node_modules/moment/src/locale/en-nz.js +0 -68
  569. package/node_modules/moment/src/locale/en-sg.js +0 -68
  570. package/node_modules/moment/src/locale/eo.js +0 -68
  571. package/node_modules/moment/src/locale/es-do.js +0 -108
  572. package/node_modules/moment/src/locale/es-mx.js +0 -110
  573. package/node_modules/moment/src/locale/es-us.js +0 -110
  574. package/node_modules/moment/src/locale/es.js +0 -110
  575. package/node_modules/moment/src/locale/et.js +0 -78
  576. package/node_modules/moment/src/locale/eu.js +0 -65
  577. package/node_modules/moment/src/locale/fa.js +0 -113
  578. package/node_modules/moment/src/locale/fi.js +0 -124
  579. package/node_modules/moment/src/locale/fil.js +0 -58
  580. package/node_modules/moment/src/locale/fo.js +0 -57
  581. package/node_modules/moment/src/locale/fr-ca.js +0 -70
  582. package/node_modules/moment/src/locale/fr-ch.js +0 -74
  583. package/node_modules/moment/src/locale/fr.js +0 -108
  584. package/node_modules/moment/src/locale/fy.js +0 -75
  585. package/node_modules/moment/src/locale/ga.js +0 -95
  586. package/node_modules/moment/src/locale/gd.js +0 -95
  587. package/node_modules/moment/src/locale/gl.js +0 -75
  588. package/node_modules/moment/src/locale/gom-deva.js +0 -126
  589. package/node_modules/moment/src/locale/gom-latn.js +0 -124
  590. package/node_modules/moment/src/locale/gu.js +0 -122
  591. package/node_modules/moment/src/locale/he.js +0 -94
  592. package/node_modules/moment/src/locale/hi.js +0 -168
  593. package/node_modules/moment/src/locale/hr.js +0 -156
  594. package/node_modules/moment/src/locale/hu.js +0 -118
  595. package/node_modules/moment/src/locale/hy-am.js +0 -94
  596. package/node_modules/moment/src/locale/id.js +0 -76
  597. package/node_modules/moment/src/locale/is.js +0 -140
  598. package/node_modules/moment/src/locale/it-ch.js +0 -64
  599. package/node_modules/moment/src/locale/it.js +0 -106
  600. package/node_modules/moment/src/locale/ja.js +0 -148
  601. package/node_modules/moment/src/locale/jv.js +0 -76
  602. package/node_modules/moment/src/locale/ka.js +0 -92
  603. package/node_modules/moment/src/locale/kk.js +0 -82
  604. package/node_modules/moment/src/locale/km.js +0 -103
  605. package/node_modules/moment/src/locale/kn.js +0 -124
  606. package/node_modules/moment/src/locale/ko.js +0 -75
  607. package/node_modules/moment/src/locale/ku-kmr.js +0 -121
  608. package/node_modules/moment/src/locale/ku.js +0 -118
  609. package/node_modules/moment/src/locale/ky.js +0 -84
  610. package/node_modules/moment/src/locale/lb.js +0 -137
  611. package/node_modules/moment/src/locale/lo.js +0 -66
  612. package/node_modules/moment/src/locale/lt.js +0 -125
  613. package/node_modules/moment/src/locale/lv.js +0 -94
  614. package/node_modules/moment/src/locale/me.js +0 -117
  615. package/node_modules/moment/src/locale/mi.js +0 -60
  616. package/node_modules/moment/src/locale/mk.js +0 -85
  617. package/node_modules/moment/src/locale/ml.js +0 -82
  618. package/node_modules/moment/src/locale/mn.js +0 -100
  619. package/node_modules/moment/src/locale/mr.js +0 -203
  620. package/node_modules/moment/src/locale/ms-my.js +0 -76
  621. package/node_modules/moment/src/locale/ms.js +0 -75
  622. package/node_modules/moment/src/locale/mt.js +0 -56
  623. package/node_modules/moment/src/locale/my.js +0 -91
  624. package/node_modules/moment/src/locale/nb.js +0 -60
  625. package/node_modules/moment/src/locale/ne.js +0 -121
  626. package/node_modules/moment/src/locale/nl-be.js +0 -102
  627. package/node_modules/moment/src/locale/nl.js +0 -104
  628. package/node_modules/moment/src/locale/nn.js +0 -59
  629. package/node_modules/moment/src/locale/oc-lnc.js +0 -85
  630. package/node_modules/moment/src/locale/pa-in.js +0 -122
  631. package/node_modules/moment/src/locale/pl.js +0 -140
  632. package/node_modules/moment/src/locale/pt-br.js +0 -58
  633. package/node_modules/moment/src/locale/pt.js +0 -63
  634. package/node_modules/moment/src/locale/ro.js +0 -76
  635. package/node_modules/moment/src/locale/ru.js +0 -213
  636. package/node_modules/moment/src/locale/sd.js +0 -81
  637. package/node_modules/moment/src/locale/se.js +0 -57
  638. package/node_modules/moment/src/locale/si.js +0 -69
  639. package/node_modules/moment/src/locale/sk.js +0 -145
  640. package/node_modules/moment/src/locale/sl.js +0 -171
  641. package/node_modules/moment/src/locale/sq.js +0 -65
  642. package/node_modules/moment/src/locale/sr-cyrl.js +0 -127
  643. package/node_modules/moment/src/locale/sr.js +0 -129
  644. package/node_modules/moment/src/locale/ss.js +0 -84
  645. package/node_modules/moment/src/locale/sv.js +0 -68
  646. package/node_modules/moment/src/locale/sw.js +0 -55
  647. package/node_modules/moment/src/locale/ta.js +0 -131
  648. package/node_modules/moment/src/locale/te.js +0 -88
  649. package/node_modules/moment/src/locale/tet.js +0 -68
  650. package/node_modules/moment/src/locale/tg.js +0 -117
  651. package/node_modules/moment/src/locale/th.js +0 -65
  652. package/node_modules/moment/src/locale/tk.js +0 -91
  653. package/node_modules/moment/src/locale/tl-ph.js +0 -57
  654. package/node_modules/moment/src/locale/tlh.js +0 -124
  655. package/node_modules/moment/src/locale/tr.js +0 -106
  656. package/node_modules/moment/src/locale/tzl.js +0 -89
  657. package/node_modules/moment/src/locale/tzm-latn.js +0 -54
  658. package/node_modules/moment/src/locale/tzm.js +0 -54
  659. package/node_modules/moment/src/locale/ug-cn.js +0 -111
  660. package/node_modules/moment/src/locale/uk.js +0 -167
  661. package/node_modules/moment/src/locale/ur.js +0 -82
  662. package/node_modules/moment/src/locale/uz-latn.js +0 -54
  663. package/node_modules/moment/src/locale/uz.js +0 -51
  664. package/node_modules/moment/src/locale/vi.js +0 -80
  665. package/node_modules/moment/src/locale/x-pseudo.js +0 -73
  666. package/node_modules/moment/src/locale/yo.js +0 -53
  667. package/node_modules/moment/src/locale/zh-cn.js +0 -120
  668. package/node_modules/moment/src/locale/zh-hk.js +0 -101
  669. package/node_modules/moment/src/locale/zh-mo.js +0 -100
  670. package/node_modules/moment/src/locale/zh-tw.js +0 -99
  671. package/node_modules/moment/src/moment.js +0 -93
  672. package/node_modules/moment/ts3.1-typings/moment.d.ts +0 -785
  673. package/node_modules/moment-timezone/.editorconfig +0 -22
  674. package/node_modules/moment-timezone/LICENSE +0 -20
  675. package/node_modules/moment-timezone/README.md +0 -64
  676. package/node_modules/moment-timezone/builds/moment-timezone-with-data-10-year-range.js +0 -1581
  677. package/node_modules/moment-timezone/builds/moment-timezone-with-data-10-year-range.min.js +0 -1
  678. package/node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.js +0 -1581
  679. package/node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.min.js +0 -1
  680. package/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.js +0 -1593
  681. package/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.min.js +0 -1
  682. package/node_modules/moment-timezone/builds/moment-timezone-with-data.js +0 -1581
  683. package/node_modules/moment-timezone/builds/moment-timezone-with-data.min.js +0 -1
  684. package/node_modules/moment-timezone/builds/moment-timezone.min.js +0 -1
  685. package/node_modules/moment-timezone/changelog.md +0 -277
  686. package/node_modules/moment-timezone/composer.json +0 -43
  687. package/node_modules/moment-timezone/data/meta/latest.json +0 -5877
  688. package/node_modules/moment-timezone/data/packed/latest.json +0 -852
  689. package/node_modules/moment-timezone/index.d.ts +0 -78
  690. package/node_modules/moment-timezone/index.js +0 -2
  691. package/node_modules/moment-timezone/moment-timezone-utils.d.ts +0 -70
  692. package/node_modules/moment-timezone/moment-timezone-utils.js +0 -339
  693. package/node_modules/moment-timezone/moment-timezone.js +0 -729
  694. package/node_modules/moment-timezone/package.json +0 -55
  695. package/src/shims/cheerio-query.js +0 -119
@@ -1 +1 @@
1
- {"version":3,"file":"generate-custom-parser.js","sources":["../src/utils/dom/constants.js","../src/utils/dom/strip-junk-tags.js","../src/extractors/generic/content/scoring/constants.js","../src/extractors/generic/content/scoring/score-commas.js","../src/utils/text/extract-from-url.js","../src/utils/text/constants.js","../src/utils/text/has-sentence-end.js","../src/extractors/generic/content/scoring/index.js","../src/utils/dom/make-links-absolute.js","../src/utils/dom/strip-tags.js","../src/utils/dom/node-is-sufficient.js","../src/utils/dom/get-attrs.js","../src/utils/dom/set-attr.js","../src/utils/dom/index.js","../scripts/templates/insert-values.js","../scripts/templates/index.js","../scripts/templates/custom-extractor.js","../scripts/templates/custom-extractor-test.js","../scripts/generate-custom-parser.js"],"sourcesContent":["// Spacer images to be removed\nexport const SPACER_RE = new RegExp('transparent|spacer|blank', 'i');\n\n// The class we will use to mark elements we want to keep\n// but would normally remove\nexport const KEEP_CLASS = 'mercury-parser-keep';\n\nexport const KEEP_SELECTORS = [\n 'iframe[src^=\"https://www.youtube.com\"]',\n 'iframe[src^=\"https://www.youtube-nocookie.com\"]',\n 'iframe[src^=\"http://www.youtube.com\"]',\n 'iframe[src^=\"https://player.vimeo\"]',\n 'iframe[src^=\"http://player.vimeo\"]',\n 'iframe[src^=\"https://www.redditmedia.com\"]',\n];\n\n// A list of tags to strip from the output if we encounter them.\nexport const STRIP_OUTPUT_TAGS = [\n 'title',\n 'script',\n 'noscript',\n 'link',\n 'style',\n 'hr',\n 'embed',\n 'iframe',\n 'object',\n];\n\n// cleanAttributes\nexport const REMOVE_ATTRS = ['style', 'align'];\nexport const REMOVE_ATTR_SELECTORS = REMOVE_ATTRS.map(\n selector => `[${selector}]`\n);\nexport const REMOVE_ATTR_LIST = REMOVE_ATTRS.join(',');\nexport const WHITELIST_ATTRS = [\n 'src',\n 'srcset',\n 'start',\n 'sizes',\n 'type',\n 'href',\n 'class',\n 'id',\n 'alt',\n 'xlink:href',\n 'width',\n 'height',\n];\n\nexport const WHITELIST_ATTRS_RE = new RegExp(\n `^(${WHITELIST_ATTRS.join('|')})$`,\n 'i'\n);\n\n// removeEmpty\nexport const REMOVE_EMPTY_TAGS = ['p'];\nexport const REMOVE_EMPTY_SELECTORS = REMOVE_EMPTY_TAGS.map(\n tag => `${tag}:empty`\n).join(',');\n\n// cleanTags\nexport const CLEAN_CONDITIONALLY_TAGS = [\n 'ul',\n 'ol',\n 'table',\n 'div',\n 'button',\n 'form',\n].join(',');\n\n// cleanHeaders\nconst HEADER_TAGS = ['h2', 'h3', 'h4', 'h5', 'h6'];\nexport const HEADER_TAG_LIST = HEADER_TAGS.join(',');\n\n// // CONTENT FETCHING CONSTANTS ////\n\n// A list of strings that can be considered unlikely candidates when\n// extracting content from a resource. These strings are joined together\n// and then tested for existence using re:test, so may contain simple,\n// non-pipe style regular expression queries if necessary.\nexport const UNLIKELY_CANDIDATES_BLACKLIST = [\n 'ad-break',\n 'adbox',\n 'advert',\n 'addthis',\n 'agegate',\n 'aux',\n 'blogger-labels',\n 'combx',\n 'comment',\n 'conversation',\n 'disqus',\n 'entry-unrelated',\n 'extra',\n 'foot',\n // 'form', // This is too generic, has too many false positives\n 'header',\n 'hidden',\n 'loader',\n 'login', // Note: This can hit 'blogindex'.\n 'menu',\n 'meta',\n 'nav',\n 'outbrain',\n 'pager',\n 'pagination',\n 'predicta', // readwriteweb inline ad box\n 'presence_control_external', // lifehacker.com container full of false positives\n 'popup',\n 'printfriendly',\n 'related',\n 'remove',\n 'remark',\n 'rss',\n 'share',\n 'shoutbox',\n 'sidebar',\n 'sociable',\n 'sponsor',\n 'taboola',\n 'tools',\n];\n\n// A list of strings that can be considered LIKELY candidates when\n// extracting content from a resource. Essentially, the inverse of the\n// blacklist above - if something matches both blacklist and whitelist,\n// it is kept. This is useful, for example, if something has a className\n// of \"rss-content entry-content\". It matched 'rss', so it would normally\n// be removed, however, it's also the entry content, so it should be left\n// alone.\n//\n// These strings are joined together and then tested for existence using\n// re:test, so may contain simple, non-pipe style regular expression queries\n// if necessary.\nexport const UNLIKELY_CANDIDATES_WHITELIST = [\n 'and',\n 'article',\n 'body',\n 'blogindex',\n 'column',\n 'content',\n 'entry-content-asset',\n 'format', // misuse of form\n 'hfeed',\n 'hentry',\n 'hatom',\n 'main',\n 'page',\n 'posts',\n 'shadow',\n];\n\n// A list of tags which, if found inside, should cause a <div /> to NOT\n// be turned into a paragraph tag. Shallow div tags without these elements\n// should be turned into <p /> tags.\nexport const DIV_TO_P_BLOCK_TAGS = [\n 'a',\n 'blockquote',\n 'dl',\n 'div',\n 'img',\n 'p',\n 'pre',\n 'table',\n].join(',');\n\n// A list of tags that should be ignored when trying to find the top candidate\n// for a document.\nexport const NON_TOP_CANDIDATE_TAGS = [\n 'br',\n 'b',\n 'i',\n 'label',\n 'hr',\n 'area',\n 'base',\n 'basefont',\n 'input',\n 'img',\n 'link',\n 'meta',\n];\n\nexport const NON_TOP_CANDIDATE_TAGS_RE = new RegExp(\n `^(${NON_TOP_CANDIDATE_TAGS.join('|')})$`,\n 'i'\n);\n\n// A list of selectors that specify, very clearly, either hNews or other\n// very content-specific style content, like Blogger templates.\n// More examples here: http://microformats.org/wiki/blog-post-formats\nexport const HNEWS_CONTENT_SELECTORS = [\n ['.hentry', '.entry-content'],\n ['entry', '.entry-content'],\n ['.entry', '.entry_content'],\n ['.post', '.postbody'],\n ['.post', '.post_body'],\n ['.post', '.post-body'],\n];\n\nexport const PHOTO_HINTS = ['figure', 'photo', 'image', 'caption'];\nexport const PHOTO_HINTS_RE = new RegExp(PHOTO_HINTS.join('|'), 'i');\n\n// A list of strings that denote a positive scoring for this content as being\n// an article container. Checked against className and id.\n//\n// TODO: Perhaps have these scale based on their odds of being quality?\nexport const POSITIVE_SCORE_HINTS = [\n 'article',\n 'articlecontent',\n 'instapaper_body',\n 'blog',\n 'body',\n 'content',\n 'entry-content-asset',\n 'entry',\n 'hentry',\n 'main',\n 'Normal',\n 'page',\n 'pagination',\n 'permalink',\n 'post',\n 'story',\n 'text',\n '[-_]copy', // usatoday\n '\\\\Bcopy',\n];\n\n// The above list, joined into a matching regular expression\nexport const POSITIVE_SCORE_RE = new RegExp(\n POSITIVE_SCORE_HINTS.join('|'),\n 'i'\n);\n\n// Readability publisher-specific guidelines\nexport const READABILITY_ASSET = new RegExp('entry-content-asset', 'i');\n\n// A list of strings that denote a negative scoring for this content as being\n// an article container. Checked against className and id.\n//\n// TODO: Perhaps have these scale based on their odds of being quality?\nexport const NEGATIVE_SCORE_HINTS = [\n 'adbox',\n 'advert',\n 'author',\n 'bio',\n 'bookmark',\n 'bottom',\n 'byline',\n 'clear',\n 'com-',\n 'combx',\n 'comment',\n 'comment\\\\B',\n 'contact',\n 'copy',\n 'credit',\n 'crumb',\n 'date',\n 'deck',\n 'excerpt',\n 'featured', // tnr.com has a featured_content which throws us off\n 'foot',\n 'footer',\n 'footnote',\n 'graf',\n 'head',\n 'info',\n 'infotext', // newscientist.com copyright\n 'instapaper_ignore',\n 'jump',\n 'linebreak',\n 'link',\n 'masthead',\n 'media',\n 'meta',\n 'modal',\n 'outbrain', // slate.com junk\n 'promo',\n 'pr_', // autoblog - press release\n 'related',\n 'respond',\n 'roundcontent', // lifehacker restricted content warning\n 'scroll',\n 'secondary',\n 'share',\n 'shopping',\n 'shoutbox',\n 'side',\n 'sidebar',\n 'sponsor',\n 'stamp',\n 'sub',\n 'summary',\n 'tags',\n 'tools',\n 'widget',\n];\n// The above list, joined into a matching regular expression\nexport const NEGATIVE_SCORE_RE = new RegExp(\n NEGATIVE_SCORE_HINTS.join('|'),\n 'i'\n);\n\n// XPath to try to determine if a page is wordpress. Not always successful.\nexport const IS_WP_SELECTOR = 'meta[name=generator][value^=WordPress]';\n\n// Match a digit. Pretty clear.\nexport const DIGIT_RE = new RegExp('[0-9]');\n\n// A list of words that, if found in link text or URLs, likely mean that\n// this link is not a next page link.\nexport const EXTRANEOUS_LINK_HINTS = [\n 'print',\n 'archive',\n 'comment',\n 'discuss',\n 'e-mail',\n 'email',\n 'share',\n 'reply',\n 'all',\n 'login',\n 'sign',\n 'single',\n 'adx',\n 'entry-unrelated',\n];\nexport const EXTRANEOUS_LINK_HINTS_RE = new RegExp(\n EXTRANEOUS_LINK_HINTS.join('|'),\n 'i'\n);\n\n// Match any phrase that looks like it could be page, or paging, or pagination\nexport const PAGE_RE = new RegExp('pag(e|ing|inat)', 'i');\n\n// Match any link text/classname/id that looks like it could mean the next\n// page. Things like: next, continue, >, >>, » but not >|, »| as those can\n// mean last page.\n// export const NEXT_LINK_TEXT_RE = new RegExp('(next|weiter|continue|>([^\\|]|$)|»([^\\|]|$))', 'i');\nexport const NEXT_LINK_TEXT_RE = /(next|weiter|continue|>([^|]|$)|»([^|]|$))/i;\n\n// Match any link text/classname/id that looks like it is an end link: things\n// like \"first\", \"last\", \"end\", etc.\nexport const CAP_LINK_TEXT_RE = new RegExp('(first|last|end)', 'i');\n\n// Match any link text/classname/id that looks like it means the previous\n// page.\nexport const PREV_LINK_TEXT_RE = new RegExp('(prev|earl|old|new|<|«)', 'i');\n\n// Match 2 or more consecutive <br> tags\nexport const BR_TAGS_RE = new RegExp('(<br[^>]*>[ \\n\\r\\t]*){2,}', 'i');\n\n// Match 1 BR tag.\nexport const BR_TAG_RE = new RegExp('<br[^>]*>', 'i');\n\n// A list of all of the block level tags known in HTML5 and below. Taken from\n// http://bit.ly/qneNIT\nexport const BLOCK_LEVEL_TAGS = [\n 'article',\n 'aside',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'col',\n 'colgroup',\n 'dd',\n 'div',\n 'dl',\n 'dt',\n 'embed',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'header',\n 'hgroup',\n 'hr',\n 'li',\n 'map',\n 'object',\n 'ol',\n 'output',\n 'p',\n 'pre',\n 'progress',\n 'section',\n 'table',\n 'tbody',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'tr',\n 'ul',\n 'video',\n];\nexport const BLOCK_LEVEL_TAGS_RE = new RegExp(\n `^(${BLOCK_LEVEL_TAGS.join('|')})$`,\n 'i'\n);\n\n// The removal is implemented as a blacklist and whitelist, this test finds\n// blacklisted elements that aren't whitelisted. We do this all in one\n// expression-both because it's only one pass, and because this skips the\n// serialization for whitelisted nodes.\nconst candidatesBlacklist = UNLIKELY_CANDIDATES_BLACKLIST.join('|');\nexport const CANDIDATES_BLACKLIST = new RegExp(candidatesBlacklist, 'i');\n\nconst candidatesWhitelist = UNLIKELY_CANDIDATES_WHITELIST.join('|');\nexport const CANDIDATES_WHITELIST = new RegExp(candidatesWhitelist, 'i');\n\nexport const UNLIKELY_RE = new RegExp(\n `!(${candidatesWhitelist})|(${candidatesBlacklist})`,\n 'i'\n);\n\nexport const PARAGRAPH_SCORE_TAGS = new RegExp('^(p|li|span|pre)$', 'i');\nexport const CHILD_CONTENT_TAGS = new RegExp('^(td|blockquote|ol|ul|dl)$', 'i');\nexport const BAD_TAGS = new RegExp('^(address|form)$', 'i');\n\nexport const HTML_OR_BODY_RE = new RegExp('^(html|body)$', 'i');\n","import { STRIP_OUTPUT_TAGS, KEEP_CLASS } from './constants';\n\nexport default function stripJunkTags(article, $, tags = []) {\n if (tags.length === 0) {\n tags = STRIP_OUTPUT_TAGS;\n }\n\n // Remove matching elements, but ignore\n // any element with a class of mercury-parser-keep\n $(tags.join(','), article)\n .not(`.${KEEP_CLASS}`)\n .remove();\n\n return $;\n}\n","// // CONTENT FETCHING CONSTANTS ////\n\n// A list of strings that can be considered unlikely candidates when\n// extracting content from a resource. These strings are joined together\n// and then tested for existence using re:test, so may contain simple,\n// non-pipe style regular expression queries if necessary.\nexport const UNLIKELY_CANDIDATES_BLACKLIST = [\n 'ad-break',\n 'adbox',\n 'advert',\n 'addthis',\n 'agegate',\n 'aux',\n 'blogger-labels',\n 'combx',\n 'comment',\n 'conversation',\n 'disqus',\n 'entry-unrelated',\n 'extra',\n 'foot',\n 'form',\n 'header',\n 'hidden',\n 'loader',\n 'login', // Note: This can hit 'blogindex'.\n 'menu',\n 'meta',\n 'nav',\n 'pager',\n 'pagination',\n 'predicta', // readwriteweb inline ad box\n 'presence_control_external', // lifehacker.com container full of false positives\n 'popup',\n 'printfriendly',\n 'related',\n 'remove',\n 'remark',\n 'rss',\n 'share',\n 'shoutbox',\n 'sidebar',\n 'sociable',\n 'sponsor',\n 'tools',\n];\n\n// A list of strings that can be considered LIKELY candidates when\n// extracting content from a resource. Essentially, the inverse of the\n// blacklist above - if something matches both blacklist and whitelist,\n// it is kept. This is useful, for example, if something has a className\n// of \"rss-content entry-content\". It matched 'rss', so it would normally\n// be removed, however, it's also the entry content, so it should be left\n// alone.\n//\n// These strings are joined together and then tested for existence using\n// re:test, so may contain simple, non-pipe style regular expression queries\n// if necessary.\nexport const UNLIKELY_CANDIDATES_WHITELIST = [\n 'and',\n 'article',\n 'body',\n 'blogindex',\n 'column',\n 'content',\n 'entry-content-asset',\n 'format', // misuse of form\n 'hfeed',\n 'hentry',\n 'hatom',\n 'main',\n 'page',\n 'posts',\n 'shadow',\n];\n\n// A list of tags which, if found inside, should cause a <div /> to NOT\n// be turned into a paragraph tag. Shallow div tags without these elements\n// should be turned into <p /> tags.\nexport const DIV_TO_P_BLOCK_TAGS = [\n 'a',\n 'blockquote',\n 'dl',\n 'div',\n 'img',\n 'p',\n 'pre',\n 'table',\n].join(',');\n\n// A list of tags that should be ignored when trying to find the top candidate\n// for a document.\nexport const NON_TOP_CANDIDATE_TAGS = [\n 'br',\n 'b',\n 'i',\n 'label',\n 'hr',\n 'area',\n 'base',\n 'basefont',\n 'input',\n 'img',\n 'link',\n 'meta',\n];\n\nexport const NON_TOP_CANDIDATE_TAGS_RE = new RegExp(\n `^(${NON_TOP_CANDIDATE_TAGS.join('|')})$`,\n 'i'\n);\n\n// A list of selectors that specify, very clearly, either hNews or other\n// very content-specific style content, like Blogger templates.\n// More examples here: http://microformats.org/wiki/blog-post-formats\nexport const HNEWS_CONTENT_SELECTORS = [\n ['.hentry', '.entry-content'],\n ['entry', '.entry-content'],\n ['.entry', '.entry_content'],\n ['.post', '.postbody'],\n ['.post', '.post_body'],\n ['.post', '.post-body'],\n];\n\nexport const PHOTO_HINTS = ['figure', 'photo', 'image', 'caption'];\nexport const PHOTO_HINTS_RE = new RegExp(PHOTO_HINTS.join('|'), 'i');\n\n// A list of strings that denote a positive scoring for this content as being\n// an article container. Checked against className and id.\n//\n// TODO: Perhaps have these scale based on their odds of being quality?\nexport const POSITIVE_SCORE_HINTS = [\n 'article',\n 'articlecontent',\n 'instapaper_body',\n 'blog',\n 'body',\n 'content',\n 'entry-content-asset',\n 'entry',\n 'hentry',\n 'main',\n 'Normal',\n 'page',\n 'pagination',\n 'permalink',\n 'post',\n 'story',\n 'text',\n '[-_]copy', // usatoday\n '\\\\Bcopy',\n];\n\n// The above list, joined into a matching regular expression\nexport const POSITIVE_SCORE_RE = new RegExp(\n POSITIVE_SCORE_HINTS.join('|'),\n 'i'\n);\n\n// Readability publisher-specific guidelines\nexport const READABILITY_ASSET = new RegExp('entry-content-asset', 'i');\n\n// A list of strings that denote a negative scoring for this content as being\n// an article container. Checked against className and id.\n//\n// TODO: Perhaps have these scale based on their odds of being quality?\nexport const NEGATIVE_SCORE_HINTS = [\n 'adbox',\n 'advert',\n 'author',\n 'bio',\n 'bookmark',\n 'bottom',\n 'byline',\n 'clear',\n 'com-',\n 'combx',\n 'comment',\n 'comment\\\\B',\n 'contact',\n 'copy',\n 'credit',\n 'crumb',\n 'date',\n 'deck',\n 'excerpt',\n 'featured', // tnr.com has a featured_content which throws us off\n 'foot',\n 'footer',\n 'footnote',\n 'graf',\n 'head',\n 'info',\n 'infotext', // newscientist.com copyright\n 'instapaper_ignore',\n 'jump',\n 'linebreak',\n 'link',\n 'masthead',\n 'media',\n 'meta',\n 'modal',\n 'outbrain', // slate.com junk\n 'promo',\n 'pr_', // autoblog - press release\n 'related',\n 'respond',\n 'roundcontent', // lifehacker restricted content warning\n 'scroll',\n 'secondary',\n 'share',\n 'shopping',\n 'shoutbox',\n 'side',\n 'sidebar',\n 'sponsor',\n 'stamp',\n 'sub',\n 'summary',\n 'tags',\n 'tools',\n 'widget',\n];\n// The above list, joined into a matching regular expression\nexport const NEGATIVE_SCORE_RE = new RegExp(\n NEGATIVE_SCORE_HINTS.join('|'),\n 'i'\n);\n\n// Match a digit. Pretty clear.\nexport const DIGIT_RE = new RegExp('[0-9]');\n\n// Match 2 or more consecutive <br> tags\nexport const BR_TAGS_RE = new RegExp('(<br[^>]*>[ \\n\\r\\t]*){2,}', 'i');\n\n// Match 1 BR tag.\nexport const BR_TAG_RE = new RegExp('<br[^>]*>', 'i');\n\n// A list of all of the block level tags known in HTML5 and below. Taken from\n// http://bit.ly/qneNIT\nexport const BLOCK_LEVEL_TAGS = [\n 'article',\n 'aside',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'col',\n 'colgroup',\n 'dd',\n 'div',\n 'dl',\n 'dt',\n 'embed',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'header',\n 'hgroup',\n 'hr',\n 'li',\n 'map',\n 'object',\n 'ol',\n 'output',\n 'p',\n 'pre',\n 'progress',\n 'section',\n 'table',\n 'tbody',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'tr',\n 'ul',\n 'video',\n];\nexport const BLOCK_LEVEL_TAGS_RE = new RegExp(\n `^(${BLOCK_LEVEL_TAGS.join('|')})$`,\n 'i'\n);\n\n// The removal is implemented as a blacklist and whitelist, this test finds\n// blacklisted elements that aren't whitelisted. We do this all in one\n// expression-both because it's only one pass, and because this skips the\n// serialization for whitelisted nodes.\nconst candidatesBlacklist = UNLIKELY_CANDIDATES_BLACKLIST.join('|');\nexport const CANDIDATES_BLACKLIST = new RegExp(candidatesBlacklist, 'i');\n\nconst candidatesWhitelist = UNLIKELY_CANDIDATES_WHITELIST.join('|');\nexport const CANDIDATES_WHITELIST = new RegExp(candidatesWhitelist, 'i');\n\nexport const UNLIKELY_RE = new RegExp(\n `!(${candidatesWhitelist})|(${candidatesBlacklist})`,\n 'i'\n);\n\nexport const PARAGRAPH_SCORE_TAGS = new RegExp('^(p|li|span|pre)$', 'i');\nexport const CHILD_CONTENT_TAGS = new RegExp('^(td|blockquote|ol|ul|dl)$', 'i');\nexport const BAD_TAGS = new RegExp('^(address|form)$', 'i');\n\nexport const HTML_OR_BODY_RE = new RegExp('^(html|body)$', 'i');\n","// return 1 for every comma in text\nexport default function scoreCommas(text) {\n return (text.match(/,/g) || []).length;\n}\n","// Given a node type to search for, and a list of regular expressions,\n// look to see if this extraction can be found in the URL. Expects\n// that each expression in r_list will return group(1) as the proper\n// string to be cleaned.\n// Only used for date_published currently.\nexport default function extractFromUrl(url, regexList) {\n const matchRe = regexList.find(re => re.test(url));\n if (matchRe) {\n return matchRe.exec(url)[1];\n }\n\n return null;\n}\n","// An expression that looks to try to find the page digit within a URL, if\n// it exists.\n// Matches:\n// page=1\n// pg=1\n// p=1\n// paging=12\n// pag=7\n// pagination/1\n// paging/88\n// pa/83\n// p/11\n//\n// Does not match:\n// pg=102\n// page:2\nexport const PAGE_IN_HREF_RE = new RegExp(\n '(page|paging|(p(a|g|ag)?(e|enum|ewanted|ing|ination)))?(=|/)([0-9]{1,3})',\n 'i'\n);\n\nexport const HAS_ALPHA_RE = /[a-z]/i;\n\nexport const IS_ALPHA_RE = /^[a-z]+$/i;\nexport const IS_DIGIT_RE = /^[0-9]+$/i;\n\nexport const ENCODING_RE = /charset=([\\w-]+)\\b/;\nexport const DEFAULT_ENCODING = 'utf-8';\n","// Given a string, return True if it appears to have an ending sentence\n// within it, false otherwise.\nconst SENTENCE_END_RE = new RegExp('.( |$)');\nexport default function hasSentenceEnd(text) {\n return SENTENCE_END_RE.test(text);\n}\n","// Scoring\nexport { default as getWeight } from './get-weight';\nexport { default as getScore } from './get-score';\nexport { default as scoreCommas } from './score-commas';\nexport { default as scoreLength } from './score-length';\nexport { default as scoreParagraph } from './score-paragraph';\nexport { default as setScore } from './set-score';\nexport { default as addScore } from './add-score';\nexport { default as addToParent } from './add-to-parent';\nexport { default as getOrInitScore } from './get-or-init-score';\nexport { default as scoreNode } from './score-node';\nexport { default as scoreContent } from './score-content';\nexport { default as findTopCandidate } from './find-top-candidate';\n","import URL from 'url';\n\nimport { getAttrs, setAttr } from 'utils/dom';\n\nfunction absolutize($, rootUrl, attr) {\n const baseUrl = $('base').attr('href');\n\n $(`[${attr}]`).each((_, node) => {\n const attrs = getAttrs(node);\n const url = attrs[attr];\n if (!url) return;\n const absoluteUrl = URL.resolve(baseUrl || rootUrl, url);\n\n setAttr(node, attr, absoluteUrl);\n });\n}\n\nfunction absolutizeSet($, rootUrl, $content) {\n $('[srcset]', $content).each((_, node) => {\n const attrs = getAttrs(node);\n const urlSet = attrs.srcset;\n\n if (urlSet) {\n // a comma should be considered part of the candidate URL unless preceded by a descriptor\n // descriptors can only contain positive numbers followed immediately by either 'w' or 'x'\n // space characters inside the URL should be encoded (%20 or +)\n const candidates = urlSet.match(\n /(?:\\s*)(\\S+(?:\\s*[\\d.]+[wx])?)(?:\\s*,\\s*)?/g\n );\n if (!candidates) return;\n const absoluteCandidates = candidates.map(candidate => {\n // a candidate URL cannot start or end with a comma\n // descriptors are separated from the URLs by unescaped whitespace\n const parts = candidate\n .trim()\n .replace(/,$/, '')\n .split(/\\s+/);\n parts[0] = URL.resolve(rootUrl, parts[0]);\n return parts.join(' ');\n });\n const absoluteUrlSet = [...new Set(absoluteCandidates)].join(', ');\n setAttr(node, 'srcset', absoluteUrlSet);\n }\n });\n}\n\nexport default function makeLinksAbsolute($content, $, url) {\n ['href', 'src'].forEach(attr => absolutize($, url, attr));\n absolutizeSet($, url, $content);\n\n return $content;\n}\n","// strips all tags from a string of text\nexport default function stripTags(text, $) {\n // Wrapping text in html element prevents errors when text\n // has no html\n const cleanText = $(`<span>${text}</span>`).text();\n return cleanText === '' ? text : cleanText;\n}\n","// Given a node, determine if it's article-like enough to return\n// param: node (a cheerio node)\n// return: boolean\n\nexport default function nodeIsSufficient($node) {\n return $node.text().trim().length >= 100;\n}\n","export default function getAttrs(node) {\n const { attribs, attributes } = node;\n\n if (!attribs && attributes) {\n const attrs = Reflect.ownKeys(attributes).reduce((acc, index) => {\n const attr = attributes[index];\n\n if (!attr.name || !attr.value) return acc;\n\n acc[attr.name] = attr.value;\n return acc;\n }, {});\n return attrs;\n }\n\n return attribs;\n}\n","export default function setAttr(node, attr, val) {\n if (node.attribs) {\n node.attribs[attr] = val;\n } else if (node.attributes) {\n node.setAttribute(attr, val);\n }\n\n return node;\n}\n","// DOM manipulation\nexport {\n default as stripUnlikelyCandidates,\n} from './strip-unlikely-candidates';\nexport { default as brsToPs } from './brs-to-ps';\nexport { default as paragraphize } from './paragraphize';\nexport { default as convertToParagraphs } from './convert-to-paragraphs';\nexport { default as convertNodeTo } from './convert-node-to';\nexport { default as cleanImages } from './clean-images';\nexport { default as markToKeep } from './mark-to-keep';\nexport { default as stripJunkTags } from './strip-junk-tags';\nexport { default as cleanHOnes } from './clean-h-ones';\nexport { default as cleanAttributes } from './clean-attributes';\nexport { default as removeEmpty } from './remove-empty';\nexport { default as cleanTags } from './clean-tags';\nexport { default as cleanHeaders } from './clean-headers';\nexport { default as rewriteTopLevel } from './rewrite-top-level';\nexport { default as makeLinksAbsolute } from './make-links-absolute';\nexport { textLength, linkDensity } from './link-density';\nexport { default as extractFromMeta } from './extract-from-meta';\nexport { default as extractFromSelectors } from './extract-from-selectors';\nexport { default as stripTags } from './strip-tags';\nexport { default as withinComment } from './within-comment';\nexport { default as nodeIsSufficient } from './node-is-sufficient';\nexport { default as isWordpress } from './is-wordpress';\nexport { default as getAttrs } from './get-attrs';\nexport { default as setAttr } from './set-attr';\nexport { default as setAttrs } from './set-attrs';\n","export default function insertValues(strings, ...values) {\n if (values.length) {\n return strings.reduce((result, part, idx) => {\n let value = values[idx];\n\n if (value && typeof value.toString === 'function') {\n value = value.toString();\n } else {\n value = '';\n }\n\n return result + part + value;\n }, '');\n }\n\n return strings.join('');\n}\n","import insertValues from './insert-values';\n\nconst bodyPattern = /^\\n([\\s\\S]+)\\s{2}$/gm;\nconst trailingWhitespace = /\\s+$/;\n\nexport default function template(strings, ...values) {\n const compiled = insertValues(strings, ...values);\n let [body] = compiled.match(bodyPattern) || [];\n let indentLevel = /^\\s{0,4}(.+)$/g;\n\n if (!body) {\n body = compiled;\n indentLevel = /^\\s{0,2}(.+)$/g;\n }\n\n return body\n .split('\\n')\n .slice(1)\n .map(line => {\n line = line.replace(indentLevel, '$1');\n\n if (trailingWhitespace.test(line)) {\n line = line.replace(trailingWhitespace, '');\n }\n\n return line;\n })\n .join('\\n');\n}\n","import template from './index';\n\nexport default function(hostname, name) {\n return template`\n export const ${name} = {\n domain: '${hostname}',\n\n title: {\n selectors: [\n // enter title selectors\n ],\n },\n\n author: {\n selectors: [\n // enter author selectors\n ],\n },\n\n date_published: {\n selectors: [\n // enter selectors\n ],\n },\n\n lead_image_url: {\n selectors: [\n // enter selectors\n ],\n },\n\n content: {\n selectors: [\n // enter content selectors\n ],\n\n // Is there anything in the content you selected that needs transformed\n // before it's consumable content? E.g., unusual lazy loaded images\n transforms: {\n },\n\n // Is there anything that is in the result that shouldn't be?\n // The clean selectors will remove anything that matches from\n // the result\n clean: [\n\n ]\n },\n }\n `;\n}\n","import template from './index';\n\nconst IGNORE = [\n 'url',\n 'domain',\n 'content',\n 'word_count',\n 'next_page_url',\n 'excerpt',\n 'direction',\n 'total_pages',\n 'rendered_pages',\n];\n\nfunction testFor(key, value, dir) {\n if (IGNORE.find(k => k === key)) return '';\n\n return template`\n it('returns the ${key}', async () => {\n // To pass this test, fill out the ${key} selector\n // in ${dir}/index.js.\n const { ${key} } = await result\n\n // Update these values with the expected values from\n // the article.\n assert.strictEqual(${key}, ${value ? `\\`${value}\\`` : \"''\"})\n });\n `;\n}\n\nexport default function(file, url, dir, result, name) {\n return template`\n import assert from 'assert';\n import cheerio from 'cheerio';\n\n import Parser from 'mercury';\n import getExtractor from 'extractors/get-extractor';\n import { excerptContent } from 'utils/text';\n\n const fs = require('fs');\n\n describe('${name}', () => {\n describe('initial test case', () => {\n let result;\n let url;\n beforeAll(() => {\n url =\n '${url}';\n const html =\n fs.readFileSync('${file}');\n result =\n Parser.parse(url, { html, fallback: false });\n });\n\n it('is selected properly', () => {\n // This test should be passing by default.\n // It sanity checks that the correct parser\n // is being selected for URLs from this domain\n const extractor = getExtractor(url);\n assert.strictEqual(extractor.domain, new URL(url).hostname)\n })\n\n ${Reflect.ownKeys(result)\n .map(k => testFor(k, result[k], dir))\n .join('\\n\\n')}\n\n it('returns the content', async () => {\n // To pass this test, fill out the content selector\n // in ${dir}/index.js.\n // You may also want to make use of the clean and transform\n // options.\n const { content } = await result;\n\n const $ = cheerio.load(content || '');\n\n const first13 = excerptContent($('*').first().text(), 13)\n\n // Update these values with the expected values from the article.\n // Add the first 13 words of the article here\n assert.strictEqual(first13, null);\n });\n });\n });\n `;\n}\n","/* eslint-disable import/no-extraneous-dependencies */\n/* eslint-disable no-use-before-define */\n/* eslint-disable no-console */\nimport fs from 'fs';\nimport inquirer from 'inquirer';\nimport ora from 'ora';\nimport { exec } from 'child_process';\n\nimport { stripJunkTags, makeLinksAbsolute } from 'utils/dom';\nimport Parser from '../dist/mercury';\nimport extractorTemplate from './templates/custom-extractor';\nimport extractorTestTemplate from './templates/custom-extractor-test';\n\nconst questions = [\n {\n type: 'input',\n name: 'website',\n message:\n \"Paste a url to an article you'd like to create or extend a parser for:\",\n validate(value) {\n const { hostname } = new URL(value);\n if (hostname) return true;\n\n return false;\n },\n },\n];\nlet spinner;\n\nfunction confirm(fn, args, msg, newParser) {\n spinner = ora({ text: msg });\n spinner.start();\n const result = fn(...args);\n\n if (result && result.then) {\n result.then(r => savePage(r, args, newParser));\n } else {\n spinner.succeed();\n }\n\n return result;\n}\n\nfunction confirmCreateDir(dir, msg) {\n if (!fs.existsSync(dir)) {\n confirm(fs.mkdirSync, [dir], msg);\n }\n}\n\nfunction getDir(url) {\n const { hostname } = new URL(url);\n return `./src/extractors/custom/${hostname}`;\n}\n\nfunction scaffoldCustomParser(url) {\n const dir = getDir(url);\n const { hostname } = new URL(url);\n let newParser = false;\n\n if (!fs.existsSync(dir)) {\n newParser = true;\n confirmCreateDir(dir, `Creating ${hostname} directory`);\n confirmCreateDir(`./fixtures/${hostname}`, 'Creating fixtures directory');\n }\n\n confirm(Parser.fetchResource, [url], 'Fetching fixture', newParser);\n}\n\n// if has arg, just assume that arg is a url and skip prmopt\nconst urlArg = process.argv[2];\nif (urlArg) {\n scaffoldCustomParser(urlArg);\n} else {\n inquirer.prompt(questions).then(answers => {\n scaffoldCustomParser(answers.website);\n });\n}\n\nfunction generateScaffold(url, file, result) {\n const { hostname } = new URL(url);\n const extractor = extractorTemplate(hostname, extractorName(hostname));\n const extractorTest = extractorTestTemplate(\n file,\n url,\n getDir(url),\n result,\n extractorName(hostname)\n );\n\n fs.writeFileSync(`${getDir(url)}/index.js`, extractor);\n fs.writeFileSync(`${getDir(url)}/index.test.js`, extractorTest);\n fs.appendFileSync('./src/extractors/custom/index.js', exportString(url));\n exec(`npm run lint-fix-quiet -- ${getDir(url)}/*.js`);\n}\n\nfunction savePage($, [url], newParser) {\n const { hostname } = new URL(url);\n\n spinner.succeed();\n\n const filename = new Date().getTime();\n const file = `./fixtures/${hostname}/${filename}.html`;\n // fix http(s) relative links:\n makeLinksAbsolute($('*').first(), $, url);\n $('[src], [href]').each((index, node) => {\n const $node = $(node);\n const link = $node.attr('src');\n if (link && link.slice(0, 2) === '//') {\n $node.attr('src', `http:${link}`);\n }\n });\n const html = stripJunkTags($('*').first(), $, ['script']).html();\n\n fs.writeFileSync(file, html);\n\n Parser.parse(url, { html }).then(result => {\n if (newParser) {\n confirm(\n generateScaffold,\n [url, file, result],\n 'Generating parser and tests'\n );\n console.log(`Your custom site extractor has been set up. To get started building it, run\n yarn watch:test -- ${hostname}\n -- OR --\n npm run watch:test -- ${hostname}`);\n } else {\n console.log(`\n It looks like you already have a custom parser for this url.\n The page you linked to has been added to ${file}. Copy and paste\n the following code to use that page in your tests:\n const html = fs.readFileSync('${file}');`);\n }\n });\n}\n\nfunction exportString(url) {\n const { hostname } = new URL(url);\n return `export * from './${hostname}';`;\n}\n\nfunction extractorName(hostname) {\n const name = hostname\n .split('.')\n .map(w => `${w.charAt(0).toUpperCase()}${w.slice(1)}`)\n .join('');\n return `${name}Extractor`;\n}\n"],"names":["KEEP_CLASS","STRIP_OUTPUT_TAGS","stripJunkTags","article","$","tags","length","join","not","remove","absolutize","rootUrl","attr","baseUrl","each","_","node","attrs","getAttrs","url","absoluteUrl","URL","resolve","setAttr","absolutizeSet","$content","urlSet","srcset","candidates","match","absoluteCandidates","map","candidate","parts","trim","replace","split","absoluteUrlSet","makeLinksAbsolute","forEach","attribs","attributes","reduce","acc","index","name","value","val","setAttribute","insertValues","strings","values","result","part","idx","toString","bodyPattern","trailingWhitespace","template","compiled","body","indentLevel","slice","line","test","hostname","IGNORE","testFor","key","dir","find","k","file","questions","type","message","validate","spinner","confirm","fn","args","msg","newParser","ora","text","start","then","r","savePage","succeed","confirmCreateDir","fs","existsSync","mkdirSync","getDir","scaffoldCustomParser","Parser","fetchResource","urlArg","process","argv","inquirer","prompt","answers","website","generateScaffold","extractor","extractorTemplate","extractorName","extractorTest","extractorTestTemplate","writeFileSync","appendFileSync","exportString","exec","filename","Date","getTime","first","$node","link","html","parse","console","log","w","charAt","toUpperCase"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,AAGA;;AACA,AAAO,IAAMA,UAAU,GAAG,qBAAnB;AAEP;AAUA,AAAO,IAAMC,iBAAiB,GAAG,CAC/B,OAD+B,EAE/B,QAF+B,EAG/B,UAH+B,EAI/B,MAJ+B,EAK/B,OAL+B,EAM/B,IAN+B,EAO/B,OAP+B,EAQ/B,QAR+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L0D,OAAO,CAACC,GAAR,wHAEuCpD,IAFvC,qHAI4BA,IAJ5B;;GAZJ;;;AAqBF,SAASyC,YAAT,CAAsB9F,GAAtB,EAA2B;cACJ,IAAIE,GAAJ,CAAQF,GAAR,CADI;MACjB8C,QADiB,SACjBA,QADiB;;oCAEEA,QAA3B;;;AAGF,SAAS2C,aAAT,CAAuB3C,QAAvB,EAAiC;MACzBpB,IAAI,GAAGoB,QAAQ,CAClB7B,KADU,CACJ,GADI,EAEVL,GAFU,CAEN,UAAA8F,CAAC;qBAAOA,CAAC,CAACC,MAAF,CAAS,CAAT,EAAYC,WAAZ,EAAP,SAAmCF,CAAC,CAAC/D,KAAF,CAAQ,CAAR,CAAnC;GAFK,EAGVvD,IAHU,CAGL,EAHK,CAAb;mBAIUsC,IAAV;"}
1
+ {"version":3,"file":"generate-custom-parser.js","sources":["../src/utils/dom/constants.js","../src/utils/dom/get-attrs.js","../src/utils/dom/strip-junk-tags.js","../src/utils/dom/set-attr.js","../src/utils/dom/make-links-absolute.js","../scripts/templates/insert-values.js","../scripts/templates/index.js","../scripts/templates/custom-extractor.js","../scripts/templates/custom-extractor-test.js","../scripts/generate-custom-parser.js"],"sourcesContent":["// Spacer images to be removed\nexport const SPACER_RE = new RegExp('transparent|spacer|blank', 'i');\n\n// The class we will use to mark elements we want to keep\n// but would normally remove\nexport const KEEP_CLASS = 'mercury-parser-keep';\n\nexport const KEEP_SELECTORS = [\n 'iframe[src^=\"https://www.youtube.com\"]',\n 'iframe[src^=\"https://www.youtube-nocookie.com\"]',\n 'iframe[src^=\"http://www.youtube.com\"]',\n 'iframe[src^=\"https://player.vimeo\"]',\n 'iframe[src^=\"http://player.vimeo\"]',\n 'iframe[src^=\"https://www.redditmedia.com\"]',\n];\n\n// A list of tags to strip from the output if we encounter them.\nexport const STRIP_OUTPUT_TAGS = [\n 'title',\n 'script',\n 'noscript',\n 'link',\n 'style',\n 'hr',\n 'embed',\n 'iframe',\n 'object',\n];\n\n// cleanAttributes\nexport const REMOVE_ATTRS = ['style', 'align'];\nexport const REMOVE_ATTR_SELECTORS = REMOVE_ATTRS.map(\n selector => `[${selector}]`\n);\nexport const REMOVE_ATTR_LIST = REMOVE_ATTRS.join(',');\nexport const WHITELIST_ATTRS = [\n 'src',\n 'srcset',\n 'start',\n 'sizes',\n 'type',\n 'href',\n 'class',\n 'id',\n 'alt',\n 'xlink:href',\n 'width',\n 'height',\n];\n\nexport const WHITELIST_ATTRS_RE = new RegExp(\n `^(${WHITELIST_ATTRS.join('|')})$`,\n 'i'\n);\n\n// removeEmpty\nexport const REMOVE_EMPTY_TAGS = ['p'];\nexport const REMOVE_EMPTY_SELECTORS = REMOVE_EMPTY_TAGS.map(\n tag => `${tag}:empty`\n).join(',');\n\n// cleanTags\nexport const CLEAN_CONDITIONALLY_TAGS = [\n 'ul',\n 'ol',\n 'table',\n 'div',\n 'button',\n 'form',\n].join(',');\n\n// cleanHeaders\nconst HEADER_TAGS = ['h2', 'h3', 'h4', 'h5', 'h6'];\nexport const HEADER_TAG_LIST = HEADER_TAGS.join(',');\n\n// // CONTENT FETCHING CONSTANTS ////\n\n// A list of strings that can be considered unlikely candidates when\n// extracting content from a resource. These strings are joined together\n// and then tested for existence using re:test, so may contain simple,\n// non-pipe style regular expression queries if necessary.\nexport const UNLIKELY_CANDIDATES_BLACKLIST = [\n 'ad-break',\n 'adbox',\n 'advert',\n 'addthis',\n 'agegate',\n 'aux',\n 'blogger-labels',\n 'combx',\n 'comment',\n 'conversation',\n 'disqus',\n 'entry-unrelated',\n 'extra',\n 'foot',\n // 'form', // This is too generic, has too many false positives\n 'header',\n 'hidden',\n 'loader',\n 'login', // Note: This can hit 'blogindex'.\n 'menu',\n 'meta',\n 'nav',\n 'outbrain',\n 'pager',\n 'pagination',\n 'predicta', // readwriteweb inline ad box\n 'presence_control_external', // lifehacker.com container full of false positives\n 'popup',\n 'printfriendly',\n 'related',\n 'remove',\n 'remark',\n 'rss',\n 'share',\n 'shoutbox',\n 'sidebar',\n 'sociable',\n 'sponsor',\n 'taboola',\n 'tools',\n];\n\n// A list of strings that can be considered LIKELY candidates when\n// extracting content from a resource. Essentially, the inverse of the\n// blacklist above - if something matches both blacklist and whitelist,\n// it is kept. This is useful, for example, if something has a className\n// of \"rss-content entry-content\". It matched 'rss', so it would normally\n// be removed, however, it's also the entry content, so it should be left\n// alone.\n//\n// These strings are joined together and then tested for existence using\n// re:test, so may contain simple, non-pipe style regular expression queries\n// if necessary.\nexport const UNLIKELY_CANDIDATES_WHITELIST = [\n 'and',\n 'article',\n 'body',\n 'blogindex',\n 'column',\n 'content',\n 'entry-content-asset',\n 'format', // misuse of form\n 'hfeed',\n 'hentry',\n 'hatom',\n 'main',\n 'page',\n 'posts',\n 'shadow',\n];\n\n// A list of tags which, if found inside, should cause a <div /> to NOT\n// be turned into a paragraph tag. Shallow div tags without these elements\n// should be turned into <p /> tags.\nexport const DIV_TO_P_BLOCK_TAGS = [\n 'a',\n 'blockquote',\n 'dl',\n 'div',\n 'img',\n 'p',\n 'pre',\n 'table',\n].join(',');\n\n// A list of tags that should be ignored when trying to find the top candidate\n// for a document.\nexport const NON_TOP_CANDIDATE_TAGS = [\n 'br',\n 'b',\n 'i',\n 'label',\n 'hr',\n 'area',\n 'base',\n 'basefont',\n 'input',\n 'img',\n 'link',\n 'meta',\n];\n\nexport const NON_TOP_CANDIDATE_TAGS_RE = new RegExp(\n `^(${NON_TOP_CANDIDATE_TAGS.join('|')})$`,\n 'i'\n);\n\n// A list of selectors that specify, very clearly, either hNews or other\n// very content-specific style content, like Blogger templates.\n// More examples here: http://microformats.org/wiki/blog-post-formats\nexport const HNEWS_CONTENT_SELECTORS = [\n ['.hentry', '.entry-content'],\n ['entry', '.entry-content'],\n ['.entry', '.entry_content'],\n ['.post', '.postbody'],\n ['.post', '.post_body'],\n ['.post', '.post-body'],\n];\n\nexport const PHOTO_HINTS = ['figure', 'photo', 'image', 'caption'];\nexport const PHOTO_HINTS_RE = new RegExp(PHOTO_HINTS.join('|'), 'i');\n\n// A list of strings that denote a positive scoring for this content as being\n// an article container. Checked against className and id.\n//\n// TODO: Perhaps have these scale based on their odds of being quality?\nexport const POSITIVE_SCORE_HINTS = [\n 'article',\n 'articlecontent',\n 'instapaper_body',\n 'blog',\n 'body',\n 'content',\n 'entry-content-asset',\n 'entry',\n 'hentry',\n 'main',\n 'Normal',\n 'page',\n 'pagination',\n 'permalink',\n 'post',\n 'story',\n 'text',\n '[-_]copy', // usatoday\n '\\\\Bcopy',\n];\n\n// The above list, joined into a matching regular expression\nexport const POSITIVE_SCORE_RE = new RegExp(\n POSITIVE_SCORE_HINTS.join('|'),\n 'i'\n);\n\n// Readability publisher-specific guidelines\nexport const READABILITY_ASSET = new RegExp('entry-content-asset', 'i');\n\n// A list of strings that denote a negative scoring for this content as being\n// an article container. Checked against className and id.\n//\n// TODO: Perhaps have these scale based on their odds of being quality?\nexport const NEGATIVE_SCORE_HINTS = [\n 'adbox',\n 'advert',\n 'author',\n 'bio',\n 'bookmark',\n 'bottom',\n 'byline',\n 'clear',\n 'com-',\n 'combx',\n 'comment',\n 'comment\\\\B',\n 'contact',\n 'copy',\n 'credit',\n 'crumb',\n 'date',\n 'deck',\n 'excerpt',\n 'featured', // tnr.com has a featured_content which throws us off\n 'foot',\n 'footer',\n 'footnote',\n 'graf',\n 'head',\n 'info',\n 'infotext', // newscientist.com copyright\n 'instapaper_ignore',\n 'jump',\n 'linebreak',\n 'link',\n 'masthead',\n 'media',\n 'meta',\n 'modal',\n 'outbrain', // slate.com junk\n 'promo',\n 'pr_', // autoblog - press release\n 'related',\n 'respond',\n 'roundcontent', // lifehacker restricted content warning\n 'scroll',\n 'secondary',\n 'share',\n 'shopping',\n 'shoutbox',\n 'side',\n 'sidebar',\n 'sponsor',\n 'stamp',\n 'sub',\n 'summary',\n 'tags',\n 'tools',\n 'widget',\n];\n// The above list, joined into a matching regular expression\nexport const NEGATIVE_SCORE_RE = new RegExp(\n NEGATIVE_SCORE_HINTS.join('|'),\n 'i'\n);\n\n// XPath to try to determine if a page is wordpress. Not always successful.\nexport const IS_WP_SELECTOR = 'meta[name=generator][value^=WordPress]';\n\n// Match a digit. Pretty clear.\nexport const DIGIT_RE = new RegExp('[0-9]');\n\n// A list of words that, if found in link text or URLs, likely mean that\n// this link is not a next page link.\nexport const EXTRANEOUS_LINK_HINTS = [\n 'print',\n 'archive',\n 'comment',\n 'discuss',\n 'e-mail',\n 'email',\n 'share',\n 'reply',\n 'all',\n 'login',\n 'sign',\n 'single',\n 'adx',\n 'entry-unrelated',\n];\nexport const EXTRANEOUS_LINK_HINTS_RE = new RegExp(\n EXTRANEOUS_LINK_HINTS.join('|'),\n 'i'\n);\n\n// Match any phrase that looks like it could be page, or paging, or pagination\nexport const PAGE_RE = new RegExp('pag(e|ing|inat)', 'i');\n\n// Match any link text/classname/id that looks like it could mean the next\n// page. Things like: next, continue, >, >>, » but not >|, »| as those can\n// mean last page.\n// export const NEXT_LINK_TEXT_RE = new RegExp('(next|weiter|continue|>([^\\|]|$)|»([^\\|]|$))', 'i');\nexport const NEXT_LINK_TEXT_RE = /(next|weiter|continue|>([^|]|$)|»([^|]|$))/i;\n\n// Match any link text/classname/id that looks like it is an end link: things\n// like \"first\", \"last\", \"end\", etc.\nexport const CAP_LINK_TEXT_RE = new RegExp('(first|last|end)', 'i');\n\n// Match any link text/classname/id that looks like it means the previous\n// page.\nexport const PREV_LINK_TEXT_RE = new RegExp('(prev|earl|old|new|<|«)', 'i');\n\n// Match 2 or more consecutive <br> tags\nexport const BR_TAGS_RE = new RegExp('(<br[^>]*>[ \\n\\r\\t]*){2,}', 'i');\n\n// Match 1 BR tag.\nexport const BR_TAG_RE = new RegExp('<br[^>]*>', 'i');\n\n// A list of all of the block level tags known in HTML5 and below. Taken from\n// http://bit.ly/qneNIT\nexport const BLOCK_LEVEL_TAGS = [\n 'article',\n 'aside',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'col',\n 'colgroup',\n 'dd',\n 'div',\n 'dl',\n 'dt',\n 'embed',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'header',\n 'hgroup',\n 'hr',\n 'li',\n 'map',\n 'object',\n 'ol',\n 'output',\n 'p',\n 'pre',\n 'progress',\n 'section',\n 'table',\n 'tbody',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'tr',\n 'ul',\n 'video',\n];\nexport const BLOCK_LEVEL_TAGS_RE = new RegExp(\n `^(${BLOCK_LEVEL_TAGS.join('|')})$`,\n 'i'\n);\n\n// The removal is implemented as a blacklist and whitelist, this test finds\n// blacklisted elements that aren't whitelisted. We do this all in one\n// expression-both because it's only one pass, and because this skips the\n// serialization for whitelisted nodes.\nconst candidatesBlacklist = UNLIKELY_CANDIDATES_BLACKLIST.join('|');\nexport const CANDIDATES_BLACKLIST = new RegExp(candidatesBlacklist, 'i');\n\nconst candidatesWhitelist = UNLIKELY_CANDIDATES_WHITELIST.join('|');\nexport const CANDIDATES_WHITELIST = new RegExp(candidatesWhitelist, 'i');\n\nexport const UNLIKELY_RE = new RegExp(\n `!(${candidatesWhitelist})|(${candidatesBlacklist})`,\n 'i'\n);\n\nexport const PARAGRAPH_SCORE_TAGS = new RegExp('^(p|li|span|pre)$', 'i');\nexport const CHILD_CONTENT_TAGS = new RegExp('^(td|blockquote|ol|ul|dl)$', 'i');\nexport const BAD_TAGS = new RegExp('^(address|form)$', 'i');\n\nexport const HTML_OR_BODY_RE = new RegExp('^(html|body)$', 'i');\n","export default function getAttrs(node) {\n const { attribs, attributes } = node;\n\n if (!attribs && attributes) {\n const attrs = Reflect.ownKeys(attributes).reduce((acc, index) => {\n const attr = attributes[index];\n\n // In browser, Reflect.ownKeys includes non-numeric keys like 'length', 'item', etc.\n if (!attr || !attr.name || !attr.value) return acc;\n\n acc[attr.name] = attr.value;\n return acc;\n }, {});\n return attrs;\n }\n\n return attribs;\n}\n","import { STRIP_OUTPUT_TAGS, KEEP_CLASS } from './constants';\n\nexport default function stripJunkTags(article, $, tags = []) {\n if (tags.length === 0) {\n tags = STRIP_OUTPUT_TAGS;\n }\n\n // Remove matching elements, but ignore\n // any element with a class of mercury-parser-keep\n $(tags.join(','), article)\n .not(`.${KEEP_CLASS}`)\n .remove();\n\n return $;\n}\n","export default function setAttr(node, attr, val) {\n if (node.attribs) {\n node.attribs[attr] = val;\n } else if (node.attributes) {\n node.setAttribute(attr, val);\n }\n\n return node;\n}\n","import URL from 'url';\n\nimport getAttrs from './get-attrs';\nimport setAttr from './set-attr';\n\nfunction absolutize($, rootUrl, attr) {\n const baseUrl = $('base').attr('href');\n\n $(`[${attr}]`).each((_, node) => {\n const attrs = getAttrs(node);\n const url = attrs[attr];\n if (!url) return;\n const absoluteUrl = URL.resolve(baseUrl || rootUrl, url);\n\n setAttr(node, attr, absoluteUrl);\n });\n}\n\nfunction absolutizeSet($, rootUrl, $content) {\n $('[srcset]', $content).each((_, node) => {\n const attrs = getAttrs(node);\n const urlSet = attrs.srcset;\n\n if (urlSet) {\n // a comma should be considered part of the candidate URL unless preceded by a descriptor\n // descriptors can only contain positive numbers followed immediately by either 'w' or 'x'\n // space characters inside the URL should be encoded (%20 or +)\n const candidates = urlSet.match(\n /(?:\\s*)(\\S+(?:\\s*[\\d.]+[wx])?)(?:\\s*,\\s*)?/g\n );\n if (!candidates) return;\n const absoluteCandidates = candidates.map(candidate => {\n // a candidate URL cannot start or end with a comma\n // descriptors are separated from the URLs by unescaped whitespace\n const parts = candidate\n .trim()\n .replace(/,$/, '')\n .split(/\\s+/);\n parts[0] = URL.resolve(rootUrl, parts[0]);\n return parts.join(' ');\n });\n const absoluteUrlSet = [...new Set(absoluteCandidates)].join(', ');\n setAttr(node, 'srcset', absoluteUrlSet);\n }\n });\n}\n\nexport default function makeLinksAbsolute($content, $, url) {\n ['href', 'src'].forEach(attr => absolutize($, url, attr));\n absolutizeSet($, url, $content);\n\n return $content;\n}\n","export default function insertValues(strings, ...values) {\n if (values.length) {\n return strings.reduce((result, part, idx) => {\n let value = values[idx];\n\n if (value && typeof value.toString === 'function') {\n value = value.toString();\n } else {\n value = '';\n }\n\n return result + part + value;\n }, '');\n }\n\n return strings.join('');\n}\n","import insertValues from './insert-values';\n\nconst bodyPattern = /^\\n([\\s\\S]+)\\s{2}$/gm;\nconst trailingWhitespace = /\\s+$/;\n\nexport default function template(strings, ...values) {\n const compiled = insertValues(strings, ...values);\n let [body] = compiled.match(bodyPattern) || [];\n let indentLevel = /^\\s{0,4}(.+)$/g;\n\n if (!body) {\n body = compiled;\n indentLevel = /^\\s{0,2}(.+)$/g;\n }\n\n return body\n .split('\\n')\n .slice(1)\n .map(line => {\n line = line.replace(indentLevel, '$1');\n\n if (trailingWhitespace.test(line)) {\n line = line.replace(trailingWhitespace, '');\n }\n\n return line;\n })\n .join('\\n');\n}\n","import template from './index';\n\nexport default function(hostname, name) {\n return template`\n export const ${name} = {\n domain: '${hostname}',\n\n title: {\n selectors: [\n // enter title selectors\n ],\n },\n\n author: {\n selectors: [\n // enter author selectors\n ],\n },\n\n date_published: {\n selectors: [\n // enter selectors\n ],\n },\n\n lead_image_url: {\n selectors: [\n // enter selectors\n ],\n },\n\n content: {\n selectors: [\n // enter content selectors\n ],\n\n // Is there anything in the content you selected that needs transformed\n // before it's consumable content? E.g., unusual lazy loaded images\n transforms: {\n },\n\n // Is there anything that is in the result that shouldn't be?\n // The clean selectors will remove anything that matches from\n // the result\n clean: [\n\n ]\n },\n }\n `;\n}\n","import template from './index';\n\nconst IGNORE = [\n 'url',\n 'domain',\n 'content',\n 'word_count',\n 'next_page_url',\n 'excerpt',\n 'direction',\n 'total_pages',\n 'rendered_pages',\n];\n\nfunction testFor(key, value, dir) {\n if (IGNORE.find(k => k === key)) return '';\n\n return template`\n it('returns the ${key}', async () => {\n // To pass this test, fill out the ${key} selector\n // in ${dir}/index.js.\n const { ${key} } = await result\n\n // Update these values with the expected values from\n // the article.\n assert.strictEqual(${key}, ${value ? `\\`${value}\\`` : \"''\"})\n });\n `;\n}\n\nexport default function(file, url, dir, result, name) {\n return template`\n import assert from 'assert';\n import * as cheerio from 'cheerio';\n\n import Parser from 'mercury';\n import getExtractor from 'extractors/get-extractor';\n import { excerptContent } from 'utils/text';\n\n const fs = require('fs');\n\n describe('${name}', () => {\n describe('initial test case', () => {\n let result;\n let url;\n beforeAll(() => {\n url =\n '${url}';\n const html =\n fs.readFileSync('${file}');\n result =\n Parser.parse(url, { html, fallback: false });\n });\n\n it('is selected properly', () => {\n // This test should be passing by default.\n // It sanity checks that the correct parser\n // is being selected for URLs from this domain\n const extractor = getExtractor(url);\n assert.strictEqual(extractor.domain, new URL(url).hostname)\n })\n\n ${Reflect.ownKeys(result)\n .map(k => testFor(k, result[k], dir))\n .join('\\n\\n')}\n\n it('returns the content', async () => {\n // To pass this test, fill out the content selector\n // in ${dir}/index.js.\n // You may also want to make use of the clean and transform\n // options.\n const { content } = await result;\n\n const $ = cheerio.load(content || '');\n\n const first13 = excerptContent($('*').first().text(), 13)\n\n // Update these values with the expected values from the article.\n // Add the first 13 words of the article here\n assert.strictEqual(first13, null);\n });\n });\n });\n `;\n}\n","/* eslint-disable import/no-extraneous-dependencies */\n/* eslint-disable no-use-before-define */\n/* eslint-disable no-console */\nimport fs from 'fs';\nimport inquirer from 'inquirer';\nimport ora from 'ora';\nimport { exec } from 'child_process';\n\nimport { stripJunkTags, makeLinksAbsolute } from 'utils/dom';\nimport Parser from '../dist/mercury';\nimport extractorTemplate from './templates/custom-extractor';\nimport extractorTestTemplate from './templates/custom-extractor-test';\n\nconst questions = [\n {\n type: 'input',\n name: 'website',\n message:\n \"Paste a url to an article you'd like to create or extend a parser for:\",\n validate(value) {\n const { hostname } = new URL(value);\n if (hostname) return true;\n\n return false;\n },\n },\n];\nlet spinner;\n\nfunction confirm(fn, args, msg, newParser) {\n spinner = ora({ text: msg });\n spinner.start();\n const result = fn(...args);\n\n if (result && result.then) {\n result.then(r => savePage(r, args, newParser));\n } else {\n spinner.succeed();\n }\n\n return result;\n}\n\nfunction confirmCreateDir(dir, msg) {\n if (!fs.existsSync(dir)) {\n confirm(fs.mkdirSync, [dir], msg);\n }\n}\n\nfunction getDir(url) {\n const { hostname } = new URL(url);\n return `./src/extractors/custom/${hostname}`;\n}\n\nfunction scaffoldCustomParser(url) {\n const dir = getDir(url);\n const { hostname } = new URL(url);\n let newParser = false;\n\n if (!fs.existsSync(dir)) {\n newParser = true;\n confirmCreateDir(dir, `Creating ${hostname} directory`);\n confirmCreateDir(`./fixtures/${hostname}`, 'Creating fixtures directory');\n }\n\n confirm(Parser.fetchResource, [url], 'Fetching fixture', newParser);\n}\n\n// if has arg, just assume that arg is a url and skip prmopt\nconst urlArg = process.argv[2];\nif (urlArg) {\n scaffoldCustomParser(urlArg);\n} else {\n inquirer.prompt(questions).then(answers => {\n scaffoldCustomParser(answers.website);\n });\n}\n\nfunction generateScaffold(url, file, result) {\n const { hostname } = new URL(url);\n const extractor = extractorTemplate(hostname, extractorName(hostname));\n const extractorTest = extractorTestTemplate(\n file,\n url,\n getDir(url),\n result,\n extractorName(hostname)\n );\n\n fs.writeFileSync(`${getDir(url)}/index.js`, extractor);\n fs.writeFileSync(`${getDir(url)}/index.test.js`, extractorTest);\n fs.appendFileSync('./src/extractors/custom/index.js', exportString(url));\n exec(`npm run lint-fix-quiet -- ${getDir(url)}/*.js`);\n}\n\nfunction savePage($, [url], newParser) {\n const { hostname } = new URL(url);\n\n spinner.succeed();\n\n const filename = new Date().getTime();\n const file = `./fixtures/${hostname}/${filename}.html`;\n // fix http(s) relative links:\n makeLinksAbsolute($('*').first(), $, url);\n $('[src], [href]').each((index, node) => {\n const $node = $(node);\n const link = $node.attr('src');\n if (link && link.slice(0, 2) === '//') {\n $node.attr('src', `http:${link}`);\n }\n });\n const html = stripJunkTags($('*').first(), $, ['script']).html();\n\n fs.writeFileSync(file, html);\n\n Parser.parse(url, { html }).then(result => {\n if (newParser) {\n confirm(\n generateScaffold,\n [url, file, result],\n 'Generating parser and tests'\n );\n console.log(`Your custom site extractor has been set up. To get started building it, run\n yarn watch:test -- ${hostname}\n -- OR --\n npm run watch:test -- ${hostname}`);\n } else {\n console.log(`\n It looks like you already have a custom parser for this url.\n The page you linked to has been added to ${file}. Copy and paste\n the following code to use that page in your tests:\n const html = fs.readFileSync('${file}');`);\n }\n });\n}\n\nfunction exportString(url) {\n const { hostname } = new URL(url);\n return `export * from './${hostname}';`;\n}\n\nfunction extractorName(hostname) {\n const name = hostname\n .split('.')\n .map(w => `${w.charAt(0).toUpperCase()}${w.slice(1)}`)\n .join('');\n return `${name}Extractor`;\n}\n"],"names":["KEEP_CLASS","STRIP_OUTPUT_TAGS","getAttrs","node","attribs","attributes","attrs","_Reflect$ownKeys","reduce","acc","index","attr","name","value","stripJunkTags","article","$","tags","arguments","length","undefined","join","not","concat","remove","setAttr","val","setAttribute","absolutize","rootUrl","baseUrl","each","_","url","absoluteUrl","URL","resolve","absolutizeSet","$content","urlSet","srcset","candidates","match","absoluteCandidates","map","candidate","parts","trim","replace","split","absoluteUrlSet","_toConsumableArray","_Set","makeLinksAbsolute","forEach","insertValues","strings","_len","values","Array","_key","result","part","idx","toString","bodyPattern","trailingWhitespace","template","compiled","apply","_ref","_ref2","_slicedToArray","body","indentLevel","slice","line","test","hostname","_templateObject","_taggedTemplateLiteral","IGNORE","testFor","key","dir","find","k","file","_templateObject2","questions","type","message","validate","_URL","spinner","confirm","fn","args","msg","newParser","ora","text","start","then","r","savePage","succeed","confirmCreateDir","fs","existsSync","mkdirSync","getDir","_URL2","scaffoldCustomParser","_URL3","Parser","fetchResource","urlArg","process","argv","inquirer","prompt","answers","website","generateScaffold","_URL4","extractor","extractorTemplate","extractorName","extractorTest","extractorTestTemplate","writeFileSync","appendFileSync","exportString","exec","_URL5","filename","Date","getTime","first","$node","link","html","parse","console","log","_URL6","w","charAt","toUpperCase"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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