shopify 3.94.2 → 4.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 (295) hide show
  1. package/bin/run.js +5 -1
  2. package/dist/analytics-6IHHYAV6.js +1 -0
  3. package/dist/analytics-KKVP5DT3.js +1 -0
  4. package/dist/bootstrap.d.ts +5 -0
  5. package/dist/bootstrap.js +3 -0
  6. package/dist/chunk-22PCRFG4.js +1 -0
  7. package/dist/chunk-26D72ZNV.js +1 -0
  8. package/dist/chunk-2APPXD5Z.js +2 -0
  9. package/dist/chunk-2I4PRX2I.js +1 -0
  10. package/dist/chunk-2VQJQ36C.js +103 -0
  11. package/dist/chunk-323UTVMM.js +1 -0
  12. package/dist/chunk-3DQIVE24.js +9 -0
  13. package/dist/chunk-3F6NZK7S.js +2 -0
  14. package/dist/chunk-3LVGAQB4.js +1 -0
  15. package/dist/chunk-3TNEIDOD.js +1 -0
  16. package/dist/chunk-3VZEETAV.js +1 -0
  17. package/dist/chunk-4G7J6HIV.js +1 -0
  18. package/dist/chunk-4HHXSMD7.js +10 -0
  19. package/dist/chunk-4LNCYIS3.js +1 -0
  20. package/dist/chunk-4ZGSSQC6.js +1 -0
  21. package/dist/chunk-52GC6XUT.js +1 -0
  22. package/dist/chunk-5CH3B62S.js +2 -0
  23. package/dist/chunk-5Y7GIF2W.js +1 -0
  24. package/dist/chunk-66RJ5T7A.js +102 -0
  25. package/dist/chunk-6B53BWJW.js +1 -0
  26. package/dist/chunk-6BMMB2UO.js +1 -0
  27. package/dist/chunk-6HBRBQAN.js +6 -0
  28. package/dist/chunk-6M3ZYNGO.js +451 -0
  29. package/dist/chunk-6TZAAS5H.js +1 -0
  30. package/dist/chunk-72F3YBNA.js +1 -0
  31. package/dist/chunk-74HYYXXE.js +17 -0
  32. package/dist/chunk-75VPUOC5.js +1 -0
  33. package/dist/chunk-7BGM2GAH.js +1 -0
  34. package/dist/chunk-7UYZQN4V.js +18 -0
  35. package/dist/chunk-A74GETYC.js +1 -0
  36. package/dist/chunk-AIV5RI3X.js +1 -0
  37. package/dist/chunk-ALKTLKQ6.js +5 -0
  38. package/dist/chunk-B2EHO7ZC.js +847 -0
  39. package/dist/chunk-B2IVY4V5.js +1 -0
  40. package/dist/chunk-BDVAE5MS.js +28 -0
  41. package/dist/chunk-CERXUPGC.js +14 -0
  42. package/dist/chunk-D3TSJA5S.js +1 -0
  43. package/dist/chunk-D6JARNEH.js +1 -0
  44. package/dist/chunk-DFMQWJQ3.js +3 -0
  45. package/dist/chunk-DJONKJSZ.js +1 -0
  46. package/dist/chunk-DJQVNH7P.js +567 -0
  47. package/dist/chunk-DU4WR4OP.js +1 -0
  48. package/dist/chunk-ELVFJ7BR.js +4 -0
  49. package/dist/chunk-ELYP4KFP.js +8 -0
  50. package/dist/chunk-FFQ5EWII.js +294 -0
  51. package/dist/chunk-FUOIGXI4.js +1 -0
  52. package/dist/chunk-GD7FWXJ5.js +2 -0
  53. package/dist/chunk-GFEAKSGV.js +374 -0
  54. package/dist/chunk-GFJ7UV74.js +1 -0
  55. package/dist/chunk-GNPS5SBU.js +1 -0
  56. package/dist/chunk-GOJ2QHSR.js +1 -0
  57. package/dist/chunk-HSK7YMRE.js +359 -0
  58. package/dist/chunk-HUZUORYM.js +19 -0
  59. package/dist/chunk-HZA6IAA4.js +1 -0
  60. package/dist/chunk-IASVAERO.js +1 -0
  61. package/dist/chunk-IIIVWD4R.js +1 -0
  62. package/dist/chunk-INEU4XKS.js +6 -0
  63. package/dist/chunk-IOLVEXM6.js +1 -0
  64. package/dist/chunk-IU2ZQ6TE.js +2 -0
  65. package/dist/chunk-IX5ICOBV.js +7 -0
  66. package/dist/chunk-J3KVONB3.js +6 -0
  67. package/dist/chunk-JGXWQULI.js +1 -0
  68. package/dist/chunk-JHPRFW5B.js +19 -0
  69. package/dist/chunk-JLBH7RCF.js +4 -0
  70. package/dist/chunk-JPGO36XP.js +1 -0
  71. package/dist/chunk-JUVAGMIH.js +1 -0
  72. package/dist/chunk-JVIKCGDY.js +1 -0
  73. package/dist/chunk-K2WUCOQJ.js +32 -0
  74. package/dist/chunk-K5YV6UVF.js +4 -0
  75. package/dist/chunk-KBQ4LGFB.js +1 -0
  76. package/dist/chunk-KGXQS7LS.js +1 -0
  77. package/dist/chunk-KL5Z3T6L.js +1 -0
  78. package/dist/chunk-KLMDWDT2.js +1 -0
  79. package/dist/chunk-KNVM7N3U.js +1 -0
  80. package/dist/chunk-KWJ562F2.js +12 -0
  81. package/dist/chunk-LALIKZPS.js +5 -0
  82. package/dist/chunk-LAZJ47DZ.js +6 -0
  83. package/dist/chunk-LDGAHMS7.js +159 -0
  84. package/dist/chunk-LNHLDRC5.js +1 -0
  85. package/dist/chunk-LW7U753G.js +1 -0
  86. package/dist/chunk-LX3ZOW52.js +12 -0
  87. package/dist/chunk-LXFJDCNG.js +1 -0
  88. package/dist/chunk-MBAFWQSZ.js +7 -0
  89. package/dist/chunk-MOA33ZFO.js +1 -0
  90. package/dist/chunk-MQNYGGAM.js +1 -0
  91. package/dist/chunk-N5YIPQ6J.js +1 -0
  92. package/dist/chunk-N7RBSKYT.js +1 -0
  93. package/dist/chunk-NF2ABOOU.js +1 -0
  94. package/dist/chunk-NRAFVIU3.js +1 -0
  95. package/dist/chunk-OCOY5MV2.js +1 -0
  96. package/dist/chunk-ODNGDO4H.js +50 -0
  97. package/dist/chunk-OHY4ZL3U.js +2 -0
  98. package/dist/chunk-OLZHWPZP.js +1 -0
  99. package/dist/chunk-OUOYKNMY.js +1 -0
  100. package/dist/chunk-OXPWCC7I.js +64 -0
  101. package/dist/chunk-P5VVOLGV.js +1 -0
  102. package/dist/chunk-P6XE4MH5.js +1 -0
  103. package/dist/chunk-P7R7FBY2.js +3 -0
  104. package/dist/chunk-PD5ZHJWI.js +1 -0
  105. package/dist/chunk-PIBY5DDZ.js +1 -0
  106. package/dist/chunk-Q7ING5F5.js +1 -0
  107. package/dist/chunk-QFWIDATO.js +1 -0
  108. package/dist/chunk-QRRNOVJ3.js +1 -0
  109. package/dist/chunk-QSTEVZFQ.js +1 -0
  110. package/dist/chunk-R466TU3N.js +2 -0
  111. package/dist/chunk-RF2DPBA6.js +1 -0
  112. package/dist/chunk-RFG5RMPL.js +1 -0
  113. package/dist/chunk-RM5SJJN6.js +559 -0
  114. package/dist/chunk-RVNMVBPM.js +1 -0
  115. package/dist/chunk-SBEZBZM7.js +144 -0
  116. package/dist/chunk-SGQ6D3LU.js +15 -0
  117. package/dist/chunk-SRCQVUMC.js +1 -0
  118. package/dist/chunk-TFSBQ4RY.js +5 -0
  119. package/dist/chunk-TQYMC7TH.js +1 -0
  120. package/dist/chunk-UGDBJTLP.js +6 -0
  121. package/dist/chunk-UGXYQ23Y.js +1411 -0
  122. package/dist/chunk-UWJ73J4B.js +1 -0
  123. package/dist/chunk-V2CNCPIE.js +2 -0
  124. package/dist/chunk-VBUZWRUL.js +1 -0
  125. package/dist/chunk-VS3T5YOG.js +264 -0
  126. package/dist/chunk-VWYM4OWK.js +1 -0
  127. package/dist/chunk-VY6SNDKW.js +3 -0
  128. package/dist/chunk-WDC3KIZT.js +2 -0
  129. package/dist/chunk-WFXRSKRK.js +1 -0
  130. package/dist/chunk-WXVZJJOR.js +16 -0
  131. package/dist/chunk-WZBSLU4Q.js +6 -0
  132. package/dist/chunk-XBXMPFXM.js +1 -0
  133. package/dist/chunk-XEFQQPL4.js +1 -0
  134. package/dist/chunk-XLELNRFF.js +3 -0
  135. package/dist/chunk-XNO6DZYP.js +1 -0
  136. package/dist/chunk-Y5JKV2AI.js +1 -0
  137. package/dist/chunk-YC6G4MHD.js +3 -0
  138. package/dist/chunk-YI232QLS.js +1 -0
  139. package/dist/chunk-YMWHHINU.js +1 -0
  140. package/dist/chunk-YOZNRLFC.js +1 -0
  141. package/dist/chunk-YZDDTYTU.js +11 -0
  142. package/dist/chunk-Z35BTAM6.js +2 -0
  143. package/dist/chunk-ZR76GGZ6.js +5 -0
  144. package/dist/chunk-ZTMSBSYD.js +1 -0
  145. package/dist/chunk-ZV6NCNI4.js +586 -0
  146. package/dist/chunk-ZVJVDCIM.js +1 -0
  147. package/dist/cli/commands/app/app-logs/sources.js +2 -0
  148. package/dist/cli/commands/app/build.js +1 -0
  149. package/dist/cli/commands/app/bulk/cancel.js +1 -0
  150. package/dist/cli/commands/app/bulk/execute.js +9 -0
  151. package/dist/cli/commands/app/bulk/status.js +5 -0
  152. package/dist/cli/commands/app/config/link.js +4 -0
  153. package/dist/cli/commands/app/config/pull.js +1 -0
  154. package/dist/cli/commands/app/config/use.js +1 -0
  155. package/dist/cli/commands/app/config/validate.js +3 -0
  156. package/dist/cli/commands/app/demo/watcher.js +1 -0
  157. package/dist/cli/commands/app/deploy.js +22 -0
  158. package/dist/cli/commands/app/dev/clean.js +5 -0
  159. package/dist/cli/commands/app/dev.js +320 -0
  160. package/dist/cli/commands/app/env/pull.js +11 -0
  161. package/dist/cli/commands/app/env/show.js +1 -0
  162. package/dist/cli/commands/app/execute.js +1 -0
  163. package/dist/cli/commands/app/function/build.js +1 -0
  164. package/dist/cli/commands/app/function/info.js +16 -0
  165. package/dist/cli/commands/app/function/replay.js +5 -0
  166. package/dist/cli/commands/app/function/run.js +1 -0
  167. package/dist/cli/commands/app/function/schema.js +1 -0
  168. package/dist/cli/commands/app/function/typegen.js +1 -0
  169. package/dist/cli/commands/app/generate/extension.js +5 -0
  170. package/dist/cli/commands/app/import-custom-data-definitions.js +4 -0
  171. package/dist/cli/commands/app/import-extensions.js +1 -0
  172. package/dist/cli/commands/app/info.js +11 -0
  173. package/dist/cli/commands/app/init.js +10 -0
  174. package/dist/cli/commands/app/logs.js +2 -0
  175. package/dist/cli/commands/app/release.js +4 -0
  176. package/dist/cli/commands/app/versions/list.js +1 -0
  177. package/dist/cli/commands/app/webhook/trigger.js +25 -0
  178. package/dist/cli/commands/auth/login.js +1 -20
  179. package/dist/cli/commands/auth/logout.js +1 -12
  180. package/dist/cli/commands/cache/clear.js +1 -11
  181. package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -1
  182. package/dist/cli/commands/config/autoupgrade/constants.js +1 -6
  183. package/dist/cli/commands/config/autoupgrade/off.js +1 -22
  184. package/dist/cli/commands/config/autoupgrade/on.js +1 -22
  185. package/dist/cli/commands/config/autoupgrade/status.js +1 -30
  186. package/dist/cli/commands/debug/command-flags.js +1 -79
  187. package/dist/cli/commands/docs/generate.js +1 -157
  188. package/dist/cli/commands/doctor-release/doctor-release.js +1 -25
  189. package/dist/cli/commands/doctor-release/theme/index.js +1 -56
  190. package/dist/cli/commands/help.js +1 -26
  191. package/dist/cli/commands/kitchen-sink/async.js +1 -16
  192. package/dist/cli/commands/kitchen-sink/index.js +1 -21
  193. package/dist/cli/commands/kitchen-sink/prompts.js +1 -16
  194. package/dist/cli/commands/kitchen-sink/static.js +1 -16
  195. package/dist/cli/commands/notifications/generate.js +1 -11
  196. package/dist/cli/commands/notifications/list.js +1 -33
  197. package/dist/cli/commands/organization/list.js +1 -0
  198. package/dist/cli/commands/search.js +1 -27
  199. package/dist/cli/commands/theme/check.js +1 -0
  200. package/dist/cli/commands/theme/console.js +15 -0
  201. package/dist/cli/commands/theme/delete.js +7 -0
  202. package/dist/cli/commands/theme/dev.js +26 -0
  203. package/dist/cli/commands/theme/duplicate.js +32 -0
  204. package/dist/cli/commands/theme/info.js +1 -0
  205. package/dist/cli/commands/theme/init.js +8 -0
  206. package/dist/cli/commands/theme/language-server.js +1 -0
  207. package/dist/cli/commands/theme/list.js +1 -0
  208. package/dist/cli/commands/theme/metafields/pull.js +3 -0
  209. package/dist/cli/commands/theme/open.js +8 -0
  210. package/dist/cli/commands/theme/package.js +7 -0
  211. package/dist/cli/commands/theme/preview.js +1 -0
  212. package/dist/cli/commands/theme/profile.js +3 -0
  213. package/dist/cli/commands/theme/publish.js +7 -0
  214. package/dist/cli/commands/theme/pull.js +3 -0
  215. package/dist/cli/commands/theme/push.js +28 -0
  216. package/dist/cli/commands/theme/rename.js +6 -0
  217. package/dist/cli/commands/theme/share.js +3 -0
  218. package/dist/cli/commands/upgrade.js +1 -17
  219. package/dist/cli/commands/version.js +1 -10
  220. package/dist/command-registry.d.ts +8 -0
  221. package/dist/command-registry.js +1 -0
  222. package/dist/conf-store-U5ZITKJN.js +1 -0
  223. package/dist/custom-oclif-loader-DVFFWCBV.js +1 -0
  224. package/dist/deprecations-TU5UQJVV.js +1 -0
  225. package/dist/dist-2Z5TND4U.js +1 -0
  226. package/dist/dist-GYHFDHKP.js +1 -0
  227. package/dist/environments-Z5PR7DSI.js +1 -0
  228. package/dist/error-IJGNYKZ3.js +1 -0
  229. package/dist/error-handler-WSCGNS2P.js +1 -0
  230. package/dist/fs-5BDEA2KD.js +1 -0
  231. package/dist/hooks/app-init.d.ts +9 -0
  232. package/dist/hooks/app-init.js +1 -0
  233. package/dist/hooks/did-you-mean.d.ts +1 -0
  234. package/dist/hooks/did-you-mean.js +1 -0
  235. package/dist/hooks/hydrogen-init.d.ts +7 -0
  236. package/dist/hooks/hydrogen-init.js +1 -0
  237. package/dist/hooks/plugin-plugins.d.ts +1 -0
  238. package/dist/hooks/plugin-plugins.js +1 -0
  239. package/dist/hooks/postrun.js +1 -1
  240. package/dist/hooks/prerun.js +1 -1
  241. package/dist/hooks/public-metadata.d.ts +1 -0
  242. package/dist/hooks/public-metadata.js +1 -0
  243. package/dist/hooks/sensitive-metadata.d.ts +1 -0
  244. package/dist/hooks/sensitive-metadata.js +1 -0
  245. package/dist/hooks/tunnel-provider.d.ts +1 -0
  246. package/dist/hooks/tunnel-provider.js +1 -0
  247. package/dist/hooks/tunnel-start.d.ts +1 -0
  248. package/dist/hooks/tunnel-start.js +1 -0
  249. package/dist/http-proxy-node16-Q5DZMBHC.js +38 -0
  250. package/dist/index.js +254 -3668
  251. package/dist/is-global-V4ZRHQG2.js +1 -0
  252. package/dist/latest-version-EFWBOTWM.js +49 -0
  253. package/dist/lib-5L7UKDEK.js +1 -0
  254. package/dist/lib-C3VO2BQW.js +1 -0
  255. package/dist/lib-QB6I6CTC.js +1 -0
  256. package/dist/local-6QPX4GCJ.js +1 -0
  257. package/dist/local-storage-JLXBZVWO.js +1 -0
  258. package/dist/metadata-UDMOTRS7.js +1 -0
  259. package/dist/{morph-DQREIZD2.js → morph-EMYAITFM.js} +1 -1
  260. package/dist/node-package-manager-HAFRYGUM.js +1 -0
  261. package/dist/notifications-system-MP7WDOCS.js +1 -0
  262. package/dist/npa-ICFSA3NL.js +1 -0
  263. package/dist/output-YGMHXEIS.js +1 -0
  264. package/dist/{path-HUAU3YBW.js → path-CWUNINMX.js} +1 -1
  265. package/dist/{prettier-PGDJ5B7I.js → prettier-NVRHEAFO.js} +1 -1
  266. package/dist/system-KLXD4FXF.js +1 -0
  267. package/dist/tsconfig.tsbuildinfo +1 -1
  268. package/dist/typescript-K5CWIA4V.js +1 -0
  269. package/dist/ui-GHG3UGB3.js +1 -0
  270. package/dist/upgrade-OPZGPM5J.js +1 -0
  271. package/dist/version-D5PJZIRW.js +1 -0
  272. package/dist/version-KRQBMYCH.js +1 -0
  273. package/dist/workerd-L2EJKIAQ.js +18 -0
  274. package/oclif.manifest.json +5247 -6056
  275. package/package.json +17 -41
  276. package/dist/chunk-2E6Y4J4T.js +0 -3
  277. package/dist/chunk-45T5XUIM.js +0 -1
  278. package/dist/chunk-52KHWFYF.js +0 -1
  279. package/dist/chunk-FU2Y2M3M.js +0 -5
  280. package/dist/chunk-JBSYWYIP.js +0 -2
  281. package/dist/chunk-KVWHPGOA.js +0 -415
  282. package/dist/chunk-LH4VO6EV.js +0 -63
  283. package/dist/chunk-PRNHS74J.js +0 -847
  284. package/dist/chunk-RXF32AET.js +0 -396
  285. package/dist/chunk-SVA22NZQ.js +0 -607
  286. package/dist/chunk-YPE4BWWD.js +0 -3
  287. package/dist/error-handler-CRWXGODM.js +0 -1
  288. package/dist/http-proxy-node16-TTURN6MD.js +0 -38
  289. package/dist/lib-3WHF5XD3.js +0 -1
  290. package/dist/local-7MUCLBBI.js +0 -1
  291. package/dist/node-package-manager-GFIGZZ24.js +0 -1
  292. package/dist/npa-OKDXXRCU.js +0 -1
  293. package/dist/ui-AOFJCTTO.js +0 -1
  294. package/dist/workerd-VBG5LYNX.js +0 -18
  295. /package/dist/{chunk-KADPE3PY.js → chunk-7MUKLZOL.js} +0 -0
@@ -0,0 +1,1411 @@
1
+ import{a as BO,b as GG,c as zG}from"./chunk-QSTEVZFQ.js";import{b as HG}from"./chunk-5Y7GIF2W.js";import{Aa as jO,i as FO,za as WG}from"./chunk-B2EHO7ZC.js";import{p as UG}from"./chunk-LDGAHMS7.js";import{a as Te,b as at,c as P,d as Lb,e as Uu,f as Pb,g as b}from"./chunk-VPRTJUIN.js";var qb=P(Cb=>{"use strict";b();Object.defineProperty(Cb,"__esModule",{value:!0});Cb.deepGet=JG;function JG(t,e){return e.reduce((r,n)=>r?.[n],t)}});var $O=P(ko=>{"use strict";b();Object.defineProperty(ko,"__esModule",{value:!0});ko.first=KG;ko.last=QG;ko.findLast=YG;ko.findLastIndex=Rb;ko.findLastAndIndex=XG;function KG(t){return t[0]}function QG(t,e=0){return t[t.length-1+e]}function YG(t,e){return t[Rb(t,e)]}function Rb(t,e){for(let r=t.length-1;r>=0;r--)if(e(t[r]))return r;return-1}function XG(t,e){let r=Rb(t,e);return[t[r],r]}});var UO=P((P_e,VO)=>{"use strict";b();var ZG=BO();VO.exports=function(e){return e!=null&&typeof e=="object"&&ZG(e)===!1}});var Mb=P((R_e,WO)=>{"use strict";b();var eH=BO(),tH=UO(),q_e=Array.prototype.slice;WO.exports=Wu;function Wu(t,e){if(!(this instanceof Wu))return typeof e=="number"?new Wu(t).fromIndex(e):new Wu(t,e);this.str=t||"",this.lineToIndex=rH(this.str),e=e||{},this.origin=typeof e.origin>"u"?1:e.origin}Wu.prototype.fromIndex=function(t){if(t<0||t>=this.str.length||isNaN(t))return null;var e=nH(t,this.lineToIndex);return{line:e+this.origin,col:t-this.lineToIndex[e]+this.origin}};Wu.prototype.toIndex=function(t,e){if(typeof e>"u")return eH(t)&&t.length>=2?this.toIndex(t[0],t[1]):tH(t)&&"line"in t&&("col"in t||"column"in t)?this.toIndex(t.line,"col"in t?t.col:t.column):-1;if(isNaN(t)||isNaN(e))return-1;if(t-=this.origin,e-=this.origin,t>=0&&e>=0&&t<this.lineToIndex.length){var r=this.lineToIndex[t],n=t===this.lineToIndex.length-1?this.str.length:this.lineToIndex[t+1];if(e<n-r)return r+e}return-1};function rH(t){for(var e=t.split(`
2
+ `),r=new Array(e.length),n=0,i=0,s=e.length;i<s;i++)r[i]=n,n+=e[i].length+1;return r}function nH(t,e){if(t>=e[e.length-1])return e.length-1;for(var r=0,n=e.length-2,i;r<n;)if(i=r+(n-r>>1),t<e[i])n=i-1;else if(t>=e[i+1])r=i+1;else{r=i;break}return r}});var HO=P(Gu=>{"use strict";b();var iH=Gu&&Gu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Gu,"__esModule",{value:!0});Gu.getPosition=sH;Gu.getOffset=aH;var GO=iH(Mb());function sH(t,e){let r=(0,GO.default)(t,{origin:0}).fromIndex(Math.min(e,t.length-1));return{index:e,line:r?r.line:-1,character:r?r.col:-1}}function aH(t,e,r){return(0,GO.default)(t,{origin:1}).toIndex(e,r)}});var qd=P(Cd=>{"use strict";b();Object.defineProperty(Cd,"__esModule",{value:!0});Cd.isError=uH;Cd.asError=cH;var oH={1:"Invalid symbol found in the input.",2:"Invalid number format detected.",3:"Property name expected but not found.",4:"A value was expected but not found.",5:"Colon `:` expected after the property name.",6:"Comma `,` expected between elements and properties.",7:"Closing brace `}` expected.",8:"Closing bracket `]` expected.",9:"End of file expected.",10:"Invalid comment token found.",11:"Unexpected end of comment.",12:"Unexpected end of string.",13:"Unexpected end of number.",14:"Invalid Unicode escape sequence.",15:"Invalid escape character found.",16:"Invalid character found in the input."};function uH(t){return t instanceof Error}function cH(t){return t instanceof Error?t:typeof t=="string"?new Error(t):t&&typeof t=="object"&&"error"in t?new Error(lH(t)):t&&typeof t.toString=="function"?new Error(t.toString()):new Error("An unknown error occurred")}function lH(t){return oH[t.error]||"Unknown parse error."}});var Fb=P(Db=>{"use strict";b();Object.defineProperty(Db,"__esModule",{value:!0});Db.assertNever=fH;function fH(t){throw new Error(`We should never reach this code, you are missing a case for ${t}`)}});var Bb=P(Rd=>{"use strict";b();Object.defineProperty(Rd,"__esModule",{value:!0});Rd.memo=pH;Rd.memoize=hH;var jb=Symbol("Unset");function pH(t){let e=jb,r=(...n)=>(e===jb&&(e=t(...n)),e);return r.clearCache=()=>{e=jb},r}function hH(t,e){let r={},n=(...i)=>{let s=e(...i);return r[s]||(r[s]=t(...i)),r[s]};return n.force=(...i)=>(n.invalidate(...i),n(...i)),n.invalidate=(...i)=>{let s=e(...i);delete r[s]},n.clearCache=()=>{r={}},n}});var Vb=P($b=>{"use strict";b();Object.defineProperty($b,"__esModule",{value:!0});$b.indexBy=dH;function dH(t,e){let r={};for(let n of e)r[t(n)]=n;return r}});function Ao(t,e=!1){let r=t.length,n=0,i="",s=0,a=16,u=0,c=0,p=0,d=0,m=0;function h(T,S){let L=0,R=0;for(;L<T||!S;){let M=t.charCodeAt(n);if(M>=48&&M<=57)R=R*16+M-48;else if(M>=65&&M<=70)R=R*16+M-65+10;else if(M>=97&&M<=102)R=R*16+M-97+10;else break;n++,L++}return L<T&&(R=-1),R}function y(T){n=T,i="",s=0,a=16,m=0}function w(){let T=n;if(t.charCodeAt(n)===48)n++;else for(n++;n<t.length&&Hu(t.charCodeAt(n));)n++;if(n<t.length&&t.charCodeAt(n)===46)if(n++,n<t.length&&Hu(t.charCodeAt(n)))for(n++;n<t.length&&Hu(t.charCodeAt(n));)n++;else return m=3,t.substring(T,n);let S=n;if(n<t.length&&(t.charCodeAt(n)===69||t.charCodeAt(n)===101))if(n++,(n<t.length&&t.charCodeAt(n)===43||t.charCodeAt(n)===45)&&n++,n<t.length&&Hu(t.charCodeAt(n))){for(n++;n<t.length&&Hu(t.charCodeAt(n));)n++;S=n}else m=3;return t.substring(T,S)}function x(){let T="",S=n;for(;;){if(n>=r){T+=t.substring(S,n),m=2;break}let L=t.charCodeAt(n);if(L===34){T+=t.substring(S,n),n++;break}if(L===92){if(T+=t.substring(S,n),n++,n>=r){m=2;break}switch(t.charCodeAt(n++)){case 34:T+='"';break;case 92:T+="\\";break;case 47:T+="/";break;case 98:T+="\b";break;case 102:T+="\f";break;case 110:T+=`
3
+ `;break;case 114:T+="\r";break;case 116:T+=" ";break;case 117:let M=h(4,!0);M>=0?T+=String.fromCharCode(M):m=4;break;default:m=5}S=n;continue}if(L>=0&&L<=31)if(Kl(L)){T+=t.substring(S,n),m=2;break}else m=6;n++}return T}function k(){if(i="",m=0,s=n,c=u,d=p,n>=r)return s=r,a=17;let T=t.charCodeAt(n);if(Ub(T)){do n++,i+=String.fromCharCode(T),T=t.charCodeAt(n);while(Ub(T));return a=15}if(Kl(T))return n++,i+=String.fromCharCode(T),T===13&&t.charCodeAt(n)===10&&(n++,i+=`
4
+ `),u++,p=n,a=14;switch(T){case 123:return n++,a=1;case 125:return n++,a=2;case 91:return n++,a=3;case 93:return n++,a=4;case 58:return n++,a=6;case 44:return n++,a=5;case 34:return n++,i=x(),a=10;case 47:let S=n-1;if(t.charCodeAt(n+1)===47){for(n+=2;n<r&&!Kl(t.charCodeAt(n));)n++;return i=t.substring(S,n),a=12}if(t.charCodeAt(n+1)===42){n+=2;let L=r-1,R=!1;for(;n<L;){let M=t.charCodeAt(n);if(M===42&&t.charCodeAt(n+1)===47){n+=2,R=!0;break}n++,Kl(M)&&(M===13&&t.charCodeAt(n)===10&&n++,u++,p=n)}return R||(n++,m=1),i=t.substring(S,n),a=13}return i+=String.fromCharCode(T),n++,a=16;case 45:if(i+=String.fromCharCode(T),n++,n===r||!Hu(t.charCodeAt(n)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=w(),a=11;default:for(;n<r&&v(T);)n++,T=t.charCodeAt(n);if(s!==n){switch(i=t.substring(s,n),i){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return i+=String.fromCharCode(T),n++,a=16}}function v(T){if(Ub(T)||Kl(T))return!1;switch(T){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function I(){let T;do T=k();while(T>=12&&T<=15);return T}return{setPosition:y,getPosition:()=>n,scan:e?I:k,getToken:()=>a,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>n-s,getTokenStartLine:()=>c,getTokenStartCharacter:()=>s-d,getTokenError:()=>m}}function Ub(t){return t===32||t===9}function Kl(t){return t===10||t===13}function Hu(t){return t>=48&&t<=57}var zO,Md=at(()=>{"use strict";b();(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(zO||(zO={}))});var Kn,zu,Wb,JO,KO=at(()=>{b();Kn=new Array(20).fill(0).map((t,e)=>" ".repeat(e)),zu=200,Wb={" ":{"\n":new Array(zu).fill(0).map((t,e)=>`
5
+ `+" ".repeat(e)),"\r":new Array(zu).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(zu).fill(0).map((t,e)=>`\r
6
+ `+" ".repeat(e))}," ":{"\n":new Array(zu).fill(0).map((t,e)=>`
7
+ `+" ".repeat(e)),"\r":new Array(zu).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(zu).fill(0).map((t,e)=>`\r
8
+ `+" ".repeat(e))}},JO=[`
9
+ `,"\r",`\r
10
+ `]});function Dd(t,e,r){let n,i,s,a,u;if(e){for(a=e.offset,u=a+e.length,s=a;s>0&&!Ql(t,s-1);)s--;let L=u;for(;L<t.length&&!Ql(t,L);)L++;i=t.substring(s,L),n=gH(i,r)}else i=t,n=0,s=0,a=0,u=t.length;let c=yH(r,t),p=JO.includes(c),d=0,m=0,h;r.insertSpaces?h=Kn[r.tabSize||4]??Ju(Kn[1],r.tabSize||4):h=" ";let y=h===" "?" ":" ",w=Ao(i,!1),x=!1;function k(){if(d>1)return Ju(c,d)+Ju(h,n+m);let L=h.length*(n+m);return!p||L>Wb[y][c].length?c+Ju(h,n+m):L<=0?c:Wb[y][c][L]}function v(){let L=w.scan();for(d=0;L===15||L===14;)L===14&&r.keepLines?d+=1:L===14&&(d=1),L=w.scan();return x=L===16||w.getTokenError()!==0,L}let I=[];function T(L,R,M){!x&&(!e||R<u&&M>a)&&t.substring(R,M)!==L&&I.push({offset:R,length:M-R,content:L})}let S=v();if(r.keepLines&&d>0&&T(Ju(c,d),0,0),S!==17){let L=w.getTokenOffset()+s,R=h.length*n<20&&r.insertSpaces?Kn[h.length*n]:Ju(h,n);T(R,s,L)}for(;S!==17;){let L=w.getTokenOffset()+w.getTokenLength()+s,R=v(),M="",F=!1;for(;d===0&&(R===12||R===13);){let H=w.getTokenOffset()+s;T(Kn[1],L,H),L=w.getTokenOffset()+w.getTokenLength()+s,F=R===12,M=F?k():"",R=v()}if(R===2)S!==1&&m--,r.keepLines&&d>0||!r.keepLines&&S!==1?M=k():r.keepLines&&(M=Kn[1]);else if(R===4)S!==3&&m--,r.keepLines&&d>0||!r.keepLines&&S!==3?M=k():r.keepLines&&(M=Kn[1]);else{switch(S){case 3:case 1:m++,r.keepLines&&d>0||!r.keepLines?M=k():M=Kn[1];break;case 5:r.keepLines&&d>0||!r.keepLines?M=k():M=Kn[1];break;case 12:M=k();break;case 13:d>0?M=k():F||(M=Kn[1]);break;case 6:r.keepLines&&d>0?M=k():F||(M=Kn[1]);break;case 10:r.keepLines&&d>0?M=k():R===6&&!F&&(M="");break;case 7:case 8:case 9:case 11:case 2:case 4:r.keepLines&&d>0?M=k():(R===12||R===13)&&!F?M=Kn[1]:R!==5&&R!==17&&(x=!0);break;case 16:x=!0;break}d>0&&(R===12||R===13)&&(M=k())}R===17&&(r.keepLines&&d>0?M=k():M=r.insertFinalNewline?c:"");let X=w.getTokenOffset()+s;T(M,L,X),S=R}return I}function Ju(t,e){let r="";for(let n=0;n<e;n++)r+=t;return r}function gH(t,e){let r=0,n=0,i=e.tabSize||4;for(;r<t.length;){let s=t.charAt(r);if(s===Kn[1])n++;else if(s===" ")n+=i;else break;r++}return Math.floor(n/i)}function yH(t,e){for(let r=0;r<e.length;r++){let n=e.charAt(r);if(n==="\r")return r+1<e.length&&e.charAt(r+1)===`
11
+ `?`\r
12
+ `:"\r";if(n===`
13
+ `)return`
14
+ `}return t&&t.eol||`
15
+ `}function Ql(t,e){return`\r
16
+ `.indexOf(t.charAt(e))!==-1}var Gb=at(()=>{"use strict";b();Md();KO()});function QO(t,e){let r=[],n=new Object,i,s={value:{},offset:0,length:0,type:"object",parent:void 0},a=!1;function u(c,p,d,m){s.value=c,s.offset=p,s.length=d,s.type=m,s.colonOffset=void 0,i=s}try{Zl(t,{onObjectBegin:(c,p)=>{if(e<=c)throw n;i=void 0,a=e>c,r.push("")},onObjectProperty:(c,p,d)=>{if(e<p||(u(c,p,d,"property"),r[r.length-1]=c,e<=p+d))throw n},onObjectEnd:(c,p)=>{if(e<=c)throw n;i=void 0,r.pop()},onArrayBegin:(c,p)=>{if(e<=c)throw n;i=void 0,r.push(0)},onArrayEnd:(c,p)=>{if(e<=c)throw n;i=void 0,r.pop()},onLiteralValue:(c,p,d)=>{if(e<p||(u(c,p,d,ZO(c)),e<=p+d))throw n},onSeparator:(c,p,d)=>{if(e<=p)throw n;if(c===":"&&i&&i.type==="property")i.colonOffset=p,a=!1,i=void 0;else if(c===","){let m=r[r.length-1];typeof m=="number"?r[r.length-1]=m+1:(a=!0,r[r.length-1]=""),i=void 0}}})}catch(c){if(c!==n)throw c}return{path:r,previousNode:i,isAtPropertyKey:a,matches:c=>{let p=0;for(let d=0;p<c.length&&d<r.length;d++)if(c[p]===r[d]||c[p]==="*")p++;else if(c[p]!=="**")return!1;return p===c.length}}}function YO(t,e=[],r=Yl.DEFAULT){let n=null,i=[],s=[];function a(c){Array.isArray(i)?i.push(c):n!==null&&(i[n]=c)}return Zl(t,{onObjectBegin:()=>{let c={};a(c),s.push(i),i=c,n=null},onObjectProperty:c=>{n=c},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{let c=[];a(c),s.push(i),i=c,n=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(c,p,d)=>{e.push({error:c,offset:p,length:d})}},r),i[0]}function jd(t,e=[],r=Yl.DEFAULT){let n={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(c){n.type==="property"&&(n.length=c-n.offset,n=n.parent)}function s(c){return n.children.push(c),c}Zl(t,{onObjectBegin:c=>{n=s({type:"object",offset:c,length:-1,parent:n,children:[]})},onObjectProperty:(c,p,d)=>{n=s({type:"property",offset:p,length:-1,parent:n,children:[]}),n.children.push({type:"string",value:c,offset:p,length:d,parent:n})},onObjectEnd:(c,p)=>{i(c+p),n.length=c+p-n.offset,n=n.parent,i(c+p)},onArrayBegin:(c,p)=>{n=s({type:"array",offset:c,length:-1,parent:n,children:[]})},onArrayEnd:(c,p)=>{n.length=c+p-n.offset,n=n.parent,i(c+p)},onLiteralValue:(c,p,d)=>{s({type:ZO(c),offset:p,length:d,parent:n,value:c}),i(p+d)},onSeparator:(c,p,d)=>{n.type==="property"&&(c===":"?n.colonOffset=p:c===","&&i(p))},onError:(c,p,d)=>{e.push({error:c,offset:p,length:d})}},r);let u=n.children[0];return u&&delete u.parent,u}function Xl(t,e){if(!t)return;let r=t;for(let n of e)if(typeof n=="string"){if(r.type!=="object"||!Array.isArray(r.children))return;let i=!1;for(let s of r.children)if(Array.isArray(s.children)&&s.children[0].value===n&&s.children.length===2){r=s.children[1],i=!0;break}if(!i)return}else{let i=n;if(r.type!=="array"||i<0||!Array.isArray(r.children)||i>=r.children.length)return;r=r.children[i]}return r}function Hb(t){if(!t.parent||!t.parent.children)return[];let e=Hb(t.parent);if(t.parent.type==="property"){let r=t.parent.children[0].value;e.push(r)}else if(t.parent.type==="array"){let r=t.parent.children.indexOf(t);r!==-1&&e.push(r)}return e}function Fd(t){switch(t.type){case"array":return t.children.map(Fd);case"object":let e=Object.create(null);for(let r of t.children){let n=r.children[1];n&&(e[r.children[0].value]=Fd(n))}return e;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function vH(t,e,r=!1){return e>=t.offset&&e<t.offset+t.length||r&&e===t.offset+t.length}function zb(t,e,r=!1){if(vH(t,e,r)){let n=t.children;if(Array.isArray(n))for(let i=0;i<n.length&&n[i].offset<=e;i++){let s=zb(n[i],e,r);if(s)return s}return t}}function Zl(t,e,r=Yl.DEFAULT){let n=Ao(t,!1),i=[],s=0;function a(ee){return ee?()=>s===0&&ee(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function u(ee){return ee?W=>s===0&&ee(W,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function c(ee){return ee?W=>s===0&&ee(W,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}function p(ee){return ee?()=>{s>0?s++:ee(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice())===!1&&(s=1)}:()=>!0}function d(ee){return ee?()=>{s>0&&s--,s===0&&ee(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}let m=p(e.onObjectBegin),h=c(e.onObjectProperty),y=d(e.onObjectEnd),w=p(e.onArrayBegin),x=d(e.onArrayEnd),k=c(e.onLiteralValue),v=u(e.onSeparator),I=a(e.onComment),T=u(e.onError),S=r&&r.disallowComments,L=r&&r.allowTrailingComma;function R(){for(;;){let ee=n.scan();switch(n.getTokenError()){case 4:M(14);break;case 5:M(15);break;case 3:M(13);break;case 1:S||M(11);break;case 2:M(12);break;case 6:M(16);break}switch(ee){case 12:case 13:S?M(10):I();break;case 16:M(1);break;case 15:case 14:break;default:return ee}}}function M(ee,W=[],J=[]){if(T(ee),W.length+J.length>0){let te=n.getToken();for(;te!==17;){if(W.indexOf(te)!==-1){R();break}else if(J.indexOf(te)!==-1)break;te=R()}}}function F(ee){let W=n.getTokenValue();return ee?k(W):(h(W),i.push(W)),R(),!0}function X(){switch(n.getToken()){case 11:let ee=n.getTokenValue(),W=Number(ee);isNaN(W)&&(M(2),W=0),k(W);break;case 7:k(null);break;case 8:k(!0);break;case 9:k(!1);break;default:return!1}return R(),!0}function H(){return n.getToken()!==10?(M(3,[],[2,5]),!1):(F(!1),n.getToken()===6?(v(":"),R(),Z()||M(4,[],[2,5])):M(5,[],[2,5]),i.pop(),!0)}function $(){m(),R();let ee=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(ee||M(4,[],[]),v(","),R(),n.getToken()===2&&L)break}else ee&&M(6,[],[]);H()||M(4,[],[2,5]),ee=!0}return y(),n.getToken()!==2?M(7,[2],[]):R(),!0}function B(){w(),R();let ee=!0,W=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(W||M(4,[],[]),v(","),R(),n.getToken()===4&&L)break}else W&&M(6,[],[]);ee?(i.push(0),ee=!1):i[i.length-1]++,Z()||M(4,[],[4,5]),W=!0}return x(),ee||i.pop(),n.getToken()!==4?M(8,[4],[]):R(),!0}function Z(){switch(n.getToken()){case 3:return B();case 1:return $();case 10:return F(!0);default:return X()}}return R(),n.getToken()===17?r.allowEmptyContent?!0:(M(4,[],[]),!1):Z()?(n.getToken()!==17&&M(9,[],[]),!0):(M(4,[],[]),!1)}function XO(t,e){let r=Ao(t),n=[],i,s=0,a;do switch(a=r.getPosition(),i=r.scan(),i){case 12:case 13:case 17:s!==a&&n.push(t.substring(s,a)),e!==void 0&&n.push(r.getTokenValue().replace(/[^\r\n]/g,e)),s=r.getPosition();break}while(i!==17);return n.join("")}function ZO(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(t){if(Array.isArray(t))return"array"}else return"null";return"object"}default:return"null"}}var Yl,Jb=at(()=>{"use strict";b();Md();(function(t){t.DEFAULT={allowTrailingComma:!1}})(Yl||(Yl={}))});function eN(t,e,r,n){let i=e.slice(),a=jd(t,[]),u,c;for(;i.length>0&&(c=i.pop(),u=Xl(a,i),u===void 0&&r!==void 0);)typeof c=="string"?r={[c]:r}:r=[r];if(u)if(u.type==="object"&&typeof c=="string"&&Array.isArray(u.children)){let p=Xl(u,[c]);if(p!==void 0)if(r===void 0){if(!p.parent)throw new Error("Malformed AST");let d=u.children.indexOf(p.parent),m,h=p.parent.offset+p.parent.length;if(d>0){let y=u.children[d-1];m=y.offset+y.length}else m=u.offset+1,u.children.length>1&&(h=u.children[1].offset);return Io(t,{offset:m,length:h-m,content:""},n)}else return Io(t,{offset:p.offset,length:p.length,content:JSON.stringify(r)},n);else{if(r===void 0)return[];let d=`${JSON.stringify(c)}: ${JSON.stringify(r)}`,m=n.getInsertionIndex?n.getInsertionIndex(u.children.map(y=>y.children[0].value)):u.children.length,h;if(m>0){let y=u.children[m-1];h={offset:y.offset+y.length,length:0,content:","+d}}else u.children.length===0?h={offset:u.offset+1,length:0,content:d}:h={offset:u.offset+1,length:0,content:d+","};return Io(t,h,n)}}else if(u.type==="array"&&typeof c=="number"&&Array.isArray(u.children)){let p=c;if(p===-1){let d=`${JSON.stringify(r)}`,m;if(u.children.length===0)m={offset:u.offset+1,length:0,content:d};else{let h=u.children[u.children.length-1];m={offset:h.offset+h.length,length:0,content:","+d}}return Io(t,m,n)}else if(r===void 0&&u.children.length>=0){let d=c,m=u.children[d],h;if(u.children.length===1)h={offset:u.offset+1,length:u.length-2,content:""};else if(u.children.length-1===d){let y=u.children[d-1],w=y.offset+y.length,x=u.offset+u.length;h={offset:w,length:x-2-w,content:""}}else h={offset:m.offset,length:u.children[d+1].offset-m.offset,content:""};return Io(t,h,n)}else if(r!==void 0){let d,m=`${JSON.stringify(r)}`;if(!n.isArrayInsertion&&u.children.length>c){let h=u.children[c];d={offset:h.offset,length:h.length,content:m}}else if(u.children.length===0||c===0)d={offset:u.offset+1,length:0,content:u.children.length===0?m:m+","};else{let h=c>u.children.length?u.children.length:c,y=u.children[h-1];d={offset:y.offset+y.length,length:0,content:","+m}}return Io(t,d,n)}else throw new Error(`Can not ${r===void 0?"remove":n.isArrayInsertion?"insert":"modify"} Array index ${p} as length is not sufficient`)}else throw new Error(`Can not add ${typeof c!="number"?"index":"property"} to parent of type ${u.type}`);else{if(r===void 0)throw new Error("Can not delete in empty document");return Io(t,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(r)},n)}}function Io(t,e,r){if(!r.formattingOptions)return[e];let n=Bd(t,e),i=e.offset,s=e.offset+e.content.length;if(e.length===0||e.content.length===0){for(;i>0&&!Ql(n,i-1);)i--;for(;s<n.length&&!Ql(n,s);)s++}let a=Dd(n,{offset:i,length:s-i},{...r.formattingOptions,keepLines:!1});for(let c=a.length-1;c>=0;c--){let p=a[c];n=Bd(n,p),i=Math.min(i,p.offset),s=Math.max(s,p.offset+p.length),s+=p.content.length-p.length}let u=t.length-(n.length-s)-i;return[{offset:i,length:u,content:n.substring(i,s)}]}function Bd(t,e){return t.substring(0,e.offset)+e.content+t.substring(e.offset+e.length)}var tN=at(()=>{"use strict";b();Gb();Jb()});var Ku={};Lb(Ku,{ParseErrorCode:()=>Yb,ScanError:()=>Kb,SyntaxKind:()=>Qb,applyEdits:()=>OH,createScanner:()=>Qn,findNodeAtLocation:()=>kH,findNodeAtOffset:()=>Zb,format:()=>r1,getLocation:()=>wH,getNodePath:()=>e1,getNodeValue:()=>t1,modify:()=>EH,parse:()=>Xb,parseTree:()=>xH,printParseErrorCode:()=>TH,stripComments:()=>IH,visit:()=>AH});function TH(t){switch(t){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function r1(t,e,r){return Dd(t,e,r)}function EH(t,e,r,n){return eN(t,e,r,n)}function OH(t,e){let r=e.slice(0).sort((i,s)=>{let a=i.offset-s.offset;return a===0?i.length-s.length:a}),n=t.length;for(let i=r.length-1;i>=0;i--){let s=r[i];if(s.offset+s.length<=n)t=Bd(t,s);else throw new Error("Overlapping edit");n=s.offset}return t}var Qn,Kb,Qb,wH,Xb,xH,kH,Zb,e1,t1,AH,IH,Yb,ns=at(()=>{"use strict";b();Gb();tN();Md();Jb();Qn=Ao;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(Kb||(Kb={}));(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(Qb||(Qb={}));wH=QO,Xb=YO,xH=jd,kH=Xl,Zb=zb,e1=Hb,t1=Fd,AH=Zl,IH=XO;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(Yb||(Yb={}))});var Dt=P(Qu=>{"use strict";b();Object.defineProperty(Qu,"__esModule",{value:!0});Qu.parseJSON=CH;Qu.nodeAtPath=qH;Qu.getLocStart=RH;Qu.getLocEnd=MH;var NH=(ns(),Pb(Ku)),LH=_t(),PH={disallowComments:!1,allowTrailingComma:!0,allowEmptyContent:!1};function CH(t,e,r){try{let n=[],i=(0,NH.parse)(t,n,PH);if(n.length&&r)throw n[0];return i}catch(n){return e!==void 0?e:(0,LH.asError)(n)}}function qH(t,e){return e.reduce((r,n)=>{if(r)switch(r.type){case"Object":{let i=r.children.find(s=>s.key.value===n);return i?i.value:void 0}case"Array":return r.children[n];case"Literal":return;case"Identifier":return;case"Property":return}},t)}function RH(t){var e,r;return(r=(e=t.loc)===null||e===void 0?void 0:e.start.offset)!==null&&r!==void 0?r:0}function MH(t){var e,r;return(r=(e=t.loc)===null||e===void 0?void 0:e.end.offset)!==null&&r!==void 0?r:0}});var nN=P((To,rN)=>{b();var ef=FO(),DH=ef.default||ef,$d=function(t,e){return/^\/\//.test(t)&&(t="https:"+t),DH.call(this,t,e)};$d.ponyfill=!0;rN.exports=To=$d;To.fetch=$d;To.Headers=ef.Headers;To.Request=ef.Request;To.Response=ef.Response;To.default=$d});var is=P(Eo=>{"use strict";b();Object.defineProperty(Eo,"__esModule",{value:!0});Eo.doesFileExist=iN;Eo.doesFileExceedThreshold=sN;Eo.getFileSize=aN;Eo.hasRemoteAssetSizeExceededThreshold=jH;Eo.hasLocalAssetSizeExceededThreshold=BH;var FH=nN();async function iN(t,e){let r=t.toUri(e);return await t.fileExists(r)}async function sN(t,e,r){let n=t.toUri(e);if(!t.fileSize)return[!1,0];let i=await t.fileSize(n);return[i>r,i]}async function aN(t){try{let e=await(0,FH.fetch)(t,{method:"HEAD"});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);let r=e.headers.get("Content-Length");return r===null?0:parseFloat(r)}catch{return 0}}async function jH(t,e){return await aN(t)>e}async function BH(t,e,r){if(!await iN(t,e))return!1;let[i,s]=await sN(t,e,r);return i}});var pN=P(ka=>{"use strict";b();Object.defineProperty(ka,"__esModule",{value:!0});ka.getBlocks=uN;ka.isInvalidPresetBlock=cN;ka.isInvalidDefaultBlock=VH;ka.validateNestedBlocks=lN;ka.reportWarning=i1;ka.validateBlockFileExistence=fN;var n1=Dt(),$H=is();function uN(t){var e,r;let n=[],i=[],s={},a=[],u=t.blocks,c=t.presets;function p(h,y){if(!h)return;"name"in h?i.push({node:h,path:["blocks",String(y),"type"]}):h.type!=="@app"&&n.push({node:h,path:["blocks",String(y),"type"]})}function d(h,y,w=0){h&&(s[w]||(s[w]=[]),s[w].push({node:h,path:y.concat("type")}),"blocks"in h&&(Array.isArray(h.blocks)?h.blocks.forEach((x,k)=>{d(x,y.concat("blocks",String(k)),w+1)}):typeof h.blocks=="object"&&h.blocks!==null&&Object.entries(h.blocks).forEach(([x,k])=>{d(k,y.concat("blocks",x),w+1)})))}function m(h,y){"name"in h&&a.push({node:h,path:["default","blocks",String(y),"type"]})}return Array.isArray(u)&&u.forEach((h,y)=>{p(h,y)}),c&&c.forEach((h,y)=>{"blocks"in h&&h.blocks&&(Array.isArray(h.blocks)?h.blocks.forEach((w,x)=>{d(w,["presets",String(y),"blocks",String(x)],0)}):typeof h.blocks=="object"&&Object.entries(h.blocks).forEach(([w,x])=>{d(x,["presets",String(y),"blocks",w],0)}))}),"default"in t&&((r=(e=t.default)===null||e===void 0?void 0:e.blocks)===null||r===void 0||r.forEach((h,y)=>{m(h,y)})),{rootLevelThemeBlocks:n,rootLevelLocalBlocks:i,presetLevelBlocks:s,defaultLevelBlocks:a,hasRootBlocksDeclaration:Array.isArray(u)}}function cN(t,e,r,n,i=!0){if(e.static)return!n.some(p=>p.type===e.type&&p.id===t);let s=e.type.startsWith("_");if(s&&!i)return!1;let a=r.some(p=>p.node.type==="@theme"),u=s||!a;return!r.some(p=>p.node.type===e.type)&&u}function VH(t,e,r=!0){let n=t.type.startsWith("_");if(n&&!r)return!1;let i=e.some(u=>u.node.type==="@theme"),s=n||!i;return!e.some(u=>u.node.type===t.type)&&s}async function oN(t,e,r,n,i,s,a,u,c=[]){let p=(0,n1.nodeAtPath)(u,e),d="id"in t?t.id:e.at(-2);if(p){if(cN(d,t,i,c)){let h=!!t.static,y=t.type.startsWith("_"),w=h?`Could not find a static block of type "${t.type}" with id "${d}" in "blocks/${n.type}.liquid".`:y?`Private block type "${t.type}" is not allowed in "${n.type}" blocks.`:`Block type "${t.type}" is not allowed in "${n.type}" blocks. Allowed types are: ${s.join(", ")}.`;i1(w,a,p,r)}await fN(t.type,r)||i1(`Theme block 'blocks/${t.type}.liquid' does not exist.`,a,p,r)}"blocks"in t&&t.blocks&&lN(r,t,t.blocks,e.slice(0,-1),a,u)}async function lN(t,e,r,n,i,s){var a;if(!r)return;let u=await((a=t.getBlockSchema)===null||a===void 0?void 0:a.call(t,e.type));if(!u||u instanceof Error)return;let{validSchema:c,staticBlockDefs:p}=u;if(!c||c instanceof Error)return;let{rootLevelThemeBlocks:d}=uN(c),m=d.map(h=>h.node.type);Array.isArray(r)?Promise.all(r.map((h,y)=>{let w=n.concat(["blocks",String(y),"type"]);return oN(h,w,t,e,d,m,i,s,p)})):typeof r=="object"&&Promise.all(Object.entries(r).map(([h,y])=>{let w=n.concat(["blocks",h,"type"]);return oN(y,w,t,e,d,m,i,s,p)}))}function i1(t,e,r,n){n.report({message:t,startIndex:e+(0,n1.getLocStart)(r),endIndex:e+(0,n1.getLocEnd)(r)})}async function fN(t,e){if(t==="@theme"||t==="@app")return!0;let r=`blocks/${t}.liquid`;return await(0,$H.doesFileExist)(e,r)}});var tL=P(Fs=>{"use strict";b();Object.defineProperty(Fs,"__esModule",{value:!0});function ln(t){let e=t||"";return function(){throw new Error("this method "+e+" is abstract! (it has no implementation in class "+this.constructor.name+")")}}function cn(t,e){if(!t)throw new Error(e||"Assertion failed")}function u1(t,e,r){let n;Object.defineProperty(t,e,{get(){return n||(n=r.call(this)),n}})}function UH(t){return t&&Object.assign({},t)}function PN(t,e){let r=[];for(;e-- >0;)r.push(t());return r}function CN(t,e){return new Array(e+1).join(t)}function Jd(t,e){return PN(()=>t,e)}function c1(t){let e=[];for(let r=0;r<t.length;r++){let n=t[r];t.lastIndexOf(n)!==r&&e.indexOf(n)<0&&e.push(n)}return e}function qN(t){let e=[];return t.forEach(r=>{e.indexOf(r)<0&&e.push(r)}),e}function Oo(t){let e=t[0];return e===e.toUpperCase()}function RN(t){return!Oo(t)}function MN(t,e,r){let n=r||" ";return t.length<e?CN(n,e-t.length)+t:t}function Po(){this.strings=[]}Po.prototype.append=function(t){this.strings.push(t)};Po.prototype.contents=function(){return this.strings.join("")};var s1=t=>String.fromCodePoint(parseInt(t,16));function DN(t){if(t.charAt(0)==="\\")switch(t.charAt(1)){case"b":return"\b";case"f":return"\f";case"n":return`
17
+ `;case"r":return"\r";case"t":return" ";case"v":return"\v";case"x":return s1(t.slice(2,4));case"u":return t.charAt(2)==="{"?s1(t.slice(3,-1)):s1(t.slice(2,6));default:return t.charAt(1)}else return t}function w1(t){if(t==null)return String(t);let e=Object.prototype.toString.call(t);try{let r;return t.constructor&&t.constructor.name?r=t.constructor.name:e.indexOf("[object ")===0?r=e.slice(8,-1):r=typeof t,r+": "+JSON.stringify(String(t))}catch{return e}}function FN(t,e="unexpected null value"){if(t==null)throw new Error(e);return t}var WH=Object.freeze({__proto__:null,abstract:ln,assert:cn,defineLazyProperty:u1,clone:UH,repeatFn:PN,repeatStr:CN,repeat:Jd,getDuplicates:c1,copyWithoutDuplicates:qN,isSyntactic:Oo,isLexical:RN,padLeft:MN,StringBuffer:Po,unescapeCodePoint:DN,unexpectedObjToString:w1,checkNotNull:FN});function GH(t){let e=0;return t.map(n=>{let i=n.toString();return e=Math.max(e,i.length),i}).map(n=>MN(n,e))}function hN(t,e,r){let n=t.length,i=t.slice(0,r),s=t.slice(r+e.length);return(i+e+s).substr(0,n)}function HH(...t){let e=this,{offset:r}=e,{repeatStr:n}=WH,i=new Po;i.append("Line "+e.lineNum+", col "+e.colNum+`:
18
+ `);let s=GH([e.prevLine==null?0:e.lineNum-1,e.lineNum,e.nextLine==null?0:e.lineNum+1]),a=(d,m,h)=>{i.append(h+s[d]+" | "+m+`
19
+ `)};e.prevLine!=null&&a(0,e.prevLine," "),a(1,e.line,"> ");let u=e.line.length,c=n(" ",u+1);for(let d=0;d<t.length;++d){let m=t[d][0],h=t[d][1];cn(m>=0&&m<=h,"range start must be >= 0 and <= end");let y=r-e.colNum+1;m=Math.max(0,m-y),h=Math.min(h-y,u),c=hN(c,n("~",h-m),m)}let p=2+s[1].length+3;return i.append(n(" ",p)),c=hN(c,"^",e.colNum-1),i.append(c.replace(/ +$/,"")+`
20
+ `),e.nextLine!=null&&a(2,e.nextLine," "),i.contents()}var l1=[];function jN(t){l1.push(t)}function zH(t){l1.forEach(e=>{e(t)}),l1=null}function Kd(t,e){let r=1,n=1,i=0,s=0,a=null,u=null,c=-1;for(;i<e;){let m=t.charAt(i++);m===`
21
+ `?(r++,n=1,c=s,s=i):m!=="\r"&&n++}let p=t.indexOf(`
22
+ `,s);if(p===-1)p=t.length;else{let m=t.indexOf(`
23
+ `,p+1);a=m===-1?t.slice(p):t.slice(p,m),a=a.replace(/^\r?\n/,"").replace(/\r$/,"")}c>=0&&(u=t.slice(c,s).replace(/\r?\n$/,""));let d=t.slice(s,p).replace(/\r$/,"");return{offset:e,lineNum:r,colNum:n,line:d,prevLine:u,nextLine:a,toString:HH}}function x1(t,e,...r){return Kd(t,e).toString(...r)}var dN=(()=>{let t=0;return e=>""+e+t++})();function JH(t,e,r){return r(e[t])}function KH(t,e,r){return e[t].map(r)}function mN(t){let e=t.split(/ ?\[\]/);return e.length===2?KH.bind(null,e[0]):JH.bind(null,t)}function gN(t,e,r){return t.map(n=>n(e,r))}function QH(t){return typeof t=="string"?gN.bind(null,[mN(t)]):Array.isArray(t)?gN.bind(null,t.map(mN)):(cn(typeof t=="function","Expected a string, Array, or function"),cn(t.length===2,"Expected a function of arity 2, got "+t.length),t)}function yN(t){return/^[a-zA-Z_][0-9a-zA-Z_]*$/.test(t)}function _N(t){return t.trim()}function YH(t){let e=t.split(/[()]/).map(_N);if(e.length===3&&e[2]===""){let r=e[0],n=[];if(e[1].length>0&&(n=e[1].split(",").map(_N)),yN(r)&&n.every(yN))return{name:r,formals:n}}throw new Error("Invalid operation signature: "+t)}var f1=class{constructor(e){this._shapes=e.shapes,this._getTag=e.getTag,this.Adapter=function(r,n){this._adaptee=r,this._family=n},this.Adapter.prototype.valueOf=function(){throw new Error("heeey!")},this.operations={},this._arities=Object.create(null),this._getChildren=Object.create(null),Object.keys(this._shapes).forEach(r=>{let n=this._shapes[r];this._getChildren[r]=QH(n),typeof n!="function"&&(this._arities[r]=Array.isArray(n)?n.length:1)}),this._wrap=r=>new this.Adapter(r,this)}wrap(e){return this._wrap(e)}_checkActionDict(e){Object.keys(e).forEach(r=>{cn(r in this._getChildren,"Unrecognized action name '"+r+"'");let n=e[r];if(cn(typeof n=="function","Key '"+r+"': expected function, got "+n),r in this._arities){let i=this._arities[r],s=e[r].length;cn(s===i,"Action '"+r+"' has the wrong arity: expected "+i+", got "+s)}})}addOperation(e,r){let n=YH(e),{name:i}=n;this._checkActionDict(r),this.operations[i]={name:i,formals:n.formals,actions:r};let s=this;return this.Adapter.prototype[i]=function(...a){let u=s._getTag(this._adaptee);cn(u in s._getChildren,"getTag returned unrecognized tag '"+u+"'"),cn(u in r,"No action for '"+u+"' in operation '"+i+"'");let c=Object.create(null);for(let[m,h]of Object.entries(a))c[n.formals[m]]=h;let p=this.args;this.args=c;let d=r[u].apply(this,s._getChildren[u](this._adaptee,s._wrap));return this.args=p,d},this}};function vN(t){return t.toAST(this.args.mapping)}function bN(){return[]}function SN(t,e,r){return[t.toAST(this.args.mapping)].concat(r.toAST(this.args.mapping))}var XH={listOf:vN,ListOf:vN,emptyListOf:bN,EmptyListOf:bN,nonemptyListOf:SN,NonemptyListOf:SN},BN={_terminal(){return this.sourceString},_nonterminal(...t){let{ctorName:e}=this._node,{mapping:r}=this.args;if(!Object.prototype.hasOwnProperty.call(r,e)){if(this.isLexical())return this.sourceString;let s=t.filter(a=>!a.isTerminal());if(s.length===1)return s[0].toAST(r)}if(typeof r[e]=="number")return t[r[e]].toAST(r);let n=r[e]||t,i={type:e};for(let s in n){let a=r[e]&&r[e][s];typeof a=="number"?i[s]=t[a].toAST(r):typeof a=="string"||typeof a=="boolean"||a===null?i[s]=a:typeof a=="object"&&a instanceof Number?i[s]=Number(a):typeof a=="function"?i[s]=a.call(this,t):a===void 0&&(t[s]&&!t[s].isTerminal()?i[s]=t[s].toAST(r):delete i[s])}return i},_iter(...t){return this._node.isOptional()?this.numChildren===0?null:t[0].toAST(this.args.mapping):t.map(e=>e.toAST(this.args.mapping))}};function ZH(t,e){if(typeof t.failed!="function"||t.failed())throw new Error("toAST() expects a succesful MatchResult as first parameter");e=Object.assign({},XH,e);let r=Object.assign({},BN);for(let s in e)typeof e[s]=="function"&&(r[s]=e[s],delete e[s]);return t._cst.grammar.createSemantics().addOperation("toAST(mapping)",r)(t).toAST(e)}function ez(t){if(typeof t.createSemantics!="function")throw new Error("semanticsToAST() expects a Grammar as parameter");return t.createSemantics().addOperation("toAST(mapping)",BN)}var $N=t=>new RegExp(String.raw`\p{${t}}`,"u"),p1=Object.fromEntries(["Cc","Cf","Cn","Co","Cs","Ll","Lm","Lo","Lt","Lu","Mc","Me","Mn","Nd","Nl","No","Pc","Pd","Pe","Pf","Pi","Po","Ps","Sc","Sk","Sm","So","Zl","Zp","Zs"].map(t=>[t,$N(t)]));p1.Ltmo=/\p{Lt}|\p{Lm}|\p{Lo}/u;var wN=Object.fromEntries(["XID_Start","XID_Continue","White_Space"].map(t=>[t,$N(t)])),Ve=class t{constructor(){if(this.constructor===t)throw new Error("PExpr cannot be instantiated -- it's abstract")}withSource(e){return e&&(this.source=e.trimmed()),this}},zr=Object.create(Ve.prototype),Jr=Object.create(Ve.prototype),ur=class extends Ve{constructor(e){super(),this.obj=e}},vr=class extends Ve{constructor(e,r){super(),this.from=e,this.to=r,this.matchCodePoint=e.length>1||r.length>1}},br=class extends Ve{constructor(e){super(),this.index=e}},Gt=class extends Ve{constructor(e){super(),this.terms=e}},Yu=class extends Gt{constructor(e,r,n){let i=e.rules[r].body;super([n,i]),this.superGrammar=e,this.name=r,this.body=n}},Xu=class extends Gt{constructor(e,r,n,i){let s=e.rules[r].body;super([...n,s,...i]),this.superGrammar=e,this.ruleName=r,this.expansionPos=n.length}},Qt=class extends Ve{constructor(e){super(),this.factors=e}},Tr=class extends Ve{constructor(e){super(),this.expr=e}},Ms=class extends Tr{},Aa=class extends Tr{},Fi=class extends Tr{};Ms.prototype.operator="*";Aa.prototype.operator="+";Fi.prototype.operator="?";Ms.prototype.minNumMatches=0;Aa.prototype.minNumMatches=1;Fi.prototype.minNumMatches=0;Ms.prototype.maxNumMatches=Number.POSITIVE_INFINITY;Aa.prototype.maxNumMatches=Number.POSITIVE_INFINITY;Fi.prototype.maxNumMatches=1;var ar=class extends Ve{constructor(e){super(),this.expr=e}},Er=class extends Ve{constructor(e){super(),this.expr=e}},Hr=class extends Ve{constructor(e){super(),this.expr=e}},ot=class extends Ve{constructor(e,r=[]){super(),this.ruleName=e,this.args=r}isSyntactic(){return Oo(this.ruleName)}toMemoKey(){return this._memoKey||Object.defineProperty(this,"_memoKey",{value:this.toString()}),this._memoKey}},or=class extends Ve{constructor(e){if(super(),this.categoryOrProp=e,e in p1)this.pattern=p1[e];else if(e in wN)this.pattern=wN[e];else throw new Error(`Invalid Unicode category or property name: ${JSON.stringify(e)}`)}};function Ft(t,e){let r;return e?(r=new Error(e.getLineAndColumnMessage()+t),r.shortMessage=t,r.interval=e):r=new Error(t),r}function h1(){return Ft("Interval sources don't match")}function tz(t){let e=new Error;return Object.defineProperty(e,"message",{enumerable:!0,get(){return t.message}}),Object.defineProperty(e,"shortMessage",{enumerable:!0,get(){return"Expected "+t.getExpectedText()}}),e.interval=t.getInterval(),e}function rz(t,e,r){let n=e?`Grammar ${t} is not declared in namespace '${e}'`:"Undeclared grammar "+t;return Ft(n,r)}function nz(t,e){return Ft("Grammar "+t.name+" is already declared in this namespace")}function iz(t){return Ft(`Grammar '${t.name}' does not support incremental parsing`)}function VN(t,e,r){return Ft("Rule "+t+" is not declared in grammar "+e,r)}function sz(t,e,r){return Ft("Cannot override rule "+t+" because it is not declared in "+e,r)}function az(t,e,r){return Ft("Cannot extend rule "+t+" because it is not declared in "+e,r)}function xN(t,e,r,n){let i="Duplicate declaration for rule '"+t+"' in grammar '"+e+"'";return e!==r&&(i+=" (originally declared in '"+r+"')"),Ft(i,n)}function UN(t,e,r,n){return Ft("Wrong number of parameters for rule "+t+" (expected "+e+", got "+r+")",n)}function oz(t,e,r,n){return Ft("Wrong number of arguments for rule "+t+" (expected "+e+", got "+r+")",n)}function kN(t,e,r){return Ft("Duplicate parameter names in rule "+t+": "+e.join(", "),r)}function uz(t,e){return Ft("Invalid parameter to rule "+t+": "+e+" has arity "+e.getArity()+", but parameter expressions must have arity 1",e.source)}var cz="NOTE: A _syntactic rule_ is a rule whose name begins with a capital letter. See https://ohmjs.org/d/svl for more details.";function lz(t,e){return Ft("Cannot apply syntactic rule "+t+" from here (inside a lexical context)",e.source)}function fz(t){let{ruleName:e}=t;return Ft(`applySyntactic is for syntactic rules, but '${e}' is a lexical rule. `+cz,t.source)}function pz(t){return Ft("applySyntactic is not required here (in a syntactic context)",t.source)}function AN(t,e){return Ft("Incorrect argument type: expected "+t,e.source)}function hz(t){return Ft("'...' can appear at most once in a rule body",t.source)}function dz(t){let e=t._node;cn(e&&e.isNonterminal()&&e.ctorName==="escapeChar_unicodeCodePoint");let r=t.children.slice(1,-1).map(i=>i.source),n=r[0].coverageWith(...r.slice(1));return Ft(`U+${n.contents} is not a valid Unicode code point`,n)}function WN(t,e){let r=e.length>0?e[e.length-1].args:[],i="Nullable expression "+t.expr.substituteParams(r)+" is not allowed inside '"+t.operator+"' (possible infinite loop)";if(e.length>0){let s=e.map(a=>new ot(a.ruleName,a.args)).join(`
24
+ `);i+=`
25
+ Application stack (most recent application last):
26
+ `+s}return Ft(i,t.expr.source)}function GN(t,e,r,n){return Ft("Rule "+t+" involves an alternation which has inconsistent arity (expected "+e+", got "+r+")",n.source)}function mz(t){let e=t.map(r=>r.message);return Ft(["Errors:"].concat(e).join(`
27
+ - `),t[0].interval)}function gz(t,e,r,n){let i=n.slice(0,-1).map(c=>{let p=" "+c[0].name+" > "+c[1];return c.length===3?p+" for '"+c[2]+"'":p}).join(`
28
+ `);i+=`
29
+ `+e+" > "+t;let s="";t==="_iter"&&(s=[`
30
+ NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `," https://ohmjs.org/d/dsa for details."].join(`
31
+ `));let a=[`Missing semantic action for '${t}' in ${r} '${e}'.${s}`,"Action stack (most recent call last):",i].join(`
32
+ `),u=Ft(a);return u.name="missingSemanticAction",u}function yz(t){if(t.length===1)throw t[0];if(t.length>1)throw mz(t)}var No=class t{constructor(e,r,n){Object.defineProperty(this,"_sourceString",{value:e,configurable:!1,enumerable:!1,writable:!1}),this.startIdx=r,this.endIdx=n}get sourceString(){return this._sourceString}get contents(){return this._contents===void 0&&(this._contents=this.sourceString.slice(this.startIdx,this.endIdx)),this._contents}get length(){return this.endIdx-this.startIdx}coverageWith(...e){return t.coverage(...e,this)}collapsedLeft(){return new t(this.sourceString,this.startIdx,this.startIdx)}collapsedRight(){return new t(this.sourceString,this.endIdx,this.endIdx)}getLineAndColumn(){return Kd(this.sourceString,this.startIdx)}getLineAndColumnMessage(){let e=[this.startIdx,this.endIdx];return x1(this.sourceString,this.startIdx,e)}minus(e){if(this.sourceString!==e.sourceString)throw h1();return this.startIdx===e.startIdx&&this.endIdx===e.endIdx?[]:this.startIdx<e.startIdx&&e.endIdx<this.endIdx?[new t(this.sourceString,this.startIdx,e.startIdx),new t(this.sourceString,e.endIdx,this.endIdx)]:this.startIdx<e.endIdx&&e.endIdx<this.endIdx?[new t(this.sourceString,e.endIdx,this.endIdx)]:this.startIdx<e.startIdx&&e.startIdx<this.endIdx?[new t(this.sourceString,this.startIdx,e.startIdx)]:[this]}relativeTo(e){if(this.sourceString!==e.sourceString)throw h1();return cn(this.startIdx>=e.startIdx&&this.endIdx<=e.endIdx,"other interval does not cover this one"),new t(this.sourceString,this.startIdx-e.startIdx,this.endIdx-e.startIdx)}trimmed(){let{contents:e}=this,r=this.startIdx+e.match(/^\s*/)[0].length,n=this.endIdx-e.match(/\s*$/)[0].length;return new t(this.sourceString,r,n)}subInterval(e,r){let n=this.startIdx+e;return new t(this.sourceString,n,n+r)}};No.coverage=function(t,...e){let{startIdx:r,endIdx:n}=t;for(let i of e){if(i.sourceString!==t.sourceString)throw h1();r=Math.min(r,i.startIdx),n=Math.max(n,i.endIdx)}return new No(t.sourceString,r,n)};var _z=65535,vz=1114111,Zu=class{constructor(e){this.source=e,this.pos=0,this.examinedLength=0}atEnd(){let e=this.pos>=this.source.length;return this.examinedLength=Math.max(this.examinedLength,this.pos+1),e}next(){let e=this.source[this.pos++];return this.examinedLength=Math.max(this.examinedLength,this.pos),e}nextCharCode(){let e=this.next();return e&&e.charCodeAt(0)}nextCodePoint(){let e=this.source.slice(this.pos++).codePointAt(0);return e>_z&&(this.pos+=1),this.examinedLength=Math.max(this.examinedLength,this.pos),e}matchString(e,r){let n;if(r){for(n=0;n<e.length;n++){let i=this.next(),s=e[n];if(i==null||i.toUpperCase()!==s.toUpperCase())return!1}return!0}for(n=0;n<e.length;n++)if(this.next()!==e[n])return!1;return!0}sourceSlice(e,r){return this.source.slice(e,r)}interval(e,r){return new No(this.source,e,r||this.pos)}},Vd=class{constructor(e,r,n,i,s,a,u){this.matcher=e,this.input=r,this.startExpr=n,this._cst=i,this._cstOffset=s,this._rightmostFailurePosition=a,this._rightmostFailures=u,this.failed()&&(u1(this,"message",function(){let c="Expected "+this.getExpectedText();return x1(this.input,this.getRightmostFailurePosition())+c}),u1(this,"shortMessage",function(){let c="expected "+this.getExpectedText(),p=Kd(this.input,this.getRightmostFailurePosition());return"Line "+p.lineNum+", col "+p.colNum+": "+c}))}succeeded(){return!!this._cst}failed(){return!this.succeeded()}getRightmostFailurePosition(){return this._rightmostFailurePosition}getRightmostFailures(){if(!this._rightmostFailures){this.matcher.setInput(this.input);let e=this.matcher._match(this.startExpr,{tracing:!1,positionToRecordFailures:this.getRightmostFailurePosition()});this._rightmostFailures=e.getRightmostFailures()}return this._rightmostFailures}toString(){return this.succeeded()?"[match succeeded]":"[match failed at position "+this.getRightmostFailurePosition()+"]"}getExpectedText(){if(this.succeeded())throw new Error("cannot get expected text of a successful MatchResult");let e=new Po,r=this.getRightmostFailures();r=r.filter(n=>!n.isFluffy());for(let n=0;n<r.length;n++)n>0&&(n===r.length-1?e.append(r.length>2?", or ":" or "):e.append(", ")),e.append(r[n].toString());return e.contents()}getInterval(){let e=this.getRightmostFailurePosition();return new No(this.input,e,e)}},d1=class{constructor(){this.applicationMemoKeyStack=[],this.memo={},this.maxExaminedLength=0,this.maxRightmostFailureOffset=-1,this.currentLeftRecursion=void 0}isActive(e){return this.applicationMemoKeyStack.indexOf(e.toMemoKey())>=0}enter(e){this.applicationMemoKeyStack.push(e.toMemoKey())}exit(){this.applicationMemoKeyStack.pop()}startLeftRecursion(e,r){r.isLeftRecursion=!0,r.headApplication=e,r.nextLeftRecursion=this.currentLeftRecursion,this.currentLeftRecursion=r;let{applicationMemoKeyStack:n}=this,i=n.indexOf(e.toMemoKey())+1,s=n.slice(i);r.isInvolved=function(a){return s.indexOf(a)>=0},r.updateInvolvedApplicationMemoKeys=function(){for(let a=i;a<n.length;a++){let u=n[a];this.isInvolved(u)||s.push(u)}}}endLeftRecursion(){this.currentLeftRecursion=this.currentLeftRecursion.nextLeftRecursion}shouldUseMemoizedResult(e){if(!e.isLeftRecursion)return!0;let{applicationMemoKeyStack:r}=this;for(let n=0;n<r.length;n++){let i=r[n];if(e.isInvolved(i))return!1}return!0}memoize(e,r){return this.memo[e]=r,this.maxExaminedLength=Math.max(this.maxExaminedLength,r.examinedLength),this.maxRightmostFailureOffset=Math.max(this.maxRightmostFailureOffset,r.rightmostFailureOffset),r}clearObsoleteEntries(e,r){if(e+this.maxExaminedLength<=r)return;let{memo:n}=this;this.maxExaminedLength=0,this.maxRightmostFailureOffset=-1,Object.keys(n).forEach(i=>{let s=n[i];e+s.examinedLength>r?delete n[i]:(this.maxExaminedLength=Math.max(this.maxExaminedLength,s.examinedLength),this.maxRightmostFailureOffset=Math.max(this.maxRightmostFailureOffset,s.rightmostFailureOffset))})}},bz="\u2717",Sz="\u2713",wz="\u22C5",xz="\u21D2",kz="\u2409",Az="\u240A",Iz="\u240D",m1={succeeded:1,isRootNode:2,isImplicitSpaces:4,isMemoized:8,isHeadOfLeftRecursion:16,terminatesLR:32};function Tz(t){return Jd(" ",t).join("")}function Ez(t,e,r){let n=HN(t.slice(e,e+r));return n.length<r?n+Jd(" ",r-n.length).join(""):n}function HN(t){return typeof t=="string"?t.replace(/ /g,wz).replace(/\t/g,kz).replace(/\n/g,Az).replace(/\r/g,Iz):String(t)}var ec=class t{constructor(e,r,n,i,s,a,u){this.input=e,this.pos=this.pos1=r,this.pos2=n,this.source=new No(e,r,n),this.expr=i,this.bindings=a,this.children=u||[],this.terminatingLREntry=null,this._flags=s?m1.succeeded:0}get displayString(){return this.expr.toDisplayString()}clone(){return this.cloneWithExpr(this.expr)}cloneWithExpr(e){let r=new t(this.input,this.pos,this.pos2,e,this.succeeded,this.bindings,this.children);return r.isHeadOfLeftRecursion=this.isHeadOfLeftRecursion,r.isImplicitSpaces=this.isImplicitSpaces,r.isMemoized=this.isMemoized,r.isRootNode=this.isRootNode,r.terminatesLR=this.terminatesLR,r.terminatingLREntry=this.terminatingLREntry,r}recordLRTermination(e,r){this.terminatingLREntry=new t(this.input,this.pos,this.pos2,this.expr,!1,[r],[e]),this.terminatingLREntry.terminatesLR=!0}walk(e,r){let n=e;typeof n=="function"&&(n={enter:n});function i(s,a,u){let c=!0;n.enter&&n.enter.call(r,s,a,u)===t.prototype.SKIP&&(c=!1),c&&(s.children.forEach(p=>{i(p,s,u+1)}),n.exit&&n.exit.call(r,s,a,u))}this.isRootNode?this.children.forEach(s=>{i(s,null,0)}):i(this,null,0)}toString(){let e=new Po;return this.walk((r,n,i)=>{if(!r)return this.SKIP;if(r.expr.constructor.name!=="Alt"){if(e.append(Ez(r.input,r.pos,10)+Tz(i*2+1)),e.append((r.succeeded?Sz:bz)+" "+r.displayString),r.isHeadOfLeftRecursion&&e.append(" (LR)"),r.succeeded){let a=HN(r.source.contents);e.append(" "+xz+" "),e.append(typeof a=="string"?'"'+a+'"':a)}e.append(`
33
+ `)}}),e.contents()}};ec.prototype.SKIP={};Object.keys(m1).forEach(t=>{let e=m1[t];Object.defineProperty(ec.prototype,t,{get(){return(this._flags&e)!==0},set(r){r?this._flags|=e:this._flags&=~e}})});Ve.prototype.allowsSkippingPrecedingSpace=ln("allowsSkippingPrecedingSpace");zr.allowsSkippingPrecedingSpace=Jr.allowsSkippingPrecedingSpace=ot.prototype.allowsSkippingPrecedingSpace=ur.prototype.allowsSkippingPrecedingSpace=vr.prototype.allowsSkippingPrecedingSpace=or.prototype.allowsSkippingPrecedingSpace=function(){return!0};Gt.prototype.allowsSkippingPrecedingSpace=Tr.prototype.allowsSkippingPrecedingSpace=Hr.prototype.allowsSkippingPrecedingSpace=Er.prototype.allowsSkippingPrecedingSpace=ar.prototype.allowsSkippingPrecedingSpace=br.prototype.allowsSkippingPrecedingSpace=Qt.prototype.allowsSkippingPrecedingSpace=function(){return!1};var tf;jN(t=>{tf=t});var Ud;Ve.prototype.assertAllApplicationsAreValid=function(t,e){Ud=0,this._assertAllApplicationsAreValid(t,e)};Ve.prototype._assertAllApplicationsAreValid=ln("_assertAllApplicationsAreValid");zr._assertAllApplicationsAreValid=Jr._assertAllApplicationsAreValid=ur.prototype._assertAllApplicationsAreValid=vr.prototype._assertAllApplicationsAreValid=br.prototype._assertAllApplicationsAreValid=or.prototype._assertAllApplicationsAreValid=function(t,e){};Hr.prototype._assertAllApplicationsAreValid=function(t,e){Ud++,this.expr._assertAllApplicationsAreValid(t,e),Ud--};Gt.prototype._assertAllApplicationsAreValid=function(t,e){for(let r=0;r<this.terms.length;r++)this.terms[r]._assertAllApplicationsAreValid(t,e)};Qt.prototype._assertAllApplicationsAreValid=function(t,e){for(let r=0;r<this.factors.length;r++)this.factors[r]._assertAllApplicationsAreValid(t,e)};Tr.prototype._assertAllApplicationsAreValid=ar.prototype._assertAllApplicationsAreValid=Er.prototype._assertAllApplicationsAreValid=function(t,e){this.expr._assertAllApplicationsAreValid(t,e)};ot.prototype._assertAllApplicationsAreValid=function(t,e,r=!1){let n=e.rules[this.ruleName],i=Oo(t)&&Ud===0;if(!n)throw VN(this.ruleName,e.name,this.source);if(!r&&Oo(this.ruleName)&&!i)throw lz(this.ruleName,this);let s=this.args.length,a=n.formals.length;if(s!==a)throw oz(this.ruleName,a,s,this.source);let u=tf&&n===tf.rules.applySyntactic;if(tf&&n===tf.rules.caseInsensitive&&!(this.args[0]instanceof ur))throw AN('a Terminal (e.g. "abc")',this.args[0]);if(u){let p=this.args[0];if(!(p instanceof ot))throw AN("a syntactic rule application",p);if(!Oo(p.ruleName))throw fz(p);if(i)throw pz(this)}this.args.forEach(p=>{if(p._assertAllApplicationsAreValid(t,e,u),p.getArity()!==1)throw uz(this.ruleName,p)})};Ve.prototype.assertChoicesHaveUniformArity=ln("assertChoicesHaveUniformArity");zr.assertChoicesHaveUniformArity=Jr.assertChoicesHaveUniformArity=ur.prototype.assertChoicesHaveUniformArity=vr.prototype.assertChoicesHaveUniformArity=br.prototype.assertChoicesHaveUniformArity=Hr.prototype.assertChoicesHaveUniformArity=or.prototype.assertChoicesHaveUniformArity=function(t){};Gt.prototype.assertChoicesHaveUniformArity=function(t){if(this.terms.length===0)return;let e=this.terms[0].getArity();for(let r=0;r<this.terms.length;r++){let n=this.terms[r];n.assertChoicesHaveUniformArity();let i=n.getArity();if(e!==i)throw GN(t,e,i,n)}};Yu.prototype.assertChoicesHaveUniformArity=function(t){let e=this.terms[0].getArity(),r=this.terms[1].getArity();if(e!==r)throw GN(t,r,e,this.terms[0])};Qt.prototype.assertChoicesHaveUniformArity=function(t){for(let e=0;e<this.factors.length;e++)this.factors[e].assertChoicesHaveUniformArity(t)};Tr.prototype.assertChoicesHaveUniformArity=function(t){this.expr.assertChoicesHaveUniformArity(t)};ar.prototype.assertChoicesHaveUniformArity=function(t){};Er.prototype.assertChoicesHaveUniformArity=function(t){this.expr.assertChoicesHaveUniformArity(t)};ot.prototype.assertChoicesHaveUniformArity=function(t){};Ve.prototype.assertIteratedExprsAreNotNullable=ln("assertIteratedExprsAreNotNullable");zr.assertIteratedExprsAreNotNullable=Jr.assertIteratedExprsAreNotNullable=ur.prototype.assertIteratedExprsAreNotNullable=vr.prototype.assertIteratedExprsAreNotNullable=br.prototype.assertIteratedExprsAreNotNullable=or.prototype.assertIteratedExprsAreNotNullable=function(t){};Gt.prototype.assertIteratedExprsAreNotNullable=function(t){for(let e=0;e<this.terms.length;e++)this.terms[e].assertIteratedExprsAreNotNullable(t)};Qt.prototype.assertIteratedExprsAreNotNullable=function(t){for(let e=0;e<this.factors.length;e++)this.factors[e].assertIteratedExprsAreNotNullable(t)};Tr.prototype.assertIteratedExprsAreNotNullable=function(t){if(this.expr.assertIteratedExprsAreNotNullable(t),this.expr.isNullable(t))throw WN(this,[])};Fi.prototype.assertIteratedExprsAreNotNullable=ar.prototype.assertIteratedExprsAreNotNullable=Er.prototype.assertIteratedExprsAreNotNullable=Hr.prototype.assertIteratedExprsAreNotNullable=function(t){this.expr.assertIteratedExprsAreNotNullable(t)};ot.prototype.assertIteratedExprsAreNotNullable=function(t){this.args.forEach(e=>{e.assertIteratedExprsAreNotNullable(t)})};var nf=class{constructor(e){this.matchLength=e}get ctorName(){throw new Error("subclass responsibility")}numChildren(){return this.children?this.children.length:0}childAt(e){if(this.children)return this.children[e]}indexOfChild(e){return this.children.indexOf(e)}hasChildren(){return this.numChildren()>0}hasNoChildren(){return!this.hasChildren()}onlyChild(){if(this.numChildren()!==1)throw new Error("cannot get only child of a node of type "+this.ctorName+" (it has "+this.numChildren()+" children)");return this.firstChild()}firstChild(){if(this.hasNoChildren())throw new Error("cannot get first child of a "+this.ctorName+" node, which has no children");return this.childAt(0)}lastChild(){if(this.hasNoChildren())throw new Error("cannot get last child of a "+this.ctorName+" node, which has no children");return this.childAt(this.numChildren()-1)}childBefore(e){let r=this.indexOfChild(e);if(r<0)throw new Error("Node.childBefore() called w/ an argument that is not a child");if(r===0)throw new Error("cannot get child before first child");return this.childAt(r-1)}childAfter(e){let r=this.indexOfChild(e);if(r<0)throw new Error("Node.childAfter() called w/ an argument that is not a child");if(r===this.numChildren()-1)throw new Error("cannot get child after last child");return this.childAt(r+1)}isTerminal(){return!1}isNonterminal(){return!1}isIteration(){return!1}isOptional(){return!1}},Ds=class extends nf{get ctorName(){return"_terminal"}isTerminal(){return!0}get primitiveValue(){throw new Error("The `primitiveValue` property was removed in Ohm v17.")}},g1=class extends nf{constructor(e,r,n,i){super(i),this.ruleName=e,this.children=r,this.childOffsets=n}get ctorName(){return this.ruleName}isNonterminal(){return!0}isLexical(){return RN(this.ctorName)}isSyntactic(){return Oo(this.ctorName)}},Wd=class extends nf{constructor(e,r,n,i){super(n),this.children=e,this.childOffsets=r,this.optional=i}get ctorName(){return"_iter"}isIteration(){return!0}isOptional(){return this.optional}};Ve.prototype.eval=ln("eval");zr.eval=function(t){let{inputStream:e}=t,r=e.pos,n=e.nextCodePoint();return n!==void 0?(t.pushBinding(new Ds(String.fromCodePoint(n).length),r),!0):(t.processFailure(r,this),!1)};Jr.eval=function(t){let{inputStream:e}=t,r=e.pos;return e.atEnd()?(t.pushBinding(new Ds(0),r),!0):(t.processFailure(r,this),!1)};ur.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;return e.matchString(this.obj)?(t.pushBinding(new Ds(this.obj.length),r),!0):(t.processFailure(r,this),!1)};vr.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,n=this.matchCodePoint?e.nextCodePoint():e.nextCharCode();return n!==void 0&&this.from.codePointAt(0)<=n&&n<=this.to.codePointAt(0)?(t.pushBinding(new Ds(String.fromCodePoint(n).length),r),!0):(t.processFailure(r,this),!1)};br.prototype.eval=function(t){return t.eval(t.currentApplication().args[this.index])};Hr.prototype.eval=function(t){t.enterLexifiedContext();let e=t.eval(this.expr);return t.exitLexifiedContext(),e};Gt.prototype.eval=function(t){for(let e=0;e<this.terms.length;e++)if(t.eval(this.terms[e]))return!0;return!1};Qt.prototype.eval=function(t){for(let e=0;e<this.factors.length;e++){let r=this.factors[e];if(!t.eval(r))return!1}return!0};Tr.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,n=this.getArity(),i=[],s=[];for(;i.length<n;)i.push([]),s.push([]);let a=0,u=r,c;for(;a<this.maxNumMatches&&t.eval(this.expr);){if(e.pos===u)throw WN(this,t._applicationStack);u=e.pos,a++;let h=t._bindings.splice(t._bindings.length-n,n),y=t._bindingOffsets.splice(t._bindingOffsets.length-n,n);for(c=0;c<h.length;c++)i[c].push(h[c]),s[c].push(y[c])}if(a<this.minNumMatches)return!1;let p=t.posToOffset(r),d=0;if(a>0){let h=i[n-1],y=s[n-1],w=y[y.length-1]+h[h.length-1].matchLength;p=s[0][0],d=w-p}let m=this instanceof Fi;for(c=0;c<i.length;c++)t._bindings.push(new Wd(i[c],s[c],d,m)),t._bindingOffsets.push(p);return!0};ar.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;t.pushFailuresInfo();let n=t.eval(this.expr);return t.popFailuresInfo(),n?(t.processFailure(r,this),!1):(e.pos=r,!0)};Er.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;return t.eval(this.expr)?(e.pos=r,!0):!1};ot.prototype.eval=function(t){let e=t.currentApplication(),r=e?e.args:[],n=this.substituteParams(r),i=t.getCurrentPosInfo();if(i.isActive(n))return n.handleCycle(t);let s=n.toMemoKey(),a=i.memo[s];if(a&&i.shouldUseMemoizedResult(a)){if(t.hasNecessaryInfo(a))return t.useMemoizedResult(t.inputStream.pos,a);delete i.memo[s]}return n.reallyEval(t)};ot.prototype.handleCycle=function(t){let e=t.getCurrentPosInfo(),{currentLeftRecursion:r}=e,n=this.toMemoKey(),i=e.memo[n];return r&&r.headApplication.toMemoKey()===n?i.updateInvolvedApplicationMemoKeys():i||(i=e.memoize(n,{matchLength:0,examinedLength:0,value:!1,rightmostFailureOffset:-1}),e.startLeftRecursion(this,i)),t.useMemoizedResult(t.inputStream.pos,i)};ot.prototype.reallyEval=function(t){let{inputStream:e}=t,r=e.pos,n=t.getCurrentPosInfo(),i=t.grammar.rules[this.ruleName],{body:s}=i,{description:a}=i;t.enterApplication(n,this),a&&t.pushFailuresInfo();let u=e.examinedLength;e.examinedLength=0;let c=this.evalOnce(s,t),p=n.currentLeftRecursion,d=this.toMemoKey(),m=p&&p.headApplication.toMemoKey()===d,h;t.doNotMemoize?t.doNotMemoize=!1:m?(c=this.growSeedResult(s,t,r,p,c),n.endLeftRecursion(),h=p,h.examinedLength=e.examinedLength-r,h.rightmostFailureOffset=t._getRightmostFailureOffset(),n.memoize(d,h)):(!p||!p.isInvolved(d))&&(h=n.memoize(d,{matchLength:e.pos-r,examinedLength:e.examinedLength-r,value:c,failuresAtRightmostPosition:t.cloneRecordedFailures(),rightmostFailureOffset:t._getRightmostFailureOffset()}));let y=!!c;if(a&&(t.popFailuresInfo(),y||t.processFailure(r,this),h&&(h.failuresAtRightmostPosition=t.cloneRecordedFailures(),h.rightmostFailureOffset=t._getRightmostFailureOffset())),t.isTracing()&&h){let w=t.getTraceEntry(r,this,y,y?[c]:[]);m&&(cn(w.terminatingLREntry!=null||!y),w.isHeadOfLeftRecursion=!0),h.traceEntry=w}return e.examinedLength=Math.max(e.examinedLength,u),t.exitApplication(n,c),y};ot.prototype.evalOnce=function(t,e){let{inputStream:r}=e,n=r.pos;if(e.eval(t)){let i=t.getArity(),s=e._bindings.splice(e._bindings.length-i,i),a=e._bindingOffsets.splice(e._bindingOffsets.length-i,i),u=r.pos-n;return new g1(this.ruleName,s,a,u)}else return!1};ot.prototype.growSeedResult=function(t,e,r,n,i){if(!i)return!1;let{inputStream:s}=e;for(;;){if(n.matchLength=s.pos-r,n.value=i,n.failuresAtRightmostPosition=e.cloneRecordedFailures(),e.isTracing()){let a=e.trace[e.trace.length-1];n.traceEntry=new ec(e.input,r,s.pos,this,!0,[i],[a.clone()])}if(s.pos=r,i=this.evalOnce(t,e),s.pos-r<=n.matchLength)break;e.isTracing()&&e.trace.splice(-2,1)}return e.isTracing()&&n.traceEntry.recordLRTermination(e.trace.pop(),i),s.pos=r+n.matchLength,n.value};or.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,n=e.nextCodePoint();if(n!==void 0&&n<=vz){let i=String.fromCodePoint(n);if(this.pattern.test(i))return t.pushBinding(new Ds(i.length),r),!0}return t.processFailure(r,this),!1};Ve.prototype.getArity=ln("getArity");zr.getArity=Jr.getArity=ur.prototype.getArity=vr.prototype.getArity=br.prototype.getArity=ot.prototype.getArity=or.prototype.getArity=function(){return 1};Gt.prototype.getArity=function(){return this.terms.length===0?0:this.terms[0].getArity()};Qt.prototype.getArity=function(){let t=0;for(let e=0;e<this.factors.length;e++)t+=this.factors[e].getArity();return t};Tr.prototype.getArity=function(){return this.expr.getArity()};ar.prototype.getArity=function(){return 0};Er.prototype.getArity=Hr.prototype.getArity=function(){return this.expr.getArity()};function ji(t,e){let r={};if(t.source&&e){let n=t.source.relativeTo(e);r.sourceInterval=[n.startIdx,n.endIdx]}return r}Ve.prototype.outputRecipe=ln("outputRecipe");zr.outputRecipe=function(t,e){return["any",ji(this,e)]};Jr.outputRecipe=function(t,e){return["end",ji(this,e)]};ur.prototype.outputRecipe=function(t,e){return["terminal",ji(this,e),this.obj]};vr.prototype.outputRecipe=function(t,e){return["range",ji(this,e),this.from,this.to]};br.prototype.outputRecipe=function(t,e){return["param",ji(this,e),this.index]};Gt.prototype.outputRecipe=function(t,e){return["alt",ji(this,e)].concat(this.terms.map(r=>r.outputRecipe(t,e)))};Yu.prototype.outputRecipe=function(t,e){return this.terms[0].outputRecipe(t,e)};Xu.prototype.outputRecipe=function(t,e){let r=this.terms.slice(0,this.expansionPos),n=this.terms.slice(this.expansionPos+1);return["splice",ji(this,e),r.map(i=>i.outputRecipe(t,e)),n.map(i=>i.outputRecipe(t,e))]};Qt.prototype.outputRecipe=function(t,e){return["seq",ji(this,e)].concat(this.factors.map(r=>r.outputRecipe(t,e)))};Ms.prototype.outputRecipe=Aa.prototype.outputRecipe=Fi.prototype.outputRecipe=ar.prototype.outputRecipe=Er.prototype.outputRecipe=Hr.prototype.outputRecipe=function(t,e){return[this.constructor.name.toLowerCase(),ji(this,e),this.expr.outputRecipe(t,e)]};ot.prototype.outputRecipe=function(t,e){return["app",ji(this,e),this.ruleName,this.args.map(r=>r.outputRecipe(t,e))]};or.prototype.outputRecipe=function(t,e){return["unicodeChar",ji(this,e),this.categoryOrProp]};Ve.prototype.introduceParams=ln("introduceParams");zr.introduceParams=Jr.introduceParams=ur.prototype.introduceParams=vr.prototype.introduceParams=br.prototype.introduceParams=or.prototype.introduceParams=function(t){return this};Gt.prototype.introduceParams=function(t){return this.terms.forEach((e,r,n)=>{n[r]=e.introduceParams(t)}),this};Qt.prototype.introduceParams=function(t){return this.factors.forEach((e,r,n)=>{n[r]=e.introduceParams(t)}),this};Tr.prototype.introduceParams=ar.prototype.introduceParams=Er.prototype.introduceParams=Hr.prototype.introduceParams=function(t){return this.expr=this.expr.introduceParams(t),this};ot.prototype.introduceParams=function(t){let e=t.indexOf(this.ruleName);if(e>=0){if(this.args.length>0)throw new Error("Parameterized rules cannot be passed as arguments to another rule.");return new br(e).withSource(this.source)}else return this.args.forEach((r,n,i)=>{i[n]=r.introduceParams(t)}),this};Ve.prototype.isNullable=function(t){return this._isNullable(t,Object.create(null))};Ve.prototype._isNullable=ln("_isNullable");zr._isNullable=vr.prototype._isNullable=br.prototype._isNullable=Aa.prototype._isNullable=or.prototype._isNullable=function(t,e){return!1};Jr._isNullable=function(t,e){return!0};ur.prototype._isNullable=function(t,e){return typeof this.obj=="string"?this.obj==="":!1};Gt.prototype._isNullable=function(t,e){return this.terms.length===0||this.terms.some(r=>r._isNullable(t,e))};Qt.prototype._isNullable=function(t,e){return this.factors.every(r=>r._isNullable(t,e))};Ms.prototype._isNullable=Fi.prototype._isNullable=ar.prototype._isNullable=Er.prototype._isNullable=function(t,e){return!0};Hr.prototype._isNullable=function(t,e){return this.expr._isNullable(t,e)};ot.prototype._isNullable=function(t,e){let r=this.toMemoKey();if(!Object.prototype.hasOwnProperty.call(e,r)){let{body:n}=t.rules[this.ruleName],i=n.substituteParams(this.args);e[r]=!1,e[r]=i._isNullable(t,e)}return e[r]};Ve.prototype.substituteParams=ln("substituteParams");zr.substituteParams=Jr.substituteParams=ur.prototype.substituteParams=vr.prototype.substituteParams=or.prototype.substituteParams=function(t){return this};br.prototype.substituteParams=function(t){return FN(t[this.index])};Gt.prototype.substituteParams=function(t){return new Gt(this.terms.map(e=>e.substituteParams(t)))};Qt.prototype.substituteParams=function(t){return new Qt(this.factors.map(e=>e.substituteParams(t)))};Tr.prototype.substituteParams=ar.prototype.substituteParams=Er.prototype.substituteParams=Hr.prototype.substituteParams=function(t){return new this.constructor(this.expr.substituteParams(t))};ot.prototype.substituteParams=function(t){if(this.args.length===0)return this;{let e=this.args.map(r=>r.substituteParams(t));return new ot(this.ruleName,e)}};function IN(t){return/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)}function k1(t){let e=Object.create(null);t.forEach(r=>{e[r]=(e[r]||0)+1}),Object.keys(e).forEach(r=>{if(e[r]<=1)return;let n=1;t.forEach((i,s)=>{i===r&&(t[s]=i+"_"+n++)})})}Ve.prototype.toArgumentNameList=ln("toArgumentNameList");zr.toArgumentNameList=function(t,e){return["any"]};Jr.toArgumentNameList=function(t,e){return["end"]};ur.prototype.toArgumentNameList=function(t,e){return typeof this.obj=="string"&&/^[_a-zA-Z0-9]+$/.test(this.obj)?["_"+this.obj]:["$"+t]};vr.prototype.toArgumentNameList=function(t,e){let r=this.from+"_to_"+this.to;return IN(r)||(r="_"+r),IN(r)||(r="$"+t),[r]};Gt.prototype.toArgumentNameList=function(t,e){let r=this.terms.map(s=>s.toArgumentNameList(t,!0)),n=[],i=r[0].length;for(let s=0;s<i;s++){let a=[];for(let c=0;c<this.terms.length;c++)a.push(r[c][s]);let u=qN(a);n.push(u.join("_or_"))}return e||k1(n),n};Qt.prototype.toArgumentNameList=function(t,e){let r=[];return this.factors.forEach(n=>{let i=n.toArgumentNameList(t,!0);r=r.concat(i),t+=i.length}),e||k1(r),r};Tr.prototype.toArgumentNameList=function(t,e){let r=this.expr.toArgumentNameList(t,e).map(n=>n[n.length-1]==="s"?n+"es":n+"s");return e||k1(r),r};Fi.prototype.toArgumentNameList=function(t,e){return this.expr.toArgumentNameList(t,e).map(r=>"opt"+r[0].toUpperCase()+r.slice(1))};ar.prototype.toArgumentNameList=function(t,e){return[]};Er.prototype.toArgumentNameList=Hr.prototype.toArgumentNameList=function(t,e){return this.expr.toArgumentNameList(t,e)};ot.prototype.toArgumentNameList=function(t,e){return[this.ruleName]};or.prototype.toArgumentNameList=function(t,e){return["$"+t]};br.prototype.toArgumentNameList=function(t,e){return["param"+this.index]};Ve.prototype.toDisplayString=ln("toDisplayString");Gt.prototype.toDisplayString=Qt.prototype.toDisplayString=function(){return this.source?this.source.trimmed().contents:"["+this.constructor.name+"]"};zr.toDisplayString=Jr.toDisplayString=Tr.prototype.toDisplayString=ar.prototype.toDisplayString=Er.prototype.toDisplayString=Hr.prototype.toDisplayString=ur.prototype.toDisplayString=vr.prototype.toDisplayString=br.prototype.toDisplayString=function(){return this.toString()};ot.prototype.toDisplayString=function(){if(this.args.length>0){let t=this.args.map(e=>e.toDisplayString());return this.ruleName+"<"+t.join(",")+">"}else return this.ruleName};or.prototype.toDisplayString=function(){return"Unicode ["+this.categoryOrProp+"] character"};function Oz(t){return t==="description"||t==="string"||t==="code"}var In=class t{constructor(e,r,n){if(!Oz(n))throw new Error("invalid Failure type: "+n);this.pexpr=e,this.text=r,this.type=n,this.fluffy=!1}getPExpr(){return this.pexpr}getText(){return this.text}getType(){return this.type}isDescription(){return this.type==="description"}isStringTerminal(){return this.type==="string"}isCode(){return this.type==="code"}isFluffy(){return this.fluffy}makeFluffy(){this.fluffy=!0}clearFluffy(){this.fluffy=!1}subsumes(e){return this.getText()===e.getText()&&this.type===e.type&&(!this.isFluffy()||this.isFluffy()&&e.isFluffy())}toString(){return this.type==="string"?JSON.stringify(this.getText()):this.getText()}clone(){let e=new t(this.pexpr,this.text,this.type);return this.isFluffy()&&e.makeFluffy(),e}toKey(){return this.toString()+"#"+this.type}};Ve.prototype.toFailure=ln("toFailure");zr.toFailure=function(t){return new In(this,"any object","description")};Jr.toFailure=function(t){return new In(this,"end of input","description")};ur.prototype.toFailure=function(t){return new In(this,this.obj,"string")};vr.prototype.toFailure=function(t){return new In(this,JSON.stringify(this.from)+".."+JSON.stringify(this.to),"code")};ar.prototype.toFailure=function(t){let e=this.expr===zr?"nothing":"not "+this.expr.toFailure(t);return new In(this,e,"description")};Er.prototype.toFailure=function(t){return this.expr.toFailure(t)};ot.prototype.toFailure=function(t){let{description:e}=t.rules[this.ruleName];return e||(e=(/^[aeiouAEIOU]/.test(this.ruleName)?"an":"a")+" "+this.ruleName),new In(this,e,"description")};or.prototype.toFailure=function(t){return new In(this,"a Unicode ["+this.categoryOrProp+"] character","description")};Gt.prototype.toFailure=function(t){let r="("+this.terms.map(n=>n.toFailure(t)).join(" or ")+")";return new In(this,r,"description")};Qt.prototype.toFailure=function(t){let r="("+this.factors.map(n=>n.toFailure(t)).join(" ")+")";return new In(this,r,"description")};Tr.prototype.toFailure=function(t){let e="("+this.expr.toFailure(t)+this.operator+")";return new In(this,e,"description")};Ve.prototype.toString=ln("toString");zr.toString=function(){return"any"};Jr.toString=function(){return"end"};ur.prototype.toString=function(){return JSON.stringify(this.obj)};vr.prototype.toString=function(){return JSON.stringify(this.from)+".."+JSON.stringify(this.to)};br.prototype.toString=function(){return"$"+this.index};Hr.prototype.toString=function(){return"#("+this.expr.toString()+")"};Gt.prototype.toString=function(){return this.terms.length===1?this.terms[0].toString():"("+this.terms.map(t=>t.toString()).join(" | ")+")"};Qt.prototype.toString=function(){return this.factors.length===1?this.factors[0].toString():"("+this.factors.map(t=>t.toString()).join(" ")+")"};Tr.prototype.toString=function(){return this.expr+this.operator};ar.prototype.toString=function(){return"~"+this.expr};Er.prototype.toString=function(){return"&"+this.expr};ot.prototype.toString=function(){if(this.args.length>0){let t=this.args.map(e=>e.toString());return this.ruleName+"<"+t.join(",")+">"}else return this.ruleName};or.prototype.toString=function(){return"\\p{"+this.categoryOrProp+"}"};var y1=class t extends Ve{constructor(e){super(),this.obj=e}_getString(e){let r=e.currentApplication().args[this.obj.index];return cn(r instanceof ur,"expected a Terminal expression"),r.obj}allowsSkippingPrecedingSpace(){return!0}eval(e){let{inputStream:r}=e,n=r.pos,i=this._getString(e);return r.matchString(i,!0)?(e.pushBinding(new Ds(i.length),n),!0):(e.processFailure(n,this),!1)}getArity(){return 1}substituteParams(e){return new t(this.obj.substituteParams(e))}toDisplayString(){return this.obj.toDisplayString()+" (case-insensitive)"}toFailure(e){return new In(this,this.obj.toFailure(e)+" (case-insensitive)","description")}_isNullable(e,r){return this.obj._isNullable(e,r)}},zN;jN(t=>{zN=t.rules.applySyntactic.body});var a1=new ot("spaces"),_1=class{constructor(e,r,n){this.matcher=e,this.startExpr=r,this.grammar=e.grammar,this.input=e.getInput(),this.inputStream=new Zu(this.input),this.memoTable=e._memoTable,this.userData=void 0,this.doNotMemoize=!1,this._bindings=[],this._bindingOffsets=[],this._applicationStack=[],this._posStack=[0],this.inLexifiedContextStack=[!1],this.rightmostFailurePosition=-1,this._rightmostFailurePositionStack=[],this._recordedFailuresStack=[],n!==void 0&&(this.positionToRecordFailures=n,this.recordedFailures=Object.create(null))}posToOffset(e){return e-this._posStack[this._posStack.length-1]}enterApplication(e,r){this._posStack.push(this.inputStream.pos),this._applicationStack.push(r),this.inLexifiedContextStack.push(!1),e.enter(r),this._rightmostFailurePositionStack.push(this.rightmostFailurePosition),this.rightmostFailurePosition=-1}exitApplication(e,r){let n=this._posStack.pop();this._applicationStack.pop(),this.inLexifiedContextStack.pop(),e.exit(),this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,this._rightmostFailurePositionStack.pop()),r&&this.pushBinding(r,n)}enterLexifiedContext(){this.inLexifiedContextStack.push(!0)}exitLexifiedContext(){this.inLexifiedContextStack.pop()}currentApplication(){return this._applicationStack[this._applicationStack.length-1]}inSyntacticContext(){let e=this.currentApplication();return e?e.isSyntactic()&&!this.inLexifiedContext():this.startExpr.factors[0].isSyntactic()}inLexifiedContext(){return this.inLexifiedContextStack[this.inLexifiedContextStack.length-1]}skipSpaces(){return this.pushFailuresInfo(),this.eval(a1),this.popBinding(),this.popFailuresInfo(),this.inputStream.pos}skipSpacesIfInSyntacticContext(){return this.inSyntacticContext()?this.skipSpaces():this.inputStream.pos}maybeSkipSpacesBefore(e){return e.allowsSkippingPrecedingSpace()&&e!==a1?this.skipSpacesIfInSyntacticContext():this.inputStream.pos}pushBinding(e,r){this._bindings.push(e),this._bindingOffsets.push(this.posToOffset(r))}popBinding(){this._bindings.pop(),this._bindingOffsets.pop()}numBindings(){return this._bindings.length}truncateBindings(e){for(;this._bindings.length>e;)this.popBinding()}getCurrentPosInfo(){return this.getPosInfo(this.inputStream.pos)}getPosInfo(e){let r=this.memoTable[e];return r||(r=this.memoTable[e]=new d1),r}processFailure(e,r){if(this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,e),this.recordedFailures&&e===this.positionToRecordFailures){let n=this.currentApplication();n&&(r=r.substituteParams(n.args)),this.recordFailure(r.toFailure(this.grammar),!1)}}recordFailure(e,r){let n=e.toKey();this.recordedFailures[n]?this.recordedFailures[n].isFluffy()&&!e.isFluffy()&&this.recordedFailures[n].clearFluffy():this.recordedFailures[n]=r?e.clone():e}recordFailures(e,r){Object.keys(e).forEach(n=>{this.recordFailure(e[n],r)})}cloneRecordedFailures(){if(!this.recordedFailures)return;let e=Object.create(null);return Object.keys(this.recordedFailures).forEach(r=>{e[r]=this.recordedFailures[r].clone()}),e}getRightmostFailurePosition(){return this.rightmostFailurePosition}_getRightmostFailureOffset(){return this.rightmostFailurePosition>=0?this.posToOffset(this.rightmostFailurePosition):-1}getMemoizedTraceEntry(e,r){let n=this.memoTable[e];if(n&&r instanceof ot){let i=n.memo[r.toMemoKey()];if(i&&i.traceEntry){let s=i.traceEntry.cloneWithExpr(r);return s.isMemoized=!0,s}}return null}getTraceEntry(e,r,n,i){if(r instanceof ot){let s=this.currentApplication(),a=s?s.args:[];r=r.substituteParams(a)}return this.getMemoizedTraceEntry(e,r)||new ec(this.input,e,this.inputStream.pos,r,n,i,this.trace)}isTracing(){return!!this.trace}hasNecessaryInfo(e){return this.trace&&!e.traceEntry?!1:this.recordedFailures&&this.inputStream.pos+e.rightmostFailureOffset===this.positionToRecordFailures?!!e.failuresAtRightmostPosition:!0}useMemoizedResult(e,r){this.trace&&this.trace.push(r.traceEntry);let n=this.inputStream.pos+r.rightmostFailureOffset;return this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,n),this.recordedFailures&&this.positionToRecordFailures===n&&r.failuresAtRightmostPosition&&this.recordFailures(r.failuresAtRightmostPosition,!0),this.inputStream.examinedLength=Math.max(this.inputStream.examinedLength,r.examinedLength+e),r.value?(this.inputStream.pos+=r.matchLength,this.pushBinding(r.value,e),!0):!1}eval(e){let{inputStream:r}=this,n=this._bindings.length,i=this.userData,s;this.recordedFailures&&(s=this.recordedFailures,this.recordedFailures=Object.create(null));let a=r.pos,u=this.maybeSkipSpacesBefore(e),c;this.trace&&(c=this.trace,this.trace=[]);let p=e.eval(this);if(this.trace){let d=this._bindings.slice(n),m=this.getTraceEntry(u,e,p,d);m.isImplicitSpaces=e===a1,m.isRootNode=e===this.startExpr,c.push(m),this.trace=c}return p?this.recordedFailures&&r.pos===this.positionToRecordFailures&&Object.keys(this.recordedFailures).forEach(d=>{this.recordedFailures[d].makeFluffy()}):(r.pos=a,this.truncateBindings(n),this.userData=i),this.recordedFailures&&this.recordFailures(s,!1),e===zN&&this.skipSpaces(),p}getMatchResult(){this.grammar._setUpMatchState(this),this.eval(this.startExpr);let e;this.recordedFailures&&(e=Object.keys(this.recordedFailures).map(n=>this.recordedFailures[n]));let r=this._bindings[0];return r&&(r.grammar=this.grammar),new Vd(this.matcher,this.input,this.startExpr,r,this._bindingOffsets[0],this.rightmostFailurePosition,e)}getTrace(){this.trace=[];let e=this.getMatchResult(),r=this.trace[this.trace.length-1];return r.result=e,r}pushFailuresInfo(){this._rightmostFailurePositionStack.push(this.rightmostFailurePosition),this._recordedFailuresStack.push(this.recordedFailures)}popFailuresInfo(){this.rightmostFailurePosition=this._rightmostFailurePositionStack.pop(),this.recordedFailures=this._recordedFailuresStack.pop()}},v1=class{constructor(e){this.grammar=e,this._memoTable=[],this._input="",this._isMemoTableStale=!1}_resetMemoTable(){this._memoTable=[],this._isMemoTableStale=!1}getInput(){return this._input}setInput(e){return this._input!==e&&this.replaceInputRange(0,this._input.length,e),this}replaceInputRange(e,r,n){let i=this._input,s=this._memoTable;if(e<0||e>i.length||r<0||r>i.length||e>r)throw new Error("Invalid indices: "+e+" and "+r);this._input=i.slice(0,e)+n+i.slice(r),this._input!==i&&s.length>0&&(this._isMemoTableStale=!0);let a=s.slice(r);s.length=e;for(let u=0;u<n.length;u++)s.push(void 0);for(let u of a)s.push(u);for(let u=0;u<e;u++){let c=s[u];c&&c.clearObsoleteEntries(u,e)}return this}match(e,r={incremental:!0}){return this._match(this._getStartExpr(e),{incremental:r.incremental,tracing:!1})}trace(e,r={incremental:!0}){return this._match(this._getStartExpr(e),{incremental:r.incremental,tracing:!0})}_match(e,r={}){let n={tracing:!1,incremental:!0,positionToRecordFailures:void 0,...r};if(!n.incremental)this._resetMemoTable();else if(this._isMemoTableStale&&!this.grammar.supportsIncrementalParsing)throw iz(this.grammar);let i=new _1(this,e,n.positionToRecordFailures);return n.tracing?i.getTrace():i.getMatchResult()}_getStartExpr(e){let r=e||this.grammar.defaultStartRule;if(!r)throw new Error("Missing start rule argument -- the grammar has no default start rule.");let n=this.grammar.parseApplication(r);return new Qt([n,Jr])}},rf=[],b1=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Gd=class{constructor(e,r,n){this._node=e,this.source=r,this._baseInterval=n,e.isNonterminal()&&cn(r===n),this._childWrappers=[]}_forgetMemoizedResultFor(e){delete this._node[this._semantics.attributeKeys[e]],this.children.forEach(r=>{r._forgetMemoizedResultFor(e)})}child(e){if(!(0<=e&&e<this._node.numChildren()))return;let r=this._childWrappers[e];if(!r){let n=this._node.childAt(e),i=this._node.childOffsets[e],s=this._baseInterval.subInterval(i,n.matchLength),a=n.isNonterminal()?s:this._baseInterval;r=this._childWrappers[e]=this._semantics.wrap(n,s,a)}return r}_children(){for(let e=0;e<this._node.numChildren();e++)this.child(e);return this._childWrappers}isIteration(){return this._node.isIteration()}isTerminal(){return this._node.isTerminal()}isNonterminal(){return this._node.isNonterminal()}isSyntactic(){return this.isNonterminal()&&this._node.isSyntactic()}isLexical(){return this.isNonterminal()&&this._node.isLexical()}isOptional(){return this._node.isOptional()}iteration(e){let r=e||[],n=r.map(a=>a._node),i=new Wd(n,[],-1,!1),s=this._semantics.wrap(i,null,null);return s._childWrappers=r,s}get children(){return this._children()}get ctorName(){return this._node.ctorName}get numChildren(){return this._node.numChildren()}get sourceString(){return this.source.contents}},kn=class t{constructor(e,r){let n=this;if(this.grammar=e,this.checkedActionDicts=!1,this.Wrapper=class extends(r?r.Wrapper:Gd){constructor(i,s,a){super(i,s,a),n.checkActionDictsIfHaventAlready(),this._semantics=n}toString(){return"[semantics wrapper for "+n.grammar.name+"]"}},this.super=r,r){if(!(e.equals(this.super.grammar)||e._inheritsFrom(this.super.grammar)))throw new Error("Cannot extend a semantics for grammar '"+this.super.grammar.name+"' for use with grammar '"+e.name+"' (not a sub-grammar)");this.operations=Object.create(this.super.operations),this.attributes=Object.create(this.super.attributes),this.attributeKeys=Object.create(null);for(let i in this.attributes)Object.defineProperty(this.attributeKeys,i,{value:dN(i)})}else this.operations=Object.create(null),this.attributes=Object.create(null),this.attributeKeys=Object.create(null)}toString(){return"[semantics for "+this.grammar.name+"]"}checkActionDictsIfHaventAlready(){this.checkedActionDicts||(this.checkActionDicts(),this.checkedActionDicts=!0)}checkActionDicts(){let e;for(e in this.operations)this.operations[e].checkActionDict(this.grammar);for(e in this.attributes)this.attributes[e].checkActionDict(this.grammar)}toRecipe(e){function r(i){return i.super!==t.BuiltInSemantics._getSemantics()}let n=`(function(g) {
34
+ `;if(r(this)){n+=" var semantics = "+this.super.toRecipe(!0)+"(g";let i=this.super.grammar,s=this.grammar;for(;s!==i;)n+=".superGrammar",s=s.superGrammar;n+=`);
35
+ `,n+=" return g.extendSemantics(semantics)"}else n+=" return g.createSemantics()";return["Operation","Attribute"].forEach(i=>{let s=this[i.toLowerCase()+"s"];Object.keys(s).forEach(a=>{let{actionDict:u,formals:c,builtInDefault:p}=s[a],d=a;c.length>0&&(d+="("+c.join(", ")+")");let m;r(this)&&this.super[i.toLowerCase()+"s"][a]?m="extend"+i:m="add"+i,n+=`
36
+ .`+m+"("+JSON.stringify(d)+", {";let h=[];Object.keys(u).forEach(y=>{if(u[y]!==p){let w=u[y].toString().trim();w=w.replace(/^.*\(/,"function("),h.push(`
37
+ `+JSON.stringify(y)+": "+w)}}),n+=h.join(",")+`
38
+ })`})}),n+=`;
39
+ })`,e||(n=`(function() {
40
+ var grammar = this.fromRecipe(`+this.grammar.toRecipe()+`);
41
+ var semantics = `+n+`(grammar);
42
+ return semantics;
43
+ });
44
+ `),n}addOperationOrAttribute(e,r,n){let i=e+"s",s=TN(r,e),{name:a}=s,{formals:u}=s;this.assertNewName(a,e);let c=Nz(e,a,m),p={_default:c};Object.keys(n).forEach(h=>{p[h]=n[h]});let d=e==="operation"?new Lo(a,u,p,c):new sf(a,p,c);d.checkActionDict(this.grammar),this[i][a]=d;function m(...h){let y=this._semantics[i][a];if(arguments.length!==y.formals.length)throw new Error("Invalid number of arguments passed to "+a+" "+e+" (expected "+y.formals.length+", got "+arguments.length+")");let w=Object.create(null);for(let[v,I]of Object.entries(h)){let T=y.formals[v];w[T]=I}let x=this.args;this.args=w;let k=y.execute(this._semantics,this);return this.args=x,k}e==="operation"?(this.Wrapper.prototype[a]=m,this.Wrapper.prototype[a].toString=function(){return"["+a+" operation]"}):(Object.defineProperty(this.Wrapper.prototype,a,{get:m,configurable:!0}),Object.defineProperty(this.attributeKeys,a,{value:dN(a)}))}extendOperationOrAttribute(e,r,n){let i=e+"s";if(TN(r,"attribute"),!(this.super&&r in this.super[i]))throw new Error("Cannot extend "+e+" '"+r+"': did not inherit an "+e+" with that name");if(b1(this[i],r))throw new Error("Cannot extend "+e+" '"+r+"' again");let s=this[i][r].formals,a=this[i][r].actionDict,u=Object.create(a);Object.keys(n).forEach(c=>{u[c]=n[c]}),this[i][r]=e==="operation"?new Lo(r,s,u):new sf(r,u),this[i][r].checkActionDict(this.grammar)}assertNewName(e,r){if(b1(Gd.prototype,e))throw new Error("Cannot add "+r+" '"+e+"': that's a reserved name");if(e in this.operations)throw new Error("Cannot add "+r+" '"+e+"': an operation with that name already exists");if(e in this.attributes)throw new Error("Cannot add "+r+" '"+e+"': an attribute with that name already exists")}wrap(e,r,n){let i=n||r;return e instanceof this.Wrapper?e:new this.Wrapper(e,r,i)}};function TN(t,e){if(!kn.prototypeGrammar)return cn(t.indexOf("(")===-1),{name:t,formals:[]};let r=kn.prototypeGrammar.match(t,e==="operation"?"OperationSignature":"AttributeSignature");if(r.failed())throw new Error(r.message);return kn.prototypeGrammarSemantics(r).parse()}function Nz(t,e,r){return function(...n){let s=(this._semantics.operations[e]||this._semantics.attributes[e]).formals.map(a=>this.args[a]);if(!this.isIteration()&&n.length===1)return r.apply(n[0],s);throw gz(this.ctorName,e,t,rf)}}kn.createSemantics=function(t,e){let r=new kn(t,e!==void 0?e:kn.BuiltInSemantics._getSemantics()),n=function(s){if(!(s instanceof Vd))throw new TypeError("Semantics expected a MatchResult, but got "+w1(s));if(s.failed())throw new TypeError("cannot apply Semantics to "+s.toString());let a=s._cst;if(a.grammar!==t)throw new Error("Cannot use a MatchResult from grammar '"+a.grammar.name+"' with a semantics for '"+t.name+"'");let u=new Zu(s.input);return r.wrap(a,u.interval(s._cstOffset,s.input.length))};return n.addOperation=function(i,s){return r.addOperationOrAttribute("operation",i,s),n},n.extendOperation=function(i,s){return r.extendOperationOrAttribute("operation",i,s),n},n.addAttribute=function(i,s){return r.addOperationOrAttribute("attribute",i,s),n},n.extendAttribute=function(i,s){return r.extendOperationOrAttribute("attribute",i,s),n},n._getActionDict=function(i){let s=r.operations[i]||r.attributes[i];if(!s)throw new Error('"'+i+'" is not a valid operation or attribute name in this semantics for "'+t.name+'"');return s.actionDict},n._remove=function(i){let s;return i in r.operations?(s=r.operations[i],delete r.operations[i]):i in r.attributes&&(s=r.attributes[i],delete r.attributes[i]),delete r.Wrapper.prototype[i],s},n.getOperationNames=function(){return Object.keys(r.operations)},n.getAttributeNames=function(){return Object.keys(r.attributes)},n.getGrammar=function(){return r.grammar},n.toRecipe=function(i){return r.toRecipe(i)},n.toString=r.toString.bind(r),n._getSemantics=function(){return r},n};var Lo=class{constructor(e,r,n,i){this.name=e,this.formals=r,this.actionDict=n,this.builtInDefault=i}checkActionDict(e){e._checkTopDownActionDict(this.typeName,this.name,this.actionDict)}execute(e,r){try{let{ctorName:n}=r._node,i=this.actionDict[n];return i?(rf.push([this,n]),i.apply(r,r._children())):r.isNonterminal()&&(i=this.actionDict._nonterminal,i)?(rf.push([this,"_nonterminal",n]),i.apply(r,r._children())):(rf.push([this,"default action",n]),this.actionDict._default.apply(r,r._children()))}finally{rf.pop()}}};Lo.prototype.typeName="operation";var sf=class extends Lo{constructor(e,r,n){super(e,[],r,n)}execute(e,r){let n=r._node,i=e.attributeKeys[this.name];return b1(n,i)||(n[i]=Lo.prototype.execute.call(this,e,r)),n[i]}};sf.prototype.typeName="attribute";var EN=["_iter","_terminal","_nonterminal","_default"];function ON(t){return Object.keys(t.rules).sort().map(e=>t.rules[e])}var Lz=t=>t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"),JN,KN,An=class t{constructor(e,r,n,i){if(this.name=e,this.superGrammar=r,this.rules=n,i){if(!(i in n))throw new Error("Invalid start rule: '"+i+"' is not a rule in grammar '"+e+"'");this.defaultStartRule=i}this._matchStateInitializer=void 0,this.supportsIncrementalParsing=!0}matcher(){return new v1(this)}isBuiltIn(){return this===t.ProtoBuiltInRules||this===t.BuiltInRules}equals(e){if(this===e)return!0;if(e==null||this.name!==e.name||this.defaultStartRule!==e.defaultStartRule||!(this.superGrammar===e.superGrammar||this.superGrammar.equals(e.superGrammar)))return!1;let r=ON(this),n=ON(e);return r.length===n.length&&r.every((i,s)=>i.description===n[s].description&&i.formals.join(",")===n[s].formals.join(",")&&i.body.toString()===n[s].body.toString())}match(e,r){let n=this.matcher();return n.replaceInputRange(0,0,e),n.match(r)}trace(e,r){let n=this.matcher();return n.replaceInputRange(0,0,e),n.trace(r)}createSemantics(){return kn.createSemantics(this)}extendSemantics(e){return kn.createSemantics(this,e._getSemantics())}_checkTopDownActionDict(e,r,n){let i=[];for(let s in n){let a=n[s];if(!EN.includes(s)&&!(s in this.rules)){i.push(`'${s}' is not a valid semantic action for '${this.name}'`);continue}if(typeof a!="function"){i.push(`'${s}' must be a function in an action dictionary for '${this.name}'`);continue}let c=a.length,p=this._topDownActionArity(s);if(c!==p){let d;s==="_iter"||s==="_nonterminal"?d=`it should use a rest parameter, e.g. \`${s}(...children) {}\`. NOTE: this is new in Ohm v16 \u2014 see https://ohmjs.org/d/ati for details.`:d=`expected ${p}, got ${c}`,i.push(`Semantic action '${s}' has the wrong arity: ${d}`)}}if(i.length>0){let s=i.map(u=>"- "+u),a=new Error([`Found errors in the action dictionary of the '${r}' ${e}:`,...s].join(`
45
+ `));throw a.problems=i,a}}_topDownActionArity(e){return EN.includes(e)?0:this.rules[e].body.getArity()}_inheritsFrom(e){let r=this.superGrammar;for(;r;){if(r.equals(e,!0))return!0;r=r.superGrammar}return!1}toRecipe(e=void 0){let r={};this.source&&(r.source=this.source.contents);let n=null;this.defaultStartRule&&(n=this.defaultStartRule);let i={};Object.keys(this.rules).forEach(u=>{let c=this.rules[u],{body:p}=c,d=!this.superGrammar||!this.superGrammar.rules[u],m;d?m="define":m=p instanceof Yu?"extend":"override";let h={};if(c.source&&this.source){let x=c.source.relativeTo(this.source);h.sourceInterval=[x.startIdx,x.endIdx]}let y=d?c.description:null,w=p.outputRecipe(c.formals,this.source);i[u]=[m,h,y,c.formals,w]});let s="null";e?s=e:this.superGrammar&&!this.superGrammar.isBuiltIn()&&(s=this.superGrammar.toRecipe());let a=[...["grammar",r,this.name].map(JSON.stringify),s,...[n,i].map(JSON.stringify)];return Lz(`[${a.join(",")}]`)}toOperationActionDictionaryTemplate(){return this._toOperationOrAttributeActionDictionaryTemplate()}toAttributeActionDictionaryTemplate(){return this._toOperationOrAttributeActionDictionaryTemplate()}_toOperationOrAttributeActionDictionaryTemplate(){let e=new Po;e.append("{");let r=!0;for(let n in this.rules){let{body:i}=this.rules[n];r?r=!1:e.append(","),e.append(`
46
+ `),e.append(" "),this.addSemanticActionTemplate(n,i,e)}return e.append(`
47
+ }`),e.contents()}addSemanticActionTemplate(e,r,n){n.append(e),n.append(": function(");let i=this._topDownActionArity(e);n.append(Jd("_",i).join(", ")),n.append(`) {
48
+ `),n.append(" }")}parseApplication(e){let r;if(e.indexOf("<")===-1)r=new ot(e);else{let i=JN.match(e,"Base_application");r=KN(i,{})}if(!(r.ruleName in this.rules))throw VN(r.ruleName,this.name);let{formals:n}=this.rules[r.ruleName];if(n.length!==r.args.length){let{source:i}=this.rules[r.ruleName];throw UN(r.ruleName,n.length,r.args.length,i)}return r}_setUpMatchState(e){this._matchStateInitializer&&this._matchStateInitializer(e)}};An.ProtoBuiltInRules=new An("ProtoBuiltInRules",void 0,{any:{body:zr,formals:[],description:"any character",primitive:!0},end:{body:Jr,formals:[],description:"end of input",primitive:!0},caseInsensitive:{body:new y1(new br(0)),formals:["str"],primitive:!0},lower:{body:new or("Ll"),formals:[],description:"a lowercase letter",primitive:!0},upper:{body:new or("Lu"),formals:[],description:"an uppercase letter",primitive:!0},unicodeLtmo:{body:new or("Ltmo"),formals:[],description:"a Unicode character in Lt, Lm, or Lo",primitive:!0},spaces:{body:new Ms(new ot("space")),formals:[]},space:{body:new vr("\0"," "),formals:[],description:"a space"}});An.initApplicationParser=function(t,e){JN=t,KN=e};var Hd=class{constructor(e){this.name=e}sourceInterval(e,r){return this.source.subInterval(e,r-e)}ensureSuperGrammar(){return this.superGrammar||this.withSuperGrammar(this.name==="BuiltInRules"?An.ProtoBuiltInRules:An.BuiltInRules),this.superGrammar}ensureSuperGrammarRuleForOverriding(e,r){let n=this.ensureSuperGrammar().rules[e];if(!n)throw sz(e,this.superGrammar.name,r);return n}installOverriddenOrExtendedRule(e,r,n,i){let s=c1(r);if(s.length>0)throw kN(e,s,i);let a=this.ensureSuperGrammar().rules[e],u=a.formals,c=u?u.length:0;if(r.length!==c)throw UN(e,c,r.length,i);return this.install(e,r,n,a.description,i)}install(e,r,n,i,s,a=!1){return this.rules[e]={body:n.introduceParams(r),formals:r,description:i,source:s,primitive:a},this}withSuperGrammar(e){if(this.superGrammar)throw new Error("the super grammar of a GrammarDecl cannot be set more than once");return this.superGrammar=e,this.rules=Object.create(e.rules),e.isBuiltIn()||(this.defaultStartRule=e.defaultStartRule),this}withDefaultStartRule(e){return this.defaultStartRule=e,this}withSource(e){return this.source=new Zu(e).interval(0,e.length),this}build(){let e=new An(this.name,this.ensureSuperGrammar(),this.rules,this.defaultStartRule);e._matchStateInitializer=e.superGrammar._matchStateInitializer,e.supportsIncrementalParsing=e.superGrammar.supportsIncrementalParsing;let r=[],n=!1;return Object.keys(e.rules).forEach(i=>{let{body:s}=e.rules[i];try{s.assertChoicesHaveUniformArity(i)}catch(a){r.push(a)}try{s.assertAllApplicationsAreValid(i,e)}catch(a){r.push(a),n=!0}}),n||Object.keys(e.rules).forEach(i=>{let{body:s}=e.rules[i];try{s.assertIteratedExprsAreNotNullable(e,[])}catch(a){r.push(a)}}),r.length>0&&yz(r),this.source&&(e.source=this.source),e}define(e,r,n,i,s,a){if(this.ensureSuperGrammar(),this.superGrammar.rules[e])throw xN(e,this.name,this.superGrammar.name,s);if(this.rules[e])throw xN(e,this.name,this.name,s);let u=c1(r);if(u.length>0)throw kN(e,u,s);return this.install(e,r,n,i,s,a)}override(e,r,n,i,s){return this.ensureSuperGrammarRuleForOverriding(e,s),this.installOverriddenOrExtendedRule(e,r,n,s),this}extend(e,r,n,i,s){if(!this.ensureSuperGrammar().rules[e])throw az(e,this.superGrammar.name,s);let u=new Yu(this.superGrammar,e,n);return u.source=n.source,this.installOverriddenOrExtendedRule(e,r,u,s),this}},tc=class{constructor(e){this.currentDecl=null,this.currentRuleName=null,this.options=e||{}}newGrammar(e){return new Hd(e)}grammar(e,r,n,i,s){let a=new Hd(r);return n&&a.withSuperGrammar(n instanceof An?n:this.fromRecipe(n)),i&&a.withDefaultStartRule(i),e&&e.source&&a.withSource(e.source),this.currentDecl=a,Object.keys(s).forEach(u=>{this.currentRuleName=u;let c=s[u],p=c[0],d=c[1],m=c[2],h=c[3],y=this.fromRecipe(c[4]),w;a.source&&d&&d.sourceInterval&&(w=a.source.subInterval(d.sourceInterval[0],d.sourceInterval[1]-d.sourceInterval[0])),a[p](u,h,y,m,w)}),this.currentRuleName=this.currentDecl=null,a.build()}terminal(e){return new ur(e)}range(e,r){return new vr(e,r)}param(e){return new br(e)}alt(...e){let r=[];for(let n of e)n instanceof Ve||(n=this.fromRecipe(n)),n instanceof Gt?r=r.concat(n.terms):r.push(n);return r.length===1?r[0]:new Gt(r)}seq(...e){let r=[];for(let n of e)n instanceof Ve||(n=this.fromRecipe(n)),n instanceof Qt?r=r.concat(n.factors):r.push(n);return r.length===1?r[0]:new Qt(r)}star(e){return e instanceof Ve||(e=this.fromRecipe(e)),new Ms(e)}plus(e){return e instanceof Ve||(e=this.fromRecipe(e)),new Aa(e)}opt(e){return e instanceof Ve||(e=this.fromRecipe(e)),new Fi(e)}not(e){return e instanceof Ve||(e=this.fromRecipe(e)),new ar(e)}lookahead(e){return e instanceof Ve||(e=this.fromRecipe(e)),this.options.eliminateLookaheads?new ar(new ar(e)):new Er(e)}lex(e){return e instanceof Ve||(e=this.fromRecipe(e)),new Hr(e)}app(e,r){return r&&r.length>0&&(r=r.map(function(n){return n instanceof Ve?n:this.fromRecipe(n)},this)),new ot(e,r)}splice(e,r){return new Xu(this.currentDecl.superGrammar,this.currentRuleName,e.map(n=>this.fromRecipe(n)),r.map(n=>this.fromRecipe(n)))}fromRecipe(e){let r=e[0]==="grammar"?e.slice(1):e.slice(2),n=this[e[0]](...r),i=e[1];return i&&i.sourceInterval&&this.currentDecl&&n.withSource(this.currentDecl.sourceInterval(...i.sourceInterval)),n}};function A1(t){return typeof t=="function"?t.call(new tc):(typeof t=="string"&&(t=JSON.parse(t)),new tc().fromRecipe(t))}var I1=A1(["grammar",{source:`BuiltInRules {
49
+
50
+ alnum (an alpha-numeric character)
51
+ = letter
52
+ | digit
53
+
54
+ letter (a letter)
55
+ = lower
56
+ | upper
57
+ | unicodeLtmo
58
+
59
+ digit (a digit)
60
+ = "0".."9"
61
+
62
+ hexDigit (a hexadecimal digit)
63
+ = digit
64
+ | "a".."f"
65
+ | "A".."F"
66
+
67
+ ListOf<elem, sep>
68
+ = NonemptyListOf<elem, sep>
69
+ | EmptyListOf<elem, sep>
70
+
71
+ NonemptyListOf<elem, sep>
72
+ = elem (sep elem)*
73
+
74
+ EmptyListOf<elem, sep>
75
+ = /* nothing */
76
+
77
+ listOf<elem, sep>
78
+ = nonemptyListOf<elem, sep>
79
+ | emptyListOf<elem, sep>
80
+
81
+ nonemptyListOf<elem, sep>
82
+ = elem (sep elem)*
83
+
84
+ emptyListOf<elem, sep>
85
+ = /* nothing */
86
+
87
+ // Allows a syntactic rule application within a lexical context.
88
+ applySyntactic<app> = app
89
+ }`},"BuiltInRules",null,null,{alnum:["define",{sourceInterval:[18,78]},"an alpha-numeric character",[],["alt",{sourceInterval:[60,78]},["app",{sourceInterval:[60,66]},"letter",[]],["app",{sourceInterval:[73,78]},"digit",[]]]],letter:["define",{sourceInterval:[82,142]},"a letter",[],["alt",{sourceInterval:[107,142]},["app",{sourceInterval:[107,112]},"lower",[]],["app",{sourceInterval:[119,124]},"upper",[]],["app",{sourceInterval:[131,142]},"unicodeLtmo",[]]]],digit:["define",{sourceInterval:[146,177]},"a digit",[],["range",{sourceInterval:[169,177]},"0","9"]],hexDigit:["define",{sourceInterval:[181,254]},"a hexadecimal digit",[],["alt",{sourceInterval:[219,254]},["app",{sourceInterval:[219,224]},"digit",[]],["range",{sourceInterval:[231,239]},"a","f"],["range",{sourceInterval:[246,254]},"A","F"]]],ListOf:["define",{sourceInterval:[258,336]},null,["elem","sep"],["alt",{sourceInterval:[282,336]},["app",{sourceInterval:[282,307]},"NonemptyListOf",[["param",{sourceInterval:[297,301]},0],["param",{sourceInterval:[303,306]},1]]],["app",{sourceInterval:[314,336]},"EmptyListOf",[["param",{sourceInterval:[326,330]},0],["param",{sourceInterval:[332,335]},1]]]]],NonemptyListOf:["define",{sourceInterval:[340,388]},null,["elem","sep"],["seq",{sourceInterval:[372,388]},["param",{sourceInterval:[372,376]},0],["star",{sourceInterval:[377,388]},["seq",{sourceInterval:[378,386]},["param",{sourceInterval:[378,381]},1],["param",{sourceInterval:[382,386]},0]]]]],EmptyListOf:["define",{sourceInterval:[392,434]},null,["elem","sep"],["seq",{sourceInterval:[438,438]}]],listOf:["define",{sourceInterval:[438,516]},null,["elem","sep"],["alt",{sourceInterval:[462,516]},["app",{sourceInterval:[462,487]},"nonemptyListOf",[["param",{sourceInterval:[477,481]},0],["param",{sourceInterval:[483,486]},1]]],["app",{sourceInterval:[494,516]},"emptyListOf",[["param",{sourceInterval:[506,510]},0],["param",{sourceInterval:[512,515]},1]]]]],nonemptyListOf:["define",{sourceInterval:[520,568]},null,["elem","sep"],["seq",{sourceInterval:[552,568]},["param",{sourceInterval:[552,556]},0],["star",{sourceInterval:[557,568]},["seq",{sourceInterval:[558,566]},["param",{sourceInterval:[558,561]},1],["param",{sourceInterval:[562,566]},0]]]]],emptyListOf:["define",{sourceInterval:[572,682]},null,["elem","sep"],["seq",{sourceInterval:[685,685]}]],applySyntactic:["define",{sourceInterval:[685,710]},null,["app"],["param",{sourceInterval:[707,710]},0]]}]);An.BuiltInRules=I1;zH(An.BuiltInRules);var Qd=A1(["grammar",{source:`Ohm {
90
+
91
+ Grammars
92
+ = Grammar*
93
+
94
+ Grammar
95
+ = ident SuperGrammar? "{" Rule* "}"
96
+
97
+ SuperGrammar
98
+ = "<:" ident
99
+
100
+ Rule
101
+ = ident Formals? ruleDescr? "=" RuleBody -- define
102
+ | ident Formals? ":=" OverrideRuleBody -- override
103
+ | ident Formals? "+=" RuleBody -- extend
104
+
105
+ RuleBody
106
+ = "|"? NonemptyListOf<TopLevelTerm, "|">
107
+
108
+ TopLevelTerm
109
+ = Seq caseName -- inline
110
+ | Seq
111
+
112
+ OverrideRuleBody
113
+ = "|"? NonemptyListOf<OverrideTopLevelTerm, "|">
114
+
115
+ OverrideTopLevelTerm
116
+ = "..." -- superSplice
117
+ | TopLevelTerm
118
+
119
+ Formals
120
+ = "<" ListOf<ident, ","> ">"
121
+
122
+ Params
123
+ = "<" ListOf<Seq, ","> ">"
124
+
125
+ Alt
126
+ = NonemptyListOf<Seq, "|">
127
+
128
+ Seq
129
+ = Iter*
130
+
131
+ Iter
132
+ = Pred "*" -- star
133
+ | Pred "+" -- plus
134
+ | Pred "?" -- opt
135
+ | Pred
136
+
137
+ Pred
138
+ = "~" Lex -- not
139
+ | "&" Lex -- lookahead
140
+ | Lex
141
+
142
+ Lex
143
+ = "#" Base -- lex
144
+ | Base
145
+
146
+ Base
147
+ = ident Params? ~(ruleDescr? "=" | ":=" | "+=") -- application
148
+ | oneCharTerminal ".." oneCharTerminal -- range
149
+ | terminal -- terminal
150
+ | "(" Alt ")" -- paren
151
+
152
+ ruleDescr (a rule description)
153
+ = "(" ruleDescrText ")"
154
+
155
+ ruleDescrText
156
+ = (~")" any)*
157
+
158
+ caseName
159
+ = "--" (~"\\n" space)* name (~"\\n" space)* ("\\n" | &"}")
160
+
161
+ name (a name)
162
+ = nameFirst nameRest*
163
+
164
+ nameFirst
165
+ = "_"
166
+ | letter
167
+
168
+ nameRest
169
+ = "_"
170
+ | alnum
171
+
172
+ ident (an identifier)
173
+ = name
174
+
175
+ terminal
176
+ = "\\"" terminalChar* "\\""
177
+
178
+ oneCharTerminal
179
+ = "\\"" terminalChar "\\""
180
+
181
+ terminalChar
182
+ = escapeChar
183
+ | ~"\\\\" ~"\\"" ~"\\n" "\\u{0}".."\\u{10FFFF}"
184
+
185
+ escapeChar (an escape sequence)
186
+ = "\\\\\\\\" -- backslash
187
+ | "\\\\\\"" -- doubleQuote
188
+ | "\\\\\\'" -- singleQuote
189
+ | "\\\\b" -- backspace
190
+ | "\\\\n" -- lineFeed
191
+ | "\\\\r" -- carriageReturn
192
+ | "\\\\t" -- tab
193
+ | "\\\\u{" hexDigit hexDigit? hexDigit?
194
+ hexDigit? hexDigit? hexDigit? "}" -- unicodeCodePoint
195
+ | "\\\\u" hexDigit hexDigit hexDigit hexDigit -- unicodeEscape
196
+ | "\\\\x" hexDigit hexDigit -- hexEscape
197
+
198
+ space
199
+ += comment
200
+
201
+ comment
202
+ = "//" (~"\\n" any)* &("\\n" | end) -- singleLine
203
+ | "/*" (~"*/" any)* "*/" -- multiLine
204
+
205
+ tokens = token*
206
+
207
+ token = caseName | comment | ident | operator | punctuation | terminal | any
208
+
209
+ operator = "<:" | "=" | ":=" | "+=" | "*" | "+" | "?" | "~" | "&"
210
+
211
+ punctuation = "<" | ">" | "," | "--"
212
+ }`},"Ohm",null,"Grammars",{Grammars:["define",{sourceInterval:[9,32]},null,[],["star",{sourceInterval:[24,32]},["app",{sourceInterval:[24,31]},"Grammar",[]]]],Grammar:["define",{sourceInterval:[36,83]},null,[],["seq",{sourceInterval:[50,83]},["app",{sourceInterval:[50,55]},"ident",[]],["opt",{sourceInterval:[56,69]},["app",{sourceInterval:[56,68]},"SuperGrammar",[]]],["terminal",{sourceInterval:[70,73]},"{"],["star",{sourceInterval:[74,79]},["app",{sourceInterval:[74,78]},"Rule",[]]],["terminal",{sourceInterval:[80,83]},"}"]]],SuperGrammar:["define",{sourceInterval:[87,116]},null,[],["seq",{sourceInterval:[106,116]},["terminal",{sourceInterval:[106,110]},"<:"],["app",{sourceInterval:[111,116]},"ident",[]]]],Rule_define:["define",{sourceInterval:[131,181]},null,[],["seq",{sourceInterval:[131,170]},["app",{sourceInterval:[131,136]},"ident",[]],["opt",{sourceInterval:[137,145]},["app",{sourceInterval:[137,144]},"Formals",[]]],["opt",{sourceInterval:[146,156]},["app",{sourceInterval:[146,155]},"ruleDescr",[]]],["terminal",{sourceInterval:[157,160]},"="],["app",{sourceInterval:[162,170]},"RuleBody",[]]]],Rule_override:["define",{sourceInterval:[188,248]},null,[],["seq",{sourceInterval:[188,235]},["app",{sourceInterval:[188,193]},"ident",[]],["opt",{sourceInterval:[194,202]},["app",{sourceInterval:[194,201]},"Formals",[]]],["terminal",{sourceInterval:[214,218]},":="],["app",{sourceInterval:[219,235]},"OverrideRuleBody",[]]]],Rule_extend:["define",{sourceInterval:[255,305]},null,[],["seq",{sourceInterval:[255,294]},["app",{sourceInterval:[255,260]},"ident",[]],["opt",{sourceInterval:[261,269]},["app",{sourceInterval:[261,268]},"Formals",[]]],["terminal",{sourceInterval:[281,285]},"+="],["app",{sourceInterval:[286,294]},"RuleBody",[]]]],Rule:["define",{sourceInterval:[120,305]},null,[],["alt",{sourceInterval:[131,305]},["app",{sourceInterval:[131,170]},"Rule_define",[]],["app",{sourceInterval:[188,235]},"Rule_override",[]],["app",{sourceInterval:[255,294]},"Rule_extend",[]]]],RuleBody:["define",{sourceInterval:[309,362]},null,[],["seq",{sourceInterval:[324,362]},["opt",{sourceInterval:[324,328]},["terminal",{sourceInterval:[324,327]},"|"]],["app",{sourceInterval:[329,362]},"NonemptyListOf",[["app",{sourceInterval:[344,356]},"TopLevelTerm",[]],["terminal",{sourceInterval:[358,361]},"|"]]]]],TopLevelTerm_inline:["define",{sourceInterval:[385,408]},null,[],["seq",{sourceInterval:[385,397]},["app",{sourceInterval:[385,388]},"Seq",[]],["app",{sourceInterval:[389,397]},"caseName",[]]]],TopLevelTerm:["define",{sourceInterval:[366,418]},null,[],["alt",{sourceInterval:[385,418]},["app",{sourceInterval:[385,397]},"TopLevelTerm_inline",[]],["app",{sourceInterval:[415,418]},"Seq",[]]]],OverrideRuleBody:["define",{sourceInterval:[422,491]},null,[],["seq",{sourceInterval:[445,491]},["opt",{sourceInterval:[445,449]},["terminal",{sourceInterval:[445,448]},"|"]],["app",{sourceInterval:[450,491]},"NonemptyListOf",[["app",{sourceInterval:[465,485]},"OverrideTopLevelTerm",[]],["terminal",{sourceInterval:[487,490]},"|"]]]]],OverrideTopLevelTerm_superSplice:["define",{sourceInterval:[522,543]},null,[],["terminal",{sourceInterval:[522,527]},"..."]],OverrideTopLevelTerm:["define",{sourceInterval:[495,562]},null,[],["alt",{sourceInterval:[522,562]},["app",{sourceInterval:[522,527]},"OverrideTopLevelTerm_superSplice",[]],["app",{sourceInterval:[550,562]},"TopLevelTerm",[]]]],Formals:["define",{sourceInterval:[566,606]},null,[],["seq",{sourceInterval:[580,606]},["terminal",{sourceInterval:[580,583]},"<"],["app",{sourceInterval:[584,602]},"ListOf",[["app",{sourceInterval:[591,596]},"ident",[]],["terminal",{sourceInterval:[598,601]},","]]],["terminal",{sourceInterval:[603,606]},">"]]],Params:["define",{sourceInterval:[610,647]},null,[],["seq",{sourceInterval:[623,647]},["terminal",{sourceInterval:[623,626]},"<"],["app",{sourceInterval:[627,643]},"ListOf",[["app",{sourceInterval:[634,637]},"Seq",[]],["terminal",{sourceInterval:[639,642]},","]]],["terminal",{sourceInterval:[644,647]},">"]]],Alt:["define",{sourceInterval:[651,685]},null,[],["app",{sourceInterval:[661,685]},"NonemptyListOf",[["app",{sourceInterval:[676,679]},"Seq",[]],["terminal",{sourceInterval:[681,684]},"|"]]]],Seq:["define",{sourceInterval:[689,704]},null,[],["star",{sourceInterval:[699,704]},["app",{sourceInterval:[699,703]},"Iter",[]]]],Iter_star:["define",{sourceInterval:[719,736]},null,[],["seq",{sourceInterval:[719,727]},["app",{sourceInterval:[719,723]},"Pred",[]],["terminal",{sourceInterval:[724,727]},"*"]]],Iter_plus:["define",{sourceInterval:[743,760]},null,[],["seq",{sourceInterval:[743,751]},["app",{sourceInterval:[743,747]},"Pred",[]],["terminal",{sourceInterval:[748,751]},"+"]]],Iter_opt:["define",{sourceInterval:[767,783]},null,[],["seq",{sourceInterval:[767,775]},["app",{sourceInterval:[767,771]},"Pred",[]],["terminal",{sourceInterval:[772,775]},"?"]]],Iter:["define",{sourceInterval:[708,794]},null,[],["alt",{sourceInterval:[719,794]},["app",{sourceInterval:[719,727]},"Iter_star",[]],["app",{sourceInterval:[743,751]},"Iter_plus",[]],["app",{sourceInterval:[767,775]},"Iter_opt",[]],["app",{sourceInterval:[790,794]},"Pred",[]]]],Pred_not:["define",{sourceInterval:[809,824]},null,[],["seq",{sourceInterval:[809,816]},["terminal",{sourceInterval:[809,812]},"~"],["app",{sourceInterval:[813,816]},"Lex",[]]]],Pred_lookahead:["define",{sourceInterval:[831,852]},null,[],["seq",{sourceInterval:[831,838]},["terminal",{sourceInterval:[831,834]},"&"],["app",{sourceInterval:[835,838]},"Lex",[]]]],Pred:["define",{sourceInterval:[798,862]},null,[],["alt",{sourceInterval:[809,862]},["app",{sourceInterval:[809,816]},"Pred_not",[]],["app",{sourceInterval:[831,838]},"Pred_lookahead",[]],["app",{sourceInterval:[859,862]},"Lex",[]]]],Lex_lex:["define",{sourceInterval:[876,892]},null,[],["seq",{sourceInterval:[876,884]},["terminal",{sourceInterval:[876,879]},"#"],["app",{sourceInterval:[880,884]},"Base",[]]]],Lex:["define",{sourceInterval:[866,903]},null,[],["alt",{sourceInterval:[876,903]},["app",{sourceInterval:[876,884]},"Lex_lex",[]],["app",{sourceInterval:[899,903]},"Base",[]]]],Base_application:["define",{sourceInterval:[918,979]},null,[],["seq",{sourceInterval:[918,963]},["app",{sourceInterval:[918,923]},"ident",[]],["opt",{sourceInterval:[924,931]},["app",{sourceInterval:[924,930]},"Params",[]]],["not",{sourceInterval:[932,963]},["alt",{sourceInterval:[934,962]},["seq",{sourceInterval:[934,948]},["opt",{sourceInterval:[934,944]},["app",{sourceInterval:[934,943]},"ruleDescr",[]]],["terminal",{sourceInterval:[945,948]},"="]],["terminal",{sourceInterval:[951,955]},":="],["terminal",{sourceInterval:[958,962]},"+="]]]]],Base_range:["define",{sourceInterval:[986,1041]},null,[],["seq",{sourceInterval:[986,1022]},["app",{sourceInterval:[986,1001]},"oneCharTerminal",[]],["terminal",{sourceInterval:[1002,1006]},".."],["app",{sourceInterval:[1007,1022]},"oneCharTerminal",[]]]],Base_terminal:["define",{sourceInterval:[1048,1106]},null,[],["app",{sourceInterval:[1048,1056]},"terminal",[]]],Base_paren:["define",{sourceInterval:[1113,1168]},null,[],["seq",{sourceInterval:[1113,1124]},["terminal",{sourceInterval:[1113,1116]},"("],["app",{sourceInterval:[1117,1120]},"Alt",[]],["terminal",{sourceInterval:[1121,1124]},")"]]],Base:["define",{sourceInterval:[907,1168]},null,[],["alt",{sourceInterval:[918,1168]},["app",{sourceInterval:[918,963]},"Base_application",[]],["app",{sourceInterval:[986,1022]},"Base_range",[]],["app",{sourceInterval:[1048,1056]},"Base_terminal",[]],["app",{sourceInterval:[1113,1124]},"Base_paren",[]]]],ruleDescr:["define",{sourceInterval:[1172,1231]},"a rule description",[],["seq",{sourceInterval:[1210,1231]},["terminal",{sourceInterval:[1210,1213]},"("],["app",{sourceInterval:[1214,1227]},"ruleDescrText",[]],["terminal",{sourceInterval:[1228,1231]},")"]]],ruleDescrText:["define",{sourceInterval:[1235,1266]},null,[],["star",{sourceInterval:[1255,1266]},["seq",{sourceInterval:[1256,1264]},["not",{sourceInterval:[1256,1260]},["terminal",{sourceInterval:[1257,1260]},")"]],["app",{sourceInterval:[1261,1264]},"any",[]]]]],caseName:["define",{sourceInterval:[1270,1338]},null,[],["seq",{sourceInterval:[1285,1338]},["terminal",{sourceInterval:[1285,1289]},"--"],["star",{sourceInterval:[1290,1304]},["seq",{sourceInterval:[1291,1302]},["not",{sourceInterval:[1291,1296]},["terminal",{sourceInterval:[1292,1296]},`
213
+ `]],["app",{sourceInterval:[1297,1302]},"space",[]]]],["app",{sourceInterval:[1305,1309]},"name",[]],["star",{sourceInterval:[1310,1324]},["seq",{sourceInterval:[1311,1322]},["not",{sourceInterval:[1311,1316]},["terminal",{sourceInterval:[1312,1316]},`
214
+ `]],["app",{sourceInterval:[1317,1322]},"space",[]]]],["alt",{sourceInterval:[1326,1337]},["terminal",{sourceInterval:[1326,1330]},`
215
+ `],["lookahead",{sourceInterval:[1333,1337]},["terminal",{sourceInterval:[1334,1337]},"}"]]]]],name:["define",{sourceInterval:[1342,1382]},"a name",[],["seq",{sourceInterval:[1363,1382]},["app",{sourceInterval:[1363,1372]},"nameFirst",[]],["star",{sourceInterval:[1373,1382]},["app",{sourceInterval:[1373,1381]},"nameRest",[]]]]],nameFirst:["define",{sourceInterval:[1386,1418]},null,[],["alt",{sourceInterval:[1402,1418]},["terminal",{sourceInterval:[1402,1405]},"_"],["app",{sourceInterval:[1412,1418]},"letter",[]]]],nameRest:["define",{sourceInterval:[1422,1452]},null,[],["alt",{sourceInterval:[1437,1452]},["terminal",{sourceInterval:[1437,1440]},"_"],["app",{sourceInterval:[1447,1452]},"alnum",[]]]],ident:["define",{sourceInterval:[1456,1489]},"an identifier",[],["app",{sourceInterval:[1485,1489]},"name",[]]],terminal:["define",{sourceInterval:[1493,1531]},null,[],["seq",{sourceInterval:[1508,1531]},["terminal",{sourceInterval:[1508,1512]},'"'],["star",{sourceInterval:[1513,1526]},["app",{sourceInterval:[1513,1525]},"terminalChar",[]]],["terminal",{sourceInterval:[1527,1531]},'"']]],oneCharTerminal:["define",{sourceInterval:[1535,1579]},null,[],["seq",{sourceInterval:[1557,1579]},["terminal",{sourceInterval:[1557,1561]},'"'],["app",{sourceInterval:[1562,1574]},"terminalChar",[]],["terminal",{sourceInterval:[1575,1579]},'"']]],terminalChar:["define",{sourceInterval:[1583,1660]},null,[],["alt",{sourceInterval:[1602,1660]},["app",{sourceInterval:[1602,1612]},"escapeChar",[]],["seq",{sourceInterval:[1621,1660]},["not",{sourceInterval:[1621,1626]},["terminal",{sourceInterval:[1622,1626]},"\\"]],["not",{sourceInterval:[1627,1632]},["terminal",{sourceInterval:[1628,1632]},'"']],["not",{sourceInterval:[1633,1638]},["terminal",{sourceInterval:[1634,1638]},`
216
+ `]],["range",{sourceInterval:[1639,1660]},"\0","\u{10FFFF}"]]]],escapeChar_backslash:["define",{sourceInterval:[1703,1758]},null,[],["terminal",{sourceInterval:[1703,1709]},"\\\\"]],escapeChar_doubleQuote:["define",{sourceInterval:[1765,1822]},null,[],["terminal",{sourceInterval:[1765,1771]},'\\"']],escapeChar_singleQuote:["define",{sourceInterval:[1829,1886]},null,[],["terminal",{sourceInterval:[1829,1835]},"\\'"]],escapeChar_backspace:["define",{sourceInterval:[1893,1948]},null,[],["terminal",{sourceInterval:[1893,1898]},"\\b"]],escapeChar_lineFeed:["define",{sourceInterval:[1955,2009]},null,[],["terminal",{sourceInterval:[1955,1960]},"\\n"]],escapeChar_carriageReturn:["define",{sourceInterval:[2016,2076]},null,[],["terminal",{sourceInterval:[2016,2021]},"\\r"]],escapeChar_tab:["define",{sourceInterval:[2083,2132]},null,[],["terminal",{sourceInterval:[2083,2088]},"\\t"]],escapeChar_unicodeCodePoint:["define",{sourceInterval:[2139,2243]},null,[],["seq",{sourceInterval:[2139,2221]},["terminal",{sourceInterval:[2139,2145]},"\\u{"],["app",{sourceInterval:[2146,2154]},"hexDigit",[]],["opt",{sourceInterval:[2155,2164]},["app",{sourceInterval:[2155,2163]},"hexDigit",[]]],["opt",{sourceInterval:[2165,2174]},["app",{sourceInterval:[2165,2173]},"hexDigit",[]]],["opt",{sourceInterval:[2188,2197]},["app",{sourceInterval:[2188,2196]},"hexDigit",[]]],["opt",{sourceInterval:[2198,2207]},["app",{sourceInterval:[2198,2206]},"hexDigit",[]]],["opt",{sourceInterval:[2208,2217]},["app",{sourceInterval:[2208,2216]},"hexDigit",[]]],["terminal",{sourceInterval:[2218,2221]},"}"]]],escapeChar_unicodeEscape:["define",{sourceInterval:[2250,2309]},null,[],["seq",{sourceInterval:[2250,2291]},["terminal",{sourceInterval:[2250,2255]},"\\u"],["app",{sourceInterval:[2256,2264]},"hexDigit",[]],["app",{sourceInterval:[2265,2273]},"hexDigit",[]],["app",{sourceInterval:[2274,2282]},"hexDigit",[]],["app",{sourceInterval:[2283,2291]},"hexDigit",[]]]],escapeChar_hexEscape:["define",{sourceInterval:[2316,2371]},null,[],["seq",{sourceInterval:[2316,2339]},["terminal",{sourceInterval:[2316,2321]},"\\x"],["app",{sourceInterval:[2322,2330]},"hexDigit",[]],["app",{sourceInterval:[2331,2339]},"hexDigit",[]]]],escapeChar:["define",{sourceInterval:[1664,2371]},"an escape sequence",[],["alt",{sourceInterval:[1703,2371]},["app",{sourceInterval:[1703,1709]},"escapeChar_backslash",[]],["app",{sourceInterval:[1765,1771]},"escapeChar_doubleQuote",[]],["app",{sourceInterval:[1829,1835]},"escapeChar_singleQuote",[]],["app",{sourceInterval:[1893,1898]},"escapeChar_backspace",[]],["app",{sourceInterval:[1955,1960]},"escapeChar_lineFeed",[]],["app",{sourceInterval:[2016,2021]},"escapeChar_carriageReturn",[]],["app",{sourceInterval:[2083,2088]},"escapeChar_tab",[]],["app",{sourceInterval:[2139,2221]},"escapeChar_unicodeCodePoint",[]],["app",{sourceInterval:[2250,2291]},"escapeChar_unicodeEscape",[]],["app",{sourceInterval:[2316,2339]},"escapeChar_hexEscape",[]]]],space:["extend",{sourceInterval:[2375,2394]},null,[],["app",{sourceInterval:[2387,2394]},"comment",[]]],comment_singleLine:["define",{sourceInterval:[2412,2458]},null,[],["seq",{sourceInterval:[2412,2443]},["terminal",{sourceInterval:[2412,2416]},"//"],["star",{sourceInterval:[2417,2429]},["seq",{sourceInterval:[2418,2427]},["not",{sourceInterval:[2418,2423]},["terminal",{sourceInterval:[2419,2423]},`
217
+ `]],["app",{sourceInterval:[2424,2427]},"any",[]]]],["lookahead",{sourceInterval:[2430,2443]},["alt",{sourceInterval:[2432,2442]},["terminal",{sourceInterval:[2432,2436]},`
218
+ `],["app",{sourceInterval:[2439,2442]},"end",[]]]]]],comment_multiLine:["define",{sourceInterval:[2465,2501]},null,[],["seq",{sourceInterval:[2465,2487]},["terminal",{sourceInterval:[2465,2469]},"/*"],["star",{sourceInterval:[2470,2482]},["seq",{sourceInterval:[2471,2480]},["not",{sourceInterval:[2471,2476]},["terminal",{sourceInterval:[2472,2476]},"*/"]],["app",{sourceInterval:[2477,2480]},"any",[]]]],["terminal",{sourceInterval:[2483,2487]},"*/"]]],comment:["define",{sourceInterval:[2398,2501]},null,[],["alt",{sourceInterval:[2412,2501]},["app",{sourceInterval:[2412,2443]},"comment_singleLine",[]],["app",{sourceInterval:[2465,2487]},"comment_multiLine",[]]]],tokens:["define",{sourceInterval:[2505,2520]},null,[],["star",{sourceInterval:[2514,2520]},["app",{sourceInterval:[2514,2519]},"token",[]]]],token:["define",{sourceInterval:[2524,2600]},null,[],["alt",{sourceInterval:[2532,2600]},["app",{sourceInterval:[2532,2540]},"caseName",[]],["app",{sourceInterval:[2543,2550]},"comment",[]],["app",{sourceInterval:[2553,2558]},"ident",[]],["app",{sourceInterval:[2561,2569]},"operator",[]],["app",{sourceInterval:[2572,2583]},"punctuation",[]],["app",{sourceInterval:[2586,2594]},"terminal",[]],["app",{sourceInterval:[2597,2600]},"any",[]]]],operator:["define",{sourceInterval:[2604,2669]},null,[],["alt",{sourceInterval:[2615,2669]},["terminal",{sourceInterval:[2615,2619]},"<:"],["terminal",{sourceInterval:[2622,2625]},"="],["terminal",{sourceInterval:[2628,2632]},":="],["terminal",{sourceInterval:[2635,2639]},"+="],["terminal",{sourceInterval:[2642,2645]},"*"],["terminal",{sourceInterval:[2648,2651]},"+"],["terminal",{sourceInterval:[2654,2657]},"?"],["terminal",{sourceInterval:[2660,2663]},"~"],["terminal",{sourceInterval:[2666,2669]},"&"]]],punctuation:["define",{sourceInterval:[2673,2709]},null,[],["alt",{sourceInterval:[2687,2709]},["terminal",{sourceInterval:[2687,2690]},"<"],["terminal",{sourceInterval:[2693,2696]},">"],["terminal",{sourceInterval:[2699,2702]},","],["terminal",{sourceInterval:[2705,2709]},"--"]]]}]),o1=Object.create(Ve.prototype);function NN(t,e){for(let r in t)if(r===e)return!0;return!1}function QN(t,e,r,n){let i=new tc(n),s,a,u,c=!1;return(r||Qd).createSemantics().addOperation("visit",{Grammars(m){return m.children.map(h=>h.visit())},Grammar(m,h,y,w,x){let k=m.visit();s=i.newGrammar(k),h.child(0)&&h.child(0).visit(),w.children.map(I=>I.visit());let v=s.build();if(v.source=this.source.trimmed(),NN(e,k))throw nz(v);return e[k]=v,v},SuperGrammar(m,h){let y=h.visit();if(y==="null")s.withSuperGrammar(null);else{if(!e||!NN(e,y))throw rz(y,e,h.source);s.withSuperGrammar(e[y])}},Rule_define(m,h,y,w,x){a=m.visit(),u=h.children.map(T=>T.visit())[0]||[],!s.defaultStartRule&&s.ensureSuperGrammar()!==An.ProtoBuiltInRules&&s.withDefaultStartRule(a);let k=x.visit(),v=y.children.map(T=>T.visit())[0],I=this.source.trimmed();return s.define(a,u,k,v,I)},Rule_override(m,h,y,w){a=m.visit(),u=h.children.map(v=>v.visit())[0]||[];let x=this.source.trimmed();s.ensureSuperGrammarRuleForOverriding(a,x),c=!0;let k=w.visit();return c=!1,s.override(a,u,k,null,x)},Rule_extend(m,h,y,w){a=m.visit(),u=h.children.map(v=>v.visit())[0]||[];let x=w.visit(),k=this.source.trimmed();return s.extend(a,u,x,null,k)},RuleBody(m,h){return i.alt(...h.visit()).withSource(this.source)},OverrideRuleBody(m,h){let y=h.visit(),w=y.indexOf(o1);if(w>=0){let x=y.slice(0,w),k=y.slice(w+1);return k.forEach(v=>{if(v===o1)throw hz(v)}),new Xu(s.superGrammar,a,x,k).withSource(this.source)}else return i.alt(...y).withSource(this.source)},Formals(m,h,y){return h.visit()},Params(m,h,y){return h.visit()},Alt(m){return i.alt(...m.visit()).withSource(this.source)},TopLevelTerm_inline(m,h){let y=a+"_"+h.visit(),w=m.visit(),x=this.source.trimmed(),k=!(s.superGrammar&&s.superGrammar.rules[y]);c&&!k?s.override(y,u,w,null,x):s.define(y,u,w,null,x);let v=u.map(I=>i.app(I));return i.app(y,v).withSource(w.source)},OverrideTopLevelTerm_superSplice(m){return o1},Seq(m){return i.seq(...m.children.map(h=>h.visit())).withSource(this.source)},Iter_star(m,h){return i.star(m.visit()).withSource(this.source)},Iter_plus(m,h){return i.plus(m.visit()).withSource(this.source)},Iter_opt(m,h){return i.opt(m.visit()).withSource(this.source)},Pred_not(m,h){return i.not(h.visit()).withSource(this.source)},Pred_lookahead(m,h){return i.lookahead(h.visit()).withSource(this.source)},Lex_lex(m,h){return i.lex(h.visit()).withSource(this.source)},Base_application(m,h){let y=h.children.map(w=>w.visit())[0]||[];return i.app(m.visit(),y).withSource(this.source)},Base_range(m,h,y){return i.range(m.visit(),y.visit()).withSource(this.source)},Base_terminal(m){return i.terminal(m.visit()).withSource(this.source)},Base_paren(m,h,y){return h.visit()},ruleDescr(m,h,y){return h.visit()},ruleDescrText(m){return this.sourceString.trim()},caseName(m,h,y,w,x){return y.visit()},name(m,h){return this.sourceString},nameFirst(m){},nameRest(m){},terminal(m,h,y){return h.children.map(w=>w.visit()).join("")},oneCharTerminal(m,h,y){return h.visit()},escapeChar(m){try{return DN(this.sourceString)}catch(h){throw h instanceof RangeError&&h.message.startsWith("Invalid code point ")?dz(m):h}},NonemptyListOf(m,h,y){return[m.visit()].concat(y.children.map(w=>w.visit()))},EmptyListOf(){return[]},_terminal(){return this.sourceString}})(t).visit()}var Pz=A1(["grammar",{source:`OperationsAndAttributes {
219
+
220
+ AttributeSignature =
221
+ name
222
+
223
+ OperationSignature =
224
+ name Formals?
225
+
226
+ Formals
227
+ = "(" ListOf<name, ","> ")"
228
+
229
+ name (a name)
230
+ = nameFirst nameRest*
231
+
232
+ nameFirst
233
+ = "_"
234
+ | letter
235
+
236
+ nameRest
237
+ = "_"
238
+ | alnum
239
+
240
+ }`},"OperationsAndAttributes",null,"AttributeSignature",{AttributeSignature:["define",{sourceInterval:[29,58]},null,[],["app",{sourceInterval:[54,58]},"name",[]]],OperationSignature:["define",{sourceInterval:[62,100]},null,[],["seq",{sourceInterval:[87,100]},["app",{sourceInterval:[87,91]},"name",[]],["opt",{sourceInterval:[92,100]},["app",{sourceInterval:[92,99]},"Formals",[]]]]],Formals:["define",{sourceInterval:[104,143]},null,[],["seq",{sourceInterval:[118,143]},["terminal",{sourceInterval:[118,121]},"("],["app",{sourceInterval:[122,139]},"ListOf",[["app",{sourceInterval:[129,133]},"name",[]],["terminal",{sourceInterval:[135,138]},","]]],["terminal",{sourceInterval:[140,143]},")"]]],name:["define",{sourceInterval:[147,187]},"a name",[],["seq",{sourceInterval:[168,187]},["app",{sourceInterval:[168,177]},"nameFirst",[]],["star",{sourceInterval:[178,187]},["app",{sourceInterval:[178,186]},"nameRest",[]]]]],nameFirst:["define",{sourceInterval:[191,223]},null,[],["alt",{sourceInterval:[207,223]},["terminal",{sourceInterval:[207,210]},"_"],["app",{sourceInterval:[217,223]},"letter",[]]]],nameRest:["define",{sourceInterval:[227,257]},null,[],["alt",{sourceInterval:[242,257]},["terminal",{sourceInterval:[242,245]},"_"],["app",{sourceInterval:[252,257]},"alnum",[]]]]}]);Cz(An.BuiltInRules);qz(Pz);function Cz(t){let e={empty(){return this.iteration()},nonEmpty(r,n,i){return this.iteration([r].concat(i.children))},self(...r){return this}};kn.BuiltInSemantics=kn.createSemantics(t,null).addOperation("asIteration",{emptyListOf:e.empty,nonemptyListOf:e.nonEmpty,EmptyListOf:e.empty,NonemptyListOf:e.nonEmpty,_iter:e.self})}function qz(t){kn.prototypeGrammarSemantics=t.createSemantics().addOperation("parse",{AttributeSignature(e){return{name:e.parse(),formals:[]}},OperationSignature(e,r){return{name:e.parse(),formals:r.children.map(n=>n.parse())[0]||[]}},Formals(e,r,n){return r.asIteration().children.map(i=>i.parse())},name(e,r){return this.sourceString}}),kn.prototypeGrammar=t}function Rz(t){let e=0,r=[0],n=()=>r[r.length-1],i={},s=/( *).*(?:$|\r?\n|\r)/g,a;for(;(a=s.exec(t))!=null;){let[u,c]=a;if(u.length===0)break;let p=c.length,d=n(),m=e+p;if(p>d)r.push(p),i[m]=1;else if(p<d){let h=r.length;for(;n()!==p;)r.pop();i[m]=-1*(h-r.length)}e+=u.length}return r.length>1&&(i[e]=1-r.length),i}var YN="an indented block",XN="a dedent",LN=1114112,S1=class extends Zu{constructor(e){super(e.input),this.state=e}_indentationAt(e){return this.state.userData[e]||0}atEnd(){return super.atEnd()&&this._indentationAt(this.pos)===0}next(){if(this._indentationAt(this.pos)!==0){this.examinedLength=Math.max(this.examinedLength,this.pos);return}return super.next()}nextCharCode(){return this._indentationAt(this.pos)!==0?(this.examinedLength=Math.max(this.examinedLength,this.pos),LN):super.nextCharCode()}nextCodePoint(){return this._indentationAt(this.pos)!==0?(this.examinedLength=Math.max(this.examinedLength,this.pos),LN):super.nextCodePoint()}},zd=class extends Ve{constructor(e=!0){super(),this.isIndent=e}allowsSkippingPrecedingSpace(){return!0}eval(e){let{inputStream:r}=e,n=e.userData;e.doNotMemoize=!0;let i=r.pos,s=this.isIndent?1:-1;return(n[i]||0)*s>0?(e.userData=Object.create(n),e.userData[i]-=s,e.pushBinding(new Ds(0),i),!0):(e.processFailure(i,this),!1)}getArity(){return 1}_assertAllApplicationsAreValid(e,r){}_isNullable(e,r){return!1}assertChoicesHaveUniformArity(e){}assertIteratedExprsAreNotNullable(e){}introduceParams(e){return this}substituteParams(e){return this}toString(){return this.isIndent?"indent":"dedent"}toDisplayString(){return this.toString()}toFailure(e){let r=this.isIndent?YN:XN;return new In(this,r,"description")}},Mz=new ot("indent"),Dz=new ot("dedent"),Fz=new Xu(I1,"any",[Mz,Dz],[]),jz=new tc().newGrammar("IndentationSensitive").withSuperGrammar(I1).define("indent",[],new zd(!0),YN,void 0,!0).define("dedent",[],new zd(!1),XN,void 0,!0).extend("any",[],Fz,"any character",void 0).build();Object.assign(jz,{_matchStateInitializer(t){t.userData=Rz(t.input),t.inputStream=new S1(t)},supportsIncrementalParsing:!1});An.initApplicationParser(Qd,QN);var Bz=t=>!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t);function $z(t,e,r){let n=Qd.match(t,"Grammars");if(n.failed())throw tz(n);return QN(n,e,void 0,r)}function Vz(t,e,r){let n=Object.create(e||{});if(typeof t!="string")if(Bz(t))t=t.toString();else throw new TypeError("Expected string as first argument, got "+w1(t));return $z(t,n,r),n}function Uz(t,e){return Vz(t,e)}var Wz=String.raw`
241
+ /*
242
+ Superset of the Ohm grammar that allows examples to be embedded in comments.
243
+ Any valid Ohm grammar will also be matched by this grammar.
244
+ */
245
+
246
+ // Example:
247
+ //+ "//+ \"x\"\nG {\n//- \"\"\nstart = \"x\"}"
248
+ OhmWithExamples <: Ohm {
249
+ Grammar := ident SuperGrammar? "{" (#exampleComments Rule)* #exampleComments "}"
250
+
251
+ exampleComments = (spacesNoExampleComment exampleComment)*
252
+
253
+ // Examples:
254
+ //+ "//+ \"blah\""
255
+ //+ "//- \"one\", \"two\""
256
+ //- "// - \"x\", "//-\"x\"
257
+ exampleComment
258
+ = "//+" examples -- positive
259
+ | "//-" examples -- negative
260
+
261
+ examples = spaceNoNl+ nonemptyListOf<jsonString, exampleSep> spaceNoNl*
262
+ exampleSep = "," spaces
263
+
264
+ exampleCommentPrefix = "//+" | "//-"
265
+
266
+ spaceNoNl = ~"\n" space
267
+ spacesNoExampleComment = (~exampleCommentPrefix space)*
268
+
269
+ jsonString = "\"" jsonChar* "\""
270
+
271
+ jsonChar
272
+ = jsonEscape
273
+ | ~"\\" ~"\"" "\u{0020}".."\u{10FFFF}"
274
+
275
+ //+ "\\n", "\\u1234"
276
+ jsonEscape (a JSON escape sequence)
277
+ = "\\\""
278
+ | "\\\\"
279
+ | "\\/"
280
+ | "\\b"
281
+ | "\\f"
282
+ | "\\n"
283
+ | "\\r"
284
+ | "\\t"
285
+ | "\\u" hexDigit hexDigit hexDigit hexDigit -- unicodeEscape
286
+ }
287
+
288
+ /*
289
+ A stricter version of the grammar that prevents many malformed example
290
+ comments from being parsed as regular comments.
291
+ */
292
+ OhmWithExamplesStrict <: OhmWithExamples {
293
+ // Redefine 'comment' to avoid malformed example comments from silently
294
+ // being parsed as regular comments.
295
+ comment :=
296
+ | ~exampleCommentPrefix comment_singleLine
297
+ | comment_multiLine
298
+ }
299
+ `,ZN=Uz(Wz,{Ohm:Qd}),Yd=ZN.OhmWithExamples.createSemantics().addOperation("hasExamples",{_iter(...t){return t.some(e=>e.hasExamples())},exampleComments(t,e){return e.numChildren>0}});Yd.addOperation("examples",{Grammars(t){return t.children.flatMap(e=>e.examples())},Grammar(t,e,r,n,i,s,a){let u=[],c=this.grammarName();for(let p=0;p<i.numChildren;p++){let d=i.child(p).ruleName(),h=n.child(p).examples().map(y=>({...y,grammar:c,rule:d}));u.push(...h)}if(s.hasExamples()){let p=s.examples();u.push(...p.map(d=>({...d,grammar:c,rule:""})))}return u},exampleComments(t,e){return e.children.flatMap(r=>r.examples())},exampleComment_positive(t,e){return e.examples().map(r=>({...r,shouldMatch:!0}))},exampleComment_negative(t,e){return e.examples().map(r=>({...r,shouldMatch:!1}))},examples(t,e,r){return e.asIteration().children.map(n=>({example:JSON.parse(n.sourceString)}))},comment_singleLine(t,e,r){return[]},comment_multiLine(t,e,r){return[]}});Yd.addOperation("grammarName",{Grammar(t,e,r,n,i,s,a){return t.sourceString}});Yd.addOperation("ruleName",{Rule_define(t,e,r,n,i){return t.sourceString},Rule_override(t,e,r,n){return t.sourceString},Rule_extend(t,e,r,n){return t.sourceString}});function Gz(t){let e=ZN.OhmWithExamples.match(t);if(e.failed())throw new Error(e.message);return Yd(e).examples()}var Hz=(t,e)=>e.isIteration()&&e.source.startIdx===t.source.startIdx&&e.source.endIdx===t.source.endIdx&&e.children.length===t.children.length;function zz(t){let e=[];for(let r=0;r<t.length;r++){let n=t[r];if(!n.isIteration()){e.push({kind:"node",node:n});continue}let i=[n];for(let s=r+1;s<t.length&&Hz(n,t[s]);s++)i.push(t[s]),r=s;e.push({kind:"iter",siblings:i})}return e}function eL(t,e=0){let r=[];for(let n of zz(t)){if(n.kind==="node"){r.push(n.node);continue}let{siblings:i}=n,s=[],a=i[0].children.length;for(let u=0;u<a;u++)s.push(...i.map(c=>c.children[u]));r.push(...eL(s,e+1))}return r}Fs.VisitorFamily=f1;Fs.extractExamples=Gz;Fs.getLineAndColumn=Kd;Fs.getLineAndColumnMessage=x1;Fs.recoverSourceOrder=eL;Fs.semanticsForToAST=ez;Fs.toAST=ZH});var RL=P(as=>{"use strict";b();Object.defineProperty(as,"__esModule",{value:!0});function fn(t){let e=t||"";return function(){throw new Error("this method "+e+" is abstract! (it has no implementation in class "+this.constructor.name+")")}}function Ia(t,e){if(!t)throw new Error(e||"Assertion failed")}function N1(t,e,r){let n;Object.defineProperty(t,e,{get(){return n||(n=r.call(this)),n}})}function Jz(t){return t&&Object.assign({},t)}function dL(t,e){let r=[];for(;e-- >0;)r.push(t());return r}function mL(t,e){return new Array(e+1).join(t)}function sm(t,e){return dL(()=>t,e)}function L1(t){let e=[];for(let r=0;r<t.length;r++){let n=t[r];t.lastIndexOf(n)!==r&&e.indexOf(n)<0&&e.push(n)}return e}function gL(t){let e=[];return t.forEach(r=>{e.indexOf(r)<0&&e.push(r)}),e}function Co(t){let e=t[0];return e===e.toUpperCase()}function yL(t){return!Co(t)}function _L(t,e,r){let n=r||" ";return t.length<e?mL(n,e-t.length)+t:t}function Fo(){this.strings=[]}Fo.prototype.append=function(t){this.strings.push(t)};Fo.prototype.contents=function(){return this.strings.join("")};var T1=t=>String.fromCodePoint(parseInt(t,16));function vL(t){if(t.charAt(0)==="\\")switch(t.charAt(1)){case"b":return"\b";case"f":return"\f";case"n":return`
300
+ `;case"r":return"\r";case"t":return" ";case"v":return"\v";case"x":return T1(t.slice(2,4));case"u":return t.charAt(2)==="{"?T1(t.slice(3,-1)):T1(t.slice(2,6));default:return t.charAt(1)}else return t}function V1(t){if(t==null)return String(t);let e=Object.prototype.toString.call(t);try{let r;return t.constructor&&t.constructor.name?r=t.constructor.name:e.indexOf("[object ")===0?r=e.slice(8,-1):r=typeof t,r+": "+JSON.stringify(String(t))}catch{return e}}function bL(t,e="unexpected null value"){if(t==null)throw new Error(e);return t}var Kz=Object.freeze({__proto__:null,abstract:fn,assert:Ia,defineLazyProperty:N1,clone:Jz,repeatFn:dL,repeatStr:mL,repeat:sm,getDuplicates:L1,copyWithoutDuplicates:gL,isSyntactic:Co,isLexical:yL,padLeft:_L,StringBuffer:Fo,unescapeCodePoint:vL,unexpectedObjToString:V1,checkNotNull:bL}),SL=t=>new RegExp(String.raw`\p{${t}}`,"u"),P1=Object.fromEntries(["Cc","Cf","Cn","Co","Cs","Ll","Lm","Lo","Lt","Lu","Mc","Me","Mn","Nd","Nl","No","Pc","Pd","Pe","Pf","Pi","Po","Ps","Sc","Sk","Sm","So","Zl","Zp","Zs"].map(t=>[t,SL(t)]));P1.Ltmo=/\p{Lt}|\p{Lm}|\p{Lo}/u;var rL=Object.fromEntries(["XID_Start","XID_Continue","White_Space"].map(t=>[t,SL(t)])),je=class t{constructor(){if(this.constructor===t)throw new Error("PExpr cannot be instantiated -- it's abstract")}withSource(e){return e&&(this.source=e.trimmed()),this}},Nr=Object.create(je.prototype),Lr=Object.create(je.prototype),Zt=class extends je{constructor(e){super(),this.obj=e}},cr=class extends je{constructor(e,r){super(),this.from=e,this.to=r,this.matchCodePoint=e.length>1||r.length>1}},lr=class extends je{constructor(e){super(),this.index=e}},jt=class extends je{constructor(e){super(),this.terms=e}},qo=class extends jt{constructor(e,r,n){let i=e.rules[r].body;super([n,i]),this.superGrammar=e,this.name=r,this.body=n}},Ro=class extends jt{constructor(e,r,n,i){let s=e.rules[r].body;super([...n,s,...i]),this.superGrammar=e,this.ruleName=r,this.expansionPos=n.length}},Ht=class extends je{constructor(e){super(),this.factors=e}},Sr=class extends je{constructor(e){super(),this.expr=e}},ss=class extends Sr{},js=class extends Sr{},yi=class extends Sr{};ss.prototype.operator="*";js.prototype.operator="+";yi.prototype.operator="?";ss.prototype.minNumMatches=0;js.prototype.minNumMatches=1;yi.prototype.minNumMatches=0;ss.prototype.maxNumMatches=Number.POSITIVE_INFINITY;js.prototype.maxNumMatches=Number.POSITIVE_INFINITY;yi.prototype.maxNumMatches=1;var Yt=class extends je{constructor(e){super(),this.expr=e}},wr=class extends je{constructor(e){super(),this.expr=e}},Or=class extends je{constructor(e){super(),this.expr=e}},nt=class extends je{constructor(e,r=[]){super(),this.ruleName=e,this.args=r}isSyntactic(){return Co(this.ruleName)}toMemoKey(){return this._memoKey||Object.defineProperty(this,"_memoKey",{value:this.toString()}),this._memoKey}},Xt=class extends je{constructor(e){if(super(),this.categoryOrProp=e,e in P1)this.pattern=P1[e];else if(e in rL)this.pattern=rL[e];else throw new Error(`Invalid Unicode category or property name: ${JSON.stringify(e)}`)}};function Bt(t,e){let r;return e?(r=new Error(e.getLineAndColumnMessage()+t),r.shortMessage=t,r.interval=e):r=new Error(t),r}function C1(){return Bt("Interval sources don't match")}function Qz(t){let e=new Error;return Object.defineProperty(e,"message",{enumerable:!0,get(){return t.message}}),Object.defineProperty(e,"shortMessage",{enumerable:!0,get(){return"Expected "+t.getExpectedText()}}),e.interval=t.getInterval(),e}function Yz(t,e,r){let n=e?`Grammar ${t} is not declared in namespace '${e}'`:"Undeclared grammar "+t;return Bt(n,r)}function Xz(t,e){return Bt("Grammar "+t.name+" is already declared in this namespace")}function Zz(t){return Bt(`Grammar '${t.name}' does not support incremental parsing`)}function wL(t,e,r){return Bt("Rule "+t+" is not declared in grammar "+e,r)}function eJ(t,e,r){return Bt("Cannot override rule "+t+" because it is not declared in "+e,r)}function tJ(t,e,r){return Bt("Cannot extend rule "+t+" because it is not declared in "+e,r)}function nL(t,e,r,n){let i="Duplicate declaration for rule '"+t+"' in grammar '"+e+"'";return e!==r&&(i+=" (originally declared in '"+r+"')"),Bt(i,n)}function xL(t,e,r,n){return Bt("Wrong number of parameters for rule "+t+" (expected "+e+", got "+r+")",n)}function rJ(t,e,r,n){return Bt("Wrong number of arguments for rule "+t+" (expected "+e+", got "+r+")",n)}function iL(t,e,r){return Bt("Duplicate parameter names in rule "+t+": "+e.join(", "),r)}function nJ(t,e){return Bt("Invalid parameter to rule "+t+": "+e+" has arity "+e.getArity()+", but parameter expressions must have arity 1",e.source)}var iJ="NOTE: A _syntactic rule_ is a rule whose name begins with a capital letter. See https://ohmjs.org/d/svl for more details.";function sJ(t,e){return Bt("Cannot apply syntactic rule "+t+" from here (inside a lexical context)",e.source)}function aJ(t){let{ruleName:e}=t;return Bt(`applySyntactic is for syntactic rules, but '${e}' is a lexical rule. `+iJ,t.source)}function oJ(t){return Bt("applySyntactic is not required here (in a syntactic context)",t.source)}function sL(t,e){return Bt("Incorrect argument type: expected "+t,e.source)}function uJ(t){return Bt("'...' can appear at most once in a rule body",t.source)}function cJ(t){let e=t._node;Ia(e&&e.isNonterminal()&&e.ctorName==="escapeChar_unicodeCodePoint");let r=t.children.slice(1,-1).map(i=>i.source),n=r[0].coverageWith(...r.slice(1));return Bt(`U+${n.contents} is not a valid Unicode code point`,n)}function kL(t,e){let r=e.length>0?e[e.length-1].args:[],i="Nullable expression "+t.expr.substituteParams(r)+" is not allowed inside '"+t.operator+"' (possible infinite loop)";if(e.length>0){let s=e.map(a=>new nt(a.ruleName,a.args)).join(`
301
+ `);i+=`
302
+ Application stack (most recent application last):
303
+ `+s}return Bt(i,t.expr.source)}function AL(t,e,r,n){return Bt("Rule "+t+" involves an alternation which has inconsistent arity (expected "+e+", got "+r+")",n.source)}function lJ(t){let e=t.map(r=>r.message);return Bt(["Errors:"].concat(e).join(`
304
+ - `),t[0].interval)}function fJ(t,e,r,n){let i=n.slice(0,-1).map(c=>{let p=" "+c[0].name+" > "+c[1];return c.length===3?p+" for '"+c[2]+"'":p}).join(`
305
+ `);i+=`
306
+ `+e+" > "+t;let s="";t==="_iter"&&(s=[`
307
+ NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `," https://ohmjs.org/d/dsa for details."].join(`
308
+ `));let a=[`Missing semantic action for '${t}' in ${r} '${e}'.${s}`,"Action stack (most recent call last):",i].join(`
309
+ `),u=Bt(a);return u.name="missingSemanticAction",u}function pJ(t){if(t.length===1)throw t[0];if(t.length>1)throw lJ(t)}function hJ(t){let e=0;return t.map(n=>{let i=n.toString();return e=Math.max(e,i.length),i}).map(n=>_L(n,e))}function aL(t,e,r){let n=t.length,i=t.slice(0,r),s=t.slice(r+e.length);return(i+e+s).substr(0,n)}function dJ(...t){let e=this,{offset:r}=e,{repeatStr:n}=Kz,i=new Fo;i.append("Line "+e.lineNum+", col "+e.colNum+`:
310
+ `);let s=hJ([e.prevLine==null?0:e.lineNum-1,e.lineNum,e.nextLine==null?0:e.lineNum+1]),a=(d,m,h)=>{i.append(h+s[d]+" | "+m+`
311
+ `)};e.prevLine!=null&&a(0,e.prevLine," "),a(1,e.line,"> ");let u=e.line.length,c=n(" ",u+1);for(let d=0;d<t.length;++d){let m=t[d][0],h=t[d][1];Ia(m>=0&&m<=h,"range start must be >= 0 and <= end");let y=r-e.colNum+1;m=Math.max(0,m-y),h=Math.min(h-y,u),c=aL(c,n("~",h-m),m)}let p=2+s[1].length+3;return i.append(n(" ",p)),c=aL(c,"^",e.colNum-1),i.append(c.replace(/ +$/,"")+`
312
+ `),e.nextLine!=null&&a(2,e.nextLine," "),i.contents()}var q1=[];function IL(t){q1.push(t)}function mJ(t){q1.forEach(e=>{e(t)}),q1=null}function U1(t,e){let r=1,n=1,i=0,s=0,a=null,u=null,c=-1;for(;i<e;){let m=t.charAt(i++);m===`
313
+ `?(r++,n=1,c=s,s=i):m!=="\r"&&n++}let p=t.indexOf(`
314
+ `,s);if(p===-1)p=t.length;else{let m=t.indexOf(`
315
+ `,p+1);a=m===-1?t.slice(p):t.slice(p,m),a=a.replace(/^\r?\n/,"").replace(/\r$/,"")}c>=0&&(u=t.slice(c,s).replace(/\r?\n$/,""));let d=t.slice(s,p).replace(/\r$/,"");return{offset:e,lineNum:r,colNum:n,line:d,prevLine:u,nextLine:a,toString:dJ}}function W1(t,e,...r){return U1(t,e).toString(...r)}var oL=(()=>{let t=0;return e=>""+e+t++})(),Mo=class t{constructor(e,r,n){Object.defineProperty(this,"_sourceString",{value:e,configurable:!1,enumerable:!1,writable:!1}),this.startIdx=r,this.endIdx=n}get sourceString(){return this._sourceString}get contents(){return this._contents===void 0&&(this._contents=this.sourceString.slice(this.startIdx,this.endIdx)),this._contents}get length(){return this.endIdx-this.startIdx}coverageWith(...e){return t.coverage(...e,this)}collapsedLeft(){return new t(this.sourceString,this.startIdx,this.startIdx)}collapsedRight(){return new t(this.sourceString,this.endIdx,this.endIdx)}getLineAndColumn(){return U1(this.sourceString,this.startIdx)}getLineAndColumnMessage(){let e=[this.startIdx,this.endIdx];return W1(this.sourceString,this.startIdx,e)}minus(e){if(this.sourceString!==e.sourceString)throw C1();return this.startIdx===e.startIdx&&this.endIdx===e.endIdx?[]:this.startIdx<e.startIdx&&e.endIdx<this.endIdx?[new t(this.sourceString,this.startIdx,e.startIdx),new t(this.sourceString,e.endIdx,this.endIdx)]:this.startIdx<e.endIdx&&e.endIdx<this.endIdx?[new t(this.sourceString,e.endIdx,this.endIdx)]:this.startIdx<e.startIdx&&e.startIdx<this.endIdx?[new t(this.sourceString,this.startIdx,e.startIdx)]:[this]}relativeTo(e){if(this.sourceString!==e.sourceString)throw C1();return Ia(this.startIdx>=e.startIdx&&this.endIdx<=e.endIdx,"other interval does not cover this one"),new t(this.sourceString,this.startIdx-e.startIdx,this.endIdx-e.startIdx)}trimmed(){let{contents:e}=this,r=this.startIdx+e.match(/^\s*/)[0].length,n=this.endIdx-e.match(/\s*$/)[0].length;return new t(this.sourceString,r,n)}subInterval(e,r){let n=this.startIdx+e;return new t(this.sourceString,n,n+r)}};Mo.coverage=function(t,...e){let{startIdx:r,endIdx:n}=t;for(let i of e){if(i.sourceString!==t.sourceString)throw C1();r=Math.min(r,i.startIdx),n=Math.max(n,i.endIdx)}return new Mo(t.sourceString,r,n)};var gJ=65535,yJ=1114111,rc=class{constructor(e){this.source=e,this.pos=0,this.examinedLength=0}atEnd(){let e=this.pos>=this.source.length;return this.examinedLength=Math.max(this.examinedLength,this.pos+1),e}next(){let e=this.source[this.pos++];return this.examinedLength=Math.max(this.examinedLength,this.pos),e}nextCharCode(){let e=this.next();return e&&e.charCodeAt(0)}nextCodePoint(){let e=this.source.slice(this.pos++).codePointAt(0);return e>gJ&&(this.pos+=1),this.examinedLength=Math.max(this.examinedLength,this.pos),e}matchString(e,r){let n;if(r){for(n=0;n<e.length;n++){let i=this.next(),s=e[n];if(i==null||i.toUpperCase()!==s.toUpperCase())return!1}return!0}for(n=0;n<e.length;n++)if(this.next()!==e[n])return!1;return!0}sourceSlice(e,r){return this.source.slice(e,r)}interval(e,r){return new Mo(this.source,e,r||this.pos)}},Xd=class{constructor(e,r,n,i,s,a,u){this.matcher=e,this.input=r,this.startExpr=n,this._cst=i,this._cstOffset=s,this._rightmostFailurePosition=a,this._rightmostFailures=u,this.failed()&&(N1(this,"message",function(){let c="Expected "+this.getExpectedText();return W1(this.input,this.getRightmostFailurePosition())+c}),N1(this,"shortMessage",function(){let c="expected "+this.getExpectedText(),p=U1(this.input,this.getRightmostFailurePosition());return"Line "+p.lineNum+", col "+p.colNum+": "+c}))}succeeded(){return!!this._cst}failed(){return!this.succeeded()}getRightmostFailurePosition(){return this._rightmostFailurePosition}getRightmostFailures(){if(!this._rightmostFailures){this.matcher.setInput(this.input);let e=this.matcher._match(this.startExpr,{tracing:!1,positionToRecordFailures:this.getRightmostFailurePosition()});this._rightmostFailures=e.getRightmostFailures()}return this._rightmostFailures}toString(){return this.succeeded()?"[match succeeded]":"[match failed at position "+this.getRightmostFailurePosition()+"]"}getExpectedText(){if(this.succeeded())throw new Error("cannot get expected text of a successful MatchResult");let e=new Fo,r=this.getRightmostFailures();r=r.filter(n=>!n.isFluffy());for(let n=0;n<r.length;n++)n>0&&(n===r.length-1?e.append(r.length>2?", or ":" or "):e.append(", ")),e.append(r[n].toString());return e.contents()}getInterval(){let e=this.getRightmostFailurePosition();return new Mo(this.input,e,e)}},R1=class{constructor(){this.applicationMemoKeyStack=[],this.memo={},this.maxExaminedLength=0,this.maxRightmostFailureOffset=-1,this.currentLeftRecursion=void 0}isActive(e){return this.applicationMemoKeyStack.indexOf(e.toMemoKey())>=0}enter(e){this.applicationMemoKeyStack.push(e.toMemoKey())}exit(){this.applicationMemoKeyStack.pop()}startLeftRecursion(e,r){r.isLeftRecursion=!0,r.headApplication=e,r.nextLeftRecursion=this.currentLeftRecursion,this.currentLeftRecursion=r;let{applicationMemoKeyStack:n}=this,i=n.indexOf(e.toMemoKey())+1,s=n.slice(i);r.isInvolved=function(a){return s.indexOf(a)>=0},r.updateInvolvedApplicationMemoKeys=function(){for(let a=i;a<n.length;a++){let u=n[a];this.isInvolved(u)||s.push(u)}}}endLeftRecursion(){this.currentLeftRecursion=this.currentLeftRecursion.nextLeftRecursion}shouldUseMemoizedResult(e){if(!e.isLeftRecursion)return!0;let{applicationMemoKeyStack:r}=this;for(let n=0;n<r.length;n++){let i=r[n];if(e.isInvolved(i))return!1}return!0}memoize(e,r){return this.memo[e]=r,this.maxExaminedLength=Math.max(this.maxExaminedLength,r.examinedLength),this.maxRightmostFailureOffset=Math.max(this.maxRightmostFailureOffset,r.rightmostFailureOffset),r}clearObsoleteEntries(e,r){if(e+this.maxExaminedLength<=r)return;let{memo:n}=this;this.maxExaminedLength=0,this.maxRightmostFailureOffset=-1,Object.keys(n).forEach(i=>{let s=n[i];e+s.examinedLength>r?delete n[i]:(this.maxExaminedLength=Math.max(this.maxExaminedLength,s.examinedLength),this.maxRightmostFailureOffset=Math.max(this.maxRightmostFailureOffset,s.rightmostFailureOffset))})}},_J="\u2717",vJ="\u2713",bJ="\u22C5",SJ="\u21D2",wJ="\u2409",xJ="\u240A",kJ="\u240D",M1={succeeded:1,isRootNode:2,isImplicitSpaces:4,isMemoized:8,isHeadOfLeftRecursion:16,terminatesLR:32};function AJ(t){return sm(" ",t).join("")}function IJ(t,e,r){let n=TL(t.slice(e,e+r));return n.length<r?n+sm(" ",r-n.length).join(""):n}function TL(t){return typeof t=="string"?t.replace(/ /g,bJ).replace(/\t/g,wJ).replace(/\n/g,xJ).replace(/\r/g,kJ):String(t)}var nc=class t{constructor(e,r,n,i,s,a,u){this.input=e,this.pos=this.pos1=r,this.pos2=n,this.source=new Mo(e,r,n),this.expr=i,this.bindings=a,this.children=u||[],this.terminatingLREntry=null,this._flags=s?M1.succeeded:0}get displayString(){return this.expr.toDisplayString()}clone(){return this.cloneWithExpr(this.expr)}cloneWithExpr(e){let r=new t(this.input,this.pos,this.pos2,e,this.succeeded,this.bindings,this.children);return r.isHeadOfLeftRecursion=this.isHeadOfLeftRecursion,r.isImplicitSpaces=this.isImplicitSpaces,r.isMemoized=this.isMemoized,r.isRootNode=this.isRootNode,r.terminatesLR=this.terminatesLR,r.terminatingLREntry=this.terminatingLREntry,r}recordLRTermination(e,r){this.terminatingLREntry=new t(this.input,this.pos,this.pos2,this.expr,!1,[r],[e]),this.terminatingLREntry.terminatesLR=!0}walk(e,r){let n=e;typeof n=="function"&&(n={enter:n});function i(s,a,u){let c=!0;n.enter&&n.enter.call(r,s,a,u)===t.prototype.SKIP&&(c=!1),c&&(s.children.forEach(p=>{i(p,s,u+1)}),n.exit&&n.exit.call(r,s,a,u))}this.isRootNode?this.children.forEach(s=>{i(s,null,0)}):i(this,null,0)}toString(){let e=new Fo;return this.walk((r,n,i)=>{if(!r)return this.SKIP;if(r.expr.constructor.name!=="Alt"){if(e.append(IJ(r.input,r.pos,10)+AJ(i*2+1)),e.append((r.succeeded?vJ:_J)+" "+r.displayString),r.isHeadOfLeftRecursion&&e.append(" (LR)"),r.succeeded){let a=TL(r.source.contents);e.append(" "+SJ+" "),e.append(typeof a=="string"?'"'+a+'"':a)}e.append(`
316
+ `)}}),e.contents()}};nc.prototype.SKIP={};Object.keys(M1).forEach(t=>{let e=M1[t];Object.defineProperty(nc.prototype,t,{get(){return(this._flags&e)!==0},set(r){r?this._flags|=e:this._flags&=~e}})});je.prototype.allowsSkippingPrecedingSpace=fn("allowsSkippingPrecedingSpace");Nr.allowsSkippingPrecedingSpace=Lr.allowsSkippingPrecedingSpace=nt.prototype.allowsSkippingPrecedingSpace=Zt.prototype.allowsSkippingPrecedingSpace=cr.prototype.allowsSkippingPrecedingSpace=Xt.prototype.allowsSkippingPrecedingSpace=function(){return!0};jt.prototype.allowsSkippingPrecedingSpace=Sr.prototype.allowsSkippingPrecedingSpace=Or.prototype.allowsSkippingPrecedingSpace=wr.prototype.allowsSkippingPrecedingSpace=Yt.prototype.allowsSkippingPrecedingSpace=lr.prototype.allowsSkippingPrecedingSpace=Ht.prototype.allowsSkippingPrecedingSpace=function(){return!1};var af;IL(t=>{af=t});var Zd;je.prototype.assertAllApplicationsAreValid=function(t,e){Zd=0,this._assertAllApplicationsAreValid(t,e)};je.prototype._assertAllApplicationsAreValid=fn("_assertAllApplicationsAreValid");Nr._assertAllApplicationsAreValid=Lr._assertAllApplicationsAreValid=Zt.prototype._assertAllApplicationsAreValid=cr.prototype._assertAllApplicationsAreValid=lr.prototype._assertAllApplicationsAreValid=Xt.prototype._assertAllApplicationsAreValid=function(t,e){};Or.prototype._assertAllApplicationsAreValid=function(t,e){Zd++,this.expr._assertAllApplicationsAreValid(t,e),Zd--};jt.prototype._assertAllApplicationsAreValid=function(t,e){for(let r=0;r<this.terms.length;r++)this.terms[r]._assertAllApplicationsAreValid(t,e)};Ht.prototype._assertAllApplicationsAreValid=function(t,e){for(let r=0;r<this.factors.length;r++)this.factors[r]._assertAllApplicationsAreValid(t,e)};Sr.prototype._assertAllApplicationsAreValid=Yt.prototype._assertAllApplicationsAreValid=wr.prototype._assertAllApplicationsAreValid=function(t,e){this.expr._assertAllApplicationsAreValid(t,e)};nt.prototype._assertAllApplicationsAreValid=function(t,e,r=!1){let n=e.rules[this.ruleName],i=Co(t)&&Zd===0;if(!n)throw wL(this.ruleName,e.name,this.source);if(!r&&Co(this.ruleName)&&!i)throw sJ(this.ruleName,this);let s=this.args.length,a=n.formals.length;if(s!==a)throw rJ(this.ruleName,a,s,this.source);let u=af&&n===af.rules.applySyntactic;if(af&&n===af.rules.caseInsensitive&&!(this.args[0]instanceof Zt))throw sL('a Terminal (e.g. "abc")',this.args[0]);if(u){let p=this.args[0];if(!(p instanceof nt))throw sL("a syntactic rule application",p);if(!Co(p.ruleName))throw aJ(p);if(i)throw oJ(this)}this.args.forEach(p=>{if(p._assertAllApplicationsAreValid(t,e,u),p.getArity()!==1)throw nJ(this.ruleName,p)})};je.prototype.assertChoicesHaveUniformArity=fn("assertChoicesHaveUniformArity");Nr.assertChoicesHaveUniformArity=Lr.assertChoicesHaveUniformArity=Zt.prototype.assertChoicesHaveUniformArity=cr.prototype.assertChoicesHaveUniformArity=lr.prototype.assertChoicesHaveUniformArity=Or.prototype.assertChoicesHaveUniformArity=Xt.prototype.assertChoicesHaveUniformArity=function(t){};jt.prototype.assertChoicesHaveUniformArity=function(t){if(this.terms.length===0)return;let e=this.terms[0].getArity();for(let r=0;r<this.terms.length;r++){let n=this.terms[r];n.assertChoicesHaveUniformArity();let i=n.getArity();if(e!==i)throw AL(t,e,i,n)}};qo.prototype.assertChoicesHaveUniformArity=function(t){let e=this.terms[0].getArity(),r=this.terms[1].getArity();if(e!==r)throw AL(t,r,e,this.terms[0])};Ht.prototype.assertChoicesHaveUniformArity=function(t){for(let e=0;e<this.factors.length;e++)this.factors[e].assertChoicesHaveUniformArity(t)};Sr.prototype.assertChoicesHaveUniformArity=function(t){this.expr.assertChoicesHaveUniformArity(t)};Yt.prototype.assertChoicesHaveUniformArity=function(t){};wr.prototype.assertChoicesHaveUniformArity=function(t){this.expr.assertChoicesHaveUniformArity(t)};nt.prototype.assertChoicesHaveUniformArity=function(t){};je.prototype.assertIteratedExprsAreNotNullable=fn("assertIteratedExprsAreNotNullable");Nr.assertIteratedExprsAreNotNullable=Lr.assertIteratedExprsAreNotNullable=Zt.prototype.assertIteratedExprsAreNotNullable=cr.prototype.assertIteratedExprsAreNotNullable=lr.prototype.assertIteratedExprsAreNotNullable=Xt.prototype.assertIteratedExprsAreNotNullable=function(t){};jt.prototype.assertIteratedExprsAreNotNullable=function(t){for(let e=0;e<this.terms.length;e++)this.terms[e].assertIteratedExprsAreNotNullable(t)};Ht.prototype.assertIteratedExprsAreNotNullable=function(t){for(let e=0;e<this.factors.length;e++)this.factors[e].assertIteratedExprsAreNotNullable(t)};Sr.prototype.assertIteratedExprsAreNotNullable=function(t){if(this.expr.assertIteratedExprsAreNotNullable(t),this.expr.isNullable(t))throw kL(this,[])};yi.prototype.assertIteratedExprsAreNotNullable=Yt.prototype.assertIteratedExprsAreNotNullable=wr.prototype.assertIteratedExprsAreNotNullable=Or.prototype.assertIteratedExprsAreNotNullable=function(t){this.expr.assertIteratedExprsAreNotNullable(t)};nt.prototype.assertIteratedExprsAreNotNullable=function(t){this.args.forEach(e=>{e.assertIteratedExprsAreNotNullable(t)})};var uf=class{constructor(e){this.matchLength=e}get ctorName(){throw new Error("subclass responsibility")}numChildren(){return this.children?this.children.length:0}childAt(e){if(this.children)return this.children[e]}indexOfChild(e){return this.children.indexOf(e)}hasChildren(){return this.numChildren()>0}hasNoChildren(){return!this.hasChildren()}onlyChild(){if(this.numChildren()!==1)throw new Error("cannot get only child of a node of type "+this.ctorName+" (it has "+this.numChildren()+" children)");return this.firstChild()}firstChild(){if(this.hasNoChildren())throw new Error("cannot get first child of a "+this.ctorName+" node, which has no children");return this.childAt(0)}lastChild(){if(this.hasNoChildren())throw new Error("cannot get last child of a "+this.ctorName+" node, which has no children");return this.childAt(this.numChildren()-1)}childBefore(e){let r=this.indexOfChild(e);if(r<0)throw new Error("Node.childBefore() called w/ an argument that is not a child");if(r===0)throw new Error("cannot get child before first child");return this.childAt(r-1)}childAfter(e){let r=this.indexOfChild(e);if(r<0)throw new Error("Node.childAfter() called w/ an argument that is not a child");if(r===this.numChildren()-1)throw new Error("cannot get child after last child");return this.childAt(r+1)}isTerminal(){return!1}isNonterminal(){return!1}isIteration(){return!1}isOptional(){return!1}},Bs=class extends uf{get ctorName(){return"_terminal"}isTerminal(){return!0}get primitiveValue(){throw new Error("The `primitiveValue` property was removed in Ohm v17.")}},D1=class extends uf{constructor(e,r,n,i){super(i),this.ruleName=e,this.children=r,this.childOffsets=n}get ctorName(){return this.ruleName}isNonterminal(){return!0}isLexical(){return yL(this.ctorName)}isSyntactic(){return Co(this.ctorName)}},em=class extends uf{constructor(e,r,n,i){super(n),this.children=e,this.childOffsets=r,this.optional=i}get ctorName(){return"_iter"}isIteration(){return!0}isOptional(){return this.optional}};je.prototype.eval=fn("eval");Nr.eval=function(t){let{inputStream:e}=t,r=e.pos,n=e.nextCodePoint();return n!==void 0?(t.pushBinding(new Bs(String.fromCodePoint(n).length),r),!0):(t.processFailure(r,this),!1)};Lr.eval=function(t){let{inputStream:e}=t,r=e.pos;return e.atEnd()?(t.pushBinding(new Bs(0),r),!0):(t.processFailure(r,this),!1)};Zt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;return e.matchString(this.obj)?(t.pushBinding(new Bs(this.obj.length),r),!0):(t.processFailure(r,this),!1)};cr.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,n=this.matchCodePoint?e.nextCodePoint():e.nextCharCode();return n!==void 0&&this.from.codePointAt(0)<=n&&n<=this.to.codePointAt(0)?(t.pushBinding(new Bs(String.fromCodePoint(n).length),r),!0):(t.processFailure(r,this),!1)};lr.prototype.eval=function(t){return t.eval(t.currentApplication().args[this.index])};Or.prototype.eval=function(t){t.enterLexifiedContext();let e=t.eval(this.expr);return t.exitLexifiedContext(),e};jt.prototype.eval=function(t){for(let e=0;e<this.terms.length;e++)if(t.eval(this.terms[e]))return!0;return!1};Ht.prototype.eval=function(t){for(let e=0;e<this.factors.length;e++){let r=this.factors[e];if(!t.eval(r))return!1}return!0};Sr.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,n=this.getArity(),i=[],s=[];for(;i.length<n;)i.push([]),s.push([]);let a=0,u=r,c;for(;a<this.maxNumMatches&&t.eval(this.expr);){if(e.pos===u)throw kL(this,t._applicationStack);u=e.pos,a++;let h=t._bindings.splice(t._bindings.length-n,n),y=t._bindingOffsets.splice(t._bindingOffsets.length-n,n);for(c=0;c<h.length;c++)i[c].push(h[c]),s[c].push(y[c])}if(a<this.minNumMatches)return!1;let p=t.posToOffset(r),d=0;if(a>0){let h=i[n-1],y=s[n-1],w=y[y.length-1]+h[h.length-1].matchLength;p=s[0][0],d=w-p}let m=this instanceof yi;for(c=0;c<i.length;c++)t._bindings.push(new em(i[c],s[c],d,m)),t._bindingOffsets.push(p);return!0};Yt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;t.pushFailuresInfo();let n=t.eval(this.expr);return t.popFailuresInfo(),n?(t.processFailure(r,this),!1):(e.pos=r,!0)};wr.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;return t.eval(this.expr)?(e.pos=r,!0):!1};nt.prototype.eval=function(t){let e=t.currentApplication(),r=e?e.args:[],n=this.substituteParams(r),i=t.getCurrentPosInfo();if(i.isActive(n))return n.handleCycle(t);let s=n.toMemoKey(),a=i.memo[s];if(a&&i.shouldUseMemoizedResult(a)){if(t.hasNecessaryInfo(a))return t.useMemoizedResult(t.inputStream.pos,a);delete i.memo[s]}return n.reallyEval(t)};nt.prototype.handleCycle=function(t){let e=t.getCurrentPosInfo(),{currentLeftRecursion:r}=e,n=this.toMemoKey(),i=e.memo[n];return r&&r.headApplication.toMemoKey()===n?i.updateInvolvedApplicationMemoKeys():i||(i=e.memoize(n,{matchLength:0,examinedLength:0,value:!1,rightmostFailureOffset:-1}),e.startLeftRecursion(this,i)),t.useMemoizedResult(t.inputStream.pos,i)};nt.prototype.reallyEval=function(t){let{inputStream:e}=t,r=e.pos,n=t.getCurrentPosInfo(),i=t.grammar.rules[this.ruleName],{body:s}=i,{description:a}=i;t.enterApplication(n,this),a&&t.pushFailuresInfo();let u=e.examinedLength;e.examinedLength=0;let c=this.evalOnce(s,t),p=n.currentLeftRecursion,d=this.toMemoKey(),m=p&&p.headApplication.toMemoKey()===d,h;t.doNotMemoize?t.doNotMemoize=!1:m?(c=this.growSeedResult(s,t,r,p,c),n.endLeftRecursion(),h=p,h.examinedLength=e.examinedLength-r,h.rightmostFailureOffset=t._getRightmostFailureOffset(),n.memoize(d,h)):(!p||!p.isInvolved(d))&&(h=n.memoize(d,{matchLength:e.pos-r,examinedLength:e.examinedLength-r,value:c,failuresAtRightmostPosition:t.cloneRecordedFailures(),rightmostFailureOffset:t._getRightmostFailureOffset()}));let y=!!c;if(a&&(t.popFailuresInfo(),y||t.processFailure(r,this),h&&(h.failuresAtRightmostPosition=t.cloneRecordedFailures(),h.rightmostFailureOffset=t._getRightmostFailureOffset())),t.isTracing()&&h){let w=t.getTraceEntry(r,this,y,y?[c]:[]);m&&(Ia(w.terminatingLREntry!=null||!y),w.isHeadOfLeftRecursion=!0),h.traceEntry=w}return e.examinedLength=Math.max(e.examinedLength,u),t.exitApplication(n,c),y};nt.prototype.evalOnce=function(t,e){let{inputStream:r}=e,n=r.pos;if(e.eval(t)){let i=t.getArity(),s=e._bindings.splice(e._bindings.length-i,i),a=e._bindingOffsets.splice(e._bindingOffsets.length-i,i),u=r.pos-n;return new D1(this.ruleName,s,a,u)}else return!1};nt.prototype.growSeedResult=function(t,e,r,n,i){if(!i)return!1;let{inputStream:s}=e;for(;;){if(n.matchLength=s.pos-r,n.value=i,n.failuresAtRightmostPosition=e.cloneRecordedFailures(),e.isTracing()){let a=e.trace[e.trace.length-1];n.traceEntry=new nc(e.input,r,s.pos,this,!0,[i],[a.clone()])}if(s.pos=r,i=this.evalOnce(t,e),s.pos-r<=n.matchLength)break;e.isTracing()&&e.trace.splice(-2,1)}return e.isTracing()&&n.traceEntry.recordLRTermination(e.trace.pop(),i),s.pos=r+n.matchLength,n.value};Xt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,n=e.nextCodePoint();if(n!==void 0&&n<=yJ){let i=String.fromCodePoint(n);if(this.pattern.test(i))return t.pushBinding(new Bs(i.length),r),!0}return t.processFailure(r,this),!1};je.prototype.getArity=fn("getArity");Nr.getArity=Lr.getArity=Zt.prototype.getArity=cr.prototype.getArity=lr.prototype.getArity=nt.prototype.getArity=Xt.prototype.getArity=function(){return 1};jt.prototype.getArity=function(){return this.terms.length===0?0:this.terms[0].getArity()};Ht.prototype.getArity=function(){let t=0;for(let e=0;e<this.factors.length;e++)t+=this.factors[e].getArity();return t};Sr.prototype.getArity=function(){return this.expr.getArity()};Yt.prototype.getArity=function(){return 0};wr.prototype.getArity=Or.prototype.getArity=function(){return this.expr.getArity()};function Bi(t,e){let r={};if(t.source&&e){let n=t.source.relativeTo(e);r.sourceInterval=[n.startIdx,n.endIdx]}return r}je.prototype.outputRecipe=fn("outputRecipe");Nr.outputRecipe=function(t,e){return["any",Bi(this,e)]};Lr.outputRecipe=function(t,e){return["end",Bi(this,e)]};Zt.prototype.outputRecipe=function(t,e){return["terminal",Bi(this,e),this.obj]};cr.prototype.outputRecipe=function(t,e){return["range",Bi(this,e),this.from,this.to]};lr.prototype.outputRecipe=function(t,e){return["param",Bi(this,e),this.index]};jt.prototype.outputRecipe=function(t,e){return["alt",Bi(this,e)].concat(this.terms.map(r=>r.outputRecipe(t,e)))};qo.prototype.outputRecipe=function(t,e){return this.terms[0].outputRecipe(t,e)};Ro.prototype.outputRecipe=function(t,e){let r=this.terms.slice(0,this.expansionPos),n=this.terms.slice(this.expansionPos+1);return["splice",Bi(this,e),r.map(i=>i.outputRecipe(t,e)),n.map(i=>i.outputRecipe(t,e))]};Ht.prototype.outputRecipe=function(t,e){return["seq",Bi(this,e)].concat(this.factors.map(r=>r.outputRecipe(t,e)))};ss.prototype.outputRecipe=js.prototype.outputRecipe=yi.prototype.outputRecipe=Yt.prototype.outputRecipe=wr.prototype.outputRecipe=Or.prototype.outputRecipe=function(t,e){return[this.constructor.name.toLowerCase(),Bi(this,e),this.expr.outputRecipe(t,e)]};nt.prototype.outputRecipe=function(t,e){return["app",Bi(this,e),this.ruleName,this.args.map(r=>r.outputRecipe(t,e))]};Xt.prototype.outputRecipe=function(t,e){return["unicodeChar",Bi(this,e),this.categoryOrProp]};je.prototype.introduceParams=fn("introduceParams");Nr.introduceParams=Lr.introduceParams=Zt.prototype.introduceParams=cr.prototype.introduceParams=lr.prototype.introduceParams=Xt.prototype.introduceParams=function(t){return this};jt.prototype.introduceParams=function(t){return this.terms.forEach((e,r,n)=>{n[r]=e.introduceParams(t)}),this};Ht.prototype.introduceParams=function(t){return this.factors.forEach((e,r,n)=>{n[r]=e.introduceParams(t)}),this};Sr.prototype.introduceParams=Yt.prototype.introduceParams=wr.prototype.introduceParams=Or.prototype.introduceParams=function(t){return this.expr=this.expr.introduceParams(t),this};nt.prototype.introduceParams=function(t){let e=t.indexOf(this.ruleName);if(e>=0){if(this.args.length>0)throw new Error("Parameterized rules cannot be passed as arguments to another rule.");return new lr(e).withSource(this.source)}else return this.args.forEach((r,n,i)=>{i[n]=r.introduceParams(t)}),this};je.prototype.isNullable=function(t){return this._isNullable(t,Object.create(null))};je.prototype._isNullable=fn("_isNullable");Nr._isNullable=cr.prototype._isNullable=lr.prototype._isNullable=js.prototype._isNullable=Xt.prototype._isNullable=function(t,e){return!1};Lr._isNullable=function(t,e){return!0};Zt.prototype._isNullable=function(t,e){return typeof this.obj=="string"?this.obj==="":!1};jt.prototype._isNullable=function(t,e){return this.terms.length===0||this.terms.some(r=>r._isNullable(t,e))};Ht.prototype._isNullable=function(t,e){return this.factors.every(r=>r._isNullable(t,e))};ss.prototype._isNullable=yi.prototype._isNullable=Yt.prototype._isNullable=wr.prototype._isNullable=function(t,e){return!0};Or.prototype._isNullable=function(t,e){return this.expr._isNullable(t,e)};nt.prototype._isNullable=function(t,e){let r=this.toMemoKey();if(!Object.prototype.hasOwnProperty.call(e,r)){let{body:n}=t.rules[this.ruleName],i=n.substituteParams(this.args);e[r]=!1,e[r]=i._isNullable(t,e)}return e[r]};je.prototype.substituteParams=fn("substituteParams");Nr.substituteParams=Lr.substituteParams=Zt.prototype.substituteParams=cr.prototype.substituteParams=Xt.prototype.substituteParams=function(t){return this};lr.prototype.substituteParams=function(t){return bL(t[this.index])};jt.prototype.substituteParams=function(t){return new jt(this.terms.map(e=>e.substituteParams(t)))};Ht.prototype.substituteParams=function(t){return new Ht(this.factors.map(e=>e.substituteParams(t)))};Sr.prototype.substituteParams=Yt.prototype.substituteParams=wr.prototype.substituteParams=Or.prototype.substituteParams=function(t){return new this.constructor(this.expr.substituteParams(t))};nt.prototype.substituteParams=function(t){if(this.args.length===0)return this;{let e=this.args.map(r=>r.substituteParams(t));return new nt(this.ruleName,e)}};function uL(t){return/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)}function G1(t){let e=Object.create(null);t.forEach(r=>{e[r]=(e[r]||0)+1}),Object.keys(e).forEach(r=>{if(e[r]<=1)return;let n=1;t.forEach((i,s)=>{i===r&&(t[s]=i+"_"+n++)})})}je.prototype.toArgumentNameList=fn("toArgumentNameList");Nr.toArgumentNameList=function(t,e){return["any"]};Lr.toArgumentNameList=function(t,e){return["end"]};Zt.prototype.toArgumentNameList=function(t,e){return typeof this.obj=="string"&&/^[_a-zA-Z0-9]+$/.test(this.obj)?["_"+this.obj]:["$"+t]};cr.prototype.toArgumentNameList=function(t,e){let r=this.from+"_to_"+this.to;return uL(r)||(r="_"+r),uL(r)||(r="$"+t),[r]};jt.prototype.toArgumentNameList=function(t,e){let r=this.terms.map(s=>s.toArgumentNameList(t,!0)),n=[],i=r[0].length;for(let s=0;s<i;s++){let a=[];for(let c=0;c<this.terms.length;c++)a.push(r[c][s]);let u=gL(a);n.push(u.join("_or_"))}return e||G1(n),n};Ht.prototype.toArgumentNameList=function(t,e){let r=[];return this.factors.forEach(n=>{let i=n.toArgumentNameList(t,!0);r=r.concat(i),t+=i.length}),e||G1(r),r};Sr.prototype.toArgumentNameList=function(t,e){let r=this.expr.toArgumentNameList(t,e).map(n=>n[n.length-1]==="s"?n+"es":n+"s");return e||G1(r),r};yi.prototype.toArgumentNameList=function(t,e){return this.expr.toArgumentNameList(t,e).map(r=>"opt"+r[0].toUpperCase()+r.slice(1))};Yt.prototype.toArgumentNameList=function(t,e){return[]};wr.prototype.toArgumentNameList=Or.prototype.toArgumentNameList=function(t,e){return this.expr.toArgumentNameList(t,e)};nt.prototype.toArgumentNameList=function(t,e){return[this.ruleName]};Xt.prototype.toArgumentNameList=function(t,e){return["$"+t]};lr.prototype.toArgumentNameList=function(t,e){return["param"+this.index]};je.prototype.toDisplayString=fn("toDisplayString");jt.prototype.toDisplayString=Ht.prototype.toDisplayString=function(){return this.source?this.source.trimmed().contents:"["+this.constructor.name+"]"};Nr.toDisplayString=Lr.toDisplayString=Sr.prototype.toDisplayString=Yt.prototype.toDisplayString=wr.prototype.toDisplayString=Or.prototype.toDisplayString=Zt.prototype.toDisplayString=cr.prototype.toDisplayString=lr.prototype.toDisplayString=function(){return this.toString()};nt.prototype.toDisplayString=function(){if(this.args.length>0){let t=this.args.map(e=>e.toDisplayString());return this.ruleName+"<"+t.join(",")+">"}else return this.ruleName};Xt.prototype.toDisplayString=function(){return"Unicode ["+this.categoryOrProp+"] character"};function TJ(t){return t==="description"||t==="string"||t==="code"}var On=class t{constructor(e,r,n){if(!TJ(n))throw new Error("invalid Failure type: "+n);this.pexpr=e,this.text=r,this.type=n,this.fluffy=!1}getPExpr(){return this.pexpr}getText(){return this.text}getType(){return this.type}isDescription(){return this.type==="description"}isStringTerminal(){return this.type==="string"}isCode(){return this.type==="code"}isFluffy(){return this.fluffy}makeFluffy(){this.fluffy=!0}clearFluffy(){this.fluffy=!1}subsumes(e){return this.getText()===e.getText()&&this.type===e.type&&(!this.isFluffy()||this.isFluffy()&&e.isFluffy())}toString(){return this.type==="string"?JSON.stringify(this.getText()):this.getText()}clone(){let e=new t(this.pexpr,this.text,this.type);return this.isFluffy()&&e.makeFluffy(),e}toKey(){return this.toString()+"#"+this.type}};je.prototype.toFailure=fn("toFailure");Nr.toFailure=function(t){return new On(this,"any object","description")};Lr.toFailure=function(t){return new On(this,"end of input","description")};Zt.prototype.toFailure=function(t){return new On(this,this.obj,"string")};cr.prototype.toFailure=function(t){return new On(this,JSON.stringify(this.from)+".."+JSON.stringify(this.to),"code")};Yt.prototype.toFailure=function(t){let e=this.expr===Nr?"nothing":"not "+this.expr.toFailure(t);return new On(this,e,"description")};wr.prototype.toFailure=function(t){return this.expr.toFailure(t)};nt.prototype.toFailure=function(t){let{description:e}=t.rules[this.ruleName];return e||(e=(/^[aeiouAEIOU]/.test(this.ruleName)?"an":"a")+" "+this.ruleName),new On(this,e,"description")};Xt.prototype.toFailure=function(t){return new On(this,"a Unicode ["+this.categoryOrProp+"] character","description")};jt.prototype.toFailure=function(t){let r="("+this.terms.map(n=>n.toFailure(t)).join(" or ")+")";return new On(this,r,"description")};Ht.prototype.toFailure=function(t){let r="("+this.factors.map(n=>n.toFailure(t)).join(" ")+")";return new On(this,r,"description")};Sr.prototype.toFailure=function(t){let e="("+this.expr.toFailure(t)+this.operator+")";return new On(this,e,"description")};je.prototype.toString=fn("toString");Nr.toString=function(){return"any"};Lr.toString=function(){return"end"};Zt.prototype.toString=function(){return JSON.stringify(this.obj)};cr.prototype.toString=function(){return JSON.stringify(this.from)+".."+JSON.stringify(this.to)};lr.prototype.toString=function(){return"$"+this.index};Or.prototype.toString=function(){return"#("+this.expr.toString()+")"};jt.prototype.toString=function(){return this.terms.length===1?this.terms[0].toString():"("+this.terms.map(t=>t.toString()).join(" | ")+")"};Ht.prototype.toString=function(){return this.factors.length===1?this.factors[0].toString():"("+this.factors.map(t=>t.toString()).join(" ")+")"};Sr.prototype.toString=function(){return this.expr+this.operator};Yt.prototype.toString=function(){return"~"+this.expr};wr.prototype.toString=function(){return"&"+this.expr};nt.prototype.toString=function(){if(this.args.length>0){let t=this.args.map(e=>e.toString());return this.ruleName+"<"+t.join(",")+">"}else return this.ruleName};Xt.prototype.toString=function(){return"\\p{"+this.categoryOrProp+"}"};var tm=class t extends je{constructor(e){super(),this.obj=e}_getString(e){let r=e.currentApplication().args[this.obj.index];return Ia(r instanceof Zt,"expected a Terminal expression"),r.obj}allowsSkippingPrecedingSpace(){return!0}eval(e){let{inputStream:r}=e,n=r.pos,i=this._getString(e);return r.matchString(i,!0)?(e.pushBinding(new Bs(i.length),n),!0):(e.processFailure(n,this),!1)}getArity(){return 1}substituteParams(e){return new t(this.obj.substituteParams(e))}toDisplayString(){return this.obj.toDisplayString()+" (case-insensitive)"}toFailure(e){return new On(this,this.obj.toFailure(e)+" (case-insensitive)","description")}_isNullable(e,r){return this.obj._isNullable(e,r)}},EJ=Object.freeze({__proto__:null,CaseInsensitiveTerminal:tm,PExpr:je,any:Nr,end:Lr,Terminal:Zt,Range:cr,Param:lr,Alt:jt,Extend:qo,Splice:Ro,Seq:Ht,Iter:Sr,Star:ss,Plus:js,Opt:yi,Not:Yt,Lookahead:wr,Lex:Or,Apply:nt,UnicodeChar:Xt}),EL;IL(t=>{EL=t.rules.applySyntactic.body});var E1=new nt("spaces"),F1=class{constructor(e,r,n){this.matcher=e,this.startExpr=r,this.grammar=e.grammar,this.input=e.getInput(),this.inputStream=new rc(this.input),this.memoTable=e._memoTable,this.userData=void 0,this.doNotMemoize=!1,this._bindings=[],this._bindingOffsets=[],this._applicationStack=[],this._posStack=[0],this.inLexifiedContextStack=[!1],this.rightmostFailurePosition=-1,this._rightmostFailurePositionStack=[],this._recordedFailuresStack=[],n!==void 0&&(this.positionToRecordFailures=n,this.recordedFailures=Object.create(null))}posToOffset(e){return e-this._posStack[this._posStack.length-1]}enterApplication(e,r){this._posStack.push(this.inputStream.pos),this._applicationStack.push(r),this.inLexifiedContextStack.push(!1),e.enter(r),this._rightmostFailurePositionStack.push(this.rightmostFailurePosition),this.rightmostFailurePosition=-1}exitApplication(e,r){let n=this._posStack.pop();this._applicationStack.pop(),this.inLexifiedContextStack.pop(),e.exit(),this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,this._rightmostFailurePositionStack.pop()),r&&this.pushBinding(r,n)}enterLexifiedContext(){this.inLexifiedContextStack.push(!0)}exitLexifiedContext(){this.inLexifiedContextStack.pop()}currentApplication(){return this._applicationStack[this._applicationStack.length-1]}inSyntacticContext(){let e=this.currentApplication();return e?e.isSyntactic()&&!this.inLexifiedContext():this.startExpr.factors[0].isSyntactic()}inLexifiedContext(){return this.inLexifiedContextStack[this.inLexifiedContextStack.length-1]}skipSpaces(){return this.pushFailuresInfo(),this.eval(E1),this.popBinding(),this.popFailuresInfo(),this.inputStream.pos}skipSpacesIfInSyntacticContext(){return this.inSyntacticContext()?this.skipSpaces():this.inputStream.pos}maybeSkipSpacesBefore(e){return e.allowsSkippingPrecedingSpace()&&e!==E1?this.skipSpacesIfInSyntacticContext():this.inputStream.pos}pushBinding(e,r){this._bindings.push(e),this._bindingOffsets.push(this.posToOffset(r))}popBinding(){this._bindings.pop(),this._bindingOffsets.pop()}numBindings(){return this._bindings.length}truncateBindings(e){for(;this._bindings.length>e;)this.popBinding()}getCurrentPosInfo(){return this.getPosInfo(this.inputStream.pos)}getPosInfo(e){let r=this.memoTable[e];return r||(r=this.memoTable[e]=new R1),r}processFailure(e,r){if(this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,e),this.recordedFailures&&e===this.positionToRecordFailures){let n=this.currentApplication();n&&(r=r.substituteParams(n.args)),this.recordFailure(r.toFailure(this.grammar),!1)}}recordFailure(e,r){let n=e.toKey();this.recordedFailures[n]?this.recordedFailures[n].isFluffy()&&!e.isFluffy()&&this.recordedFailures[n].clearFluffy():this.recordedFailures[n]=r?e.clone():e}recordFailures(e,r){Object.keys(e).forEach(n=>{this.recordFailure(e[n],r)})}cloneRecordedFailures(){if(!this.recordedFailures)return;let e=Object.create(null);return Object.keys(this.recordedFailures).forEach(r=>{e[r]=this.recordedFailures[r].clone()}),e}getRightmostFailurePosition(){return this.rightmostFailurePosition}_getRightmostFailureOffset(){return this.rightmostFailurePosition>=0?this.posToOffset(this.rightmostFailurePosition):-1}getMemoizedTraceEntry(e,r){let n=this.memoTable[e];if(n&&r instanceof nt){let i=n.memo[r.toMemoKey()];if(i&&i.traceEntry){let s=i.traceEntry.cloneWithExpr(r);return s.isMemoized=!0,s}}return null}getTraceEntry(e,r,n,i){if(r instanceof nt){let s=this.currentApplication(),a=s?s.args:[];r=r.substituteParams(a)}return this.getMemoizedTraceEntry(e,r)||new nc(this.input,e,this.inputStream.pos,r,n,i,this.trace)}isTracing(){return!!this.trace}hasNecessaryInfo(e){return this.trace&&!e.traceEntry?!1:this.recordedFailures&&this.inputStream.pos+e.rightmostFailureOffset===this.positionToRecordFailures?!!e.failuresAtRightmostPosition:!0}useMemoizedResult(e,r){this.trace&&this.trace.push(r.traceEntry);let n=this.inputStream.pos+r.rightmostFailureOffset;return this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,n),this.recordedFailures&&this.positionToRecordFailures===n&&r.failuresAtRightmostPosition&&this.recordFailures(r.failuresAtRightmostPosition,!0),this.inputStream.examinedLength=Math.max(this.inputStream.examinedLength,r.examinedLength+e),r.value?(this.inputStream.pos+=r.matchLength,this.pushBinding(r.value,e),!0):!1}eval(e){let{inputStream:r}=this,n=this._bindings.length,i=this.userData,s;this.recordedFailures&&(s=this.recordedFailures,this.recordedFailures=Object.create(null));let a=r.pos,u=this.maybeSkipSpacesBefore(e),c;this.trace&&(c=this.trace,this.trace=[]);let p=e.eval(this);if(this.trace){let d=this._bindings.slice(n),m=this.getTraceEntry(u,e,p,d);m.isImplicitSpaces=e===E1,m.isRootNode=e===this.startExpr,c.push(m),this.trace=c}return p?this.recordedFailures&&r.pos===this.positionToRecordFailures&&Object.keys(this.recordedFailures).forEach(d=>{this.recordedFailures[d].makeFluffy()}):(r.pos=a,this.truncateBindings(n),this.userData=i),this.recordedFailures&&this.recordFailures(s,!1),e===EL&&this.skipSpaces(),p}getMatchResult(){this.grammar._setUpMatchState(this),this.eval(this.startExpr);let e;this.recordedFailures&&(e=Object.keys(this.recordedFailures).map(n=>this.recordedFailures[n]));let r=this._bindings[0];return r&&(r.grammar=this.grammar),new Xd(this.matcher,this.input,this.startExpr,r,this._bindingOffsets[0],this.rightmostFailurePosition,e)}getTrace(){this.trace=[];let e=this.getMatchResult(),r=this.trace[this.trace.length-1];return r.result=e,r}pushFailuresInfo(){this._rightmostFailurePositionStack.push(this.rightmostFailurePosition),this._recordedFailuresStack.push(this.recordedFailures)}popFailuresInfo(){this.rightmostFailurePosition=this._rightmostFailurePositionStack.pop(),this.recordedFailures=this._recordedFailuresStack.pop()}},j1=class{constructor(e){this.grammar=e,this._memoTable=[],this._input="",this._isMemoTableStale=!1}_resetMemoTable(){this._memoTable=[],this._isMemoTableStale=!1}getInput(){return this._input}setInput(e){return this._input!==e&&this.replaceInputRange(0,this._input.length,e),this}replaceInputRange(e,r,n){let i=this._input,s=this._memoTable;if(e<0||e>i.length||r<0||r>i.length||e>r)throw new Error("Invalid indices: "+e+" and "+r);this._input=i.slice(0,e)+n+i.slice(r),this._input!==i&&s.length>0&&(this._isMemoTableStale=!0);let a=s.slice(r);s.length=e;for(let u=0;u<n.length;u++)s.push(void 0);for(let u of a)s.push(u);for(let u=0;u<e;u++){let c=s[u];c&&c.clearObsoleteEntries(u,e)}return this}match(e,r={incremental:!0}){return this._match(this._getStartExpr(e),{incremental:r.incremental,tracing:!1})}trace(e,r={incremental:!0}){return this._match(this._getStartExpr(e),{incremental:r.incremental,tracing:!0})}_match(e,r={}){let n={tracing:!1,incremental:!0,positionToRecordFailures:void 0,...r};if(!n.incremental)this._resetMemoTable();else if(this._isMemoTableStale&&!this.grammar.supportsIncrementalParsing)throw Zz(this.grammar);let i=new F1(this,e,n.positionToRecordFailures);return n.tracing?i.getTrace():i.getMatchResult()}_getStartExpr(e){let r=e||this.grammar.defaultStartRule;if(!r)throw new Error("Missing start rule argument -- the grammar has no default start rule.");let n=this.grammar.parseApplication(r);return new Ht([n,Lr])}},of=[],B1=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),rm=class{constructor(e,r,n){this._node=e,this.source=r,this._baseInterval=n,e.isNonterminal()&&Ia(r===n),this._childWrappers=[]}_forgetMemoizedResultFor(e){delete this._node[this._semantics.attributeKeys[e]],this.children.forEach(r=>{r._forgetMemoizedResultFor(e)})}child(e){if(!(0<=e&&e<this._node.numChildren()))return;let r=this._childWrappers[e];if(!r){let n=this._node.childAt(e),i=this._node.childOffsets[e],s=this._baseInterval.subInterval(i,n.matchLength),a=n.isNonterminal()?s:this._baseInterval;r=this._childWrappers[e]=this._semantics.wrap(n,s,a)}return r}_children(){for(let e=0;e<this._node.numChildren();e++)this.child(e);return this._childWrappers}isIteration(){return this._node.isIteration()}isTerminal(){return this._node.isTerminal()}isNonterminal(){return this._node.isNonterminal()}isSyntactic(){return this.isNonterminal()&&this._node.isSyntactic()}isLexical(){return this.isNonterminal()&&this._node.isLexical()}isOptional(){return this._node.isOptional()}iteration(e){let r=e||[],n=r.map(a=>a._node),i=new em(n,[],-1,!1),s=this._semantics.wrap(i,null,null);return s._childWrappers=r,s}get children(){return this._children()}get ctorName(){return this._node.ctorName}get numChildren(){return this._node.numChildren()}get sourceString(){return this.source.contents}},Tn=class t{constructor(e,r){let n=this;if(this.grammar=e,this.checkedActionDicts=!1,this.Wrapper=class extends(r?r.Wrapper:rm){constructor(i,s,a){super(i,s,a),n.checkActionDictsIfHaventAlready(),this._semantics=n}toString(){return"[semantics wrapper for "+n.grammar.name+"]"}},this.super=r,r){if(!(e.equals(this.super.grammar)||e._inheritsFrom(this.super.grammar)))throw new Error("Cannot extend a semantics for grammar '"+this.super.grammar.name+"' for use with grammar '"+e.name+"' (not a sub-grammar)");this.operations=Object.create(this.super.operations),this.attributes=Object.create(this.super.attributes),this.attributeKeys=Object.create(null);for(let i in this.attributes)Object.defineProperty(this.attributeKeys,i,{value:oL(i)})}else this.operations=Object.create(null),this.attributes=Object.create(null),this.attributeKeys=Object.create(null)}toString(){return"[semantics for "+this.grammar.name+"]"}checkActionDictsIfHaventAlready(){this.checkedActionDicts||(this.checkActionDicts(),this.checkedActionDicts=!0)}checkActionDicts(){let e;for(e in this.operations)this.operations[e].checkActionDict(this.grammar);for(e in this.attributes)this.attributes[e].checkActionDict(this.grammar)}toRecipe(e){function r(i){return i.super!==t.BuiltInSemantics._getSemantics()}let n=`(function(g) {
317
+ `;if(r(this)){n+=" var semantics = "+this.super.toRecipe(!0)+"(g";let i=this.super.grammar,s=this.grammar;for(;s!==i;)n+=".superGrammar",s=s.superGrammar;n+=`);
318
+ `,n+=" return g.extendSemantics(semantics)"}else n+=" return g.createSemantics()";return["Operation","Attribute"].forEach(i=>{let s=this[i.toLowerCase()+"s"];Object.keys(s).forEach(a=>{let{actionDict:u,formals:c,builtInDefault:p}=s[a],d=a;c.length>0&&(d+="("+c.join(", ")+")");let m;r(this)&&this.super[i.toLowerCase()+"s"][a]?m="extend"+i:m="add"+i,n+=`
319
+ .`+m+"("+JSON.stringify(d)+", {";let h=[];Object.keys(u).forEach(y=>{if(u[y]!==p){let w=u[y].toString().trim();w=w.replace(/^.*\(/,"function("),h.push(`
320
+ `+JSON.stringify(y)+": "+w)}}),n+=h.join(",")+`
321
+ })`})}),n+=`;
322
+ })`,e||(n=`(function() {
323
+ var grammar = this.fromRecipe(`+this.grammar.toRecipe()+`);
324
+ var semantics = `+n+`(grammar);
325
+ return semantics;
326
+ });
327
+ `),n}addOperationOrAttribute(e,r,n){let i=e+"s",s=cL(r,e),{name:a}=s,{formals:u}=s;this.assertNewName(a,e);let c=OJ(e,a,m),p={_default:c};Object.keys(n).forEach(h=>{p[h]=n[h]});let d=e==="operation"?new Do(a,u,p,c):new cf(a,p,c);d.checkActionDict(this.grammar),this[i][a]=d;function m(...h){let y=this._semantics[i][a];if(arguments.length!==y.formals.length)throw new Error("Invalid number of arguments passed to "+a+" "+e+" (expected "+y.formals.length+", got "+arguments.length+")");let w=Object.create(null);for(let[v,I]of Object.entries(h)){let T=y.formals[v];w[T]=I}let x=this.args;this.args=w;let k=y.execute(this._semantics,this);return this.args=x,k}e==="operation"?(this.Wrapper.prototype[a]=m,this.Wrapper.prototype[a].toString=function(){return"["+a+" operation]"}):(Object.defineProperty(this.Wrapper.prototype,a,{get:m,configurable:!0}),Object.defineProperty(this.attributeKeys,a,{value:oL(a)}))}extendOperationOrAttribute(e,r,n){let i=e+"s";if(cL(r,"attribute"),!(this.super&&r in this.super[i]))throw new Error("Cannot extend "+e+" '"+r+"': did not inherit an "+e+" with that name");if(B1(this[i],r))throw new Error("Cannot extend "+e+" '"+r+"' again");let s=this[i][r].formals,a=this[i][r].actionDict,u=Object.create(a);Object.keys(n).forEach(c=>{u[c]=n[c]}),this[i][r]=e==="operation"?new Do(r,s,u):new cf(r,u),this[i][r].checkActionDict(this.grammar)}assertNewName(e,r){if(B1(rm.prototype,e))throw new Error("Cannot add "+r+" '"+e+"': that's a reserved name");if(e in this.operations)throw new Error("Cannot add "+r+" '"+e+"': an operation with that name already exists");if(e in this.attributes)throw new Error("Cannot add "+r+" '"+e+"': an attribute with that name already exists")}wrap(e,r,n){let i=n||r;return e instanceof this.Wrapper?e:new this.Wrapper(e,r,i)}};function cL(t,e){if(!Tn.prototypeGrammar)return Ia(t.indexOf("(")===-1),{name:t,formals:[]};let r=Tn.prototypeGrammar.match(t,e==="operation"?"OperationSignature":"AttributeSignature");if(r.failed())throw new Error(r.message);return Tn.prototypeGrammarSemantics(r).parse()}function OJ(t,e,r){return function(...n){let s=(this._semantics.operations[e]||this._semantics.attributes[e]).formals.map(a=>this.args[a]);if(!this.isIteration()&&n.length===1)return r.apply(n[0],s);throw fJ(this.ctorName,e,t,of)}}Tn.createSemantics=function(t,e){let r=new Tn(t,e!==void 0?e:Tn.BuiltInSemantics._getSemantics()),n=function(s){if(!(s instanceof Xd))throw new TypeError("Semantics expected a MatchResult, but got "+V1(s));if(s.failed())throw new TypeError("cannot apply Semantics to "+s.toString());let a=s._cst;if(a.grammar!==t)throw new Error("Cannot use a MatchResult from grammar '"+a.grammar.name+"' with a semantics for '"+t.name+"'");let u=new rc(s.input);return r.wrap(a,u.interval(s._cstOffset,s.input.length))};return n.addOperation=function(i,s){return r.addOperationOrAttribute("operation",i,s),n},n.extendOperation=function(i,s){return r.extendOperationOrAttribute("operation",i,s),n},n.addAttribute=function(i,s){return r.addOperationOrAttribute("attribute",i,s),n},n.extendAttribute=function(i,s){return r.extendOperationOrAttribute("attribute",i,s),n},n._getActionDict=function(i){let s=r.operations[i]||r.attributes[i];if(!s)throw new Error('"'+i+'" is not a valid operation or attribute name in this semantics for "'+t.name+'"');return s.actionDict},n._remove=function(i){let s;return i in r.operations?(s=r.operations[i],delete r.operations[i]):i in r.attributes&&(s=r.attributes[i],delete r.attributes[i]),delete r.Wrapper.prototype[i],s},n.getOperationNames=function(){return Object.keys(r.operations)},n.getAttributeNames=function(){return Object.keys(r.attributes)},n.getGrammar=function(){return r.grammar},n.toRecipe=function(i){return r.toRecipe(i)},n.toString=r.toString.bind(r),n._getSemantics=function(){return r},n};var Do=class{constructor(e,r,n,i){this.name=e,this.formals=r,this.actionDict=n,this.builtInDefault=i}checkActionDict(e){e._checkTopDownActionDict(this.typeName,this.name,this.actionDict)}execute(e,r){try{let{ctorName:n}=r._node,i=this.actionDict[n];return i?(of.push([this,n]),i.apply(r,r._children())):r.isNonterminal()&&(i=this.actionDict._nonterminal,i)?(of.push([this,"_nonterminal",n]),i.apply(r,r._children())):(of.push([this,"default action",n]),this.actionDict._default.apply(r,r._children()))}finally{of.pop()}}};Do.prototype.typeName="operation";var cf=class extends Do{constructor(e,r,n){super(e,[],r,n)}execute(e,r){let n=r._node,i=e.attributeKeys[this.name];return B1(n,i)||(n[i]=Do.prototype.execute.call(this,e,r)),n[i]}};cf.prototype.typeName="attribute";var lL=["_iter","_terminal","_nonterminal","_default"];function fL(t){return Object.keys(t.rules).sort().map(e=>t.rules[e])}var NJ=t=>t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"),OL,NL,En=class t{constructor(e,r,n,i){if(this.name=e,this.superGrammar=r,this.rules=n,i){if(!(i in n))throw new Error("Invalid start rule: '"+i+"' is not a rule in grammar '"+e+"'");this.defaultStartRule=i}this._matchStateInitializer=void 0,this.supportsIncrementalParsing=!0}matcher(){return new j1(this)}isBuiltIn(){return this===t.ProtoBuiltInRules||this===t.BuiltInRules}equals(e){if(this===e)return!0;if(e==null||this.name!==e.name||this.defaultStartRule!==e.defaultStartRule||!(this.superGrammar===e.superGrammar||this.superGrammar.equals(e.superGrammar)))return!1;let r=fL(this),n=fL(e);return r.length===n.length&&r.every((i,s)=>i.description===n[s].description&&i.formals.join(",")===n[s].formals.join(",")&&i.body.toString()===n[s].body.toString())}match(e,r){let n=this.matcher();return n.replaceInputRange(0,0,e),n.match(r)}trace(e,r){let n=this.matcher();return n.replaceInputRange(0,0,e),n.trace(r)}createSemantics(){return Tn.createSemantics(this)}extendSemantics(e){return Tn.createSemantics(this,e._getSemantics())}_checkTopDownActionDict(e,r,n){let i=[];for(let s in n){let a=n[s];if(!lL.includes(s)&&!(s in this.rules)){i.push(`'${s}' is not a valid semantic action for '${this.name}'`);continue}if(typeof a!="function"){i.push(`'${s}' must be a function in an action dictionary for '${this.name}'`);continue}let c=a.length,p=this._topDownActionArity(s);if(c!==p){let d;s==="_iter"||s==="_nonterminal"?d=`it should use a rest parameter, e.g. \`${s}(...children) {}\`. NOTE: this is new in Ohm v16 \u2014 see https://ohmjs.org/d/ati for details.`:d=`expected ${p}, got ${c}`,i.push(`Semantic action '${s}' has the wrong arity: ${d}`)}}if(i.length>0){let s=i.map(u=>"- "+u),a=new Error([`Found errors in the action dictionary of the '${r}' ${e}:`,...s].join(`
328
+ `));throw a.problems=i,a}}_topDownActionArity(e){return lL.includes(e)?0:this.rules[e].body.getArity()}_inheritsFrom(e){let r=this.superGrammar;for(;r;){if(r.equals(e,!0))return!0;r=r.superGrammar}return!1}toRecipe(e=void 0){let r={};this.source&&(r.source=this.source.contents);let n=null;this.defaultStartRule&&(n=this.defaultStartRule);let i={};Object.keys(this.rules).forEach(u=>{let c=this.rules[u],{body:p}=c,d=!this.superGrammar||!this.superGrammar.rules[u],m;d?m="define":m=p instanceof qo?"extend":"override";let h={};if(c.source&&this.source){let x=c.source.relativeTo(this.source);h.sourceInterval=[x.startIdx,x.endIdx]}let y=d?c.description:null,w=p.outputRecipe(c.formals,this.source);i[u]=[m,h,y,c.formals,w]});let s="null";e?s=e:this.superGrammar&&!this.superGrammar.isBuiltIn()&&(s=this.superGrammar.toRecipe());let a=[...["grammar",r,this.name].map(JSON.stringify),s,...[n,i].map(JSON.stringify)];return NJ(`[${a.join(",")}]`)}toOperationActionDictionaryTemplate(){return this._toOperationOrAttributeActionDictionaryTemplate()}toAttributeActionDictionaryTemplate(){return this._toOperationOrAttributeActionDictionaryTemplate()}_toOperationOrAttributeActionDictionaryTemplate(){let e=new Fo;e.append("{");let r=!0;for(let n in this.rules){let{body:i}=this.rules[n];r?r=!1:e.append(","),e.append(`
329
+ `),e.append(" "),this.addSemanticActionTemplate(n,i,e)}return e.append(`
330
+ }`),e.contents()}addSemanticActionTemplate(e,r,n){n.append(e),n.append(": function(");let i=this._topDownActionArity(e);n.append(sm("_",i).join(", ")),n.append(`) {
331
+ `),n.append(" }")}parseApplication(e){let r;if(e.indexOf("<")===-1)r=new nt(e);else{let i=OL.match(e,"Base_application");r=NL(i,{})}if(!(r.ruleName in this.rules))throw wL(r.ruleName,this.name);let{formals:n}=this.rules[r.ruleName];if(n.length!==r.args.length){let{source:i}=this.rules[r.ruleName];throw xL(r.ruleName,n.length,r.args.length,i)}return r}_setUpMatchState(e){this._matchStateInitializer&&this._matchStateInitializer(e)}};En.ProtoBuiltInRules=new En("ProtoBuiltInRules",void 0,{any:{body:Nr,formals:[],description:"any character",primitive:!0},end:{body:Lr,formals:[],description:"end of input",primitive:!0},caseInsensitive:{body:new tm(new lr(0)),formals:["str"],primitive:!0},lower:{body:new Xt("Ll"),formals:[],description:"a lowercase letter",primitive:!0},upper:{body:new Xt("Lu"),formals:[],description:"an uppercase letter",primitive:!0},unicodeLtmo:{body:new Xt("Ltmo"),formals:[],description:"a Unicode character in Lt, Lm, or Lo",primitive:!0},spaces:{body:new ss(new nt("space")),formals:[]},space:{body:new cr("\0"," "),formals:[],description:"a space"}});En.initApplicationParser=function(t,e){OL=t,NL=e};var nm=class{constructor(e){this.name=e}sourceInterval(e,r){return this.source.subInterval(e,r-e)}ensureSuperGrammar(){return this.superGrammar||this.withSuperGrammar(this.name==="BuiltInRules"?En.ProtoBuiltInRules:En.BuiltInRules),this.superGrammar}ensureSuperGrammarRuleForOverriding(e,r){let n=this.ensureSuperGrammar().rules[e];if(!n)throw eJ(e,this.superGrammar.name,r);return n}installOverriddenOrExtendedRule(e,r,n,i){let s=L1(r);if(s.length>0)throw iL(e,s,i);let a=this.ensureSuperGrammar().rules[e],u=a.formals,c=u?u.length:0;if(r.length!==c)throw xL(e,c,r.length,i);return this.install(e,r,n,a.description,i)}install(e,r,n,i,s,a=!1){return this.rules[e]={body:n.introduceParams(r),formals:r,description:i,source:s,primitive:a},this}withSuperGrammar(e){if(this.superGrammar)throw new Error("the super grammar of a GrammarDecl cannot be set more than once");return this.superGrammar=e,this.rules=Object.create(e.rules),e.isBuiltIn()||(this.defaultStartRule=e.defaultStartRule),this}withDefaultStartRule(e){return this.defaultStartRule=e,this}withSource(e){return this.source=new rc(e).interval(0,e.length),this}build(){let e=new En(this.name,this.ensureSuperGrammar(),this.rules,this.defaultStartRule);e._matchStateInitializer=e.superGrammar._matchStateInitializer,e.supportsIncrementalParsing=e.superGrammar.supportsIncrementalParsing;let r=[],n=!1;return Object.keys(e.rules).forEach(i=>{let{body:s}=e.rules[i];try{s.assertChoicesHaveUniformArity(i)}catch(a){r.push(a)}try{s.assertAllApplicationsAreValid(i,e)}catch(a){r.push(a),n=!0}}),n||Object.keys(e.rules).forEach(i=>{let{body:s}=e.rules[i];try{s.assertIteratedExprsAreNotNullable(e,[])}catch(a){r.push(a)}}),r.length>0&&pJ(r),this.source&&(e.source=this.source),e}define(e,r,n,i,s,a){if(this.ensureSuperGrammar(),this.superGrammar.rules[e])throw nL(e,this.name,this.superGrammar.name,s);if(this.rules[e])throw nL(e,this.name,this.name,s);let u=L1(r);if(u.length>0)throw iL(e,u,s);return this.install(e,r,n,i,s,a)}override(e,r,n,i,s){return this.ensureSuperGrammarRuleForOverriding(e,s),this.installOverriddenOrExtendedRule(e,r,n,s),this}extend(e,r,n,i,s){if(!this.ensureSuperGrammar().rules[e])throw tJ(e,this.superGrammar.name,s);let u=new qo(this.superGrammar,e,n);return u.source=n.source,this.installOverriddenOrExtendedRule(e,r,u,s),this}},ic=class{constructor(e){this.currentDecl=null,this.currentRuleName=null,this.options=e||{}}newGrammar(e){return new nm(e)}grammar(e,r,n,i,s){let a=new nm(r);return n&&a.withSuperGrammar(n instanceof En?n:this.fromRecipe(n)),i&&a.withDefaultStartRule(i),e&&e.source&&a.withSource(e.source),this.currentDecl=a,Object.keys(s).forEach(u=>{this.currentRuleName=u;let c=s[u],p=c[0],d=c[1],m=c[2],h=c[3],y=this.fromRecipe(c[4]),w;a.source&&d&&d.sourceInterval&&(w=a.source.subInterval(d.sourceInterval[0],d.sourceInterval[1]-d.sourceInterval[0])),a[p](u,h,y,m,w)}),this.currentRuleName=this.currentDecl=null,a.build()}terminal(e){return new Zt(e)}range(e,r){return new cr(e,r)}param(e){return new lr(e)}alt(...e){let r=[];for(let n of e)n instanceof je||(n=this.fromRecipe(n)),n instanceof jt?r=r.concat(n.terms):r.push(n);return r.length===1?r[0]:new jt(r)}seq(...e){let r=[];for(let n of e)n instanceof je||(n=this.fromRecipe(n)),n instanceof Ht?r=r.concat(n.factors):r.push(n);return r.length===1?r[0]:new Ht(r)}star(e){return e instanceof je||(e=this.fromRecipe(e)),new ss(e)}plus(e){return e instanceof je||(e=this.fromRecipe(e)),new js(e)}opt(e){return e instanceof je||(e=this.fromRecipe(e)),new yi(e)}not(e){return e instanceof je||(e=this.fromRecipe(e)),new Yt(e)}lookahead(e){return e instanceof je||(e=this.fromRecipe(e)),this.options.eliminateLookaheads?new Yt(new Yt(e)):new wr(e)}lex(e){return e instanceof je||(e=this.fromRecipe(e)),new Or(e)}app(e,r){return r&&r.length>0&&(r=r.map(function(n){return n instanceof je?n:this.fromRecipe(n)},this)),new nt(e,r)}splice(e,r){return new Ro(this.currentDecl.superGrammar,this.currentRuleName,e.map(n=>this.fromRecipe(n)),r.map(n=>this.fromRecipe(n)))}fromRecipe(e){let r=e[0]==="grammar"?e.slice(1):e.slice(2),n=this[e[0]](...r),i=e[1];return i&&i.sourceInterval&&this.currentDecl&&n.withSource(this.currentDecl.sourceInterval(...i.sourceInterval)),n}};function am(t){return typeof t=="function"?t.call(new ic):(typeof t=="string"&&(t=JSON.parse(t)),new ic().fromRecipe(t))}var H1=am(["grammar",{source:`BuiltInRules {
332
+
333
+ alnum (an alpha-numeric character)
334
+ = letter
335
+ | digit
336
+
337
+ letter (a letter)
338
+ = lower
339
+ | upper
340
+ | unicodeLtmo
341
+
342
+ digit (a digit)
343
+ = "0".."9"
344
+
345
+ hexDigit (a hexadecimal digit)
346
+ = digit
347
+ | "a".."f"
348
+ | "A".."F"
349
+
350
+ ListOf<elem, sep>
351
+ = NonemptyListOf<elem, sep>
352
+ | EmptyListOf<elem, sep>
353
+
354
+ NonemptyListOf<elem, sep>
355
+ = elem (sep elem)*
356
+
357
+ EmptyListOf<elem, sep>
358
+ = /* nothing */
359
+
360
+ listOf<elem, sep>
361
+ = nonemptyListOf<elem, sep>
362
+ | emptyListOf<elem, sep>
363
+
364
+ nonemptyListOf<elem, sep>
365
+ = elem (sep elem)*
366
+
367
+ emptyListOf<elem, sep>
368
+ = /* nothing */
369
+
370
+ // Allows a syntactic rule application within a lexical context.
371
+ applySyntactic<app> = app
372
+ }`},"BuiltInRules",null,null,{alnum:["define",{sourceInterval:[18,78]},"an alpha-numeric character",[],["alt",{sourceInterval:[60,78]},["app",{sourceInterval:[60,66]},"letter",[]],["app",{sourceInterval:[73,78]},"digit",[]]]],letter:["define",{sourceInterval:[82,142]},"a letter",[],["alt",{sourceInterval:[107,142]},["app",{sourceInterval:[107,112]},"lower",[]],["app",{sourceInterval:[119,124]},"upper",[]],["app",{sourceInterval:[131,142]},"unicodeLtmo",[]]]],digit:["define",{sourceInterval:[146,177]},"a digit",[],["range",{sourceInterval:[169,177]},"0","9"]],hexDigit:["define",{sourceInterval:[181,254]},"a hexadecimal digit",[],["alt",{sourceInterval:[219,254]},["app",{sourceInterval:[219,224]},"digit",[]],["range",{sourceInterval:[231,239]},"a","f"],["range",{sourceInterval:[246,254]},"A","F"]]],ListOf:["define",{sourceInterval:[258,336]},null,["elem","sep"],["alt",{sourceInterval:[282,336]},["app",{sourceInterval:[282,307]},"NonemptyListOf",[["param",{sourceInterval:[297,301]},0],["param",{sourceInterval:[303,306]},1]]],["app",{sourceInterval:[314,336]},"EmptyListOf",[["param",{sourceInterval:[326,330]},0],["param",{sourceInterval:[332,335]},1]]]]],NonemptyListOf:["define",{sourceInterval:[340,388]},null,["elem","sep"],["seq",{sourceInterval:[372,388]},["param",{sourceInterval:[372,376]},0],["star",{sourceInterval:[377,388]},["seq",{sourceInterval:[378,386]},["param",{sourceInterval:[378,381]},1],["param",{sourceInterval:[382,386]},0]]]]],EmptyListOf:["define",{sourceInterval:[392,434]},null,["elem","sep"],["seq",{sourceInterval:[438,438]}]],listOf:["define",{sourceInterval:[438,516]},null,["elem","sep"],["alt",{sourceInterval:[462,516]},["app",{sourceInterval:[462,487]},"nonemptyListOf",[["param",{sourceInterval:[477,481]},0],["param",{sourceInterval:[483,486]},1]]],["app",{sourceInterval:[494,516]},"emptyListOf",[["param",{sourceInterval:[506,510]},0],["param",{sourceInterval:[512,515]},1]]]]],nonemptyListOf:["define",{sourceInterval:[520,568]},null,["elem","sep"],["seq",{sourceInterval:[552,568]},["param",{sourceInterval:[552,556]},0],["star",{sourceInterval:[557,568]},["seq",{sourceInterval:[558,566]},["param",{sourceInterval:[558,561]},1],["param",{sourceInterval:[562,566]},0]]]]],emptyListOf:["define",{sourceInterval:[572,682]},null,["elem","sep"],["seq",{sourceInterval:[685,685]}]],applySyntactic:["define",{sourceInterval:[685,710]},null,["app"],["param",{sourceInterval:[707,710]},0]]}]);En.BuiltInRules=H1;mJ(En.BuiltInRules);var om=am(["grammar",{source:`Ohm {
373
+
374
+ Grammars
375
+ = Grammar*
376
+
377
+ Grammar
378
+ = ident SuperGrammar? "{" Rule* "}"
379
+
380
+ SuperGrammar
381
+ = "<:" ident
382
+
383
+ Rule
384
+ = ident Formals? ruleDescr? "=" RuleBody -- define
385
+ | ident Formals? ":=" OverrideRuleBody -- override
386
+ | ident Formals? "+=" RuleBody -- extend
387
+
388
+ RuleBody
389
+ = "|"? NonemptyListOf<TopLevelTerm, "|">
390
+
391
+ TopLevelTerm
392
+ = Seq caseName -- inline
393
+ | Seq
394
+
395
+ OverrideRuleBody
396
+ = "|"? NonemptyListOf<OverrideTopLevelTerm, "|">
397
+
398
+ OverrideTopLevelTerm
399
+ = "..." -- superSplice
400
+ | TopLevelTerm
401
+
402
+ Formals
403
+ = "<" ListOf<ident, ","> ">"
404
+
405
+ Params
406
+ = "<" ListOf<Seq, ","> ">"
407
+
408
+ Alt
409
+ = NonemptyListOf<Seq, "|">
410
+
411
+ Seq
412
+ = Iter*
413
+
414
+ Iter
415
+ = Pred "*" -- star
416
+ | Pred "+" -- plus
417
+ | Pred "?" -- opt
418
+ | Pred
419
+
420
+ Pred
421
+ = "~" Lex -- not
422
+ | "&" Lex -- lookahead
423
+ | Lex
424
+
425
+ Lex
426
+ = "#" Base -- lex
427
+ | Base
428
+
429
+ Base
430
+ = ident Params? ~(ruleDescr? "=" | ":=" | "+=") -- application
431
+ | oneCharTerminal ".." oneCharTerminal -- range
432
+ | terminal -- terminal
433
+ | "(" Alt ")" -- paren
434
+
435
+ ruleDescr (a rule description)
436
+ = "(" ruleDescrText ")"
437
+
438
+ ruleDescrText
439
+ = (~")" any)*
440
+
441
+ caseName
442
+ = "--" (~"\\n" space)* name (~"\\n" space)* ("\\n" | &"}")
443
+
444
+ name (a name)
445
+ = nameFirst nameRest*
446
+
447
+ nameFirst
448
+ = "_"
449
+ | letter
450
+
451
+ nameRest
452
+ = "_"
453
+ | alnum
454
+
455
+ ident (an identifier)
456
+ = name
457
+
458
+ terminal
459
+ = "\\"" terminalChar* "\\""
460
+
461
+ oneCharTerminal
462
+ = "\\"" terminalChar "\\""
463
+
464
+ terminalChar
465
+ = escapeChar
466
+ | ~"\\\\" ~"\\"" ~"\\n" "\\u{0}".."\\u{10FFFF}"
467
+
468
+ escapeChar (an escape sequence)
469
+ = "\\\\\\\\" -- backslash
470
+ | "\\\\\\"" -- doubleQuote
471
+ | "\\\\\\'" -- singleQuote
472
+ | "\\\\b" -- backspace
473
+ | "\\\\n" -- lineFeed
474
+ | "\\\\r" -- carriageReturn
475
+ | "\\\\t" -- tab
476
+ | "\\\\u{" hexDigit hexDigit? hexDigit?
477
+ hexDigit? hexDigit? hexDigit? "}" -- unicodeCodePoint
478
+ | "\\\\u" hexDigit hexDigit hexDigit hexDigit -- unicodeEscape
479
+ | "\\\\x" hexDigit hexDigit -- hexEscape
480
+
481
+ space
482
+ += comment
483
+
484
+ comment
485
+ = "//" (~"\\n" any)* &("\\n" | end) -- singleLine
486
+ | "/*" (~"*/" any)* "*/" -- multiLine
487
+
488
+ tokens = token*
489
+
490
+ token = caseName | comment | ident | operator | punctuation | terminal | any
491
+
492
+ operator = "<:" | "=" | ":=" | "+=" | "*" | "+" | "?" | "~" | "&"
493
+
494
+ punctuation = "<" | ">" | "," | "--"
495
+ }`},"Ohm",null,"Grammars",{Grammars:["define",{sourceInterval:[9,32]},null,[],["star",{sourceInterval:[24,32]},["app",{sourceInterval:[24,31]},"Grammar",[]]]],Grammar:["define",{sourceInterval:[36,83]},null,[],["seq",{sourceInterval:[50,83]},["app",{sourceInterval:[50,55]},"ident",[]],["opt",{sourceInterval:[56,69]},["app",{sourceInterval:[56,68]},"SuperGrammar",[]]],["terminal",{sourceInterval:[70,73]},"{"],["star",{sourceInterval:[74,79]},["app",{sourceInterval:[74,78]},"Rule",[]]],["terminal",{sourceInterval:[80,83]},"}"]]],SuperGrammar:["define",{sourceInterval:[87,116]},null,[],["seq",{sourceInterval:[106,116]},["terminal",{sourceInterval:[106,110]},"<:"],["app",{sourceInterval:[111,116]},"ident",[]]]],Rule_define:["define",{sourceInterval:[131,181]},null,[],["seq",{sourceInterval:[131,170]},["app",{sourceInterval:[131,136]},"ident",[]],["opt",{sourceInterval:[137,145]},["app",{sourceInterval:[137,144]},"Formals",[]]],["opt",{sourceInterval:[146,156]},["app",{sourceInterval:[146,155]},"ruleDescr",[]]],["terminal",{sourceInterval:[157,160]},"="],["app",{sourceInterval:[162,170]},"RuleBody",[]]]],Rule_override:["define",{sourceInterval:[188,248]},null,[],["seq",{sourceInterval:[188,235]},["app",{sourceInterval:[188,193]},"ident",[]],["opt",{sourceInterval:[194,202]},["app",{sourceInterval:[194,201]},"Formals",[]]],["terminal",{sourceInterval:[214,218]},":="],["app",{sourceInterval:[219,235]},"OverrideRuleBody",[]]]],Rule_extend:["define",{sourceInterval:[255,305]},null,[],["seq",{sourceInterval:[255,294]},["app",{sourceInterval:[255,260]},"ident",[]],["opt",{sourceInterval:[261,269]},["app",{sourceInterval:[261,268]},"Formals",[]]],["terminal",{sourceInterval:[281,285]},"+="],["app",{sourceInterval:[286,294]},"RuleBody",[]]]],Rule:["define",{sourceInterval:[120,305]},null,[],["alt",{sourceInterval:[131,305]},["app",{sourceInterval:[131,170]},"Rule_define",[]],["app",{sourceInterval:[188,235]},"Rule_override",[]],["app",{sourceInterval:[255,294]},"Rule_extend",[]]]],RuleBody:["define",{sourceInterval:[309,362]},null,[],["seq",{sourceInterval:[324,362]},["opt",{sourceInterval:[324,328]},["terminal",{sourceInterval:[324,327]},"|"]],["app",{sourceInterval:[329,362]},"NonemptyListOf",[["app",{sourceInterval:[344,356]},"TopLevelTerm",[]],["terminal",{sourceInterval:[358,361]},"|"]]]]],TopLevelTerm_inline:["define",{sourceInterval:[385,408]},null,[],["seq",{sourceInterval:[385,397]},["app",{sourceInterval:[385,388]},"Seq",[]],["app",{sourceInterval:[389,397]},"caseName",[]]]],TopLevelTerm:["define",{sourceInterval:[366,418]},null,[],["alt",{sourceInterval:[385,418]},["app",{sourceInterval:[385,397]},"TopLevelTerm_inline",[]],["app",{sourceInterval:[415,418]},"Seq",[]]]],OverrideRuleBody:["define",{sourceInterval:[422,491]},null,[],["seq",{sourceInterval:[445,491]},["opt",{sourceInterval:[445,449]},["terminal",{sourceInterval:[445,448]},"|"]],["app",{sourceInterval:[450,491]},"NonemptyListOf",[["app",{sourceInterval:[465,485]},"OverrideTopLevelTerm",[]],["terminal",{sourceInterval:[487,490]},"|"]]]]],OverrideTopLevelTerm_superSplice:["define",{sourceInterval:[522,543]},null,[],["terminal",{sourceInterval:[522,527]},"..."]],OverrideTopLevelTerm:["define",{sourceInterval:[495,562]},null,[],["alt",{sourceInterval:[522,562]},["app",{sourceInterval:[522,527]},"OverrideTopLevelTerm_superSplice",[]],["app",{sourceInterval:[550,562]},"TopLevelTerm",[]]]],Formals:["define",{sourceInterval:[566,606]},null,[],["seq",{sourceInterval:[580,606]},["terminal",{sourceInterval:[580,583]},"<"],["app",{sourceInterval:[584,602]},"ListOf",[["app",{sourceInterval:[591,596]},"ident",[]],["terminal",{sourceInterval:[598,601]},","]]],["terminal",{sourceInterval:[603,606]},">"]]],Params:["define",{sourceInterval:[610,647]},null,[],["seq",{sourceInterval:[623,647]},["terminal",{sourceInterval:[623,626]},"<"],["app",{sourceInterval:[627,643]},"ListOf",[["app",{sourceInterval:[634,637]},"Seq",[]],["terminal",{sourceInterval:[639,642]},","]]],["terminal",{sourceInterval:[644,647]},">"]]],Alt:["define",{sourceInterval:[651,685]},null,[],["app",{sourceInterval:[661,685]},"NonemptyListOf",[["app",{sourceInterval:[676,679]},"Seq",[]],["terminal",{sourceInterval:[681,684]},"|"]]]],Seq:["define",{sourceInterval:[689,704]},null,[],["star",{sourceInterval:[699,704]},["app",{sourceInterval:[699,703]},"Iter",[]]]],Iter_star:["define",{sourceInterval:[719,736]},null,[],["seq",{sourceInterval:[719,727]},["app",{sourceInterval:[719,723]},"Pred",[]],["terminal",{sourceInterval:[724,727]},"*"]]],Iter_plus:["define",{sourceInterval:[743,760]},null,[],["seq",{sourceInterval:[743,751]},["app",{sourceInterval:[743,747]},"Pred",[]],["terminal",{sourceInterval:[748,751]},"+"]]],Iter_opt:["define",{sourceInterval:[767,783]},null,[],["seq",{sourceInterval:[767,775]},["app",{sourceInterval:[767,771]},"Pred",[]],["terminal",{sourceInterval:[772,775]},"?"]]],Iter:["define",{sourceInterval:[708,794]},null,[],["alt",{sourceInterval:[719,794]},["app",{sourceInterval:[719,727]},"Iter_star",[]],["app",{sourceInterval:[743,751]},"Iter_plus",[]],["app",{sourceInterval:[767,775]},"Iter_opt",[]],["app",{sourceInterval:[790,794]},"Pred",[]]]],Pred_not:["define",{sourceInterval:[809,824]},null,[],["seq",{sourceInterval:[809,816]},["terminal",{sourceInterval:[809,812]},"~"],["app",{sourceInterval:[813,816]},"Lex",[]]]],Pred_lookahead:["define",{sourceInterval:[831,852]},null,[],["seq",{sourceInterval:[831,838]},["terminal",{sourceInterval:[831,834]},"&"],["app",{sourceInterval:[835,838]},"Lex",[]]]],Pred:["define",{sourceInterval:[798,862]},null,[],["alt",{sourceInterval:[809,862]},["app",{sourceInterval:[809,816]},"Pred_not",[]],["app",{sourceInterval:[831,838]},"Pred_lookahead",[]],["app",{sourceInterval:[859,862]},"Lex",[]]]],Lex_lex:["define",{sourceInterval:[876,892]},null,[],["seq",{sourceInterval:[876,884]},["terminal",{sourceInterval:[876,879]},"#"],["app",{sourceInterval:[880,884]},"Base",[]]]],Lex:["define",{sourceInterval:[866,903]},null,[],["alt",{sourceInterval:[876,903]},["app",{sourceInterval:[876,884]},"Lex_lex",[]],["app",{sourceInterval:[899,903]},"Base",[]]]],Base_application:["define",{sourceInterval:[918,979]},null,[],["seq",{sourceInterval:[918,963]},["app",{sourceInterval:[918,923]},"ident",[]],["opt",{sourceInterval:[924,931]},["app",{sourceInterval:[924,930]},"Params",[]]],["not",{sourceInterval:[932,963]},["alt",{sourceInterval:[934,962]},["seq",{sourceInterval:[934,948]},["opt",{sourceInterval:[934,944]},["app",{sourceInterval:[934,943]},"ruleDescr",[]]],["terminal",{sourceInterval:[945,948]},"="]],["terminal",{sourceInterval:[951,955]},":="],["terminal",{sourceInterval:[958,962]},"+="]]]]],Base_range:["define",{sourceInterval:[986,1041]},null,[],["seq",{sourceInterval:[986,1022]},["app",{sourceInterval:[986,1001]},"oneCharTerminal",[]],["terminal",{sourceInterval:[1002,1006]},".."],["app",{sourceInterval:[1007,1022]},"oneCharTerminal",[]]]],Base_terminal:["define",{sourceInterval:[1048,1106]},null,[],["app",{sourceInterval:[1048,1056]},"terminal",[]]],Base_paren:["define",{sourceInterval:[1113,1168]},null,[],["seq",{sourceInterval:[1113,1124]},["terminal",{sourceInterval:[1113,1116]},"("],["app",{sourceInterval:[1117,1120]},"Alt",[]],["terminal",{sourceInterval:[1121,1124]},")"]]],Base:["define",{sourceInterval:[907,1168]},null,[],["alt",{sourceInterval:[918,1168]},["app",{sourceInterval:[918,963]},"Base_application",[]],["app",{sourceInterval:[986,1022]},"Base_range",[]],["app",{sourceInterval:[1048,1056]},"Base_terminal",[]],["app",{sourceInterval:[1113,1124]},"Base_paren",[]]]],ruleDescr:["define",{sourceInterval:[1172,1231]},"a rule description",[],["seq",{sourceInterval:[1210,1231]},["terminal",{sourceInterval:[1210,1213]},"("],["app",{sourceInterval:[1214,1227]},"ruleDescrText",[]],["terminal",{sourceInterval:[1228,1231]},")"]]],ruleDescrText:["define",{sourceInterval:[1235,1266]},null,[],["star",{sourceInterval:[1255,1266]},["seq",{sourceInterval:[1256,1264]},["not",{sourceInterval:[1256,1260]},["terminal",{sourceInterval:[1257,1260]},")"]],["app",{sourceInterval:[1261,1264]},"any",[]]]]],caseName:["define",{sourceInterval:[1270,1338]},null,[],["seq",{sourceInterval:[1285,1338]},["terminal",{sourceInterval:[1285,1289]},"--"],["star",{sourceInterval:[1290,1304]},["seq",{sourceInterval:[1291,1302]},["not",{sourceInterval:[1291,1296]},["terminal",{sourceInterval:[1292,1296]},`
496
+ `]],["app",{sourceInterval:[1297,1302]},"space",[]]]],["app",{sourceInterval:[1305,1309]},"name",[]],["star",{sourceInterval:[1310,1324]},["seq",{sourceInterval:[1311,1322]},["not",{sourceInterval:[1311,1316]},["terminal",{sourceInterval:[1312,1316]},`
497
+ `]],["app",{sourceInterval:[1317,1322]},"space",[]]]],["alt",{sourceInterval:[1326,1337]},["terminal",{sourceInterval:[1326,1330]},`
498
+ `],["lookahead",{sourceInterval:[1333,1337]},["terminal",{sourceInterval:[1334,1337]},"}"]]]]],name:["define",{sourceInterval:[1342,1382]},"a name",[],["seq",{sourceInterval:[1363,1382]},["app",{sourceInterval:[1363,1372]},"nameFirst",[]],["star",{sourceInterval:[1373,1382]},["app",{sourceInterval:[1373,1381]},"nameRest",[]]]]],nameFirst:["define",{sourceInterval:[1386,1418]},null,[],["alt",{sourceInterval:[1402,1418]},["terminal",{sourceInterval:[1402,1405]},"_"],["app",{sourceInterval:[1412,1418]},"letter",[]]]],nameRest:["define",{sourceInterval:[1422,1452]},null,[],["alt",{sourceInterval:[1437,1452]},["terminal",{sourceInterval:[1437,1440]},"_"],["app",{sourceInterval:[1447,1452]},"alnum",[]]]],ident:["define",{sourceInterval:[1456,1489]},"an identifier",[],["app",{sourceInterval:[1485,1489]},"name",[]]],terminal:["define",{sourceInterval:[1493,1531]},null,[],["seq",{sourceInterval:[1508,1531]},["terminal",{sourceInterval:[1508,1512]},'"'],["star",{sourceInterval:[1513,1526]},["app",{sourceInterval:[1513,1525]},"terminalChar",[]]],["terminal",{sourceInterval:[1527,1531]},'"']]],oneCharTerminal:["define",{sourceInterval:[1535,1579]},null,[],["seq",{sourceInterval:[1557,1579]},["terminal",{sourceInterval:[1557,1561]},'"'],["app",{sourceInterval:[1562,1574]},"terminalChar",[]],["terminal",{sourceInterval:[1575,1579]},'"']]],terminalChar:["define",{sourceInterval:[1583,1660]},null,[],["alt",{sourceInterval:[1602,1660]},["app",{sourceInterval:[1602,1612]},"escapeChar",[]],["seq",{sourceInterval:[1621,1660]},["not",{sourceInterval:[1621,1626]},["terminal",{sourceInterval:[1622,1626]},"\\"]],["not",{sourceInterval:[1627,1632]},["terminal",{sourceInterval:[1628,1632]},'"']],["not",{sourceInterval:[1633,1638]},["terminal",{sourceInterval:[1634,1638]},`
499
+ `]],["range",{sourceInterval:[1639,1660]},"\0","\u{10FFFF}"]]]],escapeChar_backslash:["define",{sourceInterval:[1703,1758]},null,[],["terminal",{sourceInterval:[1703,1709]},"\\\\"]],escapeChar_doubleQuote:["define",{sourceInterval:[1765,1822]},null,[],["terminal",{sourceInterval:[1765,1771]},'\\"']],escapeChar_singleQuote:["define",{sourceInterval:[1829,1886]},null,[],["terminal",{sourceInterval:[1829,1835]},"\\'"]],escapeChar_backspace:["define",{sourceInterval:[1893,1948]},null,[],["terminal",{sourceInterval:[1893,1898]},"\\b"]],escapeChar_lineFeed:["define",{sourceInterval:[1955,2009]},null,[],["terminal",{sourceInterval:[1955,1960]},"\\n"]],escapeChar_carriageReturn:["define",{sourceInterval:[2016,2076]},null,[],["terminal",{sourceInterval:[2016,2021]},"\\r"]],escapeChar_tab:["define",{sourceInterval:[2083,2132]},null,[],["terminal",{sourceInterval:[2083,2088]},"\\t"]],escapeChar_unicodeCodePoint:["define",{sourceInterval:[2139,2243]},null,[],["seq",{sourceInterval:[2139,2221]},["terminal",{sourceInterval:[2139,2145]},"\\u{"],["app",{sourceInterval:[2146,2154]},"hexDigit",[]],["opt",{sourceInterval:[2155,2164]},["app",{sourceInterval:[2155,2163]},"hexDigit",[]]],["opt",{sourceInterval:[2165,2174]},["app",{sourceInterval:[2165,2173]},"hexDigit",[]]],["opt",{sourceInterval:[2188,2197]},["app",{sourceInterval:[2188,2196]},"hexDigit",[]]],["opt",{sourceInterval:[2198,2207]},["app",{sourceInterval:[2198,2206]},"hexDigit",[]]],["opt",{sourceInterval:[2208,2217]},["app",{sourceInterval:[2208,2216]},"hexDigit",[]]],["terminal",{sourceInterval:[2218,2221]},"}"]]],escapeChar_unicodeEscape:["define",{sourceInterval:[2250,2309]},null,[],["seq",{sourceInterval:[2250,2291]},["terminal",{sourceInterval:[2250,2255]},"\\u"],["app",{sourceInterval:[2256,2264]},"hexDigit",[]],["app",{sourceInterval:[2265,2273]},"hexDigit",[]],["app",{sourceInterval:[2274,2282]},"hexDigit",[]],["app",{sourceInterval:[2283,2291]},"hexDigit",[]]]],escapeChar_hexEscape:["define",{sourceInterval:[2316,2371]},null,[],["seq",{sourceInterval:[2316,2339]},["terminal",{sourceInterval:[2316,2321]},"\\x"],["app",{sourceInterval:[2322,2330]},"hexDigit",[]],["app",{sourceInterval:[2331,2339]},"hexDigit",[]]]],escapeChar:["define",{sourceInterval:[1664,2371]},"an escape sequence",[],["alt",{sourceInterval:[1703,2371]},["app",{sourceInterval:[1703,1709]},"escapeChar_backslash",[]],["app",{sourceInterval:[1765,1771]},"escapeChar_doubleQuote",[]],["app",{sourceInterval:[1829,1835]},"escapeChar_singleQuote",[]],["app",{sourceInterval:[1893,1898]},"escapeChar_backspace",[]],["app",{sourceInterval:[1955,1960]},"escapeChar_lineFeed",[]],["app",{sourceInterval:[2016,2021]},"escapeChar_carriageReturn",[]],["app",{sourceInterval:[2083,2088]},"escapeChar_tab",[]],["app",{sourceInterval:[2139,2221]},"escapeChar_unicodeCodePoint",[]],["app",{sourceInterval:[2250,2291]},"escapeChar_unicodeEscape",[]],["app",{sourceInterval:[2316,2339]},"escapeChar_hexEscape",[]]]],space:["extend",{sourceInterval:[2375,2394]},null,[],["app",{sourceInterval:[2387,2394]},"comment",[]]],comment_singleLine:["define",{sourceInterval:[2412,2458]},null,[],["seq",{sourceInterval:[2412,2443]},["terminal",{sourceInterval:[2412,2416]},"//"],["star",{sourceInterval:[2417,2429]},["seq",{sourceInterval:[2418,2427]},["not",{sourceInterval:[2418,2423]},["terminal",{sourceInterval:[2419,2423]},`
500
+ `]],["app",{sourceInterval:[2424,2427]},"any",[]]]],["lookahead",{sourceInterval:[2430,2443]},["alt",{sourceInterval:[2432,2442]},["terminal",{sourceInterval:[2432,2436]},`
501
+ `],["app",{sourceInterval:[2439,2442]},"end",[]]]]]],comment_multiLine:["define",{sourceInterval:[2465,2501]},null,[],["seq",{sourceInterval:[2465,2487]},["terminal",{sourceInterval:[2465,2469]},"/*"],["star",{sourceInterval:[2470,2482]},["seq",{sourceInterval:[2471,2480]},["not",{sourceInterval:[2471,2476]},["terminal",{sourceInterval:[2472,2476]},"*/"]],["app",{sourceInterval:[2477,2480]},"any",[]]]],["terminal",{sourceInterval:[2483,2487]},"*/"]]],comment:["define",{sourceInterval:[2398,2501]},null,[],["alt",{sourceInterval:[2412,2501]},["app",{sourceInterval:[2412,2443]},"comment_singleLine",[]],["app",{sourceInterval:[2465,2487]},"comment_multiLine",[]]]],tokens:["define",{sourceInterval:[2505,2520]},null,[],["star",{sourceInterval:[2514,2520]},["app",{sourceInterval:[2514,2519]},"token",[]]]],token:["define",{sourceInterval:[2524,2600]},null,[],["alt",{sourceInterval:[2532,2600]},["app",{sourceInterval:[2532,2540]},"caseName",[]],["app",{sourceInterval:[2543,2550]},"comment",[]],["app",{sourceInterval:[2553,2558]},"ident",[]],["app",{sourceInterval:[2561,2569]},"operator",[]],["app",{sourceInterval:[2572,2583]},"punctuation",[]],["app",{sourceInterval:[2586,2594]},"terminal",[]],["app",{sourceInterval:[2597,2600]},"any",[]]]],operator:["define",{sourceInterval:[2604,2669]},null,[],["alt",{sourceInterval:[2615,2669]},["terminal",{sourceInterval:[2615,2619]},"<:"],["terminal",{sourceInterval:[2622,2625]},"="],["terminal",{sourceInterval:[2628,2632]},":="],["terminal",{sourceInterval:[2635,2639]},"+="],["terminal",{sourceInterval:[2642,2645]},"*"],["terminal",{sourceInterval:[2648,2651]},"+"],["terminal",{sourceInterval:[2654,2657]},"?"],["terminal",{sourceInterval:[2660,2663]},"~"],["terminal",{sourceInterval:[2666,2669]},"&"]]],punctuation:["define",{sourceInterval:[2673,2709]},null,[],["alt",{sourceInterval:[2687,2709]},["terminal",{sourceInterval:[2687,2690]},"<"],["terminal",{sourceInterval:[2693,2696]},">"],["terminal",{sourceInterval:[2699,2702]},","],["terminal",{sourceInterval:[2705,2709]},"--"]]]}]),O1=Object.create(je.prototype);function pL(t,e){for(let r in t)if(r===e)return!0;return!1}function z1(t,e,r,n){let i=new ic(n),s,a,u,c=!1;return(r||om).createSemantics().addOperation("visit",{Grammars(m){return m.children.map(h=>h.visit())},Grammar(m,h,y,w,x){let k=m.visit();s=i.newGrammar(k),h.child(0)&&h.child(0).visit(),w.children.map(I=>I.visit());let v=s.build();if(v.source=this.source.trimmed(),pL(e,k))throw Xz(v);return e[k]=v,v},SuperGrammar(m,h){let y=h.visit();if(y==="null")s.withSuperGrammar(null);else{if(!e||!pL(e,y))throw Yz(y,e,h.source);s.withSuperGrammar(e[y])}},Rule_define(m,h,y,w,x){a=m.visit(),u=h.children.map(T=>T.visit())[0]||[],!s.defaultStartRule&&s.ensureSuperGrammar()!==En.ProtoBuiltInRules&&s.withDefaultStartRule(a);let k=x.visit(),v=y.children.map(T=>T.visit())[0],I=this.source.trimmed();return s.define(a,u,k,v,I)},Rule_override(m,h,y,w){a=m.visit(),u=h.children.map(v=>v.visit())[0]||[];let x=this.source.trimmed();s.ensureSuperGrammarRuleForOverriding(a,x),c=!0;let k=w.visit();return c=!1,s.override(a,u,k,null,x)},Rule_extend(m,h,y,w){a=m.visit(),u=h.children.map(v=>v.visit())[0]||[];let x=w.visit(),k=this.source.trimmed();return s.extend(a,u,x,null,k)},RuleBody(m,h){return i.alt(...h.visit()).withSource(this.source)},OverrideRuleBody(m,h){let y=h.visit(),w=y.indexOf(O1);if(w>=0){let x=y.slice(0,w),k=y.slice(w+1);return k.forEach(v=>{if(v===O1)throw uJ(v)}),new Ro(s.superGrammar,a,x,k).withSource(this.source)}else return i.alt(...y).withSource(this.source)},Formals(m,h,y){return h.visit()},Params(m,h,y){return h.visit()},Alt(m){return i.alt(...m.visit()).withSource(this.source)},TopLevelTerm_inline(m,h){let y=a+"_"+h.visit(),w=m.visit(),x=this.source.trimmed(),k=!(s.superGrammar&&s.superGrammar.rules[y]);c&&!k?s.override(y,u,w,null,x):s.define(y,u,w,null,x);let v=u.map(I=>i.app(I));return i.app(y,v).withSource(w.source)},OverrideTopLevelTerm_superSplice(m){return O1},Seq(m){return i.seq(...m.children.map(h=>h.visit())).withSource(this.source)},Iter_star(m,h){return i.star(m.visit()).withSource(this.source)},Iter_plus(m,h){return i.plus(m.visit()).withSource(this.source)},Iter_opt(m,h){return i.opt(m.visit()).withSource(this.source)},Pred_not(m,h){return i.not(h.visit()).withSource(this.source)},Pred_lookahead(m,h){return i.lookahead(h.visit()).withSource(this.source)},Lex_lex(m,h){return i.lex(h.visit()).withSource(this.source)},Base_application(m,h){let y=h.children.map(w=>w.visit())[0]||[];return i.app(m.visit(),y).withSource(this.source)},Base_range(m,h,y){return i.range(m.visit(),y.visit()).withSource(this.source)},Base_terminal(m){return i.terminal(m.visit()).withSource(this.source)},Base_paren(m,h,y){return h.visit()},ruleDescr(m,h,y){return h.visit()},ruleDescrText(m){return this.sourceString.trim()},caseName(m,h,y,w,x){return y.visit()},name(m,h){return this.sourceString},nameFirst(m){},nameRest(m){},terminal(m,h,y){return h.children.map(w=>w.visit()).join("")},oneCharTerminal(m,h,y){return h.visit()},escapeChar(m){try{return vL(this.sourceString)}catch(h){throw h instanceof RangeError&&h.message.startsWith("Invalid code point ")?cJ(m):h}},NonemptyListOf(m,h,y){return[m.visit()].concat(y.children.map(w=>w.visit()))},EmptyListOf(){return[]},_terminal(){return this.sourceString}})(t).visit()}var LJ=am(["grammar",{source:`OperationsAndAttributes {
502
+
503
+ AttributeSignature =
504
+ name
505
+
506
+ OperationSignature =
507
+ name Formals?
508
+
509
+ Formals
510
+ = "(" ListOf<name, ","> ")"
511
+
512
+ name (a name)
513
+ = nameFirst nameRest*
514
+
515
+ nameFirst
516
+ = "_"
517
+ | letter
518
+
519
+ nameRest
520
+ = "_"
521
+ | alnum
522
+
523
+ }`},"OperationsAndAttributes",null,"AttributeSignature",{AttributeSignature:["define",{sourceInterval:[29,58]},null,[],["app",{sourceInterval:[54,58]},"name",[]]],OperationSignature:["define",{sourceInterval:[62,100]},null,[],["seq",{sourceInterval:[87,100]},["app",{sourceInterval:[87,91]},"name",[]],["opt",{sourceInterval:[92,100]},["app",{sourceInterval:[92,99]},"Formals",[]]]]],Formals:["define",{sourceInterval:[104,143]},null,[],["seq",{sourceInterval:[118,143]},["terminal",{sourceInterval:[118,121]},"("],["app",{sourceInterval:[122,139]},"ListOf",[["app",{sourceInterval:[129,133]},"name",[]],["terminal",{sourceInterval:[135,138]},","]]],["terminal",{sourceInterval:[140,143]},")"]]],name:["define",{sourceInterval:[147,187]},"a name",[],["seq",{sourceInterval:[168,187]},["app",{sourceInterval:[168,177]},"nameFirst",[]],["star",{sourceInterval:[178,187]},["app",{sourceInterval:[178,186]},"nameRest",[]]]]],nameFirst:["define",{sourceInterval:[191,223]},null,[],["alt",{sourceInterval:[207,223]},["terminal",{sourceInterval:[207,210]},"_"],["app",{sourceInterval:[217,223]},"letter",[]]]],nameRest:["define",{sourceInterval:[227,257]},null,[],["alt",{sourceInterval:[242,257]},["terminal",{sourceInterval:[242,245]},"_"],["app",{sourceInterval:[252,257]},"alnum",[]]]]}]);PJ(En.BuiltInRules);CJ(LJ);function PJ(t){let e={empty(){return this.iteration()},nonEmpty(r,n,i){return this.iteration([r].concat(i.children))},self(...r){return this}};Tn.BuiltInSemantics=Tn.createSemantics(t,null).addOperation("asIteration",{emptyListOf:e.empty,nonemptyListOf:e.nonEmpty,EmptyListOf:e.empty,NonemptyListOf:e.nonEmpty,_iter:e.self})}function CJ(t){Tn.prototypeGrammarSemantics=t.createSemantics().addOperation("parse",{AttributeSignature(e){return{name:e.parse(),formals:[]}},OperationSignature(e,r){return{name:e.parse(),formals:r.children.map(n=>n.parse())[0]||[]}},Formals(e,r,n){return r.asIteration().children.map(i=>i.parse())},name(e,r){return this.sourceString}}),Tn.prototypeGrammar=t}function qJ(t){let e=0,r=[0],n=()=>r[r.length-1],i={},s=/( *).*(?:$|\r?\n|\r)/g,a;for(;(a=s.exec(t))!=null;){let[u,c]=a;if(u.length===0)break;let p=c.length,d=n(),m=e+p;if(p>d)r.push(p),i[m]=1;else if(p<d){let h=r.length;for(;n()!==p;)r.pop();i[m]=-1*(h-r.length)}e+=u.length}return r.length>1&&(i[e]=1-r.length),i}var LL="an indented block",PL="a dedent",hL=1114112,$1=class extends rc{constructor(e){super(e.input),this.state=e}_indentationAt(e){return this.state.userData[e]||0}atEnd(){return super.atEnd()&&this._indentationAt(this.pos)===0}next(){if(this._indentationAt(this.pos)!==0){this.examinedLength=Math.max(this.examinedLength,this.pos);return}return super.next()}nextCharCode(){return this._indentationAt(this.pos)!==0?(this.examinedLength=Math.max(this.examinedLength,this.pos),hL):super.nextCharCode()}nextCodePoint(){return this._indentationAt(this.pos)!==0?(this.examinedLength=Math.max(this.examinedLength,this.pos),hL):super.nextCodePoint()}},im=class extends je{constructor(e=!0){super(),this.isIndent=e}allowsSkippingPrecedingSpace(){return!0}eval(e){let{inputStream:r}=e,n=e.userData;e.doNotMemoize=!0;let i=r.pos,s=this.isIndent?1:-1;return(n[i]||0)*s>0?(e.userData=Object.create(n),e.userData[i]-=s,e.pushBinding(new Bs(0),i),!0):(e.processFailure(i,this),!1)}getArity(){return 1}_assertAllApplicationsAreValid(e,r){}_isNullable(e,r){return!1}assertChoicesHaveUniformArity(e){}assertIteratedExprsAreNotNullable(e){}introduceParams(e){return this}substituteParams(e){return this}toString(){return this.isIndent?"indent":"dedent"}toDisplayString(){return this.toString()}toFailure(e){let r=this.isIndent?LL:PL;return new On(this,r,"description")}},RJ=new nt("indent"),MJ=new nt("dedent"),DJ=new Ro(H1,"any",[RJ,MJ],[]),CL=new ic().newGrammar("IndentationSensitive").withSuperGrammar(H1).define("indent",[],new im(!0),LL,void 0,!0).define("dedent",[],new im(!1),PL,void 0,!0).extend("any",[],DJ,"any character",void 0).build();Object.assign(CL,{_matchStateInitializer(t){t.userData=qJ(t.input),t.inputStream=new $1(t)},supportsIncrementalParsing:!1});var FJ="17.5.0";En.initApplicationParser(om,z1);var jJ=t=>!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t);function BJ(t,e,r){let n=om.match(t,"Grammars");if(n.failed())throw Qz(n);return z1(n,e,void 0,r)}function $J(t,e,r){let n=qL(t,e,r),i=Object.keys(n);if(i.length===0)throw new Error("Missing grammar definition");if(i.length>1){let a=n[i[1]].source;throw new Error(W1(a.sourceString,a.startIdx)+"Found more than one grammar definition -- use ohm.grammars() instead.")}return n[i[0]]}function qL(t,e,r){let n=Object.create(e||{});if(typeof t!="string")if(jJ(t))t=t.toString();else throw new TypeError("Expected string as first argument, got "+V1(t));return BJ(t,n,r),n}function VJ(t,e){return $J(t,e)}function UJ(t,e){return qL(t,e)}as.ExperimentalIndentationSensitive=CL;as._buildGrammar=z1;as.grammar=VJ;as.grammars=UJ;as.makeRecipe=am;as.ohmGrammar=om;as.pexprs=EJ;as.version=FJ});var DL=P((_ve,ML)=>{b();ML.exports=String.raw`Helpers {
524
+ Node = TextNode*
525
+ TextNode = AnyExceptPlus<openControl>
526
+ openControl = end
527
+
528
+ empty = /* nothing */
529
+ anyExcept<lit> = (~ lit any)
530
+ anyExceptStar<lit> = (~ lit any)*
531
+ anyExceptPlus<lit> = (~ lit any)+
532
+ AnyExcept<lit> = (~ lit any)
533
+ AnyExceptPlus<lit> = (~ lit any)+
534
+ AnyExceptStar<lit> = (~ lit any)*
535
+ identifierCharacter = alnum | "_" | "-"
536
+
537
+ orderedListOf<a, b, sep> =
538
+ | nonemptyOrderedListOf<a, b, sep>
539
+ | emptyListOf<a, sep>
540
+ nonemptyOrderedListOf<a, b, sep> =
541
+ | nonemptyListOf<b, sep>
542
+ | nonemptyOrderedListOfBoth<a, b, sep>
543
+ | nonemptyListOf<a, sep>
544
+ nonemptyOrderedListOfBoth<a, b, sep> =
545
+ nonemptyListOf<a, sep> (sep nonemptyListOf<b, sep>)
546
+
547
+ singleQuote = "'" | "‘" | "’"
548
+ doubleQuote = "\"" | "“" | "”"
549
+ controls = "\u{007F}".."\u{009F}"
550
+ noncharacters = "\u{FDD0}".."\u{FDEF}"
551
+ newline = "\r"? "\n"
552
+ }
553
+
554
+ Liquid <: Helpers {
555
+ Node := (liquidNode | TextNode)*
556
+ openControl := "{{" | "{%"
557
+ endOfTagName = &("-%}" | "-}}" | "%}" | "}}")
558
+ endOfVarName = ~identifierCharacter
559
+ endOfIdentifier = endOfTagName | endOfVarName
560
+
561
+ liquidNode =
562
+ | liquidDoc
563
+ | liquidBlockComment
564
+ | liquidRawTag
565
+ | liquidDrop
566
+ | liquidTagClose
567
+ | liquidTagOpen
568
+ | liquidTag
569
+ | liquidInlineComment
570
+
571
+ liquidTagStrict =
572
+ | liquidTagAssign
573
+ | liquidTagBreak
574
+ | liquidTagContinue
575
+ | liquidTagCycle
576
+ | liquidTagContentFor
577
+ | liquidTagDecrement
578
+ | liquidTagEcho
579
+ | liquidTagElse
580
+ | liquidTagElsif
581
+ | liquidTagInclude
582
+ | liquidTagIncrement
583
+ | liquidTagLayout
584
+ | liquidTagLiquid
585
+ | liquidTagRender
586
+ | liquidTagSection
587
+ | liquidTagSections
588
+ | liquidTagWhen
589
+
590
+ liquidTag =
591
+ | liquidTagStrict
592
+ | liquidTagBaseCase
593
+
594
+ liquidTagOpenStrict =
595
+ | liquidTagOpenCase
596
+ | liquidTagOpenCapture
597
+ | liquidTagOpenForm
598
+ | liquidTagOpenFor
599
+ | liquidTagOpenTablerow
600
+ | liquidTagOpenIf
601
+ | liquidTagOpenPaginate
602
+ | liquidTagOpenUnless
603
+
604
+ liquidTagOpen =
605
+ | liquidTagOpenStrict
606
+ | liquidTagOpenBaseCase
607
+
608
+ liquidTagClose = "{%" "-"? space* "end" blockName space* tagMarkup "-"? "%}"
609
+
610
+ // These two are the same but transformed differently
611
+ liquidTagRule<name, markup> =
612
+ "{%" "-"? space* (name endOfIdentifier) space* markup "-"? "%}"
613
+ liquidTagOpenRule<name, markup> =
614
+ "{%" "-"? space* (name endOfIdentifier) space* markup "-"? "%}"
615
+
616
+ liquidTagBaseCase = liquidTagRule<liquidTagName, tagMarkup>
617
+
618
+ liquidTagEcho = liquidTagRule<"echo", liquidTagEchoMarkup>
619
+ liquidTagEchoMarkup = liquidVariable<delimTag>
620
+
621
+ liquidTagAssign = liquidTagRule<"assign", liquidTagAssignMarkup>
622
+ liquidTagAssignMarkup = variableSegment space* "=" space* liquidVariable<delimTag>
623
+
624
+ liquidTagCycle = liquidTagRule<"cycle", liquidTagCycleMarkup>
625
+ liquidTagCycleMarkup = (liquidExpression<delimTag> ":")? space* nonemptyListOf<liquidExpression<delimTag>, argumentSeparator> space*
626
+
627
+ liquidTagIncrement = liquidTagRule<"increment", variableSegmentAsLookupMarkup>
628
+ liquidTagDecrement = liquidTagRule<"decrement", variableSegmentAsLookupMarkup>
629
+ liquidTagOpenCapture = liquidTagOpenRule<"capture", variableSegmentAsLookupMarkup>
630
+ variableSegmentAsLookupMarkup = variableSegmentAsLookup space*
631
+
632
+ liquidTagSection = liquidTagRule<"section", liquidTagSectionMarkup>
633
+ liquidTagSectionMarkup = liquidString<delimTag> space*
634
+
635
+ liquidTagSections = liquidTagRule<"sections", liquidTagSectionsMarkup>
636
+ liquidTagSectionsMarkup = liquidString<delimTag> space*
637
+
638
+ liquidTagLayout = liquidTagRule<"layout", liquidTagLayoutMarkup>
639
+ liquidTagLayoutMarkup = liquidExpression<delimTag> space*
640
+
641
+ // We'll black hole the statement and switch parser in the cst builder
642
+ // We do this because it's technically the same grammar (with minor redefinitions)
643
+ // and it would be a huge chore and maintenance hell to rewrite all the rules with
644
+ // hspace = " " | "\t"
645
+ //
646
+ // The alternative is that this grammar parses the {% liquid tagMarkup %} as its own string,
647
+ // and then we switch to the LiquidStatement grammar that
648
+ // redefines liquidTagOpenRule, liquidTagRule, and space.
649
+ liquidTagLiquid = liquidTagRule<"liquid", liquidTagLiquidMarkup>
650
+ liquidTagLiquidMarkup = tagMarkup
651
+
652
+ liquidTagContentFor = liquidTagRule<"content_for", liquidTagContentForMarkup>
653
+
654
+ liquidTagContentForMarkup =
655
+ contentForType (argumentSeparatorOptionalComma contentForTagArgument) (space* ",")? space*
656
+
657
+ contentForTagArgument = listOf<contentForNamedArgument<delimTag>, argumentSeparatorOptionalComma>
658
+ completionModeContentForTagArgument = listOf<contentForNamedArgument<delimTag>, argumentSeparatorOptionalComma> (argumentSeparator? (liquidVariableLookup<delimTag>))?
659
+ contentForNamedArgument<delim> = (variableSegment ("." variableSegment)*) space* ":" space* (liquidExpression<delim>)
660
+
661
+ contentForType = liquidString<delimTag>
662
+
663
+ liquidTagInclude = liquidTagRule<"include", liquidTagRenderMarkup>
664
+ liquidTagRender = liquidTagRule<"render", liquidTagRenderMarkup>
665
+ liquidTagRenderMarkup =
666
+ snippetExpression renderVariableExpression? renderAliasExpression? renderArguments
667
+
668
+ renderArguments = (argumentSeparatorOptionalComma tagArguments) (space* ",")? space*
669
+ completionModeRenderArguments = (argumentSeparatorOptionalComma tagArguments) (space* ",")? space* (argumentSeparator? liquidVariableLookup<delimTag> space*)?
670
+ snippetExpression = liquidString<delimTag> | variableSegmentAsLookup
671
+ renderVariableExpression = space+ ("for" | "with") space+ liquidExpression<delimTag>
672
+ renderAliasExpression = space+ "as" space+ variableSegment
673
+
674
+ liquidTagOpenBaseCase = liquidTagOpenRule<blockName, tagMarkup>
675
+
676
+ liquidTagOpenForm = liquidTagOpenRule<"form", liquidTagOpenFormMarkup>
677
+ liquidTagOpenFormMarkup = arguments<delimTag> (space* ",")? space*
678
+
679
+ liquidTagOpenFor = liquidTagOpenRule<"for", liquidTagOpenForMarkup>
680
+ liquidTagOpenForMarkup =
681
+ variableSegment space* "in" space* liquidExpression<delimTag>
682
+ (space* "reversed")? argumentSeparatorOptionalComma
683
+ tagArguments (space* ",")? space*
684
+
685
+ // It's the same, the difference is support for different named arguments<delim>
686
+ liquidTagOpenTablerow = liquidTagOpenRule<"tablerow", liquidTagOpenForMarkup>
687
+
688
+ liquidTagOpenCase = liquidTagOpenRule<"case", liquidTagOpenCaseMarkup>
689
+ liquidTagOpenCaseMarkup = liquidExpression<delimTag> space*
690
+
691
+ liquidTagWhen = liquidTagRule<"when", liquidTagWhenMarkup>
692
+ liquidTagWhenMarkup = nonemptyListOf<liquidExpression<delimTag>, whenMarkupSep> space*
693
+ whenMarkupSep = space* ("," | "or" ~identifier) space*
694
+
695
+ liquidTagOpenIf = liquidTagOpenRule<"if", liquidTagOpenConditionalMarkup>
696
+ liquidTagOpenUnless = liquidTagOpenRule<"unless", liquidTagOpenConditionalMarkup>
697
+ liquidTagElsif = liquidTagRule<"elsif", liquidTagOpenConditionalMarkup>
698
+
699
+ liquidTagBreak = liquidTagRule<"break", empty>
700
+ liquidTagContinue = liquidTagRule<"continue", empty>
701
+ liquidTagElse = liquidTagRule<"else", empty>
702
+
703
+ liquidTagOpenConditionalMarkup = nonemptyListOf<condition<delimTag>, conditionSeparator> space*
704
+ conditionSeparator = &logicalOperator
705
+ condition<delim> = logicalOperator? space* (comparison<delim> | liquidExpression<delim>) space*
706
+ logicalOperator = ("and" | "or") ~identifier
707
+ comparison<delim> = liquidExpression<delim> space* comparator space* liquidExpression<delim>
708
+ comparator =
709
+ ( "=="
710
+ | "!="
711
+ | ">="
712
+ | "<="
713
+ | ">"
714
+ | "<")
715
+ | ("contains" ~identifier)
716
+
717
+ liquidTagOpenPaginate = liquidTagOpenRule<"paginate", liquidTagOpenPaginateMarkup>
718
+ liquidTagOpenPaginateMarkup =
719
+ liquidExpression<delimTag> space+ "by" space+ liquidExpression<delimTag> argumentSeparatorOptionalComma tagArguments (space* ",")? space*
720
+
721
+ liquidDrop = "{{" "-"? space* liquidDropCases "-"? "}}"
722
+ liquidDropCases = liquidVariable<delimVO> | liquidDropBaseCase
723
+ liquidDropBaseCase = anyExceptStar<delimVO>
724
+ liquidInlineComment = "{%" "-"? space* "#" space? tagMarkup "-"? "%}"
725
+
726
+ liquidRawTag =
727
+ | liquidRawTagImpl<"raw">
728
+ | liquidRawTagImpl<"javascript">
729
+ | liquidRawTagImpl<"schema">
730
+ | liquidRawTagImpl<"stylesheet">
731
+ | liquidRawTagImpl<"style">
732
+ liquidRawTagImpl<name> =
733
+ "{%" "-"? space* (name endOfIdentifier) space* tagMarkup "-"? "%}"
734
+ anyExceptStar<liquidRawTagClose<name>>
735
+ "{%" "-"? space* "end" (name endOfIdentifier) space* "-"? "%}"
736
+ liquidRawTagClose<name> =
737
+ "{%" "-"? space* "end" (name endOfIdentifier) space* "-"? "%}"
738
+
739
+ liquidBlockComment =
740
+ commentBlockStart
741
+ (liquidBlockComment | anyExceptPlus<(commentBlockStart | commentBlockEnd)>)*
742
+ commentBlockEnd
743
+ commentBlockStart = "{%" "-"? space* ("comment" endOfIdentifier) space* tagMarkup "-"? "%}"
744
+ commentBlockEnd = "{%" "-"? space* ("endcomment" endOfIdentifier) space* tagMarkup "-"? "%}"
745
+
746
+ liquidDoc =
747
+ liquidDocStart
748
+ liquidDocBody
749
+ liquidDocEnd
750
+
751
+ liquidDocStart = "{%" "-"? space* ("doc" endOfIdentifier) space* tagMarkup "-"? "%}"
752
+ liquidDocEnd = "{%" "-"? space* ("enddoc" endOfIdentifier) space* tagMarkup "-"? "%}"
753
+ liquidDocBody = anyExceptStar<(liquidDocStart | liquidDocEnd)>
754
+
755
+ // In order for the grammar to "fallback" to the base case, this
756
+ // rule must pass if and only if we support what we parse. This
757
+ // implies that—since we don't support filters yet—we have a
758
+ // positive lookahead on "-}}" or "}}" in the rule. We do this
759
+ // because we'd otherwise positively match the following string
760
+ // instead of falling back to the other rule:
761
+ // {{ 'string' | some_filter }}
762
+ liquidVariable<delim> = liquidComplexExpression<delim> liquidFilter<delim>* space* &delim
763
+
764
+ liquidExpression<delim> =
765
+ | liquidString<delim>
766
+ | liquidNumber
767
+ | liquidLiteral
768
+ | liquidRange<delim>
769
+ | liquidVariableLookup<delim>
770
+
771
+ liquidComplexExpression<delim> =
772
+ | liquidBooleanExpression<delim>
773
+ | liquidExpression<delim>
774
+
775
+ liquidBooleanExpression<delim> = booleanExpressionCondition<delim> listOf<booleanExpressionSubsequentCondition<delim>, conditionSeparator>
776
+
777
+ // This might over-capture things since the conditions below can contain any ${"`"}liquidExpression${"`"}s.
778
+ // We will need to clean this up in CST. If we restrict the conditions to only contain comparisons and
779
+ // variable lookups, we can't support "truthy" expressions like ${"`"}{{ some_var and 'this' }}${"`"}
780
+ booleanExpressionSubsequentCondition<delim> = space* logicalOperator space* (comparison<delim> | liquidExpression<delim>) space*
781
+ booleanExpressionCondition<delim> = comparison<delim> | liquidExpression<delim>
782
+
783
+ liquidString<delim> = liquidSingleQuotedString<delim> | liquidDoubleQuotedString<delim>
784
+ liquidSingleQuotedString<delim> = "'" anyExceptStar<("'"| delim)> "'"
785
+ liquidDoubleQuotedString<delim> = "\"" anyExceptStar<("\""| delim)> "\""
786
+
787
+ liquidNumber = liquidFloat | liquidInteger
788
+ liquidInteger = "-"? digit+
789
+ liquidFloat = "-"? digit+ "." digit+
790
+
791
+ liquidLiteral =
792
+ ( "true"
793
+ | "false"
794
+ | "blank"
795
+ | "empty"
796
+ | "nil"
797
+ | "null"
798
+ ) endOfIdentifier
799
+
800
+ liquidRange<delim> =
801
+ "(" space* liquidExpression<delim> space* ".." space* liquidExpression<delim> space* ")"
802
+
803
+ liquidVariableLookup<delim> =
804
+ | variableSegment lookup<delim>*
805
+ | empty lookup<delim>+
806
+ lookup<delim> =
807
+ | indexLookup<delim>
808
+ | dotLookup
809
+ indexLookup<delim> = space* "[" space* liquidExpression<delim> space* "]"
810
+ dotLookup = space* "." space* identifier
811
+
812
+ liquidFilter<delim> = space* "|" space* identifier (space* ":" space* arguments<delim> (space* ",")?)?
813
+
814
+ arguments<delim> = nonemptyOrderedListOf<positionalArgument<delim>, namedArgument<delim>, argumentSeparator>
815
+ argumentSeparator = space* "," space*
816
+ argumentSeparatorOptionalComma = space* ","? space*
817
+ positionalArgument<delim> = liquidExpression<delim> ~(space* ":")
818
+ namedArgument<delim> = variableSegment space* ":" space* liquidExpression<delim>
819
+ tagArguments = listOf<namedArgument<delimTag>, argumentSeparatorOptionalComma>
820
+ filterArguments<delim> =
821
+ | complexArguments<delim>
822
+ | simpleArgument<delim>
823
+ complexArguments<delim> = arguments<delim> (space* "," space* simpleArgument<delim>)?
824
+ simpleArgument<delim> = liquidVariableLookup<delim>
825
+
826
+ variableSegment = (letter | "_") (~endOfTagName identifierCharacter)*
827
+ variableSegmentAsLookup = variableSegment
828
+ identifier = variableSegment "?"?
829
+
830
+ tagMarkup = anyExceptStar<delimTag>
831
+
832
+ liquidTagName =
833
+ letter (alnum | "_")*
834
+
835
+ blockName =
836
+ // Shopify blocks
837
+ ( "form"
838
+ | "paginate"
839
+ // Base blocks
840
+ | "capture"
841
+ | "case"
842
+ | "for"
843
+ | "ifchanged"
844
+ | "if"
845
+ | "unless"
846
+ | "tablerow"
847
+ ) endOfIdentifier
848
+
849
+ delimTag = "-%}" | "%}"
850
+ delimVO = "-}}" | "}}"
851
+ }
852
+
853
+ LiquidStatement <: Liquid {
854
+ Node := listOf<LiquidStatement, statementSep> (space | newline)*
855
+
856
+ // This is the big brains moment: we redefine space to exclude newlines.
857
+ //
858
+ // Which means that all our other Liquid rules can be reused
859
+ // without modification(!)
860
+ //
861
+ // We don't need to maintain rules like this:
862
+ // - liquidVariable<space>
863
+ // - liquidExpression<space>
864
+ // - variableLookup<space>
865
+ // - ... long list of stuff that takes space as param
866
+ // - liquidString<space>
867
+ //
868
+ // All we need is this little, VERY IMPORTANT, part right here that
869
+ // make it so we can parse the same way in Liquid tags.
870
+ //
871
+ // I'm putting in this huge comment so that it's more obvious.
872
+ space := " " | "\t"
873
+
874
+ LiquidStatement =
875
+ | liquidBlockComment
876
+ | liquidRawTag
877
+ | liquidTagClose
878
+ | liquidTagOpen
879
+ | liquidTag
880
+ | liquidInlineComment
881
+
882
+ liquidTagOpenRule<name, markup>
883
+ := (name ~identifierCharacter) space* markup &liquidStatementEnd
884
+
885
+ liquidTagRule<name, markup>
886
+ := (name ~identifierCharacter) space* markup &liquidStatementEnd
887
+
888
+ liquidTagClose
889
+ := "end" (blockName ~identifierCharacter) space* tagMarkup &liquidStatementEnd
890
+
891
+ liquidRawTagImpl<name>
892
+ := (name ~identifierCharacter) space* tagMarkup newline
893
+ anyExceptStar<liquidRawTagClose<name>>
894
+ "end" name space* &liquidStatementEnd
895
+
896
+ liquidRawTagClose<name>
897
+ := "end" name space* &liquidStatementEnd
898
+
899
+ liquidBlockComment :=
900
+ commentBlockStart statementSep
901
+ (listOf<liquidCommentBlockStatement, statementSep> statementSep)?
902
+ commentBlockEnd
903
+
904
+ liquidCommentBlockStatement =
905
+ | liquidBlockComment
906
+ | nonTerminalCommentLine
907
+
908
+ commentBlockStart
909
+ := ("comment" ~identifierCharacter) space* tagMarkup
910
+
911
+ commentBlockEnd
912
+ := ("endcomment" ~identifierCharacter) space* tagMarkup
913
+
914
+ nonTerminalCommentLine
915
+ = ~commentBlockEnd anyExceptPlus<newline>
916
+
917
+ liquidInlineComment
918
+ := "#" space? tagMarkup &liquidStatementEnd
919
+
920
+ tagMarkup := anyExceptStar<liquidStatementEnd>
921
+
922
+ // trailing whitespace, newline, + anything else before the next tag
923
+ statementSep = space* newline (space | newline)*
924
+
925
+ liquidStatementEnd = newline | end
926
+ delimTag := liquidStatementEnd
927
+ }
928
+
929
+ LiquidDoc <: Helpers {
930
+ Node := ImplicitDescription (LiquidDocNode | TextNode)*
931
+ LiquidDocNode =
932
+ | paramNode
933
+ | exampleNode
934
+ | descriptionNode
935
+ | promptNode
936
+ | fallbackNode
937
+
938
+ endOfDescription = strictSpace* openControl
939
+ descriptionContent = anyExceptStar<endOfDescription>
940
+ ImplicitDescription = descriptionContent
941
+
942
+ // By default, space matches new lines as well. We override it here to make writing rules easier.
943
+ strictSpace = " " | "\t"
944
+ // We use this as an escape hatch to stop matching TextNode and try again when one of these characters is encountered
945
+ openControl:= strictSpace* ("@" | end)
946
+ // List of supported tags we use to identify boundaries
947
+ supportedTags = "@prompt" | "@example" | "@description" | "@param"
948
+
949
+
950
+ paramNode = "@param" strictSpace* paramType? strictSpace* (optionalParamName | paramName) (strictSpace* "-")? strictSpace* paramDescription
951
+ paramType = "{" strictSpace* paramTypeContent strictSpace* "}"
952
+ paramTypeContent = anyExceptStar<("}"| strictSpace)>
953
+
954
+ paramName = textValue
955
+ optionalParamName = "[" strictSpace* textValue strictSpace* "]"
956
+ textValue = identifierCharacter+
957
+
958
+ paramDescription = (~"]" anyExceptStar<endOfParam>)
959
+ endOfParam = strictSpace* (newline | end)
960
+
961
+ // Prompt node is system-controlled, so we don't strip the leading spaces to maintain indentation
962
+ promptNode = "@prompt" multilineTextContent
963
+ exampleNode = "@example" space* multilineTextContent
964
+ descriptionNode = "@description" space* multilineTextContent
965
+
966
+ // We want multilineTextContent to be free-form, so instead of terminating the match at "@" we explicitly look for a suppported tag
967
+ // This means that malformed tags will be considered part of the multilineTextContent
968
+ multilineTextContent = anyExceptStar<endOfMultilineText>
969
+ endOfMultilineText = strictSpace* (supportedTags | end)
970
+
971
+ fallbackNode = "@" anyExceptStar<endOfParam>
972
+ }
973
+
974
+ LiquidHTML <: Liquid {
975
+ Node := yamlFrontmatter? (HtmlNode | liquidNode | TextNode)*
976
+ openControl += "<"
977
+
978
+ yamlFrontmatter =
979
+ "---" newline anyExceptStar<"---"> "---" newline
980
+
981
+ HtmlNode =
982
+ | HtmlDoctype
983
+ | HtmlComment
984
+ | HtmlRawTag
985
+ | HtmlVoidElement
986
+ | HtmlSelfClosingElement
987
+ | HtmlTagClose
988
+ | HtmlTagOpen
989
+
990
+ // https://html.spec.whatwg.org/multipage/syntax.html#the-doctype
991
+ HtmlDoctype =
992
+ #("<!" caseInsensitive<"doctype"> space+ caseInsensitive<"html">) legacyDoctypeString? ">"
993
+ legacyDoctypeString
994
+ = anyExceptPlus<">">
995
+
996
+ HtmlComment = "<!--" #(anyExceptStar<"-->"> "-->")
997
+
998
+ // These are black holes, we'll ignore what's in them
999
+ HtmlRawTag =
1000
+ | HtmlRawTagImpl<"script">
1001
+ | HtmlRawTagImpl<"style">
1002
+ | HtmlRawTagImpl<"svg">
1003
+
1004
+ HtmlRawTagImpl<name> =
1005
+ TagStart<name>
1006
+ (HtmlRawTagImpl<name> | AnyExceptPlus<(TagStart<name> | TagEnd<name>)>)*
1007
+ TagEnd<name>
1008
+ TagStart<name> = "<" name AttrList ">"
1009
+ TagEnd<name> = "</" name ">"
1010
+
1011
+ HtmlVoidElement =
1012
+ #("<" voidElementName &(space | "/" | ">")) AttrList "/"? ">"
1013
+
1014
+ HtmlSelfClosingElement =
1015
+ #("<" tagName) AttrList "/>"
1016
+
1017
+ HtmlTagOpen =
1018
+ #("<" tagName) AttrList ">"
1019
+
1020
+ HtmlTagClose =
1021
+ #("</" tagName) ">"
1022
+
1023
+ tagName = leadingTagNamePart trailingTagNamePart*
1024
+
1025
+ // The difference here is that the first text part must start
1026
+ // with a letter, but trailing text parts don't have that
1027
+ // requirement
1028
+ leadingTagNamePart =
1029
+ | liquidDrop
1030
+ | leadingTagNameTextNode
1031
+
1032
+ trailingTagNamePart =
1033
+ | liquidDrop
1034
+ | trailingTagNameTextNode
1035
+
1036
+ leadingTagNameTextNode = letter (alnum | "-" | ":")*
1037
+ trailingTagNameTextNode = (alnum | "-" | ":")+
1038
+
1039
+ AttrList = Attr*
1040
+
1041
+ Attr =
1042
+ AttrSingleQuoted | AttrDoubleQuoted | AttrUnquoted | liquidNode | attrEmpty
1043
+
1044
+ attrEmpty = attrName
1045
+
1046
+ AttrUnquoted = attrName "=" attrUnquotedValue
1047
+ AttrSingleQuoted = attrName "=" singleQuote #(attrSingleQuotedValue singleQuote)
1048
+ AttrDoubleQuoted = attrName "=" doubleQuote #(attrDoubleQuotedValue doubleQuote)
1049
+
1050
+ attrName = (liquidDrop | attrNameTextNode)+
1051
+
1052
+ // https://html.spec.whatwg.org/#attributes-2
1053
+ attrNameTextNode = anyExceptPlus<(space | quotes | "=" | ">" | "/>" | "{{" | "{%" | controls | noncharacters)>
1054
+ attrUnquotedValue = (liquidDrop | attrUnquotedTextNode)*
1055
+ attrSingleQuotedValue = (liquidNode | attrSingleQuotedTextNode)*
1056
+ attrDoubleQuotedValue = (liquidNode | attrDoubleQuotedTextNode)*
1057
+
1058
+ attrUnquotedTextNode = anyExceptPlus<(space | quotes | "=" | "<" | ">" | "${"`"}" | "{{" | "{%")>
1059
+ attrSingleQuotedTextNode = anyExceptPlus<(singleQuote | "{{" | "{%")>
1060
+ attrDoubleQuotedTextNode = anyExceptPlus<(doubleQuote | "{{" | "{%")>
1061
+
1062
+ quotes = singleQuote | doubleQuote
1063
+
1064
+ // https://www.w3.org/TR/2011/WD-html-markup-20110113/syntax.html#void-element
1065
+ voidElementName =
1066
+ ( caseInsensitive<"area">
1067
+ | caseInsensitive<"base">
1068
+ | caseInsensitive<"br">
1069
+ | caseInsensitive<"col">
1070
+ | caseInsensitive<"command">
1071
+ | caseInsensitive<"embed">
1072
+ | caseInsensitive<"hr">
1073
+ | caseInsensitive<"img">
1074
+ | caseInsensitive<"input">
1075
+ | caseInsensitive<"keygen">
1076
+ | caseInsensitive<"link">
1077
+ | caseInsensitive<"meta">
1078
+ | caseInsensitive<"param">
1079
+ | caseInsensitive<"source">
1080
+ | caseInsensitive<"track">
1081
+ | caseInsensitive<"wbr">
1082
+ ) ~identifierCharacter
1083
+ }
1084
+
1085
+ StrictLiquid <: Liquid {
1086
+ liquidTag := liquidTagStrict
1087
+ liquidTagOpen := liquidTagOpenStrict
1088
+ }
1089
+
1090
+ StrictLiquidStatement <: LiquidStatement {
1091
+ liquidTag := liquidTagStrict
1092
+ liquidTagOpen := liquidTagOpenStrict
1093
+ }
1094
+
1095
+ StrictLiquidHTML <: LiquidHTML {
1096
+ liquidTag := liquidTagStrict
1097
+ liquidTagOpen := liquidTagOpenStrict
1098
+ }
1099
+
1100
+ WithPlaceholderLiquid <: Liquid {
1101
+ liquidFilter<delim> := space* "|" space* identifier (space* ":" space* filterArguments<delim> (space* ",")?)?
1102
+ liquidTagContentForMarkup :=
1103
+ contentForType (argumentSeparatorOptionalComma completionModeContentForTagArgument) (space* ",")? space*
1104
+ liquidTagRenderMarkup :=
1105
+ snippetExpression renderVariableExpression? renderAliasExpression? completionModeRenderArguments
1106
+ liquidTagName := (letter | "█") (alnum | "_")*
1107
+ variableSegment := (letter | "_" | "█") (identifierCharacter | "█")*
1108
+ liquidDoc :=
1109
+ liquidDocStart
1110
+ liquidDocBody
1111
+ liquidDocEnd?
1112
+ }
1113
+
1114
+ WithPlaceholderLiquidStatement <: LiquidStatement {
1115
+ liquidFilter<delim> := space* "|" space* identifier (space* ":" space* filterArguments<delim> (space* ",")?)?
1116
+ liquidTagContentForMarkup :=
1117
+ contentForType (argumentSeparatorOptionalComma completionModeContentForTagArgument) (space* ",")? space*
1118
+ liquidTagRenderMarkup :=
1119
+ snippetExpression renderVariableExpression? renderAliasExpression? completionModeRenderArguments
1120
+ liquidTagName := (letter | "█") (alnum | "_")*
1121
+ variableSegment := (letter | "_" | "█") (identifierCharacter | "█")*
1122
+ liquidDoc :=
1123
+ liquidDocStart
1124
+ liquidDocBody
1125
+ liquidDocEnd?
1126
+ }
1127
+
1128
+ WithPlaceholderLiquidHTML <: LiquidHTML {
1129
+ liquidFilter<delim> := space* "|" space* identifier (space* ":" space* filterArguments<delim> (space* ",")?)?
1130
+ liquidTagContentForMarkup :=
1131
+ contentForType (argumentSeparatorOptionalComma completionModeContentForTagArgument) (space* ",")? space*
1132
+ liquidTagRenderMarkup :=
1133
+ snippetExpression renderVariableExpression? renderAliasExpression? completionModeRenderArguments
1134
+ liquidTagName := (letter | "█") (alnum | "_")*
1135
+ variableSegment := (letter | "_" | "█") (identifierCharacter | "█")*
1136
+ leadingTagNameTextNode := (letter | "█") (alnum | "-" | ":" | "█")*
1137
+ trailingTagNameTextNode := (alnum | "-" | ":" | "█")+
1138
+ liquidDoc :=
1139
+ liquidDocStart
1140
+ liquidDocBody
1141
+ liquidDocEnd?
1142
+ }
1143
+ `});var um=P(Ze=>{"use strict";b();Object.defineProperty(Ze,"__esModule",{value:!0});Ze.TAGS_WITHOUT_MARKUP=Ze.VOID_ELEMENTS=Ze.RAW_TAGS=Ze.BLOCKS=Ze.placeholderGrammars=Ze.tolerantGrammars=Ze.strictGrammars=Ze.LiquidDocGrammar=Ze.TextNodeGrammar=Ze.liquidHtmlGrammars=void 0;var WJ=RL();Ze.liquidHtmlGrammars=(0,WJ.grammars)(DL());Ze.TextNodeGrammar=Ze.liquidHtmlGrammars.Helpers;Ze.LiquidDocGrammar=Ze.liquidHtmlGrammars.LiquidDoc;Ze.strictGrammars={Liquid:Ze.liquidHtmlGrammars.StrictLiquid,LiquidHTML:Ze.liquidHtmlGrammars.StrictLiquidHTML,LiquidStatement:Ze.liquidHtmlGrammars.StrictLiquidStatement};Ze.tolerantGrammars={Liquid:Ze.liquidHtmlGrammars.Liquid,LiquidHTML:Ze.liquidHtmlGrammars.LiquidHTML,LiquidStatement:Ze.liquidHtmlGrammars.LiquidStatement};Ze.placeholderGrammars={Liquid:Ze.liquidHtmlGrammars.WithPlaceholderLiquid,LiquidHTML:Ze.liquidHtmlGrammars.WithPlaceholderLiquidHTML,LiquidStatement:Ze.liquidHtmlGrammars.WithPlaceholderLiquidStatement};Ze.BLOCKS=Ze.strictGrammars.LiquidHTML.rules.blockName.body.factors[0].terms.map(t=>t.obj);Ze.RAW_TAGS=Ze.strictGrammars.LiquidHTML.rules.liquidRawTag.body.terms.map(t=>t.args[0].obj).concat("comment");Ze.VOID_ELEMENTS=Ze.strictGrammars.LiquidHTML.rules.voidElementName.body.factors[0].terms.map(t=>t.args[0].obj);Ze.TAGS_WITHOUT_MARKUP=["style","schema","javascript","else","break","continue","comment","raw","doc"]});var cm=P(Ta=>{"use strict";b();var GJ=Ta&&Ta.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ta,"__esModule",{value:!0});Ta.LiquidHTMLASTParsingError=Ta.LiquidHTMLCSTParsingError=void 0;var FL=GJ(Mb()),J1=class extends SyntaxError{constructor(e){super(e.shortMessage),this.name="LiquidHTMLParsingError";let r=e.input,n=e._rightmostFailurePosition,i=(0,FL.default)(r).fromIndex(Math.min(n,r.length-1));i&&(this.loc={start:{line:i.line,column:i.col},end:{line:i.line,column:i.col}})}};Ta.LiquidHTMLCSTParsingError=J1;var K1=class extends SyntaxError{constructor(e,r,n,i,s){super(e),this.name="LiquidHTMLParsingError",this.unclosed=s??null;let a=(0,FL.default)(r),u=a.fromIndex(n),c=a.fromIndex(Math.min(i,r.length-1));this.loc={start:{line:u.line,column:u.col},end:{line:c.line,column:c.col}}}};Ta.LiquidHTMLASTParsingError=K1});var fm=P(Kr=>{"use strict";b();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.nonTraversableProperties=Kr.LoopNamedTags=Kr.LiquidNodeTypes=Kr.HtmlNodeTypes=Kr.Comparators=Kr.NamedTags=Kr.NodeTypes=void 0;var $i;(function(t){t.Document="Document",t.LiquidRawTag="LiquidRawTag",t.LiquidTag="LiquidTag",t.LiquidBranch="LiquidBranch",t.LiquidVariableOutput="LiquidVariableOutput",t.HtmlSelfClosingElement="HtmlSelfClosingElement",t.HtmlVoidElement="HtmlVoidElement",t.HtmlDoctype="HtmlDoctype",t.HtmlComment="HtmlComment",t.HtmlElement="HtmlElement",t.HtmlDanglingMarkerClose="HtmlDanglingMarkerClose",t.HtmlRawNode="HtmlRawNode",t.AttrSingleQuoted="AttrSingleQuoted",t.AttrDoubleQuoted="AttrDoubleQuoted",t.AttrUnquoted="AttrUnquoted",t.AttrEmpty="AttrEmpty",t.TextNode="TextNode",t.YAMLFrontmatter="YAMLFrontmatter",t.LiquidVariable="LiquidVariable",t.LiquidFilter="LiquidFilter",t.NamedArgument="NamedArgument",t.LiquidLiteral="LiquidLiteral",t.BooleanExpression="BooleanExpression",t.String="String",t.Number="Number",t.Range="Range",t.VariableLookup="VariableLookup",t.Comparison="Comparison",t.LogicalExpression="LogicalExpression",t.AssignMarkup="AssignMarkup",t.ContentForMarkup="ContentForMarkup",t.CycleMarkup="CycleMarkup",t.ForMarkup="ForMarkup",t.PaginateMarkup="PaginateMarkup",t.RawMarkup="RawMarkup",t.RenderMarkup="RenderMarkup",t.RenderVariableExpression="RenderVariableExpression",t.RenderAliasExpression="RenderAliasExpression",t.LiquidDocDescriptionNode="LiquidDocDescriptionNode",t.LiquidDocParamNode="LiquidDocParamNode",t.LiquidDocExampleNode="LiquidDocExampleNode",t.LiquidDocPromptNode="LiquidDocPromptNode"})($i||(Kr.NodeTypes=$i={}));var lm;(function(t){t.assign="assign",t.capture="capture",t.case="case",t.content_for="content_for",t.cycle="cycle",t.decrement="decrement",t.echo="echo",t.elsif="elsif",t.for="for",t.form="form",t.if="if",t.include="include",t.increment="increment",t.layout="layout",t.liquid="liquid",t.paginate="paginate",t.render="render",t.section="section",t.sections="sections",t.tablerow="tablerow",t.unless="unless",t.when="when"})(lm||(Kr.NamedTags=lm={}));var jL;(function(t){t.CONTAINS="contains",t.EQUAL="==",t.GREATER_THAN=">",t.GREATER_THAN_OR_EQUAL=">=",t.LESS_THAN="<",t.LESS_THAN_OR_EQUAL="<=",t.NOT_EQUAL="!="})(jL||(Kr.Comparators=jL={}));Kr.HtmlNodeTypes=[$i.HtmlElement,$i.HtmlDanglingMarkerClose,$i.HtmlRawNode,$i.HtmlVoidElement,$i.HtmlSelfClosingElement];Kr.LiquidNodeTypes=[$i.LiquidTag,$i.LiquidVariableOutput,$i.LiquidBranch,$i.LiquidRawTag];Kr.LoopNamedTags=[lm.for,lm.tablerow];Kr.nonTraversableProperties=new Set(["parentNode","prev","next","firstChild","lastChild"])});var Q1=P(Vs=>{"use strict";b();Object.defineProperty(Vs,"__esModule",{value:!0});Vs.LiquidLiteralValues=Vs.ConcreteNodeTypes=void 0;Vs.toLiquidHtmlCST=zJ;Vs.toLiquidCST=JJ;var $L=tL(),Ea=um(),VL=cm(),pm=fm(),ke;(function(t){t.HtmlDoctype="HtmlDoctype",t.HtmlComment="HtmlComment",t.HtmlRawTag="HtmlRawTag",t.HtmlVoidElement="HtmlVoidElement",t.HtmlSelfClosingElement="HtmlSelfClosingElement",t.HtmlTagOpen="HtmlTagOpen",t.HtmlTagClose="HtmlTagClose",t.AttrSingleQuoted="AttrSingleQuoted",t.AttrDoubleQuoted="AttrDoubleQuoted",t.AttrUnquoted="AttrUnquoted",t.AttrEmpty="AttrEmpty",t.LiquidVariableOutput="LiquidVariableOutput",t.LiquidRawTag="LiquidRawTag",t.LiquidTag="LiquidTag",t.LiquidTagOpen="LiquidTagOpen",t.LiquidTagClose="LiquidTagClose",t.TextNode="TextNode",t.YAMLFrontmatter="YAMLFrontmatter",t.LiquidVariable="LiquidVariable",t.LiquidFilter="LiquidFilter",t.NamedArgument="NamedArgument",t.LiquidLiteral="LiquidLiteral",t.VariableLookup="VariableLookup",t.BooleanExpression="BooleanExpression",t.String="String",t.Number="Number",t.Range="Range",t.Comparison="Comparison",t.Condition="Condition",t.AssignMarkup="AssignMarkup",t.ContentForMarkup="ContentForMarkup",t.CycleMarkup="CycleMarkup",t.ForMarkup="ForMarkup",t.RenderMarkup="RenderMarkup",t.PaginateMarkup="PaginateMarkup",t.RenderVariableExpression="RenderVariableExpression",t.RenderAliasExpression="RenderAliasExpression",t.ContentForNamedArgument="ContentForNamedArgument",t.LiquidDocParamNode="LiquidDocParamNode",t.LiquidDocParamNameNode="LiquidDocParamNameNode",t.LiquidDocDescriptionNode="LiquidDocDescriptionNode",t.LiquidDocExampleNode="LiquidDocExampleNode",t.LiquidDocPromptNode="LiquidDocPromptNode"})(ke||(Vs.ConcreteNodeTypes=ke={}));Vs.LiquidLiteralValues={nil:null,null:null,true:!0,false:!1,blank:"",empty:""};var HJ=t=>e=>e[t].sourceString.trim(),BL=t=>e=>e[t].sourceString.trimEnd(),UL={strict:Ea.strictGrammars,tolerant:Ea.tolerantGrammars,completion:Ea.placeholderGrammars};function zJ(t,e={mode:"tolerant"}){let r=UL[e.mode],n=r.LiquidHTML;return $s(t,r,n,["HelperMappings","LiquidMappings","LiquidHTMLMappings"])}function JJ(t,e={mode:"tolerant"}){let r=UL[e.mode],n=r.Liquid;return $s(t,r,n,["HelperMappings","LiquidMappings"])}function $s(t,e,r,n,i=t,s=0){let a=v=>s+v[0].source.startIdx,u=v=>s+v[v.length-1].source.endIdx,c=v=>s+v[v.length-2].source.endIdx,p={type:ke.TextNode,value:function(){return this.sourceString},locStart:a,locEnd:u,source:t},d=r.match(i,"Node");if(d.failed())throw new VL.LiquidHTMLCSTParsingError(d);let m={Node:0,TextNode:p,orderedListOf:0,empty:()=>null,nonemptyOrderedListOf:0,nonemptyOrderedListOfBoth(v,I,T){let S=this;return v.toAST(S.args.mapping).concat(T.toAST(S.args.mapping))}},h={liquidNode:0,liquidRawTag:0,liquidRawTagImpl:{type:ke.LiquidRawTag,name:3,body:9,children:v=>{let I=v[3],T=v[9];switch(I.sourceString){case"schema":case"raw":return $s(t,e,Ea.TextNodeGrammar,["HelperMappings"],T.sourceString,s+T.source.startIdx);default:return $s(t,e,e.Liquid,["HelperMappings","LiquidMappings"],T.sourceString,s+T.source.startIdx)}},markup:6,whitespaceStart:1,whitespaceEnd:7,delimiterWhitespaceStart:11,delimiterWhitespaceEnd:17,locStart:a,locEnd:u,source:t,blockStartLocStart:v=>v[0].source.startIdx,blockStartLocEnd:v=>v[8].source.endIdx,blockEndLocStart:v=>v[10].source.startIdx,blockEndLocEnd:v=>v[18].source.endIdx},liquidBlockComment:{type:ke.LiquidRawTag,name:"comment",body:v=>v[1].sourceString,children:v=>$s(t,e,Ea.TextNodeGrammar,["HelperMappings"],v[1].sourceString,s+v[1].source.startIdx),whitespaceStart:v=>v[0].children[1].sourceString,whitespaceEnd:v=>v[0].children[7].sourceString,delimiterWhitespaceStart:v=>v[2].children[1].sourceString,delimiterWhitespaceEnd:v=>v[2].children[7].sourceString,locStart:a,locEnd:u,source:t,blockStartLocStart:v=>v[0].source.startIdx,blockStartLocEnd:v=>v[0].source.endIdx,blockEndLocStart:v=>v[2].source.startIdx,blockEndLocEnd:v=>v[2].source.endIdx},liquidDoc:{type:ke.LiquidRawTag,name:"doc",body:v=>v[1].sourceString,children:v=>{let I=v[1];return KJ(t,I.sourceString,s+I.source.startIdx)},whitespaceStart:v=>v[0].children[1].sourceString,whitespaceEnd:v=>v[0].children[7].sourceString,delimiterWhitespaceStart:v=>{var I;return((I=v[2].children[1])===null||I===void 0?void 0:I.sourceString)||""},delimiterWhitespaceEnd:v=>{var I;return((I=v[2].children[7])===null||I===void 0?void 0:I.sourceString)||""},locStart:a,locEnd:u,source:t,blockStartLocStart:v=>v[0].source.startIdx,blockStartLocEnd:v=>v[0].source.endIdx,blockEndLocStart:v=>v[2].source.startIdx,blockEndLocEnd:v=>v[2].source.endIdx},liquidInlineComment:{type:ke.LiquidTag,name:3,markup:BL(5),whitespaceStart:1,whitespaceEnd:6,locStart:a,locEnd:u,source:t},liquidTagOpen:0,liquidTagOpenStrict:0,liquidTagOpenBaseCase:0,liquidTagOpenRule:{type:ke.LiquidTagOpen,name:3,markup(v){let I=v[6],T=v[3];return pm.NamedTags.hasOwnProperty(T.sourceString)?I.toAST(this.args.mapping):I.sourceString.trim()},whitespaceStart:1,whitespaceEnd:7,locStart:a,locEnd:u,source:t},liquidTagOpenCapture:0,liquidTagOpenForm:0,liquidTagOpenFormMarkup:0,liquidTagOpenFor:0,liquidTagOpenForMarkup:{type:ke.ForMarkup,variableName:0,collection:4,reversed:6,args:8,locStart:a,locEnd:u,source:t},liquidTagBreak:0,liquidTagContinue:0,liquidTagOpenTablerow:0,liquidTagOpenPaginate:0,liquidTagOpenPaginateMarkup:{type:ke.PaginateMarkup,collection:0,pageSize:4,args:6,locStart:a,locEnd:u,source:t},liquidTagOpenCase:0,liquidTagOpenCaseMarkup:0,liquidTagWhen:0,liquidTagWhenMarkup:0,liquidTagOpenIf:0,liquidTagOpenUnless:0,liquidTagElsif:0,liquidTagElse:0,liquidTagOpenConditionalMarkup:0,condition:{type:ke.Condition,relation:0,expression:2,locStart:a,locEnd:u,source:t},comparison:{type:ke.Comparison,comparator:2,left:0,right:4,locStart:a,locEnd:u,source:t},liquidTagClose:{type:ke.LiquidTagClose,name:4,whitespaceStart:1,whitespaceEnd:7,locStart:a,locEnd:u,source:t},liquidTag:0,liquidTagStrict:0,liquidTagBaseCase:0,liquidTagAssign:0,liquidTagEcho:0,liquidTagContentFor:0,liquidTagCycle:0,liquidTagIncrement:0,liquidTagDecrement:0,liquidTagRender:0,liquidTagInclude:0,liquidTagSection:0,liquidTagSections:0,liquidTagLayout:0,liquidTagRule:{type:ke.LiquidTag,name:3,markup(v){let I=v[6],T=v[3];return pm.NamedTags.hasOwnProperty(T.sourceString)?I.toAST(this.args.mapping):I.sourceString.trim()},whitespaceStart:1,whitespaceEnd:7,source:t,locStart:a,locEnd:u},liquidTagLiquid:0,liquidTagLiquidMarkup(v){return $s(t,e,e.LiquidStatement,["HelperMappings","LiquidMappings","LiquidStatement"],v.sourceString,s+v.source.startIdx)},liquidTagEchoMarkup:0,liquidTagSectionMarkup:0,liquidTagSectionsMarkup:0,liquidTagLayoutMarkup:0,liquidTagAssignMarkup:{type:ke.AssignMarkup,name:0,value:4,locStart:a,locEnd:u,source:t},liquidTagCycleMarkup:{type:ke.CycleMarkup,groupName:0,args:3,locStart:a,locEnd:u,source:t},liquidTagContentForMarkup:{type:ke.ContentForMarkup,contentForType:0,args:2,locStart:a,locEnd:u,source:t},contentForType:0,liquidTagRenderMarkup:{type:ke.RenderMarkup,snippet:0,variable:1,alias:2,renderArguments:3,locStart:a,locEnd:u,source:t},renderArguments:1,completionModeRenderArguments:function(v,I,T,S,L,R,M,F){let X=this;return I.toAST(X.args.mapping).concat(M.sourceString===""?[]:M.toAST(X.args.mapping))},snippetExpression:0,renderVariableExpression:{type:ke.RenderVariableExpression,kind:1,name:3,locStart:a,locEnd:u,source:t},renderAliasExpression:{type:ke.RenderAliasExpression,value:3,locStart:a,locEnd:u,source:t},liquidDrop:{type:ke.LiquidVariableOutput,markup:3,whitespaceStart:1,whitespaceEnd:4,locStart:a,locEnd:u,source:t},liquidDropCases:0,liquidExpression:0,liquidComplexExpression:0,liquidDropBaseCase:v=>v.sourceString.trimEnd(),liquidVariable:{type:ke.LiquidVariable,expression:0,filters:1,rawSource:v=>t.slice(a(v),v[v.length-2].source.endIdx).trimEnd(),locStart:a,locEnd:c,source:t},liquidFilter:{type:ke.LiquidFilter,name:3,locStart:a,locEnd:u,source:t,args(v){return v[7].sourceString===""?[]:v[7].toAST(this.args.mapping)}},filterArguments:0,arguments:0,complexArguments:function(v,I,T,S,L){let R=this;return v.toAST(R.args.mapping).concat(L.sourceString===""?[]:L.toAST(R.args.mapping))},simpleArgument:0,tagArguments:0,contentForTagArgument:0,completionModeContentForTagArgument:function(v,I,T){let S=this;return v.toAST(S.args.mapping).concat(T.sourceString===""?[]:T.toAST(S.args.mapping))},positionalArgument:0,namedArgument:{type:ke.NamedArgument,name:0,value:4,locStart:a,locEnd:u,source:t},contentForNamedArgument:{type:ke.NamedArgument,name:v=>v[0].sourceString+v[1].sourceString,value:6,locStart:a,locEnd:u,source:t},liquidBooleanExpression(v,I){let T=v.toAST(this.args.mapping),S=I.toAST(this.args.mapping);if(S.length===0&&T.expression.type!==ke.Comparison)return T.expression;let L=[T,...S];return{type:ke.BooleanExpression,conditions:L,locStart:L.at(0).locStart,locEnd:L.at(-1).locEnd,source:t}},booleanExpressionCondition:{type:ke.Condition,relation:null,expression:0,locStart:a,locEnd:u,source:t},booleanExpressionSubsequentCondition:{type:ke.Condition,relation:1,expression:3,locStart:a,locEnd:u,source:t},liquidString:0,liquidDoubleQuotedString:{type:ke.String,single:()=>!1,value:1,locStart:a,locEnd:u,source:t},liquidSingleQuotedString:{type:ke.String,single:()=>!0,value:1,locStart:a,locEnd:u,source:t},liquidNumber:{type:ke.Number,value:0,locStart:a,locEnd:u,source:t},liquidLiteral:{type:ke.LiquidLiteral,value:v=>{let I=v[0].sourceString;return Vs.LiquidLiteralValues[I]},keyword:0,locStart:a,locEnd:u,source:t},liquidRange:{type:ke.Range,start:2,end:6,locStart:a,locEnd:u,source:t},liquidVariableLookup:{type:ke.VariableLookup,name:0,lookups:1,locStart:a,locEnd:u,source:t},variableSegmentAsLookupMarkup:0,variableSegmentAsLookup:{type:ke.VariableLookup,name:0,lookups:()=>[],locStart:a,locEnd:u,source:t},lookup:0,indexLookup:3,dotLookup:{type:ke.String,value:3,locStart:v=>s+v[2].source.startIdx,locEnd:v=>s+v[v.length-1].source.endIdx,source:t},tagMarkup:v=>v.sourceString.trim()},y={LiquidStatement:0,liquidTagOpenRule:{type:ke.LiquidTagOpen,name:0,markup(v){let I=v[2],T=v[0];return pm.NamedTags.hasOwnProperty(T.sourceString)?I.toAST(this.args.mapping):I.sourceString.trim()},whitespaceStart:null,whitespaceEnd:null,locStart:a,locEnd:c,source:t},liquidTagClose:{type:ke.LiquidTagClose,name:1,whitespaceStart:null,whitespaceEnd:null,locStart:a,locEnd:c,source:t},liquidTagRule:{type:ke.LiquidTag,name:0,markup(v){let I=v[2],T=v[0];return pm.NamedTags.hasOwnProperty(T.sourceString)?I.toAST(this.args.mapping):I.sourceString.trim()},whitespaceStart:null,whitespaceEnd:null,locStart:a,locEnd:c,source:t},liquidRawTagImpl:{type:ke.LiquidRawTag,name:0,body:4,children(v){return $s(t,e,Ea.TextNodeGrammar,["HelperMappings"],v[4].sourceString,s+v[4].source.startIdx)},whitespaceStart:null,whitespaceEnd:null,delimiterWhitespaceStart:null,delimiterWhitespaceEnd:null,locStart:a,locEnd:c,source:t,blockStartLocStart:v=>s+v[0].source.startIdx,blockStartLocEnd:v=>s+v[2].source.endIdx,blockEndLocStart:v=>s+v[5].source.startIdx,blockEndLocEnd:v=>s+v[5].source.endIdx},liquidBlockComment:{type:ke.LiquidRawTag,name:"comment",body:v=>v[1].sourceString.slice(1)+v[2].sourceString,children(v){let I=v[1].sourceString.slice(1)+v[2].sourceString;return $s(t,e,Ea.TextNodeGrammar,["HelperMappings"],I,s+v[1].source.startIdx+1)},whitespaceStart:"",whitespaceEnd:"",delimiterWhitespaceStart:"",delimiterWhitespaceEnd:"",locStart:a,locEnd:u,source:t,blockStartLocStart:v=>s+v[0].source.startIdx,blockStartLocEnd:v=>s+v[0].source.endIdx,blockEndLocStart:v=>s+v[4].source.startIdx,blockEndLocEnd:v=>s+v[4].source.endIdx},liquidInlineComment:{type:ke.LiquidTag,name:0,markup:BL(2),whitespaceStart:null,whitespaceEnd:null,locStart:a,locEnd:c,source:t}},w={Node(v,I){let T=this;return(v.sourceString.length===0?[]:[v.toAST(T.args.mapping)]).concat(I.toAST(T.args.mapping))},yamlFrontmatter:{type:ke.YAMLFrontmatter,body:2,locStart:a,locEnd:u,source:t},HtmlDoctype:{type:ke.HtmlDoctype,legacyDoctypeString:4,locStart:a,locEnd:u,source:t},HtmlComment:{type:ke.HtmlComment,body:HJ(1),locStart:a,locEnd:u,source:t},HtmlRawTagImpl:{type:ke.HtmlRawTag,name:v=>v[0].children[1].sourceString,attrList(v){let I=this.args.mapping;return v[0].children[2].toAST(I)},body:v=>t.slice(v[0].source.endIdx,v[2].source.startIdx),children:v=>{let I=t.slice(v[0].source.endIdx,v[2].source.startIdx);return $s(t,e,e.Liquid,["HelperMappings","LiquidMappings"],I,v[0].source.endIdx)},locStart:a,locEnd:u,source:t,blockStartLocStart:v=>v[0].source.startIdx,blockStartLocEnd:v=>v[0].source.endIdx,blockEndLocStart:v=>v[2].source.startIdx,blockEndLocEnd:v=>v[2].source.endIdx},HtmlVoidElement:{type:ke.HtmlVoidElement,name:1,attrList:3,locStart:a,locEnd:u,source:t},HtmlSelfClosingElement:{type:ke.HtmlSelfClosingElement,name:1,attrList:2,locStart:a,locEnd:u,source:t},HtmlTagOpen:{type:ke.HtmlTagOpen,name:1,attrList:2,locStart:a,locEnd:u,source:t},HtmlTagClose:{type:ke.HtmlTagClose,name:1,locStart:a,locEnd:u,source:t},leadingTagNamePart:0,leadingTagNameTextNode:p,trailingTagNamePart:0,trailingTagNameTextNode:p,tagName(v,I){let T=this.args.mapping;return[v.toAST(T)].concat(I.toAST(T))},AttrUnquoted:{type:ke.AttrUnquoted,name:0,value:2,locStart:a,locEnd:u,source:t},AttrSingleQuoted:{type:ke.AttrSingleQuoted,name:0,value:3,locStart:a,locEnd:u,source:t},AttrDoubleQuoted:{type:ke.AttrDoubleQuoted,name:0,value:3,locStart:a,locEnd:u,source:t},attrEmpty:{type:ke.AttrEmpty,name:0,locStart:a,locEnd:u,source:t},attrName:0,attrNameTextNode:p,attrDoubleQuotedValue:0,attrSingleQuotedValue:0,attrUnquotedValue:0,attrDoubleQuotedTextNode:p,attrSingleQuotedTextNode:p,attrUnquotedTextNode:p},x={HelperMappings:m,LiquidMappings:h,LiquidHTMLMappings:w,LiquidStatement:y},k=n.reduce((v,I)=>({...v,...x[I]}),{});return(0,$L.toAST)(d,k)}function KJ(t,e,r){let n=c=>r+c[0].source.startIdx,i=c=>r+c[c.length-1].source.endIdx,s=Ea.LiquidDocGrammar.match(e,"Node");if(s.failed())throw new VL.LiquidHTMLCSTParsingError(s);let a=()=>({type:ke.TextNode,value:function(){return this.sourceString},locStart:n,locEnd:i,source:t}),u={Node(c,p){let d=this;return(c.sourceString.length===0?[]:[c.toAST(d.args.mapping)]).concat(p.toAST(d.args.mapping))},ImplicitDescription:{type:ke.LiquidDocDescriptionNode,name:"description",locStart:n,locEnd:i,source:t,content:0,isImplicit:!0,isInline:!0},TextNode:a(),paramNode:{type:ke.LiquidDocParamNode,name:"param",locStart:n,locEnd:i,source:t,paramType:2,paramName:4,paramDescription:8},descriptionNode:{type:ke.LiquidDocDescriptionNode,name:"description",locStart:n,locEnd:i,source:t,content:2,isImplicit:!1,isInline:function(){return!this.children[1].sourceString.includes(`
1144
+ `)}},descriptionContent:a(),paramType:2,paramTypeContent:a(),paramName:{type:ke.LiquidDocParamNameNode,content:0,locStart:n,locEnd:i,source:t,required:!0},optionalParamName:{type:ke.LiquidDocParamNameNode,content:2,locStart:n,locEnd:i,source:t,required:!1},paramDescription:a(),exampleNode:{type:ke.LiquidDocExampleNode,name:"example",locStart:n,locEnd:i,source:t,content:2,isInline:function(){return!this.children[1].sourceString.includes(`
1145
+ `)}},promptNode:{type:ke.LiquidDocPromptNode,name:"prompt",locStart:n,locEnd:i,source:t,content:1},multilineTextContent:a(),textValue:a(),fallbackNode:a()};return(0,$L.toAST)(s,u)}});var WL=P(jo=>{"use strict";b();Object.defineProperty(jo,"__esModule",{value:!0});jo.assertNever=QJ;jo.locStart=YJ;jo.locEnd=XJ;jo.deepGet=ZJ;jo.dropLast=eK;function QJ(t){throw new Error(`Unexpected object: ${t.type}`)}function YJ(t){return t.position.start}function XJ(t){return t.position.end}function ZJ(t,e){return t.reduce((r,n)=>{if(r&&r[n]!==void 0)return r[n]},e)}function eK(t,e){let r=[...e];for(let n=0;n<t;n++)r.pop();return r}});var eP=P(Ui=>{"use strict";b();Object.defineProperty(Ui,"__esModule",{value:!0});Ui.RawMarkupKinds=void 0;Ui.isBranchedTag=YL;Ui.toLiquidAST=iK;Ui.toLiquidHtmlAST=sK;Ui.getName=Nn;Ui.cstToAst=_i;Ui.walk=Z1;Ui.isLiquidHtmlNode=eS;var Ke=Q1(),le=fm(),Vi=WL(),hm=cm(),tK=um(),rK=Q1(),Qr;(function(t){t.css="css",t.html="html",t.javascript="javascript",t.json="json",t.markdown="markdown",t.typescript="typescript",t.text="text"})(Qr||(Ui.RawMarkupKinds=Qr={}));function YL(t){return t.type===le.NodeTypes.LiquidTag&&["if","for","unless","case"].includes(t.name)}function nK(t){return t.type===Ke.ConcreteNodeTypes.LiquidTag&&["else","elsif","when"].includes(t.name)}function iK(t,e={allowUnclosedDocumentNode:!0,mode:"tolerant"}){let r=(0,rK.toLiquidCST)(t,{mode:e.mode});return{type:le.NodeTypes.Document,source:t,_source:t,children:_i(r,e),name:"#document",position:{start:0,end:t.length}}}function sK(t,e={allowUnclosedDocumentNode:!1,mode:"tolerant"}){let r=(0,Ke.toLiquidHtmlCST)(t,{mode:e.mode});return{type:le.NodeTypes.Document,source:t,_source:t,children:_i(r,e),name:"#document",position:{start:0,end:t.length}}}var Y1=class{constructor(e){this.ast=[],this.cursor=[],this.source=e}get current(){return(0,Vi.deepGet)(this.cursor,this.ast)}get currentPosition(){return(this.current||[]).length-1}get parent(){if(this.cursor.length!=0)return(0,Vi.deepGet)((0,Vi.dropLast)(1,this.cursor),this.ast)}get grandparent(){if(!(this.cursor.length<4))return(0,Vi.deepGet)((0,Vi.dropLast)(3,this.cursor),this.ast)}open(e){this.current.push(e),this.cursor.push(this.currentPosition),this.cursor.push("children"),YL(e)&&this.open(pK(e))}push(e){if(e.type===le.NodeTypes.LiquidBranch){let r=this.findCloseableParentBranch(e);if(r){for(r.blockEndPosition={start:e.position.start,end:e.position.start};this.parent&&this.parent!==r&&this.parent.type===le.NodeTypes.HtmlElement;)this.parent.blockEndPosition={start:e.position.start,end:e.position.start},this.closeParentWith(e);this.closeParentWith(e)}this.open(e)}else this.current.push(e)}close(e,r){var n,i;if(aK(this.parent)&&(this.parent.blockEndPosition={start:e.locStart,end:e.locStart},this.closeParentWith(e)),!this.parent)throw new hm.LiquidHTMLASTParsingError(`Attempting to close ${r} '${Nn(e)}' before it was opened`,this.source,e.locStart,e.locEnd);if(Nn(this.parent)!==Nn(e)||this.parent.type!==r){let s=this.findCloseableParentNode(e);if(this.parent.type===le.NodeTypes.HtmlElement&&s)for(;this.parent!==s;)this.parent.blockEndPosition={start:e.locStart,end:e.locStart},this.closeParentWith(e);else throw new hm.LiquidHTMLASTParsingError(`Attempting to close ${r} '${Nn(e)}' before ${this.parent.type} '${Nn(this.parent)}' was closed`,this.source,this.parent.position.start,e.locEnd,ZL(this.parent))}this.parent.position.end=e.locEnd,this.parent.blockEndPosition=Be(e),this.parent.type==le.NodeTypes.LiquidTag&&e.type==Ke.ConcreteNodeTypes.LiquidTagClose&&(this.parent.delimiterWhitespaceStart=(n=e.whitespaceStart)!==null&&n!==void 0?n:"",this.parent.delimiterWhitespaceEnd=(i=e.whitespaceEnd)!==null&&i!==void 0?i:""),this.cursor.pop(),this.cursor.pop()}findCloseableParentBranch(e){for(let r=this.cursor.length-1;r>0;r-=2){let n=(0,Vi.deepGet)(this.cursor.slice(0,r),this.ast),i=this.cursor[r],s=n.type===le.NodeTypes.HtmlElement&&i==="children";if(n.type===le.NodeTypes.LiquidBranch)return n;if(!s)throw new hm.LiquidHTMLASTParsingError(`Attempting to open LiquidBranch '${e.name}' before ${n.type} '${Nn(n)}' was closed`,this.source,n.position.start,e.position.end)}return null}findCloseableParentNode(e){for(let r=this.cursor.length-1;r>0;r-=2){let n=(0,Vi.deepGet)(this.cursor.slice(0,r),this.ast);if(Nn(n)===Nn(e)&&n.type===le.NodeTypes.LiquidTag&&["if","unless","case"].includes(n.name))return n;if(n.type===le.NodeTypes.LiquidTag)return null}return null}closeParentWith(e){this.parent&&("locStart"in e?this.parent.position.end=e.locStart:this.parent.position.end=e.position.start),this.cursor.pop(),this.cursor.pop()}};function aK(t){return!!t&&t.type===le.NodeTypes.LiquidBranch}function Nn(t){if(!t)return null;switch(t.type){case le.NodeTypes.HtmlElement:case le.NodeTypes.HtmlDanglingMarkerClose:case le.NodeTypes.HtmlSelfClosingElement:case Ke.ConcreteNodeTypes.HtmlTagClose:return t.name.map(e=>e.type===le.NodeTypes.TextNode||e.type==Ke.ConcreteNodeTypes.TextNode?e.value:typeof e.markup=="string"?`{{${e.markup.trim()}}}`:`{{${e.markup.rawSource}}}`).join("");case le.NodeTypes.AttrEmpty:case le.NodeTypes.AttrUnquoted:case le.NodeTypes.AttrDoubleQuoted:case le.NodeTypes.AttrSingleQuoted:return t.name.map(e=>typeof e=="string"?e:e.source.slice(e.position.start,e.position.end)).join("");default:return t.name}}function _i(t,e){var r;if(t.length===0)return[];let n=oK(t,e);if(!e.allowUnclosedDocumentNode&&n.cursor.length!==0)throw new hm.LiquidHTMLASTParsingError(`Attempting to end parsing before ${(r=n.parent)===null||r===void 0?void 0:r.type} '${Nn(n.parent)}' was closed`,n.source,n.source.length-1,n.source.length,ZL(n.parent,n.grandparent));return n.ast}function oK(t,e){var r,n,i,s;let a=new Y1(t[0].source);for(let u=0;u<t.length;u++){let c=t[u];switch(c.type){case Ke.ConcreteNodeTypes.TextNode:{a.push(sc(c));break}case Ke.ConcreteNodeTypes.LiquidVariableOutput:{a.push(AK(c));break}case Ke.ConcreteNodeTypes.LiquidTagOpen:{a.open(zL(c,{...e,isBlockTag:!0}));break}case Ke.ConcreteNodeTypes.LiquidTagClose:{a.close(c,le.NodeTypes.LiquidTag);break}case Ke.ConcreteNodeTypes.LiquidTag:{a.push(zL(c,{...e,isBlockTag:!1}));break}case Ke.ConcreteNodeTypes.LiquidRawTag:{a.push({type:le.NodeTypes.LiquidRawTag,markup:X1(c.name,c.markup),name:c.name,body:JL(c,e),whitespaceStart:(r=c.whitespaceStart)!==null&&r!==void 0?r:"",whitespaceEnd:(n=c.whitespaceEnd)!==null&&n!==void 0?n:"",delimiterWhitespaceStart:(i=c.delimiterWhitespaceStart)!==null&&i!==void 0?i:"",delimiterWhitespaceEnd:(s=c.delimiterWhitespaceEnd)!==null&&s!==void 0?s:"",position:Be(c),blockStartPosition:{start:c.blockStartLocStart,end:c.blockStartLocEnd},blockEndPosition:{start:c.blockEndLocStart,end:c.blockEndLocEnd},source:c.source});break}case Ke.ConcreteNodeTypes.HtmlTagOpen:{a.open(EK(c,e));break}case Ke.ConcreteNodeTypes.HtmlTagClose:{PK(a,t,u,e.mode)?a.push(OK(c,e)):a.close(c,le.NodeTypes.HtmlElement);break}case Ke.ConcreteNodeTypes.HtmlVoidElement:{a.push(NK(c,e));break}case Ke.ConcreteNodeTypes.HtmlSelfClosingElement:{a.push(LK(c,e));break}case Ke.ConcreteNodeTypes.HtmlDoctype:{a.push({type:le.NodeTypes.HtmlDoctype,legacyDoctypeString:c.legacyDoctypeString,position:Be(c),source:c.source});break}case Ke.ConcreteNodeTypes.HtmlComment:{a.push({type:le.NodeTypes.HtmlComment,body:c.body,position:Be(c),source:c.source});break}case Ke.ConcreteNodeTypes.HtmlRawTag:{a.push({type:le.NodeTypes.HtmlRawNode,name:c.name,body:JL(c,e),attributes:mm(c.attrList||[],e),position:Be(c),source:c.source,blockStartPosition:{start:c.blockStartLocStart,end:c.blockStartLocEnd},blockEndPosition:{start:c.blockEndLocStart,end:c.blockEndLocEnd}});break}case Ke.ConcreteNodeTypes.AttrEmpty:{a.push({type:le.NodeTypes.AttrEmpty,name:_i(c.name,e),position:Be(c),source:c.source});break}case Ke.ConcreteNodeTypes.AttrSingleQuoted:case Ke.ConcreteNodeTypes.AttrDoubleQuoted:case Ke.ConcreteNodeTypes.AttrUnquoted:{let p={type:c.type,name:_i(c.name,e),position:Be(c),source:c.source,attributePosition:{start:-1,end:-1},value:[]},d=cK(c.value,e);p.value=d,p.attributePosition=uK(c,d),a.push(p);break}case Ke.ConcreteNodeTypes.YAMLFrontmatter:{a.push({type:le.NodeTypes.YAMLFrontmatter,body:c.body,position:Be(c),source:c.source});break}case Ke.ConcreteNodeTypes.LiquidDocParamNode:{a.push({type:le.NodeTypes.LiquidDocParamNode,name:c.name,position:Be(c),source:c.source,paramName:sc(c.paramName.content),paramDescription:QL(c.paramDescription),paramType:QL(c.paramType),required:c.paramName.required});break}case Ke.ConcreteNodeTypes.LiquidDocDescriptionNode:{a.push({type:le.NodeTypes.LiquidDocDescriptionNode,name:c.name,position:Be(c),source:c.source,content:sc(c.content),isImplicit:c.isImplicit,isInline:c.isInline});break}case Ke.ConcreteNodeTypes.LiquidDocExampleNode:{a.push({type:le.NodeTypes.LiquidDocExampleNode,name:c.name,position:Be(c),source:c.source,content:sc(c.content),isInline:c.isInline});break}case Ke.ConcreteNodeTypes.LiquidDocPromptNode:{a.push({type:le.NodeTypes.LiquidDocPromptNode,name:c.name,position:Be(c),source:c.source,content:sc(c.content)});break}default:(0,Vi.assertNever)(c)}}return a}function GL(t){let e=t.at(0);return t.at(-1).locEnd-e.locStart}function uK(t,e){return e.length===0?{start:t.locStart+GL(t.name)+1+1,end:t.locStart+GL(t.name)+1+1}:{start:e[0].position.start,end:e[e.length-1].position.end}}function cK(t,e){return _i(t,e)}function mm(t,e){return _i(t,e)}function Pr(t){var e,r;return{type:le.NodeTypes.LiquidTag,position:Be(t),whitespaceStart:(e=t.whitespaceStart)!==null&&e!==void 0?e:"",whitespaceEnd:(r=t.whitespaceEnd)!==null&&r!==void 0?r:"",blockStartPosition:Be(t),source:t.source}}function HL(t){var e,r;return{type:le.NodeTypes.LiquidBranch,children:[],position:Be(t),whitespaceStart:(e=t.whitespaceStart)!==null&&e!==void 0?e:"",whitespaceEnd:(r=t.whitespaceEnd)!==null&&r!==void 0?r:"",blockStartPosition:Be(t),blockEndPosition:{start:-1,end:-1},source:t.source}}function zL(t,e){return typeof t.markup!="string"?lK(t,e):nK(t)?fK(t):e.isBlockTag?{name:t.name,markup:X1(t.name,t.markup),children:e.isBlockTag?[]:void 0,...Pr(t)}:{name:t.name,markup:X1(t.name,t.markup),...Pr(t)}}function lK(t,e){switch(t.name){case le.NamedTags.echo:return{...Pr(t),name:le.NamedTags.echo,markup:tS(t.markup)};case le.NamedTags.assign:return{...Pr(t),name:le.NamedTags.assign,markup:hK(t.markup)};case le.NamedTags.cycle:return{...Pr(t),name:t.name,markup:dK(t.markup)};case le.NamedTags.increment:case le.NamedTags.decrement:return{...Pr(t),name:t.name,markup:Pt(t.markup)};case le.NamedTags.capture:return{...Pr(t),name:t.name,markup:Pt(t.markup),children:[]};case le.NamedTags.content_for:return{...Pr(t),name:t.name,markup:bK(t.markup)};case le.NamedTags.include:case le.NamedTags.render:return{...Pr(t),name:t.name,markup:SK(t.markup)};case le.NamedTags.layout:case le.NamedTags.section:return{...Pr(t),name:t.name,markup:Pt(t.markup)};case le.NamedTags.sections:return{...Pr(t),name:t.name,markup:Pt(t.markup)};case le.NamedTags.form:return{...Pr(t),name:t.name,markup:t.markup.map(gm),children:[]};case le.NamedTags.tablerow:case le.NamedTags.for:return{...Pr(t),name:t.name,markup:mK(t.markup),children:[]};case le.NamedTags.paginate:return{...Pr(t),name:t.name,markup:gK(t.markup),children:[]};case le.NamedTags.if:case le.NamedTags.unless:return{...Pr(t),name:t.name,markup:dm(t.markup),blockEndPosition:{start:-1,end:-1},children:[]};case le.NamedTags.elsif:return{...HL(t),name:t.name,markup:dm(t.markup)};case le.NamedTags.case:return{...Pr(t),name:t.name,markup:Pt(t.markup),children:[]};case le.NamedTags.when:return{...HL(t),name:t.name,markup:t.markup.map(Pt)};case le.NamedTags.liquid:return{...Pr(t),name:t.name,markup:_i(t.markup,e)};default:return(0,Vi.assertNever)(t)}}function fK(t){var e,r;return{name:t.name,type:le.NodeTypes.LiquidBranch,markup:t.name!=="else"?t.markup:"",position:{start:t.locStart,end:t.locEnd},children:[],blockStartPosition:{start:t.locStart,end:t.locEnd},blockEndPosition:{start:-1,end:-1},whitespaceStart:(e=t.whitespaceStart)!==null&&e!==void 0?e:"",whitespaceEnd:(r=t.whitespaceEnd)!==null&&r!==void 0?r:"",source:t.source}}function pK(t){return{type:le.NodeTypes.LiquidBranch,name:null,markup:"",position:{start:t.position.end,end:t.position.end},blockStartPosition:{start:t.position.end,end:t.position.end},blockEndPosition:{start:-1,end:-1},children:[],whitespaceStart:"",whitespaceEnd:"",source:t.source}}function hK(t){return{type:le.NodeTypes.AssignMarkup,name:t.name,value:tS(t.value),position:Be(t),source:t.source}}function dK(t){return{type:le.NodeTypes.CycleMarkup,groupName:t.groupName?Pt(t.groupName):null,args:t.args.map(Pt),position:Be(t),source:t.source}}function mK(t){return{type:le.NodeTypes.ForMarkup,variableName:t.variableName,collection:Pt(t.collection),args:t.args.map(rS),reversed:!!t.reversed,position:Be(t),source:t.source}}function gK(t){return{type:le.NodeTypes.PaginateMarkup,collection:Pt(t.collection),pageSize:Pt(t.pageSize),position:Be(t),args:t.args?t.args.map(rS):[],source:t.source}}function JL(t,e){return{type:le.NodeTypes.RawMarkup,kind:yK(t),nodes:_i(t.children,e),value:t.body,position:{start:t.blockStartLocEnd,end:t.blockEndLocStart},source:t.source}}function yK(t){switch(t.type){case Ke.ConcreteNodeTypes.HtmlRawTag:return _K(t);case Ke.ConcreteNodeTypes.LiquidRawTag:return vK(t);default:return(0,Vi.assertNever)(t)}}var XL=/(\{%|\{\{)-?/g;function _K(t){var e;switch(t.name){case"script":{let r=(e=t.attrList)===null||e===void 0?void 0:e.find(i=>"name"in i&&typeof i.name!="string"&&i.name.length===1&&i.name[0].type===Ke.ConcreteNodeTypes.TextNode&&i.name[0].value==="type");if(!r||!("value"in r)||r.value.length===0||r.value[0].type!==Ke.ConcreteNodeTypes.TextNode)return Qr.javascript;let n=r.value[0].value;return n==="text/markdown"?Qr.markdown:n==="application/x-typescript"?Qr.typescript:n==="text/html"?Qr.html:n&&(n.endsWith("json")||n.endsWith("importmap"))||n==="speculationrules"?Qr.json:Qr.javascript}case"style":return XL.test(t.body)?Qr.text:Qr.css;default:return Qr.text}}function vK(t){switch(t.name){case"javascript":return Qr.javascript;case"stylesheet":case"style":return XL.test(t.body)?Qr.text:Qr.css;case"schema":return Qr.json;default:return Qr.text}}function bK(t){return{type:le.NodeTypes.ContentForMarkup,contentForType:Pt(t.contentForType),args:t.args.map(gm),position:Be(t),source:t.source}}function SK(t){return{type:le.NodeTypes.RenderMarkup,snippet:Pt(t.snippet),alias:xK(t.alias),variable:wK(t.variable),args:t.renderArguments.map(gm),position:Be(t),source:t.source}}function wK(t){return t?{type:le.NodeTypes.RenderVariableExpression,kind:t.kind,name:Pt(t.name),position:Be(t),source:t.source}:null}function xK(t){return t?{type:le.NodeTypes.RenderAliasExpression,value:t.value,position:Be(t),source:t.source}:null}function dm(t){if(t.length===1)return KL(t[0]);let[e,r]=t,[,...n]=t;return{type:le.NodeTypes.LogicalExpression,relation:r.relation,left:KL(e),right:dm(n),position:{start:e.locStart,end:t[t.length-1].locEnd},source:e.source}}function KL(t){let e=t.expression;return e.type===Ke.ConcreteNodeTypes.Comparison?kK(e):Pt(e)}function kK(t){return{type:le.NodeTypes.Comparison,comparator:t.comparator,left:Pt(t.left),right:Pt(t.right),position:Be(t),source:t.source}}function AK(t){var e,r;return{type:le.NodeTypes.LiquidVariableOutput,markup:typeof t.markup=="string"?t.markup:tS(t.markup),whitespaceStart:(e=t.whitespaceStart)!==null&&e!==void 0?e:"",whitespaceEnd:(r=t.whitespaceEnd)!==null&&r!==void 0?r:"",position:Be(t),source:t.source}}function tS(t){return{type:le.NodeTypes.LiquidVariable,expression:IK(t.expression),filters:t.filters.map(TK),position:Be(t),rawSource:t.rawSource,source:t.source}}function IK(t){return t.type===Ke.ConcreteNodeTypes.BooleanExpression?{type:le.NodeTypes.BooleanExpression,position:Be(t),condition:dm(t.conditions),source:t.source}:Pt(t)}function Pt(t){switch(t.type){case Ke.ConcreteNodeTypes.String:return{type:le.NodeTypes.String,position:Be(t),single:t.single,value:t.value,source:t.source};case Ke.ConcreteNodeTypes.Number:return{type:le.NodeTypes.Number,position:Be(t),value:t.value,source:t.source};case Ke.ConcreteNodeTypes.LiquidLiteral:return{type:le.NodeTypes.LiquidLiteral,position:Be(t),value:t.value,keyword:t.keyword,source:t.source};case Ke.ConcreteNodeTypes.Range:return{type:le.NodeTypes.Range,start:Pt(t.start),end:Pt(t.end),position:Be(t),source:t.source};case Ke.ConcreteNodeTypes.VariableLookup:return{type:le.NodeTypes.VariableLookup,name:t.name,lookups:t.lookups.map(Pt),position:Be(t),source:t.source};default:return(0,Vi.assertNever)(t)}}function TK(t){return{type:le.NodeTypes.LiquidFilter,name:t.name,args:t.args.map(gm),position:Be(t),source:t.source}}function gm(t){return t.type===Ke.ConcreteNodeTypes.NamedArgument?rS(t):Pt(t)}function rS(t){return{type:le.NodeTypes.NamedArgument,name:t.name,value:Pt(t.value),position:Be(t),source:t.source}}function EK(t,e){return{type:le.NodeTypes.HtmlElement,name:_i(t.name,e),attributes:mm(t.attrList||[],e),position:Be(t),blockStartPosition:Be(t),blockEndPosition:{start:-1,end:-1},children:[],source:t.source}}function OK(t,e){return{type:le.NodeTypes.HtmlDanglingMarkerClose,name:_i(t.name,e),position:Be(t),blockStartPosition:Be(t),source:t.source}}function NK(t,e){return{type:le.NodeTypes.HtmlVoidElement,name:t.name,attributes:mm(t.attrList||[],e),position:Be(t),blockStartPosition:Be(t),source:t.source}}function LK(t,e){return{type:le.NodeTypes.HtmlSelfClosingElement,name:_i(t.name,e),attributes:mm(t.attrList||[],e),position:Be(t),blockStartPosition:Be(t),source:t.source}}function QL(t){return!t||t.value===""?null:sc(t)}function sc(t){return{type:le.NodeTypes.TextNode,value:t.value,position:Be(t),source:t.source}}function PK(t,e,r,n){if(n==="completion"){let i=e[r];return!(t.parent&&t.parent.type===le.NodeTypes.HtmlElement&&Nn(t.parent)===Nn(i))}return CK(t)}function CK(t){let{parent:e,grandparent:r}=t;return!e||!r?!1:e.type===le.NodeTypes.LiquidBranch&&r.type===le.NodeTypes.LiquidTag&&["if","unless","case"].includes(r.name)}function X1(t,e){return tK.TAGS_WITHOUT_MARKUP.includes(t)?"":e}function Be(t){return{start:t.locStart,end:t.locEnd}}function Z1(t,e,r){for(let n of Object.keys(t)){if(le.nonTraversableProperties.has(n))continue;let i=t[n];Array.isArray(i)?i.filter(eS).forEach(s=>Z1(s,e,t)):eS(i)&&Z1(i,e,t)}e(t,r)}function eS(t){return t!==null&&typeof t=="object"&&"type"in t&&le.NodeTypes.hasOwnProperty(t.type)}function ZL(t,e){var r;if(t)return Nn(t)===null&&e&&(t=e),{type:t.type,name:(r=Nn(t))!==null&&r!==void 0?r:"",blockStartPosition:"blockStartPosition"in t?t.blockStartPosition:t.position}}});var tP=P(ym=>{"use strict";b();Object.defineProperty(ym,"__esModule",{value:!0});ym.getConditionalComment=void 0;var qK=/(<!--\[if[^\]]*]>)((.|\n)*)(<!\[endif\]-->)$/,RK=t=>{let e=t.match(qK);if(e)return{startTag:e[1],body:e[2].trim(),endTag:e[4]}};ym.getConditionalComment=RK});var Ge=P(fr=>{"use strict";b();var MK=fr&&fr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),nS=fr&&fr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&MK(e,t,r)};Object.defineProperty(fr,"__esModule",{value:!0});fr.getConditionalComment=fr.BLOCKS=fr.VOID_ELEMENTS=fr.RAW_TAGS=fr.TAGS_WITHOUT_MARKUP=void 0;nS(eP(),fr);nS(fm(),fr);nS(cm(),fr);var _m=um();Object.defineProperty(fr,"TAGS_WITHOUT_MARKUP",{enumerable:!0,get:function(){return _m.TAGS_WITHOUT_MARKUP}});Object.defineProperty(fr,"RAW_TAGS",{enumerable:!0,get:function(){return _m.RAW_TAGS}});Object.defineProperty(fr,"VOID_ELEMENTS",{enumerable:!0,get:function(){return _m.VOID_ELEMENTS}});Object.defineProperty(fr,"BLOCKS",{enumerable:!0,get:function(){return _m.BLOCKS}});var DK=tP();Object.defineProperty(fr,"getConditionalComment",{enumerable:!0,get:function(){return DK.getConditionalComment}})});var sS=P((Mve,iS)=>{b();var bm=process||{},rP=bm.argv||[],vm=bm.env||{},FK=!(vm.NO_COLOR||rP.includes("--no-color"))&&(!!vm.FORCE_COLOR||rP.includes("--color")||bm.platform==="win32"||(bm.stdout||{}).isTTY&&vm.TERM!=="dumb"||!!vm.CI),jK=(t,e,r=t)=>n=>{let i=""+n,s=i.indexOf(e,t.length);return~s?t+BK(i,e,r,s)+e:t+i+e},BK=(t,e,r,n)=>{let i="",s=0;do i+=t.substring(s,n)+r,s=n+e.length,n=t.indexOf(e,s);while(~n);return i+t.substring(s)},nP=(t=FK)=>{let e=t?jK:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};iS.exports=nP();iS.exports.createColors=nP});var xm=P((Fve,sP)=>{"use strict";b();var Sm=/[\t\n\f\r "#'()/;[\\\]{}]/g,wm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,$K=/.[\r\n"'(/\\]/,iP=/[\da-f]/i;sP.exports=function(e,r={}){let n=e.css.valueOf(),i=r.ignoreErrors,s,a,u,c,p,d,m,h,y,w,x=n.length,k=0,v=[],I=[];function T(){return k}function S(F){throw e.error("Unclosed "+F,k)}function L(){return I.length===0&&k>=x}function R(F){if(I.length)return I.pop();if(k>=x)return;let X=F?F.ignoreUnclosed:!1;switch(s=n.charCodeAt(k),s){case 10:case 32:case 9:case 13:case 12:{c=k;do c+=1,s=n.charCodeAt(c);while(s===32||s===10||s===9||s===13||s===12);d=["space",n.slice(k,c)],k=c-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let H=String.fromCharCode(s);d=[H,H,k];break}case 40:{if(w=v.length?v.pop()[1]:"",y=n.charCodeAt(k+1),w==="url"&&y!==39&&y!==34&&y!==32&&y!==10&&y!==9&&y!==12&&y!==13){c=k;do{if(m=!1,c=n.indexOf(")",c+1),c===-1)if(i||X){c=k;break}else S("bracket");for(h=c;n.charCodeAt(h-1)===92;)h-=1,m=!m}while(m);d=["brackets",n.slice(k,c+1),k,c],k=c}else c=n.indexOf(")",k+1),a=n.slice(k,c+1),c===-1||$K.test(a)?d=["(","(",k]:(d=["brackets",a,k,c],k=c);break}case 39:case 34:{p=s===39?"'":'"',c=k;do{if(m=!1,c=n.indexOf(p,c+1),c===-1)if(i||X){c=k+1;break}else S("string");for(h=c;n.charCodeAt(h-1)===92;)h-=1,m=!m}while(m);d=["string",n.slice(k,c+1),k,c],k=c;break}case 64:{Sm.lastIndex=k+1,Sm.test(n),Sm.lastIndex===0?c=n.length-1:c=Sm.lastIndex-2,d=["at-word",n.slice(k,c+1),k,c],k=c;break}case 92:{for(c=k,u=!0;n.charCodeAt(c+1)===92;)c+=1,u=!u;if(s=n.charCodeAt(c+1),u&&s!==47&&s!==32&&s!==10&&s!==9&&s!==13&&s!==12&&(c+=1,iP.test(n.charAt(c)))){for(;iP.test(n.charAt(c+1));)c+=1;n.charCodeAt(c+1)===32&&(c+=1)}d=["word",n.slice(k,c+1),k,c],k=c;break}default:{s===47&&n.charCodeAt(k+1)===42?(c=n.indexOf("*/",k+2)+1,c===0&&(i||X?c=n.length:S("comment")),d=["comment",n.slice(k,c+1),k,c],k=c):(wm.lastIndex=k+1,wm.test(n),wm.lastIndex===0?c=n.length-1:c=wm.lastIndex-2,d=["word",n.slice(k,c+1),k,c],v.push(d),k=c);break}}return k++,d}function M(F){I.push(F)}return{back:M,endOfFile:L,nextToken:R,position:T}}});var aS=P((Bve,uP)=>{"use strict";b();var pn=sS(),VK=xm(),aP;function UK(t){aP=t}var WK={";":pn.yellow,":":pn.yellow,"(":pn.cyan,")":pn.cyan,"[":pn.yellow,"]":pn.yellow,"{":pn.yellow,"}":pn.yellow,"at-word":pn.cyan,brackets:pn.cyan,call:pn.cyan,class:pn.yellow,comment:pn.gray,hash:pn.magenta,string:pn.green};function GK([t,e],r){if(t==="word"){if(e[0]===".")return"class";if(e[0]==="#")return"hash"}if(!r.endOfFile()){let n=r.nextToken();if(r.back(n),n[0]==="brackets"||n[0]==="(")return"call"}return t}function oP(t){let e=VK(new aP(t),{ignoreErrors:!0}),r="";for(;!e.endOfFile();){let n=e.nextToken(),i=WK[GK(n,e)];i?r+=n[1].split(/\r?\n/).map(s=>i(s)).join(`
1146
+ `):r+=n[1]}return r}oP.registerInput=UK;uP.exports=oP});var km=P((Vve,fP)=>{"use strict";b();var cP=sS(),lP=aS(),lf=class t extends Error{constructor(e,r,n,i,s,a){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),i&&(this.source=i),a&&(this.plugin=a),typeof r<"u"&&typeof n<"u"&&(typeof r=="number"?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let r=this.source;e==null&&(e=cP.isColorSupported);let n=d=>d,i=d=>d,s=d=>d;if(e){let{bold:d,gray:m,red:h}=cP.createColors(!0);i=y=>d(h(y)),n=y=>m(y),lP&&(s=y=>lP(y))}let a=r.split(/\r?\n/),u=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),p=String(c).length;return a.slice(u,c).map((d,m)=>{let h=u+1+m,y=" "+(" "+h).slice(-p)+" | ";if(h===this.line){if(d.length>160){let x=20,k=Math.max(0,this.column-x),v=Math.max(this.column+x,this.endColumn+x),I=d.slice(k,v),T=n(y.replace(/\d/g," "))+d.slice(0,Math.min(this.column-1,x-1)).replace(/[^\t]/g," ");return i(">")+n(y)+s(I)+`
1147
+ `+T+i("^")}let w=n(y.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+n(y)+s(d)+`
1148
+ `+w+i("^")}return" "+n(y)+s(d)}).join(`
1149
+ `)}toString(){let e=this.showSourceCode();return e&&(e=`
1150
+
1151
+ `+e+`
1152
+ `),this.name+": "+this.message+e}};fP.exports=lf;lf.default=lf});var oS=P((Wve,hP)=>{"use strict";b();var HK=/(<)(\/?style\b)/gi,zK=/(<)(!--)/g;function Oa(t){return typeof t!="string"||!t.includes("<")?t:t.replace(HK,"\\3c $2").replace(zK,"\\3c $2")}var pP={after:`
1153
+ `,beforeClose:`
1154
+ `,beforeComment:`
1155
+ `,beforeDecl:`
1156
+ `,beforeOpen:" ",beforeRule:`
1157
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function JK(t){return t[0].toUpperCase()+t.slice(1)}var ff=class{constructor(e){this.builder=e}atrule(e,r){let n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else{let s=(e.raws.between||"")+(r?";":"");this.builder(Oa(n+i+s),e)}}beforeAfter(e,r){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):r==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let i=e.parent,s=0;for(;i&&i.type!=="root";)s+=1,i=i.parent;if(n.includes(`
1158
+ `)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<s;u++)n+=a}return n}block(e,r){let n=this.raw(e,"between","beforeOpen");this.builder(Oa(r+n)+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(Oa(i)),this.builder("}",e,"end")}body(e){let r=e.nodes.length-1;for(;r>0&&e.nodes[r].type==="comment";)r-=1;let n=this.raw(e,"semicolon"),i=e.type==="document";for(let s=0;s<e.nodes.length;s++){let a=e.nodes[s],u=this.raw(a,"before");u&&this.builder(i?u:Oa(u)),this.stringify(a,r!==s||n)}}comment(e){let r=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder(Oa("/*"+r+e.text+n+"*/"),e)}decl(e,r){let n=this.raw(e,"between","colon"),i=e.prop+n+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),r&&(i+=";"),this.builder(Oa(i),e)}document(e){this.body(e)}raw(e,r,n){let i;if(n||(n=r),r&&(i=e.raws[r],typeof i<"u"))return i;let s=e.parent;if(n==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return"";if(!s)return pP[n];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[n]<"u")return a.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let u="raw"+JK(n);this[u]?i=this[u](a,e):a.walk(c=>{if(i=c.raws[r],typeof i<"u")return!1})}return typeof i>"u"&&(i=pP[n]),a.rawCache[n]=i,i}rawBeforeClose(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return r=n.raws.after,r.includes(`
1159
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeComment(e,r){let n;return e.walkComments(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(`
1160
+ `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,r){let n;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(`
1161
+ `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let r;return e.walk(n=>{if(n.type!=="decl"&&(r=n.raws.between,typeof r<"u"))return!1}),r}rawBeforeRule(e){let r;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
1162
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawColon(e){let r;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return r=n.raws.between.replace(/[^\s:]/g,""),!1}),r}rawEmptyBody(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(r=n.raws.after,typeof r<"u"))return!1}),r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;return e.walk(n=>{let i=n.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof n.raws.before<"u"){let s=n.raws.before.split(`
1163
+ `);return r=s[s.length-1],r=r.replace(/\S/g,""),!1}}),r}rawSemicolon(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(r=n.raws.semicolon,typeof r<"u"))return!1}),r}rawValue(e,r){let n=e[r],i=e.raws[r];return i&&i.value===n?i.raw:n}root(e){if(this.body(e),e.raws.after){let r=e.raws.after,n=e.parent&&e.parent.type==="document";this.builder(n?r:Oa(r))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(Oa(e.raws.ownSemicolon),e,"end")}stringify(e,r){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,r)}};hP.exports=ff;ff.default=ff});var pf=P((Hve,dP)=>{"use strict";b();var KK=oS();function uS(t,e){new KK(e).stringify(t)}dP.exports=uS;uS.default=uS});var Am=P((Jve,cS)=>{"use strict";b();cS.exports.isClean=Symbol("isClean");cS.exports.my=Symbol("my")});var mf=P((Qve,mP)=>{"use strict";b();var QK=km(),YK=oS(),XK=pf(),{isClean:hf,my:ZK}=Am();function lS(t,e){let r=new t.constructor;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||n==="proxyCache")continue;let i=t[n],s=typeof i;n==="parent"&&s==="object"?e&&(r[n]=e):n==="source"?r[n]=i:Array.isArray(i)?r[n]=i.map(a=>lS(a,r)):(s==="object"&&i!==null&&(i=lS(i)),r[n]=i)}return r}function Us(t,e){if(e&&typeof e.offset<"u")return e.offset;let r=1,n=1,i=0;for(let s=0;s<t.length;s++){if(n===e.line&&r===e.column){i=s;break}t[s]===`
1164
+ `?(r=1,n+=1):r+=1}return i}var df=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[hf]=!1,this[ZK]=!0;for(let r in e)if(r==="nodes"){this.nodes=[];for(let n of e[r])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[r]=e[r]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let r=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let r in e)this[r]=e[r];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let r=lS(this);for(let n in e)r[n]=e[n];return r}cloneAfter(e={}){let r=this.clone(e);return this.parent.insertAfter(this,r),r}cloneBefore(e={}){let r=this.clone(e);return this.parent.insertBefore(this,r),r}error(e,r={}){if(this.source){let{end:n,start:i}=this.rangeBy(r);return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.line},r)}return new QK(e)}getProxyProcessor(){return{get(e,r){return r==="proxyOf"?e:r==="root"?()=>e.root().toProxy():e[r]},set(e,r,n){return e[r]===n||(e[r]=n,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&e.markDirty()),!0}}}markClean(){this[hf]=!0}markDirty(){if(this[hf]){this[hf]=!1;let e=this;for(;e=e.parent;)e[hf]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let r=this.source.start;if(e.index)r=this.positionInside(e.index);else if(e.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,s=n.slice(Us(n,this.source.start),Us(n,this.source.end)).indexOf(e.word);s!==-1&&(r=this.positionInside(s))}return r}positionInside(e){let r=this.source.start.column,n=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,s=Us(i,this.source.start),a=s+e;for(let u=s;u<a;u++)i[u]===`
1165
+ `?(r=1,n+=1):r+=1;return{column:r,line:n,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:Us(r,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Us(r,this.source.end)+1}:{column:n.column+1,line:n.line,offset:n.offset+1};if(e.word){let a=r.slice(Us(r,this.source.start),Us(r,this.source.end)).indexOf(e.word);a!==-1&&(n=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?n={column:e.start.column,line:e.start.line,offset:Us(r,e.start)}:e.index&&(n=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:Us(r,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<n.line||i.line===n.line&&i.column<=n.column)&&(i={column:n.column+1,line:n.line,offset:n.offset+1}),{end:i,start:n}}raw(e,r){return new YK().raw(this,e,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let r=this,n=!1;for(let i of e)i===this?n=!0:n?(this.parent.insertAfter(r,i),r=i):this.parent.insertBefore(r,i);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,r){let n={},i=r==null;r=r||new Map;let s=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))n[a]=u.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,r):c);else if(typeof u=="object"&&u.toJSON)n[a]=u.toJSON(null,r);else if(a==="source"){if(u==null)continue;let c=r.get(u.input);c==null&&(c=s,r.set(u.input,s),s++),n[a]={end:u.end,inputId:c,start:u.start}}else n[a]=u}return i&&(n.inputs=[...r.keys()].map(a=>a.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=XK){e.stringify&&(e=e.stringify);let r="";return e(this,n=>{r+=n}),r}warn(e,r,n={}){let i={node:this};for(let s in n)i[s]=n[s];return e.warn(r,i)}};mP.exports=df;df.default=df});var ac=P((Xve,gP)=>{"use strict";b();var eQ=mf(),gf=class extends eQ{constructor(e){super(e),this.type="comment"}};gP.exports=gf;gf.default=gf});var _f=P((e0e,yP)=>{"use strict";b();var tQ=mf(),yf=class extends tQ{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};yP.exports=yf;yf.default=yf});var Na=P((r0e,IP)=>{"use strict";b();var _P=ac(),vP=_f(),rQ=mf(),{isClean:bP,my:SP}=Am(),fS,wP,xP,pS;function kP(t){return t.map(e=>(e.nodes&&(e.nodes=kP(e.nodes)),delete e.source,e))}function AP(t){if(t[bP]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)AP(e)}var Wi=class t extends rQ{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let r of e){let n=this.normalize(r,this.last);for(let i of n)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let r of this.nodes)r.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let r=this.getIterator(),n,i;for(;this.indexes[r]<this.proxyOf.nodes.length&&(n=this.indexes[r],i=e(this.proxyOf.nodes[n],n),i!==!1);)this.indexes[r]+=1;return delete this.indexes[r],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,r){return r==="proxyOf"?e:e[r]?r==="each"||typeof r=="string"&&r.startsWith("walk")?(...n)=>e[r](...n.map(i=>typeof i=="function"?(s,a)=>i(s.toProxy(),a):i)):r==="every"||r==="some"?n=>e[r]((i,...s)=>n(i.toProxy(),...s)):r==="root"?()=>e.root().toProxy():r==="nodes"?e.nodes.map(n=>n.toProxy()):r==="first"||r==="last"?e[r].toProxy():e[r]:e[r]},set(e,r,n){return e[r]===n||(e[r]=n,(r==="name"||r==="params"||r==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,r){let n=this.index(e),i=this.normalize(r,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let a of i)this.proxyOf.nodes.splice(n+1,0,a);let s;for(let a in this.indexes)s=this.indexes[a],n<s&&(this.indexes[a]=s+i.length);return this.markDirty(),this}insertBefore(e,r){let n=this.index(e),i=n===0?"prepend":!1,s=this.normalize(r,this.proxyOf.nodes[n],i).reverse();n=this.index(e);for(let u of s)this.proxyOf.nodes.splice(n,0,u);let a;for(let u in this.indexes)a=this.indexes[u],n<=a&&(this.indexes[u]=a+s.length);return this.markDirty(),this}normalize(e,r){if(typeof e=="string")e=kP(wP(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new vP(e)]}else if(e.selector||e.selectors)e=[new pS(e)];else if(e.name)e=[new fS(e)];else if(e.text)e=[new _P(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[SP]||t.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[bP]&&AP(i),i.raws||(i.raws={}),typeof i.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(i.raws.before=r.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let r of e){let n=this.normalize(r,this.first,"prepend").reverse();for(let i of n)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let r;for(let n in this.indexes)r=this.indexes[n],r>=e&&(this.indexes[n]=r-1);return this.markDirty(),this}replaceValues(e,r,n){return n||(n=r,r={}),this.walkDecls(i=>{r.props&&!r.props.includes(i.prop)||r.fast&&!i.value.includes(r.fast)||(i.value=i.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((r,n)=>{let i;try{i=e(r,n)}catch(s){throw r.addToError(s)}return i!==!1&&r.walk&&(i=r.walk(e)),i})}walkAtRules(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="atrule"&&e.test(n.name))return r(n,i)}):this.walk((n,i)=>{if(n.type==="atrule"&&n.name===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="atrule")return r(n,i)}))}walkComments(e){return this.walk((r,n)=>{if(r.type==="comment")return e(r,n)})}walkDecls(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="decl"&&e.test(n.prop))return r(n,i)}):this.walk((n,i)=>{if(n.type==="decl"&&n.prop===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="decl")return r(n,i)}))}walkRules(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="rule"&&e.test(n.selector))return r(n,i)}):this.walk((n,i)=>{if(n.type==="rule"&&n.selector===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="rule")return r(n,i)}))}};Wi.registerParse=t=>{wP=t};Wi.registerRule=t=>{pS=t};Wi.registerAtRule=t=>{fS=t};Wi.registerRoot=t=>{xP=t};IP.exports=Wi;Wi.default=Wi;Wi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,fS.prototype):t.type==="rule"?Object.setPrototypeOf(t,pS.prototype):t.type==="decl"?Object.setPrototypeOf(t,vP.prototype):t.type==="comment"?Object.setPrototypeOf(t,_P.prototype):t.type==="root"&&Object.setPrototypeOf(t,xP.prototype),t[SP]=!0,t.nodes&&t.nodes.forEach(e=>{Wi.rebuild(e)})}});var Im=P((i0e,EP)=>{"use strict";b();var TP=Na(),oc=class extends TP{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};EP.exports=oc;oc.default=oc;TP.registerAtRule(oc)});var Tm=P((a0e,LP)=>{"use strict";b();var nQ=Na(),OP,NP,Bo=class extends nQ{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new OP(new NP,this,e).stringify()}};Bo.registerLazyResult=t=>{OP=t};Bo.registerProcessor=t=>{NP=t};LP.exports=Bo;Bo.default=Bo});var CP=P((u0e,PP)=>{b();var iQ="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",sQ=(t,e=21)=>(r=e)=>{let n="",i=r|0;for(;i--;)n+=t[Math.random()*t.length|0];return n},aQ=(t=21)=>{let e="",r=t|0;for(;r--;)e+=iQ[Math.random()*64|0];return e};PP.exports={nanoid:aQ,customAlphabet:sQ}});var RP=P(hS=>{b();var qP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");hS.encode=function(t){if(0<=t&&t<qP.length)return qP[t];throw new TypeError("Must be between 0 and 63: "+t)};hS.decode=function(t){var e=65,r=90,n=97,i=122,s=48,a=57,u=43,c=47,p=26,d=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+p:s<=t&&t<=a?t-s+d:t==u?62:t==c?63:-1}});var gS=P(mS=>{b();var MP=RP(),dS=5,DP=1<<dS,FP=DP-1,jP=DP;function oQ(t){return t<0?(-t<<1)+1:(t<<1)+0}function uQ(t){var e=(t&1)===1,r=t>>1;return e?-r:r}mS.encode=function(e){var r="",n,i=oQ(e);do n=i&FP,i>>>=dS,i>0&&(n|=jP),r+=MP.encode(n);while(i>0);return r};mS.decode=function(e,r,n){var i=e.length,s=0,a=0,u,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=MP.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));u=!!(c&jP),c&=FP,s=s+(c<<a),a+=dS}while(u);n.value=uQ(s),n.rest=r}});var cc=P(xr=>{b();function cQ(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}xr.getArg=cQ;var BP=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,lQ=/^data:.+\,.+$/;function vf(t){var e=t.match(BP);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}xr.urlParse=vf;function uc(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}xr.urlGenerate=uc;var fQ=32;function pQ(t){var e=[];return function(r){for(var n=0;n<e.length;n++)if(e[n].input===r){var i=e[0];return e[0]=e[n],e[n]=i,e[0].result}var s=t(r);return e.unshift({input:r,result:s}),e.length>fQ&&e.pop(),s}}var yS=pQ(function(e){var r=e,n=vf(e);if(n){if(!n.path)return e;r=n.path}for(var i=xr.isAbsolute(r),s=[],a=0,u=0;;)if(a=u,u=r.indexOf("/",a),u===-1){s.push(r.slice(a));break}else for(s.push(r.slice(a,u));u<r.length&&r[u]==="/";)u++;for(var c,p=0,u=s.length-1;u>=0;u--)c=s[u],c==="."?s.splice(u,1):c===".."?p++:p>0&&(c===""?(s.splice(u+1,p),p=0):(s.splice(u,2),p--));return r=s.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,uc(n)):r});xr.normalize=yS;function $P(t,e){t===""&&(t="."),e===""&&(e=".");var r=vf(e),n=vf(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),uc(r);if(r||e.match(lQ))return e;if(n&&!n.host&&!n.path)return n.host=e,uc(n);var i=e.charAt(0)==="/"?e:yS(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,uc(n)):i}xr.join=$P;xr.isAbsolute=function(t){return t.charAt(0)==="/"||BP.test(t)};function hQ(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}xr.relative=hQ;var VP=(function(){var t=Object.create(null);return!("__proto__"in t)})();function UP(t){return t}function dQ(t){return WP(t)?"$"+t:t}xr.toSetString=VP?UP:dQ;function mQ(t){return WP(t)?t.slice(1):t}xr.fromSetString=VP?UP:mQ;function WP(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function gQ(t,e,r){var n=Ws(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:Ws(t.name,e.name)}xr.compareByOriginalPositions=gQ;function yQ(t,e,r){var n;return n=t.originalLine-e.originalLine,n!==0||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:Ws(t.name,e.name)}xr.compareByOriginalPositionsNoSource=yQ;function _Q(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=Ws(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Ws(t.name,e.name)}xr.compareByGeneratedPositionsDeflated=_Q;function vQ(t,e,r){var n=t.generatedColumn-e.generatedColumn;return n!==0||r||(n=Ws(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Ws(t.name,e.name)}xr.compareByGeneratedPositionsDeflatedNoLine=vQ;function Ws(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function bQ(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=Ws(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Ws(t.name,e.name)}xr.compareByGeneratedPositionsInflated=bQ;function SQ(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}xr.parseSourceMapInput=SQ;function wQ(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=vf(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=$P(uc(n),e)}return yS(e)}xr.computeSourceURL=wQ});var bS=P(GP=>{b();var _S=cc(),vS=Object.prototype.hasOwnProperty,$o=typeof Map<"u";function Gs(){this._array=[],this._set=$o?new Map:Object.create(null)}Gs.fromArray=function(e,r){for(var n=new Gs,i=0,s=e.length;i<s;i++)n.add(e[i],r);return n};Gs.prototype.size=function(){return $o?this._set.size:Object.getOwnPropertyNames(this._set).length};Gs.prototype.add=function(e,r){var n=$o?e:_S.toSetString(e),i=$o?this.has(e):vS.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(e),i||($o?this._set.set(e,s):this._set[n]=s)};Gs.prototype.has=function(e){if($o)return this._set.has(e);var r=_S.toSetString(e);return vS.call(this._set,r)};Gs.prototype.indexOf=function(e){if($o){var r=this._set.get(e);if(r>=0)return r}else{var n=_S.toSetString(e);if(vS.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Gs.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Gs.prototype.toArray=function(){return this._array.slice()};GP.ArraySet=Gs});var JP=P(zP=>{b();var HP=cc();function xQ(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=i||HP.compareByGeneratedPositionsInflated(t,e)<=0}function Em(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Em.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Em.prototype.add=function(e){xQ(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Em.prototype.toArray=function(){return this._sorted||(this._array.sort(HP.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};zP.MappingList=Em});var SS=P(KP=>{b();var bf=gS(),zt=cc(),Om=bS().ArraySet,kQ=JP().MappingList;function vi(t){t||(t={}),this._file=zt.getArg(t,"file",null),this._sourceRoot=zt.getArg(t,"sourceRoot",null),this._skipValidation=zt.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=zt.getArg(t,"ignoreInvalidMapping",!1),this._sources=new Om,this._names=new Om,this._mappings=new kQ,this._sourcesContents=null}vi.prototype._version=3;vi.fromSourceMap=function(e,r){var n=e.sourceRoot,i=new vi(Object.assign(r||{},{file:e.file,sourceRoot:n}));return e.eachMapping(function(s){var a={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(a.source=s.source,n!=null&&(a.source=zt.relative(n,a.source)),a.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(a.name=s.name)),i.addMapping(a)}),e.sources.forEach(function(s){var a=s;n!==null&&(a=zt.relative(n,s)),i._sources.has(a)||i._sources.add(a);var u=e.sourceContentFor(s);u!=null&&i.setSourceContent(s,u)}),i};vi.prototype.addMapping=function(e){var r=zt.getArg(e,"generated"),n=zt.getArg(e,"original",null),i=zt.getArg(e,"source",null),s=zt.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(r,n,i,s)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s}))};vi.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=zt.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[zt.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[zt.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};vi.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var s=this._sourceRoot;s!=null&&(i=zt.relative(s,i));var a=new Om,u=new Om;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var p=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});p.source!=null&&(c.source=p.source,n!=null&&(c.source=zt.join(n,c.source)),s!=null&&(c.source=zt.relative(s,c.source)),c.originalLine=p.line,c.originalColumn=p.column,p.name!=null&&(c.name=p.name))}var d=c.source;d!=null&&!a.has(d)&&a.add(d);var m=c.name;m!=null&&!u.has(m)&&u.add(m)},this),this._sources=a,this._names=u,e.sources.forEach(function(c){var p=e.sourceContentFor(c);p!=null&&(n!=null&&(c=zt.join(n,c)),s!=null&&(c=zt.relative(s,c)),this.setSourceContent(c,p))},this)};vi.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var s="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;var s="Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};vi.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,s=0,a=0,u="",c,p,d,m,h=this._mappings.toArray(),y=0,w=h.length;y<w;y++){if(p=h[y],c="",p.generatedLine!==r)for(e=0;p.generatedLine!==r;)c+=";",r++;else if(y>0){if(!zt.compareByGeneratedPositionsInflated(p,h[y-1]))continue;c+=","}c+=bf.encode(p.generatedColumn-e),e=p.generatedColumn,p.source!=null&&(m=this._sources.indexOf(p.source),c+=bf.encode(m-a),a=m,c+=bf.encode(p.originalLine-1-i),i=p.originalLine-1,c+=bf.encode(p.originalColumn-n),n=p.originalColumn,p.name!=null&&(d=this._names.indexOf(p.name),c+=bf.encode(d-s),s=d)),u+=c}return u};vi.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=zt.relative(r,n));var i=zt.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};vi.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};vi.prototype.toString=function(){return JSON.stringify(this.toJSON())};KP.SourceMapGenerator=vi});var QP=P(Vo=>{b();Vo.GREATEST_LOWER_BOUND=1;Vo.LEAST_UPPER_BOUND=2;function wS(t,e,r,n,i,s){var a=Math.floor((e-t)/2)+t,u=i(r,n[a],!0);return u===0?a:u>0?e-a>1?wS(a,e,r,n,i,s):s==Vo.LEAST_UPPER_BOUND?e<n.length?e:-1:a:a-t>1?wS(t,a,r,n,i,s):s==Vo.LEAST_UPPER_BOUND?a:t<0?-1:t}Vo.search=function(e,r,n,i){if(r.length===0)return-1;var s=wS(-1,r.length,e,r,n,i||Vo.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var ZP=P(XP=>{b();function AQ(t){function e(i,s,a){var u=i[s];i[s]=i[a],i[a]=u}function r(i,s){return Math.round(i+Math.random()*(s-i))}function n(i,s,a,u){if(a<u){var c=r(a,u),p=a-1;e(i,c,u);for(var d=i[u],m=a;m<u;m++)s(i[m],d,!1)<=0&&(p+=1,e(i,p,m));e(i,p+1,m);var h=p+1;n(i,s,a,h-1),n(i,s,h+1,u)}}return n}function IQ(t){let e=AQ.toString();return new Function(`return ${e}`)()(t)}var YP=new WeakMap;XP.quickSort=function(t,e,r=0){let n=YP.get(e);n===void 0&&(n=IQ(e),YP.set(e,n)),n(t,e,r,t.length-1)}});var rC=P(Nm=>{b();var Ae=cc(),kS=QP(),lc=bS().ArraySet,TQ=gS(),Sf=ZP().quickSort;function kt(t,e){var r=t;return typeof t=="string"&&(r=Ae.parseSourceMapInput(t)),r.sections!=null?new Gi(r,e):new Cr(r,e)}kt.fromSourceMap=function(t,e){return Cr.fromSourceMap(t,e)};kt.prototype._version=3;kt.prototype.__generatedMappings=null;Object.defineProperty(kt.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});kt.prototype.__originalMappings=null;Object.defineProperty(kt.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});kt.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};kt.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};kt.GENERATED_ORDER=1;kt.ORIGINAL_ORDER=2;kt.GREATEST_LOWER_BOUND=1;kt.LEAST_UPPER_BOUND=2;kt.prototype.eachMapping=function(e,r,n){var i=r||null,s=n||kt.GENERATED_ORDER,a;switch(s){case kt.GENERATED_ORDER:a=this._generatedMappings;break;case kt.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var u=this.sourceRoot,c=e.bind(i),p=this._names,d=this._sources,m=this._sourceMapURL,h=0,y=a.length;h<y;h++){var w=a[h],x=w.source===null?null:d.at(w.source);x!==null&&(x=Ae.computeSourceURL(u,x,m)),c({source:x,generatedLine:w.generatedLine,generatedColumn:w.generatedColumn,originalLine:w.originalLine,originalColumn:w.originalColumn,name:w.name===null?null:p.at(w.name)})}};kt.prototype.allGeneratedPositionsFor=function(e){var r=Ae.getArg(e,"line"),n={source:Ae.getArg(e,"source"),originalLine:r,originalColumn:Ae.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Ae.compareByOriginalPositions,kS.LEAST_UPPER_BOUND);if(s>=0){var a=this._originalMappings[s];if(e.column===void 0)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:Ae.getArg(a,"generatedLine",null),column:Ae.getArg(a,"generatedColumn",null),lastColumn:Ae.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var c=a.originalColumn;a&&a.originalLine===r&&a.originalColumn==c;)i.push({line:Ae.getArg(a,"generatedLine",null),column:Ae.getArg(a,"generatedColumn",null),lastColumn:Ae.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return i};Nm.SourceMapConsumer=kt;function Cr(t,e){var r=t;typeof t=="string"&&(r=Ae.parseSourceMapInput(t));var n=Ae.getArg(r,"version"),i=Ae.getArg(r,"sources"),s=Ae.getArg(r,"names",[]),a=Ae.getArg(r,"sourceRoot",null),u=Ae.getArg(r,"sourcesContent",null),c=Ae.getArg(r,"mappings"),p=Ae.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);a&&(a=Ae.normalize(a)),i=i.map(String).map(Ae.normalize).map(function(d){return a&&Ae.isAbsolute(a)&&Ae.isAbsolute(d)?Ae.relative(a,d):d}),this._names=lc.fromArray(s.map(String),!0),this._sources=lc.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(d){return Ae.computeSourceURL(a,d,e)}),this.sourceRoot=a,this.sourcesContent=u,this._mappings=c,this._sourceMapURL=e,this.file=p}Cr.prototype=Object.create(kt.prototype);Cr.prototype.consumer=kt;Cr.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=Ae.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};Cr.fromSourceMap=function(e,r){var n=Object.create(Cr.prototype),i=n._names=lc.fromArray(e._names.toArray(),!0),s=n._sources=lc.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(y){return Ae.computeSourceURL(n.sourceRoot,y,r)});for(var a=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,d=a.length;p<d;p++){var m=a[p],h=new tC;h.generatedLine=m.generatedLine,h.generatedColumn=m.generatedColumn,m.source&&(h.source=s.indexOf(m.source),h.originalLine=m.originalLine,h.originalColumn=m.originalColumn,m.name&&(h.name=i.indexOf(m.name)),c.push(h)),u.push(h)}return Sf(n.__originalMappings,Ae.compareByOriginalPositions),n};Cr.prototype._version=3;Object.defineProperty(Cr.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function tC(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var xS=Ae.compareByGeneratedPositionsDeflatedNoLine;function eC(t,e){let r=t.length,n=t.length-e;if(!(n<=1))if(n==2){let i=t[e],s=t[e+1];xS(i,s)>0&&(t[e]=s,t[e+1]=i)}else if(n<20)for(let i=e;i<r;i++)for(let s=i;s>e;s--){let a=t[s-1],u=t[s];if(xS(a,u)<=0)break;t[s-1]=u,t[s]=a}else Sf(t,xS,e)}Cr.prototype._parseMappings=function(e,r){var n=1,i=0,s=0,a=0,u=0,c=0,p=e.length,d=0,m={},h={},y=[],w=[],x,k,v,I,T;let S=0;for(;d<p;)if(e.charAt(d)===";")n++,d++,i=0,eC(w,S),S=w.length;else if(e.charAt(d)===",")d++;else{for(x=new tC,x.generatedLine=n,I=d;I<p&&!this._charIsMappingSeparator(e,I);I++);for(k=e.slice(d,I),v=[];d<I;)TQ.decode(e,d,h),T=h.value,d=h.rest,v.push(T);if(v.length===2)throw new Error("Found a source, but no line and column");if(v.length===3)throw new Error("Found a source and line, but no column");if(x.generatedColumn=i+v[0],i=x.generatedColumn,v.length>1&&(x.source=u+v[1],u+=v[1],x.originalLine=s+v[2],s=x.originalLine,x.originalLine+=1,x.originalColumn=a+v[3],a=x.originalColumn,v.length>4&&(x.name=c+v[4],c+=v[4])),w.push(x),typeof x.originalLine=="number"){let R=x.source;for(;y.length<=R;)y.push(null);y[R]===null&&(y[R]=[]),y[R].push(x)}}eC(w,S),this.__generatedMappings=w;for(var L=0;L<y.length;L++)y[L]!=null&&Sf(y[L],Ae.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...y)};Cr.prototype._findMapping=function(e,r,n,i,s,a){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return kS.search(e,r,s,a)};Cr.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Cr.prototype.originalPositionFor=function(e){var r={generatedLine:Ae.getArg(e,"line"),generatedColumn:Ae.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",Ae.compareByGeneratedPositionsDeflated,Ae.getArg(e,"bias",kt.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=Ae.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=Ae.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var a=Ae.getArg(i,"name",null);return a!==null&&(a=this._names.at(a)),{source:s,line:Ae.getArg(i,"originalLine",null),column:Ae.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};Cr.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Cr.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=Ae.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=Ae.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!s.path||s.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Cr.prototype.generatedPositionFor=function(e){var r=Ae.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:Ae.getArg(e,"line"),originalColumn:Ae.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Ae.compareByOriginalPositions,Ae.getArg(e,"bias",kt.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:Ae.getArg(s,"generatedLine",null),column:Ae.getArg(s,"generatedColumn",null),lastColumn:Ae.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Nm.BasicSourceMapConsumer=Cr;function Gi(t,e){var r=t;typeof t=="string"&&(r=Ae.parseSourceMapInput(t));var n=Ae.getArg(r,"version"),i=Ae.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new lc,this._names=new lc;var s={line:-1,column:0};this._sections=i.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var u=Ae.getArg(a,"offset"),c=Ae.getArg(u,"line"),p=Ae.getArg(u,"column");if(c<s.line||c===s.line&&p<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=u,{generatedOffset:{generatedLine:c+1,generatedColumn:p+1},consumer:new kt(Ae.getArg(a,"map"),e)}})}Gi.prototype=Object.create(kt.prototype);Gi.prototype.constructor=kt;Gi.prototype._version=3;Object.defineProperty(Gi.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});Gi.prototype.originalPositionFor=function(e){var r={generatedLine:Ae.getArg(e,"line"),generatedColumn:Ae.getArg(e,"column")},n=kS.search(r,this._sections,function(s,a){var u=s.generatedLine-a.generatedOffset.generatedLine;return u||s.generatedColumn-a.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Gi.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Gi.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],s=i.consumer.sourceContentFor(e,!0);if(s||s==="")return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Gi.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(Ae.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};Gi.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,a=0;a<s.length;a++){var u=s[a],c=i.consumer._sources.at(u.source);c!==null&&(c=Ae.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var p=null;u.name&&(p=i.consumer._names.at(u.name),this._names.add(p),p=this._names.indexOf(p));var d={source:c,generatedLine:u.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(i.generatedOffset.generatedLine===u.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:p};this.__generatedMappings.push(d),typeof d.originalLine=="number"&&this.__originalMappings.push(d)}Sf(this.__generatedMappings,Ae.compareByGeneratedPositionsDeflated),Sf(this.__originalMappings,Ae.compareByOriginalPositions)};Nm.IndexedSourceMapConsumer=Gi});var iC=P(nC=>{b();var EQ=SS().SourceMapGenerator,Lm=cc(),OQ=/(\r?\n)/,NQ=10,fc="$$$isSourceNode$$$";function Yn(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[fc]=!0,n!=null&&this.add(n)}Yn.fromStringWithSourceMap=function(e,r,n){var i=new Yn,s=e.split(OQ),a=0,u=function(){var h=w(),y=w()||"";return h+y;function w(){return a<s.length?s[a++]:void 0}},c=1,p=0,d=null;return r.eachMapping(function(h){if(d!==null)if(c<h.generatedLine)m(d,u()),c++,p=0;else{var y=s[a]||"",w=y.substr(0,h.generatedColumn-p);s[a]=y.substr(h.generatedColumn-p),p=h.generatedColumn,m(d,w),d=h;return}for(;c<h.generatedLine;)i.add(u()),c++;if(p<h.generatedColumn){var y=s[a]||"";i.add(y.substr(0,h.generatedColumn)),s[a]=y.substr(h.generatedColumn),p=h.generatedColumn}d=h},this),a<s.length&&(d&&m(d,u()),i.add(s.splice(a).join(""))),r.sources.forEach(function(h){var y=r.sourceContentFor(h);y!=null&&(n!=null&&(h=Lm.join(n,h)),i.setSourceContent(h,y))}),i;function m(h,y){if(h===null||h.source===void 0)i.add(y);else{var w=n?Lm.join(n,h.source):h.source;i.add(new Yn(h.originalLine,h.originalColumn,w,y,h.name))}}};Yn.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[fc]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Yn.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[fc]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Yn.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[fc]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Yn.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};Yn.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[fc]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};Yn.prototype.setSourceContent=function(e,r){this.sourceContents[Lm.toSetString(e)]=r};Yn.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][fc]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(Lm.fromSetString(i[r]),this.sourceContents[i[r]])};Yn.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};Yn.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new EQ(e),i=!1,s=null,a=null,u=null,c=null;return this.walk(function(p,d){r.code+=p,d.source!==null&&d.line!==null&&d.column!==null?((s!==d.source||a!==d.line||u!==d.column||c!==d.name)&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name}),s=d.source,a=d.line,u=d.column,c=d.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var m=0,h=p.length;m<h;m++)p.charCodeAt(m)===NQ?(r.line++,r.column=0,m+1===h?(s=null,i=!1):i&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name})):r.column++}),this.walkSourceContents(function(p,d){n.setSourceContent(p,d)}),{code:r.code,map:n}};nC.SourceNode=Yn});var Cm=P(Pm=>{b();Pm.SourceMapGenerator=SS().SourceMapGenerator;Pm.SourceMapConsumer=rC().SourceMapConsumer;Pm.SourceNode=iC().SourceNode});var IS=P((P0e,oC)=>{"use strict";b();var{existsSync:LQ,readFileSync:PQ}=Te("fs"),{dirname:AS,join:CQ}=Te("path"),{SourceMapConsumer:sC,SourceMapGenerator:aC}=Cm();function qQ(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}var wf=class{constructor(e,r){if(r.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=r.map?r.map.prev:void 0,i=this.loadMap(r.from,n);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=AS(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new sC(this.text)),this.consumerCache}decodeInline(e){let r=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/,a=e.match(i)||e.match(s);if(a)return decodeURIComponent(e.substr(a[0].length));let u=e.match(r)||e.match(n);if(u)return qQ(e.substr(u[0].length));let c=e.slice(22);throw c=c.slice(0,c.indexOf(",")),new Error("Unsupported source map encoding "+c)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let r=e.match(/\/\*\s*# sourceMappingURL=/g);if(!r)return;let n=e.lastIndexOf(r.pop()),i=e.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,i)))}loadFile(e){if(this.root=AS(e),LQ(e))return this.mapFile=e,PQ(e,"utf-8").toString().trim()}loadMap(e,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let n=r(e);if(n){let i=this.loadFile(n);if(!i)throw new Error("Unable to load previous source map: "+n.toString());return i}}else{if(r instanceof sC)return aC.fromSourceMap(r).toString();if(r instanceof aC)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=CQ(AS(e),n)),this.loadFile(n)}}}startWith(e,r){return e?e.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};oC.exports=wf;wf.default=wf});var xf=P((q0e,pC)=>{"use strict";b();var{nanoid:RQ}=CP(),{isAbsolute:OS,resolve:NS}=Te("path"),{SourceMapConsumer:MQ,SourceMapGenerator:DQ}=Cm(),{fileURLToPath:uC,pathToFileURL:qm}=Te("url"),cC=km(),FQ=IS(),TS=aS(),ES=Symbol("lineToIndexCache"),jQ=!!(MQ&&DQ),lC=!!(NS&&OS);function fC(t){if(t[ES])return t[ES];let e=t.css.split(`
1166
+ `),r=new Array(e.length),n=0;for(let i=0,s=e.length;i<s;i++)r[i]=n,n+=e[i].length+1;return t[ES]=r,r}var pc=class{get from(){return this.file||this.id}constructor(e,r={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,r.document&&(this.document=r.document.toString()),r.from&&(!lC||/^\w+:\/\//.test(r.from)||OS(r.from)?this.file=r.from:this.file=NS(r.from)),lC&&jQ){let n=new FQ(this.css,r);if(n.text){this.map=n;let i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+RQ(6)+">"),this.map&&(this.map.file=this.from)}error(e,r,n,i={}){let s,a,u,c,p;if(r&&typeof r=="object"){let m=r,h=n;if(typeof m.offset=="number"){c=m.offset;let y=this.fromOffset(c);r=y.line,n=y.col}else r=m.line,n=m.column,c=this.fromLineAndColumn(r,n);if(typeof h.offset=="number"){u=h.offset;let y=this.fromOffset(u);a=y.line,s=y.col}else a=h.line,s=h.column,u=this.fromLineAndColumn(h.line,h.column)}else if(n)c=this.fromLineAndColumn(r,n);else{c=r;let m=this.fromOffset(c);r=m.line,n=m.col}let d=this.origin(r,n,a,s);return d?p=new cC(e,d.endLine===void 0?d.line:{column:d.column,line:d.line},d.endLine===void 0?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,i.plugin):p=new cC(e,a===void 0?r:{column:n,line:r},a===void 0?n:{column:s,line:a},this.css,this.file,i.plugin),p.input={column:n,endColumn:s,endLine:a,endOffset:u,line:r,offset:c,source:this.css},this.file&&(qm&&(p.input.url=qm(this.file).toString()),p.input.file=this.file),p}fromLineAndColumn(e,r){return fC(this)[e-1]+r-1}fromOffset(e){let r=fC(this),n=r[r.length-1],i=0;if(e>=n)i=r.length-1;else{let s=r.length-2,a;for(;i<s;)if(a=i+(s-i>>1),e<r[a])s=a-1;else if(e>=r[a+1])i=a+1;else{i=a;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:NS(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,r,n,i){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:r,line:e});if(!a.source)return!1;let u;typeof n=="number"&&(u=s.originalPositionFor({column:i,line:n}));let c;OS(a.source)?c=qm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||qm(this.map.mapFile));let p={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(uC)p.file=uC(c);else throw new Error("file: protocol is not available in this PostCSS build");let d=s.sourceContentFor(a.source);return d&&(p.source=d),p}toJSON(){let e={};for(let r of["hasBOM","css","file","id"])this[r]!=null&&(e[r]=this[r]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};pC.exports=pc;pc.default=pc;TS&&TS.registerInput&&TS.registerInput(pc)});var hc=P((M0e,gC)=>{"use strict";b();var hC=Na(),dC,mC,La=class extends hC{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,r,n){let i=super.normalize(e);if(r){if(n==="prepend")this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(let s of i)s.raws.before=r.raws.before}return i}removeChild(e,r){let n=this.index(e);return!r&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new dC(new mC,this,e).stringify()}};La.registerLazyResult=t=>{dC=t};La.registerProcessor=t=>{mC=t};gC.exports=La;La.default=La;hC.registerRoot(La)});var LS=P((F0e,yC)=>{"use strict";b();var kf={comma(t){return kf.split(t,[","],!0)},space(t){let e=[" ",`
1167
+ `," "];return kf.split(t,e)},split(t,e,r){let n=[],i="",s=!1,a=0,u=!1,c="",p=!1;for(let d of t)p?p=!1:d==="\\"?p=!0:u?d===c&&(u=!1):d==='"'||d==="'"?(u=!0,c=d):d==="("?a+=1:d===")"?a>0&&(a-=1):a===0&&e.includes(d)&&(s=!0),s?(i!==""&&n.push(i.trim()),i="",s=!1):i+=d;return(r||i!=="")&&n.push(i.trim()),n}};yC.exports=kf;kf.default=kf});var Rm=P((B0e,vC)=>{"use strict";b();var _C=Na(),BQ=LS(),dc=class extends _C{get selectors(){return BQ.comma(this.selector)}set selectors(e){let r=this.selector?this.selector.match(/,\s*/):null,n=r?r[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};vC.exports=dc;dc.default=dc;_C.registerRule(dc)});var SC=P((V0e,bC)=>{"use strict";b();var $Q=Im(),VQ=ac(),UQ=_f(),WQ=xf(),GQ=IS(),HQ=hc(),zQ=Rm();function Af(t,e){if(Array.isArray(t))return t.map(i=>Af(i));let{inputs:r,...n}=t;if(r){e=[];for(let i of r){let s={...i,__proto__:WQ.prototype};s.map&&(s.map={...s.map,__proto__:GQ.prototype}),e.push(s)}}if(n.nodes&&(n.nodes=t.nodes.map(i=>Af(i,e))),n.source){let{inputId:i,...s}=n.source;n.source=s,i!=null&&(n.source.input=e[i])}if(n.type==="root")return new HQ(n);if(n.type==="decl")return new UQ(n);if(n.type==="rule")return new zQ(n);if(n.type==="comment")return new VQ(n);if(n.type==="atrule")return new $Q(n);throw new Error("Unknown node type: "+t.type)}bC.exports=Af;Af.default=Af});var CS=P((W0e,TC)=>{"use strict";b();var{dirname:Mm,relative:xC,resolve:kC,sep:AC}=Te("path"),{SourceMapConsumer:IC,SourceMapGenerator:Dm}=Cm(),{pathToFileURL:wC}=Te("url"),JQ=xf(),KQ=!!(IC&&Dm),QQ=!!(Mm&&kC&&xC&&AC),PS=class{constructor(e,r,n,i){this.stringify=e,this.mapOpts=n.map||{},this.root=r,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let r=`
1168
+ `;this.css.includes(`\r
1169
+ `)&&(r=`\r
1170
+ `),this.css+=r+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let r=this.toUrl(this.path(e.file)),n=e.root||Mm(e.file),i;this.mapOpts.sourcesContent===!1?(i=new IC(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let r=this.root.nodes.length-1;r>=0;r--)e=this.root.nodes[r],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(r)}else if(this.css){let e;for(;(e=this.css.lastIndexOf("/*#"))!==-1;){let r=this.css.indexOf("*/",e+3);if(r===-1)break;for(;e>0&&this.css[e-1]===`
1171
+ `;)e--;this.css=this.css.slice(0,e)+this.css.slice(r+2)}}}}generate(){if(this.clearAnnotation(),QQ&&KQ&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,r=>{e+=r}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Dm.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Dm({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Dm({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,a;this.stringify(this.root,(u,c,p)=>{if(this.css+=u,c&&p!=="end"&&(i.generated.line=e,i.generated.column=r-1,c.source&&c.source.start?(i.source=this.sourcePath(c),i.original.line=c.source.start.line,i.original.column=c.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=u.match(/\n/g),a?(e+=a.length,s=u.lastIndexOf(`
1172
+ `),r=u.length-s):r+=u.length,c&&p!=="start"){let d=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==d.last||d.raws.semicolon)&&(c.source&&c.source.end?(i.source=this.sourcePath(c),i.original.line=c.source.end.line,i.original.column=c.source.end.column-1,i.generated.line=e,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(r=>r.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let r=this.memoizedPaths.get(e);if(r)return r;let n=this.opts.to?Mm(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Mm(kC(n,this.mapOpts.annotation)));let i=xC(n,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let r=e.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let e=new JQ(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(r=>{if(r.source){let n=r.source.input.from;if(n&&!e[n]){e[n]=!0;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let r=this.memoizedFileURLs.get(e);if(r)return r;if(wC){let n=wC(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let r=this.memoizedURLs.get(e);if(r)return r;AC==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};TC.exports=PS});var RS=P((H0e,NC)=>{"use strict";b();var YQ=Im(),XQ=ac(),ZQ=_f(),eY=hc(),EC=Rm(),tY=xm(),OC={empty:!0,space:!0};function rY(t){for(let e=t.length-1;e>=0;e--){let r=t[e],n=r[3]||r[2];if(n)return n}}var qS=class{constructor(e){this.input=e,this.root=new eY,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let r=new YQ;r.name=e[1].slice(1),r.name===""&&this.unnamedAtrule(r,e),this.init(r,e[2]);let n,i,s,a=!1,u=!1,c=[],p=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?p.push(n==="("?")":"]"):n==="{"&&p.length>0?p.push("}"):n===p[p.length-1]&&p.pop(),p.length===0)if(n===";"){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){u=!0;break}else if(n==="}"){if(c.length>0){for(s=c.length-1,i=c[s];i&&i[0]==="space";)i=c[--s];i&&(r.source.end=this.getPosition(i[3]||i[2]),r.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(r.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(r,"params",c),a&&(e=c[c.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),u&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let n=0,i;for(let s=r-1;s>=0&&(i=e[s],!(i[0]!=="space"&&(n+=1,n===2)));s--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let r=0,n,i,s;for(let[a,u]of e.entries()){if(i=u,s=i[0],s==="("&&(r+=1),s===")"&&(r-=1),r===0&&s===":")if(!n)this.doubleColon(i);else{if(n[0]==="word"&&n[1]==="progid")continue;return a}n=i}return!1}comment(e){let r=new XQ;this.init(r,e[2]),r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++;let n=e[1].slice(2,-2);if(!n.trim())r.text="",r.raws.left=n,r.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=i[2],r.raws.left=i[1],r.raws.right=i[3]}}createTokenizer(){this.tokenizer=tY(this.input)}decl(e,r){let n=new ZQ;this.init(n,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||rY(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let p=e[0][0];if(p===":"||p==="space"||p==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){n.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let p=e.length-1;p>=0;p--){if(s=e[p],s[1].toLowerCase()==="!important"){n.important=!0;let d=this.stringFrom(e,p);d=this.spacesFromEnd(e)+d,d!==" !important"&&(n.raws.important=d);break}else if(s[1].toLowerCase()==="important"){let d=e.slice(0),m="";for(let h=p;h>0;h--){let y=d[h][0];if(m.trim().startsWith("!")&&y!=="space")break;m=d.pop()[1]+m}m.trim().startsWith("!")&&(n.important=!0,n.raws.important=m,e=d)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(p=>p[0]!=="space"&&p[0]!=="comment")&&(n.raws.between+=a.map(p=>p[1]).join(""),a=[]),this.raw(n,"value",a.concat(e),r),n.value.includes(":")&&!r&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let r=new EC;this.init(r,e[2]),r.selector="",r.raws.between="",this.current=r}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let r=this.current.nodes[this.current.nodes.length-1];r&&r.type==="rule"&&!r.raws.ownSemicolon&&(r.raws.ownSemicolon=this.spaces,this.spaces="",r.source.end=this.getPosition(e[2]),r.source.end.offset+=r.raws.ownSemicolon.length)}}getPosition(e){let r=this.input.fromOffset(e);return{column:r.col,line:r.line,offset:e}}init(e,r){this.current.push(e),e.source={input:this.input,start:this.getPosition(r)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let r=!1,n=null,i=!1,s=null,a=[],u=e[1].startsWith("--"),c=[],p=e;for(;p;){if(n=p[0],c.push(p),n==="("||n==="[")s||(s=p),a.push(n==="("?")":"]");else if(u&&i&&n==="{")s||(s=p),a.push("}");else if(a.length===0)if(n===";")if(i){this.decl(c,u);return}else break;else if(n==="{"){this.rule(c);return}else if(n==="}"){this.tokenizer.back(c.pop()),r=!0;break}else n===":"&&(i=!0);else n===a[a.length-1]&&(a.pop(),a.length===0&&(s=null));p=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(r=!0),a.length>0&&this.unclosedBracket(s),r&&i){if(!u)for(;c.length&&(p=c[c.length-1][0],!(p!=="space"&&p!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,u)}else this.unknownWord(c)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,r,n,i){let s,a,u=n.length,c="",p=!0,d,m;for(let h=0;h<u;h+=1)s=n[h],a=s[0],a==="space"&&h===u-1&&!i?p=!1:a==="comment"?(m=n[h-1]?n[h-1][0]:"empty",d=n[h+1]?n[h+1][0]:"empty",!OC[m]&&!OC[d]?c.slice(-1)===","?p=!1:c+=s[1]:p=!1):c+=s[1];if(!p){let h=n.reduce((y,w)=>y+w[1],"");e.raws[r]={raw:h,value:c}}e[r]=c}rule(e){e.pop();let r=new EC;this.init(r,e[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(r,"selector",e),this.current=r}spacesAndCommentsFromEnd(e){let r,n="";for(;e.length&&(r=e[e.length-1][0],!(r!=="space"&&r!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let r,n="";for(;e.length&&(r=e[0][0],!(r!=="space"&&r!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let r,n="";for(;e.length&&(r=e[e.length-1][0],r==="space");)n=e.pop()[1]+n;return n}stringFrom(e,r){let n="";for(let i=r;i<e.length;i++)n+=e[i][1];return e.splice(r,e.length-r),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,r){throw this.input.error("At-rule without name",{offset:r[2]},{offset:r[2]+r[1].length})}};NC.exports=qS});var jm=P((J0e,LC)=>{"use strict";b();var nY=Na(),iY=xf(),sY=RS();function Fm(t,e){let r=new iY(t,e),n=new sY(r);try{n.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
1173
+ You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
1174
+ You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
1175
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return n.root}LC.exports=Fm;Fm.default=Fm;nY.registerParse(Fm)});var MS=P((Q0e,PC)=>{"use strict";b();var If=class{constructor(e,r={}){if(this.type="warning",this.text=e,r.node&&r.node.source){let n=r.node.rangeBy(r);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in r)this[n]=r[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};PC.exports=If;If.default=If});var Bm=P((X0e,CC)=>{"use strict";b();var aY=MS(),Tf=class{get content(){return this.css}constructor(e,r,n){this.processor=e,this.messages=[],this.root=r,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(e,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new aY(e,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}};CC.exports=Tf;Tf.default=Tf});var DS=P((ebe,RC)=>{"use strict";b();var qC={};RC.exports=function(e){qC[e]||(qC[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var BS=P((rbe,jC)=>{"use strict";b();var oY=Na(),uY=Tm(),cY=CS(),lY=jm(),MC=Bm(),fY=hc(),pY=pf(),{isClean:os,my:hY}=Am(),dY=DS(),mY={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},gY={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},yY={Once:!0,postcssPlugin:!0,prepare:!0},mc=0;function Ef(t){return typeof t=="object"&&typeof t.then=="function"}function FC(t){let e=!1,r=mY[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,mc,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,mc,r+"Exit"]:[r,r+"Exit"]}function DC(t){let e;return t.type==="document"?e=["Document",mc,"DocumentExit"]:t.type==="root"?e=["Root",mc,"RootExit"]:e=FC(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function FS(t){return t[os]=!1,t.nodes&&t.nodes.forEach(e=>FS(e)),t}var jS={},Pa=class t{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,r,n){this.stringified=!1,this.processed=!1;let i;if(typeof r=="object"&&r!==null&&(r.type==="root"||r.type==="document"))i=FS(r);else if(r instanceof t||r instanceof MC)i=FS(r.root),r.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let s=lY;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{i=s(r,n)}catch(a){this.processed=!0,this.error=a}i&&!i[hY]&&oY.rebuild(i)}this.result=new MC(e,i,n),this.helpers={...jS,postcss:jS,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,r){let n=this.result.lastPlugin;try{if(r&&r.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=n.postcssPlugin,e.setMessage();else if(n.postcssVersion&&process.env.NODE_ENV!=="production"){let i=n.postcssPlugin,s=n.postcssVersion,a=this.result.processor.version,u=s.split("."),c=a.split(".");(u[0]!==c[0]||parseInt(u[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+a+", but "+i+" uses "+s+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(r,n,i)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([r,i])};for(let r of this.plugins)if(typeof r=="object")for(let n in r){if(!gY[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!yY[n])if(typeof r[n]=="object")for(let i in r[n])i==="*"?e(r,n,r[n][i]):e(r,n+"-"+i.toLowerCase(),r[n][i]);else typeof r[n]=="function"&&e(r,n,r[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let r=this.plugins[e],n=this.runOnRoot(r);if(Ef(n))try{await n}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[os];){e[os]=!0;let r=[DC(e)];for(;r.length>0;){let n=this.visitTick(r);if(Ef(n))try{await n}catch(i){let s=r[r.length-1].node;throw this.handleError(i,s)}}}if(this.listeners.OnceExit)for(let[r,n]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(e.type==="document"){let i=e.nodes.map(s=>n(s,this.helpers));await Promise.all(i)}else await n(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return Ef(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(r){throw this.handleError(r)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,r=pY;e.syntax&&(r=e.syntax.stringify),e.stringifier&&(r=e.stringifier),r.stringify&&(r=r.stringify);let i=new cY(r,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let r=this.runOnRoot(e);if(Ef(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[os];)e[os]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,r){return process.env.NODE_ENV!=="production"&&("from"in this.opts||dY("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,r)}toString(){return this.css}visitSync(e,r){for(let[n,i]of e){this.result.lastPlugin=n;let s;try{s=i(r,this.helpers)}catch(a){throw this.handleError(a,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(Ef(s))throw this.getAsyncError()}}visitTick(e){let r=e[e.length-1],{node:n,visitors:i}=r;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(i.length>0&&r.visitorIndex<i.length){let[a,u]=i[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===i.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=a;try{return u(n.toProxy(),this.helpers)}catch(c){throw this.handleError(c,n)}}if(r.iterator!==0){let a=r.iterator,u;for(;u=n.nodes[n.indexes[a]];)if(n.indexes[a]+=1,!u[os]){u[os]=!0,e.push(DC(u));return}r.iterator=0,delete n.indexes[a]}let s=r.events;for(;r.eventIndex<s.length;){let a=s[r.eventIndex];if(r.eventIndex+=1,a===mc){n.nodes&&n.nodes.length&&(n[os]=!0,r.iterator=n.getIterator());return}else if(this.listeners[a]){r.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[os]=!0;let r=FC(e);for(let n of r)if(n===mc)e.nodes&&e.each(i=>{i[os]||this.walkSync(i)});else{let i=this.listeners[n];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Pa.registerPostcss=t=>{jS=t};jC.exports=Pa;Pa.default=Pa;fY.registerLazyResult(Pa);uY.registerLazyResult(Pa)});var $C=P((ibe,BC)=>{"use strict";b();var _Y=CS(),vY=jm(),bY=Bm(),SY=pf(),wY=DS(),Of=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,r=vY;try{e=r(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,r,n){r=r.toString(),this.stringified=!1,this._processor=e,this._css=r,this._opts=n,this._map=void 0;let i=SY;this.result=new bY(this._processor,void 0,this._opts),this.result.css=r;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new _Y(i,void 0,this._opts,r);if(a.isMap()){let[u,c]=a.generate();u&&(this.result.css=u),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,r){return process.env.NODE_ENV!=="production"&&("from"in this._opts||wY("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,r)}toString(){return this._css}warnings(){return[]}};BC.exports=Of;Of.default=Of});var UC=P((abe,VC)=>{"use strict";b();var xY=Tm(),kY=BS(),AY=$C(),IY=hc(),Uo=class{constructor(e=[]){this.version="8.5.10",this.plugins=this.normalize(e)}normalize(e){let r=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))r=r.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)r.push(n);else if(typeof n=="function")r.push(n);else if(typeof n=="object"&&(n.parse||n.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(n+" is not a PostCSS plugin");return r}process(e,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new AY(this,e,r):new kY(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};VC.exports=Uo;Uo.default=Uo;IY.registerProcessor(Uo);xY.registerProcessor(Uo)});var YC=P((ube,QC)=>{"use strict";b();var WC=Im(),GC=ac(),TY=Na(),EY=km(),HC=_f(),zC=Tm(),OY=SC(),NY=xf(),LY=BS(),PY=LS(),CY=mf(),qY=jm(),$S=UC(),RY=Bm(),JC=hc(),KC=Rm(),MY=pf(),DY=MS();function dt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new $S(t)}dt.plugin=function(e,r){let n=!1;function i(...a){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
1176
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
1177
+ https://www.w3ctech.com/topic/2226`));let u=r(...a);return u.postcssPlugin=e,u.postcssVersion=new $S().version,u}let s;return Object.defineProperty(i,"postcss",{get(){return s||(s=i()),s}}),i.process=function(a,u,c){return dt([i(c)]).process(a,u)},i};dt.stringify=MY;dt.parse=qY;dt.fromJSON=OY;dt.list=PY;dt.comment=t=>new GC(t);dt.atRule=t=>new WC(t);dt.decl=t=>new HC(t);dt.rule=t=>new KC(t);dt.root=t=>new JC(t);dt.document=t=>new zC(t);dt.CssSyntaxError=EY;dt.Declaration=HC;dt.Container=TY;dt.Processor=$S;dt.Document=zC;dt.Comment=GC;dt.Warning=DY;dt.AtRule=WC;dt.Result=RY;dt.Input=NY;dt.Rule=KC;dt.Root=JC;dt.Node=CY;LY.registerPostcss(dt);QC.exports=dt;dt.default=dt});var ZC=P((lbe,XC)=>{b();var FY=ac(),jY=RS(),BY=xm(),VS=class extends jY{checkMissedSemicolon(){}comment(e){let r=new FY;this.init(r,e[2]);let n=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:n.col,line:n.line,offset:e[3]+1};let i=e[1].slice(2);if(i.slice(-2)==="*/"&&(i=i.slice(0,-2)),/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{let s=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=BY(this.input,{ignoreErrors:!0})}decl(e){e.length>1&&e.some(r=>r[0]==="word")&&super.decl(e)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let n,i;for(n=r-1;n>=0&&e[n][0]!=="word";n--);if(n===0||n<0)return;for(i=n-1;i>=0;i--)if(e[i][0]!=="space"){i+=1;break}let s=e.slice(n),a=e.slice(i,n);e.splice(i,e.length-i),this.spaces=a.map(u=>u[1]).join(""),this.decl(s)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(e){this.spaces+=e.map(r=>r[1]).join("")}unnamedAtrule(e){e.name=""}};XC.exports=VS});var t2=P((pbe,e2)=>{b();var{Input:$Y}=YC(),VY=ZC();e2.exports=function(e,r){let n=new $Y(e,r),i=new VY(n);return i.parse(),i.root}});var US=P(($m,r2)=>{"use strict";b();$m.__esModule=!0;$m.default=GY;function UY(t){for(var e=t.toLowerCase(),r="",n=!1,i=0;i<6&&e[i]!==void 0;i++){var s=e.charCodeAt(i),a=s>=97&&s<=102||s>=48&&s<=57;if(n=s===32,!a)break;r+=e[i]}if(r.length!==0){var u=parseInt(r,16),c=u>=55296&&u<=57343;return c||u===0||u>1114111?["\uFFFD",r.length+(n?1:0)]:[String.fromCodePoint(u),r.length+(n?1:0)]}}var WY=/\\/;function GY(t){var e=WY.test(t);if(!e)return t;for(var r="",n=0;n<t.length;n++){if(t[n]==="\\"){var i=UY(t.slice(n+1,n+7));if(i!==void 0){r+=i[0],n+=i[1];continue}if(t[n+1]==="\\"){r+="\\",n++;continue}t.length===n+1&&(r+=t[n]);continue}r+=t[n]}return r}r2.exports=$m.default});var i2=P((Vm,n2)=>{"use strict";b();Vm.__esModule=!0;Vm.default=HY;function HY(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];for(;r.length>0;){var i=r.shift();if(!t[i])return;t=t[i]}return t}n2.exports=Vm.default});var a2=P((Um,s2)=>{"use strict";b();Um.__esModule=!0;Um.default=zY;function zY(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];for(;r.length>0;){var i=r.shift();t[i]||(t[i]={}),t=t[i]}}s2.exports=Um.default});var u2=P((Wm,o2)=>{"use strict";b();Wm.__esModule=!0;Wm.default=JY;function JY(t){for(var e="",r=t.indexOf("/*"),n=0;r>=0;){e=e+t.slice(n,r);var i=t.indexOf("*/",r+2);if(i<0)return e;n=i+2,r=t.indexOf("/*",n)}return e=e+t.slice(n),e}o2.exports=Wm.default});var Nf=P(us=>{"use strict";b();us.__esModule=!0;us.unesc=us.stripComments=us.getProp=us.ensureObject=void 0;var KY=Gm(US());us.unesc=KY.default;var QY=Gm(i2());us.getProp=QY.default;var YY=Gm(a2());us.ensureObject=YY.default;var XY=Gm(u2());us.stripComments=XY.default;function Gm(t){return t&&t.__esModule?t:{default:t}}});var Hs=P((Lf,f2)=>{"use strict";b();Lf.__esModule=!0;Lf.default=void 0;var c2=Nf();function l2(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ZY(t,e,r){return e&&l2(t.prototype,e),r&&l2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var eX=function t(e,r){if(typeof e!="object"||e===null)return e;var n=new e.constructor;for(var i in e)if(e.hasOwnProperty(i)){var s=e[i],a=typeof s;i==="parent"&&a==="object"?r&&(n[i]=r):s instanceof Array?n[i]=s.map(function(u){return t(u,n)}):n[i]=t(s,n)}return n},tX=(function(){function t(r){r===void 0&&(r={}),Object.assign(this,r),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var e=t.prototype;return e.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.replaceWith=function(){if(this.parent){for(var n in arguments)this.parent.insertBefore(this,arguments[n]);this.remove()}return this},e.next=function(){return this.parent.at(this.parent.index(this)+1)},e.prev=function(){return this.parent.at(this.parent.index(this)-1)},e.clone=function(n){n===void 0&&(n={});var i=eX(this);for(var s in n)i[s]=n[s];return i},e.appendToPropertyAndEscape=function(n,i,s){this.raws||(this.raws={});var a=this[n],u=this.raws[n];this[n]=a+i,u||s!==i?this.raws[n]=(u||a)+s:delete this.raws[n]},e.setPropertyAndEscape=function(n,i,s){this.raws||(this.raws={}),this[n]=i,this.raws[n]=s},e.setPropertyWithoutEscape=function(n,i){this[n]=i,this.raws&&delete this.raws[n]},e.isAtPosition=function(n,i){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>n||this.source.end.line<n||this.source.start.line===n&&this.source.start.column>i||this.source.end.line===n&&this.source.end.column<i)},e.stringifyProperty=function(n){return this.raws&&this.raws[n]||this[n]},e.valueToString=function(){return String(this.stringifyProperty("value"))},e.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},ZY(t,[{key:"rawSpaceBefore",get:function(){var n=this.raws&&this.raws.spaces&&this.raws.spaces.before;return n===void 0&&(n=this.spaces&&this.spaces.before),n||""},set:function(n){(0,c2.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=n}},{key:"rawSpaceAfter",get:function(){var n=this.raws&&this.raws.spaces&&this.raws.spaces.after;return n===void 0&&(n=this.spaces.after),n||""},set:function(n){(0,c2.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=n}}]),t})();Lf.default=tX;f2.exports=Lf.default});var qr=P(St=>{"use strict";b();St.__esModule=!0;St.UNIVERSAL=St.TAG=St.STRING=St.SELECTOR=St.ROOT=St.PSEUDO=St.NESTING=St.ID=St.COMMENT=St.COMBINATOR=St.CLASS=St.ATTRIBUTE=void 0;var rX="tag";St.TAG=rX;var nX="string";St.STRING=nX;var iX="selector";St.SELECTOR=iX;var sX="root";St.ROOT=sX;var aX="pseudo";St.PSEUDO=aX;var oX="nesting";St.NESTING=oX;var uX="id";St.ID=uX;var cX="comment";St.COMMENT=cX;var lX="combinator";St.COMBINATOR=lX;var fX="class";St.CLASS=fX;var pX="attribute";St.ATTRIBUTE=pX;var hX="universal";St.UNIVERSAL=hX});var Hm=P((Pf,m2)=>{"use strict";b();Pf.__esModule=!0;Pf.default=void 0;var dX=gX(Hs()),zs=mX(qr());function d2(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(d2=function(i){return i?r:e})(t)}function mX(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=d2(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=i?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(n,s,a):n[s]=t[s]}return n.default=t,r&&r.set(t,n),n}function gX(t){return t&&t.__esModule?t:{default:t}}function yX(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=_X(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1178
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _X(t,e){if(t){if(typeof t=="string")return p2(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p2(t,e)}}function p2(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function h2(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vX(t,e,r){return e&&h2(t.prototype,e),r&&h2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function bX(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,WS(t,e)}function WS(t,e){return WS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},WS(t,e)}var SX=(function(t){bX(e,t);function e(n){var i;return i=t.call(this,n)||this,i.nodes||(i.nodes=[]),i}var r=e.prototype;return r.append=function(i){return i.parent=this,this.nodes.push(i),this},r.prepend=function(i){i.parent=this,this.nodes.unshift(i);for(var s in this.indexes)this.indexes[s]++;return this},r.at=function(i){return this.nodes[i]},r.index=function(i){return typeof i=="number"?i:this.nodes.indexOf(i)},r.removeChild=function(i){i=this.index(i),this.at(i).parent=void 0,this.nodes.splice(i,1);var s;for(var a in this.indexes)s=this.indexes[a],s>=i&&(this.indexes[a]=s-1);return this},r.removeAll=function(){for(var i=yX(this.nodes),s;!(s=i()).done;){var a=s.value;a.parent=void 0}return this.nodes=[],this},r.empty=function(){return this.removeAll()},r.insertAfter=function(i,s){var a;s.parent=this;for(var u=this.index(i),c=[],p=2;p<arguments.length;p++)c.push(arguments[p]);(a=this.nodes).splice.apply(a,[u+1,0,s].concat(c)),s.parent=this;var d;for(var m in this.indexes)d=this.indexes[m],u<d&&(this.indexes[m]=d+arguments.length-1);return this},r.insertBefore=function(i,s){var a;s.parent=this;for(var u=this.index(i),c=[],p=2;p<arguments.length;p++)c.push(arguments[p]);(a=this.nodes).splice.apply(a,[u,0,s].concat(c)),s.parent=this;var d;for(var m in this.indexes)d=this.indexes[m],d>=u&&(this.indexes[m]=d+arguments.length-1);return this},r._findChildAtPosition=function(i,s){var a=void 0;return this.each(function(u){if(u.atPosition){var c=u.atPosition(i,s);if(c)return a=c,!1}else if(u.isAtPosition(i,s))return a=u,!1}),a},r.atPosition=function(i,s){if(this.isAtPosition(i,s))return this._findChildAtPosition(i,s)||this},r._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},r.each=function(i){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var s=this.lastEach;if(this.indexes[s]=0,!!this.length){for(var a,u;this.indexes[s]<this.length&&(a=this.indexes[s],u=i(this.at(a),a),u!==!1);)this.indexes[s]+=1;if(delete this.indexes[s],u===!1)return!1}},r.walk=function(i){return this.each(function(s,a){var u=i(s,a);if(u!==!1&&s.length&&(u=s.walk(i)),u===!1)return!1})},r.walkAttributes=function(i){var s=this;return this.walk(function(a){if(a.type===zs.ATTRIBUTE)return i.call(s,a)})},r.walkClasses=function(i){var s=this;return this.walk(function(a){if(a.type===zs.CLASS)return i.call(s,a)})},r.walkCombinators=function(i){var s=this;return this.walk(function(a){if(a.type===zs.COMBINATOR)return i.call(s,a)})},r.walkComments=function(i){var s=this;return this.walk(function(a){if(a.type===zs.COMMENT)return i.call(s,a)})},r.walkIds=function(i){var s=this;return this.walk(function(a){if(a.type===zs.ID)return i.call(s,a)})},r.walkNesting=function(i){var s=this;return this.walk(function(a){if(a.type===zs.NESTING)return i.call(s,a)})},r.walkPseudos=function(i){var s=this;return this.walk(function(a){if(a.type===zs.PSEUDO)return i.call(s,a)})},r.walkTags=function(i){var s=this;return this.walk(function(a){if(a.type===zs.TAG)return i.call(s,a)})},r.walkUniversals=function(i){var s=this;return this.walk(function(a){if(a.type===zs.UNIVERSAL)return i.call(s,a)})},r.split=function(i){var s=this,a=[];return this.reduce(function(u,c,p){var d=i.call(s,c);return a.push(c),d?(u.push(a),a=[]):p===s.length-1&&u.push(a),u},[])},r.map=function(i){return this.nodes.map(i)},r.reduce=function(i,s){return this.nodes.reduce(i,s)},r.every=function(i){return this.nodes.every(i)},r.some=function(i){return this.nodes.some(i)},r.filter=function(i){return this.nodes.filter(i)},r.sort=function(i){return this.nodes.sort(i)},r.toString=function(){return this.map(String).join("")},vX(e,[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}]),e})(dX.default);Pf.default=SX;m2.exports=Pf.default});var HS=P((Cf,y2)=>{"use strict";b();Cf.__esModule=!0;Cf.default=void 0;var wX=kX(Hm()),xX=qr();function kX(t){return t&&t.__esModule?t:{default:t}}function g2(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function AX(t,e,r){return e&&g2(t.prototype,e),r&&g2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function IX(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,GS(t,e)}function GS(t,e){return GS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},GS(t,e)}var TX=(function(t){IX(e,t);function e(n){var i;return i=t.call(this,n)||this,i.type=xX.ROOT,i}var r=e.prototype;return r.toString=function(){var i=this.reduce(function(s,a){return s.push(String(a)),s},[]).join(",");return this.trailingComma?i+",":i},r.error=function(i,s){return this._error?this._error(i,s):new Error(i)},AX(e,[{key:"errorGenerator",set:function(i){this._error=i}}]),e})(wX.default);Cf.default=TX;y2.exports=Cf.default});var JS=P((qf,_2)=>{"use strict";b();qf.__esModule=!0;qf.default=void 0;var EX=NX(Hm()),OX=qr();function NX(t){return t&&t.__esModule?t:{default:t}}function LX(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,zS(t,e)}function zS(t,e){return zS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},zS(t,e)}var PX=(function(t){LX(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=OX.SELECTOR,n}return e})(EX.default);qf.default=PX;_2.exports=qf.default});var zm=P((Ibe,v2)=>{"use strict";b();var CX={},qX=CX.hasOwnProperty,RX=function(e,r){if(!e)return r;var n={};for(var i in r)n[i]=qX.call(e,i)?e[i]:r[i];return n},MX=/[ -,\.\/:-@\[-\^`\{-~]/,DX=/[ -,\.\/:-@\[\]\^`\{-~]/,FX=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,KS=function t(e,r){r=RX(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var n=r.quotes=="double"?'"':"'",i=r.isIdentifier,s=e.charAt(0),a="",u=0,c=e.length;u<c;){var p=e.charAt(u++),d=p.charCodeAt(),m=void 0;if(d<32||d>126){if(d>=55296&&d<=56319&&u<c){var h=e.charCodeAt(u++);(h&64512)==56320?d=((d&1023)<<10)+(h&1023)+65536:u--}m="\\"+d.toString(16).toUpperCase()+" "}else r.escapeEverything?MX.test(p)?m="\\"+p:m="\\"+d.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(p)?m="\\"+d.toString(16).toUpperCase()+" ":p=="\\"||!i&&(p=='"'&&n==p||p=="'"&&n==p)||i&&DX.test(p)?m="\\"+p:m=p;a+=m}return i&&(/^-[-\d]/.test(a)?a="\\-"+a.slice(1):/\d/.test(s)&&(a="\\3"+s+" "+a.slice(1))),a=a.replace(FX,function(y,w,x){return w&&w.length%2?y:(w||"")+x}),!i&&r.wrap?n+a+n:a};KS.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};KS.version="3.0.0";v2.exports=KS});var YS=P((Rf,w2)=>{"use strict";b();Rf.__esModule=!0;Rf.default=void 0;var jX=S2(zm()),BX=Nf(),$X=S2(Hs()),VX=qr();function S2(t){return t&&t.__esModule?t:{default:t}}function b2(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function UX(t,e,r){return e&&b2(t.prototype,e),r&&b2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function WX(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,QS(t,e)}function QS(t,e){return QS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},QS(t,e)}var GX=(function(t){WX(e,t);function e(n){var i;return i=t.call(this,n)||this,i.type=VX.CLASS,i._constructed=!0,i}var r=e.prototype;return r.valueToString=function(){return"."+t.prototype.valueToString.call(this)},UX(e,[{key:"value",get:function(){return this._value},set:function(i){if(this._constructed){var s=(0,jX.default)(i,{isIdentifier:!0});s!==i?((0,BX.ensureObject)(this,"raws"),this.raws.value=s):this.raws&&delete this.raws.value}this._value=i}}]),e})($X.default);Rf.default=GX;w2.exports=Rf.default});var ZS=P((Mf,x2)=>{"use strict";b();Mf.__esModule=!0;Mf.default=void 0;var HX=JX(Hs()),zX=qr();function JX(t){return t&&t.__esModule?t:{default:t}}function KX(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,XS(t,e)}function XS(t,e){return XS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},XS(t,e)}var QX=(function(t){KX(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=zX.COMMENT,n}return e})(HX.default);Mf.default=QX;x2.exports=Mf.default});var tw=P((Df,k2)=>{"use strict";b();Df.__esModule=!0;Df.default=void 0;var YX=ZX(Hs()),XX=qr();function ZX(t){return t&&t.__esModule?t:{default:t}}function eZ(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ew(t,e)}function ew(t,e){return ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ew(t,e)}var tZ=(function(t){eZ(e,t);function e(n){var i;return i=t.call(this,n)||this,i.type=XX.ID,i}var r=e.prototype;return r.valueToString=function(){return"#"+t.prototype.valueToString.call(this)},e})(YX.default);Df.default=tZ;k2.exports=Df.default});var Jm=P((Ff,T2)=>{"use strict";b();Ff.__esModule=!0;Ff.default=void 0;var rZ=I2(zm()),nZ=Nf(),iZ=I2(Hs());function I2(t){return t&&t.__esModule?t:{default:t}}function A2(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function sZ(t,e,r){return e&&A2(t.prototype,e),r&&A2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function aZ(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,rw(t,e)}function rw(t,e){return rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},rw(t,e)}var oZ=(function(t){aZ(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.qualifiedName=function(i){return this.namespace?this.namespaceString+"|"+i:i},r.valueToString=function(){return this.qualifiedName(t.prototype.valueToString.call(this))},sZ(e,[{key:"namespace",get:function(){return this._namespace},set:function(i){if(i===!0||i==="*"||i==="&"){this._namespace=i,this.raws&&delete this.raws.namespace;return}var s=(0,rZ.default)(i,{isIdentifier:!0});this._namespace=i,s!==i?((0,nZ.ensureObject)(this,"raws"),this.raws.namespace=s):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(i){this.namespace=i}},{key:"namespaceString",get:function(){if(this.namespace){var i=this.stringifyProperty("namespace");return i===!0?"":i}else return""}}]),e})(iZ.default);Ff.default=oZ;T2.exports=Ff.default});var iw=P((jf,E2)=>{"use strict";b();jf.__esModule=!0;jf.default=void 0;var uZ=lZ(Jm()),cZ=qr();function lZ(t){return t&&t.__esModule?t:{default:t}}function fZ(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,nw(t,e)}function nw(t,e){return nw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},nw(t,e)}var pZ=(function(t){fZ(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=cZ.TAG,n}return e})(uZ.default);jf.default=pZ;E2.exports=jf.default});var aw=P((Bf,O2)=>{"use strict";b();Bf.__esModule=!0;Bf.default=void 0;var hZ=mZ(Hs()),dZ=qr();function mZ(t){return t&&t.__esModule?t:{default:t}}function gZ(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,sw(t,e)}function sw(t,e){return sw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},sw(t,e)}var yZ=(function(t){gZ(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=dZ.STRING,n}return e})(hZ.default);Bf.default=yZ;O2.exports=Bf.default});var uw=P(($f,N2)=>{"use strict";b();$f.__esModule=!0;$f.default=void 0;var _Z=bZ(Hm()),vZ=qr();function bZ(t){return t&&t.__esModule?t:{default:t}}function SZ(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ow(t,e)}function ow(t,e){return ow=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ow(t,e)}var wZ=(function(t){SZ(e,t);function e(n){var i;return i=t.call(this,n)||this,i.type=vZ.PSEUDO,i}var r=e.prototype;return r.toString=function(){var i=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),i,this.rawSpaceAfter].join("")},e})(_Z.default);$f.default=wZ;N2.exports=$f.default});var dw=P(Wf=>{"use strict";b();Wf.__esModule=!0;Wf.default=void 0;Wf.unescapeValue=hw;var Vf=pw(zm()),xZ=pw(US()),kZ=pw(Jm()),AZ=qr(),cw;function pw(t){return t&&t.__esModule?t:{default:t}}function L2(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function IZ(t,e,r){return e&&L2(t.prototype,e),r&&L2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function TZ(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,fw(t,e)}function fw(t,e){return fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},fw(t,e)}var Uf=GG(),EZ=/^('|")([^]*)\1$/,OZ=Uf(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),NZ=Uf(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),LZ=Uf(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function hw(t){var e=!1,r=null,n=t,i=n.match(EZ);return i&&(r=i[1],n=i[2]),n=(0,xZ.default)(n),n!==t&&(e=!0),{deprecatedUsage:e,unescaped:n,quoteMark:r}}function PZ(t){if(t.quoteMark!==void 0||t.value===void 0)return t;LZ();var e=hw(t.value),r=e.quoteMark,n=e.unescaped;return t.raws||(t.raws={}),t.raws.value===void 0&&(t.raws.value=t.value),t.value=n,t.quoteMark=r,t}var Km=(function(t){TZ(e,t);function e(n){var i;return n===void 0&&(n={}),i=t.call(this,PZ(n))||this,i.type=AZ.ATTRIBUTE,i.raws=i.raws||{},Object.defineProperty(i.raws,"unquoted",{get:Uf(function(){return i.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:Uf(function(){return i.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),i._constructed=!0,i}var r=e.prototype;return r.getQuotedValue=function(i){i===void 0&&(i={});var s=this._determineQuoteMark(i),a=lw[s],u=(0,Vf.default)(this._value,a);return u},r._determineQuoteMark=function(i){return i.smart?this.smartQuoteMark(i):this.preferredQuoteMark(i)},r.setValue=function(i,s){s===void 0&&(s={}),this._value=i,this._quoteMark=this._determineQuoteMark(s),this._syncRawValue()},r.smartQuoteMark=function(i){var s=this.value,a=s.replace(/[^']/g,"").length,u=s.replace(/[^"]/g,"").length;if(a+u===0){var c=(0,Vf.default)(s,{isIdentifier:!0});if(c===s)return e.NO_QUOTE;var p=this.preferredQuoteMark(i);if(p===e.NO_QUOTE){var d=this.quoteMark||i.quoteMark||e.DOUBLE_QUOTE,m=lw[d],h=(0,Vf.default)(s,m);if(h.length<c.length)return d}return p}else return u===a?this.preferredQuoteMark(i):u<a?e.DOUBLE_QUOTE:e.SINGLE_QUOTE},r.preferredQuoteMark=function(i){var s=i.preferCurrentQuoteMark?this.quoteMark:i.quoteMark;return s===void 0&&(s=i.preferCurrentQuoteMark?i.quoteMark:this.quoteMark),s===void 0&&(s=e.DOUBLE_QUOTE),s},r._syncRawValue=function(){var i=(0,Vf.default)(this._value,lw[this.quoteMark]);i===this._value?this.raws&&delete this.raws.value:this.raws.value=i},r._handleEscapes=function(i,s){if(this._constructed){var a=(0,Vf.default)(s,{isIdentifier:!0});a!==s?this.raws[i]=a:delete this.raws[i]}},r._spacesFor=function(i){var s={before:"",after:""},a=this.spaces[i]||{},u=this.raws.spaces&&this.raws.spaces[i]||{};return Object.assign(s,a,u)},r._stringFor=function(i,s,a){s===void 0&&(s=i),a===void 0&&(a=P2);var u=this._spacesFor(s);return a(this.stringifyProperty(i),u)},r.offsetOf=function(i){var s=1,a=this._spacesFor("attribute");if(s+=a.before.length,i==="namespace"||i==="ns")return this.namespace?s:-1;if(i==="attributeNS"||(s+=this.namespaceString.length,this.namespace&&(s+=1),i==="attribute"))return s;s+=this.stringifyProperty("attribute").length,s+=a.after.length;var u=this._spacesFor("operator");s+=u.before.length;var c=this.stringifyProperty("operator");if(i==="operator")return c?s:-1;s+=c.length,s+=u.after.length;var p=this._spacesFor("value");s+=p.before.length;var d=this.stringifyProperty("value");if(i==="value")return d?s:-1;s+=d.length,s+=p.after.length;var m=this._spacesFor("insensitive");return s+=m.before.length,i==="insensitive"&&this.insensitive?s:-1},r.toString=function(){var i=this,s=[this.rawSpaceBefore,"["];return s.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(s.push(this._stringFor("operator")),s.push(this._stringFor("value")),s.push(this._stringFor("insensitiveFlag","insensitive",function(a,u){return a.length>0&&!i.quoted&&u.before.length===0&&!(i.spaces.value&&i.spaces.value.after)&&(u.before=" "),P2(a,u)}))),s.push("]"),s.push(this.rawSpaceAfter),s.join("")},IZ(e,[{key:"quoted",get:function(){var i=this.quoteMark;return i==="'"||i==='"'},set:function(i){NZ()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(i){if(!this._constructed){this._quoteMark=i;return}this._quoteMark!==i&&(this._quoteMark=i,this._syncRawValue())}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(i){if(this._constructed){var s=hw(i),a=s.deprecatedUsage,u=s.unescaped,c=s.quoteMark;if(a&&OZ(),u===this._value&&c===this._quoteMark)return;this._value=u,this._quoteMark=c,this._syncRawValue()}else this._value=i}},{key:"insensitive",get:function(){return this._insensitive},set:function(i){i||(this._insensitive=!1,this.raws&&(this.raws.insensitiveFlag==="I"||this.raws.insensitiveFlag==="i")&&(this.raws.insensitiveFlag=void 0)),this._insensitive=i}},{key:"attribute",get:function(){return this._attribute},set:function(i){this._handleEscapes("attribute",i),this._attribute=i}}]),e})(kZ.default);Wf.default=Km;Km.NO_QUOTE=null;Km.SINGLE_QUOTE="'";Km.DOUBLE_QUOTE='"';var lw=(cw={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},cw[null]={isIdentifier:!0},cw);function P2(t,e){return""+e.before+t+e.after}});var gw=P((Gf,C2)=>{"use strict";b();Gf.__esModule=!0;Gf.default=void 0;var CZ=RZ(Jm()),qZ=qr();function RZ(t){return t&&t.__esModule?t:{default:t}}function MZ(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,mw(t,e)}function mw(t,e){return mw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},mw(t,e)}var DZ=(function(t){MZ(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=qZ.UNIVERSAL,n.value="*",n}return e})(CZ.default);Gf.default=DZ;C2.exports=Gf.default});var _w=P((Hf,q2)=>{"use strict";b();Hf.__esModule=!0;Hf.default=void 0;var FZ=BZ(Hs()),jZ=qr();function BZ(t){return t&&t.__esModule?t:{default:t}}function $Z(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,yw(t,e)}function yw(t,e){return yw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},yw(t,e)}var VZ=(function(t){$Z(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=jZ.COMBINATOR,n}return e})(FZ.default);Hf.default=VZ;q2.exports=Hf.default});var bw=P((zf,R2)=>{"use strict";b();zf.__esModule=!0;zf.default=void 0;var UZ=GZ(Hs()),WZ=qr();function GZ(t){return t&&t.__esModule?t:{default:t}}function HZ(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,vw(t,e)}function vw(t,e){return vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},vw(t,e)}var zZ=(function(t){HZ(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=WZ.NESTING,n.value="&",n}return e})(UZ.default);zf.default=zZ;R2.exports=zf.default});var D2=P((Qm,M2)=>{"use strict";b();Qm.__esModule=!0;Qm.default=JZ;function JZ(t){return t.sort(function(e,r){return e-r})}M2.exports=Qm.default});var Sw=P(we=>{"use strict";b();we.__esModule=!0;we.word=we.tilde=we.tab=we.str=we.space=we.slash=we.singleQuote=we.semicolon=we.plus=we.pipe=we.openSquare=we.openParenthesis=we.newline=we.greaterThan=we.feed=we.equals=we.doubleQuote=we.dollar=we.cr=we.comment=we.comma=we.combinator=we.colon=we.closeSquare=we.closeParenthesis=we.caret=we.bang=we.backslash=we.at=we.asterisk=we.ampersand=void 0;var KZ=38;we.ampersand=KZ;var QZ=42;we.asterisk=QZ;var YZ=64;we.at=YZ;var XZ=44;we.comma=XZ;var ZZ=58;we.colon=ZZ;var eee=59;we.semicolon=eee;var tee=40;we.openParenthesis=tee;var ree=41;we.closeParenthesis=ree;var nee=91;we.openSquare=nee;var iee=93;we.closeSquare=iee;var see=36;we.dollar=see;var aee=126;we.tilde=aee;var oee=94;we.caret=oee;var uee=43;we.plus=uee;var cee=61;we.equals=cee;var lee=124;we.pipe=lee;var fee=62;we.greaterThan=fee;var pee=32;we.space=pee;var F2=39;we.singleQuote=F2;var hee=34;we.doubleQuote=hee;var dee=47;we.slash=dee;var mee=33;we.bang=mee;var gee=92;we.backslash=gee;var yee=13;we.cr=yee;var _ee=12;we.feed=_ee;var vee=10;we.newline=vee;var bee=9;we.tab=bee;var See=F2;we.str=See;var wee=-1;we.comment=wee;var xee=-2;we.word=xee;var kee=-3;we.combinator=kee});var $2=P(Jf=>{"use strict";b();Jf.__esModule=!0;Jf.FIELDS=void 0;Jf.default=Lee;var he=Aee(Sw()),gc,vt;function B2(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(B2=function(i){return i?r:e})(t)}function Aee(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=B2(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=i?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(n,s,a):n[s]=t[s]}return n.default=t,r&&r.set(t,n),n}var Iee=(gc={},gc[he.tab]=!0,gc[he.newline]=!0,gc[he.cr]=!0,gc[he.feed]=!0,gc),Tee=(vt={},vt[he.space]=!0,vt[he.tab]=!0,vt[he.newline]=!0,vt[he.cr]=!0,vt[he.feed]=!0,vt[he.ampersand]=!0,vt[he.asterisk]=!0,vt[he.bang]=!0,vt[he.comma]=!0,vt[he.colon]=!0,vt[he.semicolon]=!0,vt[he.openParenthesis]=!0,vt[he.closeParenthesis]=!0,vt[he.openSquare]=!0,vt[he.closeSquare]=!0,vt[he.singleQuote]=!0,vt[he.doubleQuote]=!0,vt[he.plus]=!0,vt[he.pipe]=!0,vt[he.tilde]=!0,vt[he.greaterThan]=!0,vt[he.equals]=!0,vt[he.dollar]=!0,vt[he.caret]=!0,vt[he.slash]=!0,vt),ww={},j2="0123456789abcdefABCDEF";for(Ym=0;Ym<j2.length;Ym++)ww[j2.charCodeAt(Ym)]=!0;var Ym;function Eee(t,e){var r=e,n;do{if(n=t.charCodeAt(r),Tee[n])return r-1;n===he.backslash?r=Oee(t,r)+1:r++}while(r<t.length);return r-1}function Oee(t,e){var r=e,n=t.charCodeAt(r+1);if(!Iee[n])if(ww[n]){var i=0;do r++,i++,n=t.charCodeAt(r+1);while(ww[n]&&i<6);i<6&&n===he.space&&r++}else r++;return r}var Nee={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};Jf.FIELDS=Nee;function Lee(t){var e=[],r=t.css.valueOf(),n=r,i=n.length,s=-1,a=1,u=0,c=0,p,d,m,h,y,w,x,k,v,I,T,S,L;function R(M,F){if(t.safe)r+=F,v=r.length-1;else throw t.error("Unclosed "+M,a,u-s,u)}for(;u<i;){switch(p=r.charCodeAt(u),p===he.newline&&(s=u,a+=1),p){case he.space:case he.tab:case he.newline:case he.cr:case he.feed:v=u;do v+=1,p=r.charCodeAt(v),p===he.newline&&(s=v,a+=1);while(p===he.space||p===he.newline||p===he.tab||p===he.cr||p===he.feed);L=he.space,h=a,m=v-s-1,c=v;break;case he.plus:case he.greaterThan:case he.tilde:case he.pipe:v=u;do v+=1,p=r.charCodeAt(v);while(p===he.plus||p===he.greaterThan||p===he.tilde||p===he.pipe);L=he.combinator,h=a,m=u-s,c=v;break;case he.asterisk:case he.ampersand:case he.bang:case he.comma:case he.equals:case he.dollar:case he.caret:case he.openSquare:case he.closeSquare:case he.colon:case he.semicolon:case he.openParenthesis:case he.closeParenthesis:v=u,L=p,h=a,m=u-s,c=v+1;break;case he.singleQuote:case he.doubleQuote:S=p===he.singleQuote?"'":'"',v=u;do for(y=!1,v=r.indexOf(S,v+1),v===-1&&R("quote",S),w=v;r.charCodeAt(w-1)===he.backslash;)w-=1,y=!y;while(y);L=he.str,h=a,m=u-s,c=v+1;break;default:p===he.slash&&r.charCodeAt(u+1)===he.asterisk?(v=r.indexOf("*/",u+2)+1,v===0&&R("comment","*/"),d=r.slice(u,v+1),k=d.split(`
1179
+ `),x=k.length-1,x>0?(I=a+x,T=v-k[x].length):(I=a,T=s),L=he.comment,a=I,h=I,m=v-T):p===he.slash?(v=u,L=p,h=a,m=u-s,c=v+1):(v=Eee(r,u),L=he.word,h=a,m=v-s),c=v+1;break}e.push([L,a,u-s,h,m,u,c]),T&&(s=T,T=null),u=c}return e}});var K2=P((Kf,J2)=>{"use strict";b();Kf.__esModule=!0;Kf.default=void 0;var Pee=bi(HS()),xw=bi(JS()),Cee=bi(YS()),V2=bi(ZS()),qee=bi(tw()),Ree=bi(iw()),kw=bi(aw()),Mee=bi(uw()),U2=Xm(dw()),Dee=bi(gw()),Aw=bi(_w()),Fee=bi(bw()),jee=bi(D2()),oe=Xm($2()),ye=Xm(Sw()),Bee=Xm(qr()),Tt=Nf(),Wo,Iw;function z2(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(z2=function(i){return i?r:e})(t)}function Xm(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=z2(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=i?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(n,s,a):n[s]=t[s]}return n.default=t,r&&r.set(t,n),n}function bi(t){return t&&t.__esModule?t:{default:t}}function W2(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $ee(t,e,r){return e&&W2(t.prototype,e),r&&W2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var Ow=(Wo={},Wo[ye.space]=!0,Wo[ye.cr]=!0,Wo[ye.feed]=!0,Wo[ye.newline]=!0,Wo[ye.tab]=!0,Wo),Vee=Object.assign({},Ow,(Iw={},Iw[ye.comment]=!0,Iw));function G2(t){return{line:t[oe.FIELDS.START_LINE],column:t[oe.FIELDS.START_COL]}}function H2(t){return{line:t[oe.FIELDS.END_LINE],column:t[oe.FIELDS.END_COL]}}function Go(t,e,r,n){return{start:{line:t,column:e},end:{line:r,column:n}}}function yc(t){return Go(t[oe.FIELDS.START_LINE],t[oe.FIELDS.START_COL],t[oe.FIELDS.END_LINE],t[oe.FIELDS.END_COL])}function Tw(t,e){if(t)return Go(t[oe.FIELDS.START_LINE],t[oe.FIELDS.START_COL],e[oe.FIELDS.END_LINE],e[oe.FIELDS.END_COL])}function _c(t,e){var r=t[e];if(typeof r=="string")return r.indexOf("\\")!==-1&&((0,Tt.ensureObject)(t,"raws"),t[e]=(0,Tt.unesc)(r),t.raws[e]===void 0&&(t.raws[e]=r)),t}function Ew(t,e){for(var r=-1,n=[];(r=t.indexOf(e,r+1))!==-1;)n.push(r);return n}function Uee(){var t=Array.prototype.concat.apply([],arguments);return t.filter(function(e,r){return r===t.indexOf(e)})}var Wee=(function(){function t(r,n){n===void 0&&(n={}),this.rule=r,this.options=Object.assign({lossy:!1,safe:!1},n),this.position=0,this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,oe.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var i=Tw(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new Pee.default({source:i}),this.root.errorGenerator=this._errorGenerator();var s=new xw.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(s),this.current=s,this.loop()}var e=t.prototype;return e._errorGenerator=function(){var n=this;return function(i,s){return typeof n.rule=="string"?new Error(i):n.rule.error(i,s)}},e.attribute=function(){var n=[],i=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[oe.FIELDS.TYPE]!==ye.closeSquare;)n.push(this.currToken),this.position++;if(this.currToken[oe.FIELDS.TYPE]!==ye.closeSquare)return this.expected("closing square bracket",this.currToken[oe.FIELDS.START_POS]);var s=n.length,a={source:Go(i[1],i[2],this.currToken[3],this.currToken[4]),sourceIndex:i[oe.FIELDS.START_POS]};if(s===1&&!~[ye.word].indexOf(n[0][oe.FIELDS.TYPE]))return this.expected("attribute",n[0][oe.FIELDS.START_POS]);for(var u=0,c="",p="",d=null,m=!1;u<s;){var h=n[u],y=this.content(h),w=n[u+1];switch(h[oe.FIELDS.TYPE]){case ye.space:if(m=!0,this.options.lossy)break;if(d){(0,Tt.ensureObject)(a,"spaces",d);var x=a.spaces[d].after||"";a.spaces[d].after=x+y;var k=(0,Tt.getProp)(a,"raws","spaces",d,"after")||null;k&&(a.raws.spaces[d].after=k+y)}else c=c+y,p=p+y;break;case ye.asterisk:if(w[oe.FIELDS.TYPE]===ye.equals)a.operator=y,d="operator";else if((!a.namespace||d==="namespace"&&!m)&&w){c&&((0,Tt.ensureObject)(a,"spaces","attribute"),a.spaces.attribute.before=c,c=""),p&&((0,Tt.ensureObject)(a,"raws","spaces","attribute"),a.raws.spaces.attribute.before=c,p=""),a.namespace=(a.namespace||"")+y;var v=(0,Tt.getProp)(a,"raws","namespace")||null;v&&(a.raws.namespace+=y),d="namespace"}m=!1;break;case ye.dollar:if(d==="value"){var I=(0,Tt.getProp)(a,"raws","value");a.value+="$",I&&(a.raws.value=I+"$");break}case ye.caret:w[oe.FIELDS.TYPE]===ye.equals&&(a.operator=y,d="operator"),m=!1;break;case ye.combinator:if(y==="~"&&w[oe.FIELDS.TYPE]===ye.equals&&(a.operator=y,d="operator"),y!=="|"){m=!1;break}w[oe.FIELDS.TYPE]===ye.equals?(a.operator=y,d="operator"):!a.namespace&&!a.attribute&&(a.namespace=!0),m=!1;break;case ye.word:if(w&&this.content(w)==="|"&&n[u+2]&&n[u+2][oe.FIELDS.TYPE]!==ye.equals&&!a.operator&&!a.namespace)a.namespace=y,d="namespace";else if(!a.attribute||d==="attribute"&&!m){c&&((0,Tt.ensureObject)(a,"spaces","attribute"),a.spaces.attribute.before=c,c=""),p&&((0,Tt.ensureObject)(a,"raws","spaces","attribute"),a.raws.spaces.attribute.before=p,p=""),a.attribute=(a.attribute||"")+y;var T=(0,Tt.getProp)(a,"raws","attribute")||null;T&&(a.raws.attribute+=y),d="attribute"}else if(!a.value&&a.value!==""||d==="value"&&!(m||a.quoteMark)){var S=(0,Tt.unesc)(y),L=(0,Tt.getProp)(a,"raws","value")||"",R=a.value||"";a.value=R+S,a.quoteMark=null,(S!==y||L)&&((0,Tt.ensureObject)(a,"raws"),a.raws.value=(L||R)+y),d="value"}else{var M=y==="i"||y==="I";(a.value||a.value==="")&&(a.quoteMark||m)?(a.insensitive=M,(!M||y==="I")&&((0,Tt.ensureObject)(a,"raws"),a.raws.insensitiveFlag=y),d="insensitive",c&&((0,Tt.ensureObject)(a,"spaces","insensitive"),a.spaces.insensitive.before=c,c=""),p&&((0,Tt.ensureObject)(a,"raws","spaces","insensitive"),a.raws.spaces.insensitive.before=p,p="")):(a.value||a.value==="")&&(d="value",a.value+=y,a.raws.value&&(a.raws.value+=y))}m=!1;break;case ye.str:if(!a.attribute||!a.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:h[oe.FIELDS.START_POS]});var F=(0,U2.unescapeValue)(y),X=F.unescaped,H=F.quoteMark;a.value=X,a.quoteMark=H,d="value",(0,Tt.ensureObject)(a,"raws"),a.raws.value=y,m=!1;break;case ye.equals:if(!a.attribute)return this.expected("attribute",h[oe.FIELDS.START_POS],y);if(a.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:h[oe.FIELDS.START_POS]});a.operator=a.operator?a.operator+y:y,d="operator",m=!1;break;case ye.comment:if(d)if(m||w&&w[oe.FIELDS.TYPE]===ye.space||d==="insensitive"){var $=(0,Tt.getProp)(a,"spaces",d,"after")||"",B=(0,Tt.getProp)(a,"raws","spaces",d,"after")||$;(0,Tt.ensureObject)(a,"raws","spaces",d),a.raws.spaces[d].after=B+y}else{var Z=a[d]||"",ee=(0,Tt.getProp)(a,"raws",d)||Z;(0,Tt.ensureObject)(a,"raws"),a.raws[d]=ee+y}else p=p+y;break;default:return this.error('Unexpected "'+y+'" found.',{index:h[oe.FIELDS.START_POS]})}u++}_c(a,"attribute"),_c(a,"namespace"),this.newNode(new U2.default(a)),this.position++},e.parseWhitespaceEquivalentTokens=function(n){n<0&&(n=this.tokens.length);var i=this.position,s=[],a="",u=void 0;do if(Ow[this.currToken[oe.FIELDS.TYPE]])this.options.lossy||(a+=this.content());else if(this.currToken[oe.FIELDS.TYPE]===ye.comment){var c={};a&&(c.before=a,a=""),u=new V2.default({value:this.content(),source:yc(this.currToken),sourceIndex:this.currToken[oe.FIELDS.START_POS],spaces:c}),s.push(u)}while(++this.position<n);if(a){if(u)u.spaces.after=a;else if(!this.options.lossy){var p=this.tokens[i],d=this.tokens[this.position-1];s.push(new kw.default({value:"",source:Go(p[oe.FIELDS.START_LINE],p[oe.FIELDS.START_COL],d[oe.FIELDS.END_LINE],d[oe.FIELDS.END_COL]),sourceIndex:p[oe.FIELDS.START_POS],spaces:{before:a,after:""}}))}}return s},e.convertWhitespaceNodesToSpace=function(n,i){var s=this;i===void 0&&(i=!1);var a="",u="";n.forEach(function(p){var d=s.lossySpace(p.spaces.before,i),m=s.lossySpace(p.rawSpaceBefore,i);a+=d+s.lossySpace(p.spaces.after,i&&d.length===0),u+=d+p.value+s.lossySpace(p.rawSpaceAfter,i&&m.length===0)}),u===a&&(u=void 0);var c={space:a,rawSpace:u};return c},e.isNamedCombinator=function(n){return n===void 0&&(n=this.position),this.tokens[n+0]&&this.tokens[n+0][oe.FIELDS.TYPE]===ye.slash&&this.tokens[n+1]&&this.tokens[n+1][oe.FIELDS.TYPE]===ye.word&&this.tokens[n+2]&&this.tokens[n+2][oe.FIELDS.TYPE]===ye.slash},e.namedCombinator=function(){if(this.isNamedCombinator()){var n=this.content(this.tokens[this.position+1]),i=(0,Tt.unesc)(n).toLowerCase(),s={};i!==n&&(s.value="/"+n+"/");var a=new Aw.default({value:"/"+i+"/",source:Go(this.currToken[oe.FIELDS.START_LINE],this.currToken[oe.FIELDS.START_COL],this.tokens[this.position+2][oe.FIELDS.END_LINE],this.tokens[this.position+2][oe.FIELDS.END_COL]),sourceIndex:this.currToken[oe.FIELDS.START_POS],raws:s});return this.position=this.position+3,a}else this.unexpected()},e.combinator=function(){var n=this;if(this.content()==="|")return this.namespace();var i=this.locateNextMeaningfulToken(this.position);if(i<0||this.tokens[i][oe.FIELDS.TYPE]===ye.comma||this.tokens[i][oe.FIELDS.TYPE]===ye.closeParenthesis){var s=this.parseWhitespaceEquivalentTokens(i);if(s.length>0){var a=this.current.last;if(a){var u=this.convertWhitespaceNodesToSpace(s),c=u.space,p=u.rawSpace;p!==void 0&&(a.rawSpaceAfter+=p),a.spaces.after+=c}else s.forEach(function(L){return n.newNode(L)})}return}var d=this.currToken,m=void 0;i>this.position&&(m=this.parseWhitespaceEquivalentTokens(i));var h;if(this.isNamedCombinator()?h=this.namedCombinator():this.currToken[oe.FIELDS.TYPE]===ye.combinator?(h=new Aw.default({value:this.content(),source:yc(this.currToken),sourceIndex:this.currToken[oe.FIELDS.START_POS]}),this.position++):Ow[this.currToken[oe.FIELDS.TYPE]]||m||this.unexpected(),h){if(m){var y=this.convertWhitespaceNodesToSpace(m),w=y.space,x=y.rawSpace;h.spaces.before=w,h.rawSpaceBefore=x}}else{var k=this.convertWhitespaceNodesToSpace(m,!0),v=k.space,I=k.rawSpace;I||(I=v);var T={},S={spaces:{}};v.endsWith(" ")&&I.endsWith(" ")?(T.before=v.slice(0,v.length-1),S.spaces.before=I.slice(0,I.length-1)):v[0]===" "&&I[0]===" "?(T.after=v.slice(1),S.spaces.after=I.slice(1)):S.value=I,h=new Aw.default({value:" ",source:Tw(d,this.tokens[this.position-1]),sourceIndex:d[oe.FIELDS.START_POS],spaces:T,raws:S})}return this.currToken&&this.currToken[oe.FIELDS.TYPE]===ye.space&&(h.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(h)},e.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var n=new xw.default({source:{start:G2(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][oe.FIELDS.START_POS]});this.current.parent.append(n),this.current=n,this.position++},e.comment=function(){var n=this.currToken;this.newNode(new V2.default({value:this.content(),source:yc(n),sourceIndex:n[oe.FIELDS.START_POS]})),this.position++},e.error=function(n,i){throw this.root.error(n,i)},e.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[oe.FIELDS.START_POS]})},e.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[oe.FIELDS.START_POS])},e.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[oe.FIELDS.START_POS])},e.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[oe.FIELDS.START_POS])},e.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[oe.FIELDS.START_POS])},e.namespace=function(){var n=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[oe.FIELDS.TYPE]===ye.word)return this.position++,this.word(n);if(this.nextToken[oe.FIELDS.TYPE]===ye.asterisk)return this.position++,this.universal(n);this.unexpectedPipe()},e.nesting=function(){if(this.nextToken){var n=this.content(this.nextToken);if(n==="|"){this.position++;return}}var i=this.currToken;this.newNode(new Fee.default({value:this.content(),source:yc(i),sourceIndex:i[oe.FIELDS.START_POS]})),this.position++},e.parentheses=function(){var n=this.current.last,i=1;if(this.position++,n&&n.type===Bee.PSEUDO){var s=new xw.default({source:{start:G2(this.tokens[this.position])},sourceIndex:this.tokens[this.position][oe.FIELDS.START_POS]}),a=this.current;for(n.append(s),this.current=s;this.position<this.tokens.length&&i;)this.currToken[oe.FIELDS.TYPE]===ye.openParenthesis&&i++,this.currToken[oe.FIELDS.TYPE]===ye.closeParenthesis&&i--,i?this.parse():(this.current.source.end=H2(this.currToken),this.current.parent.source.end=H2(this.currToken),this.position++);this.current=a}else{for(var u=this.currToken,c="(",p;this.position<this.tokens.length&&i;)this.currToken[oe.FIELDS.TYPE]===ye.openParenthesis&&i++,this.currToken[oe.FIELDS.TYPE]===ye.closeParenthesis&&i--,p=this.currToken,c+=this.parseParenthesisToken(this.currToken),this.position++;n?n.appendToPropertyAndEscape("value",c,c):this.newNode(new kw.default({value:c,source:Go(u[oe.FIELDS.START_LINE],u[oe.FIELDS.START_COL],p[oe.FIELDS.END_LINE],p[oe.FIELDS.END_COL]),sourceIndex:u[oe.FIELDS.START_POS]}))}if(i)return this.expected("closing parenthesis",this.currToken[oe.FIELDS.START_POS])},e.pseudo=function(){for(var n=this,i="",s=this.currToken;this.currToken&&this.currToken[oe.FIELDS.TYPE]===ye.colon;)i+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[oe.FIELDS.TYPE]===ye.word)this.splitWord(!1,function(a,u){i+=a,n.newNode(new Mee.default({value:i,source:Tw(s,n.currToken),sourceIndex:s[oe.FIELDS.START_POS]})),u>1&&n.nextToken&&n.nextToken[oe.FIELDS.TYPE]===ye.openParenthesis&&n.error("Misplaced parenthesis.",{index:n.nextToken[oe.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[oe.FIELDS.START_POS])},e.space=function(){var n=this.content();this.position===0||this.prevToken[oe.FIELDS.TYPE]===ye.comma||this.prevToken[oe.FIELDS.TYPE]===ye.openParenthesis||this.current.nodes.every(function(i){return i.type==="comment"})?(this.spaces=this.optionalSpace(n),this.position++):this.position===this.tokens.length-1||this.nextToken[oe.FIELDS.TYPE]===ye.comma||this.nextToken[oe.FIELDS.TYPE]===ye.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(n),this.position++):this.combinator()},e.string=function(){var n=this.currToken;this.newNode(new kw.default({value:this.content(),source:yc(n),sourceIndex:n[oe.FIELDS.START_POS]})),this.position++},e.universal=function(n){var i=this.nextToken;if(i&&this.content(i)==="|")return this.position++,this.namespace();var s=this.currToken;this.newNode(new Dee.default({value:this.content(),source:yc(s),sourceIndex:s[oe.FIELDS.START_POS]}),n),this.position++},e.splitWord=function(n,i){for(var s=this,a=this.nextToken,u=this.content();a&&~[ye.dollar,ye.caret,ye.equals,ye.word].indexOf(a[oe.FIELDS.TYPE]);){this.position++;var c=this.content();if(u+=c,c.lastIndexOf("\\")===c.length-1){var p=this.nextToken;p&&p[oe.FIELDS.TYPE]===ye.space&&(u+=this.requiredSpace(this.content(p)),this.position++)}a=this.nextToken}var d=Ew(u,".").filter(function(w){var x=u[w-1]==="\\",k=/^\d+\.\d+%$/.test(u);return!x&&!k}),m=Ew(u,"#").filter(function(w){return u[w-1]!=="\\"}),h=Ew(u,"#{");h.length&&(m=m.filter(function(w){return!~h.indexOf(w)}));var y=(0,jee.default)(Uee([0].concat(d,m)));y.forEach(function(w,x){var k=y[x+1]||u.length,v=u.slice(w,k);if(x===0&&i)return i.call(s,v,y.length);var I,T=s.currToken,S=T[oe.FIELDS.START_POS]+y[x],L=Go(T[1],T[2]+w,T[3],T[2]+(k-1));if(~d.indexOf(w)){var R={value:v.slice(1),source:L,sourceIndex:S};I=new Cee.default(_c(R,"value"))}else if(~m.indexOf(w)){var M={value:v.slice(1),source:L,sourceIndex:S};I=new qee.default(_c(M,"value"))}else{var F={value:v,source:L,sourceIndex:S};_c(F,"value"),I=new Ree.default(F)}s.newNode(I,n),n=null}),this.position++},e.word=function(n){var i=this.nextToken;return i&&this.content(i)==="|"?(this.position++,this.namespace()):this.splitWord(n)},e.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},e.parse=function(n){switch(this.currToken[oe.FIELDS.TYPE]){case ye.space:this.space();break;case ye.comment:this.comment();break;case ye.openParenthesis:this.parentheses();break;case ye.closeParenthesis:n&&this.missingParenthesis();break;case ye.openSquare:this.attribute();break;case ye.dollar:case ye.caret:case ye.equals:case ye.word:this.word();break;case ye.colon:this.pseudo();break;case ye.comma:this.comma();break;case ye.asterisk:this.universal();break;case ye.ampersand:this.nesting();break;case ye.slash:case ye.combinator:this.combinator();break;case ye.str:this.string();break;case ye.closeSquare:this.missingSquareBracket();case ye.semicolon:this.missingBackslash();default:this.unexpected()}},e.expected=function(n,i,s){if(Array.isArray(n)){var a=n.pop();n=n.join(", ")+" or "+a}var u=/^[aeiou]/.test(n[0])?"an":"a";return s?this.error("Expected "+u+" "+n+', found "'+s+'" instead.',{index:i}):this.error("Expected "+u+" "+n+".",{index:i})},e.requiredSpace=function(n){return this.options.lossy?" ":n},e.optionalSpace=function(n){return this.options.lossy?"":n},e.lossySpace=function(n,i){return this.options.lossy?i?" ":"":n},e.parseParenthesisToken=function(n){var i=this.content(n);return n[oe.FIELDS.TYPE]===ye.space?this.requiredSpace(i):i},e.newNode=function(n,i){return i&&(/^ +$/.test(i)&&(this.options.lossy||(this.spaces=(this.spaces||"")+i),i=!0),n.namespace=i,_c(n,"namespace")),this.spaces&&(n.spaces.before=this.spaces,this.spaces=""),this.current.append(n)},e.content=function(n){return n===void 0&&(n=this.currToken),this.css.slice(n[oe.FIELDS.START_POS],n[oe.FIELDS.END_POS])},e.locateNextMeaningfulToken=function(n){n===void 0&&(n=this.position+1);for(var i=n;i<this.tokens.length;)if(Vee[this.tokens[i][oe.FIELDS.TYPE]]){i++;continue}else return i;return-1},$ee(t,[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}]),t})();Kf.default=Wee;J2.exports=Kf.default});var Y2=P((Qf,Q2)=>{"use strict";b();Qf.__esModule=!0;Qf.default=void 0;var Gee=Hee(K2());function Hee(t){return t&&t.__esModule?t:{default:t}}var zee=(function(){function t(r,n){this.func=r||function(){},this.funcRes=null,this.options=n}var e=t.prototype;return e._shouldUpdateSelector=function(n,i){i===void 0&&(i={});var s=Object.assign({},this.options,i);return s.updateSelector===!1?!1:typeof n!="string"},e._isLossy=function(n){n===void 0&&(n={});var i=Object.assign({},this.options,n);return i.lossless===!1},e._root=function(n,i){i===void 0&&(i={});var s=new Gee.default(n,this._parseOptions(i));return s.root},e._parseOptions=function(n){return{lossy:this._isLossy(n)}},e._run=function(n,i){var s=this;return i===void 0&&(i={}),new Promise(function(a,u){try{var c=s._root(n,i);Promise.resolve(s.func(c)).then(function(p){var d=void 0;return s._shouldUpdateSelector(n,i)&&(d=c.toString(),n.selector=d),{transform:p,root:c,string:d}}).then(a,u)}catch(p){u(p);return}})},e._runSync=function(n,i){i===void 0&&(i={});var s=this._root(n,i),a=this.func(s);if(a&&typeof a.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var u=void 0;return i.updateSelector&&typeof n!="string"&&(u=s.toString(),n.selector=u),{transform:a,root:s,string:u}},e.ast=function(n,i){return this._run(n,i).then(function(s){return s.root})},e.astSync=function(n,i){return this._runSync(n,i).root},e.transform=function(n,i){return this._run(n,i).then(function(s){return s.transform})},e.transformSync=function(n,i){return this._runSync(n,i).transform},e.process=function(n,i){return this._run(n,i).then(function(s){return s.string||s.root.toString()})},e.processSync=function(n,i){var s=this._runSync(n,i);return s.string||s.root.toString()},t})();Qf.default=zee;Q2.exports=Qf.default});var X2=P(wt=>{"use strict";b();wt.__esModule=!0;wt.universal=wt.tag=wt.string=wt.selector=wt.root=wt.pseudo=wt.nesting=wt.id=wt.comment=wt.combinator=wt.className=wt.attribute=void 0;var Jee=Si(dw()),Kee=Si(YS()),Qee=Si(_w()),Yee=Si(ZS()),Xee=Si(tw()),Zee=Si(bw()),ete=Si(uw()),tte=Si(HS()),rte=Si(JS()),nte=Si(aw()),ite=Si(iw()),ste=Si(gw());function Si(t){return t&&t.__esModule?t:{default:t}}var ate=function(e){return new Jee.default(e)};wt.attribute=ate;var ote=function(e){return new Kee.default(e)};wt.className=ote;var ute=function(e){return new Qee.default(e)};wt.combinator=ute;var cte=function(e){return new Yee.default(e)};wt.comment=cte;var lte=function(e){return new Xee.default(e)};wt.id=lte;var fte=function(e){return new Zee.default(e)};wt.nesting=fte;var pte=function(e){return new ete.default(e)};wt.pseudo=pte;var hte=function(e){return new tte.default(e)};wt.root=hte;var dte=function(e){return new rte.default(e)};wt.selector=dte;var mte=function(e){return new nte.default(e)};wt.string=mte;var gte=function(e){return new ite.default(e)};wt.tag=gte;var yte=function(e){return new ste.default(e)};wt.universal=yte});var rq=P(ut=>{"use strict";b();ut.__esModule=!0;ut.isComment=ut.isCombinator=ut.isClassName=ut.isAttribute=void 0;ut.isContainer=Ote;ut.isIdentifier=void 0;ut.isNamespace=Nte;ut.isNesting=void 0;ut.isNode=Nw;ut.isPseudo=void 0;ut.isPseudoClass=Ete;ut.isPseudoElement=tq;ut.isUniversal=ut.isTag=ut.isString=ut.isSelector=ut.isRoot=void 0;var Et=qr(),Ln,_te=(Ln={},Ln[Et.ATTRIBUTE]=!0,Ln[Et.CLASS]=!0,Ln[Et.COMBINATOR]=!0,Ln[Et.COMMENT]=!0,Ln[Et.ID]=!0,Ln[Et.NESTING]=!0,Ln[Et.PSEUDO]=!0,Ln[Et.ROOT]=!0,Ln[Et.SELECTOR]=!0,Ln[Et.STRING]=!0,Ln[Et.TAG]=!0,Ln[Et.UNIVERSAL]=!0,Ln);function Nw(t){return typeof t=="object"&&_te[t.type]}function wi(t,e){return Nw(e)&&e.type===t}var Z2=wi.bind(null,Et.ATTRIBUTE);ut.isAttribute=Z2;var vte=wi.bind(null,Et.CLASS);ut.isClassName=vte;var bte=wi.bind(null,Et.COMBINATOR);ut.isCombinator=bte;var Ste=wi.bind(null,Et.COMMENT);ut.isComment=Ste;var wte=wi.bind(null,Et.ID);ut.isIdentifier=wte;var xte=wi.bind(null,Et.NESTING);ut.isNesting=xte;var Lw=wi.bind(null,Et.PSEUDO);ut.isPseudo=Lw;var kte=wi.bind(null,Et.ROOT);ut.isRoot=kte;var Ate=wi.bind(null,Et.SELECTOR);ut.isSelector=Ate;var Ite=wi.bind(null,Et.STRING);ut.isString=Ite;var eq=wi.bind(null,Et.TAG);ut.isTag=eq;var Tte=wi.bind(null,Et.UNIVERSAL);ut.isUniversal=Tte;function tq(t){return Lw(t)&&t.value&&(t.value.startsWith("::")||t.value.toLowerCase()===":before"||t.value.toLowerCase()===":after"||t.value.toLowerCase()===":first-letter"||t.value.toLowerCase()===":first-line")}function Ete(t){return Lw(t)&&!tq(t)}function Ote(t){return!!(Nw(t)&&t.walk)}function Nte(t){return Z2(t)||eq(t)}});var nq=P(Hi=>{"use strict";b();Hi.__esModule=!0;var Pw=qr();Object.keys(Pw).forEach(function(t){t==="default"||t==="__esModule"||t in Hi&&Hi[t]===Pw[t]||(Hi[t]=Pw[t])});var Cw=X2();Object.keys(Cw).forEach(function(t){t==="default"||t==="__esModule"||t in Hi&&Hi[t]===Cw[t]||(Hi[t]=Cw[t])});var qw=rq();Object.keys(qw).forEach(function(t){t==="default"||t==="__esModule"||t in Hi&&Hi[t]===qw[t]||(Hi[t]=qw[t])})});var aq=P((Yf,sq)=>{"use strict";b();Yf.__esModule=!0;Yf.default=void 0;var Lte=qte(Y2()),Pte=Cte(nq());function iq(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(iq=function(i){return i?r:e})(t)}function Cte(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=iq(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=i?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(n,s,a):n[s]=t[s]}return n.default=t,r&&r.set(t,n),n}function qte(t){return t&&t.__esModule?t:{default:t}}var Rw=function(e){return new Lte.default(e)};Object.assign(Rw,Pte);delete Rw.__esModule;var Rte=Rw;Yf.default=Rte;sq.exports=Yf.default});var Zf=P((Xf,Mw)=>{b();(function(t,e){if(typeof Xf=="object"&&typeof Mw=="object")Mw.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var r=e();for(var n in r)(typeof Xf=="object"?Xf:t)[n]=r[n]}})(Xf,(()=>(()=>{"use strict";var t={975:i=>{function s(c){if(typeof c!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(c))}function a(c,p){for(var d,m="",h=0,y=-1,w=0,x=0;x<=c.length;++x){if(x<c.length)d=c.charCodeAt(x);else{if(d===47)break;d=47}if(d===47){if(!(y===x-1||w===1))if(y!==x-1&&w===2){if(m.length<2||h!==2||m.charCodeAt(m.length-1)!==46||m.charCodeAt(m.length-2)!==46){if(m.length>2){var k=m.lastIndexOf("/");if(k!==m.length-1){k===-1?(m="",h=0):h=(m=m.slice(0,k)).length-1-m.lastIndexOf("/"),y=x,w=0;continue}}else if(m.length===2||m.length===1){m="",h=0,y=x,w=0;continue}}p&&(m.length>0?m+="/..":m="..",h=2)}else m.length>0?m+="/"+c.slice(y+1,x):m=c.slice(y+1,x),h=x-y-1;y=x,w=0}else d===46&&w!==-1?++w:w=-1}return m}var u={resolve:function(){for(var c,p="",d=!1,m=arguments.length-1;m>=-1&&!d;m--){var h;m>=0?h=arguments[m]:(c===void 0&&(c=process.cwd()),h=c),s(h),h.length!==0&&(p=h+"/"+p,d=h.charCodeAt(0)===47)}return p=a(p,!d),d?p.length>0?"/"+p:"/":p.length>0?p:"."},normalize:function(c){if(s(c),c.length===0)return".";var p=c.charCodeAt(0)===47,d=c.charCodeAt(c.length-1)===47;return(c=a(c,!p)).length!==0||p||(c="."),c.length>0&&d&&(c+="/"),p?"/"+c:c},isAbsolute:function(c){return s(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,p=0;p<arguments.length;++p){var d=arguments[p];s(d),d.length>0&&(c===void 0?c=d:c+="/"+d)}return c===void 0?".":u.normalize(c)},relative:function(c,p){if(s(c),s(p),c===p||(c=u.resolve(c))===(p=u.resolve(p)))return"";for(var d=1;d<c.length&&c.charCodeAt(d)===47;++d);for(var m=c.length,h=m-d,y=1;y<p.length&&p.charCodeAt(y)===47;++y);for(var w=p.length-y,x=h<w?h:w,k=-1,v=0;v<=x;++v){if(v===x){if(w>x){if(p.charCodeAt(y+v)===47)return p.slice(y+v+1);if(v===0)return p.slice(y+v)}else h>x&&(c.charCodeAt(d+v)===47?k=v:v===0&&(k=0));break}var I=c.charCodeAt(d+v);if(I!==p.charCodeAt(y+v))break;I===47&&(k=v)}var T="";for(v=d+k+1;v<=m;++v)v!==m&&c.charCodeAt(v)!==47||(T.length===0?T+="..":T+="/..");return T.length>0?T+p.slice(y+k):(y+=k,p.charCodeAt(y)===47&&++y,p.slice(y))},_makeLong:function(c){return c},dirname:function(c){if(s(c),c.length===0)return".";for(var p=c.charCodeAt(0),d=p===47,m=-1,h=!0,y=c.length-1;y>=1;--y)if((p=c.charCodeAt(y))===47){if(!h){m=y;break}}else h=!1;return m===-1?d?"/":".":d&&m===1?"//":c.slice(0,m)},basename:function(c,p){if(p!==void 0&&typeof p!="string")throw new TypeError('"ext" argument must be a string');s(c);var d,m=0,h=-1,y=!0;if(p!==void 0&&p.length>0&&p.length<=c.length){if(p.length===c.length&&p===c)return"";var w=p.length-1,x=-1;for(d=c.length-1;d>=0;--d){var k=c.charCodeAt(d);if(k===47){if(!y){m=d+1;break}}else x===-1&&(y=!1,x=d+1),w>=0&&(k===p.charCodeAt(w)?--w==-1&&(h=d):(w=-1,h=x))}return m===h?h=x:h===-1&&(h=c.length),c.slice(m,h)}for(d=c.length-1;d>=0;--d)if(c.charCodeAt(d)===47){if(!y){m=d+1;break}}else h===-1&&(y=!1,h=d+1);return h===-1?"":c.slice(m,h)},extname:function(c){s(c);for(var p=-1,d=0,m=-1,h=!0,y=0,w=c.length-1;w>=0;--w){var x=c.charCodeAt(w);if(x!==47)m===-1&&(h=!1,m=w+1),x===46?p===-1?p=w:y!==1&&(y=1):p!==-1&&(y=-1);else if(!h){d=w+1;break}}return p===-1||m===-1||y===0||y===1&&p===m-1&&p===d+1?"":c.slice(p,m)},format:function(c){if(c===null||typeof c!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof c);return(function(p,d){var m=d.dir||d.root,h=d.base||(d.name||"")+(d.ext||"");return m?m===d.root?m+h:m+"/"+h:h})(0,c)},parse:function(c){s(c);var p={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return p;var d,m=c.charCodeAt(0),h=m===47;h?(p.root="/",d=1):d=0;for(var y=-1,w=0,x=-1,k=!0,v=c.length-1,I=0;v>=d;--v)if((m=c.charCodeAt(v))!==47)x===-1&&(k=!1,x=v+1),m===46?y===-1?y=v:I!==1&&(I=1):y!==-1&&(I=-1);else if(!k){w=v+1;break}return y===-1||x===-1||I===0||I===1&&y===x-1&&y===w+1?x!==-1&&(p.base=p.name=w===0&&h?c.slice(1,x):c.slice(w,x)):(w===0&&h?(p.name=c.slice(1,y),p.base=c.slice(1,x)):(p.name=c.slice(w,y),p.base=c.slice(w,x)),p.ext=c.slice(y,x)),w>0?p.dir=c.slice(0,w-1):h&&(p.dir="/"),p},sep:"/",delimiter:":",win32:null,posix:null};u.posix=u,i.exports=u},70:(i,s)=>{if(Object.defineProperty(s,"__esModule",{value:!0}),s.isWindows=void 0,typeof process=="object")s.isWindows=process.platform==="win32";else if(typeof navigator=="object"){let a=navigator.userAgent;s.isWindows=a.indexOf("Windows")>=0}},231:(i,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.uriToFsPath=s.URI=void 0;let u=a(70),c=/^\w[\w\d+.-]*$/,p=/^\//,d=/^\/\//;function m(H,$){if(!H.scheme&&$)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${H.authority}", path: "${H.path}", query: "${H.query}", fragment: "${H.fragment}"}`);if(H.scheme&&!c.test(H.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(H.path){if(H.authority){if(!p.test(H.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(d.test(H.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let h="",y="/",w=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class x{static isUri($){return $ instanceof x||!!$&&typeof $.authority=="string"&&typeof $.fragment=="string"&&typeof $.path=="string"&&typeof $.query=="string"&&typeof $.scheme=="string"&&typeof $.fsPath=="string"&&typeof $.with=="function"&&typeof $.toString=="function"}scheme;authority;path;query;fragment;constructor($,B,Z,ee,W,J=!1){typeof $=="object"?(this.scheme=$.scheme||h,this.authority=$.authority||h,this.path=$.path||h,this.query=$.query||h,this.fragment=$.fragment||h):(this.scheme=(function(te,ue){return te||ue?te:"file"})($,J),this.authority=B||h,this.path=(function(te,ue){switch(te){case"https":case"http":case"file":ue?ue[0]!==y&&(ue=y+ue):ue=y}return ue})(this.scheme,Z||h),this.query=ee||h,this.fragment=W||h,m(this,J))}get fsPath(){return L(this,!1)}with($){if(!$)return this;let{scheme:B,authority:Z,path:ee,query:W,fragment:J}=$;return B===void 0?B=this.scheme:B===null&&(B=h),Z===void 0?Z=this.authority:Z===null&&(Z=h),ee===void 0?ee=this.path:ee===null&&(ee=h),W===void 0?W=this.query:W===null&&(W=h),J===void 0?J=this.fragment:J===null&&(J=h),B===this.scheme&&Z===this.authority&&ee===this.path&&W===this.query&&J===this.fragment?this:new v(B,Z,ee,W,J)}static parse($,B=!1){let Z=w.exec($);return Z?new v(Z[2]||h,X(Z[4]||h),X(Z[5]||h),X(Z[7]||h),X(Z[9]||h),B):new v(h,h,h,h,h)}static file($){let B=h;if(u.isWindows&&($=$.replace(/\\/g,y)),$[0]===y&&$[1]===y){let Z=$.indexOf(y,2);Z===-1?(B=$.substring(2),$=y):(B=$.substring(2,Z),$=$.substring(Z)||y)}return new v("file",B,$,h,h)}static from($){let B=new v($.scheme,$.authority,$.path,$.query,$.fragment);return m(B,!0),B}toString($=!1){return R(this,$)}toJSON(){return this}static revive($){if($){if($ instanceof x)return $;{let B=new v($);return B._formatted=$.external,B._fsPath=$._sep===k?$.fsPath:null,B}}return $}}s.URI=x;let k=u.isWindows?1:void 0;class v extends x{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=L(this,!1)),this._fsPath}toString($=!1){return $?R(this,!0):(this._formatted||(this._formatted=R(this,!1)),this._formatted)}toJSON(){let $={$mid:1};return this._fsPath&&($.fsPath=this._fsPath,$._sep=k),this._formatted&&($.external=this._formatted),this.path&&($.path=this.path),this.scheme&&($.scheme=this.scheme),this.authority&&($.authority=this.authority),this.query&&($.query=this.query),this.fragment&&($.fragment=this.fragment),$}}let I={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function T(H,$,B){let Z,ee=-1;for(let W=0;W<H.length;W++){let J=H.charCodeAt(W);if(J>=97&&J<=122||J>=65&&J<=90||J>=48&&J<=57||J===45||J===46||J===95||J===126||$&&J===47||B&&J===91||B&&J===93||B&&J===58)ee!==-1&&(Z+=encodeURIComponent(H.substring(ee,W)),ee=-1),Z!==void 0&&(Z+=H.charAt(W));else{Z===void 0&&(Z=H.substr(0,W));let te=I[J];te!==void 0?(ee!==-1&&(Z+=encodeURIComponent(H.substring(ee,W)),ee=-1),Z+=te):ee===-1&&(ee=W)}}return ee!==-1&&(Z+=encodeURIComponent(H.substring(ee))),Z!==void 0?Z:H}function S(H){let $;for(let B=0;B<H.length;B++){let Z=H.charCodeAt(B);Z===35||Z===63?($===void 0&&($=H.substr(0,B)),$+=I[Z]):$!==void 0&&($+=H[B])}return $!==void 0?$:H}function L(H,$){let B;return B=H.authority&&H.path.length>1&&H.scheme==="file"?`//${H.authority}${H.path}`:H.path.charCodeAt(0)===47&&(H.path.charCodeAt(1)>=65&&H.path.charCodeAt(1)<=90||H.path.charCodeAt(1)>=97&&H.path.charCodeAt(1)<=122)&&H.path.charCodeAt(2)===58?$?H.path.substr(1):H.path[1].toLowerCase()+H.path.substr(2):H.path,u.isWindows&&(B=B.replace(/\//g,"\\")),B}function R(H,$){let B=$?S:T,Z="",{scheme:ee,authority:W,path:J,query:te,fragment:ue}=H;if(ee&&(Z+=ee,Z+=":"),(W||ee==="file")&&(Z+=y,Z+=y),W){let fe=W.indexOf("@");if(fe!==-1){let ce=W.substr(0,fe);W=W.substr(fe+1),fe=ce.lastIndexOf(":"),fe===-1?Z+=B(ce,!1,!1):(Z+=B(ce.substr(0,fe),!1,!1),Z+=":",Z+=B(ce.substr(fe+1),!1,!0)),Z+="@"}W=W.toLowerCase(),fe=W.lastIndexOf(":"),fe===-1?Z+=B(W,!1,!0):(Z+=B(W.substr(0,fe),!1,!0),Z+=W.substr(fe))}if(J){if(J.length>=3&&J.charCodeAt(0)===47&&J.charCodeAt(2)===58){let fe=J.charCodeAt(1);fe>=65&&fe<=90&&(J=`/${String.fromCharCode(fe+32)}:${J.substr(3)}`)}else if(J.length>=2&&J.charCodeAt(1)===58){let fe=J.charCodeAt(0);fe>=65&&fe<=90&&(J=`${String.fromCharCode(fe+32)}:${J.substr(2)}`)}Z+=B(J,!0,!1)}return te&&(Z+="?",Z+=B(te,!1,!1)),ue&&(Z+="#",Z+=$?ue:T(ue,!1,!1)),Z}function M(H){try{return decodeURIComponent(H)}catch{return H.length>3?H.substr(0,3)+M(H.substr(3)):H}}s.uriToFsPath=L;let F=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function X(H){return H.match(F)?H.replace(F,($=>M($))):H}},552:function(i,s,a){var u=this&&this.__createBinding||(Object.create?function(w,x,k,v){v===void 0&&(v=k);var I=Object.getOwnPropertyDescriptor(x,k);I&&!("get"in I?!x.__esModule:I.writable||I.configurable)||(I={enumerable:!0,get:function(){return x[k]}}),Object.defineProperty(w,v,I)}:function(w,x,k,v){v===void 0&&(v=k),w[v]=x[k]}),c=this&&this.__setModuleDefault||(Object.create?function(w,x){Object.defineProperty(w,"default",{enumerable:!0,value:x})}:function(w,x){w.default=x}),p=this&&this.__importStar||function(w){if(w&&w.__esModule)return w;var x={};if(w!=null)for(var k in w)k!=="default"&&Object.prototype.hasOwnProperty.call(w,k)&&u(x,w,k);return c(x,w),x};Object.defineProperty(s,"__esModule",{value:!0}),s.Utils=void 0;let d=p(a(975)),m=d.posix||d,h="/";var y;(function(w){w.joinPath=function(x,...k){return x.with({path:m.join(x.path,...k)})},w.resolvePath=function(x,...k){let v=x.path,I=!1;v[0]!==h&&(v=h+v,I=!0);let T=m.resolve(v,...k);return I&&T[0]===h&&!x.authority&&(T=T.substring(1)),x.with({path:T})},w.dirname=function(x){if(x.path.length===0||x.path===h)return x;let k=m.dirname(x.path);return k.length===1&&k.charCodeAt(0)===46&&(k=""),x.with({path:k})},w.basename=function(x){return m.basename(x.path)},w.extname=function(x){return m.extname(x.path)}})(y||(s.Utils=y={}))}},e={};function r(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return t[i].call(a.exports,a,a.exports,r),a.exports}var n={};return(()=>{var i=n;Object.defineProperty(i,"__esModule",{value:!0}),i.Utils=i.URI=void 0;let s=r(231);Object.defineProperty(i,"URI",{enumerable:!0,get:function(){return s.URI}});let a=r(552);Object.defineProperty(i,"Utils",{enumerable:!0,get:function(){return a.Utils}})})(),n})()))});var Dw=P(Zm=>{"use strict";b();Object.defineProperty(Zm,"__esModule",{value:!0});Zm.FileType=void 0;var oq;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(oq||(Zm.FileType=oq={}))});var Ho=P(Xn=>{"use strict";b();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.Utils=Xn.URI=void 0;Xn.relative=Mte;Xn.join=Dte;Xn.resolve=Fte;Xn.normalize=ep;Xn.dirname=jte;Xn.basename=Bte;Xn.fsPath=$te;var Ca=Zf();Object.defineProperty(Xn,"URI",{enumerable:!0,get:function(){return Ca.URI}});Object.defineProperty(Xn,"Utils",{enumerable:!0,get:function(){return Ca.Utils}});function Mte(t,e){return ep(t).replace(e,"").replace(/\\\\/g,"/").replace(/^\/+/,"")}function Dte(t,...e){return ep(Ca.Utils.joinPath(vc(t),...e))}function Fte(t,e){return ep(Ca.Utils.resolvePath(vc(t),e))}function ep(t){return vc(t).toString(!0).replace(/\\/g,"/")}function jte(t){return ep(Ca.Utils.dirname(vc(t)))}function Bte(t,e){let r=Ca.Utils.basename(vc(t));return e?r.replace(new RegExp(`${e.replace(/\./g,"\\.")}$`),""):r}function $te(t){return vc(t).fsPath}function vc(t){return Ca.URI.isUri(t)?t:Ca.URI.parse(t)}});var cq=P(uq=>{"use strict";b();Object.defineProperty(uq,"__esModule",{value:!0})});var lq=P(eg=>{"use strict";b();Object.defineProperty(eg,"__esModule",{value:!0});eg.SchemaProp=void 0;var Fw=class t{constructor(e){this.options=e}static string(e){return new t({type:"string",defaultValue:e})}static number(e){return new t({type:"number",defaultValue:e})}static boolean(e){return new t({type:"boolean",defaultValue:e})}static object(e,r){return new t({type:"object",defaultValue:r,properties:e})}static array(e,r){return new t({type:"array",defaultValue:r,itemType:e})}optional(){return this.options.optional=!0,this}defaultValue(){return this.options.defaultValue}};eg.SchemaProp=Fw});var pq=P(fq=>{"use strict";b();Object.defineProperty(fq,"__esModule",{value:!0})});var dq=P(hq=>{"use strict";b();Object.defineProperty(hq,"__esModule",{value:!0})});var mq=P(tg=>{"use strict";b();Object.defineProperty(tg,"__esModule",{value:!0});tg.Setting=void 0;var Vte=dq();Object.defineProperty(tg,"Setting",{enumerable:!0,get:function(){return Vte.Setting}})});var yq=P(Js=>{"use strict";b();var Ute=Js&&Js.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Wte=Js&&Js.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ute(e,t,r)};Object.defineProperty(Js,"__esModule",{value:!0});Js.ThemeSchemaType=void 0;Wte(mq(),Js);var gq;(function(t){t.AppBlock="app-block",t.Block="block",t.Section="section"})(gq||(Js.ThemeSchemaType=gq={}))});var de=P(ft=>{"use strict";b();var Gte=ft&&ft.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),rg=ft&&ft.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Gte(e,t,r)};Object.defineProperty(ft,"__esModule",{value:!0});ft.ConfigTarget=ft.Severity=ft.LiquidHtmlNodeTypes=ft.SourceCodeType=ft.Modes=ft.isLiteralNode=ft.isValueNode=ft.isPropertyNode=ft.isArrayNode=ft.isObjectNode=void 0;var Hte=Ge();Object.defineProperty(ft,"LiquidHtmlNodeTypes",{enumerable:!0,get:function(){return Hte.NodeTypes}});rg(cq(),ft);rg(lq(),ft);rg(pq(),ft);rg(yq(),ft);var zte=t=>t?.type==="Object";ft.isObjectNode=zte;var Jte=t=>t?.type==="Array";ft.isArrayNode=Jte;var Kte=t=>t?.type==="Property";ft.isPropertyNode=Kte;var Qte=t=>t?.type==="Value";ft.isValueNode=Qte;var Yte=t=>t?.type==="Literal";ft.isLiteralNode=Yte;ft.Modes=["theme","app"];var _q;(function(t){t.JSON="JSON",t.LiquidHtml="LiquidHtml"})(_q||(ft.SourceCodeType=_q={}));var vq;(function(t){t[t.ERROR=0]="ERROR",t[t.WARNING=1]="WARNING",t[t.INFO=2]="INFO"})(vq||(ft.Severity=vq={}));var bq;(function(t){t.All="all",t.Recommended="recommended",t.ThemeAppExtension="theme-app-extension"})(bq||(ft.ConfigTarget=bq={}))});var tp=P(At=>{"use strict";b();Object.defineProperty(At,"__esModule",{value:!0});At.makeGetMetafieldDefinitions=At.FETCHED_METAFIELD_CATEGORIES=At.makeGetDefaultSchemaTranslations=At.makeGetDefaultTranslations=At.makeGetDefaultSchemaLocale=At.makeGetDefaultLocale=At.makeGetDefaultSchemaLocaleFileUri=At.makeGetDefaultLocaleFileUri=At.makeFileSize=At.makeFileExists=void 0;At.recursiveReadDirectory=Oq;At.isDirectory=jw;var Sq=Zf(),wq=Dw(),Bw=Dt(),xq=Ho(),Xte=de(),kq=_t(),Zte=t=>async function(r){try{return await t.stat(r),!0}catch{return!1}};At.makeFileExists=Zte;var ere=t=>async function(r){try{return(await t.stat(r)).size}catch{return 0}};At.makeFileSize=ere;At.makeGetDefaultLocaleFileUri=Aq("default.json");At.makeGetDefaultSchemaLocaleFileUri=Aq(".default.schema.json");function Aq(t=".default.json"){return function(r){return n=>$w(r,n,t)}}At.makeGetDefaultLocale=Iq(".default.json");At.makeGetDefaultSchemaLocale=Iq(".default.schema.json");function Iq(t=".default.json"){return function(r,n){return Eq(()=>tre(r,n,t))}}At.makeGetDefaultTranslations=Tq(".default.json");At.makeGetDefaultSchemaTranslations=Tq(".default.schema.json");function Tq(t=".default.json"){return function(r,n,i){return Eq(()=>rre(r,n,i,t))}}async function $w(t,e,r=".default.json"){var n;return(n=(await t.readDirectory((0,xq.join)(e,"locales"))).find(([s])=>s.endsWith(r)))===null||n===void 0?void 0:n[0]}async function tre(t,e,r){try{let n=await $w(t,e,r);return n?Sq.Utils.basename(Sq.URI.parse(n)).split(".")[0]:"en"}catch(n){return console.error(n),"en"}}async function rre(t,e,r,n){try{let i=nre(e,n);if(i)return i;let s=await $w(t,r,n);if(!s)return{};let a=await t.readFile(s);return(0,Bw.parseJSON)(a,{})}catch(i){return console.error(i),{}}}function nre(t,e){let r=t.find(i=>i.type===Xte.SourceCodeType.JSON&&i.uri.match(/locales/)&&i.uri.endsWith(e));if(!r)return;let n=(0,Bw.parseJSON)(r.source);if(!(0,kq.isError)(n))return n}function Eq(t){let e;return async(...r)=>(e||(e=t(...r)),e)}async function Oq(t,e,r){let i=(await t.readDirectory(e)).filter(a=>!sre(a)&&(jw(a)||r(a)));return(await Promise.all(i.map(a=>jw(a)?Oq(t,a[0],r):Promise.resolve([a[0]])))).flat()}function jw([t,e]){return e===wq.FileType.Directory}var ire=[".git","node_modules","dist","build","tmp","vendor"];function sre([t,e]){return e===wq.FileType.Directory&&ire.some(r=>t.endsWith(r))}At.FETCHED_METAFIELD_CATEGORIES=["article","blog","collection","company","company_location","location","market","order","page","product","variant","shop"];var are=t=>async function(e){let r={article:[],blog:[],collection:[],company:[],company_location:[],location:[],market:[],order:[],page:[],product:[],variant:[],shop:[]};try{let n=await t.readFile((0,xq.join)(e,".shopify","metafields.json")),i=(0,Bw.parseJSON)(n);return(0,kq.isError)(i)?r:At.FETCHED_METAFIELD_CATEGORIES.reduce((s,a)=>{try{s[a]=i[a].map(u=>({key:u.key,name:u.name,namespace:u.namespace,description:u.description,type:{category:u.type.category,name:u.type.name}}))}catch{}return s},r)}catch{return r}};At.makeGetMetafieldDefinitions=are});var xt=P(Pn=>{"use strict";b();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.isNodeOfType=zo;Pn.isLiquidBranch=ore;Pn.isHtmlTag=ure;Pn.isAttr=cre;Pn.isHtmlAttribute=lre;Pn.isValuedHtmlAttribute=fre;Pn.valueIncludes=pre;Pn.hasAttributeValueOf=hre;Pn.isLiquidString=dre;Pn.isLoopScopedVariable=mre;Pn.isLoopLiquidTag=Nq;Pn.isWithinRawTagThatDoesNotParseItsContents=_re;var Yr=Ge();function zo(t,e){return e?.type===t}function ore(t){return zo(Yr.NodeTypes.LiquidBranch,t)}function ure(t,e){return t.name.length===1&&t.name[0].type===Yr.NodeTypes.TextNode&&t.name[0].value===e&&!!t.blockEndPosition}function cre(t,e){return t.name.length===1&&zo(Yr.NodeTypes.TextNode,t.name[0])&&t.name[0].value===e}function lre(t){return[Yr.NodeTypes.AttrUnquoted,Yr.NodeTypes.AttrDoubleQuoted,Yr.NodeTypes.AttrSingleQuoted,Yr.NodeTypes.AttrEmpty].some(e=>zo(e,t))}function fre(t){return[Yr.NodeTypes.AttrUnquoted,Yr.NodeTypes.AttrDoubleQuoted,Yr.NodeTypes.AttrSingleQuoted].some(e=>zo(e,t))}function pre(t,e){let r=new RegExp(`(^|\\s)${e}(\\s|$)`,"g");return t.value.filter(n=>zo(Yr.NodeTypes.TextNode,n)).some(n=>r.test(n.value))}function hre(t,e){return t.value.length===1&&zo(Yr.NodeTypes.TextNode,t.value[0])&&t.value[0].value===e}function dre(t){return t.type===Yr.NodeTypes.String}function mre(t,e){return e.some(r=>r.type===Yr.NodeTypes.LiquidTag&&Nq(r)&&typeof r.markup!="string"&&r.markup.variableName===t)}function Nq(t){return Yr.LoopNamedTags.includes(t.name)}var gre=["raw","stylesheet","javascript","schema"];function yre(t){return t.type===Yr.NodeTypes.LiquidRawTag&&gre.includes(t.name)}function _re(t){return t.some(yre)}});var qa=P(bc=>{"use strict";b();Object.defineProperty(bc,"__esModule",{value:!0});bc.visit=bre;bc.forEachChildNodes=ig;bc.findCurrentNode=Sre;bc.findJSONNode=kre;var ng=Ge();function vre(t){return t!==null&&typeof t=="object"&&typeof t.type=="string"}function bre(t,e){let r=[],n=[{node:t,lineage:[]}],i=(s,a)=>n.push({node:s,lineage:a});for(;n.length>0;){let{node:s,lineage:a}=n.pop(),u=e[s.type],c=u?u(s,a):void 0;Array.isArray(c)?r.push(...c):c!==void 0&&r.push(c),ig(s,a.concat(s),i)}return r}function ig(t,e,r){for(let n of Object.values(t))if(Array.isArray(n))for(let i=n.length-1;i>=0;i--)r(n[i],e);else vre(n)&&r(n,e)}function Sre(t,e){let r,n=t,i=[];for(;n!==r;)r=n,ig(n,i.concat(n),(s,a)=>{(xre(s)||wre(s,e)&&Lq(s)<=Lq(n))&&(n=s,i=a)});return[n,i]}function wre(t,e){switch(t.type){case ng.NodeTypes.String:case ng.NodeTypes.VariableLookup:case ng.NodeTypes.LogicalExpression:case ng.NodeTypes.Comparison:return t.position.start<=e&&e<=t.position.end;default:return t.position.start<e&&e<=t.position.end}}function Lq(t){return t.position.end-t.position.start}function xre(t){var e;return"blockEndPosition"in t?((e=t.blockEndPosition)===null||e===void 0?void 0:e.end)===-1:"children"in t?t.children.length>0:!1}function kre(t,e){let r,n=t,i=[],s=e;for(;n!==r;)r=n,ig(n,i.concat(n),(a,u)=>{a.loc.start.offset<=s&&s<a.loc.end.offset&&(n=a,i=u)});return[n,i]}});var sg=P(zi=>{"use strict";b();var Pq=zi&&zi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zi,"__esModule",{value:!0});zi.extractCSSClassNames=Vw;zi.extractCSSClassesFromLiquidUri=qq;zi.extractCSSClassesFromAssetUri=Rq;zi.extractCSSClassesFromAssets=Mq;zi.extractAllThemeCSSClasses=Ore;zi.collectUsedClasses=rp;zi.collectUsedClassesFromSvg=Lre;var Sc=Ge(),Are=Pq(t2()),Ire=Pq(aq()),Tre=tp(),Ere=xt(),Cq=qa();function Vw(t){let e=new Set;return(0,Are.default)(t).walkRules(n=>{try{(0,Ire.default)().astSync(n.selector).walk(s=>{s.type==="class"&&e.add(s.value)})}catch{}}),e}async function qq(t,e){let r=new Set;try{let n=await e.readFile(t),i=(0,Sc.toLiquidHtmlAST)(n);if(i instanceof Error)return r;let s=(0,Cq.visit)(i,{LiquidRawTag(a){if(a.name==="stylesheet")return a.body.value}});for(let a of s)for(let u of Vw(a))r.add(u)}catch{}return r}async function Rq(t,e){try{let r=await e.readFile(t);return Vw(r)}catch{return new Set}}async function Mq(t,e){let r=new Set;try{let n=e("assets"),s=(await t.readDirectory(n)).filter(([u])=>u.endsWith(".css")),a=await Promise.all(s.map(([u])=>Rq(u,t)));for(let u of a)for(let c of u)r.add(c)}catch{}return r}async function Ore(t,e){let r=new Set,n=await Mq(t,e);for(let i of n)r.add(i);try{let i=e(""),s=await(0,Tre.recursiveReadDirectory)(t,i,([u])=>u.endsWith(".liquid")),a=await Promise.all(s.map(u=>qq(u,t)));for(let u of a)for(let c of u)r.add(c)}catch{}return r}function Nre(t){return t.name.length===1&&t.name[0].type===Sc.NodeTypes.TextNode&&t.name[0].value.toLowerCase()==="class"}function rp(t,e){for(let r of t){if(!(0,Ere.isValuedHtmlAttribute)(r)||!Nre(r))continue;let n=r.value;for(let i=0;i<n.length;i++){let s=n[i];if(s.type!==Sc.NodeTypes.TextNode)continue;let a=s,u=a.value,c=a.position.start,p=i>0&&n[i-1].type!==Sc.NodeTypes.TextNode,d=i<n.length-1&&n[i+1].type!==Sc.NodeTypes.TextNode,m=[],h=/\S+/g,y;for(;(y=h.exec(u))!==null;)m.push({className:y[0],startIndex:c+y.index,endIndex:c+y.index+y[0].length});m.length!==0&&(p&&!/^\s/.test(u)&&m.shift(),d&&!/\s$/.test(u)&&m.pop(),e.push(...m))}}}function Lre(t,e,r,n){rp(t,n);try{let i=(0,Sc.toLiquidHtmlAST)(e);if(i instanceof Error)return;let s=[],a={HtmlElement(u){rp(u.attributes,s)},HtmlVoidElement(u){rp(u.attributes,s)},HtmlSelfClosingElement(u){rp(u.attributes,s)}};(0,Cq.visit)(i,a);for(let u of s)n.push({className:u.className,startIndex:u.startIndex+r,endIndex:u.endIndex+r})}catch{}}});var Uw=P(xi=>{"use strict";b();Object.defineProperty(xi,"__esModule",{value:!0});xi.location=xi.JSONCParseErrors=void 0;xi.toJSONNode=qre;var Pre=_t(),Cre=(ns(),Pb(Ku)),ag=class extends Error{constructor(e,r){super(e),this.errors=r}};xi.JSONCParseErrors=ag;function qre(t){let e=[],r=(0,Cre.parseTree)(t,e,{allowTrailingComma:!0,disallowComments:!1});if(e.length||r===void 0)throw new ag("Failed to parse JSONC",e);return og(r)}function og(t){switch(t.type){case"object":return Rre(t);case"property":return Dre(t);case"array":return Mre(t);case"boolean":case"null":case"number":case"string":return jre(t);default:(0,Pre.assertNever)(t.type)}}function Rre(t){var e;return{type:"Object",children:((e=t.children)!==null&&e!==void 0?e:[]).map(og),loc:(0,xi.location)(t.offset,t.offset+t.length)}}function Mre(t){return{type:"Array",children:t.children.map(og),loc:(0,xi.location)(t.offset,t.offset+t.length)}}function Dre(t){return{type:"Property",key:Fre(t.children[0]),value:og(t.children[1]),loc:(0,xi.location)(t.offset,t.offset+t.length)}}function Fre(t){return{type:"Identifier",value:t.value,raw:JSON.stringify(t.value),loc:(0,xi.location)(t.offset,t.offset+t.length)}}function jre(t){return{type:"Literal",value:t.value,raw:JSON.stringify(t.value),loc:(0,xi.location)(t.offset,t.offset+t.length)}}var Bre=(t,e)=>({start:Dq(t),end:Dq(e)});xi.location=Bre;var Dq=t=>({offset:t})});var ug=P(Ji=>{"use strict";b();var $re=Ji&&Ji.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Vre=Ji&&Ji.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ure=Ji&&Ji.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&$re(r,e,n[i]);return Vre(r,e),r}})();Object.defineProperty(Ji,"__esModule",{value:!0});Ji.toLiquidHTMLAST=$q;Ji.toJSONAST=Vq;Ji.toSourceCode=Hre;var Wre=Ge(),Gre=Uw(),Fq=Ure(Ho()),jq=de(),Bq=qd();function $q(t){try{return(0,Wre.toLiquidHtmlAST)(t)}catch(e){return(0,Bq.asError)(e)}}function Vq(t){try{return(0,Gre.toJSONNode)(t)}catch(e){return(0,Bq.asError)(e)}}function Hre(t,e,r){return t.endsWith(".liquid")?{uri:Fq.normalize(t),source:e,type:jq.SourceCodeType.LiquidHtml,ast:$q(e),version:r}:{uri:Fq.normalize(t),source:e,type:jq.SourceCodeType.JSON,ast:Vq(e),version:r}}});var hr=P(pr=>{"use strict";b();var zre=pr&&pr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Jre=pr&&pr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kre=pr&&pr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&zre(r,e,n[i]);return Jre(r,e),r}})();Object.defineProperty(pr,"__esModule",{value:!0});pr.toSchema=Qre;pr.isBlock=cg;pr.isSection=Gw;pr.isSnippet=Yre;pr.isBlockSchema=Xre;pr.isSectionSchema=Zre;pr.toBlockSchema=zq;pr.toSectionSchema=Jq;pr.toAppBlockSchema=Kq;pr.getSchema=ene;pr.getSchemaFromJSON=tne;var Ww=Ge(),Uq=Dt(),Jo=Kre(Ho()),Wq=ug(),wc=de(),Gq=qa();async function Qre(t,e,r,n,i=!0){if(r.type===wc.SourceCodeType.LiquidHtml)switch(!0){case(t==="app"&&cg(e)):return Kq(e,r.ast,i);case(t==="theme"&&cg(e)):return zq(e,r.ast,n,i);case(t==="theme"&&Gw(e)):return Jq(e,r.ast,n,i);default:return}}function cg(t){return Jo.dirname(t).endsWith("blocks")}function Gw(t){return Jo.dirname(t).endsWith("sections")}function Yre(t){return Jo.dirname(t).endsWith("snippets")}function Xre(t){return t?.type===wc.ThemeSchemaType.Block}function Zre(t){return t?.type===wc.ThemeSchemaType.Section}async function Hq(t,e,r,n){return n?e instanceof Error||await n(t,e.body.value)?r:new Error("Invalid schema"):new Error("No JSON validator provided")}async function zq(t,e,r,n){let i=Jo.basename(t,".liquid"),s=Hw(e),a=Qq(e),u=zw(s,n),c=Jw(s);return{type:wc.ThemeSchemaType.Block,validSchema:await Hq(t,s,u,r),offset:s instanceof Error?0:s.blockStartPosition.end,name:i,parsed:u,ast:c,value:s instanceof Error?"":s.body.value,staticBlockDefs:a}}async function Jq(t,e,r,n){let i=Jo.basename(t,".liquid"),s=Hw(e),a=Qq(e),u=zw(s,n),c=Jw(s);return{type:wc.ThemeSchemaType.Section,validSchema:await Hq(t,s,u,r),offset:s instanceof Error?0:s.blockStartPosition.end,name:i,parsed:u,ast:c,value:s instanceof Error?"":s.body.value,staticBlockDefs:a}}async function Kq(t,e,r){let n=Jo.basename(t,".liquid"),i=Hw(e),s=zw(i,r),a=Jw(i);return{type:wc.ThemeSchemaType.AppBlock,offset:i instanceof Error?0:i.blockStartPosition.end,name:n,parsed:s,ast:a,value:i instanceof Error?"":i.body.value}}function Hw(t){var e;return t instanceof Error?t:(e=(0,Gq.visit)(t,{LiquidRawTag(r){if(r.name==="schema")return r}})[0])!==null&&e!==void 0?e:new Error("No schema tag found")}function Qq(t){return t instanceof Error?[]:(0,Gq.visit)(t,{LiquidTag(e){if(e.name!==Ww.NamedTags.content_for||typeof e.markup=="string")return;let r=e.markup;if(r.contentForType.value!=="block")return;let n=r.args.find(s=>s.name==="type"),i=r.args.find(s=>s.name==="id");if(!(!n||!i)&&n.value.type===Ww.NodeTypes.String&&i.value.type===Ww.NodeTypes.String)return{type:n.value.value,id:i.value.value}}})}function ene(t){var e,r;let n=Jo.basename(t.file.uri,".liquid");switch(!0){case cg(t.file.uri):return(e=t.getBlockSchema)===null||e===void 0?void 0:e.call(t,n);case Gw(t.file.uri):return(r=t.getSectionSchema)===null||r===void 0?void 0:r.call(t,n);default:return}}async function tne(t){let e=t.file.source,r=(0,Uq.parseJSON)(e),n=(0,Wq.toJSONAST)(e);return{parsed:r,ast:n}}function zw(t,e){return t instanceof Error?t:(0,Uq.parseJSON)(t.body.value,void 0,e)}function Jw(t){return t instanceof Error?t:(0,Wq.toJSONAST)(t.body.value)}});var lg=P(np=>{"use strict";b();Object.defineProperty(np,"__esModule",{value:!0});np.getAncestorUris=rne;np.getAllSnippetDescendantUris=nne;np.getRenderedSnippetUris=ine;var Yq=hr();async function rne(t,e){let r=[],n=new Set,i=[t];for(;i.length>0;){let s=i.shift();if(n.has(s))continue;n.add(s);let a=await e(s);for(let u of a)u.type==="direct"&&!n.has(u.source.uri)&&(r.push(u.source.uri),i.push(u.source.uri))}return r}async function nne(t,e){let r=[],n=new Set,i=[...t];for(;i.length>0;){let s=i.shift();if(n.has(s))continue;n.add(s),r.push(s);let a=await e(s);for(let u of a)u.type==="direct"&&(0,Yq.isSnippet)(u.target.uri)&&!n.has(u.target.uri)&&i.push(u.target.uri)}return r}async function ine(t,e){return(await e(t)).filter(n=>n.type==="direct"&&(0,Yq.isSnippet)(n.target.uri)).map(n=>n.target.uri)}});var _t=P(Xr=>{"use strict";b();var sne=Xr&&Xr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),cs=Xr&&Xr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&sne(e,t,r)};Object.defineProperty(Xr,"__esModule",{value:!0});cs(qb(),Xr);cs($O(),Xr);cs(HO(),Xr);cs(qd(),Xr);cs(Fb(),Xr);cs(Bb(),Xr);cs(Vb(),Xr);cs(pN(),Xr);cs(sg(),Xr);cs(lg(),Xr)});var Qw=P(fg=>{"use strict";b();Object.defineProperty(fg,"__esModule",{value:!0});fg.AugmentedThemeDocset=void 0;var ip=_t(),Xq=t=>({name:t}),ane=[["camelcase","camelize"],["handle","handleize"],["t","translate"]],one=t=>([e,r])=>{let n=t.find(i=>i.name===r);return n?{...n,name:e}:Xq(e)},une=["_online_store_editor_live_setting","addresses_url","app_block_path?","app_block_path_for","app_extension_path?","app_snippet_path?","cancel_customer_order_link","debug","delete_customer_address_link","dev_shop?","distance_from","edit_customer_address_link","encode_url_component","excerpt","format_code","global_block_type?","h","handle_from","installments_pricing","link_to_theme","login_button","login_url","logout_url","pad_spaces","paragraphize","recover_password_link","recover_url","register_url","registration_uuid_from","root_account_url","sentence","theme_url","unit","weight"],cne=["locale","direction","skip_to_content_link","checkout_html_classes","checkout_stylesheets","checkout_scripts","content_for_logo","breadcrumb","order_summary_toggle","content_for_order_summary","alternative_payment_methods","content_for_footer","tracking_code"],Zq=(t,e,r)=>({name:t,...e&&{access:e},...r&&{return_type:r}}),lne=["customer_address","product_variant"],fne=cne.map(t=>Zq(t,{global:!1,parents:[],template:[]},[{type:"string",name:""}])),pne=t=>({name:t}),hne=["elsif","ifchanged","when","schema"],Kw=class{constructor(e){this.themeDocset=e,this.isAugmented=!0,this.filters=(0,ip.memo)(async()=>{let r=await this.themeDocset.filters();return[...r,...ane.map(one(r)),...une.map(Xq)]}),this.objects=(0,ip.memo)(async()=>[...await this.themeDocset.objects(),...lne.map(r=>Zq(r)),...fne]),this.liquidDrops=(0,ip.memo)(async()=>(await this.themeDocset.objects()).filter(r=>r.access?r.deprecated?!1:!r.access.global||r.access.global&&r.access.parents.length>0:!0)),this.tags=(0,ip.memo)(async()=>[...await this.themeDocset.tags(),...hne.map(pne)]),this.systemTranslations=(0,ip.memo)(async()=>this.themeDocset.systemTranslations())}};fg.AugmentedThemeDocset=Kw});function Ko(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let r,n;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(r=0;r<t.length;r++)if(!Ko(t[r],e[r]))return!1}else{let i=[];for(n in t)i.push(n);i.sort();let s=[];for(n in e)s.push(n);if(s.sort(),!Ko(i,s))return!1;for(r=0;r<i.length;r++)if(!Ko(t[i[r]],e[i[r]]))return!1}return!0}function Rr(t){return typeof t=="number"}function Zn(t){return typeof t<"u"}function ki(t){return typeof t=="boolean"}function pg(t){return typeof t=="string"}function ls(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var sp=at(()=>{b()});function dne(t,e){if(t.length<e.length)return!1;for(let r=0;r<e.length;r++)if(t[r]!==e[r])return!1;return!0}function Ra(t,e){let r=t.length-e.length;return r>0?t.lastIndexOf(e)===r:r===0?t===e:!1}function Qo(t){let e="";dne(t,"(?i)")&&(t=t.substring(4),e="i");try{return new RegExp(t,e+"u")}catch{try{return new RegExp(t,e)}catch{return}}}function Yw(t){let e=0;for(let r=0;r<t.length;r++){e++;let n=t.charCodeAt(r);55296<=n&&n<=56319&&r++}return e}var ap=at(()=>{b()});var hg,Xw,tR,dg,bt,Ee,Ks,rR,op,mg,gg,Ma,yg,Zw,Mr,nR,iR,ei,Da,Zr,ex,xc,sR,up,tx,rx,nx,cp,aR,_g,ix,oR,fs,Yo,Dr,Ct,vg,uR,cR,lR,kc,bg,Ac,Sg,fR,pR,wg,xg,ti,hR,kg,dR,Ag,Ig,Tg,Eg,Og,mR,gR,Ng,Xo,yR,_R,vR,bR,SR,wR,xR,sx,ax,kR,AR,IR,TR,ER,OR,NR,LR,PR,ox,K,ux=at(()=>{"use strict";b();(function(t){function e(r){return typeof r=="string"}t.is=e})(hg||(hg={}));(function(t){function e(r){return typeof r=="string"}t.is=e})(Xw||(Xw={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(tR||(tR={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(dg||(dg={}));(function(t){function e(n,i){return n===Number.MAX_VALUE&&(n=dg.MAX_VALUE),i===Number.MAX_VALUE&&(i=dg.MAX_VALUE),{line:n,character:i}}t.create=e;function r(n){let i=n;return K.objectLiteral(i)&&K.uinteger(i.line)&&K.uinteger(i.character)}t.is=r})(bt||(bt={}));(function(t){function e(n,i,s,a){if(K.uinteger(n)&&K.uinteger(i)&&K.uinteger(s)&&K.uinteger(a))return{start:bt.create(n,i),end:bt.create(s,a)};if(bt.is(n)&&bt.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${s}, ${a}]`)}t.create=e;function r(n){let i=n;return K.objectLiteral(i)&&bt.is(i.start)&&bt.is(i.end)}t.is=r})(Ee||(Ee={}));(function(t){function e(n,i){return{uri:n,range:i}}t.create=e;function r(n){let i=n;return K.objectLiteral(i)&&Ee.is(i.range)&&(K.string(i.uri)||K.undefined(i.uri))}t.is=r})(Ks||(Ks={}));(function(t){function e(n,i,s,a){return{targetUri:n,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function r(n){let i=n;return K.objectLiteral(i)&&Ee.is(i.targetRange)&&K.string(i.targetUri)&&Ee.is(i.targetSelectionRange)&&(Ee.is(i.originSelectionRange)||K.undefined(i.originSelectionRange))}t.is=r})(rR||(rR={}));(function(t){function e(n,i,s,a){return{red:n,green:i,blue:s,alpha:a}}t.create=e;function r(n){let i=n;return K.objectLiteral(i)&&K.numberRange(i.red,0,1)&&K.numberRange(i.green,0,1)&&K.numberRange(i.blue,0,1)&&K.numberRange(i.alpha,0,1)}t.is=r})(op||(op={}));(function(t){function e(n,i){return{range:n,color:i}}t.create=e;function r(n){let i=n;return K.objectLiteral(i)&&Ee.is(i.range)&&op.is(i.color)}t.is=r})(mg||(mg={}));(function(t){function e(n,i,s){return{label:n,textEdit:i,additionalTextEdits:s}}t.create=e;function r(n){let i=n;return K.objectLiteral(i)&&K.string(i.label)&&(K.undefined(i.textEdit)||Zr.is(i))&&(K.undefined(i.additionalTextEdits)||K.typedArray(i.additionalTextEdits,Zr.is))}t.is=r})(gg||(gg={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Ma||(Ma={}));(function(t){function e(n,i,s,a,u,c){let p={startLine:n,endLine:i};return K.defined(s)&&(p.startCharacter=s),K.defined(a)&&(p.endCharacter=a),K.defined(u)&&(p.kind=u),K.defined(c)&&(p.collapsedText=c),p}t.create=e;function r(n){let i=n;return K.objectLiteral(i)&&K.uinteger(i.startLine)&&K.uinteger(i.startLine)&&(K.undefined(i.startCharacter)||K.uinteger(i.startCharacter))&&(K.undefined(i.endCharacter)||K.uinteger(i.endCharacter))&&(K.undefined(i.kind)||K.string(i.kind))}t.is=r})(yg||(yg={}));(function(t){function e(n,i){return{location:n,message:i}}t.create=e;function r(n){let i=n;return K.defined(i)&&Ks.is(i.location)&&K.string(i.message)}t.is=r})(Zw||(Zw={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Mr||(Mr={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(nR||(nR={}));(function(t){function e(r){let n=r;return K.objectLiteral(n)&&K.string(n.href)}t.is=e})(iR||(iR={}));(function(t){function e(n,i,s,a,u,c){let p={range:n,message:i};return K.defined(s)&&(p.severity=s),K.defined(a)&&(p.code=a),K.defined(u)&&(p.source=u),K.defined(c)&&(p.relatedInformation=c),p}t.create=e;function r(n){var i;let s=n;return K.defined(s)&&Ee.is(s.range)&&K.string(s.message)&&(K.number(s.severity)||K.undefined(s.severity))&&(K.integer(s.code)||K.string(s.code)||K.undefined(s.code))&&(K.undefined(s.codeDescription)||K.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(K.string(s.source)||K.undefined(s.source))&&(K.undefined(s.relatedInformation)||K.typedArray(s.relatedInformation,Zw.is))}t.is=r})(ei||(ei={}));(function(t){function e(n,i,...s){let a={title:n,command:i};return K.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function r(n){let i=n;return K.defined(i)&&K.string(i.title)&&K.string(i.command)}t.is=r})(Da||(Da={}));(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function r(s,a){return{range:{start:s,end:s},newText:a}}t.insert=r;function n(s){return{range:s,newText:""}}t.del=n;function i(s){let a=s;return K.objectLiteral(a)&&K.string(a.newText)&&Ee.is(a.range)}t.is=i})(Zr||(Zr={}));(function(t){function e(n,i,s){let a={label:n};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}t.create=e;function r(n){let i=n;return K.objectLiteral(i)&&K.string(i.label)&&(K.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(K.string(i.description)||i.description===void 0)}t.is=r})(ex||(ex={}));(function(t){function e(r){let n=r;return K.string(n)}t.is=e})(xc||(xc={}));(function(t){function e(s,a,u){return{range:s,newText:a,annotationId:u}}t.replace=e;function r(s,a,u){return{range:{start:s,end:s},newText:a,annotationId:u}}t.insert=r;function n(s,a){return{range:s,newText:"",annotationId:a}}t.del=n;function i(s){let a=s;return Zr.is(a)&&(ex.is(a.annotationId)||xc.is(a.annotationId))}t.is=i})(sR||(sR={}));(function(t){function e(n,i){return{textDocument:n,edits:i}}t.create=e;function r(n){let i=n;return K.defined(i)&&ix.is(i.textDocument)&&Array.isArray(i.edits)}t.is=r})(up||(up={}));(function(t){function e(n,i,s){let a={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function r(n){let i=n;return i&&i.kind==="create"&&K.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||K.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||K.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xc.is(i.annotationId))}t.is=r})(tx||(tx={}));(function(t){function e(n,i,s,a){let u={kind:"rename",oldUri:n,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(u.options=s),a!==void 0&&(u.annotationId=a),u}t.create=e;function r(n){let i=n;return i&&i.kind==="rename"&&K.string(i.oldUri)&&K.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||K.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||K.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xc.is(i.annotationId))}t.is=r})(rx||(rx={}));(function(t){function e(n,i,s){let a={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function r(n){let i=n;return i&&i.kind==="delete"&&K.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||K.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||K.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||xc.is(i.annotationId))}t.is=r})(nx||(nx={}));(function(t){function e(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>K.string(i.kind)?tx.is(i)||rx.is(i)||nx.is(i):up.is(i)))}t.is=e})(cp||(cp={}));(function(t){function e(n){return{uri:n}}t.create=e;function r(n){let i=n;return K.defined(i)&&K.string(i.uri)}t.is=r})(aR||(aR={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return K.defined(i)&&K.string(i.uri)&&K.integer(i.version)}t.is=r})(_g||(_g={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return K.defined(i)&&K.string(i.uri)&&(i.version===null||K.integer(i.version))}t.is=r})(ix||(ix={}));(function(t){function e(n,i,s,a){return{uri:n,languageId:i,version:s,text:a}}t.create=e;function r(n){let i=n;return K.defined(i)&&K.string(i.uri)&&K.string(i.languageId)&&K.integer(i.version)&&K.string(i.text)}t.is=r})(oR||(oR={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown}t.is=e})(fs||(fs={}));(function(t){function e(r){let n=r;return K.objectLiteral(r)&&fs.is(n.kind)&&K.string(n.value)}t.is=e})(Yo||(Yo={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Dr||(Dr={}));(function(t){t.PlainText=1,t.Snippet=2})(Ct||(Ct={}));(function(t){t.Deprecated=1})(vg||(vg={}));(function(t){function e(n,i,s){return{newText:n,insert:i,replace:s}}t.create=e;function r(n){let i=n;return i&&K.string(i.newText)&&Ee.is(i.insert)&&Ee.is(i.replace)}t.is=r})(uR||(uR={}));(function(t){t.asIs=1,t.adjustIndentation=2})(cR||(cR={}));(function(t){function e(r){let n=r;return n&&(K.string(n.detail)||n.detail===void 0)&&(K.string(n.description)||n.description===void 0)}t.is=e})(lR||(lR={}));(function(t){function e(r){return{label:r}}t.create=e})(kc||(kc={}));(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n}}t.create=e})(bg||(bg={}));(function(t){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function r(n){let i=n;return K.string(i)||K.objectLiteral(i)&&K.string(i.language)&&K.string(i.value)}t.is=r})(Ac||(Ac={}));(function(t){function e(r){let n=r;return!!n&&K.objectLiteral(n)&&(Yo.is(n.contents)||Ac.is(n.contents)||K.typedArray(n.contents,Ac.is))&&(r.range===void 0||Ee.is(r.range))}t.is=e})(Sg||(Sg={}));(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r}}t.create=e})(fR||(fR={}));(function(t){function e(r,n,...i){let s={label:r};return K.defined(n)&&(s.documentation=n),K.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})(pR||(pR={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(wg||(wg={}));(function(t){function e(r,n){let i={range:r};return K.number(n)&&(i.kind=n),i}t.create=e})(xg||(xg={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(ti||(ti={}));(function(t){t.Deprecated=1})(hR||(hR={}));(function(t){function e(r,n,i,s,a){let u={name:r,kind:n,location:{uri:s,range:i}};return a&&(u.containerName=a),u}t.create=e})(kg||(kg={}));(function(t){function e(r,n,i,s){return s!==void 0?{name:r,kind:n,location:{uri:i,range:s}}:{name:r,kind:n,location:{uri:i}}}t.create=e})(dR||(dR={}));(function(t){function e(n,i,s,a,u,c){let p={name:n,detail:i,kind:s,range:a,selectionRange:u};return c!==void 0&&(p.children=c),p}t.create=e;function r(n){let i=n;return i&&K.string(i.name)&&K.number(i.kind)&&Ee.is(i.range)&&Ee.is(i.selectionRange)&&(i.detail===void 0||K.string(i.detail))&&(i.deprecated===void 0||K.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=r})(Ag||(Ag={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Ig||(Ig={}));(function(t){t.Invoked=1,t.Automatic=2})(Tg||(Tg={}));(function(t){function e(n,i,s){let a={diagnostics:n};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}t.create=e;function r(n){let i=n;return K.defined(i)&&K.typedArray(i.diagnostics,ei.is)&&(i.only===void 0||K.typedArray(i.only,K.string))&&(i.triggerKind===void 0||i.triggerKind===Tg.Invoked||i.triggerKind===Tg.Automatic)}t.is=r})(Eg||(Eg={}));(function(t){function e(n,i,s){let a={title:n},u=!0;return typeof i=="string"?(u=!1,a.kind=i):Da.is(i)?a.command=i:a.edit=i,u&&s!==void 0&&(a.kind=s),a}t.create=e;function r(n){let i=n;return i&&K.string(i.title)&&(i.diagnostics===void 0||K.typedArray(i.diagnostics,ei.is))&&(i.kind===void 0||K.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Da.is(i.command))&&(i.isPreferred===void 0||K.boolean(i.isPreferred))&&(i.edit===void 0||cp.is(i.edit))}t.is=r})(Og||(Og={}));(function(t){function e(n,i){let s={range:n};return K.defined(i)&&(s.data=i),s}t.create=e;function r(n){let i=n;return K.defined(i)&&Ee.is(i.range)&&(K.undefined(i.command)||Da.is(i.command))}t.is=r})(mR||(mR={}));(function(t){function e(n,i){return{tabSize:n,insertSpaces:i}}t.create=e;function r(n){let i=n;return K.defined(i)&&K.uinteger(i.tabSize)&&K.boolean(i.insertSpaces)}t.is=r})(gR||(gR={}));(function(t){function e(n,i,s){return{range:n,target:i,data:s}}t.create=e;function r(n){let i=n;return K.defined(i)&&Ee.is(i.range)&&(K.undefined(i.target)||K.string(i.target))}t.is=r})(Ng||(Ng={}));(function(t){function e(n,i){return{range:n,parent:i}}t.create=e;function r(n){let i=n;return K.objectLiteral(i)&&Ee.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=r})(Xo||(Xo={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(yR||(yR={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(_R||(_R={}));(function(t){function e(r){let n=r;return K.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}t.is=e})(vR||(vR={}));(function(t){function e(n,i){return{range:n,text:i}}t.create=e;function r(n){let i=n;return i!=null&&Ee.is(i.range)&&K.string(i.text)}t.is=r})(bR||(bR={}));(function(t){function e(n,i,s){return{range:n,variableName:i,caseSensitiveLookup:s}}t.create=e;function r(n){let i=n;return i!=null&&Ee.is(i.range)&&K.boolean(i.caseSensitiveLookup)&&(K.string(i.variableName)||i.variableName===void 0)}t.is=r})(SR||(SR={}));(function(t){function e(n,i){return{range:n,expression:i}}t.create=e;function r(n){let i=n;return i!=null&&Ee.is(i.range)&&(K.string(i.expression)||i.expression===void 0)}t.is=r})(wR||(wR={}));(function(t){function e(n,i){return{frameId:n,stoppedLocation:i}}t.create=e;function r(n){let i=n;return K.defined(i)&&Ee.is(n.stoppedLocation)}t.is=r})(xR||(xR={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}t.is=e})(sx||(sx={}));(function(t){function e(n){return{value:n}}t.create=e;function r(n){let i=n;return K.objectLiteral(i)&&(i.tooltip===void 0||K.string(i.tooltip)||Yo.is(i.tooltip))&&(i.location===void 0||Ks.is(i.location))&&(i.command===void 0||Da.is(i.command))}t.is=r})(ax||(ax={}));(function(t){function e(n,i,s){let a={position:n,label:i};return s!==void 0&&(a.kind=s),a}t.create=e;function r(n){let i=n;return K.objectLiteral(i)&&bt.is(i.position)&&(K.string(i.label)||K.typedArray(i.label,ax.is))&&(i.kind===void 0||sx.is(i.kind))&&i.textEdits===void 0||K.typedArray(i.textEdits,Zr.is)&&(i.tooltip===void 0||K.string(i.tooltip)||Yo.is(i.tooltip))&&(i.paddingLeft===void 0||K.boolean(i.paddingLeft))&&(i.paddingRight===void 0||K.boolean(i.paddingRight))}t.is=r})(kR||(kR={}));(function(t){function e(r){return{kind:"snippet",value:r}}t.createSnippet=e})(AR||(AR={}));(function(t){function e(r,n,i,s){return{insertText:r,filterText:n,range:i,command:s}}t.create=e})(IR||(IR={}));(function(t){function e(r){return{items:r}}t.create=e})(TR||(TR={}));(function(t){t.Invoked=0,t.Automatic=1})(ER||(ER={}));(function(t){function e(r,n){return{range:r,text:n}}t.create=e})(OR||(OR={}));(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n}}t.create=e})(NR||(NR={}));(function(t){function e(r){let n=r;return K.objectLiteral(n)&&Xw.is(n.uri)&&K.string(n.name)}t.is=e})(LR||(LR={}));(function(t){function e(s,a,u,c){return new ox(s,a,u,c)}t.create=e;function r(s){let a=s;return!!(K.defined(a)&&K.string(a.uri)&&(K.undefined(a.languageId)||K.string(a.languageId))&&K.uinteger(a.lineCount)&&K.func(a.getText)&&K.func(a.positionAt)&&K.func(a.offsetAt))}t.is=r;function n(s,a){let u=s.getText(),c=i(a,(d,m)=>{let h=d.range.start.line-m.range.start.line;return h===0?d.range.start.character-m.range.start.character:h}),p=u.length;for(let d=c.length-1;d>=0;d--){let m=c[d],h=s.offsetAt(m.range.start),y=s.offsetAt(m.range.end);if(y<=p)u=u.substring(0,h)+m.newText+u.substring(y,u.length);else throw new Error("Overlapping edit");p=h}return u}t.applyEdits=n;function i(s,a){if(s.length<=1)return s;let u=s.length/2|0,c=s.slice(0,u),p=s.slice(u);i(c,a),i(p,a);let d=0,m=0,h=0;for(;d<c.length&&m<p.length;)a(c[d],p[m])<=0?s[h++]=c[d++]:s[h++]=p[m++];for(;d<c.length;)s[h++]=c[d++];for(;m<p.length;)s[h++]=p[m++];return s}})(PR||(PR={}));ox=class{constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,n=!0;for(let i=0;i<r.length;i++){n&&(e.push(i),n=!1);let s=r.charAt(i);n=s==="\r"||s===`
1180
+ `,s==="\r"&&i+1<r.length&&r.charAt(i+1)===`
1181
+ `&&i++}n&&r.length>0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return bt.create(0,e);for(;n<i;){let a=Math.floor((n+i)/2);r[a]>e?i=a:n=a+1}let s=n-1;return bt.create(s,e-r[s])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line],i=e.line+1<r.length?r[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)}get lineCount(){return this.getLineOffsets().length}};(function(t){let e=Object.prototype.toString;function r(y){return typeof y<"u"}t.defined=r;function n(y){return typeof y>"u"}t.undefined=n;function i(y){return y===!0||y===!1}t.boolean=i;function s(y){return e.call(y)==="[object String]"}t.string=s;function a(y){return e.call(y)==="[object Number]"}t.number=a;function u(y,w,x){return e.call(y)==="[object Number]"&&w<=y&&y<=x}t.numberRange=u;function c(y){return e.call(y)==="[object Number]"&&-2147483648<=y&&y<=2147483647}t.integer=c;function p(y){return e.call(y)==="[object Number]"&&0<=y&&y<=2147483647}t.uinteger=p;function d(y){return e.call(y)==="[object Function]"}t.func=d;function m(y){return y!==null&&typeof y=="object"}t.objectLiteral=m;function h(y,w){return Array.isArray(y)&&y.every(w)}t.typedArray=h})(K||(K={}))});var gne={};Lb(gne,{TextDocument:()=>Cn});function cx(t,e){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),i=t.slice(r);cx(n,e),cx(i,e);let s=0,a=0,u=0;for(;s<n.length&&a<i.length;)e(n[s],i[a])<=0?t[u++]=n[s++]:t[u++]=i[a++];for(;s<n.length;)t[u++]=n[s++];for(;a<i.length;)t[u++]=i[a++];return t}function CR(t,e,r=0){let n=e?[r]:[];for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);qR(s)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,n.push(r+i+1))}return n}function qR(t){return t===13||t===10}function RR(t){let e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function mne(t){let e=RR(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Lg,Cn,MR=at(()=>{"use strict";b();Lg=class t{constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(let n of e)if(t.isIncremental(n)){let i=RR(n.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+n.text+this._content.substring(a,this._content.length);let u=Math.max(i.start.line,0),c=Math.max(i.end.line,0),p=this._lineOffsets,d=CR(n.text,!1,s);if(c-u===d.length)for(let h=0,y=d.length;h<y;h++)p[h+u+1]=d[h];else d.length<1e4?p.splice(u+1,c-u,...d):this._lineOffsets=p=p.slice(0,u+1).concat(d,p.slice(c+1));let m=n.text.length-(a-s);if(m!==0)for(let h=u+1+d.length,y=p.length;h<y;h++)p[h]=p[h]+m}else if(t.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=CR(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return{line:0,character:e};for(;n<i;){let a=Math.floor((n+i)/2);r[a]>e?i=a:n=a+1}let s=n-1;return e=this.ensureBeforeEOL(e,r[s]),{line:s,character:e-r[s]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line];if(e.character<=0)return n;let i=e.line+1<r.length?r[e.line+1]:this._content.length,s=Math.min(n+e.character,i);return this.ensureBeforeEOL(s,n)}ensureBeforeEOL(e,r){for(;e>r&&qR(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(t){function e(i,s,a,u){return new Lg(i,s,a,u)}t.create=e;function r(i,s,a){if(i instanceof Lg)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=r;function n(i,s){let a=i.getText(),u=cx(s.map(mne),(d,m)=>{let h=d.range.start.line-m.range.start.line;return h===0?d.range.start.character-m.range.start.character:h}),c=0,p=[];for(let d of u){let m=i.offsetAt(d.range.start);if(m<c)throw new Error("Overlapping edit");m>c&&p.push(a.substring(c,m)),d.newText.length&&p.push(d.newText),c=i.offsetAt(d.range.end)}return p.push(a.substr(c)),p.join("")}t.applyEdits=n})(Cn||(Cn={}))});function yne(t){return t>=Me.SchemaResolveError}var Me,hn,lx,ri=at(()=>{b();ux();MR();(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.Deprecated=2]="Deprecated",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",t[t.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature",t[t.SchemaResolveError=65536]="SchemaResolveError"})(Me||(Me={}));(function(t){t[t.v3=3]="v3",t[t.v4=4]="v4",t[t.v6=6]="v6",t[t.v7=7]="v7",t[t.v2019_09=19]="v2019_09",t[t.v2020_12=20]="v2020_12"})(hn||(hn={}));(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[fs.Markdown,fs.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}})(lx||(lx={}))});var DR,Ic,K1e,fx=at(()=>{b();(()=>{"use strict";var t={975:$=>{function B(W){if(typeof W!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(W))}function Z(W,J){for(var te,ue="",fe=0,ce=-1,Re=0,Ue=0;Ue<=W.length;++Ue){if(Ue<W.length)te=W.charCodeAt(Ue);else{if(te===47)break;te=47}if(te===47){if(!(ce===Ue-1||Re===1))if(ce!==Ue-1&&Re===2){if(ue.length<2||fe!==2||ue.charCodeAt(ue.length-1)!==46||ue.charCodeAt(ue.length-2)!==46){if(ue.length>2){var Nt=ue.lastIndexOf("/");if(Nt!==ue.length-1){Nt===-1?(ue="",fe=0):fe=(ue=ue.slice(0,Nt)).length-1-ue.lastIndexOf("/"),ce=Ue,Re=0;continue}}else if(ue.length===2||ue.length===1){ue="",fe=0,ce=Ue,Re=0;continue}}J&&(ue.length>0?ue+="/..":ue="..",fe=2)}else ue.length>0?ue+="/"+W.slice(ce+1,Ue):ue=W.slice(ce+1,Ue),fe=Ue-ce-1;ce=Ue,Re=0}else te===46&&Re!==-1?++Re:Re=-1}return ue}var ee={resolve:function(){for(var W,J="",te=!1,ue=arguments.length-1;ue>=-1&&!te;ue--){var fe;ue>=0?fe=arguments[ue]:(W===void 0&&(W=process.cwd()),fe=W),B(fe),fe.length!==0&&(J=fe+"/"+J,te=fe.charCodeAt(0)===47)}return J=Z(J,!te),te?J.length>0?"/"+J:"/":J.length>0?J:"."},normalize:function(W){if(B(W),W.length===0)return".";var J=W.charCodeAt(0)===47,te=W.charCodeAt(W.length-1)===47;return(W=Z(W,!J)).length!==0||J||(W="."),W.length>0&&te&&(W+="/"),J?"/"+W:W},isAbsolute:function(W){return B(W),W.length>0&&W.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var W,J=0;J<arguments.length;++J){var te=arguments[J];B(te),te.length>0&&(W===void 0?W=te:W+="/"+te)}return W===void 0?".":ee.normalize(W)},relative:function(W,J){if(B(W),B(J),W===J||(W=ee.resolve(W))===(J=ee.resolve(J)))return"";for(var te=1;te<W.length&&W.charCodeAt(te)===47;++te);for(var ue=W.length,fe=ue-te,ce=1;ce<J.length&&J.charCodeAt(ce)===47;++ce);for(var Re=J.length-ce,Ue=fe<Re?fe:Re,Nt=-1,et=0;et<=Ue;++et){if(et===Ue){if(Re>Ue){if(J.charCodeAt(ce+et)===47)return J.slice(ce+et+1);if(et===0)return J.slice(ce+et)}else fe>Ue&&(W.charCodeAt(te+et)===47?Nt=et:et===0&&(Nt=0));break}var tn=W.charCodeAt(te+et);if(tn!==J.charCodeAt(ce+et))break;tn===47&&(Nt=et)}var Ss="";for(et=te+Nt+1;et<=ue;++et)et!==ue&&W.charCodeAt(et)!==47||(Ss.length===0?Ss+="..":Ss+="/..");return Ss.length>0?Ss+J.slice(ce+Nt):(ce+=Nt,J.charCodeAt(ce)===47&&++ce,J.slice(ce))},_makeLong:function(W){return W},dirname:function(W){if(B(W),W.length===0)return".";for(var J=W.charCodeAt(0),te=J===47,ue=-1,fe=!0,ce=W.length-1;ce>=1;--ce)if((J=W.charCodeAt(ce))===47){if(!fe){ue=ce;break}}else fe=!1;return ue===-1?te?"/":".":te&&ue===1?"//":W.slice(0,ue)},basename:function(W,J){if(J!==void 0&&typeof J!="string")throw new TypeError('"ext" argument must be a string');B(W);var te,ue=0,fe=-1,ce=!0;if(J!==void 0&&J.length>0&&J.length<=W.length){if(J.length===W.length&&J===W)return"";var Re=J.length-1,Ue=-1;for(te=W.length-1;te>=0;--te){var Nt=W.charCodeAt(te);if(Nt===47){if(!ce){ue=te+1;break}}else Ue===-1&&(ce=!1,Ue=te+1),Re>=0&&(Nt===J.charCodeAt(Re)?--Re==-1&&(fe=te):(Re=-1,fe=Ue))}return ue===fe?fe=Ue:fe===-1&&(fe=W.length),W.slice(ue,fe)}for(te=W.length-1;te>=0;--te)if(W.charCodeAt(te)===47){if(!ce){ue=te+1;break}}else fe===-1&&(ce=!1,fe=te+1);return fe===-1?"":W.slice(ue,fe)},extname:function(W){B(W);for(var J=-1,te=0,ue=-1,fe=!0,ce=0,Re=W.length-1;Re>=0;--Re){var Ue=W.charCodeAt(Re);if(Ue!==47)ue===-1&&(fe=!1,ue=Re+1),Ue===46?J===-1?J=Re:ce!==1&&(ce=1):J!==-1&&(ce=-1);else if(!fe){te=Re+1;break}}return J===-1||ue===-1||ce===0||ce===1&&J===ue-1&&J===te+1?"":W.slice(J,ue)},format:function(W){if(W===null||typeof W!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof W);return(function(J,te){var ue=te.dir||te.root,fe=te.base||(te.name||"")+(te.ext||"");return ue?ue===te.root?ue+fe:ue+"/"+fe:fe})(0,W)},parse:function(W){B(W);var J={root:"",dir:"",base:"",ext:"",name:""};if(W.length===0)return J;var te,ue=W.charCodeAt(0),fe=ue===47;fe?(J.root="/",te=1):te=0;for(var ce=-1,Re=0,Ue=-1,Nt=!0,et=W.length-1,tn=0;et>=te;--et)if((ue=W.charCodeAt(et))!==47)Ue===-1&&(Nt=!1,Ue=et+1),ue===46?ce===-1?ce=et:tn!==1&&(tn=1):ce!==-1&&(tn=-1);else if(!Nt){Re=et+1;break}return ce===-1||Ue===-1||tn===0||tn===1&&ce===Ue-1&&ce===Re+1?Ue!==-1&&(J.base=J.name=Re===0&&fe?W.slice(1,Ue):W.slice(Re,Ue)):(Re===0&&fe?(J.name=W.slice(1,ce),J.base=W.slice(1,Ue)):(J.name=W.slice(Re,ce),J.base=W.slice(Re,Ue)),J.ext=W.slice(ce,Ue)),Re>0?J.dir=W.slice(0,Re-1):fe&&(J.dir="/"),J},sep:"/",delimiter:":",win32:null,posix:null};ee.posix=ee,$.exports=ee}},e={};function r($){var B=e[$];if(B!==void 0)return B.exports;var Z=e[$]={exports:{}};return t[$](Z,Z.exports,r),Z.exports}r.d=($,B)=>{for(var Z in B)r.o(B,Z)&&!r.o($,Z)&&Object.defineProperty($,Z,{enumerable:!0,get:B[Z]})},r.o=($,B)=>Object.prototype.hasOwnProperty.call($,B),r.r=$=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty($,Symbol.toStringTag,{value:"Module"}),Object.defineProperty($,"__esModule",{value:!0})};var n={};let i;r.r(n),r.d(n,{URI:()=>h,Utils:()=>H}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,a=/^\//,u=/^\/\//;function c($,B){if(!$.scheme&&B)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${$.authority}", path: "${$.path}", query: "${$.query}", fragment: "${$.fragment}"}`);if($.scheme&&!s.test($.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if($.path){if($.authority){if(!a.test($.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(u.test($.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let p="",d="/",m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(B){return B instanceof h||!!B&&typeof B.authority=="string"&&typeof B.fragment=="string"&&typeof B.path=="string"&&typeof B.query=="string"&&typeof B.scheme=="string"&&typeof B.fsPath=="string"&&typeof B.with=="function"&&typeof B.toString=="function"}scheme;authority;path;query;fragment;constructor(B,Z,ee,W,J,te=!1){typeof B=="object"?(this.scheme=B.scheme||p,this.authority=B.authority||p,this.path=B.path||p,this.query=B.query||p,this.fragment=B.fragment||p):(this.scheme=(function(ue,fe){return ue||fe?ue:"file"})(B,te),this.authority=Z||p,this.path=(function(ue,fe){switch(ue){case"https":case"http":case"file":fe?fe[0]!==d&&(fe=d+fe):fe=d}return fe})(this.scheme,ee||p),this.query=W||p,this.fragment=J||p,c(this,te))}get fsPath(){return I(this,!1)}with(B){if(!B)return this;let{scheme:Z,authority:ee,path:W,query:J,fragment:te}=B;return Z===void 0?Z=this.scheme:Z===null&&(Z=p),ee===void 0?ee=this.authority:ee===null&&(ee=p),W===void 0?W=this.path:W===null&&(W=p),J===void 0?J=this.query:J===null&&(J=p),te===void 0?te=this.fragment:te===null&&(te=p),Z===this.scheme&&ee===this.authority&&W===this.path&&J===this.query&&te===this.fragment?this:new w(Z,ee,W,J,te)}static parse(B,Z=!1){let ee=m.exec(B);return ee?new w(ee[2]||p,R(ee[4]||p),R(ee[5]||p),R(ee[7]||p),R(ee[9]||p),Z):new w(p,p,p,p,p)}static file(B){let Z=p;if(i&&(B=B.replace(/\\/g,d)),B[0]===d&&B[1]===d){let ee=B.indexOf(d,2);ee===-1?(Z=B.substring(2),B=d):(Z=B.substring(2,ee),B=B.substring(ee)||d)}return new w("file",Z,B,p,p)}static from(B){let Z=new w(B.scheme,B.authority,B.path,B.query,B.fragment);return c(Z,!0),Z}toString(B=!1){return T(this,B)}toJSON(){return this}static revive(B){if(B){if(B instanceof h)return B;{let Z=new w(B);return Z._formatted=B.external,Z._fsPath=B._sep===y?B.fsPath:null,Z}}return B}}let y=i?1:void 0;class w extends h{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=I(this,!1)),this._fsPath}toString(B=!1){return B?T(this,!0):(this._formatted||(this._formatted=T(this,!1)),this._formatted)}toJSON(){let B={$mid:1};return this._fsPath&&(B.fsPath=this._fsPath,B._sep=y),this._formatted&&(B.external=this._formatted),this.path&&(B.path=this.path),this.scheme&&(B.scheme=this.scheme),this.authority&&(B.authority=this.authority),this.query&&(B.query=this.query),this.fragment&&(B.fragment=this.fragment),B}}let x={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function k($,B,Z){let ee,W=-1;for(let J=0;J<$.length;J++){let te=$.charCodeAt(J);if(te>=97&&te<=122||te>=65&&te<=90||te>=48&&te<=57||te===45||te===46||te===95||te===126||B&&te===47||Z&&te===91||Z&&te===93||Z&&te===58)W!==-1&&(ee+=encodeURIComponent($.substring(W,J)),W=-1),ee!==void 0&&(ee+=$.charAt(J));else{ee===void 0&&(ee=$.substr(0,J));let ue=x[te];ue!==void 0?(W!==-1&&(ee+=encodeURIComponent($.substring(W,J)),W=-1),ee+=ue):W===-1&&(W=J)}}return W!==-1&&(ee+=encodeURIComponent($.substring(W))),ee!==void 0?ee:$}function v($){let B;for(let Z=0;Z<$.length;Z++){let ee=$.charCodeAt(Z);ee===35||ee===63?(B===void 0&&(B=$.substr(0,Z)),B+=x[ee]):B!==void 0&&(B+=$[Z])}return B!==void 0?B:$}function I($,B){let Z;return Z=$.authority&&$.path.length>1&&$.scheme==="file"?`//${$.authority}${$.path}`:$.path.charCodeAt(0)===47&&($.path.charCodeAt(1)>=65&&$.path.charCodeAt(1)<=90||$.path.charCodeAt(1)>=97&&$.path.charCodeAt(1)<=122)&&$.path.charCodeAt(2)===58?B?$.path.substr(1):$.path[1].toLowerCase()+$.path.substr(2):$.path,i&&(Z=Z.replace(/\//g,"\\")),Z}function T($,B){let Z=B?v:k,ee="",{scheme:W,authority:J,path:te,query:ue,fragment:fe}=$;if(W&&(ee+=W,ee+=":"),(J||W==="file")&&(ee+=d,ee+=d),J){let ce=J.indexOf("@");if(ce!==-1){let Re=J.substr(0,ce);J=J.substr(ce+1),ce=Re.lastIndexOf(":"),ce===-1?ee+=Z(Re,!1,!1):(ee+=Z(Re.substr(0,ce),!1,!1),ee+=":",ee+=Z(Re.substr(ce+1),!1,!0)),ee+="@"}J=J.toLowerCase(),ce=J.lastIndexOf(":"),ce===-1?ee+=Z(J,!1,!0):(ee+=Z(J.substr(0,ce),!1,!0),ee+=J.substr(ce))}if(te){if(te.length>=3&&te.charCodeAt(0)===47&&te.charCodeAt(2)===58){let ce=te.charCodeAt(1);ce>=65&&ce<=90&&(te=`/${String.fromCharCode(ce+32)}:${te.substr(3)}`)}else if(te.length>=2&&te.charCodeAt(1)===58){let ce=te.charCodeAt(0);ce>=65&&ce<=90&&(te=`${String.fromCharCode(ce+32)}:${te.substr(2)}`)}ee+=Z(te,!0,!1)}return ue&&(ee+="?",ee+=Z(ue,!1,!1)),fe&&(ee+="#",ee+=B?fe:k(fe,!1,!1)),ee}function S($){try{return decodeURIComponent($)}catch{return $.length>3?$.substr(0,3)+S($.substr(3)):$}}let L=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function R($){return $.match(L)?$.replace(L,(B=>S(B))):$}var M=r(975);let F=M.posix||M,X="/";var H;(function($){$.joinPath=function(B,...Z){return B.with({path:F.join(B.path,...Z)})},$.resolvePath=function(B,...Z){let ee=B.path,W=!1;ee[0]!==X&&(ee=X+ee,W=!0);let J=F.resolve(ee,...Z);return W&&J[0]===X&&!B.authority&&(J=J.substring(1)),B.with({path:J})},$.dirname=function(B){if(B.path.length===0||B.path===X)return B;let Z=F.dirname(B.path);return Z.length===1&&Z.charCodeAt(0)===46&&(Z=""),B.with({path:Z})},$.basename=function(B){return F.basename(B.path)},$.extname=function(B){return F.extname(B.path)}})(H||(H={})),DR=n})();({URI:Ic,Utils:K1e}=DR)});var Zo=P((X1e,$R)=>{"use strict";b();var px=Object.defineProperty,_ne=Object.getOwnPropertyDescriptor,vne=Object.getOwnPropertyNames,bne=Object.prototype.hasOwnProperty,Sne=(t,e)=>{for(var r in e)px(t,r,{get:e[r],enumerable:!0})},wne=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of vne(e))!bne.call(t,i)&&i!==r&&px(t,i,{get:()=>e[i],enumerable:!(n=_ne(e,i))||n.enumerable});return t},xne=t=>wne(px({},"__esModule",{value:!0}),t),jR={};Sne(jR,{config:()=>Ene,t:()=>BR});$R.exports=xne(jR);var kne=Te("fs"),Ane=Te("fs/promises");async function Ine(t){if(t.protocol==="file:")return await(0,Ane.readFile)(t,"utf8");if(t.protocol==="http:"||t.protocol==="https:"){let e=await fetch(t.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!e.ok){let n=`Unexpected ${e.status} response while trying to read ${t}`;try{n+=`: ${await e.text()}`}catch{}throw new Error(n)}return await e.text()}throw new Error("Unsupported protocol")}function Tne(t){return(0,kne.readFileSync)(t,"utf8")}var lp;function Ene(t){if("contents"in t){typeof t.contents=="string"?lp=JSON.parse(t.contents):lp=t.contents;return}if("fsPath"in t){let e=Tne(t.fsPath),r=JSON.parse(e);lp=FR(r)?r.contents.bundle:r;return}if(t.uri){let e=t.uri;return typeof t.uri=="string"&&(e=new URL(t.uri)),new Promise((r,n)=>{Ine(e).then(i=>{try{let s=JSON.parse(i);lp=FR(s)?s.contents.bundle:s,r()}catch(s){n(s)}}).catch(i=>{n(i)})})}}function BR(...t){let e=t[0],r,n,i;if(typeof e=="string")r=e,n=e,t.splice(0,1),i=!t||typeof t[0]!="object"?t:t[0];else if(e instanceof Array){let a=t.slice(1);if(e.length!==a.length+1)throw new Error("expected a string as the first argument to l10n.t");let u=e[0];for(let c=1;c<e.length;c++)u+=`{${c-1}}`+e[c];return BR(u,...a)}else n=e.message,r=n,e.comment&&e.comment.length>0&&(r+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),i=e.args??{};let s=lp?.[r];return s?typeof s=="string"?Pg(s,i):s.comment?Pg(s.message,i):Pg(n,i):Pg(n,i)}var One=/{([^}]+)}/g;function Pg(t,e){return Object.keys(e).length===0?t:t.replace(One,(r,n)=>e[n]??r)}function FR(t){return typeof t?.contents?.bundle=="object"&&typeof t?.version=="string"}});function Fr(t){return ki(t)?t?{}:{not:{}}:t}function Ys(t){t.startsWith(UR)&&(t=Lne+t.substring(UR.length));try{return Ic.parse(t).toString(!0)}catch{return t}}function vx(t){return Pne[Ys(t)]??void 0}function GR(t,e=[],r=[]){return new Rg(t,e,r)}function ps(t){return t1(t)}function pp(t){return e1(t)}function bx(t,e,r=!1){return e>=t.offset&&e<t.offset+t.length||r&&e===t.offset+t.length}function WR(t,e=hn.v2020_12){let r=t.$schema;return r?vx(r)??e:e}function kr(t,e,r,n,i){if(!t||!n.include(t))return;if(t.type==="property")return kr(t.valueNode,e,r,n,i);let s=t;switch(a(),s.type){case"object":m(s);break;case"array":d(s);break;case"string":p(s);break;case"number":c(s);break}n.add({node:s,schema:e});function a(){function h(T){return s.type===T||T==="integer"&&s.type==="number"&&s.isInteger}if(Array.isArray(e.type)?e.type.some(h)||r.problems.push({location:{offset:s.offset,length:s.length},message:e.errorMessage||ge.t("Incorrect type. Expected one of {0}.",e.type.join(", "))}):e.type&&(h(e.type)||r.problems.push({location:{offset:s.offset,length:s.length},message:e.errorMessage||ge.t('Incorrect type. Expected "{0}".',e.type)})),Array.isArray(e.allOf))for(let T of e.allOf){let S=new Ar,L=n.newSub();kr(s,Fr(T),S,L,i),r.merge(S),n.merge(L)}let y=Fr(e.not);if(y){let T=new Ar,S=n.newSub();kr(s,y,T,S,i),T.hasProblems()||r.problems.push({location:{offset:s.offset,length:s.length},message:e.errorMessage||ge.t("Matches a schema that is not allowed.")});for(let L of S.schemas)L.inverted=!L.inverted,n.add(L)}let w=(T,S)=>{let L=[],R=u(T)??T,M;for(let F of R){let X=Fr(F),H=new Ar,$=n.newSub();if(kr(s,X,H,$,i),H.hasProblems()||L.push(X),!M)M={schema:X,validationResult:H,matchingSchemas:$};else if(!S&&!H.hasProblems()&&!M.validationResult.hasProblems())M.matchingSchemas.merge($),M.validationResult.propertiesMatches+=H.propertiesMatches,M.validationResult.propertiesValueMatches+=H.propertiesValueMatches,M.validationResult.mergeProcessedProperties(H);else{let B=H.compare(M.validationResult);B>0?M={schema:X,validationResult:H,matchingSchemas:$}:B===0&&(M.matchingSchemas.merge($),M.validationResult.mergeEnumValues(H))}}return L.length>1&&S&&r.problems.push({location:{offset:s.offset,length:1},message:ge.t("Matches multiple schemas when only one must validate.")}),M&&(M.validationResult.updateEnumMismatchProblemMessages(),r.merge(M.validationResult),n.merge(M.matchingSchemas)),L.length};Array.isArray(e.anyOf)&&w(e.anyOf,!1),Array.isArray(e.oneOf)&&w(e.oneOf,!0);let x=T=>{let S=new Ar,L=n.newSub();kr(s,Fr(T),S,L,i),r.merge(S),n.merge(L)},k=(T,S,L)=>{let R=Fr(T),M=new Ar,F=n.newSub();kr(s,R,M,F,i),n.merge(F),r.mergeProcessedProperties(M),M.hasProblems()?L&&x(L):S&&x(S)},v=Fr(e.if);if(v&&k(v,Fr(e.then),Fr(e.else)),Array.isArray(e.enum)){let T=ps(s),S=!1;for(let L of e.enum)if(Ko(T,L)){S=!0;break}r.enumValues=e.enum,r.enumValueMatch=S,S||r.problems.push({location:{offset:s.offset,length:s.length},code:Me.EnumValueMismatch,message:e.errorMessage||ge.t("Value is not accepted. Valid values: {0}.",e.enum.map(L=>JSON.stringify(L)).join(", "))})}if(Zn(e.const)){let T=ps(s);Ko(T,e.const)?r.enumValueMatch=!0:(r.problems.push({location:{offset:s.offset,length:s.length},code:Me.EnumValueMismatch,message:e.errorMessage||ge.t("Value must be {0}.",JSON.stringify(e.const))}),r.enumValueMatch=!1),r.enumValues=[e.const]}let I=e.deprecationMessage;if(I||e.deprecated){I=I||ge.t("Value is deprecated");let T=s.parent?.type==="property"?s.parent:s;r.problems.push({location:{offset:T.offset,length:T.length},severity:Mr.Warning,message:I,code:Me.Deprecated})}}function u(h){if(h.length<2)return;let y=x=>{let k=new Map;for(let v=0;v<h.length;v++){let I=x(Fr(h[v]),v);if(!I)return;I.forEach(([T,S])=>{if(S.const!==void 0){k.has(T)||k.set(T,new Map);let L=k.get(T);L.has(S.const)||L.set(S.const,[]),L.get(S.const).push(v)}})}return k},w=(x,k)=>{for(let[v,I]of x){let T=new Set;if(I.forEach(S=>S.forEach(L=>T.add(L))),T.size===h.length){let S=k(v),L=I.get(S);if(L?.length)return L.map(R=>h[R]);break}}};if(s.type==="object"&&s.properties?.length){let x=y(k=>k.properties?Object.entries(k.properties).map(([v,I])=>[v,Fr(I)]):void 0);if(x)return w(x,k=>{let v=s.properties.find(I=>I.keyNode.value===k);return v?.valueNode?.type==="string"?v.valueNode.value:void 0})}else if(s.type==="array"&&s.items?.length){let x=y(k=>{let v=k.prefixItems||(Array.isArray(k.items)?k.items:void 0);return v?v.map((I,T)=>[T,Fr(I)]):void 0});if(x)return w(x,k=>{let v=s.items[k];return v?.type==="string"?v.value:void 0})}}function c(h){let y=h.value;function w(L){let R=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(L.toString());return R&&{value:Number(R[1]+(R[2]||"")),multiplier:(R[2]?.length||0)-(parseInt(R[3])||0)}}if(Rr(e.multipleOf)){let L=-1;if(Number.isInteger(e.multipleOf))L=y%e.multipleOf;else{let R=w(e.multipleOf),M=w(y);if(R&&M){let F=10**Math.abs(M.multiplier-R.multiplier);M.multiplier<R.multiplier?M.value*=F:R.value*=F,L=M.value%R.value}}L!==0&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Value is not divisible by {0}.",e.multipleOf)})}function x(L,R){if(Rr(R))return R;if(ki(R)&&R)return L}function k(L,R){if(!ki(R)||!R)return L}let v=x(e.minimum,e.exclusiveMinimum);Rr(v)&&y<=v&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Value is below the exclusive minimum of {0}.",v)});let I=x(e.maximum,e.exclusiveMaximum);Rr(I)&&y>=I&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Value is above the exclusive maximum of {0}.",I)});let T=k(e.minimum,e.exclusiveMinimum);Rr(T)&&y<T&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Value is below the minimum of {0}.",T)});let S=k(e.maximum,e.exclusiveMaximum);Rr(S)&&y>S&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Value is above the maximum of {0}.",S)})}function p(h){if(Rr(e.minLength)&&Yw(h.value)<e.minLength&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("String is shorter than the minimum length of {0}.",e.minLength)}),Rr(e.maxLength)&&Yw(h.value)>e.maxLength&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("String is longer than the maximum length of {0}.",e.maxLength)}),pg(e.pattern)){let y=Qo(e.pattern);y&&!y.test(h.value)&&r.problems.push({location:{offset:h.offset,length:h.length},message:e.patternErrorMessage||e.errorMessage||ge.t('String does not match the pattern of "{0}".',e.pattern)})}if(e.format)switch(e.format){case"uri":case"uri-reference":{let w;if(!h.value)w=ge.t("URI expected.");else{let x=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(h.value);x?!x[2]&&e.format==="uri"&&(w=ge.t("URI with a scheme is expected.")):w=ge.t("URI is expected.")}w&&r.problems.push({location:{offset:h.offset,length:h.length},message:e.patternErrorMessage||e.errorMessage||ge.t("String is not a URI: {0}",w)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":let y=Nne[e.format];(!h.value||!y.pattern.exec(h.value))&&r.problems.push({location:{offset:h.offset,length:h.length},message:e.patternErrorMessage||e.errorMessage||y.errorMessage});default:}}function d(h){let y,w;i.schemaDraft>=hn.v2020_12?(y=e.prefixItems,w=Array.isArray(e.items)?void 0:e.items):(y=Array.isArray(e.items)?e.items:void 0,w=Array.isArray(e.items)?e.additionalItems:e.items);let x=0;if(y!==void 0){let I=Math.min(y.length,h.items.length);for(;x<I;x++){let T=y[x],S=Fr(T),L=new Ar,R=h.items[x];R&&(kr(R,S,L,n,i),r.mergePropertyMatch(L)),r.processedProperties.add(String(x))}}if(w!==void 0&&x<h.items.length)if(typeof w=="boolean")for(w===!1&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Array has too many items according to schema. Expected {0} or fewer.",x)});x<h.items.length;x++)r.processedProperties.add(String(x)),r.propertiesValueMatches++;else for(;x<h.items.length;x++){let I=new Ar;kr(h.items[x],w,I,n,i),r.mergePropertyMatch(I),r.processedProperties.add(String(x))}let k=Fr(e.contains);if(k){let I=0;for(let T=0;T<h.items.length;T++){let S=h.items[T],L=new Ar;kr(S,k,L,Tc.instance,i),L.hasProblems()||(I++,i.schemaDraft>=hn.v2020_12&&r.processedProperties.add(String(T)))}I===0&&!Rr(e.minContains)&&r.problems.push({location:{offset:h.offset,length:h.length},message:e.errorMessage||ge.t("Array does not contain required item.")}),Rr(e.minContains)&&I<e.minContains&&r.problems.push({location:{offset:h.offset,length:h.length},message:e.errorMessage||ge.t("Array has too few items that match the contains contraint. Expected {0} or more.",e.minContains)}),Rr(e.maxContains)&&I>e.maxContains&&r.problems.push({location:{offset:h.offset,length:h.length},message:e.errorMessage||ge.t("Array has too many items that match the contains contraint. Expected {0} or less.",e.maxContains)})}let v=e.unevaluatedItems;if(v!==void 0)for(let I=0;I<h.items.length;I++){if(!r.processedProperties.has(String(I)))if(v===!1)r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Item does not match any validation rule from the array.")});else{let T=new Ar;kr(h.items[I],e.unevaluatedItems,T,n,i),r.mergePropertyMatch(T)}r.processedProperties.add(String(I)),r.propertiesValueMatches++}if(Rr(e.minItems)&&h.items.length<e.minItems&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Array has too few items. Expected {0} or more.",e.minItems)}),Rr(e.maxItems)&&h.items.length>e.maxItems&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Array has too many items. Expected {0} or fewer.",e.maxItems)}),e.uniqueItems===!0){let T=function(){for(let S=0;S<I.length-1;S++){let L=I[S];for(let R=S+1;R<I.length;R++)if(Ko(L,I[R]))return!0}return!1},I=ps(h);T()&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Array has duplicate items.")})}}function m(h){let y=Object.create(null),w=new Set;for(let S of h.properties){let L=S.keyNode.value;y[L]=S.valueNode,w.add(L)}if(Array.isArray(e.required)){for(let S of e.required)if(!y[S]){let L=h.parent&&h.parent.type==="property"&&h.parent.keyNode,R=L?{offset:L.offset,length:L.length}:{offset:h.offset,length:1};r.problems.push({location:R,message:ge.t('Missing property "{0}".',S)})}}let x=S=>{w.delete(S),r.processedProperties.add(S)};if(e.properties)for(let S of Object.keys(e.properties)){x(S);let L=e.properties[S],R=y[S];if(R)if(ki(L))if(L)r.propertiesMatches++,r.propertiesValueMatches++;else{let M=R.parent;r.problems.push({location:{offset:M.keyNode.offset,length:M.keyNode.length},message:e.errorMessage||ge.t("Property {0} is not allowed.",S)})}else{let M=new Ar;kr(R,L,M,n,i),r.mergePropertyMatch(M)}}if(e.patternProperties)for(let S of Object.keys(e.patternProperties)){let L=Qo(S);if(L){let R=[];for(let M of w)if(L.test(M)){R.push(M);let F=y[M];if(F){let X=e.patternProperties[S];if(ki(X))if(X)r.propertiesMatches++,r.propertiesValueMatches++;else{let H=F.parent;r.problems.push({location:{offset:H.keyNode.offset,length:H.keyNode.length},message:e.errorMessage||ge.t("Property {0} is not allowed.",M)})}else{let H=new Ar;kr(F,X,H,n,i),r.mergePropertyMatch(H)}}}R.forEach(x)}}let k=e.additionalProperties;if(k!==void 0)for(let S of w){x(S);let L=y[S];if(L){if(k===!1){let R=L.parent;r.problems.push({location:{offset:R.keyNode.offset,length:R.keyNode.length},message:e.errorMessage||ge.t("Property {0} is not allowed.",S)})}else if(k!==!0){let R=new Ar;kr(L,k,R,n,i),r.mergePropertyMatch(R)}}}let v=e.unevaluatedProperties;if(v!==void 0){let S=[];for(let L of w)if(!r.processedProperties.has(L)){S.push(L);let R=y[L];if(R){if(v===!1){let M=R.parent;r.problems.push({location:{offset:M.keyNode.offset,length:M.keyNode.length},message:e.errorMessage||ge.t("Property {0} is not allowed.",L)})}else if(v!==!0){let M=new Ar;kr(R,v,M,n,i),r.mergePropertyMatch(M)}}}S.forEach(x)}if(Rr(e.maxProperties)&&h.properties.length>e.maxProperties&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Object has more properties than limit of {0}.",e.maxProperties)}),Rr(e.minProperties)&&h.properties.length<e.minProperties&&r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Object has fewer properties than the required number of {0}",e.minProperties)}),e.dependentRequired)for(let S in e.dependentRequired){let L=y[S],R=e.dependentRequired[S];L&&Array.isArray(R)&&T(S,R)}if(e.dependentSchemas)for(let S in e.dependentSchemas){let L=y[S],R=e.dependentSchemas[S];L&&ls(R)&&T(S,R)}if(e.dependencies)for(let S in e.dependencies)y[S]&&T(S,e.dependencies[S]);let I=Fr(e.propertyNames);if(I)for(let S of h.properties){let L=S.keyNode;L&&kr(L,I,r,n,i)}function T(S,L){if(Array.isArray(L))for(let R of L)y[R]?r.propertiesValueMatches++:r.problems.push({location:{offset:h.offset,length:h.length},message:ge.t("Object is missing property {0} required by property {1}.",R,S)});else{let R=Fr(L);if(R){let M=new Ar;kr(h,R,M,n,i),r.mergePropertyMatch(M)}}}}}function HR(t,e){let r=[],n=-1,i=t.getText(),s=Qn(i,!1),a=e&&e.collectComments?[]:void 0;function u(){for(;;){let M=s.scan();switch(m(),M){case 12:case 13:Array.isArray(a)&&a.push(Ee.create(t.positionAt(s.getTokenOffset()),t.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return M}}}function c(M){return s.getToken()===M?(u(),!0):!1}function p(M,F,X,H,$=Mr.Error){if(r.length===0||X!==n){let B=Ee.create(t.positionAt(X),t.positionAt(H));r.push(ei.create(B,M,$,F,t.languageId)),n=X}}function d(M,F,X=void 0,H=[],$=[]){let B=s.getTokenOffset(),Z=s.getTokenOffset()+s.getTokenLength();if(B===Z&&B>0){for(B--;B>0&&/\s/.test(i.charAt(B));)B--;Z=B+1}if(p(M,F,B,Z),X&&h(X,!1),H.length+$.length>0){let ee=s.getToken();for(;ee!==17;){if(H.indexOf(ee)!==-1){u();break}else if($.indexOf(ee)!==-1)break;ee=u()}}return X}function m(){switch(s.getTokenError()){case 4:return d(ge.t("Invalid unicode sequence in string."),Me.InvalidUnicode),!0;case 5:return d(ge.t("Invalid escape character in string."),Me.InvalidEscapeCharacter),!0;case 3:return d(ge.t("Unexpected end of number."),Me.UnexpectedEndOfNumber),!0;case 1:return d(ge.t("Unexpected end of comment."),Me.UnexpectedEndOfComment),!0;case 2:return d(ge.t("Unexpected end of string."),Me.UnexpectedEndOfString),!0;case 6:return d(ge.t("Invalid characters in string. Control characters must be escaped."),Me.InvalidCharacter),!0}return!1}function h(M,F){return M.length=s.getTokenOffset()+s.getTokenLength()-M.offset,F&&u(),M}function y(M){if(s.getToken()!==3)return;let F=new dx(M,s.getTokenOffset());u();let X=0,H=!1;for(;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){H||d(ge.t("Value expected"),Me.ValueExpected);let B=s.getTokenOffset();if(u(),s.getToken()===4){H&&p(ge.t("Trailing comma"),Me.TrailingComma,B,B+1);continue}}else H&&d(ge.t("Expected comma"),Me.CommaExpected);let $=S(F);$?F.items.push($):d(ge.t("Value expected"),Me.ValueExpected,void 0,[],[4,5]),H=!0}return s.getToken()!==4?d(ge.t("Expected comma or closing bracket"),Me.CommaOrCloseBacketExpected,F):h(F,!0)}let w=new fp(void 0,0,0);function x(M,F){let X=new gx(M,s.getTokenOffset(),w),H=v(X);if(!H)if(s.getToken()===16){d(ge.t("Property keys must be doublequoted"),Me.PropertyKeysMustBeDoublequoted);let B=new fp(X,s.getTokenOffset(),s.getTokenLength());B.value=s.getTokenValue(),H=B,u()}else return;if(X.keyNode=H,H.value!=="//"){let B=F[H.value];B?(p(ge.t("Duplicate object key"),Me.DuplicateKey,X.keyNode.offset,X.keyNode.offset+X.keyNode.length,Mr.Warning),ls(B)&&p(ge.t("Duplicate object key"),Me.DuplicateKey,B.keyNode.offset,B.keyNode.offset+B.keyNode.length,Mr.Warning),F[H.value]=!0):F[H.value]=X}if(s.getToken()===6)X.colonOffset=s.getTokenOffset(),u();else if(d(ge.t("Colon expected"),Me.ColonExpected),s.getToken()===10&&t.positionAt(H.offset+H.length).line<t.positionAt(s.getTokenOffset()).line)return X.length=H.length,X;let $=S(X);return $?(X.valueNode=$,X.length=$.offset+$.length-X.offset,X):d(ge.t("Value expected"),Me.ValueExpected,X,[],[2,5])}function k(M){if(s.getToken()!==1)return;let F=new yx(M,s.getTokenOffset()),X=Object.create(null);u();let H=!1;for(;s.getToken()!==2&&s.getToken()!==17;){if(s.getToken()===5){H||d(ge.t("Property expected"),Me.PropertyExpected);let B=s.getTokenOffset();if(u(),s.getToken()===2){H&&p(ge.t("Trailing comma"),Me.TrailingComma,B,B+1);continue}}else H&&d(ge.t("Expected comma"),Me.CommaExpected);let $=x(F,X);$?F.properties.push($):d(ge.t("Property expected"),Me.PropertyExpected,void 0,[],[2,5]),H=!0}return s.getToken()!==2?d(ge.t("Expected comma or closing brace"),Me.CommaOrCloseBraceExpected,F):h(F,!0)}function v(M){if(s.getToken()!==10)return;let F=new fp(M,s.getTokenOffset());return F.value=s.getTokenValue(),h(F,!0)}function I(M){if(s.getToken()!==11)return;let F=new mx(M,s.getTokenOffset());if(s.getTokenError()===0){let X=s.getTokenValue();try{let H=JSON.parse(X);if(!Rr(H))return d(ge.t("Invalid number format."),Me.Undefined,F);F.value=H}catch{return d(ge.t("Invalid number format."),Me.Undefined,F)}F.isInteger=X.indexOf(".")===-1}return h(F,!0)}function T(M){let F;switch(s.getToken()){case 7:return h(new hx(M,s.getTokenOffset()),!0);case 8:return h(new Cg(M,!0,s.getTokenOffset()),!0);case 9:return h(new Cg(M,!1,s.getTokenOffset()),!0);default:return}}function S(M){return y(M)||k(M)||v(M)||I(M)||T(M)}let L;return u()!==17&&(L=S(L),L?s.getToken()!==17&&d(ge.t("End of file expected."),Me.Undefined):d(ge.t("Expected a JSON object, array or literal."),Me.Undefined)),new Rg(L,r,a)}var ge,Nne,Qs,hx,Cg,dx,mx,fp,gx,yx,VR,UR,Lne,Pne,qg,_x,Tc,Ar,Rg,Ec=at(()=>{b();ns();sp();ap();ri();fx();ge=Uu(Zo()),Nne={"color-hex":{errorMessage:ge.t("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:ge.t("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:ge.t("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:ge.t("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:ge.t("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:ge.t("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:ge.t("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:ge.t("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}},Qs=class{constructor(e,r,n=0){this.offset=r,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},hx=class extends Qs{constructor(e,r){super(e,r),this.type="null",this.value=null}},Cg=class extends Qs{constructor(e,r,n){super(e,n),this.type="boolean",this.value=r}},dx=class extends Qs{constructor(e,r){super(e,r),this.type="array",this.items=[]}get children(){return this.items}},mx=class extends Qs{constructor(e,r){super(e,r),this.type="number",this.isInteger=!0,this.value=Number.NaN}},fp=class extends Qs{constructor(e,r,n){super(e,r,n),this.type="string",this.value=""}},gx=class extends Qs{constructor(e,r,n){super(e,r),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},yx=class extends Qs{constructor(e,r){super(e,r),this.type="object",this.properties=[]}get children(){return this.properties}};(function(t){t[t.Key=0]="Key",t[t.Enum=1]="Enum"})(VR||(VR={}));UR="http://json-schema.org/",Lne="https://json-schema.org/";Pne={"https://json-schema.org/draft-03/schema":hn.v3,"https://json-schema.org/draft-04/schema":hn.v4,"https://json-schema.org/draft-06/schema":hn.v6,"https://json-schema.org/draft-07/schema":hn.v7,"https://json-schema.org/draft/2019-09/schema":hn.v2019_09,"https://json-schema.org/draft/2020-12/schema":hn.v2020_12},qg=class{constructor(e){this.schemaDraft=e}},_x=class t{constructor(e=-1,r){this.focusOffset=e,this.exclude=r,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(this.focusOffset===-1||bx(e,this.focusOffset))&&e!==this.exclude}newSub(){return new t(-1,this.exclude)}},Tc=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};Tc.instance=new Tc;Ar=class{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues&&(this.enumValues=this.enumValues.concat(e.enumValues))}updateEnumMismatchProblemMessages(){if(!this.enumValueMatch&&this.enumValues)for(let e of this.problems)e.code===Me.EnumValueMismatch&&(e.message=ge.t("Value is not accepted. Valid values: {0}.",this.enumValues.map(r=>JSON.stringify(r)).join(", ")))}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&e.enumValues.length===1&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach(r=>this.processedProperties.add(r))}compare(e){let r=this.hasProblems();return r!==e.hasProblems()?r?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}};Rg=class{constructor(e,r=[],n=[]){this.root=e,this.syntaxErrors=r,this.comments=n}getNodeFromOffset(e,r=!1){if(this.root)return Zb(this.root,e,r)}visit(e){if(this.root){let r=n=>{let i=e(n),s=n.children;if(Array.isArray(s))for(let a=0;a<s.length&&i;a++)i=r(s[a]);return i};r(this.root)}}validate(e,r,n=Mr.Warning,i){if(this.root&&r){let s=new Ar;return kr(this.root,r,s,Tc.instance,new qg(i??WR(r))),s.problems.map(a=>{let u=Ee.create(e.positionAt(a.location.offset),e.positionAt(a.location.offset+a.location.length));return ei.create(u,a.message,a.severity??n,a.code)})}}getMatchingSchemas(e,r=-1,n){if(this.root&&e){let i=new _x(r,n),s=WR(e),a=new qg(s);return kr(this.root,e,new Ar,i,a),i.schemas}return[]}}});function Mg(t,e,r){if(t!==null&&typeof t=="object"){let n=e+" ";if(Array.isArray(t)){if(t.length===0)return"[]";let i=`[
1182
+ `;for(let s=0;s<t.length;s++)i+=n+Mg(t[s],n,r),s<t.length-1&&(i+=","),i+=`
1183
+ `;return i+=e+"]",i}else{let i=Object.keys(t);if(i.length===0)return"{}";let s=`{
1184
+ `;for(let a=0;a<i.length;a++){let u=i[a];s+=n+JSON.stringify(u)+": "+Mg(t[u],n,r),a<i.length-1&&(s+=","),s+=`
1185
+ `}return s+=e+"}",s}}return r(t)}var zR=at(()=>{b()});var hp,Cne,qne,Dg,JR=at(()=>{b();Ec();ns();zR();ap();sp();ri();hp=Uu(Zo()),Cne=[",","}","]"],qne=[":"],Dg=class{constructor(e,r=[],n=Promise,i={}){this.schemaService=e,this.contributions=r,this.promiseConstructor=n,this.clientCapabilities=i}doResolve(e){for(let r=this.contributions.length-1;r>=0;r--){let n=this.contributions[r].resolveCompletion;if(n){let i=n(e);if(i)return i}}return this.promiseConstructor.resolve(e)}doComplete(e,r,n){let i={items:[],isIncomplete:!1},s=e.getText(),a=e.offsetAt(r),u=n.getNodeFromOffset(a,!0);if(this.isInComment(e,u?u.offset:0,a))return Promise.resolve(i);if(u&&a===u.offset+u.length&&a>0){let y=s[a-1];(u.type==="object"&&y==="}"||u.type==="array"&&y==="]")&&(u=u.parent)}let c=this.getCurrentWord(e,a),p;if(u&&(u.type==="string"||u.type==="number"||u.type==="boolean"||u.type==="null"))p=Ee.create(e.positionAt(u.offset),e.positionAt(u.offset+u.length));else{let y=a-c.length;y>0&&s[y-1]==='"'&&y--,p=Ee.create(e.positionAt(y),r)}let d=!1,m=new Map,h={add:y=>{let w=y.label,x=m.get(w);if(x)x.documentation||(x.documentation=y.documentation),x.detail||(x.detail=y.detail),x.labelDetails||(x.labelDetails=y.labelDetails);else{if(w=w.replace(/[\n]/g,"\u21B5"),w.length>60){let k=w.substr(0,57).trim()+"...";m.has(k)||(w=k)}y.textEdit=Zr.replace(p,y.insertText),d&&(y.commitCharacters=y.kind===Dr.Property?qne:Cne),y.label=w,m.set(w,y),i.items.push(y)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:y=>{console.error(y)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then(y=>{let w=[],x=!0,k="",v;if(u&&u.type==="string"){let T=u.parent;T&&T.type==="property"&&T.keyNode===u&&(x=!T.valueNode,v=T,k=s.substr(u.offset+1,u.length-2),T&&(u=T.parent))}if(u&&u.type==="object"){if(u.offset===a)return i;u.properties.forEach(R=>{(!v||v!==R)&&m.set(R.keyNode.value,kc.create("__"))});let S="";x&&(S=this.evaluateSeparatorAfter(e,e.offsetAt(p.end))),y?this.getPropertyCompletions(y,n,u,x,S,h):this.getSchemaLessPropertyCompletions(n,u,k,h);let L=pp(u);this.contributions.forEach(R=>{let M=R.collectPropertyCompletions(e.uri,L,c,x,S==="",h);M&&w.push(M)}),!y&&c.length>0&&s.charAt(a-c.length-1)!=='"'&&(h.add({kind:Dr.Property,label:this.getLabelForValue(c),insertText:this.getInsertTextForProperty(c,void 0,!1,S),insertTextFormat:Ct.Snippet,documentation:""}),h.setAsIncomplete())}let I={};return y?this.getValueCompletions(y,n,u,a,e,h,I):this.getSchemaLessValueCompletions(n,u,a,e,h),this.contributions.length>0&&this.getContributedValueCompletions(n,u,a,e,h,w),this.promiseConstructor.all(w).then(()=>{if(h.getNumberOfProposals()===0){let T=a;u&&(u.type==="string"||u.type==="number"||u.type==="boolean"||u.type==="null")&&(T=u.offset+u.length);let S=this.evaluateSeparatorAfter(e,T);this.addFillerValueCompletions(I,S,h)}return i})})}getPropertyCompletions(e,r,n,i,s,a){r.getMatchingSchemas(e.schema,n.offset).forEach(c=>{if(c.node===n&&!c.inverted){let p=c.schema.properties;p&&Object.keys(p).forEach(m=>{let h=p[m];if(typeof h=="object"&&!h.deprecationMessage&&!h.doNotSuggest){let y={kind:Dr.Property,label:m,insertText:this.getInsertTextForProperty(m,h,i,s),insertTextFormat:Ct.Snippet,filterText:this.getFilterTextForValue(m),documentation:this.fromMarkup(h.markdownDescription)||h.description||""};h.completionDetail!==void 0&&(y.detail=h.completionDetail),h.suggestSortText!==void 0&&(y.sortText=h.suggestSortText),y.insertText&&Ra(y.insertText,`$1${s}`)&&(y.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(y)}});let d=c.schema.propertyNames;if(typeof d=="object"&&!d.deprecationMessage&&!d.doNotSuggest){let m=(h,y,w,x)=>{let k={kind:Dr.Property,label:h,insertText:this.getInsertTextForProperty(h,void 0,i,s),insertTextFormat:Ct.Snippet,filterText:this.getFilterTextForValue(h),documentation:y||this.fromMarkup(d.markdownDescription)||d.description||"",sortText:x,detail:w};k.insertText&&Ra(k.insertText,`$1${s}`)&&(k.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(k)};if(d.enum)for(let h=0;h<d.enum.length;h++){let y;d.markdownEnumDescriptions&&h<d.markdownEnumDescriptions.length?y=this.fromMarkup(d.markdownEnumDescriptions[h]):d.enumDescriptions&&h<d.enumDescriptions.length&&(y=d.enumDescriptions[h]);let w=d.enumSortTexts?.[h],x=d.enumDetails?.[h];m(d.enum[h],y,x,w)}if(d.examples)for(let h=0;h<d.examples.length;h++)m(d.examples[h],void 0,void 0,void 0);d.const&&m(d.const,void 0,d.completionDetail,d.suggestSortText)}}})}getSchemaLessPropertyCompletions(e,r,n,i){let s=a=>{a.properties.forEach(u=>{let c=u.keyNode.value;i.add({kind:Dr.Property,label:c,insertText:this.getInsertTextForValue(c,""),insertTextFormat:Ct.Snippet,filterText:this.getFilterTextForValue(c),documentation:""})})};if(r.parent)if(r.parent.type==="property"){let a=r.parent.keyNode.value;e.visit(u=>(u.type==="property"&&u!==r.parent&&u.keyNode.value===a&&u.valueNode&&u.valueNode.type==="object"&&s(u.valueNode),!0))}else r.parent.type==="array"&&r.parent.items.forEach(a=>{a.type==="object"&&a!==r&&s(a)});else r.type==="object"&&i.add({kind:Dr.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:Ct.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,r,n,i,s){let a=n;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(a=r.offset+r.length,r=r.parent),!r){s.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:Ct.Snippet,documentation:""}),s.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Ct.Snippet,documentation:""});return}let u=this.evaluateSeparatorAfter(i,a),c=p=>{p.parent&&!bx(p.parent,n,!0)&&s.add({kind:this.getSuggestionKind(p.type),label:this.getLabelTextForMatchingNode(p,i),insertText:this.getInsertTextForMatchingNode(p,i,u),insertTextFormat:Ct.Snippet,documentation:""}),p.type==="boolean"&&this.addBooleanValueCompletion(!p.value,u,s)};if(r.type==="property"&&n>(r.colonOffset||0)){let p=r.valueNode;if(p&&(n>p.offset+p.length||p.type==="object"||p.type==="array"))return;let d=r.keyNode.value;e.visit(m=>(m.type==="property"&&m.keyNode.value===d&&m.valueNode&&c(m.valueNode),!0)),d==="$schema"&&r.parent&&!r.parent.parent&&this.addDollarSchemaCompletions(u,s)}if(r.type==="array")if(r.parent&&r.parent.type==="property"){let p=r.parent.keyNode.value;e.visit(d=>(d.type==="property"&&d.keyNode.value===p&&d.valueNode&&d.valueNode.type==="array"&&d.valueNode.items.forEach(c),!0))}else r.items.forEach(c)}getValueCompletions(e,r,n,i,s,a,u){let c=i,p,d;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(c=n.offset+n.length,d=n,n=n.parent),!n){this.addSchemaValueCompletions(e.schema,"",a,u);return}if(n.type==="property"&&i>(n.colonOffset||0)){let m=n.valueNode;if(m&&i>m.offset+m.length)return;p=n.keyNode.value,n=n.parent}if(n&&(p!==void 0||n.type==="array")){let m=this.evaluateSeparatorAfter(s,c),h=r.getMatchingSchemas(e.schema,n.offset,d);for(let y of h)if(y.node===n&&!y.inverted&&y.schema){if(n.type==="array"&&y.schema.items){let w=a;if(y.schema.uniqueItems){let x=new Set;n.children.forEach(k=>{k.type!=="array"&&k.type!=="object"&&x.add(this.getLabelForValue(ps(k)))}),w={...a,add(k){x.has(k.label)||a.add(k)}}}if(Array.isArray(y.schema.items)){let x=this.findItemAtOffset(n,s,i);x<y.schema.items.length&&this.addSchemaValueCompletions(y.schema.items[x],m,w,u)}else this.addSchemaValueCompletions(y.schema.items,m,w,u)}if(p!==void 0){let w=!1;if(y.schema.properties){let x=y.schema.properties[p];x&&(w=!0,this.addSchemaValueCompletions(x,m,a,u))}if(y.schema.patternProperties&&!w){for(let x of Object.keys(y.schema.patternProperties))if(Qo(x)?.test(p)){w=!0;let v=y.schema.patternProperties[x];this.addSchemaValueCompletions(v,m,a,u)}}if(y.schema.additionalProperties&&!w){let x=y.schema.additionalProperties;this.addSchemaValueCompletions(x,m,a,u)}}}p==="$schema"&&!n.parent&&this.addDollarSchemaCompletions(m,a),u.boolean&&(this.addBooleanValueCompletion(!0,m,a),this.addBooleanValueCompletion(!1,m,a)),u.null&&this.addNullValueCompletion(m,a)}}getContributedValueCompletions(e,r,n,i,s,a){if(!r)this.contributions.forEach(u=>{let c=u.collectDefaultCompletions(i.uri,s);c&&a.push(c)});else if((r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(r=r.parent),r&&r.type==="property"&&n>(r.colonOffset||0)){let u=r.keyNode.value,c=r.valueNode;if((!c||n<=c.offset+c.length)&&r.parent){let p=pp(r.parent);this.contributions.forEach(d=>{let m=d.collectValueCompletions(i.uri,p,u,s);m&&a.push(m)})}}}addSchemaValueCompletions(e,r,n,i){typeof e=="object"&&(this.addEnumValueCompletions(e,r,n),this.addDefaultValueCompletions(e,r,n),this.collectTypes(e,i),Array.isArray(e.allOf)&&e.allOf.forEach(s=>this.addSchemaValueCompletions(s,r,n,i)),Array.isArray(e.anyOf)&&e.anyOf.forEach(s=>this.addSchemaValueCompletions(s,r,n,i)),Array.isArray(e.oneOf)&&e.oneOf.forEach(s=>this.addSchemaValueCompletions(s,r,n,i)))}addDefaultValueCompletions(e,r,n,i=0){let s=!1;if(Zn(e.default)){let a=e.type,u=e.default;for(let p=i;p>0;p--)u=[u],a="array";let c={kind:this.getSuggestionKind(a),label:this.getLabelForValue(u),insertText:this.getInsertTextForValue(u,r),insertTextFormat:Ct.Snippet};this.doesSupportsLabelDetails()?c.labelDetails={description:hp.t("Default value")}:c.detail=hp.t("Default value"),n.add(c),s=!0}Array.isArray(e.examples)&&e.examples.forEach(a=>{let u=e.type,c=a;for(let p=i;p>0;p--)c=[c],u="array";n.add({kind:this.getSuggestionKind(u),label:this.getLabelForValue(c),insertText:this.getInsertTextForValue(c,r),insertTextFormat:Ct.Snippet}),s=!0}),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach(a=>{let u=e.type,c=a.body,p=a.label,d,m;if(Zn(c)){let h=e.type;for(let y=i;y>0;y--)c=[c],h="array";d=this.getInsertTextForSnippetValue(c,r),m=this.getFilterTextForSnippetValue(c),p=p||this.getLabelForSnippetValue(c)}else if(typeof a.bodyText=="string"){let h="",y="",w="";for(let x=i;x>0;x--)h=h+w+`[
1186
+ `,y=y+`
1187
+ `+w+"]",w+=" ",u="array";d=h+w+a.bodyText.split(`
1188
+ `).join(`
1189
+ `+w)+y+r,p=p||d,m=d.replace(/[\n]/g,"")}else return;n.add({kind:this.getSuggestionKind(u),label:p,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:d,insertTextFormat:Ct.Snippet,filterText:m}),s=!0}),!s&&typeof e.items=="object"&&!Array.isArray(e.items)&&i<5&&this.addDefaultValueCompletions(e.items,r,n,i+1)}addEnumValueCompletions(e,r,n){if(Zn(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,r),insertTextFormat:Ct.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let i=0,s=e.enum.length;i<s;i++){let a=e.enum[i],u=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&i<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?u=this.fromMarkup(e.markdownEnumDescriptions[i]):e.enumDescriptions&&i<e.enumDescriptions.length&&(u=e.enumDescriptions[i]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,r),insertTextFormat:Ct.Snippet,sortText:e.enumSortTexts?.[i],detail:e.enumDetails?.[i],documentation:u})}}collectTypes(e,r){if(Array.isArray(e.enum)||Zn(e.const))return;let n=e.type;Array.isArray(n)?n.forEach(i=>r[i]=!0):n&&(r[n]=!0)}addFillerValueCompletions(e,r,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},r),insertTextFormat:Ct.Snippet,detail:hp.t("New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],r),insertTextFormat:Ct.Snippet,detail:hp.t("New array"),documentation:""})}addBooleanValueCompletion(e,r,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,r),insertTextFormat:Ct.Snippet,documentation:""})}addNullValueCompletion(e,r){r.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:Ct.Snippet,documentation:""})}addDollarSchemaCompletions(e,r){this.schemaService.getRegisteredSchemaIds(i=>i==="http"||i==="https").forEach(i=>{i.startsWith("https://json-schema.org/draft-")&&(i=i+"#"),r.add({kind:Dr.Module,label:this.getLabelForValue(i),filterText:this.getFilterTextForValue(i),insertText:this.getInsertTextForValue(i,e),insertTextFormat:Ct.Snippet,documentation:""})})}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,r){let n=JSON.stringify(e,null," ");return n==="{}"?"{$1}"+r:n==="[]"?"[$1]"+r:this.getInsertTextForPlainText(n+r)}getInsertTextForSnippetValue(e,r){return Mg(e,"",i=>typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i))+r}getInsertTextForGuessedValue(e,r){switch(typeof e){case"object":return e===null?"${1:null}"+r:this.getInsertTextForValue(e,r);case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+r;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+r}return this.getInsertTextForValue(e,r)}getSuggestionKind(e){if(Array.isArray(e)){let r=e;e=r.length>0?r[0]:void 0}if(!e)return Dr.Value;switch(e){case"string":return Dr.Value;case"object":return Dr.Module;case"property":return Dr.Property;default:return Dr.Value}}getLabelTextForMatchingNode(e,r){switch(e.type){case"array":return"[]";case"object":return"{}";default:return r.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,r,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:let i=r.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(e,r,n,i){let s=this.getInsertTextForValue(e,"");if(!n)return s;let a=s+": ",u,c=0;if(r){if(Array.isArray(r.defaultSnippets)){if(r.defaultSnippets.length===1){let p=r.defaultSnippets[0].body;Zn(p)&&(u=this.getInsertTextForSnippetValue(p,""))}c+=r.defaultSnippets.length}if(r.enum&&(!u&&r.enum.length===1&&(u=this.getInsertTextForGuessedValue(r.enum[0],"")),c+=r.enum.length),Zn(r.const)&&(u||(u=this.getInsertTextForGuessedValue(r.const,"")),c++),Zn(r.default)&&(u||(u=this.getInsertTextForGuessedValue(r.default,"")),c++),Array.isArray(r.examples)&&r.examples.length&&(u||(u=this.getInsertTextForGuessedValue(r.examples[0],"")),c+=r.examples.length),c===0){let p=Array.isArray(r.type)?r.type[0]:r.type;switch(p||(r.properties?p="object":r.items&&(p="array")),p){case"boolean":u="$1";break;case"string":u='"$1"';break;case"object":u="{$1}";break;case"array":u="[$1]";break;case"number":case"integer":u="${1:0}";break;case"null":u="${1:null}";break;default:return s}}}return(!u||c>1)&&(u="$1"),a+u+i}getCurrentWord(e,r){let n=r-1,i=e.getText();for(;n>=0&&`
1190
+ \r\v":{[,]}`.indexOf(i.charAt(n))===-1;)n--;return i.substring(n+1,r)}evaluateSeparatorAfter(e,r){let n=Qn(e.getText(),!0);switch(n.setPosition(r),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,r,n){let i=Qn(r.getText(),!0),s=e.items;for(let a=s.length-1;a>=0;a--){let u=s[a];if(n>u.offset+u.length)return i.setPosition(u.offset+u.length),i.scan()===5&&n>=i.getTokenOffset()+i.getTokenLength()?a+1:a;if(n>=u.offset)return a}return 0}isInComment(e,r,n){let i=Qn(e.getText(),!1);i.setPosition(r);let s=i.scan();for(;s!==17&&i.getTokenOffset()+i.getTokenLength()<n;)s=i.scan();return(s===12||s===13)&&i.getTokenOffset()<=n}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:fs.Markdown,value:e}}doesSupportMarkdown(){if(!Zn(this.supportsMarkdown)){let e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&e.indexOf(fs.Markdown)!==-1}return this.supportsMarkdown}doesSupportsCommitCharacters(){return Zn(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return Zn(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}});function wx(t){if(t)return t.trim().replace(/[\\`*_{}[\]()<>#+\-.!]/g,"\\$&").replace(/(^ +)/mg,(e,r)=>"&nbsp;".repeat(r.length)).replace(/( {2,})/g,(e,r)=>" "+"&nbsp;".repeat(r.length-1)).replace(/(\t+)/g,(e,r)=>"&nbsp;".repeat(r.length*4)).replace(/\n/g,`\\
1191
+ `)}function Rne(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}var Fg,KR=at(()=>{b();Ec();ri();Fg=class{constructor(e,r=[],n){this.schemaService=e,this.contributions=r,this.promise=n||Promise}doHover(e,r,n){let i=e.offsetAt(r),s=n.getNodeFromOffset(i);if(!s||(s.type==="object"||s.type==="array")&&i>s.offset+1&&i<s.offset+s.length-1)return this.promise.resolve(null);let a=s;if(s.type==="string"){let d=s.parent;if(d&&d.type==="property"&&d.keyNode===s&&(s=d.valueNode,!s))return this.promise.resolve(null)}let u=Ee.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length)),c=d=>({contents:d,range:u}),p=pp(s);for(let d=this.contributions.length-1;d>=0;d--){let h=this.contributions[d].getInfoContribution(e.uri,p);if(h)return h.then(y=>c(y))}return this.schemaService.getSchemaForResource(e.uri,n).then(d=>{if(!d)return null;let m,h,y,w,x=n.getMatchingSchemas(d.schema,s.offset).filter(v=>v.node===s&&!v.inverted).map(v=>v.schema);for(let v of x)if(m=m||v.title,h=h||v.markdownDescription||wx(v.description),v.enum){let I=v.enum.indexOf(ps(s));v.markdownEnumDescriptions?y=v.markdownEnumDescriptions[I]:v.enumDescriptions&&(y=wx(v.enumDescriptions[I])),y&&(w=v.enum[I],typeof w!="string"&&(w=JSON.stringify(w)))}let k="";return m&&(k=wx(m)),h&&(k.length>0&&(k+=`
1192
+
1193
+ `),k+=h),y&&(k.length>0&&(k+=`
1194
+
1195
+ `),k+=`\`${Rne(w)}\`: ${y}`),c([k])})}}});function YR(t){if(t&&typeof t=="object"){if(ki(t.allowComments))return t.allowComments;if(t.allOf)for(let e of t.allOf){let r=YR(e);if(ki(r))return r}}}function XR(t){if(t&&typeof t=="object"){if(ki(t.allowTrailingCommas))return t.allowTrailingCommas;let e=t;if(ki(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(t.allOf)for(let r of t.allOf){let n=XR(r);if(ki(n))return n}}}function jg(t){switch(t){case"error":return Mr.Error;case"warning":return Mr.Warning;case"ignore":return}}var QR,Bg,Mne,ZR=at(()=>{b();ri();QR=Uu(Zo());sp();Bg=class{constructor(e,r){this.jsonSchemaService=e,this.promise=r,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=e.validate!==!1,this.commentSeverity=e.allowComments?void 0:Mr.Error)}doValidation(e,r,n,i){if(!this.validationEnabled)return this.promise.resolve([]);let s=[],a={},u=p=>{let d=p.range.start.line+" "+p.range.start.character+" "+p.message;a[d]||(a[d]=!0,s.push(p))},c=p=>{let d=n?.trailingCommas?jg(n.trailingCommas):Mr.Error,m=n?.comments?jg(n.comments):this.commentSeverity,h=n?.schemaValidation?jg(n.schemaValidation):Mr.Warning,y=n?.schemaRequest?jg(n.schemaRequest):Mr.Warning;if(p){let w=(x,k,v)=>{if(r.root&&y){let I=r.root,T=I.type==="object"?I.properties[0]:void 0;if(T&&T.keyNode.value==="$schema"){let S=T.valueNode||T,L=Ee.create(e.positionAt(S.offset),e.positionAt(S.offset+S.length));u(ei.create(L,x,y,k,"json",v))}else{let S=Ee.create(e.positionAt(I.offset),e.positionAt(I.offset+1));u(ei.create(S,x,y,k,"json",v))}}};if(p.errors.length){let x=p.errors[0];w(x.message,x.code,x.relatedInformation)}else if(h){for(let k of p.warnings)w(k.message,k.code,k.relatedInformation);let x=r.validate(e,p.schema,h,n?.schemaDraft);x&&x.forEach(u)}YR(p.schema)&&(m=void 0),XR(p.schema)&&(d=void 0)}for(let w of r.syntaxErrors){if(w.code===Me.TrailingComma){if(typeof d!="number")continue;w.severity=d}u(w)}if(typeof m=="number"){let w=QR.t("Comments are not permitted in JSON.");r.comments.forEach(x=>{u(ei.create(x,w,m,Me.CommentNotPermitted))})}return s};if(i){let p=i.id||"schemaservice://untitled/"+Mne++;return this.jsonSchemaService.registerExternalSchema({uri:p,schema:i}).getResolvedSchema().then(m=>c(m))}return this.jsonSchemaService.getSchemaForResource(e.uri,r).then(p=>c(p))}getLanguageStatus(e,r){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,r)}}},Mne=0});function Jt(t){return t<48?0:t<=57?t-48:(t<97&&(t+=32),t>=97&&t<=102?t-97+10:0)}function eM(t){if(t[0]==="#")switch(t.length){case 4:return{red:Jt(t.charCodeAt(1))*17/255,green:Jt(t.charCodeAt(2))*17/255,blue:Jt(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Jt(t.charCodeAt(1))*17/255,green:Jt(t.charCodeAt(2))*17/255,blue:Jt(t.charCodeAt(3))*17/255,alpha:Jt(t.charCodeAt(4))*17/255};case 7:return{red:(Jt(t.charCodeAt(1))*16+Jt(t.charCodeAt(2)))/255,green:(Jt(t.charCodeAt(3))*16+Jt(t.charCodeAt(4)))/255,blue:(Jt(t.charCodeAt(5))*16+Jt(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Jt(t.charCodeAt(1))*16+Jt(t.charCodeAt(2)))/255,green:(Jt(t.charCodeAt(3))*16+Jt(t.charCodeAt(4)))/255,blue:(Jt(t.charCodeAt(5))*16+Jt(t.charCodeAt(6)))/255,alpha:(Jt(t.charCodeAt(7))*16+Jt(t.charCodeAt(8)))/255}}}var tM=at(()=>{b()});function Fa(t,e){return Ee.create(t.positionAt(e.offset),t.positionAt(e.offset+e.length))}function rM(t){return ps(t)||nM.t("<empty>")}var nM,$g,iM=at(()=>{b();Ec();ap();tM();nM=Uu(Zo());ri();$g=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,r,n={resultLimit:Number.MAX_VALUE}){let i=r.root;if(!i)return[];let s=n.resultLimit||Number.MAX_VALUE,a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||Ra(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let h=[];for(let y of i.items)if(y.type==="object"){for(let w of y.properties)if(w.keyNode.value==="key"&&w.valueNode){let x=Ks.create(e.uri,Fa(e,y));if(h.push({name:rM(w.valueNode),kind:ti.Function,location:x}),s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),h}}return h}let u=[{node:i,containerName:""}],c=0,p=!1,d=[],m=(h,y)=>{h.type==="array"?h.items.forEach(w=>{w&&u.push({node:w,containerName:y})}):h.type==="object"&&h.properties.forEach(w=>{let x=w.valueNode;if(x)if(s>0){s--;let k=Ks.create(e.uri,Fa(e,w)),v=y?y+"."+w.keyNode.value:w.keyNode.value;d.push({name:this.getKeyLabel(w),kind:this.getSymbolKind(x.type),location:k,containerName:y}),u.push({node:x,containerName:v})}else p=!0})};for(;c<u.length;){let h=u[c++];m(h.node,h.containerName)}return p&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),d}findDocumentSymbols2(e,r,n={resultLimit:Number.MAX_VALUE}){let i=r.root;if(!i)return[];let s=n.resultLimit||Number.MAX_VALUE,a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||Ra(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let h=[];for(let y of i.items)if(y.type==="object"){for(let w of y.properties)if(w.keyNode.value==="key"&&w.valueNode){let x=Fa(e,y),k=Fa(e,w.keyNode);if(h.push({name:rM(w.valueNode),kind:ti.Function,range:x,selectionRange:k}),s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),h}}return h}let u=[],c=[{node:i,result:u}],p=0,d=!1,m=(h,y)=>{h.type==="array"?h.items.forEach((w,x)=>{if(w)if(s>0){s--;let k=Fa(e,w),v=k,T={name:String(x),kind:this.getSymbolKind(w.type),range:k,selectionRange:v,children:[]};y.push(T),c.push({result:T.children,node:w})}else d=!0}):h.type==="object"&&h.properties.forEach(w=>{let x=w.valueNode;if(x)if(s>0){s--;let k=Fa(e,w),v=Fa(e,w.keyNode),I=[],T={name:this.getKeyLabel(w),kind:this.getSymbolKind(x.type),range:k,selectionRange:v,children:I,detail:this.getDetail(x)};y.push(T),c.push({result:I,node:x})}else d=!0})};for(;p<c.length;){let h=c[p++];m(h.node,h.result)}return d&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),u}getSymbolKind(e){switch(e){case"object":return ti.Module;case"string":return ti.String;case"number":return ti.Number;case"array":return ti.Array;case"boolean":return ti.Boolean;default:return ti.Variable}}getKeyLabel(e){let r=e.keyNode.value;return r&&(r=r.replace(/[\n]/g,"\u21B5")),r&&r.trim()?r:`"${r}"`}getDetail(e){if(e){if(e.type==="boolean"||e.type==="number"||e.type==="null"||e.type==="string")return String(e.value);if(e.type==="array")return e.children.length?void 0:"[]";if(e.type==="object")return e.children.length?void 0:"{}"}}findDocumentColors(e,r,n){return this.schemaService.getSchemaForResource(e.uri,r).then(i=>{let s=[];if(i){let a=n&&typeof n.resultLimit=="number"?n.resultLimit:Number.MAX_VALUE,u=r.getMatchingSchemas(i.schema),c={};for(let p of u)if(!p.inverted&&p.schema&&(p.schema.format==="color"||p.schema.format==="color-hex")&&p.node&&p.node.type==="string"){let d=String(p.node.offset);if(!c[d]){let m=eM(ps(p.node));if(m){let h=Fa(e,p.node);s.push({color:m,range:h})}if(c[d]=!0,a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),s}}}return s})}getColorPresentations(e,r,n,i){let s=[],a=Math.round(n.red*255),u=Math.round(n.green*255),c=Math.round(n.blue*255);function p(m){let h=m.toString(16);return h.length!==2?"0"+h:h}let d;return n.alpha===1?d=`#${p(a)}${p(u)}${p(c)}`:d=`#${p(a)}${p(u)}${p(c)}${p(Math.round(n.alpha*255))}`,s.push({label:d,textEdit:Zr.replace(i,JSON.stringify(d))}),s}}});var sM,aM=at(()=>{b();sM={$id:"https://json-schema.org/draft/2019-09/schema",$schema:"https://json-schema.org/draft/2019-09/schema",title:"(Flattened static) Core and Validation specifications meta-schema",type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/$defs/stringArray"}]}},$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$ref:"#"},default:{}},additionalItems:{$ref:"#"},unevaluatedItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$ref:"#"},additionalProperties:{$ref:"#"},unevaluatedProperties:{$ref:"#"},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$ref:"#"}},propertyNames:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$ref:"#"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$ref:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var oM,uM=at(()=>{b();oM={$id:"https://json-schema.org/draft/2020-12/schema",$schema:"https://json-schema.org/draft/2020-12/schema",title:"(Flattened static) Core and Validation specifications meta-schema",type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/$defs/stringArray"}]}},$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},$ref:{type:"string",format:"uri-reference"},$dynamicRef:{type:"string",format:"uri-reference"},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$ref:"#"},default:{}},prefixItems:{$ref:"#/$defs/schemaArray"},items:{$ref:"#"},contains:{$ref:"#"},additionalProperties:{$ref:"#"},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$ref:"#"}},propertyNames:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$ref:"#"},unevaluatedItems:{$ref:"#"},unevaluatedProperties:{$ref:"#"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$ref:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var De,Vg,Dne,cM=at(()=>{b();aM();uM();De=Uu(Zo()),Vg={schemaAssociations:[],schemas:{"https://json-schema.org/draft-04/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"https://json-schema.org/draft-07/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},"https://json-schema.org/draft/2020-12/schema":oM,"https://json-schema.org/draft/2019-09/schema":sM}},Dne={id:De.t("A unique identifier for the schema."),$schema:De.t("The schema to verify this document against."),title:De.t("A descriptive title of the schema."),description:De.t("A long description of the schema. Used in hover menus and suggestions."),default:De.t("A default value. Used by suggestions."),multipleOf:De.t("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:De.t("The maximum numerical value, inclusive by default."),exclusiveMaximum:De.t("Makes the maximum property exclusive."),minimum:De.t("The minimum numerical value, inclusive by default."),exclusiveMinimum:De.t("Makes the minimum property exclusive."),maxLength:De.t("The maximum length of a string."),minLength:De.t("The minimum length of a string."),pattern:De.t("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:De.t("For arrays, only when items is set as an array. If items are a schema, this schema validates items after the ones specified by the items schema. If false, additional items will cause validation to fail."),items:De.t("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:De.t("The maximum number of items that can be inside an array. Inclusive."),minItems:De.t("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:De.t("If all of the items in the array must be unique. Defaults to false."),maxProperties:De.t("The maximum number of properties an object can have. Inclusive."),minProperties:De.t("The minimum number of properties an object can have. Inclusive."),required:De.t("An array of strings that lists the names of all properties required on this object."),additionalProperties:De.t("Either a schema or a boolean. If a schema, used to validate all properties not matched by 'properties', 'propertyNames', or 'patternProperties'. If false, any properties not defined by the adjacent keywords will cause this schema to fail."),definitions:De.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:De.t("A map of property names to schemas for each property."),patternProperties:De.t("A map of regular expressions on property names to schemas for matching properties."),dependencies:De.t("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:De.t("The set of literal values that are valid."),type:De.t("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:De.t("Describes the format expected for the value. By default, not used for validation"),allOf:De.t("An array of schemas, all of which must match."),anyOf:De.t("An array of schemas, where at least one must match."),oneOf:De.t("An array of schemas, exactly one of which must match."),not:De.t("A schema which must not match."),$id:De.t("A unique identifier for the schema."),$ref:De.t("Reference a definition hosted on any location."),$comment:De.t("Comments from schema authors to readers or maintainers of the schema."),readOnly:De.t("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:De.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:De.t('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:De.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:De.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:De.t("Describes the media type of a string property."),contentEncoding:De.t("Describes the content encoding of a string property."),if:De.t('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:De.t('The "then" subschema is used for validation when the "if" subschema succeeds.'),else:De.t('The "else" subschema is used for validation when the "if" subschema fails.')};for(let t in Vg.schemas){let e=Vg.schemas[t];for(let r in e.properties){let n=e.properties[r];typeof n=="boolean"&&(n=e.properties[r]={});let i=Dne[r];i&&(n.description=i)}}});function lM(t,e){if(typeof t!="string")throw new TypeError("Expected a string");let r=String(t),n="",i=e?!!e.extended:!1,s=e?!!e.globstar:!1,a=!1,u=e&&typeof e.flags=="string"?e.flags:"",c;for(let p=0,d=r.length;p<d;p++)switch(c=r[p],c){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":n+="\\"+c;break;case"?":if(i){n+=".";break}case"[":case"]":if(i){n+=c;break}case"{":if(i){a=!0,n+="(";break}case"}":if(i){a=!1,n+=")";break}case",":if(a){n+="|";break}n+="\\"+c;break;case"*":let m=r[p-1],h=1;for(;r[p+1]==="*";)h++,p++;let y=r[p+1];s?h>1&&(m==="/"||m===void 0||m==="{"||m===",")&&(y==="/"||y===void 0||y===","||y==="}")?(y==="/"?p++:m==="/"&&n.endsWith("\\/")&&(n=n.substr(0,n.length-2)),n+="((?:[^/]*(?:/|$))*)"):n+="([^/]*)":n+=".*";break;default:n+=c}return(!u||!~u.indexOf("g"))&&(n="^"+n+"$"),new RegExp(n,u)}var fM=at(()=>{b()});function hs(t,e,r){let n=r?[{location:{uri:r,range:Ee.create(0,0,0,0)},message:t}]:void 0;return{message:t,code:e,relatedInformation:n}}function pM(t){try{return Ic.parse(t).with({fragment:null,query:null}).toString(!0)}catch{return t}}function dp(t){try{let e=Ic.parse(t);if(e.scheme==="file")return e.fsPath}catch{}return t}var Ki,Fne,jne,xx,kx,eu,Ug,Wg,Bne,hM=at(()=>{b();ns();fx();ap();Ec();ri();Ki=Uu(Zo());fM();sp();ux();Fne="!",jne="/",xx=class{constructor(e,r,n){this.folderUri=r,this.uris=n,this.globWrappers=[];try{for(let i of e){let s=i[0]!==Fne;s||(i=i.substring(1)),i.length>0&&(i[0]===jne&&(i=i.substring(1)),this.globWrappers.push({regexp:lM("**/"+i,{extended:!0,globstar:!0}),include:s}))}r&&(r=pM(r),r.endsWith("/")||(r=r+"/"),this.folderUri=r)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let r=!1;for(let{regexp:n,include:i}of this.globWrappers)n.test(e)&&(r=i);return r}getURIs(){return this.uris}},kx=class{constructor(e,r,n){this.service=e,this.uri=r,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new eu(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this))),this.resolvedSchema}clearSchema(){let e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},eu=class{constructor(e,r=[]){this.schema=e,this.errors=r}};Ug=class{constructor(e,r=[],n=[],i){this.schema=e,this.errors=r,this.warnings=n,this.schemaDraft=i}getSection(e){let r=this.getSectionRecursive(e,this.schema);if(r)return Fr(r)}getSectionRecursive(e,r){if(!r||typeof r=="boolean"||e.length===0)return r;let n=e.shift();if(r.properties&&typeof r.properties[n])return this.getSectionRecursive(e,r.properties[n]);if(r.patternProperties){for(let i of Object.keys(r.patternProperties))if(Qo(i)?.test(n))return this.getSectionRecursive(e,r.patternProperties[i])}else{if(typeof r.additionalProperties=="object")return this.getSectionRecursive(e,r.additionalProperties);if(n.match("[0-9]+")){if(Array.isArray(r.items)){let i=parseInt(n,10);if(!isNaN(i)&&r.items[i])return this.getSectionRecursive(e,r.items[i])}else if(r.items)return this.getSectionRecursive(e,r.items)}}}},Wg=class{constructor(e,r,n){this.contextService=r,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(r=>{let n=Ic.parse(r).scheme;return n!=="schemaservice"&&(!e||e(n))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let r=!1;e=Ys(e);let n=[e],i=Object.keys(this.schemasById).map(s=>this.schemasById[s]);for(;n.length;){let s=n.pop();for(let a=0;a<i.length;a++){let u=i[a];u&&(u.uri===s||u.dependencies.has(s))&&(u.uri!==s&&n.push(u.uri),u.clearSchema()&&(r=!0),i[a]=void 0)}}return r}setSchemaContributions(e){if(e.schemas){let r=e.schemas;for(let n in r){let i=Ys(n);this.contributionSchemas[i]=this.addSchemaHandle(i,r[n])}}if(Array.isArray(e.schemaAssociations)){let r=e.schemaAssociations;for(let n of r){let i=n.uris.map(Ys),s=this.addFilePatternAssociation(n.pattern,n.folderUri,i);this.contributionAssociations.push(s)}}}addSchemaHandle(e,r){let n=new kx(this,e,r);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,r){return this.schemasById[e]||this.addSchemaHandle(e,r)}addFilePatternAssociation(e,r,n){let i=new xx(e,r,n);return this.filePatternAssociations.push(i),i}registerExternalSchema(e){let r=Ys(e.uri);return this.registeredSchemasIds[r]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[r]),e.schema?this.addSchemaHandle(r,e.schema):this.getOrAddSchemaHandle(r)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(let e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(let e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){let r=Ys(e),n=this.schemasById[r];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){let r=Ki.t("Unable to load schema from '{0}'. No schema request service available",dp(e));return this.promise.resolve(new eu({},[hs(r,Me.SchemaResolveError,e)]))}return this.requestService(e).then(r=>{if(!r){let a=Ki.t("Unable to load schema from '{0}': No content.",dp(e));return new eu({},[hs(a,Me.SchemaResolveError,e)])}let n=[];r.charCodeAt(0)===65279&&(n.push(hs(Ki.t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",dp(e)),Me.SchemaResolveError,e)),r=r.trimStart());let i={},s=[];return i=Xb(r,s),s.length&&n.push(hs(Ki.t("Unable to parse content from '{0}': Parse error at offset {1}.",dp(e),s[0].offset),Me.SchemaResolveError,e)),new eu(i,n)},r=>{let{message:n,code:i}=r;if(typeof n!="string"){let u=r.toString(),c=r.toString().split("Error: ");c.length>1&&(u=c[1]),Ra(u,".")&&(u=u.substr(0,u.length-1)),n=u}let s=Me.SchemaResolveError;typeof i=="number"&&i<65536&&(s+=i);let a=Ki.t("Unable to load schema from '{0}': {1}.",dp(e),n);return new eu({},[hs(a,s,e)])})}resolveSchemaContent(e,r){let n=e.errors.slice(0),i=e.schema,s=i.$schema?vx(i.$schema):void 0;if(s===hn.v3)return this.promise.resolve(new Ug({},[hs(Ki.t("Draft-03 schemas are not supported."),Me.SchemaUnsupportedFeature)],[],s));let a=new Set,u=this.contextService,c=(x,k)=>{k=decodeURIComponent(k);let v=x;return k[0]==="/"&&(k=k.substring(1)),k.split("/").some(I=>(I=I.replace(/~1/g,"/").replace(/~0/g,"~"),v=v[I],!v)),v},p=(x,k,v)=>(k.anchors||(k.anchors=w(x)),k.anchors.get(v)),d=(x,k)=>{for(let v in k)k.hasOwnProperty(v)&&v!=="id"&&v!=="$id"&&(x[v]=k[v])},m=(x,k,v,I)=>{let T;if(I===void 0||I.length===0?T=k:I.charAt(0)==="/"?T=c(k,I):T=p(k,v,I),T)d(x,T);else{let S=Ki.t("$ref '{0}' in '{1}' can not be resolved.",I||"",v.uri);n.push(hs(S,Me.SchemaResolveError))}},h=(x,k,v,I)=>{u&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/.*/.test(k)&&(k=u.resolveRelativePath(k,I.uri)),k=Ys(k);let T=this.getOrAddSchemaHandle(k);return T.getUnresolvedSchema().then(S=>{if(I.dependencies.add(k),S.errors.length){let L=S.errors[0],R=v?k+"#"+v:k,M=v?Ki.t("Problems loading reference '{0}': {1}",v,L.message):L.message;n.push(hs(M,L.code,k))}return m(x,S.schema,T,v),y(x,S.schema,T)})},y=(x,k,v)=>{let I=[];return this.traverseNodes(x,T=>{let S=new Set;for(;T.$ref;){let L=T.$ref,R=L.split("#",2);if(delete T.$ref,R[0].length>0){I.push(h(T,R[0],R[1],v));return}else if(!S.has(L)){let M=R[1];m(T,k,v,M),S.add(L)}}T.$recursiveRef&&a.add("$recursiveRef"),T.$dynamicRef&&a.add("$dynamicRef")}),this.promise.all(I)},w=x=>{let k=new Map;return this.traverseNodes(x,v=>{let I=v.$id||v.id,T=pg(I)&&I.charAt(0)==="#"?I.substring(1):v.$anchor;T&&(k.has(T)?n.push(hs(Ki.t("Duplicate anchor declaration: '{0}'",T),Me.SchemaResolveError)):k.set(T,v)),v.$recursiveAnchor&&a.add("$recursiveAnchor"),v.$dynamicAnchor&&a.add("$dynamicAnchor")}),k};return y(i,i,r).then(x=>{let k=[];return a.size&&k.push(hs(Ki.t("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(a.keys()).join(", ")),Me.SchemaUnsupportedFeature)),new Ug(i,n,k,s)})}traverseNodes(e,r){if(!e||typeof e!="object")return Promise.resolve(null);let n=new Set,i=(...d)=>{for(let m of d)ls(m)&&c.push(m)},s=(...d)=>{for(let m of d)if(ls(m))for(let h in m){let w=m[h];ls(w)&&c.push(w)}},a=(...d)=>{for(let m of d)if(Array.isArray(m))for(let h of m)ls(h)&&c.push(h)},u=d=>{if(Array.isArray(d))for(let m of d)ls(m)&&c.push(m);else ls(d)&&c.push(d)},c=[e],p=c.pop();for(;p;)n.has(p)||(n.add(p),r(p),i(p.additionalItems,p.additionalProperties,p.not,p.contains,p.propertyNames,p.if,p.then,p.else,p.unevaluatedItems,p.unevaluatedProperties),s(p.definitions,p.$defs,p.properties,p.patternProperties,p.dependencies,p.dependentSchemas),a(p.anyOf,p.allOf,p.oneOf,p.prefixItems),u(p.items)),p=c.pop()}getSchemaFromProperty(e,r){if(r.root?.type==="object"){for(let n of r.root.properties)if(n.keyNode.value==="$schema"&&n.valueNode?.type==="string"){let i=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(i)&&(i=this.contextService.resolveRelativePath(i,e)),i}}}getAssociatedSchemas(e){let r=Object.create(null),n=[],i=pM(e);for(let s of this.filePatternAssociations)if(s.matchesPattern(i))for(let a of s.getURIs())r[a]||(n.push(a),r[a]=!0);return n}getSchemaURIsForResource(e,r){let n=r&&this.getSchemaFromProperty(e,r);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,r){if(r){let s=this.getSchemaFromProperty(e,r);if(s){let a=Ys(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;let n=this.getAssociatedSchemas(e),i=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:i},i}createCombinedSchema(e,r){if(r.length===1)return this.getOrAddSchemaHandle(r[0]);{let n="schemaservice://combinedSchema/"+encodeURIComponent(e),i={allOf:r.map(s=>({$ref:s}))};return this.addSchemaHandle(n,i)}}getMatchingSchemas(e,r,n){if(n){let i=n.id||"schemaservice://untitled/matchingSchemas/"+Bne++;return this.addSchemaHandle(i,n).getResolvedSchema().then(a=>r.getMatchingSchemas(a.schema).filter(u=>!u.inverted))}return this.getSchemaForResource(e.uri,r).then(i=>i?r.getMatchingSchemas(i.schema).filter(s=>!s.inverted):[])}},Bne=0});function dM(t,e){let r=[],n=[],i=[],s=-1,a=Qn(t.getText(),!1),u=a.scan();function c(w){r.push(w),n.push(i.length)}for(;u!==17;){switch(u){case 1:case 3:{let w=t.positionAt(a.getTokenOffset()).line,x={startLine:w,endLine:w,kind:u===1?"object":"array"};i.push(x);break}case 2:case 4:{let w=u===2?"object":"array";if(i.length>0&&i[i.length-1].kind===w){let x=i.pop(),k=t.positionAt(a.getTokenOffset()).line;x&&k>x.startLine+1&&s!==x.startLine&&(x.endLine=k-1,c(x),s=x.startLine)}break}case 13:{let w=t.positionAt(a.getTokenOffset()).line,x=t.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&w+1<t.lineCount?a.setPosition(t.offsetAt(bt.create(w+1,0))):w<x&&(c({startLine:w,endLine:x,kind:Ma.Comment}),s=w);break}case 12:{let x=t.getText().substr(a.getTokenOffset(),a.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(x){let k=t.positionAt(a.getTokenOffset()).line;if(x[1]){let v={startLine:k,endLine:k,kind:Ma.Region};i.push(v)}else{let v=i.length-1;for(;v>=0&&i[v].kind!==Ma.Region;)v--;if(v>=0){let I=i[v];i.length=v,k>I.startLine&&s!==I.startLine&&(I.endLine=k,c(I),s=I.startLine)}}}break}}u=a.scan()}let p=e&&e.rangeLimit;if(typeof p!="number"||r.length<=p)return r;e&&e.onRangeLimitExceeded&&e.onRangeLimitExceeded(t.uri);let d=[];for(let w of n)w<30&&(d[w]=(d[w]||0)+1);let m=0,h=0;for(let w=0;w<d.length;w++){let x=d[w];if(x){if(x+m>p){h=w;break}m+=x}}let y=[];for(let w=0;w<r.length;w++){let x=n[w];typeof x=="number"&&(x<h||x===h&&m++<p)&&y.push(r[w])}return y}var mM=at(()=>{b();ns();ri()});function gM(t,e,r){function n(u){let c=t.offsetAt(u),p=r.getNodeFromOffset(c,!0),d=[];for(;p;){switch(p.type){case"string":case"object":case"array":let h=p.offset+1,y=p.offset+p.length-1;h<y&&c>=h&&c<=y&&d.push(i(h,y)),d.push(i(p.offset,p.offset+p.length));break;case"number":case"boolean":case"null":case"property":d.push(i(p.offset,p.offset+p.length));break}if(p.type==="property"||p.parent&&p.parent.type==="array"){let h=a(p.offset+p.length,5);h!==-1&&d.push(i(p.offset,h))}p=p.parent}let m;for(let h=d.length-1;h>=0;h--)m=Xo.create(d[h],m);return m||(m=Xo.create(Ee.create(u,u))),m}function i(u,c){return Ee.create(t.positionAt(u),t.positionAt(c))}let s=Qn(t.getText(),!0);function a(u,c){return s.setPosition(u),s.scan()===c?s.getTokenOffset()+s.getTokenLength():-1}return e.map(n)}var yM=at(()=>{b();ri();ns()});function mp(t,e,r){let n;if(r){let s=t.offsetAt(r.start),a=t.offsetAt(r.end)-s;n={offset:s,length:a}}let i={tabSize:e?e.tabSize:4,insertSpaces:e?.insertSpaces===!0,insertFinalNewline:e?.insertFinalNewline===!0,eol:`
1196
+ `,keepLines:e?.keepLines===!0};return r1(t.getText(),n,i).map(s=>Zr.replace(Ee.create(t.positionAt(s.offset),t.positionAt(s.offset+s.length)),s.content))}var Ax=at(()=>{b();ns();ri()});function $ne(t,e){let r=t.propertyName.toLowerCase(),n=e.propertyName.toLowerCase();return r<n?-1:r>n?1:0}function Vne(t,e,r){let n=e.propertyName.toLowerCase(),i=t[0].propertyName.toLowerCase(),s=t[t.length-1].propertyName.toLowerCase();if(n<i)return 0;if(n>s)return t.length;let a=0,u=t.length-1;for(;a<=u;){let c=u+a>>1,p=r(e,t[c]);if(p>0)a=c+1;else if(p<0)u=c-1;else return c}return-a-1}var Kt,tu,_M=at(()=>{b();(function(t){t[t.Object=0]="Object",t[t.Array=1]="Array"})(Kt||(Kt={}));tu=class{constructor(e,r){this.propertyName=e??"",this.beginningLineNumber=r,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let r=0;e.noKeyName?r=this.childrenProperties.length:r=Vne(this.childrenProperties,e,$ne),r<0&&(r=r*-1-1),this.childrenProperties.splice(r,0,e)}else this.childrenProperties.push(e);return e}}});function bM(t,e){let r={...e,keepLines:!1},n=Cn.applyEdits(t,mp(t,r,void 0)),i=Cn.create("test://test.json","json",0,n),s=Une(i),a=Wne(i,s),u=mp(a,r,void 0),c=Cn.applyEdits(a,u);return[Zr.replace(Ee.create(bt.create(0,0),t.positionAt(t.getText().length)),c)]}function Une(t){let e=t.getText(),r=Qn(e,!1),n=new tu,i=n,s=n,a=n,u,c=0,p=0,d,m,h=-1,y=-1,w=0,x=0,k=[],v=!1,I=!1;for(;(u=r.scan())!==17;){if(v===!0&&u!==14&&u!==15&&u!==12&&u!==13&&s.endLineNumber===void 0){let T=r.getTokenStartLine();m===2||m===4?a.endLineNumber=T-1:s.endLineNumber=T-1,w=T,v=!1}if(I===!0&&u!==14&&u!==15&&u!==12&&u!==13&&(w=r.getTokenStartLine(),I=!1),r.getTokenStartLine()!==c){for(let T=c;T<r.getTokenStartLine();T++){let S=t.getText(Ee.create(bt.create(T,0),bt.create(T+1,0))).length;p=p+S}c=r.getTokenStartLine()}switch(u){case 10:{if(d===void 0||d===1||d===5&&k[k.length-1]===Kt.Object){let T=new tu(r.getTokenValue(),w);a=s,s=i.addChildProperty(T)}break}case 3:{if(n.beginningLineNumber===void 0&&(n.beginningLineNumber=r.getTokenStartLine()),k[k.length-1]===Kt.Object)i=s;else if(k[k.length-1]===Kt.Array){let T=new tu(r.getTokenValue(),w);T.noKeyName=!0,a=s,s=i.addChildProperty(T),i=s}k.push(Kt.Array),s.type=Kt.Array,w=r.getTokenStartLine(),w++;break}case 1:{if(n.beginningLineNumber===void 0)n.beginningLineNumber=r.getTokenStartLine();else if(k[k.length-1]===Kt.Array){let T=new tu(r.getTokenValue(),w);T.noKeyName=!0,a=s,s=i.addChildProperty(T)}s.type=Kt.Object,k.push(Kt.Object),i=s,w=r.getTokenStartLine(),w++;break}case 4:{x=r.getTokenStartLine(),k.pop(),s.endLineNumber===void 0&&(d===2||d===4)&&(s.endLineNumber=x-1,s.lastProperty=!0,s.lineWhereToAddComma=h,s.indexWhereToAddComa=y,a=s,s=s?s.parent:void 0,i=s),n.endLineNumber=x,w=x+1;break}case 2:{x=r.getTokenStartLine(),k.pop(),d!==1&&(s.endLineNumber===void 0&&(s.endLineNumber=x-1,s.lastProperty=!0,s.lineWhereToAddComma=h,s.indexWhereToAddComa=y),a=s,s=s?s.parent:void 0,i=s),n.endLineNumber=r.getTokenStartLine(),w=x+1;break}case 5:{x=r.getTokenStartLine(),s.endLineNumber===void 0&&(k[k.length-1]===Kt.Object||k[k.length-1]===Kt.Array&&(d===2||d===4))&&(s.endLineNumber=x,s.commaIndex=r.getTokenOffset()-p,s.commaLine=x),(d===2||d===4)&&(a=s,s=s?s.parent:void 0,i=s),w=x+1;break}case 13:{d===5&&h===r.getTokenStartLine()&&(k[k.length-1]===Kt.Array&&(m===2||m===4)||k[k.length-1]===Kt.Object)&&(k[k.length-1]===Kt.Array&&(m===2||m===4)||k[k.length-1]===Kt.Object)&&(s.endLineNumber=void 0,v=!0),(d===1||d===3)&&h===r.getTokenStartLine()&&(I=!0);break}}u!==14&&u!==13&&u!==12&&u!==15&&(m=d,d=u,h=r.getTokenStartLine(),y=r.getTokenOffset()+r.getTokenLength()-p)}return n}function Wne(t,e){if(e.childrenProperties.length===0)return t;let r=Cn.create("test://test.json","json",0,t.getText()),n=[];for(vM(n,e,e.beginningLineNumber);n.length>0;){let i=n.shift(),s=i.propertyTreeArray,a=i.beginningLineNumber;for(let u=0;u<s.length;u++){let c=s[u],p=Ee.create(bt.create(c.beginningLineNumber,0),bt.create(c.endLineNumber+1,0)),d=t.getText(p),m=Cn.create("test://test.json","json",0,d);if(c.lastProperty===!0&&u!==s.length-1){let w=c.lineWhereToAddComma-c.beginningLineNumber,x=c.indexWhereToAddComa,k={range:Ee.create(bt.create(w,x),bt.create(w,x)),text:","};Cn.update(m,[k],1)}else if(c.lastProperty===!1&&u===s.length-1){let w=c.commaIndex,k=c.commaLine-c.beginningLineNumber,v={range:Ee.create(bt.create(k,w),bt.create(k,w+1)),text:""};Cn.update(m,[v],1)}let h=c.endLineNumber-c.beginningLineNumber+1,y={range:Ee.create(bt.create(a,0),bt.create(a+h,0)),text:m.getText()};Cn.update(r,[y],1),vM(n,c,a),a=a+h}}return r}function Gne(t){t.sort((e,r)=>e.propertyName.localeCompare(r.propertyName))}function vM(t,e,r){if(e.childrenProperties.length!==0)if(e.type===Kt.Object){let n=1/0;for(let s of e.childrenProperties)s.beginningLineNumber<n&&(n=s.beginningLineNumber);let i=n-e.beginningLineNumber;r=r+i,Gne(e.childrenProperties),t.push(new Gg(r,e.childrenProperties))}else e.type===Kt.Array&&SM(t,e,r)}function SM(t,e,r){for(let n of e.childrenProperties){if(n.type===Kt.Object){let i=1/0;for(let a of n.childrenProperties)a.beginningLineNumber<i&&(i=a.beginningLineNumber);let s=i-n.beginningLineNumber;t.push(new Gg(r+n.beginningLineNumber-e.beginningLineNumber+s,n.childrenProperties))}n.type===Kt.Array&&SM(t,n,r+n.beginningLineNumber-e.beginningLineNumber)}}var Gg,wM=at(()=>{b();ns();ri();Ax();_M();Gg=class{constructor(e,r){this.beginningLineNumber=e,this.propertyTreeArray=r}}});function xM(t,e){let r=[];return e.visit(n=>{if(n.type==="property"&&n.keyNode.value==="$ref"&&n.valueNode?.type==="string"){let i=n.valueNode.value,s=zne(e,i);if(s){let a=t.positionAt(s.offset);r.push({target:`${t.uri}#${a.line+1},${a.character+1}`,range:Hne(t,n.valueNode)})}}return!0}),Promise.resolve(r)}function Hne(t,e){return Ee.create(t.positionAt(e.offset+1),t.positionAt(e.offset+e.length-1))}function zne(t,e){let r=Jne(e);return r?Ix(r,t.root):null}function Ix(t,e){if(!e)return null;if(t.length===0)return e;let r=t.shift();if(e&&e.type==="object"){let n=e.properties.find(i=>i.keyNode.value===r);return n?Ix(t,n.valueNode):null}else if(e&&e.type==="array"&&r.match(/^(0|[1-9][0-9]*)$/)){let n=Number.parseInt(r),i=e.items[n];return i?Ix(t,i):null}return null}function Jne(t){return t==="#"?[]:t[0]!=="#"||t[1]!=="/"?null:t.substring(2).split(/\//).map(Kne)}function Kne(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}var kM=at(()=>{b();ri()});var AM={};Lb(AM,{ClientCapabilities:()=>lx,CodeAction:()=>Og,CodeActionContext:()=>Eg,CodeActionKind:()=>Ig,Color:()=>op,ColorInformation:()=>mg,ColorPresentation:()=>gg,Command:()=>Da,CompletionItem:()=>kc,CompletionItemKind:()=>Dr,CompletionItemTag:()=>vg,CompletionList:()=>bg,Diagnostic:()=>ei,DiagnosticSeverity:()=>Mr,DocumentHighlight:()=>xg,DocumentHighlightKind:()=>wg,DocumentLink:()=>Ng,DocumentSymbol:()=>Ag,DocumentUri:()=>hg,ErrorCode:()=>Me,FoldingRange:()=>yg,FoldingRangeKind:()=>Ma,Hover:()=>Sg,InsertTextFormat:()=>Ct,Location:()=>Ks,MarkedString:()=>Ac,MarkupContent:()=>Yo,MarkupKind:()=>fs,Position:()=>bt,Range:()=>Ee,SchemaDraft:()=>hn,SelectionRange:()=>Xo,SymbolInformation:()=>kg,SymbolKind:()=>ti,TextDocument:()=>Cn,TextDocumentEdit:()=>up,TextEdit:()=>Zr,VersionedTextDocumentIdentifier:()=>_g,WorkspaceEdit:()=>cp,getLanguageService:()=>Qne,isSchemaResolveError:()=>yne});function Qne(t){let e=t.promiseConstructor||Promise,r=new Wg(t.schemaRequestService,t.workspaceContext,e);r.setSchemaContributions(Vg);let n=new Dg(r,t.contributions,e,t.clientCapabilities),i=new Fg(r,t.contributions,e),s=new $g(r),a=new Bg(r,e);return{configure:u=>{r.clearExternalSchemas(),u.schemas?.forEach(r.registerExternalSchema.bind(r)),a.configure(u)},resetSchema:u=>r.onResourceChange(u),doValidation:a.doValidation.bind(a),getLanguageStatus:a.getLanguageStatus.bind(a),parseJSONDocument:u=>HR(u,{collectComments:!0}),newJSONDocument:(u,c,p)=>GR(u,c,p),getMatchingSchemas:r.getMatchingSchemas.bind(r),doResolve:n.doResolve.bind(n),doComplete:n.doComplete.bind(n),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:i.doHover.bind(i),getFoldingRanges:dM,getSelectionRanges:gM,findDefinition:()=>Promise.resolve([]),findLinks:xM,format:(u,c,p)=>mp(u,p,c),sort:(u,c)=>bM(u,c)}}var IM=at(()=>{b();JR();KR();ZR();iM();Ec();cM();hM();mM();yM();wM();Ax();kM();ri()});var Ox=P(gp=>{"use strict";b();Object.defineProperty(gp,"__esModule",{value:!0});gp.JSONValidator=void 0;gp.isValid=TM;var Tx=(IM(),Pb(AM)),Yne=_t(),Ex=class t{static async create(e,r){if(e)return new t(await e.schemas(r.context))}constructor(e){this.validate=async(r,n)=>{let i=Tx.TextDocument.create(r,"json",0,n);return(await this.getOffsetDiagnostics(i)).map(a=>({message:a.message,startIndex:i.offsetAt(a.range.start),endIndex:i.offsetAt(a.range.end)}))},this.isValid=async(r,n)=>TM(this.service,r,n),this.schemas=(0,Yne.indexBy)(r=>r.uri,e),this.service=(0,Tx.getLanguageService)({schemaRequestService:this.getSchemaForURI.bind(this),workspaceContext:{resolveRelativePath:(r,n)=>new URL(r,n).toString()}}),this.service.configure({schemas:e.map(r=>({uri:r.uri,fileMatch:r.fileMatch}))})}async getOffsetDiagnostics(e){let r=this.service.parseJSONDocument(e);return this.service.doValidation(e,r,{schemaValidation:"error",trailingCommas:"ignore",comments:"ignore"})}async getSchemaForURI(e){var r;let n=(r=this.schemas[e])===null||r===void 0?void 0:r.schema;return n||`No schema for '${e}' found`}};gp.JSONValidator=Ex;async function TM(t,e,r){let n=Tx.TextDocument.create(e,"json",0,r),i=t.parseJSONDocument(n);return(await t.doValidation(n,i,{schemaValidation:"error",trailingCommas:"ignore",comments:"ignore"})).every(a=>a.severity!==1)}});var NM=P(Hg=>{"use strict";b();Object.defineProperty(Hg,"__esModule",{value:!0});Hg.createDisabledChecksModule=tie;Hg.findNextLinePosition=OM;var Xne=de(),Zne=qa(),eie=_t();function tie(){let t="@all",r=new Map;function n(a,u,c){let[p,d,m]=u.trim().match(/^(?:theme\-check\-(disable-next-line|disable|enable)) ?(.*)/)||[];(m?m.split(/,[ ]*/):[t]).forEach(y=>{let w=r.get(a.uri);if(d==="disable-next-line"&&!(0,eie.isError)(a.ast)){let x=OM(a.ast,c);x&&(w.has(y)||w.set(y,[]),w.get(y).push({from:x.start,to:x.end}))}if(d==="disable"&&(w.has(y)||w.set(y,[]),w.get(y).push({from:c.position.end})),d==="enable"){let x=w.get(y);if(x)x[x.length-1].to=c.position.start;else if(y===t)for(let k of w.values())for(let v of k)v.to||(v.to=c.position.start)}})}let i={meta:{schema:{}},create:({file:a})=>({async onCodePathStart(){r.set(a.uri,new Map)},async LiquidRawTag(u){u.name==="comment"&&n(a,u.body.value,u)},async LiquidTag(u){typeof u.markup!="string"||u.name!=="#"||n(a,u.markup,u)}})};function s(a){return[t,a.check].flatMap(c=>r.has(a.uri)?r.get(a.uri).has(c)?r.get(a.uri).get(c):[]:[]).some(c=>a.start.index>=c.from&&(!c.to||a.end.index<=c.to))}return{DisabledChecksVisitor:i,isDisabled:s}}function OM(t,e){let[r,n]=(0,Zne.findCurrentNode)(t,e.position.end),i=n.at(-1),s=n.at(-2),a=EM(i,r);if(!(!a&&(i&&(a=EM(s,i)),!a)))return"blockStartPosition"in a?a.blockStartPosition:a.position}function EM(t,e){if(!t)return;let r=[];t.type===Xne.LiquidHtmlNodeTypes.LiquidTag&&Array.isArray(t.markup)?r=t.markup:"children"in t&&(r=t.children||[]);let n=r.findIndex(s=>s===e);return n===-1?void 0:r.at(n+1)}});var DM=P(Oc=>{"use strict";b();Object.defineProperty(Oc,"__esModule",{value:!0});Oc.EXPANSION_MAX=void 0;Oc.expand=die;var LM=UG(),PM="\0SLASH"+Math.random()+"\0",CM="\0OPEN"+Math.random()+"\0",Lx="\0CLOSE"+Math.random()+"\0",qM="\0COMMA"+Math.random()+"\0",RM="\0PERIOD"+Math.random()+"\0",rie=new RegExp(PM,"g"),nie=new RegExp(CM,"g"),iie=new RegExp(Lx,"g"),sie=new RegExp(qM,"g"),aie=new RegExp(RM,"g"),oie=/\\\\/g,uie=/\\{/g,cie=/\\}/g,lie=/\\,/g,fie=/\\\./g;Oc.EXPANSION_MAX=1e5;function Nx(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function pie(t){return t.replace(oie,PM).replace(uie,CM).replace(cie,Lx).replace(lie,qM).replace(fie,RM)}function hie(t){return t.replace(rie,"\\").replace(nie,"{").replace(iie,"}").replace(sie,",").replace(aie,".")}function MM(t){if(!t)return[""];let e=[],r=(0,LM.balanced)("{","}",t);if(!r)return t.split(",");let{pre:n,body:i,post:s}=r,a=n.split(",");a[a.length-1]+="{"+i+"}";let u=MM(s);return s.length&&(a[a.length-1]+=u.shift(),a.push.apply(a,u)),e.push.apply(e,a),e}function die(t,e={}){if(!t)return[];let{max:r=Oc.EXPANSION_MAX}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),yp(pie(t),r,!0).map(hie)}function mie(t){return"{"+t+"}"}function gie(t){return/^-?0\d/.test(t)}function yie(t,e){return t<=e}function _ie(t,e){return t>=e}function yp(t,e,r){let n=[],i=(0,LM.balanced)("{","}",t);if(!i)return[t];let s=i.pre,a=i.post.length?yp(i.post,e,!1):[""];if(/\$$/.test(i.pre))for(let u=0;u<a.length&&u<e;u++){let c=s+"{"+i.body+"}"+a[u];n.push(c)}else{let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),p=u||c,d=i.body.indexOf(",")>=0;if(!p&&!d)return i.post.match(/,(?!,).*\}/)?(t=i.pre+"{"+i.body+Lx+i.post,yp(t,e,!0)):[t];let m;if(p)m=i.body.split(/\.\./);else if(m=MM(i.body),m.length===1&&m[0]!==void 0&&(m=yp(m[0],e,!1).map(mie),m.length===1))return a.map(y=>i.pre+m[0]+y);let h;if(p&&m[0]!==void 0&&m[1]!==void 0){let y=Nx(m[0]),w=Nx(m[1]),x=Math.max(m[0].length,m[1].length),k=m.length===3&&m[2]!==void 0?Math.max(Math.abs(Nx(m[2])),1):1,v=yie;w<y&&(k*=-1,v=_ie);let T=m.some(gie);h=[];for(let S=y;v(S,w);S+=k){let L;if(c)L=String.fromCharCode(S),L==="\\"&&(L="");else if(L=String(S),T){let R=x-L.length;if(R>0){let M=new Array(R+1).join("0");S<0?L="-"+M+L.slice(1):L=M+L}}h.push(L)}}else{h=[];for(let y=0;y<m.length;y++)h.push.apply(h,yp(m[y],e,!1))}for(let y=0;y<h.length;y++)for(let w=0;w<a.length&&n.length<e;w++){let x=s+h[y]+a[w];(!r||p||x)&&n.push(x)}}return n}});var FM=P(zg=>{"use strict";b();Object.defineProperty(zg,"__esModule",{value:!0});zg.assertValidPattern=void 0;var vie=1024*64,bie=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>vie)throw new TypeError("pattern is too long")};zg.assertValidPattern=bie});var BM=P(Jg=>{"use strict";b();Object.defineProperty(Jg,"__esModule",{value:!0});Jg.parseClass=void 0;var Sie={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},_p=t=>t.replace(/[[\]\\-]/g,"\\$&"),wie=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),jM=t=>t.join(""),xie=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],s=r+1,a=!1,u=!1,c=!1,p=!1,d=r,m="";e:for(;s<t.length;){let x=t.charAt(s);if((x==="!"||x==="^")&&s===r+1){p=!0,s++;continue}if(x==="]"&&a&&!c){d=s+1;break}if(a=!0,x==="\\"&&!c){c=!0,s++;continue}if(x==="["&&!c){for(let[k,[v,I,T]]of Object.entries(Sie))if(t.startsWith(k,s)){if(m)return["$.",!1,t.length-r,!0];s+=k.length,T?i.push(v):n.push(v),u=u||I;continue e}}if(c=!1,m){x>m?n.push(_p(m)+"-"+_p(x)):x===m&&n.push(_p(x)),m="",s++;continue}if(t.startsWith("-]",s+1)){n.push(_p(x+"-")),s+=2;continue}if(t.startsWith("-",s+1)){m=x,s+=2;continue}n.push(_p(x)),s++}if(d<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,t.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!p){let x=n[0].length===2?n[0].slice(-1):n[0];return[wie(x),!1,d-r,!1]}let h="["+(p?"^":"")+jM(n)+"]",y="["+(p?"":"^")+jM(i)+"]";return[n.length&&i.length?"("+h+"|"+y+")":n.length?h:y,u,d-r,!0]};Jg.parseClass=xie});var Qg=P(Kg=>{"use strict";b();Object.defineProperty(Kg,"__esModule",{value:!0});Kg.unescape=void 0;var kie=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!0}={})=>r?e?t.replace(/\[([^/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?t.replace(/\[([^/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");Kg.unescape=kie});var qx=P(ey=>{"use strict";b();var qn;Object.defineProperty(ey,"__esModule",{value:!0});ey.AST=void 0;var Aie=BM(),Yg=Qg(),Iie=new Set(["!","?","+","*","@"]),Px=t=>Iie.has(t),$M=t=>Px(t.type),Tie=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Eie=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Oie=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),VM=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),Nie="(?!(?:^|/)\\.\\.?(?:$|/))",Xg="(?!\\.)",Lie=new Set(["[","."]),Pie=new Set(["..","."]),Cie=new Set("().*{}+?[]^$\\!"),qie=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Cx="[^/]",UM=Cx+"*?",WM=Cx+"+?",Rie=0,Zg=class{type;#r;#n;#i=!1;#e=[];#t;#o;#c;#u=!1;#s;#a;#l=!1;id=++Rie;get depth(){return(this.#t?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#r.id,parent:this.#t?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,r,n={}){this.type=e,e&&(this.#n=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?n:this.#r.#s,this.#c=this.#r===this?[]:this.#r.#c,e==="!"&&!this.#r.#u&&this.#c.push(this),this.#o=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#a=this.#e.map(e=>String(e)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let e;for(;e=this.#c.pop();){if(e.type!=="!")continue;let r=e,n=r.#t;for(;n;){for(let i=r.#o+1;!n.type&&i<n.#e.length;i++)for(let s of e.#e){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#e[i])}r=n,n=r.#t}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof qn&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let e=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#u&&this.#t?.type==="!")&&e.push({}),e}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#o===0)return!0;let e=this.#t;for(let r=0;r<this.#o;r++){let n=e.#e[r];if(!(n instanceof qn&&n.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let e=this.#t?this.#t.#e.length:0;return this.#o===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new qn(this.type,e);for(let n of this.#e)r.copyIn(n);return r}static#f(e,r,n,i,s){let a=i.maxExtglobRecursion??2,u=!1,c=!1,p=-1,d=!1;if(r.type===null){let x=n,k="";for(;x<e.length;){let v=e.charAt(x++);if(u||v==="\\"){u=!u,k+=v;continue}if(c){x===p+1?(v==="^"||v==="!")&&(d=!0):v==="]"&&!(x===p+2&&d)&&(c=!1),k+=v;continue}else if(v==="["){c=!0,p=x,d=!1,k+=v;continue}if(!i.noext&&Px(v)&&e.charAt(x)==="("&&s<=a){r.push(k),k="";let T=new qn(v,r);x=qn.#f(e,T,x,i,s+1),r.push(T);continue}k+=v}return r.push(k),x}let m=n+1,h=new qn(null,r),y=[],w="";for(;m<e.length;){let x=e.charAt(m++);if(u||x==="\\"){u=!u,w+=x;continue}if(c){m===p+1?(x==="^"||x==="!")&&(d=!0):x==="]"&&!(m===p+2&&d)&&(c=!1),w+=x;continue}else if(x==="["){c=!0,p=m,d=!1,w+=x;continue}if(!i.noext&&Px(x)&&e.charAt(m)==="("&&(s<=a||r&&r.#p(x))){let v=r&&r.#p(x)?0:1;h.push(w),w="";let I=new qn(x,h);h.push(I),m=qn.#f(e,I,m,i,s+v);continue}if(x==="|"){h.push(w),w="",y.push(h),h=new qn(null,r);continue}if(x===")")return w===""&&r.#e.length===0&&(r.#l=!0),h.push(w),w="",r.push(...y,h),m;w+=x}return r.type=null,r.#n=void 0,r.#e=[e.substring(n-1)],m}#_(e){return this.#d(e,Eie)}#d(e,r=Tie){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null)return!1;let n=e.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#p(n.type,r)}#p(e,r=Oie){return!!r.get(this.type)?.includes(e)}#v(e,r){let n=e.#e[0],i=new qn(null,n,this.options);i.#e.push(""),n.push(i),this.#m(e,r)}#m(e,r){let n=e.#e[0];this.#e.splice(r,1,...n.#e);for(let i of n.#e)typeof i=="object"&&(i.#t=this);this.#a=void 0}#b(e){return!!VM.get(this.type)?.has(e)}#S(e){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=e.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#b(r.type)}#w(e){let r=VM.get(this.type),n=e.#e[0],i=r?.get(n.type);if(!i)return!1;this.#e=n.#e;for(let s of this.#e)typeof s=="object"&&(s.#t=this);this.type=i,this.#a=void 0,this.#l=!1}static fromGlob(e,r={}){let n=new qn(null,void 0,r);return qn.#f(e,n,0,r,0),n}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let e=this.toString(),[r,n,i,s]=this.toRegExpSource();if(!(i||this.#n||this.#s.nocase&&!this.#s.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let u=(this.#s.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,u),{_src:r,_glob:e})}get options(){return this.#s}toRegExpSource(e){let r=e??!!this.#s.dot;if(this.#r===this&&(this.#h(),this.#y()),!$M(this)){let c=this.isStart()&&this.isEnd()&&!this.#e.some(y=>typeof y!="string"),p=this.#e.map(y=>{let[w,x,k,v]=typeof y=="string"?qn.#x(y,this.#n,c):y.toRegExpSource(e);return this.#n=this.#n||k,this.#i=this.#i||v,w}).join(""),d="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&Pie.has(this.#e[0]))){let w=Lie,x=r&&w.has(p.charAt(0))||p.startsWith("\\.")&&w.has(p.charAt(2))||p.startsWith("\\.\\.")&&w.has(p.charAt(4)),k=!r&&!e&&w.has(p.charAt(0));d=x?Nie:k?Xg:""}let m="";return this.isEnd()&&this.#r.#u&&this.#t?.type==="!"&&(m="(?:$|\\/)"),[d+p+m,(0,Yg.unescape)(p),this.#n=!!this.#n,this.#i]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#g(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString(),p=this;return p.#e=[c],p.type=null,p.#n=void 0,[c,(0,Yg.unescape)(this.toString()),!1,!1]}let a=!n||e||r||!Xg?"":this.#g(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let u="";if(this.type==="!"&&this.#l)u=(this.isStart()&&!r?Xg:"")+WM;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!e?Xg:"")+UM+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;u=i+s+c}return[u,(0,Yg.unescape)(s),this.#n=!!this.#n,this.#i]}#h(){if($M(this)){let e=0,r=!1;do{r=!0;for(let n=0;n<this.#e.length;n++){let i=this.#e[n];typeof i=="object"&&(i.#h(),this.#d(i)?(r=!1,this.#m(i,n)):this.#_(i)?(r=!1,this.#v(i,n)):this.#S(i)&&(r=!1,this.#w(i)))}}while(!r&&++e<10)}else for(let e of this.#e)typeof e=="object"&&e.#h();this.#a=void 0}#g(e){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,s,a]=r.toRegExpSource(e);return this.#i=this.#i||a,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#x(e,r,n=!1){let i=!1,s="",a=!1,u=!1;for(let c=0;c<e.length;c++){let p=e.charAt(c);if(i){i=!1,s+=(Cie.has(p)?"\\":"")+p;continue}if(p==="*"){if(u)continue;u=!0,s+=n&&/^[*]+$/.test(e)?WM:UM,r=!0;continue}else u=!1;if(p==="\\"){c===e.length-1?s+="\\\\":i=!0;continue}if(p==="["){let[d,m,h,y]=(0,Aie.parseClass)(e,c);if(h){s+=d,a=a||m,c+=h-1,r=r||y;continue}}if(p==="?"){s+=Cx,r=!0;continue}s+=qie(p)}return[s,(0,Yg.unescape)(e),!!r,a]}};ey.AST=Zg;qn=Zg});var Rx=P(ty=>{"use strict";b();Object.defineProperty(ty,"__esModule",{value:!0});ty.escape=void 0;var Mie=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!1}={})=>r?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");ty.escape=Mie});var Mx=P(xe=>{"use strict";b();Object.defineProperty(xe,"__esModule",{value:!0});xe.unescape=xe.escape=xe.AST=xe.Minimatch=xe.match=xe.makeRe=xe.braceExpand=xe.defaults=xe.filter=xe.GLOBSTAR=xe.sep=xe.minimatch=void 0;var Die=DM(),ry=FM(),zM=qx(),Fie=Rx(),jie=Qg(),Bie=(t,e,r={})=>((0,ry.assertValidPattern)(e),!r.nocomment&&e.charAt(0)==="#"?!1:new ru(e,r).match(t));xe.minimatch=Bie;var $ie=/^\*+([^+@!?*[(]*)$/,Vie=t=>e=>!e.startsWith(".")&&e.endsWith(t),Uie=t=>e=>e.endsWith(t),Wie=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Gie=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Hie=/^\*+\.\*+$/,zie=t=>!t.startsWith(".")&&t.includes("."),Jie=t=>t!=="."&&t!==".."&&t.includes("."),Kie=/^\.\*+$/,Qie=t=>t!=="."&&t!==".."&&t.startsWith("."),Yie=/^\*+$/,Xie=t=>t.length!==0&&!t.startsWith("."),Zie=t=>t.length!==0&&t!=="."&&t!=="..",ese=/^\?+([^+@!?*[(]*)?$/,tse=([t,e=""])=>{let r=JM([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},rse=([t,e=""])=>{let r=KM([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},nse=([t,e=""])=>{let r=KM([t]);return e?n=>r(n)&&n.endsWith(e):r},ise=([t,e=""])=>{let r=JM([t]);return e?n=>r(n)&&n.endsWith(e):r},JM=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},KM=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},QM=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",GM={win32:{sep:"\\"},posix:{sep:"/"}};xe.sep=QM==="win32"?GM.win32.sep:GM.posix.sep;xe.minimatch.sep=xe.sep;xe.GLOBSTAR=Symbol("globstar **");xe.minimatch.GLOBSTAR=xe.GLOBSTAR;var sse="[^/]",ase=sse+"*?",ose="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",use="(?:(?!(?:\\/|^)\\.).)*?",cse=(t,e={})=>r=>(0,xe.minimatch)(r,t,e);xe.filter=cse;xe.minimatch.filter=xe.filter;var Ai=(t,e={})=>Object.assign({},t,e),lse=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return xe.minimatch;let e=xe.minimatch;return Object.assign((n,i,s={})=>e(n,i,Ai(t,s)),{Minimatch:class extends e.Minimatch{constructor(i,s={}){super(i,Ai(t,s))}static defaults(i){return e.defaults(Ai(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,s,a={}){super(i,s,Ai(t,a))}static fromGlob(i,s={}){return e.AST.fromGlob(i,Ai(t,s))}},unescape:(n,i={})=>e.unescape(n,Ai(t,i)),escape:(n,i={})=>e.escape(n,Ai(t,i)),filter:(n,i={})=>e.filter(n,Ai(t,i)),defaults:n=>e.defaults(Ai(t,n)),makeRe:(n,i={})=>e.makeRe(n,Ai(t,i)),braceExpand:(n,i={})=>e.braceExpand(n,Ai(t,i)),match:(n,i,s={})=>e.match(n,i,Ai(t,s)),sep:e.sep,GLOBSTAR:xe.GLOBSTAR})};xe.defaults=lse;xe.minimatch.defaults=xe.defaults;var fse=(t,e={})=>((0,ry.assertValidPattern)(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Die.expand)(t,{max:e.braceExpandMax}));xe.braceExpand=fse;xe.minimatch.braceExpand=xe.braceExpand;var pse=(t,e={})=>new ru(t,e).makeRe();xe.makeRe=pse;xe.minimatch.makeRe=xe.makeRe;var hse=(t,e,r={})=>{let n=new ru(e,r);return t=t.filter(i=>n.match(i)),n.options.nonull&&!t.length&&t.push(e),t};xe.match=hse;xe.minimatch.match=xe.match;var HM=/[?*]|[+@!]\(.*?\)|\[|\]/,dse=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ru=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,r={}){(0,ry.assertValidPattern)(e),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=e,this.platform=r.platform||QM,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,a,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[0]===""&&s[1]===""&&(s[2]==="?"||!HM.test(s[2]))&&!HM.test(s[3]),p=/^[a-z]:/i.test(s[0]);if(c)return[...s.slice(0,4),...s.slice(4).map(d=>this.parse(d))];if(p)return[s[0],...s.slice(1).map(d=>this.parse(d))]}return s.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n of e)for(let i=0;i<n.length;i++)n[i]==="**"&&(n[i]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,i)=>{let s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let s=e[i];i===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let i=e[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(r=!0,e.splice(n-1,2),n-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let n of e){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let a=i;for(;n[a+1]==="**";)a++;a>i&&n.splice(i+1,a-i);let u=n[i+1],c=n[i+2],p=n[i+3];if(u!==".."||!c||c==="."||c===".."||!p||p==="."||p==="..")continue;r=!0,n.splice(i,1);let d=n.slice(0);d[i]="**",e.push(d),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<n.length-1;a++){let u=n[a];a===1&&u===""&&n[0]===""||(u==="."||u==="")&&(r=!0,n.splice(a,1),a--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let a=n[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let c=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...c),n.length===0&&n.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let n=r+1;n<e.length;n++){let i=this.partsMatch(e[r],e[n],!this.preserveMultipleSlashes);if(i){e[r]=[],e[n]=i;break}}return e.filter(r=>r.length)}partsMatch(e,r,n=!1){let i=0,s=0,a=[],u="";for(;i<e.length&&s<r.length;)if(e[i]===r[s])a.push(u==="b"?r[s]:e[i]),i++,s++;else if(n&&e[i]==="**"&&r[s]===e[i+1])a.push(e[i]),i++;else if(n&&r[s]==="**"&&e[i]===r[s+1])a.push(r[s]),s++;else if(e[i]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(u==="b")return!1;u="a",a.push(e[i]),i++,s++}else if(r[s]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(u==="a")return!1;u="b",a.push(r[s]),i++,s++}else return!1;return e.length===r.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r,n=!1){let i=0,s=0;if(this.isWindows){let u=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),c=!u&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),p=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!p&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),m=c?3:u?0:void 0,h=d?3:p?0:void 0;if(typeof m=="number"&&typeof h=="number"){let[y,w]=[e[m],r[h]];y.toLowerCase()===w.toLowerCase()&&(r[h]=y,s=h,i=m)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(e=this.levelTwoFileOptimize(e)),r.includes(xe.GLOBSTAR)?this.#r(e,r,n,i,s):this.#i(e,r,n,i,s)}#r(e,r,n,i,s){let a=r.indexOf(xe.GLOBSTAR,s),u=r.lastIndexOf(xe.GLOBSTAR),[c,p,d]=n?[r.slice(s,a),r.slice(a+1),[]]:[r.slice(s,a),r.slice(a+1,u),r.slice(u+1)];if(c.length){let I=e.slice(i,i+c.length);if(!this.#i(I,c,n,0,0))return!1;i+=c.length,s+=c.length}let m=0;if(d.length){if(d.length+i>e.length)return!1;let I=e.length-d.length;if(this.#i(e,d,n,I,0))m=d.length;else{if(e[e.length-1]!==""||i+d.length===e.length||(I--,!this.#i(e,d,n,I,0)))return!1;m=d.length+1}}if(!p.length){let I=!!m;for(let T=i;T<e.length-m;T++){let S=String(e[T]);if(I=!0,S==="."||S===".."||!this.options.dot&&S.startsWith("."))return!1}return n||I}let h=[[[],0]],y=h[0],w=0,x=[0];for(let I of p)I===xe.GLOBSTAR?(x.push(w),y=[[],0],h.push(y)):(y[0].push(I),w++);let k=h.length-1,v=e.length-m;for(let I of h)I[1]=v-(x[k--]+I[0].length);return!!this.#n(e,h,i,0,n,0,!!m)}#n(e,r,n,i,s,a,u){let c=r[i];if(!c){for(let m=n;m<e.length;m++){u=!0;let h=e[m];if(h==="."||h===".."||!this.options.dot&&h.startsWith("."))return!1}return u}let[p,d]=c;for(;n<=d;){if(this.#i(e.slice(0,n+p.length),p,s,n,0)&&a<this.maxGlobstarRecursion){let y=this.#n(e,r,n+p.length,i+1,s,a+1,u);if(y!==!1)return y}let h=e[n];if(h==="."||h===".."||!this.options.dot&&h.startsWith("."))return!1;n++}return s||null}#i(e,r,n,i,s){let a,u,c,p;for(a=i,u=s,p=e.length,c=r.length;a<p&&u<c;a++,u++){this.debug("matchOne loop");let d=r[u],m=e[a];if(this.debug(r,d,m),d===!1||d===xe.GLOBSTAR)return!1;let h;if(typeof d=="string"?(h=m===d,this.debug("string match",d,m,h)):(h=d.test(m),this.debug("pattern match",d,m,h)),!h)return!1}if(a===p&&u===c)return!0;if(a===p)return n;if(u===c)return a===p-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return(0,xe.braceExpand)(this.pattern,this.options)}parse(e){(0,ry.assertValidPattern)(e);let r=this.options;if(e==="**")return xe.GLOBSTAR;if(e==="")return"";let n,i=null;(n=e.match(Yie))?i=r.dot?Zie:Xie:(n=e.match($ie))?i=(r.nocase?r.dot?Gie:Wie:r.dot?Uie:Vie)(n[1]):(n=e.match(ese))?i=(r.nocase?r.dot?rse:tse:r.dot?nse:ise)(n):(n=e.match(Hie))?i=r.dot?Jie:zie:(n=e.match(Kie))&&(i=Qie);let s=zM.AST.fromGlob(e,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?ase:r.dot?ose:use,i=new Set(r.nocase?["i"]:[]),s=e.map(c=>{let p=c.map(m=>{if(m instanceof RegExp)for(let h of m.flags.split(""))i.add(h);return typeof m=="string"?dse(m):m===xe.GLOBSTAR?xe.GLOBSTAR:m._src});p.forEach((m,h)=>{let y=p[h+1],w=p[h-1];m!==xe.GLOBSTAR||w===xe.GLOBSTAR||(w===void 0?y!==void 0&&y!==xe.GLOBSTAR?p[h+1]="(?:\\/|"+n+"\\/)?"+y:p[h]=n:y===void 0?p[h-1]=w+"(?:\\/|\\/"+n+")?":y!==xe.GLOBSTAR&&(p[h-1]=w+"(?:\\/|\\/"+n+"\\/)"+y,p[h+1]=xe.GLOBSTAR))});let d=p.filter(m=>m!==xe.GLOBSTAR);if(this.partial&&d.length>=1){let m=[];for(let h=1;h<=d.length;h++)m.push(d.slice(0,h).join("/"));return"(?:"+m.join("|")+")"}return d.join("/")}).join("|"),[a,u]=e.length>1?["(?:",")"]:["",""];s="^"+a+s+u+"$",this.partial&&(s="^(?:\\/|"+a+s.slice(1,-1)+u+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let a=i[i.length-1];if(!a)for(let u=i.length-2;!a&&u>=0;u--)a=i[u];for(let u of s){let c=i;if(n.matchBase&&u.length===1&&(c=[a]),this.matchOne(c,u,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return xe.minimatch.defaults(e).Minimatch}};xe.Minimatch=ru;var mse=qx();Object.defineProperty(xe,"AST",{enumerable:!0,get:function(){return mse.AST}});var gse=Rx();Object.defineProperty(xe,"escape",{enumerable:!0,get:function(){return gse.escape}});var yse=Qg();Object.defineProperty(xe,"unescape",{enumerable:!0,get:function(){return yse.unescape}});xe.minimatch.AST=zM.AST;xe.minimatch.Minimatch=ru;xe.minimatch.escape=Fie.escape;xe.minimatch.unescape=jie.unescape});var Fx=P(Dx=>{"use strict";b();Object.defineProperty(Dx,"__esModule",{value:!0});Dx.isIgnored=vse;var _se=Mx();function vse(t,e,r){return[...bse(r,e),...YM(e.ignore)].map(i=>i.replace(/^\//,e.rootUri+"/").replace(/^([^\/])/,"**/$1").replace(/\/\*$/,"/**")).some(i=>(0,_se.minimatch)(t,i))}function bse(t,e){var r;return t?YM((r=e.settings[t.meta.code])===null||r===void 0?void 0:r.ignore):[]}function YM(t){return t??[]}});var ZM=P(jx=>{"use strict";b();Object.defineProperty(jx,"__esModule",{value:!0});jx.visitLiquid=wse;var Sse=Ge();function XM(t){return!!t&&typeof t=="object"&&"type"in t}async function wse(t,e){let r=[{node:t,ancestors:[]}],n;for(;r.length>0;){let{node:i,ancestors:s}=r.pop(),a=s.concat(i);n=e[i.type],n&&await n(i,s);for(let u in i){if(!i.hasOwnProperty(u)||Sse.nonTraversableProperties.has(u))continue;let c=i[u];if(Array.isArray(c))for(let p=c.length-1;p>=0;p--){let d=c[p];XM(d)&&r.push({node:d,ancestors:a})}else XM(c)&&r.push({node:c,ancestors:a})}n=e[`${i.type}:exit`],n&&await n(i,s)}}});var tD=P(Bx=>{"use strict";b();Object.defineProperty(Bx,"__esModule",{value:!0});Bx.visitJSON=kse;function eD(t){return!!t&&typeof t=="object"&&"type"in t}var xse=new Set(["loc"]);async function kse(t,e){let r=[{node:t,ancestors:[]}],n;for(;r.length>0;){let{node:i,ancestors:s}=r.pop(),a=s.concat(i);n=e[i.type],n&&await n(i,s);for(let u in i){if(!i.hasOwnProperty(u)||xse.has(u))continue;let c=i[u];if(Array.isArray(c))for(let p=c.length-1;p>=0;p--){let d=c[p];eD(d)&&r.push({node:d,ancestors:a})}else eD(c)&&r.push({node:c,ancestors:a})}n=e[`${i.type}:exit`],n&&await n(i,s)}}});var rD=P(Nc=>{"use strict";b();Object.defineProperty(Nc,"__esModule",{value:!0});Nc.visitJSON=Nc.visitLiquid=void 0;var Ase=ZM();Object.defineProperty(Nc,"visitLiquid",{enumerable:!0,get:function(){return Ase.visitLiquid}});var Ise=tD();Object.defineProperty(Nc,"visitJSON",{enumerable:!0,get:function(){return Ise.visitJSON}})});var nD=P(Lc=>{"use strict";b();Object.defineProperty(Lc,"__esModule",{value:!0});Lc.AppBlockValidTags=Lc.ForbiddenTag=void 0;var $x=de(),Vx;(function(t){t.JavaScript="javascript",t.StyleSheet="stylesheet",t.Include="include",t.Layout="layout",t.Section="section",t.Sections="sections"})(Vx||(Lc.ForbiddenTag=Vx={}));var Tse=t=>Object.values(Vx).includes(t),Ese=t=>`Theme app extension blocks cannot contain '${t}' tags`;Lc.AppBlockValidTags={meta:{code:"AppBlockValidTags",name:"App Block Valid Tags",docs:{description:"Identifies forbidden Liquid tags in theme app extension app block and app embed block code.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/app-block-valid-tags",recommended:!1},type:$x.SourceCodeType.LiquidHtml,severity:$x.Severity.ERROR,schema:{},targets:[$x.ConfigTarget.ThemeAppExtension]},create(t){let e=async r=>{if(Tse(r.name)){let n=r.blockEndPosition?r.blockEndPosition.end:r.position.end,i=r.blockStartPosition.start,s=Ese(r.name);return t.report({message:s,startIndex:i,endIndex:n})}};return{LiquidRawTag:e,LiquidTag:e}}}});var aD=P(ny=>{"use strict";b();Object.defineProperty(ny,"__esModule",{value:!0});ny.AssetPreload=void 0;var sD=Ge(),iD=de(),vp=xt();function Ose(t){return(0,vp.isAttr)(t,"rel")&&t.value.some(e=>e.type===sD.NodeTypes.TextNode&&e.value==="preload")}ny.AssetPreload={meta:{code:"AssetPreload",name:"Prevent Manual Preloading of Assets",docs:{description:"This check is aimed at discouraging the manual preloading of assets and encourages the use of appropriate Shopify filters.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-preload",recommended:!0},type:iD.SourceCodeType.LiquidHtml,severity:iD.Severity.WARNING,schema:{},targets:[]},create(t){return{async HtmlVoidElement(e){var r;let n=e.attributes.find(i=>(0,vp.isValuedHtmlAttribute)(i)&&Ose(i));if(e.name==="link"&&n){let i=e.attributes.filter(vp.isValuedHtmlAttribute).find(u=>(0,vp.isAttr)(u,"as")),s=(r=i?.value.find(u=>(0,vp.isNodeOfType)(sD.NodeTypes.TextNode,u)))===null||r===void 0?void 0:r.value,a="";s==="style"?a="For better performance, prefer using the preload argument of the stylesheet_tag filter":s==="image"?a="For better performance, prefer using the preload argument of the image_tag filter":a="For better performance, prefer using the preload_tag filter",t.report({message:a,startIndex:e.position.start,endIndex:e.position.end})}}}}}});var uD=P(sy=>{"use strict";b();Object.defineProperty(sy,"__esModule",{value:!0});sy.AssetSizeAppBlockCSS=void 0;var Nse=Dt(),iy=de(),Lse=_t(),oD=is(),Pse={thresholdInBytes:iy.SchemaProp.number(1e5)};sy.AssetSizeAppBlockCSS={meta:{code:"AssetSizeAppBlockCSS",name:"Asset Size App Block CSS",docs:{description:"This check is aimed at preventing large CSS bundles from being included via Theme App Extensions.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-app-block-css",recommended:!0},type:iy.SourceCodeType.LiquidHtml,severity:iy.Severity.ERROR,schema:Pse,targets:[iy.ConfigTarget.ThemeAppExtension]},create(t){return t.fileSize?{async LiquidRawTag(e){if(e.name!=="schema")return;let r=(0,Nse.parseJSON)(e.body.value);if((0,Lse.isError)(r))return;let n=r.stylesheet;if(!n)return;let i=`assets/${n}`,s=t.settings.thresholdInBytes,a=e.body.position.start+e.body.value.indexOf(n),u=a+n.length;if(!await(0,oD.doesFileExist)(t,i)){t.report({message:`'${n}' does not exist.`,startIndex:a,endIndex:u});return}let[p,d]=await(0,oD.doesFileExceedThreshold)(t,i,s);p&&t.report({message:`The file size for '${n}' (${d} B) exceeds the configured threshold (${s} B)`,startIndex:a,endIndex:u})}}:{}}}});var lD=P(oy=>{"use strict";b();Object.defineProperty(oy,"__esModule",{value:!0});oy.AssetSizeAppBlockJavaScript=void 0;var Cse=Dt(),ay=de(),qse=_t(),cD=is(),Rse={thresholdInBytes:ay.SchemaProp.number(1e4)};oy.AssetSizeAppBlockJavaScript={meta:{code:"AssetSizeAppBlockJavaScript",name:"Asset Size App Block JavaScript",docs:{description:"This check is aimed at preventing large JavaScript bundles from being included via Theme App Extensions.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-app-block-javascript",recommended:!0},type:ay.SourceCodeType.LiquidHtml,severity:ay.Severity.ERROR,schema:Rse,targets:[ay.ConfigTarget.ThemeAppExtension]},create(t){return t.fileSize?{async LiquidRawTag(e){if(e.name!=="schema")return;let r=(0,Cse.parseJSON)(e.body.value);if((0,qse.isError)(r))return;let n=r.javascript;if(!n)return;let i=`assets/${n}`,s=t.settings.thresholdInBytes,a=e.body.position.start+e.body.value.indexOf(n),u=a+n.length;if(!await(0,cD.doesFileExist)(t,i)){t.report({message:`'${n}' does not exist.`,startIndex:a,endIndex:u});return}let[p,d]=await(0,cD.doesFileExceedThreshold)(t,i,s);p&&t.report({message:`The file size for '${n}' (${d} B) exceeds the configured threshold (${s} B)`,startIndex:a,endIndex:u})}}:{}}}});var pD=P(uy=>{"use strict";b();Object.defineProperty(uy,"__esModule",{value:!0});uy.AssetSizeCSS=void 0;var Cc=Ge(),Ux=de(),Mse=_t(),fD=is(),Pc=xt(),Dse={thresholdInBytes:Ux.SchemaProp.number(1e5)};function Fse(t){return t.type===Cc.NodeTypes.TextNode}function jse(t){return t.type===Cc.NodeTypes.LiquidVariableOutput}function Bse(t){return typeof t!="string"&&t.type===Cc.NodeTypes.LiquidVariable}function $se(t){return t.type===Cc.NodeTypes.String}uy.AssetSizeCSS={meta:{code:"AssetSizeCSS",aliases:["AssetSizeCSSStylesheetTag"],name:"Prevent Large CSS bundles",docs:{description:"This check is aimed at preventing large CSS bundles for speed.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-css",recommended:!1},type:Ux.SourceCodeType.LiquidHtml,severity:Ux.Severity.ERROR,schema:Dse,targets:[]},create(t){if(!t.fileSize)return{};let e=t.settings.thresholdInBytes;async function r(i,s){await(0,fD.hasRemoteAssetSizeExceededThreshold)(i,e)&&t.report({message:`The CSS file size exceeds the threshold of ${e} bytes`,startIndex:s.start,endIndex:s.end})}async function n(i,s){await(0,fD.hasLocalAssetSizeExceededThreshold)(t,`assets/${i}`,e)&&t.report({message:`The CSS file size exceeds the threshold of ${e} bytes`,startIndex:s.start,endIndex:s.end})}return{async HtmlVoidElement(i){if(i.name!=="link"||!i.attributes.filter(Pc.isValuedHtmlAttribute).find(u=>(0,Pc.isAttr)(u,"rel")&&(0,Pc.valueIncludes)(u,"stylesheet")))return;let a=i.attributes.filter(Pc.isValuedHtmlAttribute).find(u=>(0,Pc.isAttr)(u,"href"));if(a&&a.value.length===1){if(Fse(a.value[0])&&/(https?:)?\/\//.test(a.value[0].value)){let u=a.value[0].value;await r(u,a.attributePosition)}if(jse(a.value[0])&&Bse(a.value[0].markup)&&$se(a.value[0].markup.expression)&&a.value[0].markup.filters.length===1&&a.value[0].markup.filters[0].name==="asset_url"){let u=a.value[0].markup.expression.value;await n(u,a.attributePosition)}}},async LiquidFilter(i,s){if(i.name!=="stylesheet_tag")return;let a=(0,Mse.last)(s);if(!(!a||!(0,Pc.isNodeOfType)(Cc.NodeTypes.LiquidVariable,a))&&a.expression.type===Cc.NodeTypes.String){if(a.expression.value[0].length==1&&a.filters.length==1&&/(https?:)?\/\//.test(a.expression.value)){let u=a.expression.value;await r(u,a.expression.position)}if(a.expression.value[0].length==1&&a.filters.length==2&&a.filters[0].name==="asset_url"&&a.filters[1].name==="stylesheet_tag"){let u=a.expression.value;await n(u,a.position)}}}}}}});var dD=P(cy=>{"use strict";b();Object.defineProperty(cy,"__esModule",{value:!0});cy.AssetSizeJavaScript=void 0;var qc=Ge(),Gx=de(),Vse=_t(),hD=is(),Wx=xt(),Use={thresholdInBytes:Gx.SchemaProp.number(1e4)};function Wse(t){return t.type===qc.NodeTypes.TextNode}function Gse(t){return t.type===qc.NodeTypes.LiquidVariableOutput}function Hse(t){return typeof t!="string"&&t.type===qc.NodeTypes.LiquidVariable}function zse(t){return t.type===qc.NodeTypes.String}cy.AssetSizeJavaScript={meta:{code:"AssetSizeJavaScript",name:"Prevent Large JavaScript bundles",docs:{description:"This check is aimed at preventing large JavaScript bundles for speed.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-javascript",recommended:!1},type:Gx.SourceCodeType.LiquidHtml,severity:Gx.Severity.ERROR,schema:Use,targets:[]},create(t){if(!t.fileSize)return{};let e=t.settings.thresholdInBytes;async function r(i,s){await(0,hD.hasRemoteAssetSizeExceededThreshold)(i,e)&&t.report({message:`JavaScript on every page load exceeds compressed size threshold (${e} Bytes), consider using the import on interaction pattern.`,startIndex:s.start,endIndex:s.end})}async function n(i,s){await(0,hD.hasLocalAssetSizeExceededThreshold)(t,`assets/${i}`,e)&&t.report({message:`JavaScript on every page load exceeds compressed size threshold (${e} Bytes), consider using the import on interaction pattern.`,startIndex:s.start,endIndex:s.end})}return{async HtmlRawNode(i){if(i.name!=="script")return;let s=i.attributes.filter(Wx.isValuedHtmlAttribute).find(a=>(0,Wx.isAttr)(a,"src"));if(s&&s.value.length===1){if(Wse(s.value[0])&&/(https?:)?\/\//.test(s.value[0].value)){let a=s.value[0].value;await r(a,s.attributePosition)}if(Gse(s.value[0])&&Hse(s.value[0].markup)&&zse(s.value[0].markup.expression)&&s.value[0].markup.filters.length===1&&s.value[0].markup.filters[0].name==="asset_url"){let a=s.value[0].markup.expression.value;await n(a,s.attributePosition)}}},async LiquidFilter(i,s){if(i.name!=="script_tag")return;let a=(0,Vse.last)(s);if(!(!a||!(0,Wx.isNodeOfType)(qc.NodeTypes.LiquidVariable,a))&&a.expression.type===qc.NodeTypes.String){if(a.expression.value[0].length==1&&a.filters.length==1&&/(https?:)?\/\//.test(a.expression.value)){let u=a.expression.value;await r(u,a.expression.position)}if(a.expression.value[0].length==1&&a.filters.length==2&&a.filters[0].name==="asset_url"&&a.filters[1].name==="script_tag"){let u=a.expression.value;await n(u,a.position)}}}}}}});var _D=P(fy=>{"use strict";b();Object.defineProperty(fy,"__esModule",{value:!0});fy.BlockIdUsage=void 0;var ly=Ge(),mD=de();fy.BlockIdUsage={meta:{code:"BlockIdUsage",name:"Do not rely on `block.id` in if/else/unless/case",docs:{description:"The ID is dynamically generated by Shopify and is subject to change. You should avoid relying on a literal value of this ID.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/block-id-usage",recommended:!0},type:mD.SourceCodeType.LiquidHtml,severity:mD.Severity.WARNING,schema:{},targets:[]},create(t){return{async Comparison(e,r){e.comparator==="=="&&e.left.type===ly.NodeTypes.VariableLookup&&gD(e.left)&&yD(t,e.position)},async VariableLookup(e,r){let n=r.at(-1);n?.type===ly.NodeTypes.LiquidTag&&n.name==="case"&&gD(e)&&yD(t,e.position)}}}};function gD(t){return t.type==ly.NodeTypes.VariableLookup&&t.name==="block"&&t.lookups[0]&&t.lookups[0].type===ly.NodeTypes.String&&t.lookups[0].value==="id"}function yD(t,e){t.report({message:"The ID is dynamically generated by Shopify and is subject to change. You should avoid relying on a literal value of this ID.",startIndex:e.start,endIndex:e.end})}});var bD=P(py=>{"use strict";b();Object.defineProperty(py,"__esModule",{value:!0});py.CdnPreconnect=void 0;var vD=de(),Rc=xt();py.CdnPreconnect={meta:{code:"CdnPreconnect",name:"CDN Preconnect",docs:{description:"This check is aimed at signaling the redundant preconnect to Shopify's CDN",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/cdn-preconnect"},type:vD.SourceCodeType.LiquidHtml,severity:vD.Severity.ERROR,schema:{},targets:[]},create(t){return{async HtmlVoidElement(e){e.name!=="link"||!e.attributes.filter(Rc.isValuedHtmlAttribute).some(i=>(0,Rc.isAttr)(i,"rel")&&(0,Rc.valueIncludes)(i,"preconnect"))||!e.attributes.filter(Rc.isValuedHtmlAttribute).some(i=>(0,Rc.isAttr)(i,"href")&&(0,Rc.valueIncludes)(i,".+cdn.shopify.com.+"))||t.report({message:"Preconnecting to cdn.shopify.com is unnecessary and can lead to worse performance",startIndex:e.position.start,endIndex:e.position.end})}}}}});var xD=P(hy=>{"use strict";b();Object.defineProperty(hy,"__esModule",{value:!0});hy.ContentForHeaderModification=void 0;var SD=Ge(),wD=de(),Jse=xt();function Kse(t){return t.name==="assign"&&typeof t.markup!="string"}function Qse(t){return t.name==="capture"&&typeof t.markup!="string"}function Yse(t){return t.name==="echo"&&typeof t.markup!="string"}hy.ContentForHeaderModification={meta:{code:"ContentForHeaderModification",name:"Do not depend on the content of content_for_header",docs:{description:"Do not rely on the content of content_for_header as it might change in the future, which could cause your Liquid code behavior to change.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/content-for-header-modification",recommended:!0},type:wD.SourceCodeType.LiquidHtml,severity:wD.Severity.ERROR,schema:{},targets:[]},create(t){function e(r,n){(0,Jse.isNodeOfType)(SD.NodeTypes.VariableLookup,r)&&r.name==="content_for_header"&&t.report({message:"Do not rely on the content of `content_for_header`",startIndex:n.start,endIndex:n.end})}return{async LiquidTag(r){if(Kse(r))e(r.markup.value.expression,r.position);else if(Yse(r))e(r.markup.expression,r.position);else if(Qse(r)&&r.children)for(let n of r.children)n.type===SD.NodeTypes.LiquidVariableOutput&&typeof n.markup!="string"&&e(n.markup.expression,n.position)},async LiquidVariableOutput(r){typeof r.markup!="string"&&r.markup.filters.length&&e(r.markup.expression,r.position)}}}}});var AD=P(dy=>{"use strict";b();Object.defineProperty(dy,"__esModule",{value:!0});dy.DeprecateBgsizes=void 0;var kD=de(),bp=xt();dy.DeprecateBgsizes={meta:{code:"DeprecateBgsizes",name:"Deprecate Bgsizes",docs:{description:"This check is aimed at discouraging the use of the lazySizes bgset plugin.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecate-bgsizes"},type:kD.SourceCodeType.LiquidHtml,severity:kD.Severity.WARNING,schema:{},targets:[]},create(t){return{async HtmlElement(e){let r=e.attributes.filter(bp.isValuedHtmlAttribute).find(i=>(0,bp.isAttr)(i,"class")&&(0,bp.valueIncludes)(i,"lazyload"));if(r){let i=r;t.report({message:'Use the native loading="lazy" attribute instead of lazysizes',startIndex:i.attributePosition.start,endIndex:i.attributePosition.end})}let n=e.attributes.find(i=>(0,bp.isValuedHtmlAttribute)(i)&&(0,bp.isAttr)(i,"data-bgset"));n&&t.report({message:"Use the CSS imageset attribute instead of data-bgset",startIndex:n.position.start,endIndex:n.position.end})}}}}});var TD=P(my=>{"use strict";b();Object.defineProperty(my,"__esModule",{value:!0});my.DeprecateLazysizes=void 0;var ID=de(),Xs=xt();function Xse(t){return(0,Xs.isAttr)(t,"data-srcset")||(0,Xs.isAttr)(t,"data-sizes")}my.DeprecateLazysizes={meta:{code:"DeprecateLazysizes",name:"Deprecate Lazysizes",docs:{description:"This check is aimed at discouraging the use of the lazysizes JavaScript library",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecate-lazysizes"},type:ID.SourceCodeType.LiquidHtml,severity:ID.Severity.WARNING,schema:{},targets:[]},create(t){return{async HtmlVoidElement(e){if(e.name!=="img")return;let r=e.attributes.filter(Xs.isHtmlAttribute),n=r.some(u=>(0,Xs.isAttr)(u,"src")),i=r.some(u=>(0,Xs.isAttr)(u,"loading"));n&&i||!e.attributes.filter(Xs.isValuedHtmlAttribute).some(u=>(0,Xs.isAttr)(u,"class")&&(0,Xs.valueIncludes)(u,"lazyload"))||!e.attributes.filter(Xs.isValuedHtmlAttribute).some(Xse)||t.report({message:'Use the native loading="lazy" attribute instead of lazysizes',startIndex:e.position.start,endIndex:e.position.end})}}}}});var PD=P(Dc=>{"use strict";b();Object.defineProperty(Dc,"__esModule",{value:!0});Dc.fixHexToRgba=Zse;Dc.suggestImgTagFix=eae;Dc.suggestImgUrlFix=tae;Dc.suggestImageUrlFix=rae;var by=Ge(),Sy=xt(),ED=5760,OD={pico:16,icon:32,thumb:50,small:100,compact:160,medium:240,large:480,grande:600,original:1024};function Zse(t){if(t.args.length>1)return;let{start:e,end:r}=wy(t),n=Mc(t,0),i;return n?i=` color_to_rgb | color_modify: 'alpha', ${n}`:i=" color_to_rgb",s=>s.replace(e,r,i)}function eae(t){let e="Replace 'img_tag' with 'image_tag'.",r=Mc(t,0),n=Mc(t,1),i=Mc(t,2),{width:s,height:a}=zx(i,{width:-1,height:-1}),{start:u,end:c}=wy(t),p=Jx({width:s,height:a}),d={width:s,height:a,alt:_y(r),class:_y(n)},m=yy("image_url",p),h=yy("image_tag",d);return[{message:e,fix:y=>{let w=`${m} |${h}`;y.replace(u,c,w)}}]}function tae(t){let e="Replace 'img_url' with 'image_url'.",r=gy(t,"crop"),n=gy(t,"format"),i=gy(t,"scale"),s=Mc(t,0),a=t.args.at(0);if(Hx(i?.value)||Hx(a))return;let{width:u,height:c}=Jx(nae(t,zx(s))),{start:p,end:d}=wy(t),m={width:u,height:c};return vy(r?.value)&&(m.crop=_y(r.value.value)),vy(n?.value)&&(m.format=_y(n.value.value)),Hx(n?.value)&&(m.format=n.value.name),[{message:e,fix:h=>{let y=yy("image_url",m);h.replace(p,d,y)}}]}function rae(t,e){let r=`Replace '${t}' with 'image_url'.`,n=Mc(e,0),{width:i,height:s}=Jx(zx(n)),{start:a,end:u}=wy(e);return[{message:r,fix:c=>{let p=yy("image_url",{width:i,height:s});c.replace(a,u,p)}}]}function zx(t,e={width:100,height:100}){if(!t)return{...e};if(t in OD){let i=OD[t];return{width:i,height:i}}let[r,n]=t.split("x").map(i=>parseInt(i));return ND({width:r,height:n})}function nae(t,e){let r=parseInt(iae(t,"scale")||"0")||1;return ND({width:e.width*r,height:e.height*r})}function ND(t){return{width:Math.min(t.width,ED),height:Math.min(t.height,ED)}}function Jx(t){let{width:e,height:r}=t;return(!r||r===-1)&&(!e||e===-1)&&(e=100),{width:e,height:r}}function Mc(t,e){let r=t.args.at(e);if(LD(r)||vy(r))return r.value}function iae(t,e){let r=gy(t,e),n=r?.value;if(LD(n)||vy(n))return n.value}function gy(t,e){return t.args.find(n=>(0,Sy.isNodeOfType)(by.NodeTypes.NamedArgument,n)&&n.name===e)}function yy(t,e){let r=Object.entries(e).filter(([n,i])=>i&&i!==-1).map(([n,i])=>`${n}: ${i}`).join(", ");return r?` ${t}: ${r}`:` ${t}`}function wy(t){let e=t.position,r=t.source.slice(e.start).indexOf("|");return{start:e.start+r+1,end:e.end}}function _y(t){return t?`'${t}'`:null}function Hx(t){return(0,Sy.isNodeOfType)(by.NodeTypes.VariableLookup,t)}function vy(t){return(0,Sy.isNodeOfType)(by.NodeTypes.String,t)}function LD(t){return(0,Sy.isNodeOfType)(by.NodeTypes.Number,t)}});var qD=P(ky=>{"use strict";b();Object.defineProperty(ky,"__esModule",{value:!0});ky.DeprecatedFilter=void 0;var CD=de(),xy=PD();ky.DeprecatedFilter={meta:{code:"DeprecatedFilter",aliases:["DeprecatedFilters"],name:"Deprecated Filter",docs:{description:"Discourages using deprecated filters in themes.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-filter",recommended:!0},type:CD.SourceCodeType.LiquidHtml,severity:CD.Severity.WARNING,schema:{},targets:[]},create(t){return t.themeDocset?{LiquidFilter:async e=>{let r=await t.themeDocset.filters(),n=r.find(p=>p.deprecated&&p.name===e.name);if(!n)return;let i=uae(n),s=r.find(p=>p.name===i),a=oae(n,s),u=sae(e),c=aae(e);t.report({message:a,suggest:u,fix:c,startIndex:e.position.start+1,endIndex:e.position.end})}}:{}}};function sae(t){let e=t.name;switch(e){case"img_tag":return(0,xy.suggestImgTagFix)(t);case"img_url":return(0,xy.suggestImgUrlFix)(t);case"article_img_url":case"collection_img_url":case"product_img_url":return(0,xy.suggestImageUrlFix)(e,t);case"currency_selector":return}}function aae(t){if(t.name==="hex_to_rgba")return(0,xy.fixHexToRgba)(t)}function oae(t,e){return e?`Deprecated filter '${t.name}', consider using '${e.name}'.`:`Deprecated filter '${t.name}'.`}function uae(t){let e=t.deprecation_reason,r=e?.match(/replaced by \[`(.+?)`\]/);return r?.[1]}});var Kx=P(Ay=>{"use strict";b();Object.defineProperty(Ay,"__esModule",{value:!0});Ay.DEPRECATED_FONT_HANDLES=void 0;Ay.DEPRECATED_FONT_HANDLES=new Set(["agmena_i3","agmena_i4","agmena_i6","agmena_i7","agmena_n3","agmena_n4","agmena_n6","agmena_n7","akko_i2","akko_i3","akko_i4","akko_i5","akko_i7","akko_i9","akko_n2","akko_n3","akko_n4","akko_n5","akko_n7","akko_n9","alfie_n4","americana_i4","americana_n4","americana_n7","americana_n8","antique_olive_i4","antique_olive_n3","antique_olive_n4","antique_olive_n7","antique_olive_n9","armata_n4","avenir_next_i1","avenir_next_i2","avenir_next_i3","avenir_next_i4","avenir_next_i5","avenir_next_i6","avenir_next_i7","avenir_next_i8","avenir_next_n1","avenir_next_n2","avenir_next_n3","avenir_next_n4","avenir_next_n5","avenir_next_n6","avenir_next_n7","avenir_next_n8","avenir_next_rounded_i4","avenir_next_rounded_i5","avenir_next_rounded_i6","avenir_next_rounded_i7","avenir_next_rounded_n4","avenir_next_rounded_n5","avenir_next_rounded_n6","avenir_next_rounded_n7","azbuka_i3","azbuka_i4","azbuka_i5","azbuka_i6","azbuka_i7","azbuka_n2","azbuka_n3","azbuka_n4","azbuka_n5","azbuka_n6","azbuka_n7","azbuka_n8","azbuka_n9","basic_commercial_i3","basic_commercial_i4","basic_commercial_i7","basic_commercial_i8","basic_commercial_n3","basic_commercial_n4","basic_commercial_n7","basic_commercial_n8","basic_commercial_soft_rounded_n4","basic_commercial_soft_rounded_n7","basic_commercial_soft_rounded_n9","baskerville_no_2_i4","baskerville_no_2_i7","baskerville_no_2_n4","baskerville_no_2_n7","bauer_bodoni_i4","bauer_bodoni_i7","bauer_bodoni_i9","bauer_bodoni_n4","bauer_bodoni_n7","bauer_bodoni_n9","beefcakes_i4","beefcakes_n4","bembo_book_i4","bembo_book_i7","bembo_book_n4","bembo_book_n7","bernhard_modern_i4","bernhard_modern_i7","bernhard_modern_n4","bernhard_modern_n7","bio_rhyme_n2","bio_rhyme_n3","bio_rhyme_n4","bio_rhyme_n5","bio_rhyme_n6","bio_rhyme_n7","bio_rhyme_n8","bodoni_poster_i9","bodoni_poster_n9","burlingame_i1","burlingame_i2","burlingame_i3","burlingame_i4","burlingame_i5","burlingame_i6","burlingame_i7","burlingame_i8","burlingame_i9","burlingame_n1","burlingame_n2","burlingame_n3","burlingame_n4","burlingame_n5","burlingame_n6","burlingame_n7","burlingame_n8","burlingame_n9","cachet_i1","cachet_i2","cachet_i3","cachet_i4","cachet_i5","cachet_i6","cachet_i7","cachet_i8","cachet_n1","cachet_n2","cachet_n3","cachet_n4","cachet_n5","cachet_n6","cachet_n7","cachet_n8","cardamon_i4","cardamon_i5","cardamon_i6","cardamon_i7","cardamon_n4","cardamon_n5","cardamon_n6","cardamon_n7","carter_sans_i4","carter_sans_i5","carter_sans_i6","carter_sans_i7","carter_sans_n4","carter_sans_n5","carter_sans_n6","carter_sans_n7","caslon_bold_i4","caslon_bold_n4","caslon_old_face_i4","caslon_old_face_n4","caslon_old_face_n7","centaur_i4","centaur_i7","centaur_n4","centaur_n7","century_gothic_i4","century_gothic_i7","century_gothic_n4","century_gothic_n7","chong_modern_i3","chong_modern_i4","chong_modern_i7","chong_modern_n3","chong_modern_n4","chong_modern_n7","claire_news_n3","claire_news_n7","cooper_bt_i2","cooper_bt_i5","cooper_bt_i7","cooper_bt_i9","cooper_bt_n2","cooper_bt_n5","cooper_bt_n7","cooper_bt_n9","daytona_i2","daytona_i3","daytona_i4","daytona_i6","daytona_i7","daytona_n2","daytona_n3","daytona_n4","daytona_n6","daytona_n7","din_neuzeit_grotesk_n3","din_neuzeit_grotesk_n7","din_next_i2","din_next_i3","din_next_i4","din_next_i5","din_next_i7","din_next_i8","din_next_i9","din_next_n2","din_next_n3","din_next_n4","din_next_n5","din_next_n7","din_next_n8","din_next_n9","din_next_slab_i2","din_next_slab_i3","din_next_slab_i4","din_next_slab_i5","din_next_slab_i7","din_next_slab_i8","din_next_slab_i9","din_next_slab_n2","din_next_slab_n3","din_next_slab_n4","din_next_slab_n5","din_next_slab_n7","din_next_slab_n8","din_next_slab_n9","electra_i4","electra_i7","electra_n4","electra_n7","eurostile_next_i2","eurostile_next_i3","eurostile_next_i4","eurostile_next_i6","eurostile_next_i7","eurostile_next_n2","eurostile_next_n3","eurostile_next_n4","eurostile_next_n6","eurostile_next_n7","fette_gotisch_n4","ff_meta_i1","ff_meta_i2","ff_meta_i3","ff_meta_i4","ff_meta_i5","ff_meta_i6","ff_meta_i7","ff_meta_i9","ff_meta_n1","ff_meta_n2","ff_meta_n3","ff_meta_n4","ff_meta_n5","ff_meta_n6","ff_meta_n7","ff_meta_n9","ff_meta_serif_i3","ff_meta_serif_i4","ff_meta_serif_i5","ff_meta_serif_i7","ff_meta_serif_i8","ff_meta_serif_i9","ff_meta_serif_n3","ff_meta_serif_n4","ff_meta_serif_n5","ff_meta_serif_n7","ff_meta_serif_n8","ff_meta_serif_n9","ff_tisa_i2","ff_tisa_i3","ff_tisa_i4","ff_tisa_i5","ff_tisa_i7","ff_tisa_i8","ff_tisa_i9","ff_tisa_n2","ff_tisa_n3","ff_tisa_n4","ff_tisa_n5","ff_tisa_n7","ff_tisa_n8","ff_tisa_n9","ff_tisa_sans_i2","ff_tisa_sans_i3","ff_tisa_sans_i4","ff_tisa_sans_i5","ff_tisa_sans_i7","ff_tisa_sans_i8","ff_tisa_sans_i9","ff_tisa_sans_n2","ff_tisa_sans_n3","ff_tisa_sans_n4","ff_tisa_sans_n5","ff_tisa_sans_n7","ff_tisa_sans_n8","ff_tisa_sans_n9","ff_unit_i2","ff_unit_i3","ff_unit_i4","ff_unit_i5","ff_unit_i7","ff_unit_i8","ff_unit_i9","ff_unit_n2","ff_unit_n3","ff_unit_n4","ff_unit_n5","ff_unit_n7","ff_unit_n8","ff_unit_n9","ff_unit_rounded_i3","ff_unit_rounded_i4","ff_unit_rounded_i5","ff_unit_rounded_i7","ff_unit_rounded_i8","ff_unit_rounded_i9","ff_unit_rounded_n3","ff_unit_rounded_n4","ff_unit_rounded_n5","ff_unit_rounded_n7","ff_unit_rounded_n8","ff_unit_rounded_n9","ff_unit_slab_i2","ff_unit_slab_i3","ff_unit_slab_i4","ff_unit_slab_i5","ff_unit_slab_i7","ff_unit_slab_i8","ff_unit_slab_i9","ff_unit_slab_n2","ff_unit_slab_n3","ff_unit_slab_n4","ff_unit_slab_n5","ff_unit_slab_n7","ff_unit_slab_n8","ff_unit_slab_n9","friz_quadrata_i4","friz_quadrata_i7","friz_quadrata_n4","friz_quadrata_n7","frutiger_serif_i3","frutiger_serif_i4","frutiger_serif_i5","frutiger_serif_i7","frutiger_serif_i8","frutiger_serif_n3","frutiger_serif_n4","frutiger_serif_n5","frutiger_serif_n7","frutiger_serif_n8","fs_kim_i4","fs_kim_i5","fs_kim_i7","fs_kim_i8","fs_kim_i9","fs_kim_n4","fs_kim_n5","fs_kim_n7","fs_kim_n8","fs_kim_n9","fs_koopman_i1","fs_koopman_i3","fs_koopman_i4","fs_koopman_i5","fs_koopman_i7","fs_koopman_i8","fs_koopman_i9","fs_koopman_n1","fs_koopman_n3","fs_koopman_n4","fs_koopman_n5","fs_koopman_n7","fs_koopman_n8","fs_koopman_n9","fs_siena_i1","fs_siena_i2","fs_siena_i3","fs_siena_i4","fs_siena_i5","fs_siena_i6","fs_siena_i7","fs_siena_n1","fs_siena_n2","fs_siena_n3","fs_siena_n4","fs_siena_n5","fs_siena_n6","fs_siena_n7","futura_black_n4","futura_n3","futura_n4","futura_n5","futura_n6","futura_n7","futura_n8","futura_n9","futura_o3","futura_o4","futura_o5","futura_o6","futura_o7","futura_o8","geometric_415_i4","geometric_415_i6","geometric_415_i7","geometric_415_n4","geometric_415_n6","geometric_415_n7","georgia_pro_i3","georgia_pro_i4","georgia_pro_i6","georgia_pro_i7","georgia_pro_i9","georgia_pro_n3","georgia_pro_n4","georgia_pro_n6","georgia_pro_n7","georgia_pro_n9","gill_sans_nova_i1","gill_sans_nova_i2","gill_sans_nova_i3","gill_sans_nova_i4","gill_sans_nova_i5","gill_sans_nova_i6","gill_sans_nova_i7","gill_sans_nova_n1","gill_sans_nova_n2","gill_sans_nova_n3","gill_sans_nova_n4","gill_sans_nova_n5","gill_sans_nova_n6","gill_sans_nova_n7","gill_sans_nova_n8","gill_sans_nova_n9","glegoo_n4","glegoo_n7","goudy_old_style_i4","goudy_old_style_i7","goudy_old_style_n4","goudy_old_style_n7","goudy_old_style_n8","harmonia_sans_i3","harmonia_sans_i4","harmonia_sans_i6","harmonia_sans_i7","harmonia_sans_i9","harmonia_sans_n3","harmonia_sans_n4","harmonia_sans_n6","harmonia_sans_n7","harmonia_sans_n9","helvetica_n3","helvetica_n4","helvetica_n7","helvetica_n9","helvetica_o3","helvetica_o4","helvetica_o7","helvetica_o9","hope_sans_i1","hope_sans_i2","hope_sans_i3","hope_sans_i4","hope_sans_i6","hope_sans_i7","hope_sans_n1","hope_sans_n2","hope_sans_n3","hope_sans_n4","hope_sans_n6","hope_sans_n7","humanist_521_i2","humanist_521_i4","humanist_521_i7","humanist_521_n2","humanist_521_n4","humanist_521_n7","humanist_521_n8","humanist_521_n9","itc_avant_garde_gothic_n2","itc_avant_garde_gothic_n4","itc_avant_garde_gothic_n5","itc_avant_garde_gothic_n6","itc_avant_garde_gothic_n7","itc_avant_garde_gothic_o2","itc_avant_garde_gothic_o4","itc_avant_garde_gothic_o5","itc_avant_garde_gothic_o6","itc_avant_garde_gothic_o7","itc_benguiat_i4","itc_benguiat_i5","itc_benguiat_i7","itc_benguiat_n4","itc_benguiat_n5","itc_benguiat_n7","itc_berkeley_old_style_i4","itc_berkeley_old_style_i5","itc_berkeley_old_style_i7","itc_berkeley_old_style_i9","itc_berkeley_old_style_n4","itc_berkeley_old_style_n5","itc_berkeley_old_style_n7","itc_berkeley_old_style_n9","itc_bodoni_seventytwo_i4","itc_bodoni_seventytwo_i7","itc_bodoni_seventytwo_n4","itc_bodoni_seventytwo_n7","itc_bodoni_twelve_i4","itc_bodoni_twelve_i7","itc_bodoni_twelve_n4","itc_bodoni_twelve_n7","itc_caslon_no_224_i4","itc_caslon_no_224_i5","itc_caslon_no_224_i7","itc_caslon_no_224_i9","itc_caslon_no_224_n4","itc_caslon_no_224_n5","itc_caslon_no_224_n7","itc_caslon_no_224_n9","itc_charter_i4","itc_charter_i7","itc_charter_i9","itc_charter_n4","itc_charter_n7","itc_charter_n9","itc_cheltenham_i3","itc_cheltenham_i4","itc_cheltenham_i7","itc_cheltenham_i9","itc_cheltenham_n3","itc_cheltenham_n4","itc_cheltenham_n7","itc_cheltenham_n9","itc_clearface_i4","itc_clearface_i7","itc_clearface_i8","itc_clearface_i9","itc_clearface_n4","itc_clearface_n7","itc_clearface_n8","itc_clearface_n9","itc_conduit_i2","itc_conduit_i3","itc_conduit_i4","itc_conduit_i5","itc_conduit_i7","itc_conduit_i8","itc_conduit_i9","itc_conduit_n2","itc_conduit_n3","itc_conduit_n4","itc_conduit_n5","itc_conduit_n7","itc_conduit_n8","itc_conduit_n9","itc_esprit_i4","itc_esprit_i5","itc_esprit_i7","itc_esprit_i9","itc_esprit_n4","itc_esprit_n5","itc_esprit_n7","itc_esprit_n9","itc_founders_caslon_i4","itc_founders_caslon_n4","itc_franklin_gothic_i4","itc_franklin_gothic_i5","itc_franklin_gothic_i7","itc_franklin_gothic_i9","itc_franklin_gothic_n4","itc_franklin_gothic_n5","itc_franklin_gothic_n7","itc_franklin_gothic_n9","itc_galliard_i4","itc_galliard_i7","itc_galliard_i8","itc_galliard_i9","itc_galliard_n4","itc_galliard_n7","itc_galliard_n8","itc_galliard_n9","itc_gamma_i4","itc_gamma_i5","itc_gamma_i7","itc_gamma_i8","itc_gamma_n4","itc_gamma_n5","itc_gamma_n7","itc_gamma_n8","itc_goudy_sans_i4","itc_goudy_sans_i5","itc_goudy_sans_i7","itc_goudy_sans_i9","itc_goudy_sans_n4","itc_goudy_sans_n5","itc_goudy_sans_n7","itc_goudy_sans_n9","itc_johnston_i3","itc_johnston_i5","itc_johnston_i7","itc_johnston_n3","itc_johnston_n5","itc_johnston_n7","itc_mendoza_roman_i4","itc_mendoza_roman_i5","itc_mendoza_roman_i7","itc_mendoza_roman_n4","itc_mendoza_roman_n5","itc_mendoza_roman_n7","itc_modern_no_216_i3","itc_modern_no_216_i5","itc_modern_no_216_i7","itc_modern_no_216_i8","itc_modern_no_216_n3","itc_modern_no_216_n5","itc_modern_no_216_n7","itc_modern_no_216_n8","itc_new_baskerville_i4","itc_new_baskerville_i6","itc_new_baskerville_i7","itc_new_baskerville_i9","itc_new_baskerville_n4","itc_new_baskerville_n6","itc_new_baskerville_n7","itc_new_baskerville_n9","itc_new_esprit_i4","itc_new_esprit_i5","itc_new_esprit_i7","itc_new_esprit_i8","itc_new_esprit_n4","itc_new_esprit_n5","itc_new_esprit_n7","itc_new_esprit_n8","itc_new_veljovic_i3","itc_new_veljovic_i4","itc_new_veljovic_i5","itc_new_veljovic_i7","itc_new_veljovic_i9","itc_new_veljovic_n3","itc_new_veljovic_n4","itc_new_veljovic_n5","itc_new_veljovic_n7","itc_new_veljovic_n9","itc_novarese_i4","itc_novarese_i5","itc_novarese_i7","itc_novarese_n4","itc_novarese_n5","itc_novarese_n7","itc_novarese_n9","itc_officina_sans_i4","itc_officina_sans_i5","itc_officina_sans_i7","itc_officina_sans_i8","itc_officina_sans_i9","itc_officina_sans_n4","itc_officina_sans_n5","itc_officina_sans_n7","itc_officina_sans_n8","itc_officina_sans_n9","itc_officina_serif_i4","itc_officina_serif_i5","itc_officina_serif_i7","itc_officina_serif_i8","itc_officina_serif_i9","itc_officina_serif_n4","itc_officina_serif_n5","itc_officina_serif_n7","itc_officina_serif_n8","itc_officina_serif_n9","itc_stepp_i3","itc_stepp_i5","itc_stepp_i7","itc_stepp_i9","itc_stepp_n3","itc_stepp_n4","itc_stepp_n7","itc_stepp_n9","itc_stone_humanist_i5","itc_stone_humanist_i6","itc_stone_humanist_i7","itc_stone_humanist_n5","itc_stone_humanist_n6","itc_stone_humanist_n7","itc_stone_informal_i4","itc_stone_informal_i6","itc_stone_informal_i7","itc_stone_informal_n4","itc_stone_informal_n6","itc_stone_informal_n7","itc_stone_sans_ii_i3","itc_stone_sans_ii_i4","itc_stone_sans_ii_i5","itc_stone_sans_ii_i6","itc_stone_sans_ii_i7","itc_stone_sans_ii_i8","itc_stone_sans_ii_n3","itc_stone_sans_ii_n4","itc_stone_sans_ii_n5","itc_stone_sans_ii_n6","itc_stone_sans_ii_n7","itc_stone_sans_ii_n8","itc_stone_serif_i4","itc_stone_serif_i6","itc_stone_serif_i7","itc_stone_serif_n4","itc_stone_serif_n6","itc_stone_serif_n7","itc_tapioca_n5","joanna_nova_i1","joanna_nova_i2","joanna_nova_i3","joanna_nova_i4","joanna_nova_i5","joanna_nova_i6","joanna_nova_i7","joanna_nova_i8","joanna_nova_i9","joanna_nova_n1","joanna_nova_n2","joanna_nova_n3","joanna_nova_n4","joanna_nova_n5","joanna_nova_n6","joanna_nova_n7","joanna_nova_n8","joanna_nova_n9","joanna_sans_nova_i1","joanna_sans_nova_i2","joanna_sans_nova_i3","joanna_sans_nova_i4","joanna_sans_nova_i5","joanna_sans_nova_i7","joanna_sans_nova_i8","joanna_sans_nova_i9","joanna_sans_nova_n1","joanna_sans_nova_n2","joanna_sans_nova_n3","joanna_sans_nova_n4","joanna_sans_nova_n5","joanna_sans_nova_n7","joanna_sans_nova_n8","joanna_sans_nova_n9","kairos_i1","kairos_i2","kairos_i3","kairos_i4","kairos_i5","kairos_i7","kairos_i8","kairos_i9","kairos_n1","kairos_n2","kairos_n3","kairos_n4","kairos_n5","kairos_n7","kairos_n8","kairos_n9","laurentian_i4","laurentian_i6","laurentian_n4","laurentian_n6","laurentian_n7","libelle_n4","linotype_didot_i4","linotype_didot_i7","linotype_didot_n4","linotype_didot_n7","linotype_gianotten_i3","linotype_gianotten_i4","linotype_gianotten_i5","linotype_gianotten_i7","linotype_gianotten_i8","linotype_gianotten_n3","linotype_gianotten_n4","linotype_gianotten_n5","linotype_gianotten_n7","linotype_gianotten_n8","linotype_gianotten_n9","linotype_really_i5","linotype_really_i6","linotype_really_n5","linotype_really_n6","linotype_syntax_serif_i3","linotype_syntax_serif_i4","linotype_syntax_serif_i5","linotype_syntax_serif_i7","linotype_syntax_serif_i8","linotype_syntax_serif_i9","linotype_syntax_serif_n3","linotype_syntax_serif_n4","linotype_syntax_serif_n5","linotype_syntax_serif_n7","linotype_syntax_serif_n8","linotype_syntax_serif_n9","lobster_n4","lucia_n4","luthersche_fraktur_n4","madera_i1","madera_i2","madera_i3","madera_i4","madera_i5","madera_i6","madera_i7","madera_i8","madera_n1","madera_n2","madera_n3","madera_n4","madera_n5","madera_n6","madera_n7","madera_n8","malabar_i4","malabar_i7","malabar_i9","malabar_n4","malabar_n7","malabar_n9","mariposa_sans_i4","mariposa_sans_n4","mariposa_sans_n5","mariposa_sans_n7","mariposa_sans_n9","megrim_n4","melior_i4","melior_i7","melior_n4","melior_n7","memphis_i3","memphis_i5","memphis_i7","memphis_n3","memphis_n5","memphis_n7","memphis_n8","memphis_soft_rounded_n5","memphis_soft_rounded_n7","memphis_soft_rounded_n8","mentor_sans_i3","mentor_sans_i4","mentor_sans_i7","mentor_sans_i9","mentor_sans_n3","mentor_sans_n4","mentor_sans_n7","mentor_sans_n9","metro_nova_i2","metro_nova_i3","metro_nova_i4","metro_nova_i5","metro_nova_i7","metro_nova_i8","metro_nova_i9","metro_nova_n2","metro_nova_n3","metro_nova_n4","metro_nova_n5","metro_nova_n7","metro_nova_n8","metro_nova_n9","modern_no_20_i4","modern_no_20_n4","monotype_baskerville_i4","monotype_baskerville_i6","monotype_baskerville_i7","monotype_baskerville_n4","monotype_baskerville_n6","monotype_baskerville_n7","monotype_bodoni_i4","monotype_bodoni_i5","monotype_bodoni_i7","monotype_bodoni_i8","monotype_bodoni_i9","monotype_bodoni_n4","monotype_bodoni_n5","monotype_bodoni_n7","monotype_bodoni_n8","monotype_bodoni_n9","monotype_century_old_style_i5","monotype_century_old_style_i7","monotype_century_old_style_n5","monotype_century_old_style_n7","monotype_goudy_i4","monotype_goudy_i7","monotype_goudy_modern_i4","monotype_goudy_modern_i7","monotype_goudy_modern_n4","monotype_goudy_modern_n7","monotype_goudy_n4","monotype_goudy_n7","monotype_goudy_n8","monotype_italian_old_style_i4","monotype_italian_old_style_i7","monotype_italian_old_style_n4","monotype_italian_old_style_n7","monotype_new_clarendon_n5","monotype_new_clarendon_n7","monotype_news_gothic_i4","monotype_news_gothic_i7","monotype_news_gothic_n4","monotype_news_gothic_n7","monotype_sabon_i4","monotype_sabon_i6","monotype_sabon_n4","monotype_sabon_n6","mouse_memoirs_n4","mundo_sans_i2","mundo_sans_i3","mundo_sans_i4","mundo_sans_i5","mundo_sans_i7","mundo_sans_i8","mundo_sans_i9","mundo_sans_n2","mundo_sans_n3","mundo_sans_n4","mundo_sans_n5","mundo_sans_n7","mundo_sans_n8","mundo_sans_n9","neo_sans_i3","neo_sans_i4","neo_sans_i5","neo_sans_i7","neo_sans_i8","neo_sans_i9","neo_sans_n3","neo_sans_n4","neo_sans_n5","neo_sans_n7","neo_sans_n8","neo_sans_n9","neue_aachen_i1","neue_aachen_i2","neue_aachen_i3","neue_aachen_i4","neue_aachen_i5","neue_aachen_i6","neue_aachen_i7","neue_aachen_i8","neue_aachen_i9","neue_aachen_n1","neue_aachen_n2","neue_aachen_n3","neue_aachen_n4","neue_aachen_n5","neue_aachen_n6","neue_aachen_n7","neue_aachen_n8","neue_aachen_n9","neue_frutiger_1450_i3","neue_frutiger_1450_i4","neue_frutiger_1450_i6","neue_frutiger_1450_i7","neue_frutiger_1450_n3","neue_frutiger_1450_n4","neue_frutiger_1450_n6","neue_frutiger_1450_n7","neue_haas_unica_i1","neue_haas_unica_i2","neue_haas_unica_i3","neue_haas_unica_i4","neue_haas_unica_i5","neue_haas_unica_i6","neue_haas_unica_i7","neue_haas_unica_i8","neue_haas_unica_i9","neue_haas_unica_n1","neue_haas_unica_n2","neue_haas_unica_n3","neue_haas_unica_n4","neue_haas_unica_n5","neue_haas_unica_n6","neue_haas_unica_n7","neue_haas_unica_n8","neue_haas_unica_n9","neue_plak_i2","neue_plak_i3","neue_plak_i4","neue_plak_i6","neue_plak_i7","neue_plak_i9","neue_plak_n2","neue_plak_n3","neue_plak_n4","neue_plak_n6","neue_plak_n7","neue_plak_n9","neue_swift_i3","neue_swift_i4","neue_swift_i5","neue_swift_i6","neue_swift_i7","neue_swift_n3","neue_swift_n4","neue_swift_n5","neue_swift_n6","neue_swift_n7","neuzeit_office_i4","neuzeit_office_i7","neuzeit_office_n4","neuzeit_office_n7","neuzeit_office_soft_rounded_n4","neuzeit_office_soft_rounded_n7","neuzeit_s_n4","neuzeit_s_n9","new_century_schoolbook_i4","new_century_schoolbook_i7","new_century_schoolbook_n4","new_century_schoolbook_n7","news_702_i4","news_702_i7","news_702_n4","news_702_n7","news_705_i4","news_705_i7","news_705_n4","news_705_n7","news_cycle_n4","news_cycle_n7","news_gothic_no_2_i2","news_gothic_no_2_i3","news_gothic_no_2_i4","news_gothic_no_2_i5","news_gothic_no_2_i7","news_gothic_no_2_i8","news_gothic_no_2_n2","news_gothic_no_2_n3","news_gothic_no_2_n4","news_gothic_no_2_n5","news_gothic_no_2_n7","news_gothic_no_2_n8","news_plantin_i4","news_plantin_i7","news_plantin_n4","news_plantin_n7","noticia_text_i4","noticia_text_i7","noticia_text_n4","noticia_text_n7","optima_nova_i3","optima_nova_i4","optima_nova_i5","optima_nova_i6","optima_nova_i7","optima_nova_i8","optima_nova_i9","optima_nova_n3","optima_nova_n4","optima_nova_n5","optima_nova_n6","optima_nova_n7","optima_nova_n8","optima_nova_n9","oxygen_n3","oxygen_n4","oxygen_n7","parma_i4","parma_n4","parma_n7","perpetua_i4","perpetua_i7","perpetua_n4","perpetua_n7","plantin_i3","plantin_i4","plantin_i6","plantin_i7","plantin_n3","plantin_n4","plantin_n6","plantin_n7","pmn_caecilia_i3","pmn_caecilia_i4","pmn_caecilia_i7","pmn_caecilia_i9","pmn_caecilia_n3","pmn_caecilia_n4","pmn_caecilia_n7","pmn_caecilia_n9","prata_n4","pt_mono_n4","pt_sans_narrow_n4","pt_sans_narrow_n7","quattrocento_n4","quattrocento_n7","quire_sans_i1","quire_sans_i2","quire_sans_i3","quire_sans_i4","quire_sans_i5","quire_sans_i6","quire_sans_i7","quire_sans_i8","quire_sans_i9","quire_sans_n1","quire_sans_n2","quire_sans_n3","quire_sans_n4","quire_sans_n5","quire_sans_n6","quire_sans_n7","quire_sans_n8","quire_sans_n9","really_no_2_i3","really_no_2_i4","really_no_2_i5","really_no_2_i6","really_no_2_i7","really_no_2_i8","really_no_2_i9","really_no_2_n3","really_no_2_n4","really_no_2_n5","really_no_2_n6","really_no_2_n7","really_no_2_n8","really_no_2_n9","righteous_n4","rockwell_i4","rockwell_i7","rockwell_n4","rockwell_n7","rockwell_n8","sabon_next_i4","sabon_next_i6","sabon_next_i7","sabon_next_i8","sabon_next_i9","sabon_next_n4","sabon_next_n6","sabon_next_n7","sabon_next_n8","sabon_next_n9","sackers_square_gothic_n4","sagrantino_n4","scene_i3","scene_i4","scene_i5","scene_i7","scene_i8","scene_i9","scene_n3","scene_n4","scene_n5","scene_n7","scene_n8","scene_n9","scherzo_i4","scherzo_i6","scherzo_i7","scherzo_n4","scherzo_n6","scherzo_n7","slabo_13px_n4","slate_i2","slate_i3","slate_i4","slate_i5","slate_i7","slate_i9","slate_n2","slate_n3","slate_n4","slate_n5","slate_n7","slate_n9","soho_gothic_i2","soho_gothic_i3","soho_gothic_i4","soho_gothic_i5","soho_gothic_i7","soho_gothic_i8","soho_gothic_i9","soho_gothic_n2","soho_gothic_n3","soho_gothic_n4","soho_gothic_n5","soho_gothic_n7","soho_gothic_n8","soho_gothic_n9","soho_i1","soho_i2","soho_i3","soho_i4","soho_i5","soho_i6","soho_i7","soho_i8","soho_i9","soho_n1","soho_n2","soho_n3","soho_n4","soho_n5","soho_n6","soho_n7","soho_n8","soho_n9","stempel_schneidler_i3","stempel_schneidler_i4","stempel_schneidler_i5","stempel_schneidler_i7","stempel_schneidler_i8","stempel_schneidler_n3","stempel_schneidler_n4","stempel_schneidler_n5","stempel_schneidler_n7","stempel_schneidler_n8","swiss_721_i1","swiss_721_i2","swiss_721_i4","swiss_721_i5","swiss_721_i7","swiss_721_i8","swiss_721_i9","swiss_721_n1","swiss_721_n2","swiss_721_n4","swiss_721_n5","swiss_721_n7","swiss_721_n8","swiss_721_n9","swiss_721_rounded_n7","swiss_721_rounded_n9","tiemann_n3","tiemann_n4","tinos_i4","tinos_i7","tinos_n4","tinos_n7","trade_gothic_n3","trade_gothic_n4","trade_gothic_n7","trade_gothic_next_i3","trade_gothic_next_i4","trade_gothic_next_i7","trade_gothic_next_i8","trade_gothic_next_n3","trade_gothic_next_n4","trade_gothic_next_n7","trade_gothic_next_n8","trade_gothic_o3","trade_gothic_o4","trade_gothic_o7","twentieth_century_i3","twentieth_century_i5","twentieth_century_i7","twentieth_century_i8","twentieth_century_i9","twentieth_century_n3","twentieth_century_n4","twentieth_century_n5","twentieth_century_n6","twentieth_century_n7","twentieth_century_n8","twentieth_century_n9","univers_next_i1","univers_next_i2","univers_next_i3","univers_next_i4","univers_next_i5","univers_next_i6","univers_next_i7","univers_next_i8","univers_next_i9","univers_next_n1","univers_next_n2","univers_next_n3","univers_next_n4","univers_next_n5","univers_next_n6","univers_next_n7","univers_next_n8","univers_next_n9","univers_next_typewriter_i4","univers_next_typewriter_i7","univers_next_typewriter_n4","univers_next_typewriter_n7","unna_i4","unna_i7","unna_n4","unna_n7","vala_n4","varela_n4","varela_round_n4","verdana_pro_i3","verdana_pro_i4","verdana_pro_i6","verdana_pro_i7","verdana_pro_i9","verdana_pro_n3","verdana_pro_n4","verdana_pro_n6","verdana_pro_n7","verdana_pro_n9","vidaloka_n4","volkhov_i4","vollkorn_i5","volkhov_i7","vollkorn_i8","volkhov_n4","volkhov_n7","vollkorn_i4","vollkorn_i6","vollkorn_i7","vollkorn_i9","vollkorn_n4","vollkorn_n5","vollkorn_n6","vollkorn_n7","vollkorn_n8","vollkorn_n9","waza_n4","wola_n4","ysobel_i3","ysobel_i4","ysobel_i6","ysobel_i7","ysobel_n3","ysobel_n4","ysobel_n6","ysobel_n7","zurich_extended_n4","zurich_extended_n7","zurich_extended_n8","zurich_extended_n9","zurich_i3","zurich_i4","zurich_i7","zurich_i8","zurich_n3","zurich_n4","zurich_n7","zurich_n8","zurich_n9"])});var BD=P(Ty=>{"use strict";b();Object.defineProperty(Ty,"__esModule",{value:!0});Ty.DeprecatedFontsOnSectionsAndBlocks=void 0;var cae=hr(),RD=de(),Iy=Dt(),Qx=Kx();Ty.DeprecatedFontsOnSectionsAndBlocks={meta:{code:"DeprecatedFontsOnSectionsAndBlocks",name:"Check for deprecated fonts in section and block schema settings values",docs:{description:"Warns on deprecated fonts in section and block schema settings values.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-fonts-on-sections-and-blocks"},type:RD.SourceCodeType.LiquidHtml,severity:RD.Severity.WARNING,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=await(0,cae.getSchema)(t),{validSchema:n,ast:i}=r??{};if(!n||n instanceof Error||!i||i instanceof Error)return;let s=e.blockStartPosition.end;lae(n,s,i,t),fae(n,s,i,t),await pae(n,s,i,t),"default"in n&&await hae(n,s,i,t)}}}};function lae(t,e,r,n){let i=t.settings;i&&MD(i,e,r,["settings"],n)}function MD(t,e,r,n,i){t.forEach((s,a)=>{if(s.type==="font_picker"&&s.default&&Qx.DEPRECATED_FONT_HANDLES.has(s.default)){let u=n.concat([String(a),"default"]);Yx(i,e,r,u,`setting '${s.id}' is using deprecated font '${s.default}'`)}})}function fae(t,e,r,n){let i=t.blocks;i&&i.forEach((s,a)=>{"settings"in s&&s.settings&&MD(s.settings,e,r,["blocks",String(a),"settings"],n)})}async function pae(t,e,r,n){var i;let s=t.presets;if(s)for(let[a,u]of s.entries()){let c=["presets",String(a)];await DD((i=u.settings)!==null&&i!==void 0?i:{},"blocks"in u?u.blocks:void 0,t,e,r,c,n)}}async function DD(t,e,r,n,i,s,a){t&&typeof t=="object"&&Object.entries(t).forEach(([u,c])=>{var p;if(jD((p=r.settings)!==null&&p!==void 0?p:[],u)&&Qx.DEPRECATED_FONT_HANDLES.has(c)){let d=s.concat(["settings",u]);Yx(a,n,i,d,`setting '${u}' is using deprecated font '${c}'`)}}),e&&await FD(e,r,n,i,a,s)}async function FD(t,e,r,n,i,s){var a,u,c,p;let d=Array.isArray(t)?t.entries():Object.entries(t);for(let[m,h]of d){let y=s.concat(["blocks",String(m)]),w=null;if((a=e.blocks)===null||a===void 0||a.forEach(x=>{x.type===h.type&&"name"in x&&(w=x)}),!w){let x=await((u=i.getBlockSchema)===null||u===void 0?void 0:u.call(i,h.type));if(!x||x instanceof Error||(w=x.validSchema,!w||w instanceof Error))continue}for(let[x,k]of Object.entries((c=h.settings)!==null&&c!==void 0?c:{}))k&&Qx.DEPRECATED_FONT_HANDLES.has(k)&&jD((p=w.settings)!==null&&p!==void 0?p:[],x)&&Yx(i,r,n,y.concat(["settings",x]),`setting '${x}' is using deprecated font '${k}'`);"blocks"in h&&h.blocks&&await FD(h.blocks,e,r,n,i,y)}}async function hae(t,e,r,n){var i;let s=t.default;if(!s||typeof s!="object")return;let a=["default"];await DD((i=s.settings)!==null&&i!==void 0?i:{},"blocks"in s?s.blocks:void 0,t,e,r,a,n)}function jD(t,e){return t.some(r=>r.id===e&&r.type==="font_picker")}function Yx(t,e,r,n,i,s=!0){let a=(0,Iy.nodeAtPath)(r,n),u=s?e+(0,Iy.getLocStart)(a):e+(0,Iy.getLocEnd)(a)-1,c=e+(0,Iy.getLocEnd)(a);t.report({message:i,startIndex:u,endIndex:c})}});var VD=P(Oy=>{"use strict";b();Object.defineProperty(Oy,"__esModule",{value:!0});Oy.DeprecatedFontsOnSettingsSchema=void 0;var Ey=de(),$D=Dt(),dae=Kx();Oy.DeprecatedFontsOnSettingsSchema={meta:{code:"DeprecatedFontsOnSettingsSchema",name:"Check for deprecated fonts in settings_schema settings values",docs:{description:"Warns on deprecated fonts in settings_schema settings values.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-fonts-on-settings-schema"},type:Ey.SourceCodeType.JSON,severity:Ey.Severity.WARNING,schema:{},targets:[]},create(t){return t.toRelativePath(t.file.uri)!=="config/settings_schema.json"?{}:{async Property(r){if(r.key.value==="settings"&&(0,Ey.isArrayNode)(r.value)){for(let n of r.value.children)if((0,Ey.isObjectNode)(n)){let i=n.children.find(s=>s.key.value==="type");if(i&&i.value.type==="Literal"&&i.value.value==="font_picker"){let s=n.children.find(a=>a.key.value==="default");if(s&&s.value.type==="Literal"&&typeof s.value.value=="string"){let a=s.value.value;dae.DEPRECATED_FONT_HANDLES.has(a)&&t.report({message:`The font "${a}" is deprecated`,startIndex:(0,$D.getLocStart)(s.value),endIndex:(0,$D.getLocEnd)(s.value)})}}}}}}}}});var WD=P(Ny=>{"use strict";b();Object.defineProperty(Ny,"__esModule",{value:!0});Ny.DeprecatedTag=void 0;var UD=de();Ny.DeprecatedTag={meta:{code:"DeprecatedTag",aliases:["DeprecatedTags"],name:"Deprecated Tag",docs:{description:"This check is aimed at eliminating the use of deprecated tags.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-tag",recommended:!0},type:UD.SourceCodeType.LiquidHtml,severity:UD.Severity.WARNING,schema:{},targets:[]},create(t){return{async LiquidTag(e){if(e.name==="include"){let n=e.source.substring(e.position.start).indexOf("include"),i=n+7,s=e.position.start+n,a=e.position.start+i;t.report({message:"Use the 'render' tag instead of 'include'",startIndex:s,endIndex:a,suggest:[{message:"Replace 'include' with 'render'",fix:u=>{u.replace(s,a,"render")}}]})}}}}}});var Fc=P(Ii=>{"use strict";b();Object.defineProperty(Ii,"__esModule",{value:!0});Ii.SupportedDocTagTypes=Ii.BasicParamTypes=void 0;Ii.getDefaultValueForType=_ae;Ii.inferArgumentType=vae;Ii.isTypeCompatible=bae;Ii.filePathSupportsLiquidDoc=Sae;Ii.getValidParamTypes=wae;Ii.parseParamType=xae;var Sp=Ge(),mae=_t(),gae=hr(),yae=hr(),dn;(function(t){t.String="string",t.Number="number",t.Boolean="boolean",t.Object="object"})(dn||(Ii.BasicParamTypes=dn={}));var GD;(function(t){t.Param="param",t.Example="example",t.Description="description"})(GD||(Ii.SupportedDocTagTypes=GD={}));function _ae(t){switch(t?.toLowerCase()){case dn.String:return"''";case dn.Number:return"0";case dn.Boolean:return"false";case dn.Object:default:return""}}function vae(t){switch(t.type){case Sp.NodeTypes.String:return dn.String;case Sp.NodeTypes.Number:return dn.Number;case Sp.NodeTypes.LiquidLiteral:return dn.Boolean;case Sp.NodeTypes.Range:case Sp.NodeTypes.VariableLookup:return dn.Object;default:return(0,mae.assertNever)(t)}}function bae(t,e){let r=t.toLowerCase();return r===dn.Boolean?!0:r===e}function Sae(t){return(0,gae.isSnippet)(t)||(0,yae.isBlock)(t)}function wae(t){let e=new Map([[dn.String,void 0],[dn.Number,void 0],[dn.Boolean,void 0],[dn.Object,"A generic type used to represent any liquid object or primitive value."]]);return t.forEach(r=>e.set(r.name,r.summary||r.description)),e}function xae(t,e){let r=e.match(/^([a-z_]+)(\[\])?$/);if(!r)return;let n=r[1],i=!!r[2];if(t.has(n))return[n,i]}});var ds=P(ni=>{"use strict";b();Object.defineProperty(ni,"__esModule",{value:!0});ni.reportUnknownArguments=kae;ni.reportMissingArguments=Aae;ni.reportDuplicateArguments=Iae;ni.findTypeMismatchParams=Tae;ni.reportTypeMismatches=Eae;ni.generateTypeMismatchSuggestions=zD;ni.getBlockName=Nae;ni.getSnippetName=Lae;ni.getLiquidDocParams=Pae;ni.makeRemoveArgumentCorrector=Xx;ni.makeAddArgumentCorrector=JD;var nu=Ge(),jc=Fc(),HD=xt();function kae(t,e,r,n){let i="";e.type===nu.NodeTypes.ContentForMarkup?i=` in content_for tag for static block '${n}'`:e.type===nu.NodeTypes.RenderMarkup&&(i=` in render tag for snippet '${n}'`);for(let s of r)t.report({message:`Unknown argument '${s.name}'${i}.`,startIndex:s.position.start,endIndex:s.position.end,suggest:[{message:`Remove '${s.name}'`,fix:Xx(e,s)}]})}function Aae(t,e,r,n){let i="";e.type===nu.NodeTypes.ContentForMarkup?i=` in content_for tag for static block '${n}'`:e.type===nu.NodeTypes.RenderMarkup&&(i=` in render tag for snippet '${n}'`);for(let s of r)t.report({message:`Missing required argument '${s.name}'${i}.`,startIndex:e.position.start,endIndex:e.position.end,suggest:[{message:`Add required argument '${s.name}'`,fix:JD(e,s)}]})}function Iae(t,e,r,n){let i="";e.type===nu.NodeTypes.ContentForMarkup?i=` in content_for tag for static block '${n}'`:e.type===nu.NodeTypes.RenderMarkup&&(i=` in render tag for snippet '${n}'`);for(let s of r)t.report({message:`Duplicate argument '${s.name}'${i}.`,startIndex:s.position.start,endIndex:s.position.end,suggest:[{message:`Remove duplicate argument '${s.name}'`,fix:Xx(e,s)}]})}function Tae(t,e){let r=[];for(let n of e){if(n.value.type===nu.NodeTypes.VariableLookup)continue;let i=t.get(n.name);if(i&&i.type){let s=i.type.toLowerCase();if(!Object.keys(jc.BasicParamTypes).map(u=>u.toLowerCase()).includes(s))continue;(0,jc.isTypeCompatible)(s,(0,jc.inferArgumentType)(n.value))||r.push(n)}}return r}function Eae(t,e,r){for(let n of e){let i=r.get(n.name);if(!i||!i.type)continue;let s=i.type.toLowerCase(),a=(0,jc.inferArgumentType)(n.value),u=zD(s,n.value.position.start,n.value.position.end);t.report({message:`Type mismatch for argument '${n.name}': expected ${s}, got ${a}`,startIndex:n.value.position.start,endIndex:n.value.position.end,suggest:u})}}function zD(t,e,r){let n=(0,jc.getDefaultValueForType)(t),i=[];return n!==""&&i.push({message:`Replace with default value '${n}' for ${t}`,fix:s=>s.replace(e,r,n)}),i.push({message:"Remove value",fix:s=>s.remove(e,r)}),i}function Oae(t,e){return t.args.length==1||e.position.start==t.args[t.args.length-1].position.start}function Nae(t){var e;if(t.contentForType.value!=="block")return;let r=(e=t.args.find(n=>n.name=="type"))===null||e===void 0?void 0:e.value;if(!(!r||!(0,HD.isLiquidString)(r)))return r.value}function Lae(t){if((0,HD.isLiquidString)(t.snippet))return t.snippet.value}async function Pae(t,e){var r;let n=t.getDocDefinition&&await t.getDocDefinition(e);if(!((r=n?.liquidDoc)===null||r===void 0)&&r.parameters)return new Map(n.liquidDoc.parameters.map(i=>[i.name,i]))}function Xx(t,e){return r=>{let i=t.source.slice(t.position.start,e.position.start).match(/,\s*/g),s=i?.[i.length-1],a=s?e.position.start-(s.length-1):e.position.start;Oae(t,e)&&(a-=1);let c=t.source.substring(e.position.end,t.position.end).match(/\s*,/);return c?r.remove(a,e.position.end+c[0].length):r.remove(a,e.position.end)}}function JD(t,e){return r=>{let n=`, ${e.name}: ${(0,jc.getDefaultValueForType)(e.type)}`;if(t.args.length==0)return r.insert(t.position.end-1,n);let i=t.args[t.args.length-1],a=t.source.substring(i.position.end,t.position.end).match(/\s*,\s*/);return a?r.replace(i.position.end,i.position.end+a[0].length,`${n} `):r.insert(i.position.end,n)}}});var YD=P(Ly=>{"use strict";b();Object.defineProperty(Ly,"__esModule",{value:!0});Ly.DuplicateRenderSnippetArguments=void 0;var KD=de(),QD=ds();Ly.DuplicateRenderSnippetArguments={meta:{code:"DuplicateRenderSnippetArguments",name:"Duplicate Render Snippet Arguments",aliases:["DuplicateRenderSnippetParams"],docs:{description:"This check ensures that no duplicate argument names are provided when rendering a snippet.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-render-snippet-arguments"},type:KD.SourceCodeType.LiquidHtml,severity:KD.Severity.WARNING,schema:{},targets:[]},create(t){return{async RenderMarkup(e){var r;let n=(0,QD.getSnippetName)(e);if(!n)return;let i=new Set,s=[];!((r=e.alias)===null||r===void 0)&&r.value&&i.add(e.alias.value);for(let a of e.args)i.has(a.name)&&s.push(a),i.add(a.name);(0,QD.reportDuplicateArguments)(t,e,s,n)}}}}});var eF=P(Py=>{"use strict";b();Object.defineProperty(Py,"__esModule",{value:!0});Py.DuplicateContentForArguments=void 0;var XD=de(),ZD=ds();Py.DuplicateContentForArguments={meta:{code:"DuplicateContentForArguments",name:"Duplicate ContentFor Arguments",docs:{description:"This check ensures that no duplicate argument names are provided when rendering a static block.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-content-for-arguments"},type:XD.SourceCodeType.LiquidHtml,severity:XD.Severity.WARNING,schema:{},targets:[]},create(t){return{async ContentForMarkup(e){let r=(0,ZD.getBlockName)(e);if(!r)return;let n=new Set,i=[];for(let s of e.args)n.has(s.name)&&i.push(s),n.add(s.name);(0,ZD.reportDuplicateArguments)(t,e,i,r)}}}}});var rF=P(Cy=>{"use strict";b();Object.defineProperty(Cy,"__esModule",{value:!0});Cy.EmptyBlockContent=void 0;var tF=de(),Cae=hr();Cy.EmptyBlockContent={meta:{code:"EmptyBlockContent",name:"Prevent empty block content",docs:{description:"This check exists to warn you when the blocks array at the root level of the schema is empty.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/empty-block-content"},type:tF.SourceCodeType.LiquidHtml,severity:tF.Severity.WARNING,schema:{},targets:[]},create(t){let e=!1,r={start:0,end:0};return{async LiquidTag(n){if(n.name!=="content_for")return;let i=n.markup;typeof i=="object"&&i.contentForType.value==="blocks"&&(r.start=n.blockStartPosition.start,r.end=n.blockStartPosition.end,e=!0)},async onCodePathEnd(){let n=await(0,Cae.getSchema)(t),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let a=i.blocks;e&&!a?t.report({message:`The 'content_for "blocks"' tag is present, but the blocks array is not defined.`,startIndex:r.start,endIndex:r.end}):e&&a&&a.length===0&&t.report({message:`The 'content_for "blocks"' tag is present, but the blocks array is empty.`,startIndex:r.start,endIndex:r.end})}}}}});var aF=P(Ry=>{"use strict";b();Object.defineProperty(Ry,"__esModule",{value:!0});Ry.HardcodedRoutes=void 0;var qae=Ge(),nF=de(),qy=xt(),Zx={"/":"root_url","/account":"account_url","/account/addresses":"account_addresses_url","/account/login":"account_login_url","/account/logout":"account_logout_url","/account/recover":"account_recover_url","/account/register":"account_register_url","/cart":"cart_url","/cart/add":"cart_add_url","/cart/change":"cart_change_url","/cart/clear":"cart_clear_url","/cart/update":"cart_update_url","/collections":"collections_url","/collections/all":"all_products_collection_url","/customer_authentication/login":"storefront_login_url","/recommendations/products":"product_recommendations_url","/search":"search_url","/search/suggest":"predictive_search_url"},sF=Object.keys(Zx).reverse();Ry.HardcodedRoutes={meta:{code:"HardcodedRoutes",name:"Hardcoded Routes",docs:{description:"This check encourages using the routes object instead of hardcoding URLs.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/hardcoded-routes"},type:nF.SourceCodeType.LiquidHtml,severity:nF.Severity.WARNING,schema:{},targets:[]},create(t){return{async HtmlElement(e){let r=e.attributes.filter(qy.isValuedHtmlAttribute).find(n=>((0,qy.isAttr)(n,"action")||(0,qy.isAttr)(n,"href"))&&iF(n));if(r){let n=r,i=iF(n),s=Zx[i],a=n.attributePosition.start,u=a+i.length;t.report({message:`Use routes object {{ routes.${s} }} instead of hardcoding ${i}`,startIndex:a,endIndex:u})}},async LiquidFilter(e){if(e.name!=="link_to")return;let r=e.args[0],n=r.type==="String"?r.value:"",i=sF.find(s=>s==="/"?s===n:n.startsWith(s));if(i){let s=Zx[i],a=r.position.start+1;t.report({message:`Use routes object {{ routes.${s} }} instead of hardcoding ${i}`,startIndex:a,endIndex:a+i.length})}}}}};function iF(t){if(!(0,qy.isNodeOfType)(qae.NodeTypes.TextNode,t.value[0]))return;let e=t.value[0].value;return sF.find(r=>r==="/"?r===e&&t.value.length===1:e.startsWith(r))}});var uF=P(Dy=>{"use strict";b();Object.defineProperty(Dy,"__esModule",{value:!0});Dy.ImgWidthAndHeight=void 0;var oF=de(),My=xt();Dy.ImgWidthAndHeight={meta:{code:"ImgWidthAndHeight",name:"Width and height attributes on image tags",docs:{description:"This check is aimed at eliminating content layout shift in themes by enforcing the use of the width and height attributes on img tags.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/img-width-and-height"},type:oF.SourceCodeType.LiquidHtml,severity:oF.Severity.ERROR,schema:{},targets:[]},create(t){return{async HtmlVoidElement(e){if(e.name==="img"){let r=e.attributes.find(s=>(0,My.isValuedHtmlAttribute)(s)&&(0,My.isAttr)(s,"width")),n=e.attributes.find(s=>(0,My.isValuedHtmlAttribute)(s)&&(0,My.isAttr)(s,"height")),i=[];if(r||i.push("width"),n||i.push("height"),i.length>0){let s=i.length===1?"attribute":"attributes";t.report({message:`Missing ${i.join(" and ")} ${s} on img tag`,startIndex:e.position.start,endIndex:e.position.end})}}}}}}});var pF=P(Fy=>{"use strict";b();Object.defineProperty(Fy,"__esModule",{value:!0});Fy.isPropertyNode=Mae;Fy.getAllBlocks=fF;var ek=Dt(),Rae=is();function Mae(t){return typeof t=="object"&&t!==null}function lF(t){return t.filter(e=>e==="blocks").length>1}function cF(t,e,r,n){n.report({message:t,startIndex:e+(0,ek.getLocStart)(r),endIndex:e+(0,ek.getLocEnd)(r)})}async function Dae(t,e){if(t==="@theme"||t==="@app")return!0;let r=`blocks/${t}.liquid`;return await(0,Rae.doesFileExist)(e,r)}async function Fae(t,e,r){var n,i;let s=[];if(!t)return s;let a=lF(e)?await((n=r.getBlockSchema)===null||n===void 0?void 0:n.call(r,t)):await((i=r.getSectionSchema)===null||i===void 0?void 0:i.call(r,t));if(!a||a instanceof Error)return s;let{validSchema:u}=a;return!u||u instanceof Error||Array.isArray(u.blocks)&&u.blocks.forEach(c=>{!("name"in c)&&c.type!=="@app"&&s.push(c.type)}),s}async function jae(t,e,r,n,i,s,a){let u=await Fae(n,i,a);if(u.length===0)return;if(!await Dae(t,a))cF(`Theme block 'blocks/${t}.liquid' does not exist.`,s,r,a);else{if(e)return;{let p=t.startsWith("_"),d=u.includes("@theme"),m=u.includes(t);if(p?m:m||d)return;{let h=lF(i)?"blocks":"sections";cF(`Block type '${t}' is not allowed in '${h}/${n}.liquid'.`,s,r,a)}}}}async function fF(t,e,r,n,i,s){await Promise.all(Object.entries(n).map(async([a,u])=>{if(u.type){let c=i.concat(a,"type"),p=(0,ek.nodeAtPath)(t,c);p&&await jae(u.type,u.static,p,r,i,e,s)}"blocks"in u&&await fF(t,e,u.type,u.blocks,i.concat(a,"blocks"),s)}))}});var dF=P(jy=>{"use strict";b();Object.defineProperty(jy,"__esModule",{value:!0});jy.JSONMissingBlock=void 0;var Bae=hr(),hF=de(),tk=pF();jy.JSONMissingBlock={meta:{code:"JSONMissingBlock",name:"Check for missing blocks types in JSON templates",docs:{description:"This check ensures that JSON templates contain valid block types.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-missing-block"},type:hF.SourceCodeType.JSON,severity:hF.Severity.ERROR,schema:{},targets:[]},create(t){return t.toRelativePath(t.file.uri).startsWith("templates/")?{async onCodePathEnd(){let r=await(0,Bae.getSchemaFromJSON)(t),{ast:n}=r??{};if(!n||n instanceof Error||!r)return;let i=r.parsed.sections;i&&await Promise.all(Object.entries(i).map(async([s,a])=>{(0,tk.isPropertyNode)(a)&&"blocks"in a&&(0,tk.isPropertyNode)(a.blocks)&&"type"in a&&await(0,tk.getAllBlocks)(n,0,a.type,a.blocks,["sections",s,"blocks"],t)}))}}:{}}}});var gF=P(By=>{"use strict";b();Object.defineProperty(By,"__esModule",{value:!0});By.JSONSyntaxError=void 0;var $ae=Uw(),mF=de(),Vae=_t();function Uae(t){return("rawMessage"in t?t.rawMessage:t.message).replace(/\s+at \d+:\d+/,"")}By.JSONSyntaxError={meta:{code:"JSONSyntaxError",name:"Enforce valid JSON",docs:{description:"This check exists to prevent invalid JSON files in themes.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-syntax-error"},type:mF.SourceCodeType.JSON,severity:mF.Severity.ERROR,schema:{},targets:[],deprecated:!0},create(t){if(t.validateJSON)return{};let e=t.file.ast;return(0,Vae.isError)(e)?{async onCodePathStart(r){if(r.ast instanceof $ae.JSONCParseErrors)for(let n of r.ast.errors)t.report({message:Wae(n.error),startIndex:n.offset,endIndex:n.offset+n.length});else t.report({message:Uae(e),startIndex:0,endIndex:r.source.length})}}:{}}};function Wae(t){switch(t){case 1:return"Invalid symbol";case 2:return"Invalid number format";case 3:return"Property name expected";case 4:return"Expecting a value";case 5:return"Expecting a colon after a property name (:)";case 6:return"Expecting a comma";case 7:return"Expecting a closing brace (})";case 8:return"Expecting a closing bracket (])";case 9:return"Expecting end of file";case 10:return"Invalid comment token";case 11:return"Unexpected end of comment";case 12:return"Unexpected end of string";case 13:return"Unexpected end of number";case 14:return"Invalid unicode";case 15:return"Invalid escape character";case 16:return"Invalid character";default:return"Something went wrong with this JSON"}}});var vF=P($y=>{"use strict";b();Object.defineProperty($y,"__esModule",{value:!0});$y.LiquidFreeSettings=void 0;var Gae=ug(),yF=de(),Hae=qa();$y.LiquidFreeSettings={meta:{code:"LiquidFreeSettings",name:"Check for liquid free settings values",docs:{description:"Ensures settings values are liquid free.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-free-settings"},type:yF.SourceCodeType.LiquidHtml,severity:yF.Severity.WARNING,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.source.slice(e.blockStartPosition.end,e.blockEndPosition.start),n=(0,Gae.toJSONAST)(r);n instanceof Error||(0,Hae.visit)(n,{Property(i,s){if(!Jae(s,"settings")||!_F(i.value)||zae(s))return;let{value:a,loc:u}=i.value,c=i.key.value;typeof a=="string"&&c!=="visible_if"&&a.includes("{%")&&a.includes("%}")&&t.report({message:"Settings values cannot contain liquid logic.",startIndex:e.blockStartPosition.end+u.start.offset,endIndex:e.blockStartPosition.end+u.end.offset})}})}}}};function _F(t){return t.type==="Literal"}function zae(t){let e=t.at(-1);return!e||e.type!=="Object"?!1:e.children.some(({key:r,value:n})=>r.value!=="type"||!_F(n)?!1:n.value==="liquid")}function Jae(t,e){return t.some((r,n)=>{var i;let s=t[n-1];return(r.type==="Array"||r.type==="Object")&&s?.type==="Property"&&((i=s.key)===null||i===void 0?void 0:i.value)===e})}});var ms=P(Zs=>{"use strict";b();Object.defineProperty(Zs,"__esModule",{value:!0});Zs.INVALID_SYNTAX_MESSAGE=void 0;Zs.getValuesInMarkup=Kae;Zs.getFragmentsInMarkup=Zae;Zs.getRangeMatch=AF;Zs.doesFragmentContainUnsupportedParentheses=eoe;Zs.fragmentKeyValuePair=toe;Zs.INVALID_SYNTAX_MESSAGE="Syntax is not supported";function Kae(t){return[...t.matchAll(new RegExp(xF,"g"))].map(e=>({value:e[0],index:e.index}))}var Qae='"[^"]*"',Yae="'[^']*'",bF="\\s*(-?\\d+(?:\\.\\d+)?|\\w+(?:\\.\\w+)*)\\s*",rk=`\\(\\s*${bF}(\\.{2,})\\s*${bF}\\s*\\)`,SF="[^\\s,]+",wF=`(${Qae}|${Yae})`,xF=`(${wF}|${rk}|${SF})`,kF=`(\\S+):\\s*${xF}`,Xae=new RegExp(`${wF}|${rk}|${kF}|${SF}`,"g");function Zae(t){return[...t.matchAll(Xae)].map(e=>({value:e[0],index:e.index}))}function AF(t){return t.match(rk)}function eoe(t){return AF(t)?!1:t.includes("(")||t.includes(")")}function toe(t){let e=t.match(new RegExp(kF));if(!e)return;let[,r,n]=e;return{key:r,value:n}}});var TF=P(nk=>{"use strict";b();Object.defineProperty(nk,"__esModule",{value:!0});nk.detectMultipleAssignValues=roe;var IF=ms();function roe(t){var e;let r=/([^=]+)(=\s*)([^|]+)(?:\s*\|\s*.*)?$/m;if(t.name!=="assign")return;let n=t.markup;if(typeof n!="string")return;let i=n.match(r);if(!i)return;let[s,a,u,c]=i,p=(e=(0,IF.getValuesInMarkup)(c).at(0))===null||e===void 0?void 0:e.value;if(!p)return;let d=(y,w)=>{let x=y.indexOf(n,w);return{startIndex:x+a.length+u.length+p.length,endIndex:x+a.length+u.length+c.trimEnd().length}},{startIndex:m,endIndex:h}=d(t.source,t.position.start);if(!(h<=m)&&!(h<=m))return{message:IF.INVALID_SYNTAX_MESSAGE,startIndex:m,endIndex:h,fix:y=>{y.replace(m,h,"")}}}});var OF=P(ik=>{"use strict";b();Object.defineProperty(ik,"__esModule",{value:!0});ik.detectInvalidBooleanExpressions=soe;var EF=Ge(),noe=ms(),ioe=xt();function soe(t,e){if((0,ioe.isWithinRawTagThatDoesNotParseItsContents)(e))return;let r=t.condition;if(!(r.type!==EF.NodeTypes.Comparison&&r.type!==EF.NodeTypes.LogicalExpression))return{message:noe.INVALID_SYNTAX_MESSAGE,startIndex:t.position.start,endIndex:t.position.end,fix:n=>{n.replace(t.position.start,t.position.end,t.source.slice(r.left.position.start,r.left.position.end))}}}});var NF=P(ak=>{"use strict";b();Object.defineProperty(ak,"__esModule",{value:!0});ak.detectInvalidEchoValue=ooe;var aoe=Ge(),sk=ms();function ooe(t){var e;let r=/([^|]*)(?:\s*\|\s*.*)?$/m;if(t.type===aoe.NodeTypes.LiquidTag&&t.name!=="echo")return;let n=t.markup;if(typeof n!="string"||!n)return;let i=n.match(r);if(!i)return;let[,s]=i,a=(e=(0,sk.getValuesInMarkup)(s).at(0))===null||e===void 0?void 0:e.value;if(!a){let d=t.source.indexOf(n,t.position.start),m=d+n.length;return{message:sk.INVALID_SYNTAX_MESSAGE,startIndex:d,endIndex:m,fix:h=>{h.replace(d,m,"blank")}}}let u=(d,m)=>{let h=d.indexOf(n,m);return{startIndex:h+a.length,endIndex:h+s.trimEnd().length}},{startIndex:c,endIndex:p}=u(t.source,t.position.start);if(!(p<=c))return{message:sk.INVALID_SYNTAX_MESSAGE,startIndex:c,endIndex:p,fix:d=>{d.replace(c,p,"")}}}});var qF=P(ok=>{"use strict";b();Object.defineProperty(ok,"__esModule",{value:!0});ok.detectInvalidConditionalNode=loe;var CF=ms(),uoe={logical:/^(and|or)$/,comparison:/^(==|!=|>=|<=|>|<|contains)$/,invalid:/^[@#$&]$/,literal:/^(['"][^'"]*['"]|\d+(?:\.\d+)?|true|false|nil|empty|blank)$/};function coe(t){for(let[e,r]of Object.entries(uoe))if(r.test(t))return e;return"variable"}function loe(t){if(!("name"in t)||!t.name||!["if","elsif","unless"].includes(String(t.name)))return;let e=t.markup;if(typeof e!="string"||!e.trim())return;let r=doe(e);if(!r)return;let n=t.blockStartPosition||t.position,s=t.source.slice(n.start,n.end).indexOf(e);if(s<0)return;let a=n.start+s,u=a+e.length;return{message:`${CF.INVALID_SYNTAX_MESSAGE}: ${r.message}`,startIndex:a,endIndex:u,fix:c=>{c.replace(a,u,r.fix)}}}function LF(t){return t.type==="literal"||t.type==="variable"}function PF(t){return t.type==="logical"||t.type==="comparison"}function foe(t){let e=t[0];return e.type==="invalid"||e.type==="comparison"?{message:`Conditional cannot start with '${e.value}'. Use a variable or value instead`,fix:"false"}:null}function poe(t){for(let n=0;n<=t.length-4;n++){let[i,s,a]=t.slice(n,n+3),u=t.slice(n+3);if(LF(i)&&s.type==="comparison"&&LF(a)&&u.length>0&&u[0].type!=="logical"){let c=t.slice(0,n+3).map(m=>m.value).join(" "),p=u.map(m=>m.value).join(" ");return/&&|\|\|/.test(p)?{message:`Conditional is invalid. Anything after '${c}' will be ignored. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,fix:c}:{message:`Conditional is invalid. Anything after '${c}' will be ignored`,fix:c}}}return null}function hoe(t){var e;for(let r=0;r<t.length-1;r++){let n=t[r],i=t[r+1];if(n.type==="literal"&&!PF(i)){let s=t.slice(r+1);if(!(((e=s[0])===null||e===void 0?void 0:e.type)==="variable"&&s.some(PF))){let u=s.map(p=>p.value).join(" ");return/&&|\|\|/.test(u)?{message:`Expression stops at truthy value '${n.value}', and will ignore: '${u}'. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,fix:n.value}:{message:`Expression stops at truthy value '${n.value}', and will ignore: '${u}'`,fix:n.value}}}}return null}function doe(t){let e=t.trim();if(!e)return null;let r=(0,CF.getValuesInMarkup)(e).map(({value:n})=>({value:n,type:coe(n)}));return r.length===0?null:foe(r)||poe(r)||hoe(r)}});var DF=P(Bc=>{"use strict";b();Object.defineProperty(Bc,"__esModule",{value:!0});Bc.INVALID_LOOP_RANGE_MESSAGE=void 0;Bc.detectInvalidLoopRange=yoe;var RF=Ge(),moe=ms(),goe=xt();Bc.INVALID_LOOP_RANGE_MESSAGE="Ranges must be in the format `(<start>..<end>)`. The start and end of the range must be whole numbers or variables.";function yoe(t){if(t.type===RF.NodeTypes.LiquidTag&&!(0,goe.isLoopLiquidTag)(t))return;let e=t.markup;if(e){if(typeof e=="string")return MF(t,e);if(e.collection.type===RF.NodeTypes.Range)return MF(t,t.source.slice(e.collection.position.start,e.collection.position.end))}}function MF(t,e){let r=(0,moe.getRangeMatch)(e);if(!r||r.index===void 0)return;let[n,i,,s]=r,a=i,u=s;!isNaN(Number(i))&&Number(i)%1!==0&&(a=`${Math.trunc(Number(i))}`),!isNaN(Number(s))&&Number(s)%1!==0&&(u=`${Math.trunc(Number(s))}`);let c=`(${a}..${u})`;if(e.slice(r.index,r.index+n.length)===c)return;let d=t.source.indexOf(e,t.position.start)+r.index,m=d+n.length;return{message:Bc.INVALID_LOOP_RANGE_MESSAGE,startIndex:d,endIndex:m,fix:h=>{h.replace(d,m,c)}}}});var jF=P(ck=>{"use strict";b();Object.defineProperty(ck,"__esModule",{value:!0});ck.detectInvalidLoopArguments=boe;var _oe=Ge(),uk=ms(),voe=xt();function boe(t,e=[]){if(t.type===_oe.NodeTypes.LiquidTag&&!(0,voe.isLoopLiquidTag)(t))return;let r=t.markup;if(!r)return;typeof r!="string"&&(r=r.source.slice(r.position.start,r.position.end));let n=(0,uk.getFragmentsInMarkup)(r);if(n.length<=3)return;let i=t.source.indexOf(r,t.position.start),s=i+n.at(3).index,a=i+n.at(-1).index+n.at(-1).value.length,u=[],c=!1,p=[];for(let d=3;d<n.length;d++){let m=n[d];if((0,uk.doesFragmentContainUnsupportedParentheses)(m.value)){c=!0,p.push(m.value);continue}let h=(0,uk.fragmentKeyValuePair)(m.value);if(h){if(c=!0,!FF(e,t.name,h.key,!1)){p.push(m.value);continue}}else if(c||!FF(e,t.name,m.value,!0)){c=!0,p.push(m.value);continue}u.push(m.value)}if(p.length!==0)return{message:`Arguments must be provided in the format \`${t.name} in <array> <positional arguments> <named arguments>\`. Invalid/Unknown arguments: ${p.join(", ")}`,startIndex:s,endIndex:a,fix:d=>{d.replace(s,a,u.join(" "))}}}function FF(t,e,r,n){var i,s;return((s=(i=t.find(a=>a.name===e))===null||i===void 0?void 0:i.parameters)===null||s===void 0?void 0:s.some(a=>a.name===r&&a.positional===n))||!1}});var BF=P(fk=>{"use strict";b();Object.defineProperty(fk,"__esModule",{value:!0});fk.detectConditionalNodeUnsupportedParenthesis=Soe;var lk=ms();function Soe(t){if(!["if","elsif","unless"].includes(t.name)||typeof t.markup!="string"||!t.markup.trim())return;let e=t.source.indexOf(t.markup,t.position.start),n=(0,lk.getFragmentsInMarkup)(t.markup).filter(i=>(0,lk.doesFragmentContainUnsupportedParentheses)(i.value));if(n.length)return{message:lk.INVALID_SYNTAX_MESSAGE,startIndex:e,endIndex:e+t.markup.length,fix:i=>{for(let s of n)i.replace(e+s.index,e+s.index+s.value.length,s.value.replace(/[\(\)]/g,""))}}}});var VF=P(pk=>{"use strict";b();Object.defineProperty(pk,"__esModule",{value:!0});pk.detectInvalidFilterName=xoe;var $c=Ge(),woe=ms();async function xoe(t,e){if(!e)return[];if(t.type===$c.NodeTypes.LiquidVariableOutput)return typeof t.markup!="string"?[]:$F(t,t.markup,e);if(t.type===$c.NodeTypes.LiquidTag){if(t.name===$c.NamedTags.echo&&typeof t.markup!="string")return[];if(t.name===$c.NamedTags.assign&&typeof t.markup!="string")return[];if(typeof t.markup=="string"&&(t.name===$c.NamedTags.echo||t.name===$c.NamedTags.assign))return $F(t,t.markup,e)}return[]}async function $F(t,e,r){var n;let i=r,s=e.trim(),a=[],u=/\|\s*([a-zA-Z][a-zA-Z0-9_]*)/g,c=Array.from(s.matchAll(u));for(let p of c){let d=p[1];if(!i.some(v=>v.name===d))continue;let m=p.index+p[0].length,y=(n=s.slice(m).match(/^(?!\s*(?::|$|\|\s*[a-zA-Z]|\|\s*\||\s*\|\s*(?:[}%]|$)))([^:|]+?)(?=\s*(?::|$|\|))/))===null||n===void 0?void 0:n[1];if(!y)continue;let x=t.source.indexOf(e,t.position.start)+m,k=x+y.length;a.push({message:`${woe.INVALID_SYNTAX_MESSAGE} Filter '${d}' has trailing characters '${y}' that should be removed.`,startIndex:x,endIndex:k,fix:v=>{v.replace(x,k,"")}})}return a}});var GF=P(hk=>{"use strict";b();Object.defineProperty(hk,"__esModule",{value:!0});hk.detectInvalidPipeSyntax=koe;var Vc=Ge(),UF=ms();async function koe(t){if(t.type===Vc.NodeTypes.LiquidVariableOutput)return typeof t.markup!="string"?[]:WF(t,t.markup);if(t.type===Vc.NodeTypes.LiquidTag){if(t.name===Vc.NamedTags.echo&&typeof t.markup!="string")return[];if(t.name===Vc.NamedTags.assign&&typeof t.markup!="string")return[];if(typeof t.markup=="string"&&(t.name===Vc.NamedTags.echo||t.name===Vc.NamedTags.assign))return WF(t,t.markup)}return[]}async function WF(t,e){let r=[],n=e.trim(),i=/(\|\s*){2,}/g,s=Array.from(n.matchAll(i));for(let c of s){let p=t.source.indexOf(e,t.position.start);if(p===-1)continue;let d=p+c.index,m=d+c[0].length;r.push({message:`${UF.INVALID_SYNTAX_MESSAGE}. Remove extra \`|\` character(s).`,startIndex:d,endIndex:m,fix:h=>{h.replace(d,m,"| ")}})}let a=/\s*\|\s*$/,u=n.match(a);if(u){let c=t.source.indexOf(e,t.position.start);if(c===-1)return r;let p=u.index,d=c+p,m=d+u[0].length;r.push({message:`${UF.INVALID_SYNTAX_MESSAGE}. Remove the trailing \`|\` character.`,startIndex:d,endIndex:m,fix:h=>{h.replace(d,m,"")}})}return r}});var YF=P(Uy=>{"use strict";b();Object.defineProperty(Uy,"__esModule",{value:!0});Uy.LiquidHTMLSyntaxError=void 0;var HF=de(),dk=_t(),Aoe=TF(),Ioe=OF(),zF=NF(),JF=qF(),Toe=DF(),Eoe=jF(),Ooe=BF(),KF=VF(),QF=GF(),Vy=xt();function Noe(t){return"name"in t&&t.name==="LiquidHTMLParsingError"&&"loc"in t}function Loe(t,e){return t.replace(/Line \d+, col \d+:\s+/,"SyntaxError: ").replace(/(?!<expected ".+",) not .*/,` not "${e}"`)}Uy.LiquidHTMLSyntaxError={meta:{code:"LiquidHTMLSyntaxError",aliases:["SyntaxError","HtmlParsingError"],name:"Prevent LiquidHTML Syntax Errors",docs:{description:"This check exists to inform the user of Liquid HTML syntax errors.",recommended:!0},type:HF.SourceCodeType.LiquidHtml,severity:HF.Severity.ERROR,schema:{},targets:[]},create(t){var e,r;let n=t.file.ast,i=(e=t.themeDocset)===null||e===void 0?void 0:e.filters(),s=(r=t.themeDocset)===null||r===void 0?void 0:r.tags();return(0,dk.isError)(n)?{async onCodePathStart(a){if(Noe(n)){let{start:u,end:c}=n.loc,p=(0,dk.getOffset)(a.source,u.line,u.column),d=(0,dk.getOffset)(a.source,c.line,c.column);p===d&&(d+=1);let m=a.source.slice(p,d);t.report({message:Loe(n.message,m),startIndex:p,endIndex:d})}else t.report({message:n.message,startIndex:0,endIndex:a.source.length})}}:{async BooleanExpression(a,u){if((0,Vy.isWithinRawTagThatDoesNotParseItsContents)(u))return;let c=(0,Ioe.detectInvalidBooleanExpressions)(a,u);c&&t.report(c)},async LiquidTag(a,u){if((0,Vy.isWithinRawTagThatDoesNotParseItsContents)(u))return;let c=[(0,Aoe.detectMultipleAssignValues)(a),(0,zF.detectInvalidEchoValue)(a),(0,Toe.detectInvalidLoopRange)(a),(0,Eoe.detectInvalidLoopArguments)(a,await s)].filter(Boolean),p=(0,Ooe.detectConditionalNodeUnsupportedParenthesis)(a)||(0,JF.detectInvalidConditionalNode)(a);p&&c.push(p),c.forEach(t.report);let d=await(0,KF.detectInvalidFilterName)(a,await i);d.length>0&&d.forEach(h=>t.report(h));let m=await(0,QF.detectInvalidPipeSyntax)(a);m.length>0&&m.forEach(h=>t.report(h))},async LiquidBranch(a,u){if((0,Vy.isWithinRawTagThatDoesNotParseItsContents)(u))return;let c=(0,JF.detectInvalidConditionalNode)(a);c&&t.report(c)},async LiquidVariableOutput(a,u){if((0,Vy.isWithinRawTagThatDoesNotParseItsContents)(u))return;let c=await(0,KF.detectInvalidFilterName)(a,await i);c.length>0&&c.forEach(m=>t.report(m));let p=await(0,QF.detectInvalidPipeSyntax)(a);p.length>0&&p.forEach(m=>t.report(m));let d=(0,zF.detectInvalidEchoValue)(a);d&&t.report(d)}}}}});var e3=P(Wy=>{"use strict";b();Object.defineProperty(Wy,"__esModule",{value:!0});Wy.MatchingTranslations=void 0;var XF=de(),ZF=new Set(["zero","one","two","few","many","other"]);Wy.MatchingTranslations={meta:{code:"MatchingTranslations",name:"Translation files should have the same keys",docs:{description:"TODO",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/matching-translations"},type:XF.SourceCodeType.JSON,severity:XF.Severity.ERROR,schema:{},targets:[]},create(t){let e=new Set,r=new Set,n=new Map,i=t.file,s=i.uri,a=t.toRelativePath(s),u=i.ast,c=a.startsWith("locales/"),p=s.endsWith(".default.json")||s.endsWith(".default.schema.json"),d=s.endsWith(".schema.json");if(!c||p||u instanceof Error)return{};let m=()=>e.size>0,h=({type:L})=>L==="Literal",y=L=>ZF.has(L.key.value),w=L=>L.startsWith("shopify.")||L.startsWith("customer_accounts."),x=L=>{var R;return(R=e.has(L))!==null&&R!==void 0?R:!1},k=L=>[...ZF].some(R=>L.endsWith(R)),v=L=>Object.keys(L).reduce((M,F)=>{if(typeof L[F]!="object")return M.concat(F);let X=L[F],H=v(X);return M.concat(H.map($=>`${F}.${$}`))},[]),I=L=>L.filter(R=>R.type==="Property").reduce((R,M)=>R.concat(M.key.value),[]).join("."),T=(L,R)=>{let M=Math.min(L.length,R.length);for(let F=0;F<M;F++)if(L[F]!==R[F])return F;return M},S=L=>{var R;let M=L.split("."),F="",X=0;for(let H of n.keys()){let $=H.split("."),B=T($,M);B>X&&(X=B,F=H)}return(R=n.get(F))!==null&&R!==void 0?R:u};return{async onCodePathStart(){let R=await(d?t.getDefaultSchemaTranslations:t.getDefaultTranslations)().then(v);R.forEach(Set.prototype.add,e),R.forEach(Set.prototype.add,r)},async Property(L,R){let M=I(R.concat(L));if(n.set(M,L),!!m()&&!y(L)&&h(L.value)&&!w(M)){if(x(M)){r.delete(M);return}t.report({message:`A default translation for '${M}' does not exist`,startIndex:L.loc.start.offset,endIndex:L.loc.end.offset,suggest:[{message:"Delete unneeded translation key",fix(F){F.remove(M)}}]})}},async onCodePathEnd(){r.forEach(L=>{let R=S(L);k(L)||w(L)||t.report({message:`The translation for '${L}' is missing`,startIndex:R.loc.start.offset,endIndex:R.loc.end.offset,fix(M){M.add(L,"TODO")}})})}}}}});var r3=P(Gy=>{"use strict";b();Object.defineProperty(Gy,"__esModule",{value:!0});Gy.MissingAsset=void 0;var t3=de(),mk=is(),Poe=xt();Gy.MissingAsset={meta:{code:"MissingAsset",name:"Avoid rendering missing asset files",docs:{description:"Reports missing asset files",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-asset"},type:t3.SourceCodeType.LiquidHtml,severity:t3.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidVariable(e){if(e.filters.length===0||e.filters[0].name!=="asset_url"||!(0,Poe.isLiquidString)(e.expression))return;let r=e.expression,n=`assets/${r.value}`,i=n,s=await(0,mk.doesFileExist)(t,i);s||i.endsWith(".scss.css")&&(i=i.replace(".scss.css",".scss.liquid"),s=await(0,mk.doesFileExist)(t,i),s)||(i.endsWith(".js")||i.endsWith(".css"))&&(i+=".liquid",s=await(0,mk.doesFileExist)(t,i),s)||t.report({message:`'${n}' does not exist`,startIndex:r.position.start,endIndex:r.position.end})}}}}});var i3=P(Hy=>{"use strict";b();Object.defineProperty(Hy,"__esModule",{value:!0});Hy.MissingContentForArguments=void 0;var n3=de(),gk=ds();Hy.MissingContentForArguments={meta:{code:"MissingContentForArguments",name:"Missing ContentFor Arguments",docs:{description:"This check ensures that all required arguments are provided when rendering a static block.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-content-for-arguments"},type:n3.SourceCodeType.LiquidHtml,severity:n3.Severity.WARNING,schema:{},targets:[]},create(t){return{async ContentForMarkup(e){let r=(0,gk.getBlockName)(e);if(!r)return;let n=await(0,gk.getLiquidDocParams)(t,`blocks/${r}.liquid`);if(!n)return;let i=new Map(e.args.map(a=>[a.name,a])),s=Array.from(n.values()).filter(a=>a.required&&!i.has(a.name));(0,gk.reportMissingArguments)(t,e,s,r)}}}}});var a3=P(zy=>{"use strict";b();Object.defineProperty(zy,"__esModule",{value:!0});zy.MissingRenderSnippetArguments=void 0;var s3=de(),yk=ds();zy.MissingRenderSnippetArguments={meta:{code:"MissingRenderSnippetArguments",name:"Missing Render Snippet Arguments",aliases:["MissingRenderSnippetParams"],docs:{description:"This check ensures that all required arguments are provided when rendering a snippet.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-render-snippet-arguments"},type:s3.SourceCodeType.LiquidHtml,severity:s3.Severity.WARNING,schema:{},targets:[]},create(t){return{async RenderMarkup(e){let r=(0,yk.getSnippetName)(e);if(!r)return;let n=await(0,yk.getLiquidDocParams)(t,`snippets/${r}.liquid`);if(!n)return;let i=new Map(e.args.map(a=>[a.name,a])),s=Array.from(n.values()).filter(a=>{var u;return a.required&&!i.has(a.name)&&a.name!==((u=e.alias)===null||u===void 0?void 0:u.value)});(0,yk.reportMissingArguments)(t,e,s,r)}}}}});var u3=P(Ky=>{"use strict";b();Object.defineProperty(Ky,"__esModule",{value:!0});Ky.MissingTemplate=void 0;var o3=Ge(),Coe=Mx(),Jy=de(),qoe=is(),Roe={ignoreMissing:Jy.SchemaProp.array(Jy.SchemaProp.string(),[])};Ky.MissingTemplate={meta:{code:"MissingTemplate",name:"Avoid rendering missing templates",docs:{description:"Reports missing include/render/section liquid file",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-template"},type:Jy.SourceCodeType.LiquidHtml,severity:Jy.Severity.ERROR,schema:Roe,targets:[]},create(t){let e=i=>typeof i.markup!="string";function r(i){return t.settings.ignoreMissing.some(s=>(0,Coe.minimatch)(i,s))}async function n(i,{position:s}){await(0,qoe.doesFileExist)(t,i)||r(i)||t.report({message:`'${i}' does not exist`,startIndex:s.start,endIndex:s.end})}return{async RenderMarkup(i){if(i.snippet.type===o3.NodeTypes.VariableLookup)return;let s=i.snippet,a=`snippets/${s.value}.liquid`;await n(a,s)},async LiquidTag(i){if(!e(i)||i.name!==o3.NamedTags.section)return;let s=i.markup,a=`sections/${s.value}.liquid`;await n(a,s)}}}}});var l3=P(Qy=>{"use strict";b();Object.defineProperty(Qy,"__esModule",{value:!0});Qy.OrphanedSnippet=void 0;var Moe=hr(),c3=de();Qy.OrphanedSnippet={meta:{code:"OrphanedSnippet",name:"Prevent orphaned snippets",docs:{description:"This check exists to prevent orphaned snippets in themes.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/orphaned-snippet"},type:c3.SourceCodeType.LiquidHtml,severity:c3.Severity.WARNING,schema:{},targets:[]},create(t){return{async onCodePathEnd(){let{getReferences:e}=t;if(!e)return;let r=t.file.uri;(0,Moe.isSnippet)(r)&&(await e(r)).length===0&&t.report({message:"This snippet is not referenced by any other files",startIndex:0,endIndex:1})}}}}});var h3=P(Xy=>{"use strict";b();Object.defineProperty(Xy,"__esModule",{value:!0});Xy.PaginationSize=void 0;var _k=Ge(),Yy=de(),f3=_t(),p3=xt(),Doe=Dt(),Foe={minSize:Yy.SchemaProp.number(1),maxSize:Yy.SchemaProp.number(250)};Xy.PaginationSize={meta:{code:"PaginationSize",name:"Ensure paginate tags are used with performant sizes",docs:{description:"This check is aimed at keeping response times low.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/pagination-size",recommended:!0},type:Yy.SourceCodeType.LiquidHtml,severity:Yy.Severity.WARNING,schema:Foe,targets:[]},create(t){let e=t.settings.minSize,r=t.settings.maxSize,n=[],i=[];function s(a,u,c=`Pagination size must be a positive integer between ${e} and ${r}.`){e<=u&&u<=r||t.report({message:c,startIndex:a.position.start,endIndex:a.position.end})}return{async LiquidTag(a){if(typeof a.markup=="string"||a.name!=="paginate")return;let u=a.markup.pageSize;(0,p3.isNodeOfType)(_k.NodeTypes.VariableLookup,u)?i.push(u):(0,p3.isNodeOfType)(_k.NodeTypes.Number,u)&&s(u,Number(u.value))},async LiquidRawTag(a){if(a.name==="schema"){let u=(0,Doe.parseJSON)(a.body.value);if((0,f3.isError)(u))return;u.settings&&Array.isArray(u.settings)&&(n=u.settings)}},async onCodePathEnd(){i.forEach(a=>{let u=(0,f3.last)(a.lookups);if(u===void 0||u.type!==_k.NodeTypes.String)return;let c=u.value,p=n.find(d=>d.id===c);if(p!==void 0){if(p.default===void 0){t.report({message:"Default pagination size should be defined in the section settings.",startIndex:a.position.start,endIndex:a.position.end});return}s(a,p.default,`This setting's default value should be between ${e} and ${r} but is currently ${p.default}.`)}})}}}}});var m3=P(Uc=>{"use strict";b();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.scriptTagSuggestion=Uc.liquidFilterSuggestion=void 0;var joe=_t(),d3=t=>`Use an HTML script tag with the ${t} attribute instead`,Boe=(t,e,r,n)=>({message:d3(t),fix(i){var s,a;let c=`{{ ${e.source.slice(r.expression.position.start,(a=(s=(0,joe.last)(r.filters,-1))===null||s===void 0?void 0:s.position.end)!==null&&a!==void 0?a:e.position.start)} }}`;i.replace(n.position.start,n.position.end,`<script src="${c}" ${t}></script>`)}});Uc.liquidFilterSuggestion=Boe;var $oe=(t,e)=>({message:d3(t),fix(r){r.insert(e.blockStartPosition.end-1,` ${t}`)}});Uc.scriptTagSuggestion=$oe});var _3=P(e_=>{"use strict";b();Object.defineProperty(e_,"__esModule",{value:!0});e_.ParserBlockingScript=void 0;var g3=Ge(),y3=de(),vk=_t(),ea=xt(),Zy=m3();e_.ParserBlockingScript={meta:{code:"ParserBlockingScript",aliases:["ParserBlockingScriptTag"],name:"Avoid parser blocking scripts",docs:{description:"They are bad ok?",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/parser-blocking-javascript"},type:y3.SourceCodeType.LiquidHtml,severity:y3.Severity.ERROR,schema:{},targets:[]},create(t){return{LiquidFilter:async(e,r)=>{if(e.name!=="script_tag")return;let i=e.source.slice(e.position.start,e.position.end).indexOf("script_tag"),s=(0,vk.last)(r),a=(0,vk.last)(r,-1);t.report({message:"The script_tag filter is parser-blocking. Use a <script> tag with async or defer for better performance",startIndex:e.position.start+i,endIndex:e.position.end,suggest:a&&a.type===g3.NodeTypes.LiquidVariableOutput&&s&&s.type===g3.NodeTypes.LiquidVariable&&(0,vk.last)(s.filters)===e?[(0,Zy.liquidFilterSuggestion)("defer",e,s,a),(0,Zy.liquidFilterSuggestion)("async",e,s,a)]:void 0})},HtmlRawNode:async e=>{if(e.name!=="script"||!e.attributes.filter(ea.isValuedHtmlAttribute).some(s=>(0,ea.isAttr)(s,"src")))return;let n=e.attributes.filter(ea.isHtmlAttribute).some(s=>(0,ea.isAttr)(s,"async")||(0,ea.isAttr)(s,"defer")),i=e.attributes.filter(ea.isValuedHtmlAttribute).some(s=>(0,ea.isAttr)(s,"type")&&((0,ea.hasAttributeValueOf)(s,"module")||(0,ea.hasAttributeValueOf)(s,"importmap")));n||i||t.report({message:"Avoid parser blocking scripts by adding `defer` or `async` on this tag",startIndex:e.position.start,endIndex:e.position.end,suggest:[(0,Zy.scriptTagSuggestion)("defer",e),(0,Zy.scriptTagSuggestion)("async",e)]})}}}}});var S3=P(n_=>{"use strict";b();Object.defineProperty(n_,"__esModule",{value:!0});n_.SchemaPresetsBlockOrder=void 0;var t_=Dt(),Voe=hr(),v3=de();n_.SchemaPresetsBlockOrder={meta:{code:"SchemaPresetsBlockOrder",name:"Gives recommendations and validations for block_order",docs:{description:"Gives recommendations and validations for block_order for preset blocks as a hash.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/schema-presets-block-order"},type:v3.SourceCodeType.LiquidHtml,severity:v3.Severity.WARNING,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,n=await(0,Voe.getSchema)(t),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let a=i.presets;a&&a.forEach((u,c)=>{"blocks"in u&&u.blocks&&b3(u,t,r,s,["presets",String(c)])})}}}};function b3(t,e,r,n,i){if("blocks"in t&&typeof t.blocks=="object"&&t.blocks){let s="block_order"in t?t.block_order:void 0;s||Uoe(t)&&r_(e,r,n,i,"block_order is missing",!1),s?.forEach((a,u)=>{if(!t.blocks||!Array.isArray(t.blocks)&&!t.blocks[a]){let c=i.concat(["block_order"]).concat([String(u)]);r_(e,r,n,c,`block '${a}' is missing from 'blocks'`)}});for(let[a,u]of Object.entries(t.blocks)){if(u.static){if(Array.isArray(s)&&s.includes(a)){let c=i.concat(["block_order"]);r_(e,r,n,c,`static block '${a}' cannot be in the block_order`)}}else if(Array.isArray(s)&&!s.includes(a)){let c=i.concat(["block_order"]);r_(e,r,n,c,`block '${a}' is missing from the block_order`)}u.blocks&&(i.push("blocks",a),b3(u,e,r,n,i))}}}function Uoe(t){return"blocks"in t&&typeof t.blocks=="object"&&t.blocks!==null&&!Array.isArray(t.blocks)?Object.entries(t.blocks).some(([e,r])=>r.static!==!0):!1}function r_(t,e,r,n,i,s=!0){let a=(0,t_.nodeAtPath)(r,n),u=s?e+(0,t_.getLocStart)(a):e+(0,t_.getLocEnd)(a)-1,c=e+(0,t_.getLocEnd)(a);t.report({message:i,startIndex:u,endIndex:c})}});var i_=P(bk=>{"use strict";b();Object.defineProperty(bk,"__esModule",{value:!0});bk.isContentForBlock=Woe;function Woe(t){return typeof t=="string"?!1:t.contentForType.value==="block"}});var x3=P(s_=>{"use strict";b();Object.defineProperty(s_,"__esModule",{value:!0});s_.SchemaPresetsStaticBlocks=void 0;var Sk=Ge(),Wc=Dt(),Goe=hr(),w3=de(),Hoe=i_();s_.SchemaPresetsStaticBlocks={meta:{code:"SchemaPresetsStaticBlocks",name:"Ensure the preset static blocks are used in the liquid",docs:{description:'Warns if a preset static block does not have a corresponding content_for "block" tag.',recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/schema-presets-static-blocks"},type:w3.SourceCodeType.LiquidHtml,severity:w3.Severity.ERROR,schema:{},targets:[]},create(t){let e=[],r=[],n=0;function i(){r.forEach(s=>{e.some(a=>a.id===s.id&&a.type===s.type)||t.report({message:`Static block ${s.id} is missing a corresponding content_for "block" tag.`,startIndex:s.startIndex,endIndex:s.endIndex})})}return{async LiquidTag(s){var a,u;if(s.name!==Sk.NamedTags.content_for||!(0,Hoe.isContentForBlock)(s.markup))return;let c=(a=s.markup.args.find(m=>m.name==="id"))===null||a===void 0?void 0:a.value,p=(u=s.markup.args.find(m=>m.name==="type"))===null||u===void 0?void 0:u.value;if(!p||p.type!==Sk.NodeTypes.String)return;let d=p.value;c?.type===Sk.NodeTypes.String&&e.push({id:c.value,type:d})},async LiquidRawTag(s){if(s.name==="schema"&&s.body.kind==="json"){n=s.blockStartPosition.end;let a=await(0,Goe.getSchema)(t),{validSchema:u,ast:c}=a??{};if(!u||u instanceof Error||!c||c instanceof Error)return;let p=u.presets;if(!p)return;p.forEach((d,m)=>{if("blocks"in d&&d.blocks){let h=["presets",m,"blocks"];Array.isArray(d.blocks)?d.blocks.forEach((y,w)=>{if(y.static===!0&&y.id){let x=(0,Wc.nodeAtPath)(c,h.concat([w]));r.push({id:y.id,type:y.type,startIndex:n+(0,Wc.getLocStart)(x),endIndex:n+(0,Wc.getLocEnd)(x)})}}):typeof d.blocks=="object"&&Object.entries(d.blocks).forEach(([y,w])=>{if(w.static===!0){let x=(0,Wc.nodeAtPath)(c,h.concat(y));r.push({id:y,type:w.type,startIndex:n+(0,Wc.getLocStart)(x),endIndex:n+(0,Wc.getLocEnd)(x)})}})}})}},async onCodePathEnd(){i()}}}}});var I3=P(o_=>{"use strict";b();Object.defineProperty(o_,"__esModule",{value:!0});o_.RemoteAsset=void 0;var Rn=de(),wp=xt(),zoe=_t(),Joe=["img","link","source","script"],Koe=["fonts.shopifycdn.com","cdn.shopify.com"],Qoe=["stylesheet_tag","script_tag","image_tag","img_tag"],k3=["product_img_url","article_img_url","collection_img_url","img_url"],A3=["asset_url","image_url","asset_img_url","file_img_url","file_url","global_asset_url","shopify_asset_url","external_video_url","font_url"],Yoe="canonical_url";function wk(t){return t.type===Rn.LiquidHtmlNodeTypes.LiquidVariableOutput}function xk(t){return typeof t!="string"&&t.type===Rn.LiquidHtmlNodeTypes.LiquidVariable}function Xoe(t){return t.startsWith("#")}function Zoe(t){let e=t.value[0];if(!e||!wk(e))return!1;let r=e.markup;return xk(r)?r.expression.type===Rn.LiquidHtmlNodeTypes.VariableLookup:!1}function a_(t,e=[]){if(/^\/cdn\//.test(t))return!0;try{let r=new URL(t);return[...Koe,...e].includes(r.hostname)}catch{return!1}}function eue(t,e=[]){return t.value.some(r=>{if(r.type===Rn.LiquidHtmlNodeTypes.TextNode&&/^(https?:)?\/\//.test(r.value)&&!a_(r.value,e))return!0;if(wk(r)){let n=r.markup;if(xk(n)){let i=n.expression;if(i.type===Rn.LiquidHtmlNodeTypes.String&&/^https?:\/\//.test(i.value)&&!a_(i.value,e))return!0}}return!1})}function tue(t){let e=[...k3,...A3],r=[Yoe];return t.value.some(n=>!wk(n)||!xk(n.markup)?!1:!!(n.markup.filters.some(s=>e.includes(s.name))||(0,wp.isNodeOfType)(Rn.LiquidHtmlNodeTypes.VariableLookup,n.markup.expression)&&n.markup.expression.name&&r.includes(n.markup.expression.name)))}function rue(t){return t.map(e=>{try{return new URL(e).hostname.replace(/^www\./,"")}catch{return}}).filter(e=>e!==void 0)}var nue={allowedDomains:Rn.SchemaProp.array(Rn.SchemaProp.string()).optional()};o_.RemoteAsset={meta:{code:"RemoteAsset",aliases:["AssetUrlFilters"],name:"Remote Asset",docs:{description:"This check is aimed at eliminating unnecessary HTTP connections.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/remote-asset",recommended:!0},type:Rn.SourceCodeType.LiquidHtml,severity:Rn.Severity.WARNING,schema:nue,targets:[]},create(t){let e=rue(t.settings.allowedDomains||[]);function r(i){if(!Joe.includes(i.name))return;let s=i.attributes.filter(wp.isValuedHtmlAttribute).find(d=>(0,wp.isAttr)(d,"src")||(0,wp.isAttr)(d,"href"));if(!s)return;let a=s.value.find(d=>d.type===Rn.LiquidHtmlNodeTypes.TextNode);if(a&&Xoe(a.value)||Zoe(s)||s.value.filter(d=>d.type===Rn.LiquidHtmlNodeTypes.TextNode).some(d=>a_(d.value,e)))return;if(eue(s,e)){t.report({message:"Asset should be served by the Shopify CDN for better performance.",startIndex:s.position.start,endIndex:s.position.end});return}tue(s)||t.report({message:"Use one of the asset_url filters to serve assets for better performance.",startIndex:s.position.start,endIndex:s.position.end})}function n(i,s){let a=i.name;if(!Qoe.includes(a))return;let u=(0,zoe.last)(s);if(!u||!(0,wp.isNodeOfType)(Rn.LiquidHtmlNodeTypes.LiquidVariable,u)||u.filters.some(d=>k3.includes(d.name)||A3.includes(d.name)))return;let p=u.expression;p.type===Rn.LiquidHtmlNodeTypes.String&&!a_(p.value,e)&&t.report({message:"Asset should be served by the Shopify CDN for better performance.",startIndex:p.position.start,endIndex:p.position.end}),t.report({message:"Use one of the asset_url filters to serve assets for better performance.",startIndex:u.expression.position.start,endIndex:i.position.end})}return{async HtmlVoidElement(i){r(i)},async HtmlRawNode(i){r(i)},async LiquidFilter(i,s){n(i,s)}}}}});var E3=P(c_=>{"use strict";b();Object.defineProperty(c_,"__esModule",{value:!0});c_.RequiredLayoutThemeObject=void 0;var u_=de(),T3=xt();c_.RequiredLayoutThemeObject={meta:{code:"RequiredLayoutThemeObject",name:"Prevent missing required objects in theme.liquid",docs:{description:"This check prevents missing {{ content_for_header }} and {{ content_for_layout }} objects in layout/theme.liquid.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/required-layout-theme-object"},type:u_.SourceCodeType.LiquidHtml,severity:u_.Severity.ERROR,schema:{},targets:[u_.ConfigTarget.All,u_.ConfigTarget.Recommended]},create(t){if(t.toRelativePath(t.file.uri)!=="layout/theme.liquid")return{};let e=["content_for_header","content_for_layout"],r=new Set,n,i;function s(a){a.name&&e.includes(a.name)&&r.add(a.name)}return{async VariableLookup(a){s(a)},async HtmlElement(a){(0,T3.isHtmlTag)(a,"head")?n=a:(0,T3.isHtmlTag)(a,"body")&&(i=a)},async onCodePathEnd(){var a,u;for(let c of e)if(!r.has(c)){let p=`The required object '{{ ${c} }}' is missing in layout/theme.liquid`,d=c==="content_for_header"?n:i,m=d?.blockEndPosition.start;t.report({message:p,startIndex:(a=d?.position.start)!==null&&a!==void 0?a:0,endIndex:(u=d?.position.end)!==null&&u!==void 0?u:0,fix:m!==void 0?h=>h.insert(m,`{{ ${c} }}`):void 0})}}}}}});var xp=P(ja=>{"use strict";b();Object.defineProperty(ja,"__esModule",{value:!0});ja.CLOSEST_ARGUMENT=ja.REQUIRED_CONTENT_FOR_ARGUMENTS=ja.RESERVED_CONTENT_FOR_ARGUMENTS=void 0;ja.RESERVED_CONTENT_FOR_ARGUMENTS=["attributes","block","blocks","class","context","inherit","resource","resources","schema","section","sections","settings","snippet","snippets","src","style","styles","template","templates"];ja.REQUIRED_CONTENT_FOR_ARGUMENTS=["id","type"];ja.CLOSEST_ARGUMENT="closest."});var L3=P(l_=>{"use strict";b();Object.defineProperty(l_,"__esModule",{value:!0});l_.ReservedDocParamNames=void 0;var O3=de(),iue=hr(),N3=xp();l_.ReservedDocParamNames={meta:{code:"ReservedDocParamNames",name:"Valid doc parameter names",docs:{description:"This check exists to ensure any parameter names defined in LiquidDoc do not collide with reserved words.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/reserved-doc-param-names"},type:O3.SourceCodeType.LiquidHtml,severity:O3.Severity.ERROR,schema:{},targets:[]},create(t){if(!(0,iue.isBlock)(t.file.uri))return{};let e=[...N3.REQUIRED_CONTENT_FOR_ARGUMENTS,...N3.RESERVED_CONTENT_FOR_ARGUMENTS];return{async LiquidDocParamNode(r){let n=r.paramName.value;e.includes(n)&&sue(t,"The parameter name is not supported because it's a reserved argument for 'content_for' tags.",r.paramName)}}}};function sue(t,e,r){t.report({message:e,startIndex:r.position.start,endIndex:r.position.end})}});var C3=P(p_=>{"use strict";b();Object.defineProperty(p_,"__esModule",{value:!0});p_.StaticStylesheetAndJavascriptTags=void 0;var f_=Ge(),P3=de();p_.StaticStylesheetAndJavascriptTags={meta:{code:"StaticStylesheetAndJavascriptTags",name:"Reports non static stylesheet and javascript tags",docs:{description:"Reports the usage of Liquid within {% stylesheet %} and {% javascript %} tags, which should only contain static content.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/static-stylesheet-and-javascript-tags"},type:P3.SourceCodeType.LiquidHtml,severity:P3.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="stylesheet"&&e.name!=="javascript")return;let r=e.body.nodes.filter(n=>n.type===f_.NodeTypes.LiquidVariableOutput||n.type===f_.NodeTypes.LiquidTag||n.type===f_.NodeTypes.LiquidRawTag);for(let n of r){let i=e.name==="stylesheet"?"CSS":"JavaScript",s=n.type===f_.NodeTypes.LiquidVariableOutput?"variable":"tag";t.report({message:`Liquid ${s} found in ${i} block. {% ${e.name} %} tags should only contain static ${i} code.`,startIndex:n.position.start,endIndex:n.position.end})}}}}}});var M3=P(h_=>{"use strict";b();Object.defineProperty(h_,"__esModule",{value:!0});h_.TranslationKeyExists=void 0;var aue=Dt(),q3=de(),oue=_t();function R3(t,e){for(let r of t.split(".")){if(typeof e!="object"||!e.hasOwnProperty(r))return!1;e=e[r]}return!0}h_.TranslationKeyExists={meta:{code:"TranslationKeyExists",name:"Reports missing translation keys",docs:{description:"Reports missing translation keys",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/translation-key-exists"},type:q3.SourceCodeType.LiquidHtml,severity:q3.Severity.ERROR,schema:{},targets:[]},create(t){let e=[],r;return{async LiquidVariable(n){n.expression.type==="String"&&n.filters.some(({name:i})=>["t","translate"].includes(i))&&e.push({translationKey:n.expression.value,startIndex:n.expression.position.start,endIndex:n.expression.position.end})},async LiquidRawTag(n){var i;if(n.name!=="schema"||n.body.kind!=="json")return;let s=await t.getDefaultLocale(),a=(0,aue.parseJSON)(n.body.value);(0,oue.isError)(a)&&a instanceof SyntaxError||(r=(i=a.locales)===null||i===void 0?void 0:i[s])},async onCodePathEnd(){var n;let i=await t.getDefaultTranslations(),s=await t.getDefaultLocale(),a=await((n=t.themeDocset)===null||n===void 0?void 0:n.systemTranslations()),u=Object.keys(a??{});!i&&u.length===0||e.forEach(({translationKey:c,startIndex:p,endIndex:d})=>{if(R3(c,i)||R3(c,r)||u.includes(c))return;let m=`'${c}' does not have a matching entry in 'locales/${s}.default.json'`;r&&(m+=` or '${t.toRelativePath(t.file.uri)}'`),t.report({message:m,startIndex:p,endIndex:d})})}}}}});var V3=P(m_=>{"use strict";b();Object.defineProperty(m_,"__esModule",{value:!0});m_.UnclosedHTMLElement=void 0;var Ot=Ge(),D3=de(),kk=_t(),F3=xt();m_.UnclosedHTMLElement={meta:{code:"UnclosedHTMLElement",aliases:["UnclosedHTMLElement"],name:"Unclosed HTML Element",docs:{description:"Warns you of unbalanced HTML tags in branching code",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unclosed-html-element"},type:D3.SourceCodeType.LiquidHtml,severity:D3.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Map;return{async HtmlElement(r,n){if(uue(r))return;let[i,s]=(0,kk.findLastAndIndex)(n,F3.isLiquidBranch);if(!i)return;let a=n[s-1],u=n[s-2];if(!a||!u||a.type!==Ot.NodeTypes.LiquidTag)return;e.has(u)||e.set(u,{open:new Map,close:new Map,identifiers:new Set});let c=e.get(u),p=j3(i,a);c.identifiers.add(p),c.open.has(p)||c.open.set(p,[]),c.open.get(p).push(r)},async HtmlDanglingMarkerClose(r,n){let[i,s]=(0,kk.findLastAndIndex)(n,F3.isLiquidBranch);if(!i)return;let a=n[s-1],u=n[s-2];if(!a||!u||a.type!==Ot.NodeTypes.LiquidTag)return;e.has(u)||e.set(u,{open:new Map,close:new Map,identifiers:new Set});let c=e.get(u),p=j3(i,a);c.identifiers.add(p),c.close.has(p)||c.close.set(p,[]),c.close.get(p).push(r)},async onCodePathEnd(){var r,n;for(let[i,s]of e){let a=new Map;for(let d of s.identifiers){let m=(r=s.open.get(d))!==null&&r!==void 0?r:[],h=(n=s.close.get(d))!==null&&n!==void 0?n:[],y=[].concat(m,h).sort((w,x)=>w.position.start-x.position.start);a.set(d,$3(y))}let u=[].concat(...a.values()).sort((d,m)=>d.position.start-m.position.start),c=$3(u),p=new Set(c);for(let[d,m]of a)for(let h of m)p.has(h)&&(h.type===Ot.NodeTypes.HtmlDanglingMarkerClose?t.report({message:`Closing tag does not have a matching opening tag for condition \`${d}\` in ${i.type} '${d_(i)}'`,startIndex:h.position.start,endIndex:h.position.end}):t.report({message:`Opening tag does not have a matching closing tag for condition \`${d}\` in ${i.type} '${d_(i)}'`,startIndex:h.blockStartPosition.start,endIndex:h.blockStartPosition.end}))}}}}};function uue(t){return t.blockEndPosition.start!==t.blockEndPosition.end}function j3(t,e){if(t.name===null)switch(e.name){case Ot.NamedTags.if:return mn(e.markup);case Ot.NamedTags.unless:return B3(mn(e.markup));default:return"??"}switch(t.name){case"else":switch(e.name){case Ot.NamedTags.if:return B3(mn(e.markup));case Ot.NamedTags.unless:return mn(e.markup);case Ot.NamedTags.case:return`case ${mn(e.markup)}`;default:return"??"}case Ot.NamedTags.elsif:return mn(t.markup);case Ot.NamedTags.when:return e.name!==Ot.NamedTags.case?"??":`case ${mn(e.markup)} == ${cue(t.markup)}`;default:return"??"}}function cue(t){return typeof t=="string"?t:t.map(mn).join(" or ")}function mn(t){var e;if(typeof t=="string")return t;switch(t.type){case Ot.NodeTypes.String:return"'"+t.value+"'";case Ot.NodeTypes.LiquidLiteral:return t.value===null?"null":t.value.toString();case Ot.NodeTypes.Number:return t.value;case Ot.NodeTypes.VariableLookup:return`${(e=t.name)!==null&&e!==void 0?e:""}${t.lookups.map(r=>`[${mn(r)}]`)}`;case Ot.NodeTypes.Range:return`(${mn(t.start)}..${mn(t.end)})`;case Ot.NodeTypes.Comparison:return[mn(t.left),t.comparator,mn(t.right)].join(" ");case Ot.NodeTypes.LogicalExpression:return[mn(t.left),t.relation,mn(t.right)].join(" ");default:return(0,kk.assertNever)(t)}}function B3(t){return t.startsWith("-")?t.slice(1):`-${t}`}function $3(t){let e=[];for(let r of t)r.type===Ot.NodeTypes.HtmlElement?e.push(r):e.length>0&&d_(r)===d_(e.at(-1))&&e.at(-1).type===Ot.NodeTypes.HtmlElement&&r.type===Ot.NodeTypes.HtmlDanglingMarkerClose?e.pop():e.push(r);return e}function d_(t){return t.type===Ot.NodeTypes.HtmlElement||t.type===Ot.NodeTypes.HtmlDanglingMarkerClose?t.name.length===0?"":t.source.slice(t.name.at(0).position.start,t.name.at(-1).position.end):t.type===Ot.NodeTypes.LiquidTag?t.name:t.type}});var Ak=P(g_=>{"use strict";b();Object.defineProperty(g_,"__esModule",{value:!0});g_.hasLiquidDoc=lue;g_.extractDocDefinition=fue;var W3=qa();function lue(t){let e=!1;return(0,W3.visit)(t,{LiquidRawTag(r){r.name==="doc"&&(e=!0)}}),e}function fue(t,e){let r=!1,n=(0,W3.visit)(e,{LiquidRawTag(u){u.name==="doc"&&(r=!0)},LiquidDocParamNode(u){var c,p,d,m;return{name:u.paramName.value,description:(p=(c=u.paramDescription)===null||c===void 0?void 0:c.value)!==null&&p!==void 0?p:null,type:(m=(d=u.paramType)===null||d===void 0?void 0:d.value)!==null&&m!==void 0?m:null,required:u.required,nodeType:"param"}},LiquidDocExampleNode(u){return{content:U3(u.content.value.trim()),nodeType:"example"}},LiquidDocDescriptionNode(u){return{content:U3(u.content.value.trim()),nodeType:"description"}}});if(!r)return{uri:t};let{parameters:i,examples:s,description:a}=n.reduce((u,c)=>(c.nodeType==="param"?u.parameters.push(c):c.nodeType==="example"?u.examples.push(c):c.nodeType==="description"&&!u.description&&(u.description=c),u),{parameters:[],examples:[],description:void 0});return{uri:t,liquidDoc:{...i.length&&{parameters:i},...s.length&&{examples:s},...a&&{description:a}}}}function U3(t){let e=t.split(`
1197
+ `);if(e.length<=1)return t;let n=e.slice(1).filter(s=>s.trim().length>0).map(s=>{let a=s.match(/^\s*/);return a?a[0].length:0});if(n.length===0)return t;let i=Math.min(...n);return[e[0],...e.slice(1).map(s=>s.trim().length===0?s:s.slice(i))].join(`
1198
+ `)}});var Q3=P(y_=>{"use strict";b();Object.defineProperty(y_,"__esModule",{value:!0});y_.UndefinedObject=void 0;var iu=Ge(),G3=de(),H3=_t(),pue=Ak(),z3=xt();y_.UndefinedObject={meta:{code:"UndefinedObject",name:"Undefined Object",docs:{description:"This check exists to identify references to undefined Liquid objects.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/undefined-object"},type:G3.SourceCodeType.LiquidHtml,severity:G3.Severity.WARNING,schema:{},targets:[]},create(t){let e=t.toRelativePath(t.file.uri),r=t.file.ast;if((0,H3.isError)(r))return{};if(e.startsWith("snippets/")&&!(0,pue.hasLiquidDoc)(r))return{};if(!t.themeDocset)return{};let n=t.themeDocset,i=new Map,s=new Set,a=[];function u(c,p){var d;if(!c)return;let m=(d=i.get(c))!==null&&d!==void 0?d:[];i.set(c,m.concat(p))}return{async LiquidDocParamNode(c){var p;let d=(p=c.paramName)===null||p===void 0?void 0:p.value;d&&s.add(d)},async LiquidTag(c,p){var d,m,h,y;(0,z3.isWithinRawTagThatDoesNotParseItsContents)(p)||(_ue(c)&&u(c.markup.name,{start:c.blockStartPosition.end}),K3(c)&&u(c.markup.name,{start:(d=c.blockEndPosition)===null||d===void 0?void 0:d.end}),["form","paginate"].includes(c.name)&&u(c.name,{start:c.blockStartPosition.end,end:(m=c.blockEndPosition)===null||m===void 0?void 0:m.start}),c.name==="layout"&&u("none",{start:c.position.start,end:c.position.end}),(Sue(c)||wue(c))&&c.markup.name!==null&&u(c.markup.name,{start:c.position.start}),(vue(c)||bue(c))&&(u(c.markup.variableName,{start:c.blockStartPosition.end,end:(h=c.blockEndPosition)===null||h===void 0?void 0:h.start}),u(c.name==="for"?"forloop":"tablerowloop",{start:c.blockStartPosition.end,end:(y=c.blockEndPosition)===null||y===void 0?void 0:y.start})))},async VariableLookup(c,p){if((0,z3.isWithinRawTagThatDoesNotParseItsContents)(p))return;let d=(0,H3.last)(p);yue(d)&&K3(d)||a.push(c)},async onCodePathEnd(){(await hue(n,e,t.mode)).forEach(p=>s.add(p.name)),a.forEach(p=>{!p.name||mue(p.name,p.position,s,i)||t.report({message:`Unknown object '${p.name}' used.`,startIndex:p.position.start,endIndex:p.position.end})})}}}};async function hue(t,e,r="theme"){let n=await t.objects(),i=due(e,r);return n.filter(({access:a,name:u})=>i.includes(u)||!a||a.global===!0||a.template.length>0)}var J3=["app","section","recommendations","block"];function due(t,e="theme"){return t.startsWith("layout/checkout.liquid")?["locale","direction","skip_to_content_link","checkout_html_classes","checkout_stylesheets","checkout_scripts","content_for_logo","breadcrumb","order_summary_toggle","content_for_order_summary","alternative_payment_methods","content_for_footer","tracking_code"]:t.startsWith("sections/")?["section","predictive_search","recommendations","comment"]:t.startsWith("blocks/")?J3:t.startsWith("snippets/")?e==="app"?J3:["app"]:[]}function mue(t,e,r,n){if(r.has(t))return!0;let i=n.get(t);return i?i.some(s=>gue(e,s)):!1}function gue(t,e){let r=t.start,n=!e.start||r>e.start,i=!e.end||r<e.end;return n&&i}function yue(t){return t?.type===iu.NodeTypes.LiquidTag}function K3(t){return t.name===iu.NamedTags.capture}function _ue(t){return t.name===iu.NamedTags.assign&&typeof t.markup!="string"}function vue(t){return t.name===iu.NamedTags.for&&typeof t.markup!="string"}function bue(t){return t.name===iu.NamedTags.tablerow&&typeof t.markup!="string"}function Sue(t){return t.name===iu.NamedTags.increment&&typeof t.markup!="string"}function wue(t){return t.name===iu.NamedTags.decrement&&typeof t.markup!="string"}});var X3=P(__=>{"use strict";b();Object.defineProperty(__,"__esModule",{value:!0});__.UniqueDocParamNames=void 0;var Y3=de();__.UniqueDocParamNames={meta:{code:"UniqueDocParamNames",name:"Unique doc parameter names",docs:{description:"This check exists to ensure any parameter names defined in the `doc` tag are unique.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unique-doc-param-names"},type:Y3.SourceCodeType.LiquidHtml,severity:Y3.Severity.ERROR,schema:{},targets:[]},create(t){let e=new Set;return{async LiquidDocParamNode(r){let n=r.paramName.value;if(!e.has(n)){e.add(n);return}t.report({message:`The parameter '${n}' is defined more than once.`,startIndex:r.paramName.position.start,endIndex:r.paramName.position.end})}}}}});var t4=P(v_=>{"use strict";b();Object.defineProperty(v_,"__esModule",{value:!0});v_.UniqueStaticBlockId=void 0;var Ik=Ge(),Z3=de(),e4=xp(),xue=i_(),kue=new Set([...e4.REQUIRED_CONTENT_FOR_ARGUMENTS,...e4.RESERVED_CONTENT_FOR_ARGUMENTS]);v_.UniqueStaticBlockId={meta:{code:"UniqueStaticBlockId",name:"Prevent use of duplicated ids for blocks rendered statically",docs:{description:"This check is aimed at preventing the use of duplicated ids for blocks rendered statically.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unique-static-block-id",recommended:!0},type:Z3.SourceCodeType.LiquidHtml,severity:Z3.Severity.ERROR,schema:{},targets:[]},create(t){let e=new Set;return{async LiquidTag(r){if(r.name!==Ik.NamedTags.content_for||!(0,xue.isContentForBlock)(r.markup))return;let n=r.markup.args.find(d=>d.name==="id");if(!n)return;let i=n.value;if(i.type!==Ik.NodeTypes.String)return;let s=i.value,a=r.markup.args.filter(d=>!kue.has(d.name)),u=[];for(let d of a){if(d.value.type!==Ik.NodeTypes.String)return;u.push(`${d.name}=${d.value.value}`)}u.sort();let c=u.join(","),p=`${s}::${c}`;e.has(p)?t.report({message:`The id '${s}' is already being used by another static block`,startIndex:i.position.start,endIndex:i.position.end,suggest:[]}):e.add(p)}}}}});var n4=P(b_=>{"use strict";b();Object.defineProperty(b_,"__esModule",{value:!0});b_.UnknownFilter=void 0;var r4=de();b_.UnknownFilter={meta:{code:"UnknownFilter",name:"Prevent use of unknown filters",docs:{description:"This check is aimed at preventing the use of unknown filters.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unknown-filter",recommended:!0},type:r4.SourceCodeType.LiquidHtml,severity:r4.Severity.ERROR,schema:{},targets:[]},create(t){return t.themeDocset?{async LiquidFilter(e){(await t.themeDocset.filters()).some(n=>n.name===e.name)||t.report({message:`Unknown filter '${e.name}' used.`,startIndex:e.position.start+1,endIndex:e.position.end})}}:{}}}});var s4=P(S_=>{"use strict";b();Object.defineProperty(S_,"__esModule",{value:!0});S_.UnrecognizedContentForArguments=void 0;var i4=de(),Tk=ds(),Ek=xp();S_.UnrecognizedContentForArguments={meta:{code:"UnrecognizedContentForArguments",name:"Unrecognized ContentFor Arguments",docs:{description:"This check ensures that no unknown arguments are used when rendering a static block.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unrecognized-content-for-arguments"},type:i4.SourceCodeType.LiquidHtml,severity:i4.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Set([...Ek.RESERVED_CONTENT_FOR_ARGUMENTS,...Ek.REQUIRED_CONTENT_FOR_ARGUMENTS]);return{async ContentForMarkup(r){let n=(0,Tk.getBlockName)(r);if(!n)return;let i=await(0,Tk.getLiquidDocParams)(t,`blocks/${n}.liquid`);if(!i)return;let s=r.args.filter(a=>!i.has(a.name)).filter(a=>!e.has(a.name)).filter(a=>!a.name.startsWith(Ek.CLOSEST_ARGUMENT));(0,Tk.reportUnknownArguments)(t,r,s,n)}}}}});var o4=P(w_=>{"use strict";b();Object.defineProperty(w_,"__esModule",{value:!0});w_.UnrecognizedRenderSnippetArguments=void 0;var a4=de(),Ok=ds();w_.UnrecognizedRenderSnippetArguments={meta:{code:"UnrecognizedRenderSnippetArguments",name:"Unrecognized Render Snippet Arguments",aliases:["UnrecognizedRenderSnippetParams"],docs:{description:"This check ensures that no unknown arguments are used when rendering a snippet.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unrecognized-render-snippet-arguments"},type:a4.SourceCodeType.LiquidHtml,severity:a4.Severity.WARNING,schema:{},targets:[]},create(t){function e(r,n,i){let s=r.alias,a=r.variable;if(s&&!n.has(s.value)&&a){let u=a.position.start+1;t.report({message:`Unknown argument '${s.value}' in render tag for snippet '${i}'.`,startIndex:u,endIndex:s.position.end,suggest:[{message:`Remove '${s.value}'`,fix:c=>{if(a)return c.remove(a.position.start,s.position.end)}}]})}}return{async RenderMarkup(r){let n=(0,Ok.getSnippetName)(r);if(!n)return;let i=await(0,Ok.getLiquidDocParams)(t,`snippets/${n}.liquid`);if(!i)return;let s=r.args.filter(a=>!i.has(a.name));e(r,i,n),(0,Ok.reportUnknownArguments)(t,r,s,n)}}}}});var f4=P(k_=>{"use strict";b();Object.defineProperty(k_,"__esModule",{value:!0});k_.UnusedAssign=void 0;var l4=Ge(),u4=de(),c4=xt();k_.UnusedAssign={meta:{code:"UnusedAssign",name:"Prevent unused assigns",docs:{description:"This check exists to prevent bloat in themes by surfacing variable definitions that are not used.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-assign"},type:u4.SourceCodeType.LiquidHtml,severity:u4.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Map,r=new Set;function n(i){i.type===l4.NodeTypes.VariableLookup&&r.add(i.name)}return{async LiquidTag(i,s){(0,c4.isWithinRawTagThatDoesNotParseItsContents)(s)||(Aue(i)||x_(i)&&i.markup.name)&&e.set(i.markup.name,i)},async VariableLookup(i,s){if((0,c4.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=s.at(-1);a&&x_(a)||n(i)},async onCodePathEnd(){for(let[i,s]of e.entries())!r.has(i)&&!i.startsWith("_")&&t.report({message:`The variable '${i}' is assigned but not used`,startIndex:x_(s)?s.blockStartPosition.start:s.position.start,endIndex:x_(s)?s.blockStartPosition.end:s.position.end,suggest:[{message:`Remove the unused variable '${i}'`,fix:a=>a.remove(s.position.start,s.position.end)}]})}}}};function Aue(t){return t.name==="assign"&&typeof t.markup!="string"}function x_(t){return t.type==l4.NodeTypes.LiquidTag&&t.name==="capture"&&typeof t.markup!="string"}});var h4=P(A_=>{"use strict";b();Object.defineProperty(A_,"__esModule",{value:!0});A_.UnsupportedDocTag=void 0;var p4=de(),Iue=Fc();A_.UnsupportedDocTag={meta:{code:"UnsupportedDocTag",name:"Prevent unsupported doc tag usage",docs:{description:"This check exists to prevent use of `doc` tag outside of snippet file.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unsupported-doc-tag"},type:p4.SourceCodeType.LiquidHtml,severity:p4.Severity.ERROR,schema:{},targets:[]},create(t){return(0,Iue.filePathSupportsLiquidDoc)(t.file.uri)?{}:{async LiquidRawTag(r){r.name==="doc"&&t.report({message:"The `doc` tag can only be used within a snippet or block.",startIndex:r.position.start,endIndex:r.position.end,suggest:[{message:"Remove unsupported `doc` tag",fix:n=>n.remove(r.position.start,r.position.end)}]})}}}}});var m4=P(I_=>{"use strict";b();Object.defineProperty(I_,"__esModule",{value:!0});I_.UnusedDocParam=void 0;var Tue=Ge(),d4=de(),Eue=xt();I_.UnusedDocParam={meta:{code:"UnusedDocParam",name:"Prevent unused doc parameters",docs:{description:"This check exists to ensure any parameters defined in the `doc` tag are used within the snippet.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param"},type:d4.SourceCodeType.LiquidHtml,severity:d4.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Map,r=new Set;return{async LiquidDocParamNode(n){e.set(n.paramName.value,n)},async VariableLookup(n,i){n.type===Tue.NodeTypes.VariableLookup&&n.name&&!(0,Eue.isLoopScopedVariable)(n.name,i)&&r.add(n.name)},async onCodePathEnd(){for(let[n,i]of e.entries())r.has(n)||t.report({message:`The parameter '${n}' is defined but not used in this file.`,startIndex:i.position.start,endIndex:i.position.end,suggest:[{message:`Remove unused parameter '${n}'`,fix:s=>s.remove(i.position.start,i.position.end)}]})}}}}});var y4=P(T_=>{"use strict";b();Object.defineProperty(T_,"__esModule",{value:!0});T_.ValidContentForArguments=void 0;var Oue=Ge(),g4=de(),Nk=xp();T_.ValidContentForArguments={meta:{code:"ValidContentForArguments",name:"Prevent the use of invalid arguments to the content_for tag",docs:{description:"This check is aimed at preventing the use of invalid arguments for the content_for tag.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-content-for-arguments",recommended:!0},type:g4.SourceCodeType.LiquidHtml,severity:g4.Severity.ERROR,schema:{},targets:[]},create(t){let e={blocks:r=>{let n=r.args.filter(i=>!i.name.startsWith(Nk.CLOSEST_ARGUMENT));for(let i of n)t.report({message:`{% content_for "blocks" %} only accepts 'closest.*' arguments`,startIndex:i.position.start,endIndex:i.position.end})},block:r=>{for(let i of Nk.REQUIRED_CONTENT_FOR_ARGUMENTS){let s=r.args.find(u=>u.name===i);if(!s){t.report({message:`{% content_for "block" %} requires a '${i}' argument`,startIndex:r.position.start,endIndex:r.position.end,suggest:[]});continue}let a=s.value;a.type!==Oue.NodeTypes.String&&t.report({message:`The '${i}' argument should be a string`,startIndex:a.position.start,endIndex:a.position.end,suggest:[]})}let n=r.args.filter(i=>Nk.RESERVED_CONTENT_FOR_ARGUMENTS.includes(i.name));for(let i of n)t.report({message:`{% content_for "block" %} doesn't support '${i.name}' because it's a reserved argument.`,startIndex:i.position.start,endIndex:i.position.end})}};return{async LiquidTag(r){if(r.name!=="content_for"||typeof r.markup=="string")return;let n=r.markup.contentForType.value,i=e[n];i&&i(r.markup)}}}}});var v4=P(O_=>{"use strict";b();Object.defineProperty(O_,"__esModule",{value:!0});O_.ValidContentForArgumentTypes=void 0;var _4=de(),E_=ds();O_.ValidContentForArgumentTypes={meta:{code:"ValidContentForArgumentTypes",name:"Valid ContentFor Argument Types",docs:{description:"This check ensures that arguments passed to static blocks match the expected types defined in the liquidDoc header if present.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-content-for-argument-types"},type:_4.SourceCodeType.LiquidHtml,severity:_4.Severity.WARNING,schema:{},targets:[]},create(t){return{async ContentForMarkup(e){let r=(0,E_.getBlockName)(e);if(!r)return;let n=await(0,E_.getLiquidDocParams)(t,`blocks/${r}.liquid`);if(!n)return;let i=(0,E_.findTypeMismatchParams)(n,e.args);(0,E_.reportTypeMismatches)(t,i,n)}}}}});var w4=P(N_=>{"use strict";b();Object.defineProperty(N_,"__esModule",{value:!0});N_.ValidBlockTarget=void 0;var Lk=Dt(),Nue=hr(),b4=de(),Ti=_t();N_.ValidBlockTarget={meta:{code:"ValidBlockTarget",name:"Validate block targeting in presets",docs:{description:"Ensures block types only reference valid block types and respect parent-child relationships",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-target"},type:b4.SourceCodeType.LiquidHtml,severity:b4.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,n=await(0,Nue.getSchema)(t),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!s||s instanceof Error||!n)return;let{staticBlockDefs:a}=n,{rootLevelThemeBlocks:u,rootLevelLocalBlocks:c,presetLevelBlocks:p,defaultLevelBlocks:d,hasRootBlocksDeclaration:m}=(0,Ti.getBlocks)(i);if(c.length>0)return;let h=!1;if(await Promise.all(u.map(async({node:y,path:w})=>{let x=(0,Lk.nodeAtPath)(s,w);await(0,Ti.validateBlockFileExistence)(y.type,t)||(h=!0,(0,Ti.reportWarning)(Pk(y.type),r,x,t))})),!h){for(let[y,w]of Object.entries(p))parseInt(y,10)===0&&await Promise.all(w.map(async({node:k,path:v})=>{let I=(0,Lk.nodeAtPath)(s,v),T="id"in k?k.id:v.at(-2),S=!!k.static;if((0,Ti.isInvalidPresetBlock)(T,k,u,a,m)){let R=S?`Could not find a static block of type "${k.type}" with id "${T}" in this file.`:S4(k);(0,Ti.reportWarning)(R,r,I,t)}await(0,Ti.validateBlockFileExistence)(k.type,t)?"blocks"in k&&k.blocks&&await(0,Ti.validateNestedBlocks)(t,k,k.blocks,v.slice(0,-1),r,s):(0,Ti.reportWarning)(Pk(k.type),r,I,t)}));await Promise.all(d.map(async({node:y,path:w})=>{let x=(0,Lk.nodeAtPath)(s,w);(0,Ti.isInvalidDefaultBlock)(y,u,m)&&(0,Ti.reportWarning)(S4(y),r,x,t),await(0,Ti.validateBlockFileExistence)(y.type,t)||(0,Ti.reportWarning)(Pk(y.type),r,x,t)}))}}}}};function S4(t){return t.type.startsWith("_")?`Theme block type "${t.type}" is a private block so it must be explicitly allowed in "blocks" at the root of this schema.`:`Theme block type "${t.type}" must be allowed in "blocks" at the root of this schema.`}function Pk(t){return`Theme block 'blocks/${t}.liquid' does not exist.`}});var A4=P(L_=>{"use strict";b();Object.defineProperty(L_,"__esModule",{value:!0});L_.ValidScopedCSSClass=void 0;var x4=de(),Lue=tp(),kp=sg(),Ck=lg();async function k4(t,e,r){let n=new Set;try{let i=e("assets"),a=(await t.readDirectory(i)).filter(([c])=>c.endsWith(".css")).map(([c])=>c),u=await Promise.all(a.map(c=>r(c)));for(let c of u)for(let p of c)n.add(p)}catch{}return n}async function Pue(t,e,r){let n=new Set,i=await k4(t,e,r);for(let s of i)n.add(s);try{let s=e(""),a=await(0,Lue.recursiveReadDirectory)(t,s,([c])=>c.endsWith(".liquid")),u=await Promise.all(a.map(c=>r(c)));for(let c of u)for(let p of c)n.add(p)}catch{}return n}L_.ValidScopedCSSClass={meta:{code:"ValidScopedCSSClass",name:"Validates CSS classes used in class attributes are defined in an in-scope stylesheet",docs:{description:"Reports CSS classes used in HTML class attributes that are not defined in any in-scope stylesheet tag or CSS asset file.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-scoped-css-class"},type:x4.SourceCodeType.LiquidHtml,severity:x4.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Set,r=[];return{async LiquidRawTag(n){if(n.name==="stylesheet")for(let i of(0,kp.extractCSSClassNames)(n.body.value))e.add(i)},async HtmlElement(n){(0,kp.collectUsedClasses)(n.attributes,r)},async HtmlVoidElement(n){(0,kp.collectUsedClasses)(n.attributes,r)},async HtmlSelfClosingElement(n){(0,kp.collectUsedClasses)(n.attributes,r)},async HtmlRawNode(n){n.name==="svg"&&(0,kp.collectUsedClassesFromSvg)(n.attributes,n.body.value,n.body.position.start,r)},async onCodePathEnd(){if(r.length===0)return;let{getReferences:n,getDependencies:i,getCSSClassesForURI:s,fs:a,toUri:u}=t;if(!n||!i||!s)return;let c=new Set(e),p=await k4(a,u,s);for(let v of p)c.add(v);let d=await(0,Ck.getAncestorUris)(t.file.uri,n),m=await Promise.all(d.map(v=>s(v)));for(let v of m)for(let I of v)c.add(I);let h=[t.file.uri,...d],y=[];for(let v of h){let I=await(0,Ck.getRenderedSnippetUris)(v,i);y.push(...I)}let w=await(0,Ck.getAllSnippetDescendantUris)(y,i),x=await Promise.all(w.map(v=>s(v)));for(let v of x)for(let I of v)c.add(I);let k=await Pue(a,u,s);for(let{className:v,startIndex:I,endIndex:T}of r)k.has(v)&&!c.has(v)&&t.report({message:`CSS class '${v}' may be defined outside the scope of this file.`,startIndex:I,endIndex:T})}}}}});var T4=P(P_=>{"use strict";b();Object.defineProperty(P_,"__esModule",{value:!0});P_.ValidHTMLTranslation=void 0;var I4=de(),Cue=Ge();P_.ValidHTMLTranslation={meta:{code:"ValidHTMLTranslation",name:"Valid HTML Translation",docs:{description:"This check exists to prevent invalid HTML inside translations.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-html-translation",recommended:!0},type:I4.SourceCodeType.JSON,severity:I4.Severity.WARNING,schema:{},targets:[]},create(t){return t.toRelativePath(t.file.uri).startsWith("locales/")?{async Literal(r){let n=/<[^>]+>/;if(!(typeof r.value!="string"||!n.test(r.value)))try{(0,Cue.toLiquidHtmlAST)(r.value)}catch(i){let s=r.loc,a={message:`${i}.`,startIndex:s.start.offset,endIndex:s.end.offset};t.report(a)}}}:{}}}});var O4=P(C_=>{"use strict";b();Object.defineProperty(C_,"__esModule",{value:!0});C_.ValidJSON=void 0;var E4=de();C_.ValidJSON={meta:{code:"ValidJSON",aliases:["ValidJson"],name:"Enforce valid JSON",docs:{description:"This check exists to prevent invalid JSON files in themes. Will check against schema if available.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-syntax-error"},type:E4.SourceCodeType.JSON,severity:E4.Severity.ERROR,schema:{},targets:[]},create(t){if(!t.validateJSON)return{};let e=t.validateJSON;return{async onCodePathStart(r){let n=await e(r.uri,r.source);if(n)for(let i of n)t.report(i)}}}}});var P4=P(q_=>{"use strict";b();Object.defineProperty(q_,"__esModule",{value:!0});q_.ValidDocParamTypes=void 0;var N4=de(),L4=Fc();q_.ValidDocParamTypes={meta:{code:"ValidDocParamTypes",name:"Valid doc parameter types",docs:{description:"This check exists to ensure any parameter types defined in the `doc` tag are valid.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-doc-param-types"},type:N4.SourceCodeType.LiquidHtml,severity:N4.Severity.ERROR,schema:{},targets:[]},create(t){if(!t.themeDocset)return{};let e=t.themeDocset.liquidDrops().then(r=>new Set((0,L4.getValidParamTypes)(r).keys()));return{async LiquidDocParamNode(r){!r.paramType||(0,L4.parseParamType)(await e,r.paramType.value)||t.report({message:`The parameter type '${r.paramType.value}' is not supported.`,startIndex:r.paramType.position.start-1,endIndex:r.paramType.position.end+1,suggest:[{message:"Remove invalid parameter type",fix:i=>{r.paramType&&i.replace(r.position.start,r.position.end,r.source.slice(r.position.start,r.position.end).replace(/\s*\{\s*[^\s]+\s*\}\s*/," "))}}]})}}}}});var q4=P(R_=>{"use strict";b();Object.defineProperty(R_,"__esModule",{value:!0});R_.getBlocks=que;R_.reportWarning=Rue;var C4=Dt();function que(t){let e=[],r=[],n=[],i=t.blocks,s=t.presets;function a(u,c,p=!1){if(!u)return;let d="static"in u,m="name"in u;d?e.push({node:u,path:c.concat("type")}):m&&!p?r.push({node:u,path:c.concat("type")}):u.type!=="@app"&&n.push({node:u,path:c.concat("type")}),"blocks"in u&&(Array.isArray(u.blocks)?u.blocks.forEach((h,y)=>{a(h,c.concat("blocks",String(y)),p)}):typeof u.blocks=="object"&&u.blocks!==null&&Object.entries(u.blocks).forEach(([h,y])=>{a(y,c.concat("blocks",h),p)}))}return Array.isArray(i)&&i.forEach((u,c)=>{a(u,["blocks",String(c)])}),s&&s.forEach((u,c)=>{"blocks"in u&&u.blocks&&(Array.isArray(u.blocks)?u.blocks.forEach((p,d)=>{a(p,["presets",String(c),"blocks",String(d)],!0)}):typeof u.blocks=="object"&&Object.entries(u.blocks).forEach(([p,d])=>{a(d,["presets",String(c),"blocks",p],!0)}))}),{staticBlockLocations:e,localBlockLocations:r,themeBlockLocations:n,hasRootLevelThemeBlocks:n.some(u=>u.path[0]==="blocks")}}function Rue(t,e,r,n){n.report({message:t,startIndex:e+(0,C4.getLocStart)(r),endIndex:e+(0,C4.getLocEnd)(r)})}});var D4=P(D_=>{"use strict";b();Object.defineProperty(D_,"__esModule",{value:!0});D_.ValidLocalBlocks=void 0;var R4=de(),qk=Dt(),Mue=hr(),M4=hr(),M_=q4();D_.ValidLocalBlocks={meta:{code:"ValidLocalBlocks",name:"Prevent mixing static and local blocks in non-theme sections",docs:{description:"Ensures sections without theme block support do not mix static and local blocks",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-local-blocks"},type:R4.SourceCodeType.LiquidHtml,severity:R4.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,n=await(0,Mue.getSchema)(t),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!s||s instanceof Error||!n)return;let{staticBlockLocations:a,localBlockLocations:u,themeBlockLocations:c,hasRootLevelThemeBlocks:p}=(0,M_.getBlocks)(i);(0,M4.isSection)(t.file.uri)&&(a.length>0&&u.length>0&&a.forEach(d=>{let m=(0,qk.nodeAtPath)(s,d.path);(0,M_.reportWarning)("Sections cannot use static theme blocks together with locally scoped blocks.",r,m,t)}),p&&u.length>0&&c.length>0&&u.forEach(d=>{let m=(0,qk.nodeAtPath)(s,d.path);(0,M_.reportWarning)("Sections cannot use theme blocks together with locally scoped blocks.",r,m,t)})),(0,M4.isBlock)(t.file.uri)&&u.length>0&&u.forEach(d=>{let m=(0,qk.nodeAtPath)(s,d.path);(0,M_.reportWarning)("Local scoped blocks are not supported in theme blocks.",r,m,t)})}}}}});var B4=P(F_=>{"use strict";b();Object.defineProperty(F_,"__esModule",{value:!0});F_.ValidRenderSnippetArgumentTypes=void 0;var F4=de(),Due=Ge(),j4=Fc(),Ap=ds();F_.ValidRenderSnippetArgumentTypes={meta:{code:"ValidRenderSnippetArgumentTypes",name:"Valid Render Snippet Argument Types",aliases:["ValidRenderSnippetParamTypes"],docs:{description:"This check ensures that arguments passed to snippet match the expected types defined in the liquidDoc header if present.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-render-snippet-argument-types"},type:F4.SourceCodeType.LiquidHtml,severity:F4.Severity.WARNING,schema:{},targets:[]},create(t){function e(r,n){var i,s,a;if(r.alias&&(!((i=r.variable)===null||i===void 0)&&i.name)&&r.variable.name.type!==Due.NodeTypes.VariableLookup){let u=(a=(s=n.get(r.alias.value))===null||s===void 0?void 0:s.type)===null||a===void 0?void 0:a.toLowerCase();if(u){let c=(0,j4.inferArgumentType)(r.variable.name);if(!(0,j4.isTypeCompatible)(u,c)){let p=(0,Ap.generateTypeMismatchSuggestions)(u,r.variable.name.position.start,r.variable.name.position.end);t.report({message:`Type mismatch for argument '${r.alias.value}': expected ${u}, got ${c}`,startIndex:r.variable.name.position.start,endIndex:r.variable.name.position.end,suggest:p})}}}}return{async RenderMarkup(r){let n=(0,Ap.getSnippetName)(r);if(!n)return;let i=await(0,Ap.getLiquidDocParams)(t,`snippets/${n}.liquid`);if(!i)return;e(r,i);let s=(0,Ap.findTypeMismatchParams)(i,r.args);(0,Ap.reportTypeMismatches)(t,s,i)}}}}});var V4=P(j_=>{"use strict";b();Object.defineProperty(j_,"__esModule",{value:!0});j_.ValidSchema=void 0;var $4=de();j_.ValidSchema={meta:{code:"ValidSchema",name:"Prevent invalid JSON in {% schema %} tags",docs:{description:"This check is aimed at eliminating JSON errors in schema tags.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema"},type:$4.SourceCodeType.LiquidHtml,severity:$4.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json"||!t.validateJSON)return;let r=e.source.slice(e.blockStartPosition.end,e.blockEndPosition.start),n=await t.validateJSON(t.file.uri,r);if(n)for(let i of n)t.report({message:i.message,startIndex:e.blockStartPosition.end+i.startIndex,endIndex:e.blockStartPosition.end+i.endIndex})}}}}});var G4=P(B_=>{"use strict";b();Object.defineProperty(B_,"__esModule",{value:!0});B_.ValidSchemaName=void 0;var Rk=Dt(),Fue=hr(),U4=de(),jue=_t(),W4=25;B_.ValidSchemaName={meta:{code:"ValidSchemaName",name:"Enforce valid schema name",docs:{description:"This check is aimed at ensuring a valid schema name.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema-name"},type:U4.SourceCodeType.LiquidHtml,severity:U4.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,n=await(0,Fue.getSchema)(t),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let a=i.name;if(!a)return;let u=(0,Rk.nodeAtPath)(s,["name"]),c=r+(0,Rk.getLocStart)(u),p=r+(0,Rk.getLocEnd)(u);if(a.startsWith("t:")){let d=await t.getDefaultLocale(),m=a.replace("t:",""),h=await t.getDefaultSchemaTranslations(),y=(0,jue.deepGet)(h,m.split("."));y!==void 0&&y.length>W4&&t.report({message:`Schema name '${y}' from 'locales/${d}.default.schema.json' is too long (max 25 characters)`,startIndex:c,endIndex:p})}else a.length>W4&&t.report({message:`Schema name '${a}' is too long (max 25 characters)`,startIndex:c,endIndex:p})}}}}});var J4=P($_=>{"use strict";b();Object.defineProperty($_,"__esModule",{value:!0});$_.ValidSchemaTranslations=void 0;var H4=Dt(),Bue=hr(),z4=de(),$ue=_t();$_.ValidSchemaTranslations={meta:{code:"ValidSchemaTranslations",name:"Reports missing translation keys in schema",docs:{description:"This check ensures all translation keys (t:) in schema have matching entries in the default schema translations file.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema-translations"},type:z4.SourceCodeType.LiquidHtml,severity:z4.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,n=await(0,Bue.getSchema)(t),{ast:i}=n??{};if(!i||i instanceof Error)return;let s=await t.getDefaultLocale(),a=await t.getDefaultSchemaTranslations(),u=Mk(i);for(let{value:c,node:p}of u){let d=c.replace("t:","");if((0,$ue.deepGet)(a,d.split("."))===void 0){let h=r+(0,H4.getLocStart)(p),y=r+(0,H4.getLocEnd)(p);t.report({message:`'${c}' does not have a matching entry in 'locales/${s}.default.schema.json'`,startIndex:h,endIndex:y})}}}}}};function Mk(t){let e=[];switch(t.type){case"Literal":{typeof t.value=="string"&&t.value.startsWith("t:")&&e.push({value:t.value,node:t});break}case"Object":{for(let r of t.children)e.push(...Mk(r.value));break}case"Array":{for(let r of t.children)e.push(...Mk(r));break}case"Property":case"Identifier":break}return e}});var Z4=P(W_=>{"use strict";b();Object.defineProperty(W_,"__esModule",{value:!0});W_.ValidSettingsKey=void 0;var K4=de(),V_=Dt(),Q4=hr(),X4=_t();W_.ValidSettingsKey={meta:{code:"ValidSettingsKey",name:"Validate settings key in presets",docs:{description:"Ensures settings key only references valid settings defined in its respective schema",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-settings-key"},type:K4.SourceCodeType.LiquidHtml,severity:K4.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){var r;if(e.name!=="schema"||e.body.kind!=="json")return;let n=e.blockStartPosition.end,i=await(0,Q4.getSchema)(t),{validSchema:s,ast:a}=i??{};if(!s||s instanceof Error||!a||a instanceof Error)return;let{rootLevelLocalBlocks:u,presetLevelBlocks:c}=(0,X4.getBlocks)(s);if(s.presets)for(let p=0;p<s.presets.length;p++){let d=(0,V_.nodeAtPath)(a,["presets",p,"settings"]);U_(t,n,d,s.settings)}if((0,Q4.isSectionSchema)(i)&&"default"in s&&s.default){let p=(0,V_.nodeAtPath)(a,["default","settings"]);U_(t,n,p,s.settings),(r=s.default.blocks)===null||r===void 0||r.forEach((d,m)=>{let h=(0,V_.nodeAtPath)(a,["default","blocks",m,"settings"]);Y4(t,n,h,u,d)})}for(let[p,d]of Object.entries(c))d.forEach(({node:m,path:h})=>{let y=(0,V_.nodeAtPath)(a,h.slice(0,-1).concat("settings"));Y4(t,n,y,u,m)})}}}};async function Y4(t,e,r,n,i){var s;if(n.length>0){let a=n.find(c=>c.node.type===i.type);if(!a)return;let u=a.node;U_(t,e,r,u.settings)}else{let a=await((s=t.getBlockSchema)===null||s===void 0?void 0:s.call(t,i.type)),{validSchema:u}=a??{};if(!u||u instanceof Error)return;U_(t,e,r,u.settings,i)}}function U_(t,e,r,n,i){if(!(!r||r.type!=="Object")){for(let s of r.children)if(!n?.find(u=>u?.id===s.key.value)){let u=i?`Setting '${s.key.value}' does not exist in 'blocks/${i.type}.liquid'.`:`Setting '${s.key.value}' does not exist in schema.`;(0,X4.reportWarning)(u,e,s.key,t)}}}});var tj=P(G_=>{"use strict";b();Object.defineProperty(G_,"__esModule",{value:!0});G_.ValidStaticBlockType=void 0;var Vue=Ge(),ej=de(),Uue=is(),Wue=i_();G_.ValidStaticBlockType={meta:{code:"ValidStaticBlockType",name:"Prevent use of type that is not valid for static blocks",docs:{description:"This check is aimed at preventing the use of an invalid type for blocks rendered statically.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-static-block-type",recommended:!0},type:ej.SourceCodeType.LiquidHtml,severity:ej.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidTag(e){if(e.name!=="content_for"||!(0,Wue.isContentForBlock)(e.markup))return;let r=e.markup.args.find(u=>u.name==="type");if(!r)return;let n=r.value;if(n.type!==Vue.NodeTypes.String)return;let i=n.value,s=`blocks/${i}.liquid`;await(0,Uue.doesFileExist)(t,s)||t.report({message:`'blocks/${i}.liquid' does not exist`,startIndex:n.position.start,endIndex:n.position.end,suggest:[]})}}}}});var rj=P(jr=>{"use strict";b();Object.defineProperty(jr,"__esModule",{value:!0});jr.offsetAdjust=jr.adjustedSuffix=jr.adjustedPrefix=jr.variableExpressionMatcher=void 0;jr.getVariableLookupsInExpression=zue;jr.validateLookup=Jue;jr.getGlobalSettings=Que;var Dk=Ge(),Gue=Dt(),Hue=qa();jr.variableExpressionMatcher=/{{(.+?)}}/;jr.adjustedPrefix="{% if ";jr.adjustedSuffix=" %}{% endif %}";jr.offsetAdjust=2-jr.adjustedPrefix.length;function zue(t){let e=jr.variableExpressionMatcher.exec(t);if(e==null)return{warning:'Invalid visible_if expression. It should take the form "{{ <expression> }}".'};let r=e[1],n=`${jr.adjustedPrefix}${r}${jr.adjustedSuffix}`;try{let i=(0,Dk.toLiquidHtmlAST)(n,{mode:"strict",allowUnclosedDocumentNode:!1});if(i.children.length!==1)throw new Error("Unexpected child count for DocumentNode");let s=i.children[0];if(s.type!=="LiquidTag"||s.name!=="if")throw new Error("Expected DocumentNode to contain 'if' tag");let a=s.markup;if(typeof a=="string")return{warning:"Invalid visible_if expression."};if(a.type===Dk.NodeTypes.LiquidLiteral&&["true","false"].includes(a.keyword))return null;let u=(0,Hue.visit)(s,{VariableLookup:c=>c});return u.length===0?{warning:"visible_if expression contains no references to any settings. This is likely an error."}:u}catch(i){return i instanceof SyntaxError?{warning:"Syntax error: cannot parse visible_if expression."}:{warning:String(i)}}}function Jue(t,e){let r=Kue(t),n=[],i=e;for(;r.length>0;){let s=r.shift();n.push(s);let a=i[s];if(!a)return`Invalid variable: "${n.join(".")}" was not found.`;if(typeof a=="boolean")return r.length>0?`Invalid variable: "${n.join(".")}" refers to a variable, but is being used here as a namespace.`:null;i=a}return`Invalid variable: "${n.join(".")}" refers to a namespace, but is being used here as a variable.`}function Kue(t){let e=t.lookups.map(r=>{if(r.type!==Dk.NodeTypes.String)throw new Error(`Expected lookups to be String nodes: ${JSON.stringify(r)}`);return r.value});return[t.name,...e]}async function Que(t){let e=[];try{let r=t.toUri("config/settings_schema.json"),n=await t.fs.readFile(r),i=(0,Gue.parseJSON)(n);if(Array.isArray(i))for(let s of i)"settings"in s&&Array.isArray(s.settings)&&e.push(...s.settings.map(a=>a.id).filter(a=>a))}catch(r){console.error("Error fetching global settings:",r)}return e}});var ij=P(Hc=>{"use strict";b();Object.defineProperty(Hc,"__esModule",{value:!0});Hc.ValidVisibleIfSettingsSchema=Hc.ValidVisibleIf=void 0;var jk=de(),Fk=Dt(),Gc=hr(),Yue=_t(),gs=rj(),nj={code:"ValidVisibleIf",name:"Validate visible_if expressions",docs:{description:"Ensures visible_if expressions are well-formed and only reference settings keys that are defined",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-visible-if"},severity:jk.Severity.ERROR,schema:{},targets:[]};Hc.ValidVisibleIf={meta:{...nj,type:jk.SourceCodeType.LiquidHtml},create(t){return{async LiquidRawTag(e){var r;if(e.name!=="schema"||e.body.kind!=="json")return;let n=await(0,Gc.getSchema)(t),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!(!((r=i.settings)===null||r===void 0)&&r.some(d=>"visible_if"in d))||!s||s instanceof Error)return;let a=e.blockStartPosition.end,u=Object.fromEntries((await(0,gs.getGlobalSettings)(t)).map(d=>[d,!0])),c=Object.fromEntries(i.settings.map(d=>[d.id,!0])),p={settings:u};(0,Gc.isSectionSchema)(n)?p.section={settings:c}:(0,Gc.isBlockSchema)(n)&&(p.block={settings:c});for(let[d,m]of i.settings.entries()){if(!("visible_if"in m)||typeof m.visible_if!="string")continue;let h=(0,Fk.nodeAtPath)(s,["settings",d,"visible_if"]),y=(0,gs.getVariableLookupsInExpression)(m.visible_if);if(y===null)continue;if("warning"in y){(0,Yue.reportWarning)(y.warning,a,h,t);continue}let w=(x,k)=>{typeof x=="string"&&t.report({message:x,startIndex:a+(0,Fk.getLocStart)(h)+k.position.start+gs.offsetAdjust+1,endIndex:a+(0,Fk.getLocStart)(h)+k.position.end+gs.offsetAdjust+1})};for(let x of y)x.name==="section"&&(0,Gc.isBlockSchema)(n)||(x.name==="section"&&!(0,Gc.isSectionSchema)(n)?w(`Invalid visible_if: can't refer to "section" when not in a section or block file.`,x):x.name==="block"&&!(0,Gc.isBlockSchema)(n)?w(`Invalid visible_if: can't refer to "block" when not in a block file.`,x):w((0,gs.validateLookup)(x,p),x))}}}}};Hc.ValidVisibleIfSettingsSchema={meta:{...nj,type:jk.SourceCodeType.JSON},create(t){return t.toRelativePath(t.file.uri)!=="config/settings_schema.json"?{}:{async Property(r){if(r.key.value!=="visible_if"||r.value.type!=="Literal")return;let n=r.value.value;if(typeof n!="string")return;let i=r.value.loc.start.offset,s=(0,gs.getVariableLookupsInExpression)(n);if(s===null)return;if("warning"in s){t.report({message:s.warning,startIndex:r.value.loc.start.offset,endIndex:r.value.loc.end.offset});return}let u={settings:Object.fromEntries((await(0,gs.getGlobalSettings)(t)).map(p=>[p,!0]))},c=(p,d)=>{typeof p=="string"&&t.report({message:p,startIndex:i+d.position.start+gs.offsetAdjust+1,endIndex:i+d.position.end+gs.offsetAdjust+1})};for(let p of s)p.name==="section"?c(`Invalid visible_if: can't refer to "section" when not in a section file.`,p):p.name==="block"?c(`Invalid visible_if: can't refer to "block" when not in a block file.`,p):c((0,gs.validateLookup)(p,u),p)}}}}});var Bk=P((zc,Ip)=>{b();(function(){var t,e="4.18.1",r=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",s="Invalid `variable` option passed into `_.template`",a="Invalid `imports` option passed into `_.template`",u="__lodash_hash_undefined__",c=500,p="__lodash_placeholder__",d=1,m=2,h=4,y=1,w=2,x=1,k=2,v=4,I=8,T=16,S=32,L=64,R=128,M=256,F=512,X=30,H="...",$=800,B=16,Z=1,ee=2,W=3,J=1/0,te=9007199254740991,ue=17976931348623157e292,fe=NaN,ce=4294967295,Re=ce-1,Ue=ce>>>1,Nt=[["ary",R],["bind",x],["bindKey",k],["curry",I],["curryRight",T],["flip",F],["partial",S],["partialRight",L],["rearg",M]],et="[object Arguments]",tn="[object Array]",Ss="[object AsyncFunction]",Bn="[object Boolean]",$n="[object Date]",gl="[object DOMException]",oo="[object Error]",sa="[object Function]",yl="[object GeneratorFunction]",Vr="[object Map]",aa="[object Number]",ws="[object Null]",rn="[object Object]",_l="[object Promise]",wu="[object Proxy]",xs="[object RegExp]",Ur="[object Set]",ks="[object String]",_n="[object Symbol]",xh="[object Undefined]",oa="[object WeakMap]",kh="[object WeakSet]",mt="[object ArrayBuffer]",rr="[object DataView]",nr="[object Float32Array]",vl="[object Float64Array]",ua="[object Int8Array]",_e="[object Int16Array]",uo="[object Int32Array]",bl="[object Uint8Array]",Sl="[object Uint8ClampedArray]",As="[object Uint16Array]",co="[object Uint32Array]",Ah=/\b__p \+= '';/g,h0=/\b(__p \+=) '' \+/g,xu=/(__e\(.*?\)|\b__t\)) \+\n'';/g,nn=/&(?:amp|lt|gt|quot|#39);/g,sn=/[&<>"']/g,gt=RegExp(nn.source),ca=RegExp(sn.source),qe=/<%-([\s\S]+?)%>/g,Ih=/<%([\s\S]+?)%>/g,ku=/<%=([\s\S]+?)%>/g,d0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Au=/^\w*$/,Zi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wl=/[\\^$.*+?()[\]{}|]/g,lo=RegExp(wl.source),Is=/^\s+/,Th=/\s/,m0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Eh=/\{\n\/\* \[wrapped with (.+)\] \*/,Oh=/,? & /,Nh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xl=/[()=,{}\[\]\/\s]/,Lh=/\\(\\)?/g,g0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ph=/\w*$/,y0=/^[-+]0x[0-9a-f]+$/i,_0=/^0b[01]+$/i,Ch=/^\[object .+?Constructor\]$/,qh=/^0o[0-7]+$/i,Rh=/^(?:0|[1-9]\d*)$/,Mh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fo=/($^)/,Dh=/['\n\r\u2028\u2029\\]/g,Iu="\\ud800-\\udfff",v0="\\u0300-\\u036f",Fh="\\ufe20-\\ufe2f",b0="\\u20d0-\\u20ff",Tu=v0+Fh+b0,kl="\\u2700-\\u27bf",jh="a-z\\xdf-\\xf6\\xf8-\\xff",be="\\xac\\xb1\\xd7\\xf7",Eu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ui="\\u2000-\\u206f",S0=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bh="A-Z\\xc0-\\xd6\\xd8-\\xde",Al="\\ufe0e\\ufe0f",$h=be+Eu+ui+S0,Il="['\u2019]",Vh="["+Iu+"]",Uh="["+$h+"]",po="["+Tu+"]",ci="\\d+",vn="["+kl+"]",Wh="["+jh+"]",Tl="[^"+Iu+$h+ci+kl+jh+Bh+"]",El="\\ud83c[\\udffb-\\udfff]",w0="(?:"+po+"|"+El+")",Gh="[^"+Iu+"]",Ol="(?:\\ud83c[\\udde6-\\uddff]){2}",la="[\\ud800-\\udbff][\\udc00-\\udfff]",Ts="["+Bh+"]",Nl="\\u200d",Ll="(?:"+Wh+"|"+Tl+")",Ou="(?:"+Ts+"|"+Tl+")",He="(?:"+Il+"(?:d|ll|m|re|s|t|ve))?",Hh="(?:"+Il+"(?:D|LL|M|RE|S|T|VE))?",Pl=w0+"?",Cl="["+Al+"]?",zh="(?:"+Nl+"(?:"+[Gh,Ol,la].join("|")+")"+Cl+Pl+")*",x0="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",k0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Jh=Cl+Pl+zh,l="(?:"+[vn,Ol,la].join("|")+")"+Jh,_="(?:"+[Gh+po+"?",po,Ol,la,Vh].join("|")+")",E=RegExp(Il,"g"),O=RegExp(po,"g"),D=RegExp(El+"(?="+El+")|"+_+Jh,"g"),z=RegExp([Ts+"?"+Wh+"+"+He+"(?="+[Uh,Ts,"$"].join("|")+")",Ou+"+"+Hh+"(?="+[Uh,Ts+Ll,"$"].join("|")+")",Ts+"?"+Ll+"+"+He,Ts+"+"+Hh,k0,x0,ci,l].join("|"),"g"),Q=RegExp("["+Nl+Iu+Tu+Al+"]"),ae=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ce=-1,Se={};Se[nr]=Se[vl]=Se[ua]=Se[_e]=Se[uo]=Se[bl]=Se[Sl]=Se[As]=Se[co]=!0,Se[et]=Se[tn]=Se[mt]=Se[Bn]=Se[rr]=Se[$n]=Se[oo]=Se[sa]=Se[Vr]=Se[aa]=Se[rn]=Se[xs]=Se[Ur]=Se[ks]=Se[oa]=!1;var Oe={};Oe[et]=Oe[tn]=Oe[mt]=Oe[rr]=Oe[Bn]=Oe[$n]=Oe[nr]=Oe[vl]=Oe[ua]=Oe[_e]=Oe[uo]=Oe[Vr]=Oe[aa]=Oe[rn]=Oe[xs]=Oe[Ur]=Oe[ks]=Oe[_n]=Oe[bl]=Oe[Sl]=Oe[As]=Oe[co]=!0,Oe[oo]=Oe[sa]=Oe[oa]=!1;var gr={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},ho={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fa={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Nu={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pa=parseFloat,ha=parseInt,NT=typeof global=="object"&&global&&global.Object===Object&&global,p9=typeof self=="object"&&self&&self.Object===Object&&self,yr=NT||p9||Function("return this")(),A0=typeof zc=="object"&&zc&&!zc.nodeType&&zc,mo=A0&&typeof Ip=="object"&&Ip&&!Ip.nodeType&&Ip,LT=mo&&mo.exports===A0,I0=LT&&NT.process,li=(function(){try{var U=mo&&mo.require&&mo.require("util").types;return U||I0&&I0.binding&&I0.binding("util")}catch{}})(),PT=li&&li.isArrayBuffer,CT=li&&li.isDate,qT=li&&li.isMap,RT=li&&li.isRegExp,MT=li&&li.isSet,DT=li&&li.isTypedArray;function Vn(U,re,Y){switch(Y.length){case 0:return U.call(re);case 1:return U.call(re,Y[0]);case 2:return U.call(re,Y[0],Y[1]);case 3:return U.call(re,Y[0],Y[1],Y[2])}return U.apply(re,Y)}function h9(U,re,Y,ve){for(var Fe=-1,st=U==null?0:U.length;++Fe<st;){var ir=U[Fe];re(ve,ir,Y(ir),U)}return ve}function Un(U,re){for(var Y=-1,ve=U==null?0:U.length;++Y<ve&&re(U[Y],Y,U)!==!1;);return U}function d9(U,re){for(var Y=U==null?0:U.length;Y--&&re(U[Y],Y,U)!==!1;);return U}function FT(U,re){for(var Y=-1,ve=U==null?0:U.length;++Y<ve;)if(!re(U[Y],Y,U))return!1;return!0}function da(U,re){for(var Y=-1,ve=U==null?0:U.length,Fe=0,st=[];++Y<ve;){var ir=U[Y];re(ir,Y,U)&&(st[Fe++]=ir)}return st}function Kh(U,re){var Y=U==null?0:U.length;return!!Y&&Lu(U,re,0)>-1}function T0(U,re,Y){for(var ve=-1,Fe=U==null?0:U.length;++ve<Fe;)if(Y(re,U[ve]))return!0;return!1}function It(U,re){for(var Y=-1,ve=U==null?0:U.length,Fe=Array(ve);++Y<ve;)Fe[Y]=re(U[Y],Y,U);return Fe}function ma(U,re){for(var Y=-1,ve=re.length,Fe=U.length;++Y<ve;)U[Fe+Y]=re[Y];return U}function E0(U,re,Y,ve){var Fe=-1,st=U==null?0:U.length;for(ve&&st&&(Y=U[++Fe]);++Fe<st;)Y=re(Y,U[Fe],Fe,U);return Y}function m9(U,re,Y,ve){var Fe=U==null?0:U.length;for(ve&&Fe&&(Y=U[--Fe]);Fe--;)Y=re(Y,U[Fe],Fe,U);return Y}function O0(U,re){for(var Y=-1,ve=U==null?0:U.length;++Y<ve;)if(re(U[Y],Y,U))return!0;return!1}var g9=N0("length");function y9(U){return U.split("")}function _9(U){return U.match(Nh)||[]}function jT(U,re,Y){var ve;return Y(U,function(Fe,st,ir){if(re(Fe,st,ir))return ve=st,!1}),ve}function Qh(U,re,Y,ve){for(var Fe=U.length,st=Y+(ve?1:-1);ve?st--:++st<Fe;)if(re(U[st],st,U))return st;return-1}function Lu(U,re,Y){return re===re?N9(U,re,Y):Qh(U,BT,Y)}function v9(U,re,Y,ve){for(var Fe=Y-1,st=U.length;++Fe<st;)if(ve(U[Fe],re))return Fe;return-1}function BT(U){return U!==U}function $T(U,re){var Y=U==null?0:U.length;return Y?P0(U,re)/Y:fe}function N0(U){return function(re){return re==null?t:re[U]}}function L0(U){return function(re){return U==null?t:U[re]}}function VT(U,re,Y,ve,Fe){return Fe(U,function(st,ir,yt){Y=ve?(ve=!1,st):re(Y,st,ir,yt)}),Y}function b9(U,re){var Y=U.length;for(U.sort(re);Y--;)U[Y]=U[Y].value;return U}function P0(U,re){for(var Y,ve=-1,Fe=U.length;++ve<Fe;){var st=re(U[ve]);st!==t&&(Y=Y===t?st:Y+st)}return Y}function C0(U,re){for(var Y=-1,ve=Array(U);++Y<U;)ve[Y]=re(Y);return ve}function S9(U,re){return It(re,function(Y){return[Y,U[Y]]})}function UT(U){return U&&U.slice(0,zT(U)+1).replace(Is,"")}function Wn(U){return function(re){return U(re)}}function q0(U,re){return It(re,function(Y){return U[Y]})}function ql(U,re){return U.has(re)}function WT(U,re){for(var Y=-1,ve=U.length;++Y<ve&&Lu(re,U[Y],0)>-1;);return Y}function GT(U,re){for(var Y=U.length;Y--&&Lu(re,U[Y],0)>-1;);return Y}function w9(U,re){for(var Y=U.length,ve=0;Y--;)U[Y]===re&&++ve;return ve}var x9=L0(gr),k9=L0(ho);function A9(U){return"\\"+Nu[U]}function I9(U,re){return U==null?t:U[re]}function Pu(U){return Q.test(U)}function T9(U){return ae.test(U)}function E9(U){for(var re,Y=[];!(re=U.next()).done;)Y.push(re.value);return Y}function R0(U){var re=-1,Y=Array(U.size);return U.forEach(function(ve,Fe){Y[++re]=[Fe,ve]}),Y}function HT(U,re){return function(Y){return U(re(Y))}}function ga(U,re){for(var Y=-1,ve=U.length,Fe=0,st=[];++Y<ve;){var ir=U[Y];(ir===re||ir===p)&&(U[Y]=p,st[Fe++]=Y)}return st}function Yh(U){var re=-1,Y=Array(U.size);return U.forEach(function(ve){Y[++re]=ve}),Y}function O9(U){var re=-1,Y=Array(U.size);return U.forEach(function(ve){Y[++re]=[ve,ve]}),Y}function N9(U,re,Y){for(var ve=Y-1,Fe=U.length;++ve<Fe;)if(U[ve]===re)return ve;return-1}function L9(U,re,Y){for(var ve=Y+1;ve--;)if(U[ve]===re)return ve;return ve}function Cu(U){return Pu(U)?C9(U):g9(U)}function Ci(U){return Pu(U)?q9(U):y9(U)}function zT(U){for(var re=U.length;re--&&Th.test(U.charAt(re)););return re}var P9=L0(fa);function C9(U){for(var re=D.lastIndex=0;D.test(U);)++re;return re}function q9(U){return U.match(D)||[]}function R9(U){return U.match(z)||[]}var M9=(function U(re){re=re==null?yr:ya.defaults(yr.Object(),re,ya.pick(yr,pe));var Y=re.Array,ve=re.Date,Fe=re.Error,st=re.Function,ir=re.Math,yt=re.Object,M0=re.RegExp,D9=re.String,fi=re.TypeError,Xh=Y.prototype,F9=st.prototype,qu=yt.prototype,Zh=re["__core-js_shared__"],ed=F9.toString,ct=qu.hasOwnProperty,j9=0,JT=(function(){var o=/[^.]+$/.exec(Zh&&Zh.keys&&Zh.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),td=qu.toString,B9=ed.call(yt),$9=yr._,V9=M0("^"+ed.call(ct).replace(wl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rd=LT?re.Buffer:t,_a=re.Symbol,nd=re.Uint8Array,KT=rd?rd.allocUnsafe:t,id=HT(yt.getPrototypeOf,yt),QT=yt.create,YT=qu.propertyIsEnumerable,sd=Xh.splice,XT=_a?_a.isConcatSpreadable:t,Rl=_a?_a.iterator:t,go=_a?_a.toStringTag:t,ad=(function(){try{var o=So(yt,"defineProperty");return o({},"",{}),o}catch{}})(),U9=re.clearTimeout!==yr.clearTimeout&&re.clearTimeout,W9=ve&&ve.now!==yr.Date.now&&ve.now,G9=re.setTimeout!==yr.setTimeout&&re.setTimeout,od=ir.ceil,ud=ir.floor,D0=yt.getOwnPropertySymbols,H9=rd?rd.isBuffer:t,ZT=re.isFinite,z9=Xh.join,J9=HT(yt.keys,yt),sr=ir.max,Wr=ir.min,K9=ve.now,Q9=re.parseInt,eE=ir.random,Y9=Xh.reverse,F0=So(re,"DataView"),Ml=So(re,"Map"),j0=So(re,"Promise"),Ru=So(re,"Set"),Dl=So(re,"WeakMap"),Fl=So(yt,"create"),cd=Dl&&new Dl,Mu={},X9=wo(F0),Z9=wo(Ml),e8=wo(j0),t8=wo(Ru),r8=wo(Dl),ld=_a?_a.prototype:t,jl=ld?ld.valueOf:t,tE=ld?ld.toString:t;function C(o){if(Mt(o)&&!$e(o)&&!(o instanceof Xe)){if(o instanceof pi)return o;if(ct.call(o,"__wrapped__"))return rO(o)}return new pi(o)}var Du=(function(){function o(){}return function(f){if(!Lt(f))return{};if(QT)return QT(f);o.prototype=f;var g=new o;return o.prototype=t,g}})();function fd(){}function pi(o,f){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=t}C.templateSettings={escape:qe,evaluate:Ih,interpolate:ku,variable:"",imports:{_:C}},C.prototype=fd.prototype,C.prototype.constructor=C,pi.prototype=Du(fd.prototype),pi.prototype.constructor=pi;function Xe(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ce,this.__views__=[]}function n8(){var o=new Xe(this.__wrapped__);return o.__actions__=bn(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=bn(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=bn(this.__views__),o}function i8(){if(this.__filtered__){var o=new Xe(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function s8(){var o=this.__wrapped__.value(),f=this.__dir__,g=$e(o),A=f<0,N=g?o.length:0,q=y$(0,N,this.__views__),j=q.start,V=q.end,G=V-j,ne=A?V:j-1,ie=this.__iteratees__,se=ie.length,me=0,Ie=Wr(G,this.__takeCount__);if(!g||!A&&N==G&&Ie==G)return AE(o,this.__actions__);var Pe=[];e:for(;G--&&me<Ie;){ne+=f;for(var ze=-1,Ne=o[ne];++ze<se;){var Qe=ie[ze],tt=Qe.iteratee,zn=Qe.type,un=tt(Ne);if(zn==ee)Ne=un;else if(!un){if(zn==Z)continue e;break e}}Pe[me++]=Ne}return Pe}Xe.prototype=Du(fd.prototype),Xe.prototype.constructor=Xe;function yo(o){var f=-1,g=o==null?0:o.length;for(this.clear();++f<g;){var A=o[f];this.set(A[0],A[1])}}function a8(){this.__data__=Fl?Fl(null):{},this.size=0}function o8(o){var f=this.has(o)&&delete this.__data__[o];return this.size-=f?1:0,f}function u8(o){var f=this.__data__;if(Fl){var g=f[o];return g===u?t:g}return ct.call(f,o)?f[o]:t}function c8(o){var f=this.__data__;return Fl?f[o]!==t:ct.call(f,o)}function l8(o,f){var g=this.__data__;return this.size+=this.has(o)?0:1,g[o]=Fl&&f===t?u:f,this}yo.prototype.clear=a8,yo.prototype.delete=o8,yo.prototype.get=u8,yo.prototype.has=c8,yo.prototype.set=l8;function Es(o){var f=-1,g=o==null?0:o.length;for(this.clear();++f<g;){var A=o[f];this.set(A[0],A[1])}}function f8(){this.__data__=[],this.size=0}function p8(o){var f=this.__data__,g=pd(f,o);if(g<0)return!1;var A=f.length-1;return g==A?f.pop():sd.call(f,g,1),--this.size,!0}function h8(o){var f=this.__data__,g=pd(f,o);return g<0?t:f[g][1]}function d8(o){return pd(this.__data__,o)>-1}function m8(o,f){var g=this.__data__,A=pd(g,o);return A<0?(++this.size,g.push([o,f])):g[A][1]=f,this}Es.prototype.clear=f8,Es.prototype.delete=p8,Es.prototype.get=h8,Es.prototype.has=d8,Es.prototype.set=m8;function Os(o){var f=-1,g=o==null?0:o.length;for(this.clear();++f<g;){var A=o[f];this.set(A[0],A[1])}}function g8(){this.size=0,this.__data__={hash:new yo,map:new(Ml||Es),string:new yo}}function y8(o){var f=kd(this,o).delete(o);return this.size-=f?1:0,f}function _8(o){return kd(this,o).get(o)}function v8(o){return kd(this,o).has(o)}function b8(o,f){var g=kd(this,o),A=g.size;return g.set(o,f),this.size+=g.size==A?0:1,this}Os.prototype.clear=g8,Os.prototype.delete=y8,Os.prototype.get=_8,Os.prototype.has=v8,Os.prototype.set=b8;function _o(o){var f=-1,g=o==null?0:o.length;for(this.__data__=new Os;++f<g;)this.add(o[f])}function S8(o){return this.__data__.set(o,u),this}function w8(o){return this.__data__.has(o)}_o.prototype.add=_o.prototype.push=S8,_o.prototype.has=w8;function qi(o){var f=this.__data__=new Es(o);this.size=f.size}function x8(){this.__data__=new Es,this.size=0}function k8(o){var f=this.__data__,g=f.delete(o);return this.size=f.size,g}function A8(o){return this.__data__.get(o)}function I8(o){return this.__data__.has(o)}function T8(o,f){var g=this.__data__;if(g instanceof Es){var A=g.__data__;if(!Ml||A.length<r-1)return A.push([o,f]),this.size=++g.size,this;g=this.__data__=new Os(A)}return g.set(o,f),this.size=g.size,this}qi.prototype.clear=x8,qi.prototype.delete=k8,qi.prototype.get=A8,qi.prototype.has=I8,qi.prototype.set=T8;function rE(o,f){var g=$e(o),A=!g&&xo(o),N=!g&&!A&&xa(o),q=!g&&!A&&!N&&$u(o),j=g||A||N||q,V=j?C0(o.length,D9):[],G=V.length;for(var ne in o)(f||ct.call(o,ne))&&!(j&&(ne=="length"||N&&(ne=="offset"||ne=="parent")||q&&(ne=="buffer"||ne=="byteLength"||ne=="byteOffset")||Ps(ne,G)))&&V.push(ne);return V}function nE(o){var f=o.length;return f?o[Q0(0,f-1)]:t}function E8(o,f){return Ad(bn(o),vo(f,0,o.length))}function O8(o){return Ad(bn(o))}function B0(o,f,g){(g!==t&&!Mi(o[f],g)||g===t&&!(f in o))&&es(o,f,g)}function Bl(o,f,g){var A=o[f];(!(ct.call(o,f)&&Mi(A,g))||g===t&&!(f in o))&&es(o,f,g)}function pd(o,f){for(var g=o.length;g--;)if(Mi(o[g][0],f))return g;return-1}function N8(o,f,g,A){return va(o,function(N,q,j){f(A,N,g(N),j)}),A}function iE(o,f){return o&&rs(f,_r(f),o)}function L8(o,f){return o&&rs(f,wn(f),o)}function es(o,f,g){f=="__proto__"&&ad?ad(o,f,{configurable:!0,enumerable:!0,value:g,writable:!0}):o[f]=g}function $0(o,f){for(var g=-1,A=f.length,N=Y(A),q=o==null;++g<A;)N[g]=q?t:wb(o,f[g]);return N}function vo(o,f,g){return o===o&&(g!==t&&(o=o<=g?o:g),f!==t&&(o=o>=f?o:f)),o}function hi(o,f,g,A,N,q){var j,V=f&d,G=f&m,ne=f&h;if(g&&(j=N?g(o,A,N,q):g(o)),j!==t)return j;if(!Lt(o))return o;var ie=$e(o);if(ie){if(j=v$(o),!V)return bn(o,j)}else{var se=Gr(o),me=se==sa||se==yl;if(xa(o))return EE(o,V);if(se==rn||se==et||me&&!N){if(j=G||me?{}:zE(o),!V)return G?u$(o,L8(j,o)):o$(o,iE(j,o))}else{if(!Oe[se])return N?o:{};j=b$(o,se,V)}}q||(q=new qi);var Ie=q.get(o);if(Ie)return Ie;q.set(o,j),wO(o)?o.forEach(function(Ne){j.add(hi(Ne,f,g,Ne,o,q))}):bO(o)&&o.forEach(function(Ne,Qe){j.set(Qe,hi(Ne,f,g,Qe,o,q))});var Pe=ne?G?ob:ab:G?wn:_r,ze=ie?t:Pe(o);return Un(ze||o,function(Ne,Qe){ze&&(Qe=Ne,Ne=o[Qe]),Bl(j,Qe,hi(Ne,f,g,Qe,o,q))}),j}function P8(o){var f=_r(o);return function(g){return sE(g,o,f)}}function sE(o,f,g){var A=g.length;if(o==null)return!A;for(o=yt(o);A--;){var N=g[A],q=f[N],j=o[N];if(j===t&&!(N in o)||!q(j))return!1}return!0}function aE(o,f,g){if(typeof o!="function")throw new fi(i);return zl(function(){o.apply(t,g)},f)}function $l(o,f,g,A){var N=-1,q=Kh,j=!0,V=o.length,G=[],ne=f.length;if(!V)return G;g&&(f=It(f,Wn(g))),A?(q=T0,j=!1):f.length>=r&&(q=ql,j=!1,f=new _o(f));e:for(;++N<V;){var ie=o[N],se=g==null?ie:g(ie);if(ie=A||ie!==0?ie:0,j&&se===se){for(var me=ne;me--;)if(f[me]===se)continue e;G.push(ie)}else q(f,se,A)||G.push(ie)}return G}var va=CE(ts),oE=CE(U0,!0);function C8(o,f){var g=!0;return va(o,function(A,N,q){return g=!!f(A,N,q),g}),g}function hd(o,f,g){for(var A=-1,N=o.length;++A<N;){var q=o[A],j=f(q);if(j!=null&&(V===t?j===j&&!Hn(j):g(j,V)))var V=j,G=q}return G}function q8(o,f,g,A){var N=o.length;for(g=We(g),g<0&&(g=-g>N?0:N+g),A=A===t||A>N?N:We(A),A<0&&(A+=N),A=g>A?0:kO(A);g<A;)o[g++]=f;return o}function uE(o,f){var g=[];return va(o,function(A,N,q){f(A,N,q)&&g.push(A)}),g}function Ir(o,f,g,A,N){var q=-1,j=o.length;for(g||(g=w$),N||(N=[]);++q<j;){var V=o[q];f>0&&g(V)?f>1?Ir(V,f-1,g,A,N):ma(N,V):A||(N[N.length]=V)}return N}var V0=qE(),cE=qE(!0);function ts(o,f){return o&&V0(o,f,_r)}function U0(o,f){return o&&cE(o,f,_r)}function dd(o,f){return da(f,function(g){return Cs(o[g])})}function bo(o,f){f=Sa(f,o);for(var g=0,A=f.length;o!=null&&g<A;)o=o[Ri(f[g++])];return g&&g==A?o:t}function lE(o,f,g){var A=f(o);return $e(o)?A:ma(A,g(o))}function an(o){return o==null?o===t?xh:ws:go&&go in yt(o)?g$(o):O$(o)}function W0(o,f){return o>f}function R8(o,f){return o!=null&&ct.call(o,f)}function M8(o,f){return o!=null&&f in yt(o)}function D8(o,f,g){return o>=Wr(f,g)&&o<sr(f,g)}function G0(o,f,g){for(var A=g?T0:Kh,N=o[0].length,q=o.length,j=q,V=Y(q),G=1/0,ne=[];j--;){var ie=o[j];j&&f&&(ie=It(ie,Wn(f))),G=Wr(ie.length,G),V[j]=!g&&(f||N>=120&&ie.length>=120)?new _o(j&&ie):t}ie=o[0];var se=-1,me=V[0];e:for(;++se<N&&ne.length<G;){var Ie=ie[se],Pe=f?f(Ie):Ie;if(Ie=g||Ie!==0?Ie:0,!(me?ql(me,Pe):A(ne,Pe,g))){for(j=q;--j;){var ze=V[j];if(!(ze?ql(ze,Pe):A(o[j],Pe,g)))continue e}me&&me.push(Pe),ne.push(Ie)}}return ne}function F8(o,f,g,A){return ts(o,function(N,q,j){f(A,g(N),q,j)}),A}function Vl(o,f,g){f=Sa(f,o),o=YE(o,f);var A=o==null?o:o[Ri(mi(f))];return A==null?t:Vn(A,o,g)}function fE(o){return Mt(o)&&an(o)==et}function j8(o){return Mt(o)&&an(o)==mt}function B8(o){return Mt(o)&&an(o)==$n}function Ul(o,f,g,A,N){return o===f?!0:o==null||f==null||!Mt(o)&&!Mt(f)?o!==o&&f!==f:$8(o,f,g,A,Ul,N)}function $8(o,f,g,A,N,q){var j=$e(o),V=$e(f),G=j?tn:Gr(o),ne=V?tn:Gr(f);G=G==et?rn:G,ne=ne==et?rn:ne;var ie=G==rn,se=ne==rn,me=G==ne;if(me&&xa(o)){if(!xa(f))return!1;j=!0,ie=!1}if(me&&!ie)return q||(q=new qi),j||$u(o)?WE(o,f,g,A,N,q):d$(o,f,G,g,A,N,q);if(!(g&y)){var Ie=ie&&ct.call(o,"__wrapped__"),Pe=se&&ct.call(f,"__wrapped__");if(Ie||Pe){var ze=Ie?o.value():o,Ne=Pe?f.value():f;return q||(q=new qi),N(ze,Ne,g,A,q)}}return me?(q||(q=new qi),m$(o,f,g,A,N,q)):!1}function V8(o){return Mt(o)&&Gr(o)==Vr}function H0(o,f,g,A){var N=g.length,q=N,j=!A;if(o==null)return!q;for(o=yt(o);N--;){var V=g[N];if(j&&V[2]?V[1]!==o[V[0]]:!(V[0]in o))return!1}for(;++N<q;){V=g[N];var G=V[0],ne=o[G],ie=V[1];if(j&&V[2]){if(ne===t&&!(G in o))return!1}else{var se=new qi;if(A)var me=A(ne,ie,G,o,f,se);if(!(me===t?Ul(ie,ne,y|w,A,se):me))return!1}}return!0}function pE(o){if(!Lt(o)||k$(o))return!1;var f=Cs(o)?V9:Ch;return f.test(wo(o))}function U8(o){return Mt(o)&&an(o)==xs}function W8(o){return Mt(o)&&Gr(o)==Ur}function G8(o){return Mt(o)&&Ld(o.length)&&!!Se[an(o)]}function hE(o){return typeof o=="function"?o:o==null?xn:typeof o=="object"?$e(o)?gE(o[0],o[1]):mE(o):MO(o)}function z0(o){if(!Hl(o))return J9(o);var f=[];for(var g in yt(o))ct.call(o,g)&&g!="constructor"&&f.push(g);return f}function H8(o){if(!Lt(o))return E$(o);var f=Hl(o),g=[];for(var A in o)A=="constructor"&&(f||!ct.call(o,A))||g.push(A);return g}function J0(o,f){return o<f}function dE(o,f){var g=-1,A=Sn(o)?Y(o.length):[];return va(o,function(N,q,j){A[++g]=f(N,q,j)}),A}function mE(o){var f=cb(o);return f.length==1&&f[0][2]?KE(f[0][0],f[0][1]):function(g){return g===o||H0(g,o,f)}}function gE(o,f){return fb(o)&&JE(f)?KE(Ri(o),f):function(g){var A=wb(g,o);return A===t&&A===f?xb(g,o):Ul(f,A,y|w)}}function md(o,f,g,A,N){o!==f&&V0(f,function(q,j){if(N||(N=new qi),Lt(q))z8(o,f,j,g,md,A,N);else{var V=A?A(hb(o,j),q,j+"",o,f,N):t;V===t&&(V=q),B0(o,j,V)}},wn)}function z8(o,f,g,A,N,q,j){var V=hb(o,g),G=hb(f,g),ne=j.get(G);if(ne){B0(o,g,ne);return}var ie=q?q(V,G,g+"",o,f,j):t,se=ie===t;if(se){var me=$e(G),Ie=!me&&xa(G),Pe=!me&&!Ie&&$u(G);ie=G,me||Ie||Pe?$e(V)?ie=V:Ut(V)?ie=bn(V):Ie?(se=!1,ie=EE(G,!0)):Pe?(se=!1,ie=OE(G,!0)):ie=[]:Jl(G)||xo(G)?(ie=V,xo(V)?ie=AO(V):(!Lt(V)||Cs(V))&&(ie=zE(G))):se=!1}se&&(j.set(G,ie),N(ie,G,A,q,j),j.delete(G)),B0(o,g,ie)}function yE(o,f){var g=o.length;if(g)return f+=f<0?g:0,Ps(f,g)?o[f]:t}function _E(o,f,g){f.length?f=It(f,function(q){return $e(q)?function(j){return bo(j,q.length===1?q[0]:q)}:q}):f=[xn];var A=-1;f=It(f,Wn(Le()));var N=dE(o,function(q,j,V){var G=It(f,function(ne){return ne(q)});return{criteria:G,index:++A,value:q}});return b9(N,function(q,j){return a$(q,j,g)})}function J8(o,f){return vE(o,f,function(g,A){return xb(o,A)})}function vE(o,f,g){for(var A=-1,N=f.length,q={};++A<N;){var j=f[A],V=bo(o,j);g(V,j)&&Wl(q,Sa(j,o),V)}return q}function K8(o){return function(f){return bo(f,o)}}function K0(o,f,g,A){var N=A?v9:Lu,q=-1,j=f.length,V=o;for(o===f&&(f=bn(f)),g&&(V=It(o,Wn(g)));++q<j;)for(var G=0,ne=f[q],ie=g?g(ne):ne;(G=N(V,ie,G,A))>-1;)V!==o&&sd.call(V,G,1),sd.call(o,G,1);return o}function bE(o,f){for(var g=o?f.length:0,A=g-1;g--;){var N=f[g];if(g==A||N!==q){var q=N;Ps(N)?sd.call(o,N,1):Z0(o,N)}}return o}function Q0(o,f){return o+ud(eE()*(f-o+1))}function Q8(o,f,g,A){for(var N=-1,q=sr(od((f-o)/(g||1)),0),j=Y(q);q--;)j[A?q:++N]=o,o+=g;return j}function Y0(o,f){var g="";if(!o||f<1||f>te)return g;do f%2&&(g+=o),f=ud(f/2),f&&(o+=o);while(f);return g}function Je(o,f){return db(QE(o,f,xn),o+"")}function Y8(o){return nE(Vu(o))}function X8(o,f){var g=Vu(o);return Ad(g,vo(f,0,g.length))}function Wl(o,f,g,A){if(!Lt(o))return o;f=Sa(f,o);for(var N=-1,q=f.length,j=q-1,V=o;V!=null&&++N<q;){var G=Ri(f[N]),ne=g;if(G==="__proto__"||G==="constructor"||G==="prototype")return o;if(N!=j){var ie=V[G];ne=A?A(ie,G,V):t,ne===t&&(ne=Lt(ie)?ie:Ps(f[N+1])?[]:{})}Bl(V,G,ne),V=V[G]}return o}var SE=cd?function(o,f){return cd.set(o,f),o}:xn,Z8=ad?function(o,f){return ad(o,"toString",{configurable:!0,enumerable:!1,value:Ab(f),writable:!0})}:xn;function e$(o){return Ad(Vu(o))}function di(o,f,g){var A=-1,N=o.length;f<0&&(f=-f>N?0:N+f),g=g>N?N:g,g<0&&(g+=N),N=f>g?0:g-f>>>0,f>>>=0;for(var q=Y(N);++A<N;)q[A]=o[A+f];return q}function t$(o,f){var g;return va(o,function(A,N,q){return g=f(A,N,q),!g}),!!g}function gd(o,f,g){var A=0,N=o==null?A:o.length;if(typeof f=="number"&&f===f&&N<=Ue){for(;A<N;){var q=A+N>>>1,j=o[q];j!==null&&!Hn(j)&&(g?j<=f:j<f)?A=q+1:N=q}return N}return X0(o,f,xn,g)}function X0(o,f,g,A){var N=0,q=o==null?0:o.length;if(q===0)return 0;f=g(f);for(var j=f!==f,V=f===null,G=Hn(f),ne=f===t;N<q;){var ie=ud((N+q)/2),se=g(o[ie]),me=se!==t,Ie=se===null,Pe=se===se,ze=Hn(se);if(j)var Ne=A||Pe;else ne?Ne=Pe&&(A||me):V?Ne=Pe&&me&&(A||!Ie):G?Ne=Pe&&me&&!Ie&&(A||!ze):Ie||ze?Ne=!1:Ne=A?se<=f:se<f;Ne?N=ie+1:q=ie}return Wr(q,Re)}function wE(o,f){for(var g=-1,A=o.length,N=0,q=[];++g<A;){var j=o[g],V=f?f(j):j;if(!g||!Mi(V,G)){var G=V;q[N++]=j===0?0:j}}return q}function xE(o){return typeof o=="number"?o:Hn(o)?fe:+o}function Gn(o){if(typeof o=="string")return o;if($e(o))return It(o,Gn)+"";if(Hn(o))return tE?tE.call(o):"";var f=o+"";return f=="0"&&1/o==-J?"-0":f}function ba(o,f,g){var A=-1,N=Kh,q=o.length,j=!0,V=[],G=V;if(g)j=!1,N=T0;else if(q>=r){var ne=f?null:p$(o);if(ne)return Yh(ne);j=!1,N=ql,G=new _o}else G=f?[]:V;e:for(;++A<q;){var ie=o[A],se=f?f(ie):ie;if(ie=g||ie!==0?ie:0,j&&se===se){for(var me=G.length;me--;)if(G[me]===se)continue e;f&&G.push(se),V.push(ie)}else N(G,se,g)||(G!==V&&G.push(se),V.push(ie))}return V}function Z0(o,f){f=Sa(f,o);var g=-1,A=f.length;if(!A)return!0;for(;++g<A;){var N=Ri(f[g]);if(N==="__proto__"&&!ct.call(o,"__proto__")||(N==="constructor"||N==="prototype")&&g<A-1)return!1}var q=YE(o,f);return q==null||delete q[Ri(mi(f))]}function kE(o,f,g,A){return Wl(o,f,g(bo(o,f)),A)}function yd(o,f,g,A){for(var N=o.length,q=A?N:-1;(A?q--:++q<N)&&f(o[q],q,o););return g?di(o,A?0:q,A?q+1:N):di(o,A?q+1:0,A?N:q)}function AE(o,f){var g=o;return g instanceof Xe&&(g=g.value()),E0(f,function(A,N){return N.func.apply(N.thisArg,ma([A],N.args))},g)}function eb(o,f,g){var A=o.length;if(A<2)return A?ba(o[0]):[];for(var N=-1,q=Y(A);++N<A;)for(var j=o[N],V=-1;++V<A;)V!=N&&(q[N]=$l(q[N]||j,o[V],f,g));return ba(Ir(q,1),f,g)}function IE(o,f,g){for(var A=-1,N=o.length,q=f.length,j={};++A<N;){var V=A<q?f[A]:t;g(j,o[A],V)}return j}function tb(o){return Ut(o)?o:[]}function rb(o){return typeof o=="function"?o:xn}function Sa(o,f){return $e(o)?o:fb(o,f)?[o]:tO(lt(o))}var r$=Je;function wa(o,f,g){var A=o.length;return g=g===t?A:g,!f&&g>=A?o:di(o,f,g)}var TE=U9||function(o){return yr.clearTimeout(o)};function EE(o,f){if(f)return o.slice();var g=o.length,A=KT?KT(g):new o.constructor(g);return o.copy(A),A}function nb(o){var f=new o.constructor(o.byteLength);return new nd(f).set(new nd(o)),f}function n$(o,f){var g=f?nb(o.buffer):o.buffer;return new o.constructor(g,o.byteOffset,o.byteLength)}function i$(o){var f=new o.constructor(o.source,Ph.exec(o));return f.lastIndex=o.lastIndex,f}function s$(o){return jl?yt(jl.call(o)):{}}function OE(o,f){var g=f?nb(o.buffer):o.buffer;return new o.constructor(g,o.byteOffset,o.length)}function NE(o,f){if(o!==f){var g=o!==t,A=o===null,N=o===o,q=Hn(o),j=f!==t,V=f===null,G=f===f,ne=Hn(f);if(!V&&!ne&&!q&&o>f||q&&j&&G&&!V&&!ne||A&&j&&G||!g&&G||!N)return 1;if(!A&&!q&&!ne&&o<f||ne&&g&&N&&!A&&!q||V&&g&&N||!j&&N||!G)return-1}return 0}function a$(o,f,g){for(var A=-1,N=o.criteria,q=f.criteria,j=N.length,V=g.length;++A<j;){var G=NE(N[A],q[A]);if(G){if(A>=V)return G;var ne=g[A];return G*(ne=="desc"?-1:1)}}return o.index-f.index}function LE(o,f,g,A){for(var N=-1,q=o.length,j=g.length,V=-1,G=f.length,ne=sr(q-j,0),ie=Y(G+ne),se=!A;++V<G;)ie[V]=f[V];for(;++N<j;)(se||N<q)&&(ie[g[N]]=o[N]);for(;ne--;)ie[V++]=o[N++];return ie}function PE(o,f,g,A){for(var N=-1,q=o.length,j=-1,V=g.length,G=-1,ne=f.length,ie=sr(q-V,0),se=Y(ie+ne),me=!A;++N<ie;)se[N]=o[N];for(var Ie=N;++G<ne;)se[Ie+G]=f[G];for(;++j<V;)(me||N<q)&&(se[Ie+g[j]]=o[N++]);return se}function bn(o,f){var g=-1,A=o.length;for(f||(f=Y(A));++g<A;)f[g]=o[g];return f}function rs(o,f,g,A){var N=!g;g||(g={});for(var q=-1,j=f.length;++q<j;){var V=f[q],G=A?A(g[V],o[V],V,g,o):t;G===t&&(G=o[V]),N?es(g,V,G):Bl(g,V,G)}return g}function o$(o,f){return rs(o,lb(o),f)}function u$(o,f){return rs(o,GE(o),f)}function _d(o,f){return function(g,A){var N=$e(g)?h9:N8,q=f?f():{};return N(g,o,Le(A,2),q)}}function Fu(o){return Je(function(f,g){var A=-1,N=g.length,q=N>1?g[N-1]:t,j=N>2?g[2]:t;for(q=o.length>3&&typeof q=="function"?(N--,q):t,j&&on(g[0],g[1],j)&&(q=N<3?t:q,N=1),f=yt(f);++A<N;){var V=g[A];V&&o(f,V,A,q)}return f})}function CE(o,f){return function(g,A){if(g==null)return g;if(!Sn(g))return o(g,A);for(var N=g.length,q=f?N:-1,j=yt(g);(f?q--:++q<N)&&A(j[q],q,j)!==!1;);return g}}function qE(o){return function(f,g,A){for(var N=-1,q=yt(f),j=A(f),V=j.length;V--;){var G=j[o?V:++N];if(g(q[G],G,q)===!1)break}return f}}function c$(o,f,g){var A=f&x,N=Gl(o);function q(){var j=this&&this!==yr&&this instanceof q?N:o;return j.apply(A?g:this,arguments)}return q}function RE(o){return function(f){f=lt(f);var g=Pu(f)?Ci(f):t,A=g?g[0]:f.charAt(0),N=g?wa(g,1).join(""):f.slice(1);return A[o]()+N}}function ju(o){return function(f){return E0(qO(CO(f).replace(E,"")),o,"")}}function Gl(o){return function(){var f=arguments;switch(f.length){case 0:return new o;case 1:return new o(f[0]);case 2:return new o(f[0],f[1]);case 3:return new o(f[0],f[1],f[2]);case 4:return new o(f[0],f[1],f[2],f[3]);case 5:return new o(f[0],f[1],f[2],f[3],f[4]);case 6:return new o(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new o(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var g=Du(o.prototype),A=o.apply(g,f);return Lt(A)?A:g}}function l$(o,f,g){var A=Gl(o);function N(){for(var q=arguments.length,j=Y(q),V=q,G=Bu(N);V--;)j[V]=arguments[V];var ne=q<3&&j[0]!==G&&j[q-1]!==G?[]:ga(j,G);if(q-=ne.length,q<g)return BE(o,f,vd,N.placeholder,t,j,ne,t,t,g-q);var ie=this&&this!==yr&&this instanceof N?A:o;return Vn(ie,this,j)}return N}function ME(o){return function(f,g,A){var N=yt(f);if(!Sn(f)){var q=Le(g,3);f=_r(f),g=function(V){return q(N[V],V,N)}}var j=o(f,g,A);return j>-1?N[q?f[j]:j]:t}}function DE(o){return Ls(function(f){var g=f.length,A=g,N=pi.prototype.thru;for(o&&f.reverse();A--;){var q=f[A];if(typeof q!="function")throw new fi(i);if(N&&!j&&xd(q)=="wrapper")var j=new pi([],!0)}for(A=j?A:g;++A<g;){q=f[A];var V=xd(q),G=V=="wrapper"?ub(q):t;G&&pb(G[0])&&G[1]==(R|I|S|M)&&!G[4].length&&G[9]==1?j=j[xd(G[0])].apply(j,G[3]):j=q.length==1&&pb(q)?j[V]():j.thru(q)}return function(){var ne=arguments,ie=ne[0];if(j&&ne.length==1&&$e(ie))return j.plant(ie).value();for(var se=0,me=g?f[se].apply(this,ne):ie;++se<g;)me=f[se].call(this,me);return me}})}function vd(o,f,g,A,N,q,j,V,G,ne){var ie=f&R,se=f&x,me=f&k,Ie=f&(I|T),Pe=f&F,ze=me?t:Gl(o);function Ne(){for(var Qe=arguments.length,tt=Y(Qe),zn=Qe;zn--;)tt[zn]=arguments[zn];if(Ie)var un=Bu(Ne),Jn=w9(tt,un);if(A&&(tt=LE(tt,A,N,Ie)),q&&(tt=PE(tt,q,j,Ie)),Qe-=Jn,Ie&&Qe<ne){var Wt=ga(tt,un);return BE(o,f,vd,Ne.placeholder,g,tt,Wt,V,G,ne-Qe)}var Di=se?g:this,Rs=me?Di[o]:o;return Qe=tt.length,V?tt=N$(tt,V):Pe&&Qe>1&&tt.reverse(),ie&&G<Qe&&(tt.length=G),this&&this!==yr&&this instanceof Ne&&(Rs=ze||Gl(Rs)),Rs.apply(Di,tt)}return Ne}function FE(o,f){return function(g,A){return F8(g,o,f(A),{})}}function bd(o,f){return function(g,A){var N;if(g===t&&A===t)return f;if(g!==t&&(N=g),A!==t){if(N===t)return A;typeof g=="string"||typeof A=="string"?(g=Gn(g),A=Gn(A)):(g=xE(g),A=xE(A)),N=o(g,A)}return N}}function ib(o){return Ls(function(f){return f=It(f,Wn(Le())),Je(function(g){var A=this;return o(f,function(N){return Vn(N,A,g)})})})}function Sd(o,f){f=f===t?" ":Gn(f);var g=f.length;if(g<2)return g?Y0(f,o):f;var A=Y0(f,od(o/Cu(f)));return Pu(f)?wa(Ci(A),0,o).join(""):A.slice(0,o)}function f$(o,f,g,A){var N=f&x,q=Gl(o);function j(){for(var V=-1,G=arguments.length,ne=-1,ie=A.length,se=Y(ie+G),me=this&&this!==yr&&this instanceof j?q:o;++ne<ie;)se[ne]=A[ne];for(;G--;)se[ne++]=arguments[++V];return Vn(me,N?g:this,se)}return j}function jE(o){return function(f,g,A){return A&&typeof A!="number"&&on(f,g,A)&&(g=A=t),f=qs(f),g===t?(g=f,f=0):g=qs(g),A=A===t?f<g?1:-1:qs(A),Q8(f,g,A,o)}}function wd(o){return function(f,g){return typeof f=="string"&&typeof g=="string"||(f=gi(f),g=gi(g)),o(f,g)}}function BE(o,f,g,A,N,q,j,V,G,ne){var ie=f&I,se=ie?j:t,me=ie?t:j,Ie=ie?q:t,Pe=ie?t:q;f|=ie?S:L,f&=~(ie?L:S),f&v||(f&=~(x|k));var ze=[o,f,N,Ie,se,Pe,me,V,G,ne],Ne=g.apply(t,ze);return pb(o)&&XE(Ne,ze),Ne.placeholder=A,ZE(Ne,o,f)}function sb(o){var f=ir[o];return function(g,A){if(g=gi(g),A=A==null?0:Wr(We(A),292),A&&ZT(g)){var N=(lt(g)+"e").split("e"),q=f(N[0]+"e"+(+N[1]+A));return N=(lt(q)+"e").split("e"),+(N[0]+"e"+(+N[1]-A))}return f(g)}}var p$=Ru&&1/Yh(new Ru([,-0]))[1]==J?function(o){return new Ru(o)}:Eb;function $E(o){return function(f){var g=Gr(f);return g==Vr?R0(f):g==Ur?O9(f):S9(f,o(f))}}function Ns(o,f,g,A,N,q,j,V){var G=f&k;if(!G&&typeof o!="function")throw new fi(i);var ne=A?A.length:0;if(ne||(f&=~(S|L),A=N=t),j=j===t?j:sr(We(j),0),V=V===t?V:We(V),ne-=N?N.length:0,f&L){var ie=A,se=N;A=N=t}var me=G?t:ub(o),Ie=[o,f,g,A,N,ie,se,q,j,V];if(me&&T$(Ie,me),o=Ie[0],f=Ie[1],g=Ie[2],A=Ie[3],N=Ie[4],V=Ie[9]=Ie[9]===t?G?0:o.length:sr(Ie[9]-ne,0),!V&&f&(I|T)&&(f&=~(I|T)),!f||f==x)var Pe=c$(o,f,g);else f==I||f==T?Pe=l$(o,f,V):(f==S||f==(x|S))&&!N.length?Pe=f$(o,f,g,A):Pe=vd.apply(t,Ie);var ze=me?SE:XE;return ZE(ze(Pe,Ie),o,f)}function VE(o,f,g,A){return o===t||Mi(o,qu[g])&&!ct.call(A,g)?f:o}function UE(o,f,g,A,N,q){return Lt(o)&&Lt(f)&&(q.set(f,o),md(o,f,t,UE,q),q.delete(f)),o}function h$(o){return Jl(o)?t:o}function WE(o,f,g,A,N,q){var j=g&y,V=o.length,G=f.length;if(V!=G&&!(j&&G>V))return!1;var ne=q.get(o),ie=q.get(f);if(ne&&ie)return ne==f&&ie==o;var se=-1,me=!0,Ie=g&w?new _o:t;for(q.set(o,f),q.set(f,o);++se<V;){var Pe=o[se],ze=f[se];if(A)var Ne=j?A(ze,Pe,se,f,o,q):A(Pe,ze,se,o,f,q);if(Ne!==t){if(Ne)continue;me=!1;break}if(Ie){if(!O0(f,function(Qe,tt){if(!ql(Ie,tt)&&(Pe===Qe||N(Pe,Qe,g,A,q)))return Ie.push(tt)})){me=!1;break}}else if(!(Pe===ze||N(Pe,ze,g,A,q))){me=!1;break}}return q.delete(o),q.delete(f),me}function d$(o,f,g,A,N,q,j){switch(g){case rr:if(o.byteLength!=f.byteLength||o.byteOffset!=f.byteOffset)return!1;o=o.buffer,f=f.buffer;case mt:return!(o.byteLength!=f.byteLength||!q(new nd(o),new nd(f)));case Bn:case $n:case aa:return Mi(+o,+f);case oo:return o.name==f.name&&o.message==f.message;case xs:case ks:return o==f+"";case Vr:var V=R0;case Ur:var G=A&y;if(V||(V=Yh),o.size!=f.size&&!G)return!1;var ne=j.get(o);if(ne)return ne==f;A|=w,j.set(o,f);var ie=WE(V(o),V(f),A,N,q,j);return j.delete(o),ie;case _n:if(jl)return jl.call(o)==jl.call(f)}return!1}function m$(o,f,g,A,N,q){var j=g&y,V=ab(o),G=V.length,ne=ab(f),ie=ne.length;if(G!=ie&&!j)return!1;for(var se=G;se--;){var me=V[se];if(!(j?me in f:ct.call(f,me)))return!1}var Ie=q.get(o),Pe=q.get(f);if(Ie&&Pe)return Ie==f&&Pe==o;var ze=!0;q.set(o,f),q.set(f,o);for(var Ne=j;++se<G;){me=V[se];var Qe=o[me],tt=f[me];if(A)var zn=j?A(tt,Qe,me,f,o,q):A(Qe,tt,me,o,f,q);if(!(zn===t?Qe===tt||N(Qe,tt,g,A,q):zn)){ze=!1;break}Ne||(Ne=me=="constructor")}if(ze&&!Ne){var un=o.constructor,Jn=f.constructor;un!=Jn&&"constructor"in o&&"constructor"in f&&!(typeof un=="function"&&un instanceof un&&typeof Jn=="function"&&Jn instanceof Jn)&&(ze=!1)}return q.delete(o),q.delete(f),ze}function Ls(o){return db(QE(o,t,sO),o+"")}function ab(o){return lE(o,_r,lb)}function ob(o){return lE(o,wn,GE)}var ub=cd?function(o){return cd.get(o)}:Eb;function xd(o){for(var f=o.name+"",g=Mu[f],A=ct.call(Mu,f)?g.length:0;A--;){var N=g[A],q=N.func;if(q==null||q==o)return N.name}return f}function Bu(o){var f=ct.call(C,"placeholder")?C:o;return f.placeholder}function Le(){var o=C.iteratee||Ib;return o=o===Ib?hE:o,arguments.length?o(arguments[0],arguments[1]):o}function kd(o,f){var g=o.__data__;return x$(f)?g[typeof f=="string"?"string":"hash"]:g.map}function cb(o){for(var f=_r(o),g=f.length;g--;){var A=f[g],N=o[A];f[g]=[A,N,JE(N)]}return f}function So(o,f){var g=I9(o,f);return pE(g)?g:t}function g$(o){var f=ct.call(o,go),g=o[go];try{o[go]=t;var A=!0}catch{}var N=td.call(o);return A&&(f?o[go]=g:delete o[go]),N}var lb=D0?function(o){return o==null?[]:(o=yt(o),da(D0(o),function(f){return YT.call(o,f)}))}:Ob,GE=D0?function(o){for(var f=[];o;)ma(f,lb(o)),o=id(o);return f}:Ob,Gr=an;(F0&&Gr(new F0(new ArrayBuffer(1)))!=rr||Ml&&Gr(new Ml)!=Vr||j0&&Gr(j0.resolve())!=_l||Ru&&Gr(new Ru)!=Ur||Dl&&Gr(new Dl)!=oa)&&(Gr=function(o){var f=an(o),g=f==rn?o.constructor:t,A=g?wo(g):"";if(A)switch(A){case X9:return rr;case Z9:return Vr;case e8:return _l;case t8:return Ur;case r8:return oa}return f});function y$(o,f,g){for(var A=-1,N=g.length;++A<N;){var q=g[A],j=q.size;switch(q.type){case"drop":o+=j;break;case"dropRight":f-=j;break;case"take":f=Wr(f,o+j);break;case"takeRight":o=sr(o,f-j);break}}return{start:o,end:f}}function _$(o){var f=o.match(Eh);return f?f[1].split(Oh):[]}function HE(o,f,g){f=Sa(f,o);for(var A=-1,N=f.length,q=!1;++A<N;){var j=Ri(f[A]);if(!(q=o!=null&&g(o,j)))break;o=o[j]}return q||++A!=N?q:(N=o==null?0:o.length,!!N&&Ld(N)&&Ps(j,N)&&($e(o)||xo(o)))}function v$(o){var f=o.length,g=new o.constructor(f);return f&&typeof o[0]=="string"&&ct.call(o,"index")&&(g.index=o.index,g.input=o.input),g}function zE(o){return typeof o.constructor=="function"&&!Hl(o)?Du(id(o)):{}}function b$(o,f,g){var A=o.constructor;switch(f){case mt:return nb(o);case Bn:case $n:return new A(+o);case rr:return n$(o,g);case nr:case vl:case ua:case _e:case uo:case bl:case Sl:case As:case co:return OE(o,g);case Vr:return new A;case aa:case ks:return new A(o);case xs:return i$(o);case Ur:return new A;case _n:return s$(o)}}function S$(o,f){var g=f.length;if(!g)return o;var A=g-1;return f[A]=(g>1?"& ":"")+f[A],f=f.join(g>2?", ":" "),o.replace(m0,`{
1199
+ /* [wrapped with `+f+`] */
1200
+ `)}function w$(o){return $e(o)||xo(o)||!!(XT&&o&&o[XT])}function Ps(o,f){var g=typeof o;return f=f??te,!!f&&(g=="number"||g!="symbol"&&Rh.test(o))&&o>-1&&o%1==0&&o<f}function on(o,f,g){if(!Lt(g))return!1;var A=typeof f;return(A=="number"?Sn(g)&&Ps(f,g.length):A=="string"&&f in g)?Mi(g[f],o):!1}function fb(o,f){if($e(o))return!1;var g=typeof o;return g=="number"||g=="symbol"||g=="boolean"||o==null||Hn(o)?!0:Au.test(o)||!d0.test(o)||f!=null&&o in yt(f)}function x$(o){var f=typeof o;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?o!=="__proto__":o===null}function pb(o){var f=xd(o),g=C[f];if(typeof g!="function"||!(f in Xe.prototype))return!1;if(o===g)return!0;var A=ub(g);return!!A&&o===A[0]}function k$(o){return!!JT&&JT in o}var A$=Zh?Cs:Nb;function Hl(o){var f=o&&o.constructor,g=typeof f=="function"&&f.prototype||qu;return o===g}function JE(o){return o===o&&!Lt(o)}function KE(o,f){return function(g){return g==null?!1:g[o]===f&&(f!==t||o in yt(g))}}function I$(o){var f=Od(o,function(A){return g.size===c&&g.clear(),A}),g=f.cache;return f}function T$(o,f){var g=o[1],A=f[1],N=g|A,q=N<(x|k|R),j=A==R&&g==I||A==R&&g==M&&o[7].length<=f[8]||A==(R|M)&&f[7].length<=f[8]&&g==I;if(!(q||j))return o;A&x&&(o[2]=f[2],N|=g&x?0:v);var V=f[3];if(V){var G=o[3];o[3]=G?LE(G,V,f[4]):V,o[4]=G?ga(o[3],p):f[4]}return V=f[5],V&&(G=o[5],o[5]=G?PE(G,V,f[6]):V,o[6]=G?ga(o[5],p):f[6]),V=f[7],V&&(o[7]=V),A&R&&(o[8]=o[8]==null?f[8]:Wr(o[8],f[8])),o[9]==null&&(o[9]=f[9]),o[0]=f[0],o[1]=N,o}function E$(o){var f=[];if(o!=null)for(var g in yt(o))f.push(g);return f}function O$(o){return td.call(o)}function QE(o,f,g){return f=sr(f===t?o.length-1:f,0),function(){for(var A=arguments,N=-1,q=sr(A.length-f,0),j=Y(q);++N<q;)j[N]=A[f+N];N=-1;for(var V=Y(f+1);++N<f;)V[N]=A[N];return V[f]=g(j),Vn(o,this,V)}}function YE(o,f){return f.length<2?o:bo(o,di(f,0,-1))}function N$(o,f){for(var g=o.length,A=Wr(f.length,g),N=bn(o);A--;){var q=f[A];o[A]=Ps(q,g)?N[q]:t}return o}function hb(o,f){if(!(f==="constructor"&&typeof o[f]=="function")&&f!="__proto__")return o[f]}var XE=eO(SE),zl=G9||function(o,f){return yr.setTimeout(o,f)},db=eO(Z8);function ZE(o,f,g){var A=f+"";return db(o,S$(A,L$(_$(A),g)))}function eO(o){var f=0,g=0;return function(){var A=K9(),N=B-(A-g);if(g=A,N>0){if(++f>=$)return arguments[0]}else f=0;return o.apply(t,arguments)}}function Ad(o,f){var g=-1,A=o.length,N=A-1;for(f=f===t?A:f;++g<f;){var q=Q0(g,N),j=o[q];o[q]=o[g],o[g]=j}return o.length=f,o}var tO=I$(function(o){var f=[];return o.charCodeAt(0)===46&&f.push(""),o.replace(Zi,function(g,A,N,q){f.push(N?q.replace(Lh,"$1"):A||g)}),f});function Ri(o){if(typeof o=="string"||Hn(o))return o;var f=o+"";return f=="0"&&1/o==-J?"-0":f}function wo(o){if(o!=null){try{return ed.call(o)}catch{}try{return o+""}catch{}}return""}function L$(o,f){return Un(Nt,function(g){var A="_."+g[0];f&g[1]&&!Kh(o,A)&&o.push(A)}),o.sort()}function rO(o){if(o instanceof Xe)return o.clone();var f=new pi(o.__wrapped__,o.__chain__);return f.__actions__=bn(o.__actions__),f.__index__=o.__index__,f.__values__=o.__values__,f}function P$(o,f,g){(g?on(o,f,g):f===t)?f=1:f=sr(We(f),0);var A=o==null?0:o.length;if(!A||f<1)return[];for(var N=0,q=0,j=Y(od(A/f));N<A;)j[q++]=di(o,N,N+=f);return j}function C$(o){for(var f=-1,g=o==null?0:o.length,A=0,N=[];++f<g;){var q=o[f];q&&(N[A++]=q)}return N}function q$(){var o=arguments.length;if(!o)return[];for(var f=Y(o-1),g=arguments[0],A=o;A--;)f[A-1]=arguments[A];return ma($e(g)?bn(g):[g],Ir(f,1))}var R$=Je(function(o,f){return Ut(o)?$l(o,Ir(f,1,Ut,!0)):[]}),M$=Je(function(o,f){var g=mi(f);return Ut(g)&&(g=t),Ut(o)?$l(o,Ir(f,1,Ut,!0),Le(g,2)):[]}),D$=Je(function(o,f){var g=mi(f);return Ut(g)&&(g=t),Ut(o)?$l(o,Ir(f,1,Ut,!0),t,g):[]});function F$(o,f,g){var A=o==null?0:o.length;return A?(f=g||f===t?1:We(f),di(o,f<0?0:f,A)):[]}function j$(o,f,g){var A=o==null?0:o.length;return A?(f=g||f===t?1:We(f),f=A-f,di(o,0,f<0?0:f)):[]}function B$(o,f){return o&&o.length?yd(o,Le(f,3),!0,!0):[]}function $$(o,f){return o&&o.length?yd(o,Le(f,3),!0):[]}function V$(o,f,g,A){var N=o==null?0:o.length;return N?(g&&typeof g!="number"&&on(o,f,g)&&(g=0,A=N),q8(o,f,g,A)):[]}function nO(o,f,g){var A=o==null?0:o.length;if(!A)return-1;var N=g==null?0:We(g);return N<0&&(N=sr(A+N,0)),Qh(o,Le(f,3),N)}function iO(o,f,g){var A=o==null?0:o.length;if(!A)return-1;var N=A-1;return g!==t&&(N=We(g),N=g<0?sr(A+N,0):Wr(N,A-1)),Qh(o,Le(f,3),N,!0)}function sO(o){var f=o==null?0:o.length;return f?Ir(o,1):[]}function U$(o){var f=o==null?0:o.length;return f?Ir(o,J):[]}function W$(o,f){var g=o==null?0:o.length;return g?(f=f===t?1:We(f),Ir(o,f)):[]}function G$(o){for(var f=-1,g=o==null?0:o.length,A={};++f<g;){var N=o[f];es(A,N[0],N[1])}return A}function aO(o){return o&&o.length?o[0]:t}function H$(o,f,g){var A=o==null?0:o.length;if(!A)return-1;var N=g==null?0:We(g);return N<0&&(N=sr(A+N,0)),Lu(o,f,N)}function z$(o){var f=o==null?0:o.length;return f?di(o,0,-1):[]}var J$=Je(function(o){var f=It(o,tb);return f.length&&f[0]===o[0]?G0(f):[]}),K$=Je(function(o){var f=mi(o),g=It(o,tb);return f===mi(g)?f=t:g.pop(),g.length&&g[0]===o[0]?G0(g,Le(f,2)):[]}),Q$=Je(function(o){var f=mi(o),g=It(o,tb);return f=typeof f=="function"?f:t,f&&g.pop(),g.length&&g[0]===o[0]?G0(g,t,f):[]});function Y$(o,f){return o==null?"":z9.call(o,f)}function mi(o){var f=o==null?0:o.length;return f?o[f-1]:t}function X$(o,f,g){var A=o==null?0:o.length;if(!A)return-1;var N=A;return g!==t&&(N=We(g),N=N<0?sr(A+N,0):Wr(N,A-1)),f===f?L9(o,f,N):Qh(o,BT,N,!0)}function Z$(o,f){return o&&o.length?yE(o,We(f)):t}var eV=Je(oO);function oO(o,f){return o&&o.length&&f&&f.length?K0(o,f):o}function tV(o,f,g){return o&&o.length&&f&&f.length?K0(o,f,Le(g,2)):o}function rV(o,f,g){return o&&o.length&&f&&f.length?K0(o,f,t,g):o}var nV=Ls(function(o,f){var g=o==null?0:o.length,A=$0(o,f);return bE(o,It(f,function(N){return Ps(N,g)?+N:N}).sort(NE)),A});function iV(o,f){var g=[];if(!(o&&o.length))return g;var A=-1,N=[],q=o.length;for(f=Le(f,3);++A<q;){var j=o[A];f(j,A,o)&&(g.push(j),N.push(A))}return bE(o,N),g}function mb(o){return o==null?o:Y9.call(o)}function sV(o,f,g){var A=o==null?0:o.length;return A?(g&&typeof g!="number"&&on(o,f,g)?(f=0,g=A):(f=f==null?0:We(f),g=g===t?A:We(g)),di(o,f,g)):[]}function aV(o,f){return gd(o,f)}function oV(o,f,g){return X0(o,f,Le(g,2))}function uV(o,f){var g=o==null?0:o.length;if(g){var A=gd(o,f);if(A<g&&Mi(o[A],f))return A}return-1}function cV(o,f){return gd(o,f,!0)}function lV(o,f,g){return X0(o,f,Le(g,2),!0)}function fV(o,f){var g=o==null?0:o.length;if(g){var A=gd(o,f,!0)-1;if(Mi(o[A],f))return A}return-1}function pV(o){return o&&o.length?wE(o):[]}function hV(o,f){return o&&o.length?wE(o,Le(f,2)):[]}function dV(o){var f=o==null?0:o.length;return f?di(o,1,f):[]}function mV(o,f,g){return o&&o.length?(f=g||f===t?1:We(f),di(o,0,f<0?0:f)):[]}function gV(o,f,g){var A=o==null?0:o.length;return A?(f=g||f===t?1:We(f),f=A-f,di(o,f<0?0:f,A)):[]}function yV(o,f){return o&&o.length?yd(o,Le(f,3),!1,!0):[]}function _V(o,f){return o&&o.length?yd(o,Le(f,3)):[]}var vV=Je(function(o){return ba(Ir(o,1,Ut,!0))}),bV=Je(function(o){var f=mi(o);return Ut(f)&&(f=t),ba(Ir(o,1,Ut,!0),Le(f,2))}),SV=Je(function(o){var f=mi(o);return f=typeof f=="function"?f:t,ba(Ir(o,1,Ut,!0),t,f)});function wV(o){return o&&o.length?ba(o):[]}function xV(o,f){return o&&o.length?ba(o,Le(f,2)):[]}function kV(o,f){return f=typeof f=="function"?f:t,o&&o.length?ba(o,t,f):[]}function gb(o){if(!(o&&o.length))return[];var f=0;return o=da(o,function(g){if(Ut(g))return f=sr(g.length,f),!0}),C0(f,function(g){return It(o,N0(g))})}function uO(o,f){if(!(o&&o.length))return[];var g=gb(o);return f==null?g:It(g,function(A){return Vn(f,t,A)})}var AV=Je(function(o,f){return Ut(o)?$l(o,f):[]}),IV=Je(function(o){return eb(da(o,Ut))}),TV=Je(function(o){var f=mi(o);return Ut(f)&&(f=t),eb(da(o,Ut),Le(f,2))}),EV=Je(function(o){var f=mi(o);return f=typeof f=="function"?f:t,eb(da(o,Ut),t,f)}),OV=Je(gb);function NV(o,f){return IE(o||[],f||[],Bl)}function LV(o,f){return IE(o||[],f||[],Wl)}var PV=Je(function(o){var f=o.length,g=f>1?o[f-1]:t;return g=typeof g=="function"?(o.pop(),g):t,uO(o,g)});function cO(o){var f=C(o);return f.__chain__=!0,f}function CV(o,f){return f(o),o}function Id(o,f){return f(o)}var qV=Ls(function(o){var f=o.length,g=f?o[0]:0,A=this.__wrapped__,N=function(q){return $0(q,o)};return f>1||this.__actions__.length||!(A instanceof Xe)||!Ps(g)?this.thru(N):(A=A.slice(g,+g+(f?1:0)),A.__actions__.push({func:Id,args:[N],thisArg:t}),new pi(A,this.__chain__).thru(function(q){return f&&!q.length&&q.push(t),q}))});function RV(){return cO(this)}function MV(){return new pi(this.value(),this.__chain__)}function DV(){this.__values__===t&&(this.__values__=xO(this.value()));var o=this.__index__>=this.__values__.length,f=o?t:this.__values__[this.__index__++];return{done:o,value:f}}function FV(){return this}function jV(o){for(var f,g=this;g instanceof fd;){var A=rO(g);A.__index__=0,A.__values__=t,f?N.__wrapped__=A:f=A;var N=A;g=g.__wrapped__}return N.__wrapped__=o,f}function BV(){var o=this.__wrapped__;if(o instanceof Xe){var f=o;return this.__actions__.length&&(f=new Xe(this)),f=f.reverse(),f.__actions__.push({func:Id,args:[mb],thisArg:t}),new pi(f,this.__chain__)}return this.thru(mb)}function $V(){return AE(this.__wrapped__,this.__actions__)}var VV=_d(function(o,f,g){ct.call(o,g)?++o[g]:es(o,g,1)});function UV(o,f,g){var A=$e(o)?FT:C8;return g&&on(o,f,g)&&(f=t),A(o,Le(f,3))}function WV(o,f){var g=$e(o)?da:uE;return g(o,Le(f,3))}var GV=ME(nO),HV=ME(iO);function zV(o,f){return Ir(Td(o,f),1)}function JV(o,f){return Ir(Td(o,f),J)}function KV(o,f,g){return g=g===t?1:We(g),Ir(Td(o,f),g)}function lO(o,f){var g=$e(o)?Un:va;return g(o,Le(f,3))}function fO(o,f){var g=$e(o)?d9:oE;return g(o,Le(f,3))}var QV=_d(function(o,f,g){ct.call(o,g)?o[g].push(f):es(o,g,[f])});function YV(o,f,g,A){o=Sn(o)?o:Vu(o),g=g&&!A?We(g):0;var N=o.length;return g<0&&(g=sr(N+g,0)),Pd(o)?g<=N&&o.indexOf(f,g)>-1:!!N&&Lu(o,f,g)>-1}var XV=Je(function(o,f,g){var A=-1,N=typeof f=="function",q=Sn(o)?Y(o.length):[];return va(o,function(j){q[++A]=N?Vn(f,j,g):Vl(j,f,g)}),q}),ZV=_d(function(o,f,g){es(o,g,f)});function Td(o,f){var g=$e(o)?It:dE;return g(o,Le(f,3))}function eU(o,f,g,A){return o==null?[]:($e(f)||(f=f==null?[]:[f]),g=A?t:g,$e(g)||(g=g==null?[]:[g]),_E(o,f,g))}var tU=_d(function(o,f,g){o[g?0:1].push(f)},function(){return[[],[]]});function rU(o,f,g){var A=$e(o)?E0:VT,N=arguments.length<3;return A(o,Le(f,4),g,N,va)}function nU(o,f,g){var A=$e(o)?m9:VT,N=arguments.length<3;return A(o,Le(f,4),g,N,oE)}function iU(o,f){var g=$e(o)?da:uE;return g(o,Nd(Le(f,3)))}function sU(o){var f=$e(o)?nE:Y8;return f(o)}function aU(o,f,g){(g?on(o,f,g):f===t)?f=1:f=We(f);var A=$e(o)?E8:X8;return A(o,f)}function oU(o){var f=$e(o)?O8:e$;return f(o)}function uU(o){if(o==null)return 0;if(Sn(o))return Pd(o)?Cu(o):o.length;var f=Gr(o);return f==Vr||f==Ur?o.size:z0(o).length}function cU(o,f,g){var A=$e(o)?O0:t$;return g&&on(o,f,g)&&(f=t),A(o,Le(f,3))}var lU=Je(function(o,f){if(o==null)return[];var g=f.length;return g>1&&on(o,f[0],f[1])?f=[]:g>2&&on(f[0],f[1],f[2])&&(f=[f[0]]),_E(o,Ir(f,1),[])}),Ed=W9||function(){return yr.Date.now()};function fU(o,f){if(typeof f!="function")throw new fi(i);return o=We(o),function(){if(--o<1)return f.apply(this,arguments)}}function pO(o,f,g){return f=g?t:f,f=o&&f==null?o.length:f,Ns(o,R,t,t,t,t,f)}function hO(o,f){var g;if(typeof f!="function")throw new fi(i);return o=We(o),function(){return--o>0&&(g=f.apply(this,arguments)),o<=1&&(f=t),g}}var yb=Je(function(o,f,g){var A=x;if(g.length){var N=ga(g,Bu(yb));A|=S}return Ns(o,A,f,g,N)}),dO=Je(function(o,f,g){var A=x|k;if(g.length){var N=ga(g,Bu(dO));A|=S}return Ns(f,A,o,g,N)});function mO(o,f,g){f=g?t:f;var A=Ns(o,I,t,t,t,t,t,f);return A.placeholder=mO.placeholder,A}function gO(o,f,g){f=g?t:f;var A=Ns(o,T,t,t,t,t,t,f);return A.placeholder=gO.placeholder,A}function yO(o,f,g){var A,N,q,j,V,G,ne=0,ie=!1,se=!1,me=!0;if(typeof o!="function")throw new fi(i);f=gi(f)||0,Lt(g)&&(ie=!!g.leading,se="maxWait"in g,q=se?sr(gi(g.maxWait)||0,f):q,me="trailing"in g?!!g.trailing:me);function Ie(Wt){var Di=A,Rs=N;return A=N=t,ne=Wt,j=o.apply(Rs,Di),j}function Pe(Wt){return ne=Wt,V=zl(Qe,f),ie?Ie(Wt):j}function ze(Wt){var Di=Wt-G,Rs=Wt-ne,DO=f-Di;return se?Wr(DO,q-Rs):DO}function Ne(Wt){var Di=Wt-G,Rs=Wt-ne;return G===t||Di>=f||Di<0||se&&Rs>=q}function Qe(){var Wt=Ed();if(Ne(Wt))return tt(Wt);V=zl(Qe,ze(Wt))}function tt(Wt){return V=t,me&&A?Ie(Wt):(A=N=t,j)}function zn(){V!==t&&TE(V),ne=0,A=G=N=V=t}function un(){return V===t?j:tt(Ed())}function Jn(){var Wt=Ed(),Di=Ne(Wt);if(A=arguments,N=this,G=Wt,Di){if(V===t)return Pe(G);if(se)return TE(V),V=zl(Qe,f),Ie(G)}return V===t&&(V=zl(Qe,f)),j}return Jn.cancel=zn,Jn.flush=un,Jn}var pU=Je(function(o,f){return aE(o,1,f)}),hU=Je(function(o,f,g){return aE(o,gi(f)||0,g)});function dU(o){return Ns(o,F)}function Od(o,f){if(typeof o!="function"||f!=null&&typeof f!="function")throw new fi(i);var g=function(){var A=arguments,N=f?f.apply(this,A):A[0],q=g.cache;if(q.has(N))return q.get(N);var j=o.apply(this,A);return g.cache=q.set(N,j)||q,j};return g.cache=new(Od.Cache||Os),g}Od.Cache=Os;function Nd(o){if(typeof o!="function")throw new fi(i);return function(){var f=arguments;switch(f.length){case 0:return!o.call(this);case 1:return!o.call(this,f[0]);case 2:return!o.call(this,f[0],f[1]);case 3:return!o.call(this,f[0],f[1],f[2])}return!o.apply(this,f)}}function mU(o){return hO(2,o)}var gU=r$(function(o,f){f=f.length==1&&$e(f[0])?It(f[0],Wn(Le())):It(Ir(f,1),Wn(Le()));var g=f.length;return Je(function(A){for(var N=-1,q=Wr(A.length,g);++N<q;)A[N]=f[N].call(this,A[N]);return Vn(o,this,A)})}),_b=Je(function(o,f){var g=ga(f,Bu(_b));return Ns(o,S,t,f,g)}),_O=Je(function(o,f){var g=ga(f,Bu(_O));return Ns(o,L,t,f,g)}),yU=Ls(function(o,f){return Ns(o,M,t,t,t,f)});function _U(o,f){if(typeof o!="function")throw new fi(i);return f=f===t?f:We(f),Je(o,f)}function vU(o,f){if(typeof o!="function")throw new fi(i);return f=f==null?0:sr(We(f),0),Je(function(g){var A=g[f],N=wa(g,0,f);return A&&ma(N,A),Vn(o,this,N)})}function bU(o,f,g){var A=!0,N=!0;if(typeof o!="function")throw new fi(i);return Lt(g)&&(A="leading"in g?!!g.leading:A,N="trailing"in g?!!g.trailing:N),yO(o,f,{leading:A,maxWait:f,trailing:N})}function SU(o){return pO(o,1)}function wU(o,f){return _b(rb(f),o)}function xU(){if(!arguments.length)return[];var o=arguments[0];return $e(o)?o:[o]}function kU(o){return hi(o,h)}function AU(o,f){return f=typeof f=="function"?f:t,hi(o,h,f)}function IU(o){return hi(o,d|h)}function TU(o,f){return f=typeof f=="function"?f:t,hi(o,d|h,f)}function EU(o,f){return f==null||sE(o,f,_r(f))}function Mi(o,f){return o===f||o!==o&&f!==f}var OU=wd(W0),NU=wd(function(o,f){return o>=f}),xo=fE((function(){return arguments})())?fE:function(o){return Mt(o)&&ct.call(o,"callee")&&!YT.call(o,"callee")},$e=Y.isArray,LU=PT?Wn(PT):j8;function Sn(o){return o!=null&&Ld(o.length)&&!Cs(o)}function Ut(o){return Mt(o)&&Sn(o)}function PU(o){return o===!0||o===!1||Mt(o)&&an(o)==Bn}var xa=H9||Nb,CU=CT?Wn(CT):B8;function qU(o){return Mt(o)&&o.nodeType===1&&!Jl(o)}function RU(o){if(o==null)return!0;if(Sn(o)&&($e(o)||typeof o=="string"||typeof o.splice=="function"||xa(o)||$u(o)||xo(o)))return!o.length;var f=Gr(o);if(f==Vr||f==Ur)return!o.size;if(Hl(o))return!z0(o).length;for(var g in o)if(ct.call(o,g))return!1;return!0}function MU(o,f){return Ul(o,f)}function DU(o,f,g){g=typeof g=="function"?g:t;var A=g?g(o,f):t;return A===t?Ul(o,f,t,g):!!A}function vb(o){if(!Mt(o))return!1;var f=an(o);return f==oo||f==gl||typeof o.message=="string"&&typeof o.name=="string"&&!Jl(o)}function FU(o){return typeof o=="number"&&ZT(o)}function Cs(o){if(!Lt(o))return!1;var f=an(o);return f==sa||f==yl||f==Ss||f==wu}function vO(o){return typeof o=="number"&&o==We(o)}function Ld(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=te}function Lt(o){var f=typeof o;return o!=null&&(f=="object"||f=="function")}function Mt(o){return o!=null&&typeof o=="object"}var bO=qT?Wn(qT):V8;function jU(o,f){return o===f||H0(o,f,cb(f))}function BU(o,f,g){return g=typeof g=="function"?g:t,H0(o,f,cb(f),g)}function $U(o){return SO(o)&&o!=+o}function VU(o){if(A$(o))throw new Fe(n);return pE(o)}function UU(o){return o===null}function WU(o){return o==null}function SO(o){return typeof o=="number"||Mt(o)&&an(o)==aa}function Jl(o){if(!Mt(o)||an(o)!=rn)return!1;var f=id(o);if(f===null)return!0;var g=ct.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&ed.call(g)==B9}var bb=RT?Wn(RT):U8;function GU(o){return vO(o)&&o>=-te&&o<=te}var wO=MT?Wn(MT):W8;function Pd(o){return typeof o=="string"||!$e(o)&&Mt(o)&&an(o)==ks}function Hn(o){return typeof o=="symbol"||Mt(o)&&an(o)==_n}var $u=DT?Wn(DT):G8;function HU(o){return o===t}function zU(o){return Mt(o)&&Gr(o)==oa}function JU(o){return Mt(o)&&an(o)==kh}var KU=wd(J0),QU=wd(function(o,f){return o<=f});function xO(o){if(!o)return[];if(Sn(o))return Pd(o)?Ci(o):bn(o);if(Rl&&o[Rl])return E9(o[Rl]());var f=Gr(o),g=f==Vr?R0:f==Ur?Yh:Vu;return g(o)}function qs(o){if(!o)return o===0?o:0;if(o=gi(o),o===J||o===-J){var f=o<0?-1:1;return f*ue}return o===o?o:0}function We(o){var f=qs(o),g=f%1;return f===f?g?f-g:f:0}function kO(o){return o?vo(We(o),0,ce):0}function gi(o){if(typeof o=="number")return o;if(Hn(o))return fe;if(Lt(o)){var f=typeof o.valueOf=="function"?o.valueOf():o;o=Lt(f)?f+"":f}if(typeof o!="string")return o===0?o:+o;o=UT(o);var g=_0.test(o);return g||qh.test(o)?ha(o.slice(2),g?2:8):y0.test(o)?fe:+o}function AO(o){return rs(o,wn(o))}function YU(o){return o?vo(We(o),-te,te):o===0?o:0}function lt(o){return o==null?"":Gn(o)}var XU=Fu(function(o,f){if(Hl(f)||Sn(f)){rs(f,_r(f),o);return}for(var g in f)ct.call(f,g)&&Bl(o,g,f[g])}),IO=Fu(function(o,f){rs(f,wn(f),o)}),TO=Fu(function(o,f,g,A){rs(f,wn(f),o,A)}),Sb=Fu(function(o,f,g,A){rs(f,_r(f),o,A)}),ZU=Ls($0);function eW(o,f){var g=Du(o);return f==null?g:iE(g,f)}var tW=Je(function(o,f){o=yt(o);var g=-1,A=f.length,N=A>2?f[2]:t;for(N&&on(f[0],f[1],N)&&(A=1);++g<A;)for(var q=f[g],j=wn(q),V=-1,G=j.length;++V<G;){var ne=j[V],ie=o[ne];(ie===t||Mi(ie,qu[ne])&&!ct.call(o,ne))&&(o[ne]=q[ne])}return o}),rW=Je(function(o){return o.push(t,UE),Vn(EO,t,o)});function nW(o,f){return jT(o,Le(f,3),ts)}function iW(o,f){return jT(o,Le(f,3),U0)}function sW(o,f){return o==null?o:V0(o,Le(f,3),wn)}function aW(o,f){return o==null?o:cE(o,Le(f,3),wn)}function oW(o,f){return o&&ts(o,Le(f,3))}function uW(o,f){return o&&U0(o,Le(f,3))}function cW(o){return o==null?[]:dd(o,_r(o))}function lW(o){return o==null?[]:dd(o,wn(o))}function wb(o,f,g){var A=o==null?t:bo(o,f);return A===t?g:A}function fW(o,f){return o!=null&&HE(o,f,R8)}function xb(o,f){return o!=null&&HE(o,f,M8)}var pW=FE(function(o,f,g){f!=null&&typeof f.toString!="function"&&(f=td.call(f)),o[f]=g},Ab(xn)),hW=FE(function(o,f,g){f!=null&&typeof f.toString!="function"&&(f=td.call(f)),ct.call(o,f)?o[f].push(g):o[f]=[g]},Le),dW=Je(Vl);function _r(o){return Sn(o)?rE(o):z0(o)}function wn(o){return Sn(o)?rE(o,!0):H8(o)}function mW(o,f){var g={};return f=Le(f,3),ts(o,function(A,N,q){es(g,f(A,N,q),A)}),g}function gW(o,f){var g={};return f=Le(f,3),ts(o,function(A,N,q){es(g,N,f(A,N,q))}),g}var yW=Fu(function(o,f,g){md(o,f,g)}),EO=Fu(function(o,f,g,A){md(o,f,g,A)}),_W=Ls(function(o,f){var g={};if(o==null)return g;var A=!1;f=It(f,function(q){return q=Sa(q,o),A||(A=q.length>1),q}),rs(o,ob(o),g),A&&(g=hi(g,d|m|h,h$));for(var N=f.length;N--;)Z0(g,f[N]);return g});function vW(o,f){return OO(o,Nd(Le(f)))}var bW=Ls(function(o,f){return o==null?{}:J8(o,f)});function OO(o,f){if(o==null)return{};var g=It(ob(o),function(A){return[A]});return f=Le(f),vE(o,g,function(A,N){return f(A,N[0])})}function SW(o,f,g){f=Sa(f,o);var A=-1,N=f.length;for(N||(N=1,o=t);++A<N;){var q=o==null?t:o[Ri(f[A])];q===t&&(A=N,q=g),o=Cs(q)?q.call(o):q}return o}function wW(o,f,g){return o==null?o:Wl(o,f,g)}function xW(o,f,g,A){return A=typeof A=="function"?A:t,o==null?o:Wl(o,f,g,A)}var NO=$E(_r),LO=$E(wn);function kW(o,f,g){var A=$e(o),N=A||xa(o)||$u(o);if(f=Le(f,4),g==null){var q=o&&o.constructor;N?g=A?new q:[]:Lt(o)?g=Cs(q)?Du(id(o)):{}:g={}}return(N?Un:ts)(o,function(j,V,G){return f(g,j,V,G)}),g}function AW(o,f){return o==null?!0:Z0(o,f)}function IW(o,f,g){return o==null?o:kE(o,f,rb(g))}function TW(o,f,g,A){return A=typeof A=="function"?A:t,o==null?o:kE(o,f,rb(g),A)}function Vu(o){return o==null?[]:q0(o,_r(o))}function EW(o){return o==null?[]:q0(o,wn(o))}function OW(o,f,g){return g===t&&(g=f,f=t),g!==t&&(g=gi(g),g=g===g?g:0),f!==t&&(f=gi(f),f=f===f?f:0),vo(gi(o),f,g)}function NW(o,f,g){return f=qs(f),g===t?(g=f,f=0):g=qs(g),o=gi(o),D8(o,f,g)}function LW(o,f,g){if(g&&typeof g!="boolean"&&on(o,f,g)&&(f=g=t),g===t&&(typeof f=="boolean"?(g=f,f=t):typeof o=="boolean"&&(g=o,o=t)),o===t&&f===t?(o=0,f=1):(o=qs(o),f===t?(f=o,o=0):f=qs(f)),o>f){var A=o;o=f,f=A}if(g||o%1||f%1){var N=eE();return Wr(o+N*(f-o+pa("1e-"+((N+"").length-1))),f)}return Q0(o,f)}var PW=ju(function(o,f,g){return f=f.toLowerCase(),o+(g?PO(f):f)});function PO(o){return kb(lt(o).toLowerCase())}function CO(o){return o=lt(o),o&&o.replace(Mh,x9).replace(O,"")}function CW(o,f,g){o=lt(o),f=Gn(f);var A=o.length;g=g===t?A:vo(We(g),0,A);var N=g;return g-=f.length,g>=0&&o.slice(g,N)==f}function qW(o){return o=lt(o),o&&ca.test(o)?o.replace(sn,k9):o}function RW(o){return o=lt(o),o&&lo.test(o)?o.replace(wl,"\\$&"):o}var MW=ju(function(o,f,g){return o+(g?"-":"")+f.toLowerCase()}),DW=ju(function(o,f,g){return o+(g?" ":"")+f.toLowerCase()}),FW=RE("toLowerCase");function jW(o,f,g){o=lt(o),f=We(f);var A=f?Cu(o):0;if(!f||A>=f)return o;var N=(f-A)/2;return Sd(ud(N),g)+o+Sd(od(N),g)}function BW(o,f,g){o=lt(o),f=We(f);var A=f?Cu(o):0;return f&&A<f?o+Sd(f-A,g):o}function $W(o,f,g){o=lt(o),f=We(f);var A=f?Cu(o):0;return f&&A<f?Sd(f-A,g)+o:o}function VW(o,f,g){return g||f==null?f=0:f&&(f=+f),Q9(lt(o).replace(Is,""),f||0)}function UW(o,f,g){return(g?on(o,f,g):f===t)?f=1:f=We(f),Y0(lt(o),f)}function WW(){var o=arguments,f=lt(o[0]);return o.length<3?f:f.replace(o[1],o[2])}var GW=ju(function(o,f,g){return o+(g?"_":"")+f.toLowerCase()});function HW(o,f,g){return g&&typeof g!="number"&&on(o,f,g)&&(f=g=t),g=g===t?ce:g>>>0,g?(o=lt(o),o&&(typeof f=="string"||f!=null&&!bb(f))&&(f=Gn(f),!f&&Pu(o))?wa(Ci(o),0,g):o.split(f,g)):[]}var zW=ju(function(o,f,g){return o+(g?" ":"")+kb(f)});function JW(o,f,g){return o=lt(o),g=g==null?0:vo(We(g),0,o.length),f=Gn(f),o.slice(g,g+f.length)==f}function KW(o,f,g){var A=C.templateSettings;g&&on(o,f,g)&&(f=t),o=lt(o),f=Sb({},f,A,VE);var N=Sb({},f.imports,A.imports,VE),q=_r(N),j=q0(N,q);Un(q,function(Ne){if(xl.test(Ne))throw new Fe(a)});var V,G,ne=0,ie=f.interpolate||fo,se="__p += '",me=M0((f.escape||fo).source+"|"+ie.source+"|"+(ie===ku?g0:fo).source+"|"+(f.evaluate||fo).source+"|$","g"),Ie="//# sourceURL="+(ct.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ce+"]")+`
1201
+ `;o.replace(me,function(Ne,Qe,tt,zn,un,Jn){return tt||(tt=zn),se+=o.slice(ne,Jn).replace(Dh,A9),Qe&&(V=!0,se+=`' +
1202
+ __e(`+Qe+`) +
1203
+ '`),un&&(G=!0,se+=`';
1204
+ `+un+`;
1205
+ __p += '`),tt&&(se+=`' +
1206
+ ((__t = (`+tt+`)) == null ? '' : __t) +
1207
+ '`),ne=Jn+Ne.length,Ne}),se+=`';
1208
+ `;var Pe=ct.call(f,"variable")&&f.variable;if(!Pe)se=`with (obj) {
1209
+ `+se+`
1210
+ }
1211
+ `;else if(xl.test(Pe))throw new Fe(s);se=(G?se.replace(Ah,""):se).replace(h0,"$1").replace(xu,"$1;"),se="function("+(Pe||"obj")+`) {
1212
+ `+(Pe?"":`obj || (obj = {});
1213
+ `)+"var __t, __p = ''"+(V?", __e = _.escape":"")+(G?`, __j = Array.prototype.join;
1214
+ function print() { __p += __j.call(arguments, '') }
1215
+ `:`;
1216
+ `)+se+`return __p
1217
+ }`;var ze=RO(function(){return st(q,Ie+"return "+se).apply(t,j)});if(ze.source=se,vb(ze))throw ze;return ze}function QW(o){return lt(o).toLowerCase()}function YW(o){return lt(o).toUpperCase()}function XW(o,f,g){if(o=lt(o),o&&(g||f===t))return UT(o);if(!o||!(f=Gn(f)))return o;var A=Ci(o),N=Ci(f),q=WT(A,N),j=GT(A,N)+1;return wa(A,q,j).join("")}function ZW(o,f,g){if(o=lt(o),o&&(g||f===t))return o.slice(0,zT(o)+1);if(!o||!(f=Gn(f)))return o;var A=Ci(o),N=GT(A,Ci(f))+1;return wa(A,0,N).join("")}function eG(o,f,g){if(o=lt(o),o&&(g||f===t))return o.replace(Is,"");if(!o||!(f=Gn(f)))return o;var A=Ci(o),N=WT(A,Ci(f));return wa(A,N).join("")}function tG(o,f){var g=X,A=H;if(Lt(f)){var N="separator"in f?f.separator:N;g="length"in f?We(f.length):g,A="omission"in f?Gn(f.omission):A}o=lt(o);var q=o.length;if(Pu(o)){var j=Ci(o);q=j.length}if(g>=q)return o;var V=g-Cu(A);if(V<1)return A;var G=j?wa(j,0,V).join(""):o.slice(0,V);if(N===t)return G+A;if(j&&(V+=G.length-V),bb(N)){if(o.slice(V).search(N)){var ne,ie=G;for(N.global||(N=M0(N.source,lt(Ph.exec(N))+"g")),N.lastIndex=0;ne=N.exec(ie);)var se=ne.index;G=G.slice(0,se===t?V:se)}}else if(o.indexOf(Gn(N),V)!=V){var me=G.lastIndexOf(N);me>-1&&(G=G.slice(0,me))}return G+A}function rG(o){return o=lt(o),o&&gt.test(o)?o.replace(nn,P9):o}var nG=ju(function(o,f,g){return o+(g?" ":"")+f.toUpperCase()}),kb=RE("toUpperCase");function qO(o,f,g){return o=lt(o),f=g?t:f,f===t?T9(o)?R9(o):_9(o):o.match(f)||[]}var RO=Je(function(o,f){try{return Vn(o,t,f)}catch(g){return vb(g)?g:new Fe(g)}}),iG=Ls(function(o,f){return Un(f,function(g){g=Ri(g),es(o,g,yb(o[g],o))}),o});function sG(o){var f=o==null?0:o.length,g=Le();return o=f?It(o,function(A){if(typeof A[1]!="function")throw new fi(i);return[g(A[0]),A[1]]}):[],Je(function(A){for(var N=-1;++N<f;){var q=o[N];if(Vn(q[0],this,A))return Vn(q[1],this,A)}})}function aG(o){return P8(hi(o,d))}function Ab(o){return function(){return o}}function oG(o,f){return o==null||o!==o?f:o}var uG=DE(),cG=DE(!0);function xn(o){return o}function Ib(o){return hE(typeof o=="function"?o:hi(o,d))}function lG(o){return mE(hi(o,d))}function fG(o,f){return gE(o,hi(f,d))}var pG=Je(function(o,f){return function(g){return Vl(g,o,f)}}),hG=Je(function(o,f){return function(g){return Vl(o,g,f)}});function Tb(o,f,g){var A=_r(f),N=dd(f,A);g==null&&!(Lt(f)&&(N.length||!A.length))&&(g=f,f=o,o=this,N=dd(f,_r(f)));var q=!(Lt(g)&&"chain"in g)||!!g.chain,j=Cs(o);return Un(N,function(V){var G=f[V];o[V]=G,j&&(o.prototype[V]=function(){var ne=this.__chain__;if(q||ne){var ie=o(this.__wrapped__),se=ie.__actions__=bn(this.__actions__);return se.push({func:G,args:arguments,thisArg:o}),ie.__chain__=ne,ie}return G.apply(o,ma([this.value()],arguments))})}),o}function dG(){return yr._===this&&(yr._=$9),this}function Eb(){}function mG(o){return o=We(o),Je(function(f){return yE(f,o)})}var gG=ib(It),yG=ib(FT),_G=ib(O0);function MO(o){return fb(o)?N0(Ri(o)):K8(o)}function vG(o){return function(f){return o==null?t:bo(o,f)}}var bG=jE(),SG=jE(!0);function Ob(){return[]}function Nb(){return!1}function wG(){return{}}function xG(){return""}function kG(){return!0}function AG(o,f){if(o=We(o),o<1||o>te)return[];var g=ce,A=Wr(o,ce);f=Le(f),o-=ce;for(var N=C0(A,f);++g<o;)f(g);return N}function IG(o){return $e(o)?It(o,Ri):Hn(o)?[o]:bn(tO(lt(o)))}function TG(o){var f=++j9;return lt(o)+f}var EG=bd(function(o,f){return o+f},0),OG=sb("ceil"),NG=bd(function(o,f){return o/f},1),LG=sb("floor");function PG(o){return o&&o.length?hd(o,xn,W0):t}function CG(o,f){return o&&o.length?hd(o,Le(f,2),W0):t}function qG(o){return $T(o,xn)}function RG(o,f){return $T(o,Le(f,2))}function MG(o){return o&&o.length?hd(o,xn,J0):t}function DG(o,f){return o&&o.length?hd(o,Le(f,2),J0):t}var FG=bd(function(o,f){return o*f},1),jG=sb("round"),BG=bd(function(o,f){return o-f},0);function $G(o){return o&&o.length?P0(o,xn):0}function VG(o,f){return o&&o.length?P0(o,Le(f,2)):0}return C.after=fU,C.ary=pO,C.assign=XU,C.assignIn=IO,C.assignInWith=TO,C.assignWith=Sb,C.at=ZU,C.before=hO,C.bind=yb,C.bindAll=iG,C.bindKey=dO,C.castArray=xU,C.chain=cO,C.chunk=P$,C.compact=C$,C.concat=q$,C.cond=sG,C.conforms=aG,C.constant=Ab,C.countBy=VV,C.create=eW,C.curry=mO,C.curryRight=gO,C.debounce=yO,C.defaults=tW,C.defaultsDeep=rW,C.defer=pU,C.delay=hU,C.difference=R$,C.differenceBy=M$,C.differenceWith=D$,C.drop=F$,C.dropRight=j$,C.dropRightWhile=B$,C.dropWhile=$$,C.fill=V$,C.filter=WV,C.flatMap=zV,C.flatMapDeep=JV,C.flatMapDepth=KV,C.flatten=sO,C.flattenDeep=U$,C.flattenDepth=W$,C.flip=dU,C.flow=uG,C.flowRight=cG,C.fromPairs=G$,C.functions=cW,C.functionsIn=lW,C.groupBy=QV,C.initial=z$,C.intersection=J$,C.intersectionBy=K$,C.intersectionWith=Q$,C.invert=pW,C.invertBy=hW,C.invokeMap=XV,C.iteratee=Ib,C.keyBy=ZV,C.keys=_r,C.keysIn=wn,C.map=Td,C.mapKeys=mW,C.mapValues=gW,C.matches=lG,C.matchesProperty=fG,C.memoize=Od,C.merge=yW,C.mergeWith=EO,C.method=pG,C.methodOf=hG,C.mixin=Tb,C.negate=Nd,C.nthArg=mG,C.omit=_W,C.omitBy=vW,C.once=mU,C.orderBy=eU,C.over=gG,C.overArgs=gU,C.overEvery=yG,C.overSome=_G,C.partial=_b,C.partialRight=_O,C.partition=tU,C.pick=bW,C.pickBy=OO,C.property=MO,C.propertyOf=vG,C.pull=eV,C.pullAll=oO,C.pullAllBy=tV,C.pullAllWith=rV,C.pullAt=nV,C.range=bG,C.rangeRight=SG,C.rearg=yU,C.reject=iU,C.remove=iV,C.rest=_U,C.reverse=mb,C.sampleSize=aU,C.set=wW,C.setWith=xW,C.shuffle=oU,C.slice=sV,C.sortBy=lU,C.sortedUniq=pV,C.sortedUniqBy=hV,C.split=HW,C.spread=vU,C.tail=dV,C.take=mV,C.takeRight=gV,C.takeRightWhile=yV,C.takeWhile=_V,C.tap=CV,C.throttle=bU,C.thru=Id,C.toArray=xO,C.toPairs=NO,C.toPairsIn=LO,C.toPath=IG,C.toPlainObject=AO,C.transform=kW,C.unary=SU,C.union=vV,C.unionBy=bV,C.unionWith=SV,C.uniq=wV,C.uniqBy=xV,C.uniqWith=kV,C.unset=AW,C.unzip=gb,C.unzipWith=uO,C.update=IW,C.updateWith=TW,C.values=Vu,C.valuesIn=EW,C.without=AV,C.words=qO,C.wrap=wU,C.xor=IV,C.xorBy=TV,C.xorWith=EV,C.zip=OV,C.zipObject=NV,C.zipObjectDeep=LV,C.zipWith=PV,C.entries=NO,C.entriesIn=LO,C.extend=IO,C.extendWith=TO,Tb(C,C),C.add=EG,C.attempt=RO,C.camelCase=PW,C.capitalize=PO,C.ceil=OG,C.clamp=OW,C.clone=kU,C.cloneDeep=IU,C.cloneDeepWith=TU,C.cloneWith=AU,C.conformsTo=EU,C.deburr=CO,C.defaultTo=oG,C.divide=NG,C.endsWith=CW,C.eq=Mi,C.escape=qW,C.escapeRegExp=RW,C.every=UV,C.find=GV,C.findIndex=nO,C.findKey=nW,C.findLast=HV,C.findLastIndex=iO,C.findLastKey=iW,C.floor=LG,C.forEach=lO,C.forEachRight=fO,C.forIn=sW,C.forInRight=aW,C.forOwn=oW,C.forOwnRight=uW,C.get=wb,C.gt=OU,C.gte=NU,C.has=fW,C.hasIn=xb,C.head=aO,C.identity=xn,C.includes=YV,C.indexOf=H$,C.inRange=NW,C.invoke=dW,C.isArguments=xo,C.isArray=$e,C.isArrayBuffer=LU,C.isArrayLike=Sn,C.isArrayLikeObject=Ut,C.isBoolean=PU,C.isBuffer=xa,C.isDate=CU,C.isElement=qU,C.isEmpty=RU,C.isEqual=MU,C.isEqualWith=DU,C.isError=vb,C.isFinite=FU,C.isFunction=Cs,C.isInteger=vO,C.isLength=Ld,C.isMap=bO,C.isMatch=jU,C.isMatchWith=BU,C.isNaN=$U,C.isNative=VU,C.isNil=WU,C.isNull=UU,C.isNumber=SO,C.isObject=Lt,C.isObjectLike=Mt,C.isPlainObject=Jl,C.isRegExp=bb,C.isSafeInteger=GU,C.isSet=wO,C.isString=Pd,C.isSymbol=Hn,C.isTypedArray=$u,C.isUndefined=HU,C.isWeakMap=zU,C.isWeakSet=JU,C.join=Y$,C.kebabCase=MW,C.last=mi,C.lastIndexOf=X$,C.lowerCase=DW,C.lowerFirst=FW,C.lt=KU,C.lte=QU,C.max=PG,C.maxBy=CG,C.mean=qG,C.meanBy=RG,C.min=MG,C.minBy=DG,C.stubArray=Ob,C.stubFalse=Nb,C.stubObject=wG,C.stubString=xG,C.stubTrue=kG,C.multiply=FG,C.nth=Z$,C.noConflict=dG,C.noop=Eb,C.now=Ed,C.pad=jW,C.padEnd=BW,C.padStart=$W,C.parseInt=VW,C.random=LW,C.reduce=rU,C.reduceRight=nU,C.repeat=UW,C.replace=WW,C.result=SW,C.round=jG,C.runInContext=U,C.sample=sU,C.size=uU,C.snakeCase=GW,C.some=cU,C.sortedIndex=aV,C.sortedIndexBy=oV,C.sortedIndexOf=uV,C.sortedLastIndex=cV,C.sortedLastIndexBy=lV,C.sortedLastIndexOf=fV,C.startCase=zW,C.startsWith=JW,C.subtract=BG,C.sum=$G,C.sumBy=VG,C.template=KW,C.times=AG,C.toFinite=qs,C.toInteger=We,C.toLength=kO,C.toLower=QW,C.toNumber=gi,C.toSafeInteger=YU,C.toString=lt,C.toUpper=YW,C.trim=XW,C.trimEnd=ZW,C.trimStart=eG,C.truncate=tG,C.unescape=rG,C.uniqueId=TG,C.upperCase=nG,C.upperFirst=kb,C.each=lO,C.eachRight=fO,C.first=aO,Tb(C,(function(){var o={};return ts(C,function(f,g){ct.call(C.prototype,g)||(o[g]=f)}),o})(),{chain:!1}),C.VERSION=e,Un(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){C[o].placeholder=C}),Un(["drop","take"],function(o,f){Xe.prototype[o]=function(g){g=g===t?1:sr(We(g),0);var A=this.__filtered__&&!f?new Xe(this):this.clone();return A.__filtered__?A.__takeCount__=Wr(g,A.__takeCount__):A.__views__.push({size:Wr(g,ce),type:o+(A.__dir__<0?"Right":"")}),A},Xe.prototype[o+"Right"]=function(g){return this.reverse()[o](g).reverse()}}),Un(["filter","map","takeWhile"],function(o,f){var g=f+1,A=g==Z||g==W;Xe.prototype[o]=function(N){var q=this.clone();return q.__iteratees__.push({iteratee:Le(N,3),type:g}),q.__filtered__=q.__filtered__||A,q}}),Un(["head","last"],function(o,f){var g="take"+(f?"Right":"");Xe.prototype[o]=function(){return this[g](1).value()[0]}}),Un(["initial","tail"],function(o,f){var g="drop"+(f?"":"Right");Xe.prototype[o]=function(){return this.__filtered__?new Xe(this):this[g](1)}}),Xe.prototype.compact=function(){return this.filter(xn)},Xe.prototype.find=function(o){return this.filter(o).head()},Xe.prototype.findLast=function(o){return this.reverse().find(o)},Xe.prototype.invokeMap=Je(function(o,f){return typeof o=="function"?new Xe(this):this.map(function(g){return Vl(g,o,f)})}),Xe.prototype.reject=function(o){return this.filter(Nd(Le(o)))},Xe.prototype.slice=function(o,f){o=We(o);var g=this;return g.__filtered__&&(o>0||f<0)?new Xe(g):(o<0?g=g.takeRight(-o):o&&(g=g.drop(o)),f!==t&&(f=We(f),g=f<0?g.dropRight(-f):g.take(f-o)),g)},Xe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Xe.prototype.toArray=function(){return this.take(ce)},ts(Xe.prototype,function(o,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),A=/^(?:head|last)$/.test(f),N=C[A?"take"+(f=="last"?"Right":""):f],q=A||/^find/.test(f);N&&(C.prototype[f]=function(){var j=this.__wrapped__,V=A?[1]:arguments,G=j instanceof Xe,ne=V[0],ie=G||$e(j),se=function(Qe){var tt=N.apply(C,ma([Qe],V));return A&&me?tt[0]:tt};ie&&g&&typeof ne=="function"&&ne.length!=1&&(G=ie=!1);var me=this.__chain__,Ie=!!this.__actions__.length,Pe=q&&!me,ze=G&&!Ie;if(!q&&ie){j=ze?j:new Xe(this);var Ne=o.apply(j,V);return Ne.__actions__.push({func:Id,args:[se],thisArg:t}),new pi(Ne,me)}return Pe&&ze?o.apply(this,V):(Ne=this.thru(se),Pe?A?Ne.value()[0]:Ne.value():Ne)})}),Un(["pop","push","shift","sort","splice","unshift"],function(o){var f=Xh[o],g=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",A=/^(?:pop|shift)$/.test(o);C.prototype[o]=function(){var N=arguments;if(A&&!this.__chain__){var q=this.value();return f.apply($e(q)?q:[],N)}return this[g](function(j){return f.apply($e(j)?j:[],N)})}}),ts(Xe.prototype,function(o,f){var g=C[f];if(g){var A=g.name+"";ct.call(Mu,A)||(Mu[A]=[]),Mu[A].push({name:f,func:g})}}),Mu[vd(t,k).name]=[{name:"wrapper",func:t}],Xe.prototype.clone=n8,Xe.prototype.reverse=i8,Xe.prototype.value=s8,C.prototype.at=qV,C.prototype.chain=RV,C.prototype.commit=MV,C.prototype.next=DV,C.prototype.plant=jV,C.prototype.reverse=BV,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=$V,C.prototype.first=C.prototype.head,Rl&&(C.prototype[Rl]=FV),C}),ya=M9();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(yr._=ya,define(function(){return ya})):mo?((mo.exports=ya)._=ya,A0._=ya):yr._=ya}).call(zc)});var aj=P(z_=>{"use strict";b();Object.defineProperty(z_,"__esModule",{value:!0});z_.VariableName=void 0;var Xue=Ge(),$k=de(),H_=Bk(),Zue=t=>{let e=(0,H_.camelCase)(t);return e.charAt(0).toUpperCase()+e.slice(1)},ece=t=>t.name==="assign"&&typeof t.markup!="string",tce=t=>t.type==Xue.NodeTypes.LiquidTag&&t.name==="capture"&&typeof t.markup!="string",rce={camelCase:H_.camelCase,PascalCase:Zue,snake_case:H_.snakeCase,"kebab-case":H_.kebabCase},nce={format:$k.SchemaProp.string("snake_case")},sj=t=>t.replace(/[-_]?\d[-_]?/g,"");z_.VariableName={meta:{code:"VariableName",name:"Invalid variable naming format",docs:{description:"This check is aimed at using certain variable naming conventions",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/variable-name",recommended:!0},type:$k.SourceCodeType.LiquidHtml,severity:$k.Severity.WARNING,schema:nce,targets:[]},create(t){let e=n=>{if(!n.markup.name)return{valid:!1};let i=rce[t.settings.format],s=i(n.markup.name);return{valid:sj(n.markup.name)===sj(s),suggestion:s}},r=n=>t.report({message:`The variable '${n.markup.name}' uses wrong naming format`,startIndex:n.markup.position.start,endIndex:n.markup.position.end,suggest:[{message:`Change variable '${n.markup.name}' to '${e(n).suggestion}'`,fix:i=>{let{position:s,name:a,source:u}=n.markup;return i.replace(s.start,s.end,u.slice(s.start,s.end).replace(a,e(n).suggestion))}}]});return{async LiquidTag(n){(ece(n)||tce(n)&&n.markup.name)&&(e(n).valid||r(n))}}}}});var oj=P(J_=>{"use strict";b();Object.defineProperty(J_,"__esModule",{value:!0});J_.AppBlockMissingSchema=void 0;var Vk=de();J_.AppBlockMissingSchema={meta:{code:"AppBlockMissingSchema",name:"Missing schema definitions in theme app extensions app blocks should be avoided",docs:{description:"Report missing schema definitions in theme app extensions app blocks",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/app-block-missing-schema"},severity:Vk.Severity.ERROR,type:Vk.SourceCodeType.LiquidHtml,schema:{},targets:[Vk.ConfigTarget.ThemeAppExtension]},create(t){let e=!1;return t.toRelativePath(t.file.uri).startsWith("blocks/")?{async LiquidRawTag(n){n.name=="schema"&&(e=!0)},async onCodePathEnd(){e||t.report({message:"The schema does not exist",startIndex:0,endIndex:0})}}:{}}}});var uj=P(K_=>{"use strict";b();Object.defineProperty(K_,"__esModule",{value:!0});K_.UniqueSettingIds=void 0;var Ba=de();K_.UniqueSettingIds={meta:{code:"UniqueSettingId",name:"Prevent duplicate Ids in setting_schema",docs:{description:"This check is aimed at eliminating duplicate Ids in settings_schema.json",recommended:!0},type:Ba.SourceCodeType.JSON,severity:Ba.Severity.ERROR,schema:{},targets:[]},create(t){return{async onCodePathEnd(e){if((0,Ba.isArrayNode)(e.ast)){let r=[];for(let s of e.ast.children)if((0,Ba.isObjectNode)(s)&&s.children){let a=s.children.find(u=>u.key.value==="settings");if(a&&a.value&&(0,Ba.isArrayNode)(a.value)){for(let u of a.value.children)if((0,Ba.isObjectNode)(u)&&u.children){let c=u.children.find(p=>p.key.value==="id");(0,Ba.isPropertyNode)(c)&&r.push(c)}}}let n=new Map;for(let s of r)if((0,Ba.isLiteralNode)(s.value)){let a=s.value.value;typeof a=="string"&&(n.has(a)||n.set(a,[]),n.get(a).push(s))}let i=Array.from(n.entries()).filter(([s,a])=>a.length>1);if(i.length>0)for(let[s,a]of i){let u=a[a.length-1];t.report({message:`Duplicate setting id found: "${s}"`,startIndex:u.loc.start.offset,endIndex:u.loc.end.offset})}}}}}}});var lj=P(su=>{"use strict";b();Object.defineProperty(su,"__esModule",{value:!0});su.recommended=su.allChecks=void 0;var ice=de(),sce=nD(),ace=aD(),oce=uD(),uce=lD(),cce=pD(),lce=dD(),fce=_D(),pce=bD(),hce=xD(),dce=AD(),mce=TD(),gce=qD(),yce=BD(),_ce=VD(),vce=WD(),bce=YD(),Sce=eF(),wce=rF(),xce=aF(),kce=uF(),Ace=dF(),Ice=gF(),Tce=vF(),Ece=YF(),Oce=e3(),Nce=r3(),Lce=i3(),Pce=a3(),Cce=u3(),qce=l3(),Rce=h3(),Mce=_3(),Dce=S3(),Fce=x3(),jce=I3(),Bce=E3(),$ce=L3(),Vce=C3(),Uce=M3(),Wce=V3(),Gce=Q3(),Hce=X3(),zce=t4(),Jce=n4(),Kce=s4(),Qce=o4(),Yce=f4(),Xce=h4(),Zce=m4(),ele=y4(),tle=v4(),rle=w4(),nle=A4(),ile=T4(),sle=O4(),ale=P4(),ole=D4(),ule=B4(),cle=V4(),lle=G4(),fle=J4(),ple=Z4(),hle=tj(),cj=ij(),dle=aj(),mle=oj(),gle=uj();su.allChecks=[sce.AppBlockValidTags,ace.AssetPreload,oce.AssetSizeAppBlockCSS,uce.AssetSizeAppBlockJavaScript,cce.AssetSizeCSS,lce.AssetSizeJavaScript,fce.BlockIdUsage,pce.CdnPreconnect,hce.ContentForHeaderModification,dce.DeprecateBgsizes,mce.DeprecateLazysizes,gce.DeprecatedFilter,yce.DeprecatedFontsOnSectionsAndBlocks,_ce.DeprecatedFontsOnSettingsSchema,vce.DeprecatedTag,Sce.DuplicateContentForArguments,bce.DuplicateRenderSnippetArguments,wce.EmptyBlockContent,xce.HardcodedRoutes,kce.ImgWidthAndHeight,Ace.JSONMissingBlock,Ice.JSONSyntaxError,Tce.LiquidFreeSettings,Ece.LiquidHTMLSyntaxError,Oce.MatchingTranslations,Nce.MissingAsset,Lce.MissingContentForArguments,Pce.MissingRenderSnippetArguments,Cce.MissingTemplate,mle.AppBlockMissingSchema,qce.OrphanedSnippet,Rce.PaginationSize,Mce.ParserBlockingScript,Dce.SchemaPresetsBlockOrder,Fce.SchemaPresetsStaticBlocks,jce.RemoteAsset,Bce.RequiredLayoutThemeObject,$ce.ReservedDocParamNames,Vce.StaticStylesheetAndJavascriptTags,Uce.TranslationKeyExists,Wce.UnclosedHTMLElement,Gce.UndefinedObject,Hce.UniqueDocParamNames,gle.UniqueSettingIds,zce.UniqueStaticBlockId,Jce.UnknownFilter,Kce.UnrecognizedContentForArguments,Qce.UnrecognizedRenderSnippetArguments,Xce.UnsupportedDocTag,Yce.UnusedAssign,Zce.UnusedDocParam,rle.ValidBlockTarget,ile.ValidHTMLTranslation,ele.ValidContentForArguments,tle.ValidContentForArgumentTypes,nle.ValidScopedCSSClass,sle.ValidJSON,ale.ValidDocParamTypes,ole.ValidLocalBlocks,ule.ValidRenderSnippetArgumentTypes,cle.ValidSchema,ple.ValidSettingsKey,hle.ValidStaticBlockType,cj.ValidVisibleIf,cj.ValidVisibleIfSettingsSchema,dle.VariableName,lle.ValidSchemaName,fle.ValidSchemaTranslations];su.recommended=su.allChecks.filter(t=>{let e=t.meta.docs.recommended,r=!t.meta.targets||!t.meta.targets.length||t.meta.targets.includes(ice.ConfigTarget.Recommended);return e&&r})});var dj=P(ta=>{"use strict";b();var yle=ta&&ta.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),_le=ta&&ta.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vle=ta&&ta.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&yle(r,e,n[i]);return _le(r,e),r}})();Object.defineProperty(ta,"__esModule",{value:!0});ta.findRoot=hj;var ii=vle(Ho());async function ble(t,e){return Sle(e(ii.join(t,"shopify.extension.toml")),e(ii.join(t,".theme-check.yml")),fj(e(ii.join(t,".git")),e(ii.join(t,"assets")),e(ii.join(t,"snippets"))),fj(e(ii.join(t,"assets")),e(ii.join(t,"snippets")),pj(e(ii.join(ii.dirname(t),".theme-check.yml"))),pj(e(ii.join(ii.dirname(ii.dirname(t)),".theme-check.yml")))))}async function fj(...t){return(await Promise.all(t)).reduce((r,n)=>r&&n,!0)}async function Sle(...t){return(await Promise.all(t)).reduce((r,n)=>r||n,!1)}async function pj(t){return!await t}async function hj(t,e){if(await ble(t,e))return t;let n=ii.dirname(t);return n===t?null:hj(n,e)}});var Q_=P(Uk=>{"use strict";b();Object.defineProperty(Uk,"__esModule",{value:!0});Uk.flattenFixes=mj;function mj(t){return Array.isArray(t)?t.flatMap(mj):[t]}});var yj=P(Y_=>{"use strict";b();Object.defineProperty(Y_,"__esModule",{value:!0});Y_.JSONCorrector=void 0;var gj=Bk();function wle(t,e){switch(e.type){case"add":return(0,gj.set)(t,e.path,e.value);case"remove":return(0,gj.unset)(t,e.path),t}}var Wk=class{constructor(e){this.source=e,this.patches=[]}get fix(){if(this.patches.length===0)return[];let e=this.patches.reduce(wle,JSON.parse(this.source));return{startIndex:0,endIndex:this.source.length,insert:JSON.stringify(e,null,2)}}add(e,r){this.patches.push({type:"add",path:e,value:r})}replace(e,r){this.patches.push({type:"remove",path:e},{type:"add",path:e,value:r})}remove(e){this.patches.push({type:"remove",path:e})}};Y_.JSONCorrector=Wk});var _j=P(X_=>{"use strict";b();Object.defineProperty(X_,"__esModule",{value:!0});X_.StringCorrector=void 0;var Gk=class{constructor(e){this.source=e,this.fix=[]}insert(e,r){this.fix.push({startIndex:e,endIndex:e,insert:r})}replace(e,r,n){this.fix.push({startIndex:e,endIndex:r,insert:n})}remove(e,r){this.fix.push({startIndex:e,endIndex:r,insert:""})}};X_.StringCorrector=Gk});var Hk=P(au=>{"use strict";b();Object.defineProperty(au,"__esModule",{value:!0});au.StringCorrector=au.JSONCorrector=void 0;au.createCorrector=xle;var vj=de(),bj=yj();Object.defineProperty(au,"JSONCorrector",{enumerable:!0,get:function(){return bj.JSONCorrector}});var Sj=_j();Object.defineProperty(au,"StringCorrector",{enumerable:!0,get:function(){return Sj.StringCorrector}});function xle(t,e){switch(t){case vj.SourceCodeType.JSON:return new bj.JSONCorrector(e);case vj.SourceCodeType.LiquidHtml:return new Sj.StringCorrector(e);default:return kle(t)}}function kle(t){throw new Error(`Case statement not exhausted: ${t}`)}});var wj=P(zk=>{"use strict";b();Object.defineProperty(zk,"__esModule",{value:!0});zk.autofix=Tle;var Ale=Hk(),Ile=Q_();async function Tle(t,e,r){let n=e.filter(s=>"fix"in s&&!!s.fix),i=[];for(let s of t){let a=n.filter(c=>c.uri===s.uri);if(a.length===0)continue;let u=(0,Ale.createCorrector)(s.type,s.source);for(let c of a)c.fix(u);i.push(r(s,(0,Ile.flattenFixes)(u.fix)))}await Promise.all(i)}});var xj=P(Jk=>{"use strict";b();Object.defineProperty(Jk,"__esModule",{value:!0});Jk.applyFixToString=Ole;var Ele=Q_();function Ole(t,e){let r=t,n=0,i=(0,Ele.flattenFixes)(e).sort((s,a)=>s.startIndex-a.startIndex);for(let s=0;s<i.length-1;s++){let a=i[s],u=i[s+1];if(a.endIndex>u.startIndex)throw new Error("Overlapping ranges are not allowed")}for(let s of i){let a=s.startIndex+n,u=s.endIndex+n;if(a<0||a>r.length||u<a||u>r.length)throw new Error("Fix description is going overboard");r=r.slice(0,a)+s.insert+r.slice(u),n+=s.insert.length-(u-a)}return r}});var kj=P(Mn=>{"use strict";b();Object.defineProperty(Mn,"__esModule",{value:!0});Mn.applyFixToString=Mn.autofix=Mn.createCorrector=Mn.JSONCorrector=Mn.StringCorrector=Mn.flattenFixes=void 0;var Nle=Q_();Object.defineProperty(Mn,"flattenFixes",{enumerable:!0,get:function(){return Nle.flattenFixes}});var Kk=Hk();Object.defineProperty(Mn,"StringCorrector",{enumerable:!0,get:function(){return Kk.StringCorrector}});Object.defineProperty(Mn,"JSONCorrector",{enumerable:!0,get:function(){return Kk.JSONCorrector}});Object.defineProperty(Mn,"createCorrector",{enumerable:!0,get:function(){return Kk.createCorrector}});var Lle=wj();Object.defineProperty(Mn,"autofix",{enumerable:!0,get:function(){return Lle.autofix}});var Ple=xj();Object.defineProperty(Mn,"applyFixToString",{enumerable:!0,get:function(){return Ple.applyFixToString}})});var gn=P(Ye=>{"use strict";b();var Lj=Ye&&Ye.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Cle=Ye&&Ye.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Pj=Ye&&Ye.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Lj(r,e,n[i]);return Cle(r,e),r}})(),$t=Ye&&Ye.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Lj(e,t,r)};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.getBlockName=Ye.path=void 0;Ye.check=jle;var qle=Qw(),Rle=Ox(),ou=tp(),Mle=NM(),Aj=Fx(),Ij=Pj(Ho()),Qk=de(),Tj=_t(),Cj=rD();$t(Dw(),Ye);$t(Qw(),Ye);$t(lj(),Ye);$t(tp(),Ye);$t(dj(),Ye);$t(kj(),Ye);$t(Fx(),Ye);$t(Dt(),Ye);$t(Ox(),Ye);Ye.path=Pj(Ho());$t(hr(),Ye);$t(ug(),Ye);$t(de(),Ye);$t(qd(),Ye);$t(Vb(),Ye);$t(Bb(),Ye);$t(Fb(),Ye);$t(qb(),Ye);$t(sg(),Ye);$t(lg(),Ye);$t(qa(),Ye);$t(Ak(),Ye);var Dle=ds();Object.defineProperty(Ye,"getBlockName",{enumerable:!0,get:function(){return Dle.getBlockName}});$t(Fc(),Ye);var Fle=t=>{};async function jle(t,e,r){var n;let i=[],s=[],{fs:a}=r,{rootUri:u}=e,c={...r,mode:e.context,fileExists:(0,ou.makeFileExists)(a),fileSize:(0,ou.makeFileSize)(a),getDefaultLocale:(0,ou.makeGetDefaultLocale)(a,u),getDefaultTranslations:(0,ou.makeGetDefaultTranslations)(a,t,u),getDefaultSchemaLocale:(0,ou.makeGetDefaultSchemaLocale)(a,u),getDefaultSchemaTranslations:(0,ou.makeGetDefaultSchemaTranslations)(a,t,u),getMetafieldDefinitions:(n=r.getMetafieldDefinitions)!==null&&n!==void 0?n:(0,ou.makeGetMetafieldDefinitions)(a)},{DisabledChecksVisitor:p,isDisabled:d}=(0,Mle.createDisabledChecksModule)(),m=await Rle.JSONValidator.create(c.jsonValidationSet,e),h=m?.validate;c.themeDocset&&!c.themeDocset.isAugmented&&(c.themeDocset=new qle.AugmentedThemeDocset(c.themeDocset));for(let w of Object.values(Qk.SourceCodeType))switch(w){case Qk.SourceCodeType.JSON:{let x=Nj(w,t),k=Ej(w,e.checks);for(let v of x)for(let I of k){if((0,Aj.isIgnored)(v.uri,e,I))continue;let T=Oj(I,v,e,s,c,h);i.push(Vle(T,v))}break}case Qk.SourceCodeType.LiquidHtml:{let x=Nj(w,t),k=[p,...Ej(w,e.checks)];for(let v of x)for(let I of k){if((0,Aj.isIgnored)(v.uri,e,I))continue;let T=Oj(I,v,e,s,c,h);i.push(Ule(T,v))}break}}let y=e.onError||Fle;return await Promise.all(i.map(w=>w.catch(y))),s.filter(w=>!d(w))}function Ble(t,e,r,n,i,s){let a=n.settings[t.meta.code];return{...i,validateJSON:s,settings:$le(a,t.meta.schema),toUri:u=>Ij.join(n.rootUri,...u.split("/")),toRelativePath:u=>Ij.relative(u,n.rootUri),report(u){var c;r.push({type:t.meta.type,check:t.meta.code,message:u.message,uri:e.uri,severity:(c=a?.severity)!==null&&c!==void 0?c:t.meta.severity,start:(0,Tj.getPosition)(e.source,u.startIndex),end:(0,Tj.getPosition)(e.source,u.endIndex),fix:u.fix,suggest:u.suggest})},file:e}}function $le(t,e){var r;let n={};for(let[i,s]of Object.entries(e))n[i]=(r=t?.[i])!==null&&r!==void 0?r:s.defaultValue();return n}function Ej(t,e){return e.filter(r=>r.meta.type===t)}function Oj(t,e,r,n,i,s){let a=Ble(t,e,n,r,i,s);return t.create(a)}function Nj(t,e){return e.filter(r=>r.type===t)}async function Vle(t,e){t.onCodePathStart&&await t.onCodePathStart(e),!(e.ast instanceof Error)&&(Object.keys(t).length>0&&await(0,Cj.visitJSON)(e.ast,t),t.onCodePathEnd&&await t.onCodePathEnd(e))}async function Ule(t,e){t.onCodePathStart&&await t.onCodePathStart(e),!(e.ast instanceof Error)&&(Object.keys(t).length>0&&await(0,Cj.visitLiquid)(e.ast,t),t.onCodePathEnd&&await t.onCodePathEnd(e))}});var Rj=P((Z_,qj)=>{b();(function(t,e){typeof Z_=="object"&&typeof qj<"u"?e(Z_):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.acorn={}))})(Z_,(function(t){"use strict";var e=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],r=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],n="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",i="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",s={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},a="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",u={5:a,"5module":a+" export import",6:a+" const class extends export import super"},c=/^in(stanceof)?$/,p=new RegExp("["+i+"]"),d=new RegExp("["+i+n+"]");function m(l,_){for(var E=65536,O=0;O<_.length;O+=2){if(E+=_[O],E>l)return!1;if(E+=_[O+1],E>=l)return!0}return!1}function h(l,_){return l<65?l===36:l<91?!0:l<97?l===95:l<123?!0:l<=65535?l>=170&&p.test(String.fromCharCode(l)):_===!1?!1:m(l,r)}function y(l,_){return l<48?l===36:l<58?!0:l<65?!1:l<91?!0:l<97?l===95:l<123?!0:l<=65535?l>=170&&d.test(String.fromCharCode(l)):_===!1?!1:m(l,r)||m(l,e)}var w=function(_,E){E===void 0&&(E={}),this.label=_,this.keyword=E.keyword,this.beforeExpr=!!E.beforeExpr,this.startsExpr=!!E.startsExpr,this.isLoop=!!E.isLoop,this.isAssign=!!E.isAssign,this.prefix=!!E.prefix,this.postfix=!!E.postfix,this.binop=E.binop||null,this.updateContext=null};function x(l,_){return new w(l,{beforeExpr:!0,binop:_})}var k={beforeExpr:!0},v={startsExpr:!0},I={};function T(l,_){return _===void 0&&(_={}),_.keyword=l,I[l]=new w(l,_)}var S={num:new w("num",v),regexp:new w("regexp",v),string:new w("string",v),name:new w("name",v),privateId:new w("privateId",v),eof:new w("eof"),bracketL:new w("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new w("]"),braceL:new w("{",{beforeExpr:!0,startsExpr:!0}),braceR:new w("}"),parenL:new w("(",{beforeExpr:!0,startsExpr:!0}),parenR:new w(")"),comma:new w(",",k),semi:new w(";",k),colon:new w(":",k),dot:new w("."),question:new w("?",k),questionDot:new w("?."),arrow:new w("=>",k),template:new w("template"),invalidTemplate:new w("invalidTemplate"),ellipsis:new w("...",k),backQuote:new w("`",v),dollarBraceL:new w("${",{beforeExpr:!0,startsExpr:!0}),eq:new w("=",{beforeExpr:!0,isAssign:!0}),assign:new w("_=",{beforeExpr:!0,isAssign:!0}),incDec:new w("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new w("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:x("||",1),logicalAND:x("&&",2),bitwiseOR:x("|",3),bitwiseXOR:x("^",4),bitwiseAND:x("&",5),equality:x("==/!=/===/!==",6),relational:x("</>/<=/>=",7),bitShift:x("<</>>/>>>",8),plusMin:new w("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:x("%",10),star:x("*",10),slash:x("/",10),starstar:new w("**",{beforeExpr:!0}),coalesce:x("??",1),_break:T("break"),_case:T("case",k),_catch:T("catch"),_continue:T("continue"),_debugger:T("debugger"),_default:T("default",k),_do:T("do",{isLoop:!0,beforeExpr:!0}),_else:T("else",k),_finally:T("finally"),_for:T("for",{isLoop:!0}),_function:T("function",v),_if:T("if"),_return:T("return",k),_switch:T("switch"),_throw:T("throw",k),_try:T("try"),_var:T("var"),_const:T("const"),_while:T("while",{isLoop:!0}),_with:T("with"),_new:T("new",{beforeExpr:!0,startsExpr:!0}),_this:T("this",v),_super:T("super",v),_class:T("class",v),_extends:T("extends",k),_export:T("export"),_import:T("import",v),_null:T("null",v),_true:T("true",v),_false:T("false",v),_in:T("in",{beforeExpr:!0,binop:7}),_instanceof:T("instanceof",{beforeExpr:!0,binop:7}),_typeof:T("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:T("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:T("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},L=/\r\n?|\n|\u2028|\u2029/,R=new RegExp(L.source,"g");function M(l){return l===10||l===13||l===8232||l===8233}function F(l,_,E){E===void 0&&(E=l.length);for(var O=_;O<E;O++){var D=l.charCodeAt(O);if(M(D))return O<E-1&&D===13&&l.charCodeAt(O+1)===10?O+2:O+1}return-1}var X=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,H=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,$=Object.prototype,B=$.hasOwnProperty,Z=$.toString,ee=Object.hasOwn||(function(l,_){return B.call(l,_)}),W=Array.isArray||(function(l){return Z.call(l)==="[object Array]"}),J=Object.create(null);function te(l){return J[l]||(J[l]=new RegExp("^(?:"+l.replace(/ /g,"|")+")$"))}function ue(l){return l<=65535?String.fromCharCode(l):(l-=65536,String.fromCharCode((l>>10)+55296,(l&1023)+56320))}var fe=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ce=function(_,E){this.line=_,this.column=E};ce.prototype.offset=function(_){return new ce(this.line,this.column+_)};var Re=function(_,E,O){this.start=E,this.end=O,_.sourceFile!==null&&(this.source=_.sourceFile)};function Ue(l,_){for(var E=1,O=0;;){var D=F(l,O,_);if(D<0)return new ce(E,_-O);++E,O=D}}var Nt={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},et=!1;function tn(l){var _={};for(var E in Nt)_[E]=l&&ee(l,E)?l[E]:Nt[E];if(_.ecmaVersion==="latest"?_.ecmaVersion=1e8:_.ecmaVersion==null?(!et&&typeof console=="object"&&console.warn&&(et=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
1218
+ Defaulting to 2020, but this will stop working in the future.`)),_.ecmaVersion=11):_.ecmaVersion>=2015&&(_.ecmaVersion-=2009),_.allowReserved==null&&(_.allowReserved=_.ecmaVersion<5),(!l||l.allowHashBang==null)&&(_.allowHashBang=_.ecmaVersion>=14),W(_.onToken)){var O=_.onToken;_.onToken=function(D){return O.push(D)}}if(W(_.onComment)&&(_.onComment=Ss(_,_.onComment)),_.sourceType==="commonjs"&&_.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return _}function Ss(l,_){return function(E,O,D,z,Q,ae){var pe={type:E?"Block":"Line",value:O,start:D,end:z};l.locations&&(pe.loc=new Re(this,Q,ae)),l.ranges&&(pe.range=[D,z]),_.push(pe)}}var Bn=1,$n=2,gl=4,oo=8,sa=16,yl=32,Vr=64,aa=128,ws=256,rn=512,_l=1024,wu=Bn|$n|ws;function xs(l,_){return $n|(l?gl:0)|(_?oo:0)}var Ur=0,ks=1,_n=2,xh=3,oa=4,kh=5,mt=function(_,E,O){this.options=_=tn(_),this.sourceFile=_.sourceFile,this.keywords=te(u[_.ecmaVersion>=6?6:_.sourceType==="module"?"5module":5]);var D="";_.allowReserved!==!0&&(D=s[_.ecmaVersion>=6?6:_.ecmaVersion===5?5:3],_.sourceType==="module"&&(D+=" await")),this.reservedWords=te(D);var z=(D?D+" ":"")+s.strict;this.reservedWordsStrict=te(z),this.reservedWordsStrictBind=te(z+" "+s.strictBind),this.input=String(E),this.containsEsc=!1,O?(this.pos=O,this.lineStart=this.input.lastIndexOf(`
1219
+ `,O-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(L).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=S.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=_.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&_.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?$n:Bn),this.regexpState=null,this.privateNameStack=[]},rr={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};mt.prototype.parse=function(){var _=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(_)},rr.inFunction.get=function(){return(this.currentVarScope().flags&$n)>0},rr.inGenerator.get=function(){return(this.currentVarScope().flags&oo)>0},rr.inAsync.get=function(){return(this.currentVarScope().flags&gl)>0},rr.canAwait.get=function(){for(var l=this.scopeStack.length-1;l>=0;l--){var _=this.scopeStack[l],E=_.flags;if(E&(ws|rn))return!1;if(E&$n)return(E&gl)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},rr.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Bn)},rr.allowSuper.get=function(){var l=this.currentThisScope(),_=l.flags;return(_&Vr)>0||this.options.allowSuperOutsideMethod},rr.allowDirectSuper.get=function(){return(this.currentThisScope().flags&aa)>0},rr.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},rr.allowNewDotTarget.get=function(){for(var l=this.scopeStack.length-1;l>=0;l--){var _=this.scopeStack[l],E=_.flags;if(E&(ws|rn)||E&$n&&!(E&sa))return!0}return!1},rr.allowUsing.get=function(){var l=this.currentScope(),_=l.flags;return!(_&_l||!this.inModule&&_&Bn)},rr.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ws)>0},mt.extend=function(){for(var _=[],E=arguments.length;E--;)_[E]=arguments[E];for(var O=this,D=0;D<_.length;D++)O=_[D](O);return O},mt.parse=function(_,E){return new this(E,_).parse()},mt.parseExpressionAt=function(_,E,O){var D=new this(O,_,E);return D.nextToken(),D.parseExpression()},mt.tokenizer=function(_,E){return new this(E,_)},Object.defineProperties(mt.prototype,rr);var nr=mt.prototype,vl=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;nr.strictDirective=function(l){if(this.options.ecmaVersion<5)return!1;for(;;){H.lastIndex=l,l+=H.exec(this.input)[0].length;var _=vl.exec(this.input.slice(l));if(!_)return!1;if((_[1]||_[2])==="use strict"){H.lastIndex=l+_[0].length;var E=H.exec(this.input),O=E.index+E[0].length,D=this.input.charAt(O);return D===";"||D==="}"||L.test(E[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(D)||D==="!"&&this.input.charAt(O+1)==="=")}l+=_[0].length,H.lastIndex=l,l+=H.exec(this.input)[0].length,this.input[l]===";"&&l++}},nr.eat=function(l){return this.type===l?(this.next(),!0):!1},nr.isContextual=function(l){return this.type===S.name&&this.value===l&&!this.containsEsc},nr.eatContextual=function(l){return this.isContextual(l)?(this.next(),!0):!1},nr.expectContextual=function(l){this.eatContextual(l)||this.unexpected()},nr.canInsertSemicolon=function(){return this.type===S.eof||this.type===S.braceR||L.test(this.input.slice(this.lastTokEnd,this.start))},nr.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},nr.semicolon=function(){!this.eat(S.semi)&&!this.insertSemicolon()&&this.unexpected()},nr.afterTrailingComma=function(l,_){if(this.type===l)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),_||this.next(),!0},nr.expect=function(l){this.eat(l)||this.unexpected()},nr.unexpected=function(l){this.raise(l??this.start,"Unexpected token")};var ua=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};nr.checkPatternErrors=function(l,_){if(l){l.trailingComma>-1&&this.raiseRecoverable(l.trailingComma,"Comma is not permitted after the rest element");var E=_?l.parenthesizedAssign:l.parenthesizedBind;E>-1&&this.raiseRecoverable(E,_?"Assigning to rvalue":"Parenthesized pattern")}},nr.checkExpressionErrors=function(l,_){if(!l)return!1;var E=l.shorthandAssign,O=l.doubleProto;if(!_)return E>=0||O>=0;E>=0&&this.raise(E,"Shorthand property assignments are valid only in destructuring patterns"),O>=0&&this.raiseRecoverable(O,"Redefinition of __proto__ property")},nr.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},nr.isSimpleAssignTarget=function(l){return l.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(l.expression):l.type==="Identifier"||l.type==="MemberExpression"};var _e=mt.prototype;_e.parseTopLevel=function(l){var _=Object.create(null);for(l.body||(l.body=[]);this.type!==S.eof;){var E=this.parseStatement(null,!0,_);l.body.push(E)}if(this.inModule)for(var O=0,D=Object.keys(this.undefinedExports);O<D.length;O+=1){var z=D[O];this.raiseRecoverable(this.undefinedExports[z].start,"Export '"+z+"' is not defined")}return this.adaptDirectivePrologue(l.body),this.next(),l.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(l,"Program")};var uo={kind:"loop"},bl={kind:"switch"};_e.isLet=function(l){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;H.lastIndex=this.pos;var _=H.exec(this.input),E=this.pos+_[0].length,O=this.fullCharCodeAt(E);if(O===91||O===92)return!0;if(l)return!1;if(O===123)return!0;if(h(O)){var D=E;do E+=O<=65535?1:2;while(y(O=this.fullCharCodeAt(E)));if(O===92)return!0;var z=this.input.slice(D,E);if(!c.test(z))return!0}return!1},_e.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;H.lastIndex=this.pos;var l=H.exec(this.input),_=this.pos+l[0].length,E;return!L.test(this.input.slice(this.pos,_))&&this.input.slice(_,_+8)==="function"&&(_+8===this.input.length||!(y(E=this.fullCharCodeAt(_+8))||E===92))},_e.isUsingKeyword=function(l,_){if(this.options.ecmaVersion<17||!this.isContextual(l?"await":"using"))return!1;H.lastIndex=this.pos;var E=H.exec(this.input),O=this.pos+E[0].length;if(L.test(this.input.slice(this.pos,O)))return!1;if(l){var D=O+5,z;if(this.input.slice(O,D)!=="using"||D===this.input.length||y(z=this.fullCharCodeAt(D))||z===92)return!1;H.lastIndex=D;var Q=H.exec(this.input);if(O=D+Q[0].length,Q&&L.test(this.input.slice(D,O)))return!1}var ae=this.fullCharCodeAt(O);if(!h(ae)&&ae!==92)return!1;var pe=O;do O+=ae<=65535?1:2;while(y(ae=this.fullCharCodeAt(O)));if(ae===92)return!0;var Ce=this.input.slice(pe,O);return!(c.test(Ce)||_&&Ce==="of")},_e.isAwaitUsing=function(l){return this.isUsingKeyword(!0,l)},_e.isUsing=function(l){return this.isUsingKeyword(!1,l)},_e.parseStatement=function(l,_,E){var O=this.type,D=this.startNode(),z;switch(this.isLet(l)&&(O=S._var,z="let"),O){case S._break:case S._continue:return this.parseBreakContinueStatement(D,O.keyword);case S._debugger:return this.parseDebuggerStatement(D);case S._do:return this.parseDoStatement(D);case S._for:return this.parseForStatement(D);case S._function:return l&&(this.strict||l!=="if"&&l!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(D,!1,!l);case S._class:return l&&this.unexpected(),this.parseClass(D,!0);case S._if:return this.parseIfStatement(D);case S._return:return this.parseReturnStatement(D);case S._switch:return this.parseSwitchStatement(D);case S._throw:return this.parseThrowStatement(D);case S._try:return this.parseTryStatement(D);case S._const:case S._var:return z=z||this.value,l&&z!=="var"&&this.unexpected(),this.parseVarStatement(D,z);case S._while:return this.parseWhileStatement(D);case S._with:return this.parseWithStatement(D);case S.braceL:return this.parseBlock(!0,D);case S.semi:return this.parseEmptyStatement(D);case S._export:case S._import:if(this.options.ecmaVersion>10&&O===S._import){H.lastIndex=this.pos;var Q=H.exec(this.input),ae=this.pos+Q[0].length,pe=this.input.charCodeAt(ae);if(pe===40||pe===46)return this.parseExpressionStatement(D,this.parseExpression())}return this.options.allowImportExportEverywhere||(_||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),O===S._import?this.parseImport(D):this.parseExport(D,E);default:if(this.isAsyncFunction())return l&&this.unexpected(),this.next(),this.parseFunctionStatement(D,!0,!l);var Ce=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(Ce)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),Ce==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(D,!1,Ce),this.semicolon(),this.finishNode(D,"VariableDeclaration");var Se=this.value,Oe=this.parseExpression();return O===S.name&&Oe.type==="Identifier"&&this.eat(S.colon)?this.parseLabeledStatement(D,Se,Oe,l):this.parseExpressionStatement(D,Oe)}},_e.parseBreakContinueStatement=function(l,_){var E=_==="break";this.next(),this.eat(S.semi)||this.insertSemicolon()?l.label=null:this.type!==S.name?this.unexpected():(l.label=this.parseIdent(),this.semicolon());for(var O=0;O<this.labels.length;++O){var D=this.labels[O];if((l.label==null||D.name===l.label.name)&&(D.kind!=null&&(E||D.kind==="loop")||l.label&&E))break}return O===this.labels.length&&this.raise(l.start,"Unsyntactic "+_),this.finishNode(l,E?"BreakStatement":"ContinueStatement")},_e.parseDebuggerStatement=function(l){return this.next(),this.semicolon(),this.finishNode(l,"DebuggerStatement")},_e.parseDoStatement=function(l){return this.next(),this.labels.push(uo),l.body=this.parseStatement("do"),this.labels.pop(),this.expect(S._while),l.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(S.semi):this.semicolon(),this.finishNode(l,"DoWhileStatement")},_e.parseForStatement=function(l){this.next();var _=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(uo),this.enterScope(0),this.expect(S.parenL),this.type===S.semi)return _>-1&&this.unexpected(_),this.parseFor(l,null);var E=this.isLet();if(this.type===S._var||this.type===S._const||E){var O=this.startNode(),D=E?"let":this.value;return this.next(),this.parseVar(O,!0,D),this.finishNode(O,"VariableDeclaration"),this.parseForAfterInit(l,O,_)}var z=this.isContextual("let"),Q=!1,ae=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(ae){var pe=this.startNode();return this.next(),ae==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(pe,!0,ae),this.finishNode(pe,"VariableDeclaration"),this.parseForAfterInit(l,pe,_)}var Ce=this.containsEsc,Se=new ua,Oe=this.start,gr=_>-1?this.parseExprSubscripts(Se,"await"):this.parseExpression(!0,Se);return this.type===S._in||(Q=this.options.ecmaVersion>=6&&this.isContextual("of"))?(_>-1?(this.type===S._in&&this.unexpected(_),l.await=!0):Q&&this.options.ecmaVersion>=8&&(gr.start===Oe&&!Ce&&gr.type==="Identifier"&&gr.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(l.await=!1)),z&&Q&&this.raise(gr.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(gr,!1,Se),this.checkLValPattern(gr),this.parseForIn(l,gr)):(this.checkExpressionErrors(Se,!0),_>-1&&this.unexpected(_),this.parseFor(l,gr))},_e.parseForAfterInit=function(l,_,E){return(this.type===S._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&_.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===S._in?E>-1&&this.unexpected(E):l.await=E>-1),this.parseForIn(l,_)):(E>-1&&this.unexpected(E),this.parseFor(l,_))},_e.parseFunctionStatement=function(l,_,E){return this.next(),this.parseFunction(l,As|(E?0:co),!1,_)},_e.parseIfStatement=function(l){return this.next(),l.test=this.parseParenExpression(),l.consequent=this.parseStatement("if"),l.alternate=this.eat(S._else)?this.parseStatement("if"):null,this.finishNode(l,"IfStatement")},_e.parseReturnStatement=function(l){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(S.semi)||this.insertSemicolon()?l.argument=null:(l.argument=this.parseExpression(),this.semicolon()),this.finishNode(l,"ReturnStatement")},_e.parseSwitchStatement=function(l){this.next(),l.discriminant=this.parseParenExpression(),l.cases=[],this.expect(S.braceL),this.labels.push(bl),this.enterScope(_l);for(var _,E=!1;this.type!==S.braceR;)if(this.type===S._case||this.type===S._default){var O=this.type===S._case;_&&this.finishNode(_,"SwitchCase"),l.cases.push(_=this.startNode()),_.consequent=[],this.next(),O?_.test=this.parseExpression():(E&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),E=!0,_.test=null),this.expect(S.colon)}else _||this.unexpected(),_.consequent.push(this.parseStatement(null));return this.exitScope(),_&&this.finishNode(_,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(l,"SwitchStatement")},_e.parseThrowStatement=function(l){return this.next(),L.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),l.argument=this.parseExpression(),this.semicolon(),this.finishNode(l,"ThrowStatement")};var Sl=[];_e.parseCatchClauseParam=function(){var l=this.parseBindingAtom(),_=l.type==="Identifier";return this.enterScope(_?yl:0),this.checkLValPattern(l,_?oa:_n),this.expect(S.parenR),l},_e.parseTryStatement=function(l){if(this.next(),l.block=this.parseBlock(),l.handler=null,this.type===S._catch){var _=this.startNode();this.next(),this.eat(S.parenL)?_.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),_.param=null,this.enterScope(0)),_.body=this.parseBlock(!1),this.exitScope(),l.handler=this.finishNode(_,"CatchClause")}return l.finalizer=this.eat(S._finally)?this.parseBlock():null,!l.handler&&!l.finalizer&&this.raise(l.start,"Missing catch or finally clause"),this.finishNode(l,"TryStatement")},_e.parseVarStatement=function(l,_,E){return this.next(),this.parseVar(l,!1,_,E),this.semicolon(),this.finishNode(l,"VariableDeclaration")},_e.parseWhileStatement=function(l){return this.next(),l.test=this.parseParenExpression(),this.labels.push(uo),l.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(l,"WhileStatement")},_e.parseWithStatement=function(l){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),l.object=this.parseParenExpression(),l.body=this.parseStatement("with"),this.finishNode(l,"WithStatement")},_e.parseEmptyStatement=function(l){return this.next(),this.finishNode(l,"EmptyStatement")},_e.parseLabeledStatement=function(l,_,E,O){for(var D=0,z=this.labels;D<z.length;D+=1){var Q=z[D];Q.name===_&&this.raise(E.start,"Label '"+_+"' is already declared")}for(var ae=this.type.isLoop?"loop":this.type===S._switch?"switch":null,pe=this.labels.length-1;pe>=0;pe--){var Ce=this.labels[pe];if(Ce.statementStart===l.start)Ce.statementStart=this.start,Ce.kind=ae;else break}return this.labels.push({name:_,kind:ae,statementStart:this.start}),l.body=this.parseStatement(O?O.indexOf("label")===-1?O+"label":O:"label"),this.labels.pop(),l.label=E,this.finishNode(l,"LabeledStatement")},_e.parseExpressionStatement=function(l,_){return l.expression=_,this.semicolon(),this.finishNode(l,"ExpressionStatement")},_e.parseBlock=function(l,_,E){for(l===void 0&&(l=!0),_===void 0&&(_=this.startNode()),_.body=[],this.expect(S.braceL),l&&this.enterScope(0);this.type!==S.braceR;){var O=this.parseStatement(null);_.body.push(O)}return E&&(this.strict=!1),this.next(),l&&this.exitScope(),this.finishNode(_,"BlockStatement")},_e.parseFor=function(l,_){return l.init=_,this.expect(S.semi),l.test=this.type===S.semi?null:this.parseExpression(),this.expect(S.semi),l.update=this.type===S.parenR?null:this.parseExpression(),this.expect(S.parenR),l.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(l,"ForStatement")},_e.parseForIn=function(l,_){var E=this.type===S._in;return this.next(),_.type==="VariableDeclaration"&&_.declarations[0].init!=null&&(!E||this.options.ecmaVersion<8||this.strict||_.kind!=="var"||_.declarations[0].id.type!=="Identifier")&&this.raise(_.start,(E?"for-in":"for-of")+" loop variable declaration may not have an initializer"),l.left=_,l.right=E?this.parseExpression():this.parseMaybeAssign(),this.expect(S.parenR),l.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(l,E?"ForInStatement":"ForOfStatement")},_e.parseVar=function(l,_,E,O){for(l.declarations=[],l.kind=E;;){var D=this.startNode();if(this.parseVarId(D,E),this.eat(S.eq)?D.init=this.parseMaybeAssign(_):!O&&E==="const"&&!(this.type===S._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!O&&(E==="using"||E==="await using")&&this.options.ecmaVersion>=17&&this.type!==S._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+E+" declaration"):!O&&D.id.type!=="Identifier"&&!(_&&(this.type===S._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):D.init=null,l.declarations.push(this.finishNode(D,"VariableDeclarator")),!this.eat(S.comma))break}return l},_e.parseVarId=function(l,_){l.id=_==="using"||_==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(l.id,_==="var"?ks:_n,!1)};var As=1,co=2,Ah=4;_e.parseFunction=function(l,_,E,O,D){this.initFunction(l),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!O)&&(this.type===S.star&&_&co&&this.unexpected(),l.generator=this.eat(S.star)),this.options.ecmaVersion>=8&&(l.async=!!O),_&As&&(l.id=_&Ah&&this.type!==S.name?null:this.parseIdent(),l.id&&!(_&co)&&this.checkLValSimple(l.id,this.strict||l.generator||l.async?this.treatFunctionsAsVar?ks:_n:xh));var z=this.yieldPos,Q=this.awaitPos,ae=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(xs(l.async,l.generator)),_&As||(l.id=this.type===S.name?this.parseIdent():null),this.parseFunctionParams(l),this.parseFunctionBody(l,E,!1,D),this.yieldPos=z,this.awaitPos=Q,this.awaitIdentPos=ae,this.finishNode(l,_&As?"FunctionDeclaration":"FunctionExpression")},_e.parseFunctionParams=function(l){this.expect(S.parenL),l.params=this.parseBindingList(S.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},_e.parseClass=function(l,_){this.next();var E=this.strict;this.strict=!0,this.parseClassId(l,_),this.parseClassSuper(l);var O=this.enterClassBody(),D=this.startNode(),z=!1;for(D.body=[],this.expect(S.braceL);this.type!==S.braceR;){var Q=this.parseClassElement(l.superClass!==null);Q&&(D.body.push(Q),Q.type==="MethodDefinition"&&Q.kind==="constructor"?(z&&this.raiseRecoverable(Q.start,"Duplicate constructor in the same class"),z=!0):Q.key&&Q.key.type==="PrivateIdentifier"&&h0(O,Q)&&this.raiseRecoverable(Q.key.start,"Identifier '#"+Q.key.name+"' has already been declared"))}return this.strict=E,this.next(),l.body=this.finishNode(D,"ClassBody"),this.exitClassBody(),this.finishNode(l,_?"ClassDeclaration":"ClassExpression")},_e.parseClassElement=function(l){if(this.eat(S.semi))return null;var _=this.options.ecmaVersion,E=this.startNode(),O="",D=!1,z=!1,Q="method",ae=!1;if(this.eatContextual("static")){if(_>=13&&this.eat(S.braceL))return this.parseClassStaticBlock(E),E;this.isClassElementNameStart()||this.type===S.star?ae=!0:O="static"}if(E.static=ae,!O&&_>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===S.star)&&!this.canInsertSemicolon()?z=!0:O="async"),!O&&(_>=9||!z)&&this.eat(S.star)&&(D=!0),!O&&!z&&!D){var pe=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?Q=pe:O=pe)}if(O?(E.computed=!1,E.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),E.key.name=O,this.finishNode(E.key,"Identifier")):this.parseClassElementName(E),_<13||this.type===S.parenL||Q!=="method"||D||z){var Ce=!E.static&&xu(E,"constructor"),Se=Ce&&l;Ce&&Q!=="method"&&this.raise(E.key.start,"Constructor can't have get/set modifier"),E.kind=Ce?"constructor":Q,this.parseClassMethod(E,D,z,Se)}else this.parseClassField(E);return E},_e.isClassElementNameStart=function(){return this.type===S.name||this.type===S.privateId||this.type===S.num||this.type===S.string||this.type===S.bracketL||this.type.keyword},_e.parseClassElementName=function(l){this.type===S.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),l.computed=!1,l.key=this.parsePrivateIdent()):this.parsePropertyName(l)},_e.parseClassMethod=function(l,_,E,O){var D=l.key;l.kind==="constructor"?(_&&this.raise(D.start,"Constructor can't be a generator"),E&&this.raise(D.start,"Constructor can't be an async method")):l.static&&xu(l,"prototype")&&this.raise(D.start,"Classes may not have a static property named prototype");var z=l.value=this.parseMethod(_,E,O);return l.kind==="get"&&z.params.length!==0&&this.raiseRecoverable(z.start,"getter should have no params"),l.kind==="set"&&z.params.length!==1&&this.raiseRecoverable(z.start,"setter should have exactly one param"),l.kind==="set"&&z.params[0].type==="RestElement"&&this.raiseRecoverable(z.params[0].start,"Setter cannot use rest params"),this.finishNode(l,"MethodDefinition")},_e.parseClassField=function(l){return xu(l,"constructor")?this.raise(l.key.start,"Classes can't have a field named 'constructor'"):l.static&&xu(l,"prototype")&&this.raise(l.key.start,"Classes can't have a static field named 'prototype'"),this.eat(S.eq)?(this.enterScope(rn|Vr),l.value=this.parseMaybeAssign(),this.exitScope()):l.value=null,this.semicolon(),this.finishNode(l,"PropertyDefinition")},_e.parseClassStaticBlock=function(l){l.body=[];var _=this.labels;for(this.labels=[],this.enterScope(ws|Vr);this.type!==S.braceR;){var E=this.parseStatement(null);l.body.push(E)}return this.next(),this.exitScope(),this.labels=_,this.finishNode(l,"StaticBlock")},_e.parseClassId=function(l,_){this.type===S.name?(l.id=this.parseIdent(),_&&this.checkLValSimple(l.id,_n,!1)):(_===!0&&this.unexpected(),l.id=null)},_e.parseClassSuper=function(l){l.superClass=this.eat(S._extends)?this.parseExprSubscripts(null,!1):null},_e.enterClassBody=function(){var l={declared:Object.create(null),used:[]};return this.privateNameStack.push(l),l.declared},_e.exitClassBody=function(){var l=this.privateNameStack.pop(),_=l.declared,E=l.used;if(this.options.checkPrivateFields)for(var O=this.privateNameStack.length,D=O===0?null:this.privateNameStack[O-1],z=0;z<E.length;++z){var Q=E[z];ee(_,Q.name)||(D?D.used.push(Q):this.raiseRecoverable(Q.start,"Private field '#"+Q.name+"' must be declared in an enclosing class"))}};function h0(l,_){var E=_.key.name,O=l[E],D="true";return _.type==="MethodDefinition"&&(_.kind==="get"||_.kind==="set")&&(D=(_.static?"s":"i")+_.kind),O==="iget"&&D==="iset"||O==="iset"&&D==="iget"||O==="sget"&&D==="sset"||O==="sset"&&D==="sget"?(l[E]="true",!1):O?!0:(l[E]=D,!1)}function xu(l,_){var E=l.computed,O=l.key;return!E&&(O.type==="Identifier"&&O.name===_||O.type==="Literal"&&O.value===_)}_e.parseExportAllDeclaration=function(l,_){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(l.exported=this.parseModuleExportName(),this.checkExport(_,l.exported,this.lastTokStart)):l.exported=null),this.expectContextual("from"),this.type!==S.string&&this.unexpected(),l.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(l.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(l,"ExportAllDeclaration")},_e.parseExport=function(l,_){if(this.next(),this.eat(S.star))return this.parseExportAllDeclaration(l,_);if(this.eat(S._default))return this.checkExport(_,"default",this.lastTokStart),l.declaration=this.parseExportDefaultDeclaration(),this.finishNode(l,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())l.declaration=this.parseExportDeclaration(l),l.declaration.type==="VariableDeclaration"?this.checkVariableExport(_,l.declaration.declarations):this.checkExport(_,l.declaration.id,l.declaration.id.start),l.specifiers=[],l.source=null,this.options.ecmaVersion>=16&&(l.attributes=[]);else{if(l.declaration=null,l.specifiers=this.parseExportSpecifiers(_),this.eatContextual("from"))this.type!==S.string&&this.unexpected(),l.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(l.attributes=this.parseWithClause());else{for(var E=0,O=l.specifiers;E<O.length;E+=1){var D=O[E];this.checkUnreserved(D.local),this.checkLocalExport(D.local),D.local.type==="Literal"&&this.raise(D.local.start,"A string literal cannot be used as an exported binding without `from`.")}l.source=null,this.options.ecmaVersion>=16&&(l.attributes=[])}this.semicolon()}return this.finishNode(l,"ExportNamedDeclaration")},_e.parseExportDeclaration=function(l){return this.parseStatement(null)},_e.parseExportDefaultDeclaration=function(){var l;if(this.type===S._function||(l=this.isAsyncFunction())){var _=this.startNode();return this.next(),l&&this.next(),this.parseFunction(_,As|Ah,!1,l)}else if(this.type===S._class){var E=this.startNode();return this.parseClass(E,"nullableID")}else{var O=this.parseMaybeAssign();return this.semicolon(),O}},_e.checkExport=function(l,_,E){l&&(typeof _!="string"&&(_=_.type==="Identifier"?_.name:_.value),ee(l,_)&&this.raiseRecoverable(E,"Duplicate export '"+_+"'"),l[_]=!0)},_e.checkPatternExport=function(l,_){var E=_.type;if(E==="Identifier")this.checkExport(l,_,_.start);else if(E==="ObjectPattern")for(var O=0,D=_.properties;O<D.length;O+=1){var z=D[O];this.checkPatternExport(l,z)}else if(E==="ArrayPattern")for(var Q=0,ae=_.elements;Q<ae.length;Q+=1){var pe=ae[Q];pe&&this.checkPatternExport(l,pe)}else E==="Property"?this.checkPatternExport(l,_.value):E==="AssignmentPattern"?this.checkPatternExport(l,_.left):E==="RestElement"&&this.checkPatternExport(l,_.argument)},_e.checkVariableExport=function(l,_){if(l)for(var E=0,O=_;E<O.length;E+=1){var D=O[E];this.checkPatternExport(l,D.id)}},_e.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},_e.parseExportSpecifier=function(l){var _=this.startNode();return _.local=this.parseModuleExportName(),_.exported=this.eatContextual("as")?this.parseModuleExportName():_.local,this.checkExport(l,_.exported,_.exported.start),this.finishNode(_,"ExportSpecifier")},_e.parseExportSpecifiers=function(l){var _=[],E=!0;for(this.expect(S.braceL);!this.eat(S.braceR);){if(E)E=!1;else if(this.expect(S.comma),this.afterTrailingComma(S.braceR))break;_.push(this.parseExportSpecifier(l))}return _},_e.parseImport=function(l){return this.next(),this.type===S.string?(l.specifiers=Sl,l.source=this.parseExprAtom()):(l.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),l.source=this.type===S.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(l.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(l,"ImportDeclaration")},_e.parseImportSpecifier=function(){var l=this.startNode();return l.imported=this.parseModuleExportName(),this.eatContextual("as")?l.local=this.parseIdent():(this.checkUnreserved(l.imported),l.local=l.imported),this.checkLValSimple(l.local,_n),this.finishNode(l,"ImportSpecifier")},_e.parseImportDefaultSpecifier=function(){var l=this.startNode();return l.local=this.parseIdent(),this.checkLValSimple(l.local,_n),this.finishNode(l,"ImportDefaultSpecifier")},_e.parseImportNamespaceSpecifier=function(){var l=this.startNode();return this.next(),this.expectContextual("as"),l.local=this.parseIdent(),this.checkLValSimple(l.local,_n),this.finishNode(l,"ImportNamespaceSpecifier")},_e.parseImportSpecifiers=function(){var l=[],_=!0;if(this.type===S.name&&(l.push(this.parseImportDefaultSpecifier()),!this.eat(S.comma)))return l;if(this.type===S.star)return l.push(this.parseImportNamespaceSpecifier()),l;for(this.expect(S.braceL);!this.eat(S.braceR);){if(_)_=!1;else if(this.expect(S.comma),this.afterTrailingComma(S.braceR))break;l.push(this.parseImportSpecifier())}return l},_e.parseWithClause=function(){var l=[];if(!this.eat(S._with))return l;this.expect(S.braceL);for(var _={},E=!0;!this.eat(S.braceR);){if(E)E=!1;else if(this.expect(S.comma),this.afterTrailingComma(S.braceR))break;var O=this.parseImportAttribute(),D=O.key.type==="Identifier"?O.key.name:O.key.value;ee(_,D)&&this.raiseRecoverable(O.key.start,"Duplicate attribute key '"+D+"'"),_[D]=!0,l.push(O)}return l},_e.parseImportAttribute=function(){var l=this.startNode();return l.key=this.type===S.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(S.colon),this.type!==S.string&&this.unexpected(),l.value=this.parseExprAtom(),this.finishNode(l,"ImportAttribute")},_e.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===S.string){var l=this.parseLiteral(this.value);return fe.test(l.value)&&this.raise(l.start,"An export name cannot include a lone surrogate."),l}return this.parseIdent(!0)},_e.adaptDirectivePrologue=function(l){for(var _=0;_<l.length&&this.isDirectiveCandidate(l[_]);++_)l[_].directive=l[_].expression.raw.slice(1,-1)},_e.isDirectiveCandidate=function(l){return this.options.ecmaVersion>=5&&l.type==="ExpressionStatement"&&l.expression.type==="Literal"&&typeof l.expression.value=="string"&&(this.input[l.start]==='"'||this.input[l.start]==="'")};var nn=mt.prototype;nn.toAssignable=function(l,_,E){if(this.options.ecmaVersion>=6&&l)switch(l.type){case"Identifier":this.inAsync&&l.name==="await"&&this.raise(l.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":l.type="ObjectPattern",E&&this.checkPatternErrors(E,!0);for(var O=0,D=l.properties;O<D.length;O+=1){var z=D[O];this.toAssignable(z,_),z.type==="RestElement"&&(z.argument.type==="ArrayPattern"||z.argument.type==="ObjectPattern")&&this.raise(z.argument.start,"Unexpected token")}break;case"Property":l.kind!=="init"&&this.raise(l.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(l.value,_);break;case"ArrayExpression":l.type="ArrayPattern",E&&this.checkPatternErrors(E,!0),this.toAssignableList(l.elements,_);break;case"SpreadElement":l.type="RestElement",this.toAssignable(l.argument,_),l.argument.type==="AssignmentPattern"&&this.raise(l.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":l.operator!=="="&&this.raise(l.left.end,"Only '=' operator can be used for specifying default value."),l.type="AssignmentPattern",delete l.operator,this.toAssignable(l.left,_);break;case"ParenthesizedExpression":this.toAssignable(l.expression,_,E);break;case"ChainExpression":this.raiseRecoverable(l.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!_)break;default:this.raise(l.start,"Assigning to rvalue")}else E&&this.checkPatternErrors(E,!0);return l},nn.toAssignableList=function(l,_){for(var E=l.length,O=0;O<E;O++){var D=l[O];D&&this.toAssignable(D,_)}if(E){var z=l[E-1];this.options.ecmaVersion===6&&_&&z&&z.type==="RestElement"&&z.argument.type!=="Identifier"&&this.unexpected(z.argument.start)}return l},nn.parseSpread=function(l){var _=this.startNode();return this.next(),_.argument=this.parseMaybeAssign(!1,l),this.finishNode(_,"SpreadElement")},nn.parseRestBinding=function(){var l=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==S.name&&this.unexpected(),l.argument=this.parseBindingAtom(),this.finishNode(l,"RestElement")},nn.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case S.bracketL:var l=this.startNode();return this.next(),l.elements=this.parseBindingList(S.bracketR,!0,!0),this.finishNode(l,"ArrayPattern");case S.braceL:return this.parseObj(!0)}return this.parseIdent()},nn.parseBindingList=function(l,_,E,O){for(var D=[],z=!0;!this.eat(l);)if(z?z=!1:this.expect(S.comma),_&&this.type===S.comma)D.push(null);else{if(E&&this.afterTrailingComma(l))break;if(this.type===S.ellipsis){var Q=this.parseRestBinding();this.parseBindingListItem(Q),D.push(Q),this.type===S.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(l);break}else D.push(this.parseAssignableListItem(O))}return D},nn.parseAssignableListItem=function(l){var _=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(_),_},nn.parseBindingListItem=function(l){return l},nn.parseMaybeDefault=function(l,_,E){if(E=E||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(S.eq))return E;var O=this.startNodeAt(l,_);return O.left=E,O.right=this.parseMaybeAssign(),this.finishNode(O,"AssignmentPattern")},nn.checkLValSimple=function(l,_,E){_===void 0&&(_=Ur);var O=_!==Ur;switch(l.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(l.name)&&this.raiseRecoverable(l.start,(O?"Binding ":"Assigning to ")+l.name+" in strict mode"),O&&(_===_n&&l.name==="let"&&this.raiseRecoverable(l.start,"let is disallowed as a lexically bound name"),E&&(ee(E,l.name)&&this.raiseRecoverable(l.start,"Argument name clash"),E[l.name]=!0),_!==kh&&this.declareName(l.name,_,l.start));break;case"ChainExpression":this.raiseRecoverable(l.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":O&&this.raiseRecoverable(l.start,"Binding member expression");break;case"ParenthesizedExpression":return O&&this.raiseRecoverable(l.start,"Binding parenthesized expression"),this.checkLValSimple(l.expression,_,E);default:this.raise(l.start,(O?"Binding":"Assigning to")+" rvalue")}},nn.checkLValPattern=function(l,_,E){switch(_===void 0&&(_=Ur),l.type){case"ObjectPattern":for(var O=0,D=l.properties;O<D.length;O+=1){var z=D[O];this.checkLValInnerPattern(z,_,E)}break;case"ArrayPattern":for(var Q=0,ae=l.elements;Q<ae.length;Q+=1){var pe=ae[Q];pe&&this.checkLValInnerPattern(pe,_,E)}break;default:this.checkLValSimple(l,_,E)}},nn.checkLValInnerPattern=function(l,_,E){switch(_===void 0&&(_=Ur),l.type){case"Property":this.checkLValInnerPattern(l.value,_,E);break;case"AssignmentPattern":this.checkLValPattern(l.left,_,E);break;case"RestElement":this.checkLValPattern(l.argument,_,E);break;default:this.checkLValPattern(l,_,E)}};var sn=function(_,E,O,D,z){this.token=_,this.isExpr=!!E,this.preserveSpace=!!O,this.override=D,this.generator=!!z},gt={b_stat:new sn("{",!1),b_expr:new sn("{",!0),b_tmpl:new sn("${",!1),p_stat:new sn("(",!1),p_expr:new sn("(",!0),q_tmpl:new sn("`",!0,!0,function(l){return l.tryReadTemplateToken()}),f_stat:new sn("function",!1),f_expr:new sn("function",!0),f_expr_gen:new sn("function",!0,!1,null,!0),f_gen:new sn("function",!1,!1,null,!0)},ca=mt.prototype;ca.initialContext=function(){return[gt.b_stat]},ca.curContext=function(){return this.context[this.context.length-1]},ca.braceIsBlock=function(l){var _=this.curContext();return _===gt.f_expr||_===gt.f_stat?!0:l===S.colon&&(_===gt.b_stat||_===gt.b_expr)?!_.isExpr:l===S._return||l===S.name&&this.exprAllowed?L.test(this.input.slice(this.lastTokEnd,this.start)):l===S._else||l===S.semi||l===S.eof||l===S.parenR||l===S.arrow?!0:l===S.braceL?_===gt.b_stat:l===S._var||l===S._const||l===S.name?!1:!this.exprAllowed},ca.inGeneratorContext=function(){for(var l=this.context.length-1;l>=1;l--){var _=this.context[l];if(_.token==="function")return _.generator}return!1},ca.updateContext=function(l){var _,E=this.type;E.keyword&&l===S.dot?this.exprAllowed=!1:(_=E.updateContext)?_.call(this,l):this.exprAllowed=E.beforeExpr},ca.overrideContext=function(l){this.curContext()!==l&&(this.context[this.context.length-1]=l)},S.parenR.updateContext=S.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var l=this.context.pop();l===gt.b_stat&&this.curContext().token==="function"&&(l=this.context.pop()),this.exprAllowed=!l.isExpr},S.braceL.updateContext=function(l){this.context.push(this.braceIsBlock(l)?gt.b_stat:gt.b_expr),this.exprAllowed=!0},S.dollarBraceL.updateContext=function(){this.context.push(gt.b_tmpl),this.exprAllowed=!0},S.parenL.updateContext=function(l){var _=l===S._if||l===S._for||l===S._with||l===S._while;this.context.push(_?gt.p_stat:gt.p_expr),this.exprAllowed=!0},S.incDec.updateContext=function(){},S._function.updateContext=S._class.updateContext=function(l){l.beforeExpr&&l!==S._else&&!(l===S.semi&&this.curContext()!==gt.p_stat)&&!(l===S._return&&L.test(this.input.slice(this.lastTokEnd,this.start)))&&!((l===S.colon||l===S.braceL)&&this.curContext()===gt.b_stat)?this.context.push(gt.f_expr):this.context.push(gt.f_stat),this.exprAllowed=!1},S.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},S.backQuote.updateContext=function(){this.curContext()===gt.q_tmpl?this.context.pop():this.context.push(gt.q_tmpl),this.exprAllowed=!1},S.star.updateContext=function(l){if(l===S._function){var _=this.context.length-1;this.context[_]===gt.f_expr?this.context[_]=gt.f_expr_gen:this.context[_]=gt.f_gen}this.exprAllowed=!0},S.name.updateContext=function(l){var _=!1;this.options.ecmaVersion>=6&&l!==S.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(_=!0),this.exprAllowed=_};var qe=mt.prototype;qe.checkPropClash=function(l,_,E){if(!(this.options.ecmaVersion>=9&&l.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(l.computed||l.method||l.shorthand))){var O=l.key,D;switch(O.type){case"Identifier":D=O.name;break;case"Literal":D=String(O.value);break;default:return}var z=l.kind;if(this.options.ecmaVersion>=6){D==="__proto__"&&z==="init"&&(_.proto&&(E?E.doubleProto<0&&(E.doubleProto=O.start):this.raiseRecoverable(O.start,"Redefinition of __proto__ property")),_.proto=!0);return}D="$"+D;var Q=_[D];if(Q){var ae;z==="init"?ae=this.strict&&Q.init||Q.get||Q.set:ae=Q.init||Q[z],ae&&this.raiseRecoverable(O.start,"Redefinition of property")}else Q=_[D]={init:!1,get:!1,set:!1};Q[z]=!0}},qe.parseExpression=function(l,_){var E=this.start,O=this.startLoc,D=this.parseMaybeAssign(l,_);if(this.type===S.comma){var z=this.startNodeAt(E,O);for(z.expressions=[D];this.eat(S.comma);)z.expressions.push(this.parseMaybeAssign(l,_));return this.finishNode(z,"SequenceExpression")}return D},qe.parseMaybeAssign=function(l,_,E){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(l);this.exprAllowed=!1}var O=!1,D=-1,z=-1,Q=-1;_?(D=_.parenthesizedAssign,z=_.trailingComma,Q=_.doubleProto,_.parenthesizedAssign=_.trailingComma=-1):(_=new ua,O=!0);var ae=this.start,pe=this.startLoc;(this.type===S.parenL||this.type===S.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=l==="await");var Ce=this.parseMaybeConditional(l,_);if(E&&(Ce=E.call(this,Ce,ae,pe)),this.type.isAssign){var Se=this.startNodeAt(ae,pe);return Se.operator=this.value,this.type===S.eq&&(Ce=this.toAssignable(Ce,!1,_)),O||(_.parenthesizedAssign=_.trailingComma=_.doubleProto=-1),_.shorthandAssign>=Ce.start&&(_.shorthandAssign=-1),this.type===S.eq?this.checkLValPattern(Ce):this.checkLValSimple(Ce),Se.left=Ce,this.next(),Se.right=this.parseMaybeAssign(l),Q>-1&&(_.doubleProto=Q),this.finishNode(Se,"AssignmentExpression")}else O&&this.checkExpressionErrors(_,!0);return D>-1&&(_.parenthesizedAssign=D),z>-1&&(_.trailingComma=z),Ce},qe.parseMaybeConditional=function(l,_){var E=this.start,O=this.startLoc,D=this.parseExprOps(l,_);if(this.checkExpressionErrors(_))return D;if(this.eat(S.question)){var z=this.startNodeAt(E,O);return z.test=D,z.consequent=this.parseMaybeAssign(),this.expect(S.colon),z.alternate=this.parseMaybeAssign(l),this.finishNode(z,"ConditionalExpression")}return D},qe.parseExprOps=function(l,_){var E=this.start,O=this.startLoc,D=this.parseMaybeUnary(_,!1,!1,l);return this.checkExpressionErrors(_)||D.start===E&&D.type==="ArrowFunctionExpression"?D:this.parseExprOp(D,E,O,-1,l)},qe.parseExprOp=function(l,_,E,O,D){var z=this.type.binop;if(z!=null&&(!D||this.type!==S._in)&&z>O){var Q=this.type===S.logicalOR||this.type===S.logicalAND,ae=this.type===S.coalesce;ae&&(z=S.logicalAND.binop);var pe=this.value;this.next();var Ce=this.start,Se=this.startLoc,Oe=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,D),Ce,Se,z,D),gr=this.buildBinary(_,E,l,Oe,pe,Q||ae);return(Q&&this.type===S.coalesce||ae&&(this.type===S.logicalOR||this.type===S.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(gr,_,E,O,D)}return l},qe.buildBinary=function(l,_,E,O,D,z){O.type==="PrivateIdentifier"&&this.raise(O.start,"Private identifier can only be left side of binary expression");var Q=this.startNodeAt(l,_);return Q.left=E,Q.operator=D,Q.right=O,this.finishNode(Q,z?"LogicalExpression":"BinaryExpression")},qe.parseMaybeUnary=function(l,_,E,O){var D=this.start,z=this.startLoc,Q;if(this.isContextual("await")&&this.canAwait)Q=this.parseAwait(O),_=!0;else if(this.type.prefix){var ae=this.startNode(),pe=this.type===S.incDec;ae.operator=this.value,ae.prefix=!0,this.next(),ae.argument=this.parseMaybeUnary(null,!0,pe,O),this.checkExpressionErrors(l,!0),pe?this.checkLValSimple(ae.argument):this.strict&&ae.operator==="delete"&&Ih(ae.argument)?this.raiseRecoverable(ae.start,"Deleting local variable in strict mode"):ae.operator==="delete"&&ku(ae.argument)?this.raiseRecoverable(ae.start,"Private fields can not be deleted"):_=!0,Q=this.finishNode(ae,pe?"UpdateExpression":"UnaryExpression")}else if(!_&&this.type===S.privateId)(O||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),Q=this.parsePrivateIdent(),this.type!==S._in&&this.unexpected();else{if(Q=this.parseExprSubscripts(l,O),this.checkExpressionErrors(l))return Q;for(;this.type.postfix&&!this.canInsertSemicolon();){var Ce=this.startNodeAt(D,z);Ce.operator=this.value,Ce.prefix=!1,Ce.argument=Q,this.checkLValSimple(Q),this.next(),Q=this.finishNode(Ce,"UpdateExpression")}}if(!E&&this.eat(S.starstar))if(_)this.unexpected(this.lastTokStart);else return this.buildBinary(D,z,Q,this.parseMaybeUnary(null,!1,!1,O),"**",!1);else return Q};function Ih(l){return l.type==="Identifier"||l.type==="ParenthesizedExpression"&&Ih(l.expression)}function ku(l){return l.type==="MemberExpression"&&l.property.type==="PrivateIdentifier"||l.type==="ChainExpression"&&ku(l.expression)||l.type==="ParenthesizedExpression"&&ku(l.expression)}qe.parseExprSubscripts=function(l,_){var E=this.start,O=this.startLoc,D=this.parseExprAtom(l,_);if(D.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return D;var z=this.parseSubscripts(D,E,O,!1,_);return l&&z.type==="MemberExpression"&&(l.parenthesizedAssign>=z.start&&(l.parenthesizedAssign=-1),l.parenthesizedBind>=z.start&&(l.parenthesizedBind=-1),l.trailingComma>=z.start&&(l.trailingComma=-1)),z},qe.parseSubscripts=function(l,_,E,O,D){for(var z=this.options.ecmaVersion>=8&&l.type==="Identifier"&&l.name==="async"&&this.lastTokEnd===l.end&&!this.canInsertSemicolon()&&l.end-l.start===5&&this.potentialArrowAt===l.start,Q=!1;;){var ae=this.parseSubscript(l,_,E,O,z,Q,D);if(ae.optional&&(Q=!0),ae===l||ae.type==="ArrowFunctionExpression"){if(Q){var pe=this.startNodeAt(_,E);pe.expression=ae,ae=this.finishNode(pe,"ChainExpression")}return ae}l=ae}},qe.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(S.arrow)},qe.parseSubscriptAsyncArrow=function(l,_,E,O){return this.parseArrowExpression(this.startNodeAt(l,_),E,!0,O)},qe.parseSubscript=function(l,_,E,O,D,z,Q){var ae=this.options.ecmaVersion>=11,pe=ae&&this.eat(S.questionDot);O&&pe&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var Ce=this.eat(S.bracketL);if(Ce||pe&&this.type!==S.parenL&&this.type!==S.backQuote||this.eat(S.dot)){var Se=this.startNodeAt(_,E);Se.object=l,Ce?(Se.property=this.parseExpression(),this.expect(S.bracketR)):this.type===S.privateId&&l.type!=="Super"?Se.property=this.parsePrivateIdent():Se.property=this.parseIdent(this.options.allowReserved!=="never"),Se.computed=!!Ce,ae&&(Se.optional=pe),l=this.finishNode(Se,"MemberExpression")}else if(!O&&this.eat(S.parenL)){var Oe=new ua,gr=this.yieldPos,ho=this.awaitPos,fa=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var Nu=this.parseExprList(S.parenR,this.options.ecmaVersion>=8,!1,Oe);if(D&&!pe&&this.shouldParseAsyncArrow())return this.checkPatternErrors(Oe,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=gr,this.awaitPos=ho,this.awaitIdentPos=fa,this.parseSubscriptAsyncArrow(_,E,Nu,Q);this.checkExpressionErrors(Oe,!0),this.yieldPos=gr||this.yieldPos,this.awaitPos=ho||this.awaitPos,this.awaitIdentPos=fa||this.awaitIdentPos;var pa=this.startNodeAt(_,E);pa.callee=l,pa.arguments=Nu,ae&&(pa.optional=pe),l=this.finishNode(pa,"CallExpression")}else if(this.type===S.backQuote){(pe||z)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var ha=this.startNodeAt(_,E);ha.tag=l,ha.quasi=this.parseTemplate({isTagged:!0}),l=this.finishNode(ha,"TaggedTemplateExpression")}return l},qe.parseExprAtom=function(l,_,E){this.type===S.slash&&this.readRegexp();var O,D=this.potentialArrowAt===this.start;switch(this.type){case S._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),O=this.startNode(),this.next(),this.type===S.parenL&&!this.allowDirectSuper&&this.raise(O.start,"super() call outside constructor of a subclass"),this.type!==S.dot&&this.type!==S.bracketL&&this.type!==S.parenL&&this.unexpected(),this.finishNode(O,"Super");case S._this:return O=this.startNode(),this.next(),this.finishNode(O,"ThisExpression");case S.name:var z=this.start,Q=this.startLoc,ae=this.containsEsc,pe=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!ae&&pe.name==="async"&&!this.canInsertSemicolon()&&this.eat(S._function))return this.overrideContext(gt.f_expr),this.parseFunction(this.startNodeAt(z,Q),0,!1,!0,_);if(D&&!this.canInsertSemicolon()){if(this.eat(S.arrow))return this.parseArrowExpression(this.startNodeAt(z,Q),[pe],!1,_);if(this.options.ecmaVersion>=8&&pe.name==="async"&&this.type===S.name&&!ae&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return pe=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(S.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(z,Q),[pe],!0,_)}return pe;case S.regexp:var Ce=this.value;return O=this.parseLiteral(Ce.value),O.regex={pattern:Ce.pattern,flags:Ce.flags},O;case S.num:case S.string:return this.parseLiteral(this.value);case S._null:case S._true:case S._false:return O=this.startNode(),O.value=this.type===S._null?null:this.type===S._true,O.raw=this.type.keyword,this.next(),this.finishNode(O,"Literal");case S.parenL:var Se=this.start,Oe=this.parseParenAndDistinguishExpression(D,_);return l&&(l.parenthesizedAssign<0&&!this.isSimpleAssignTarget(Oe)&&(l.parenthesizedAssign=Se),l.parenthesizedBind<0&&(l.parenthesizedBind=Se)),Oe;case S.bracketL:return O=this.startNode(),this.next(),O.elements=this.parseExprList(S.bracketR,!0,!0,l),this.finishNode(O,"ArrayExpression");case S.braceL:return this.overrideContext(gt.b_expr),this.parseObj(!1,l);case S._function:return O=this.startNode(),this.next(),this.parseFunction(O,0);case S._class:return this.parseClass(this.startNode(),!1);case S._new:return this.parseNew();case S.backQuote:return this.parseTemplate();case S._import:return this.options.ecmaVersion>=11?this.parseExprImport(E):this.unexpected();default:return this.parseExprAtomDefault()}},qe.parseExprAtomDefault=function(){this.unexpected()},qe.parseExprImport=function(l){var _=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===S.parenL&&!l)return this.parseDynamicImport(_);if(this.type===S.dot){var E=this.startNodeAt(_.start,_.loc&&_.loc.start);return E.name="import",_.meta=this.finishNode(E,"Identifier"),this.parseImportMeta(_)}else this.unexpected()},qe.parseDynamicImport=function(l){if(this.next(),l.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(S.parenR)?l.options=null:(this.expect(S.comma),this.afterTrailingComma(S.parenR)?l.options=null:(l.options=this.parseMaybeAssign(),this.eat(S.parenR)||(this.expect(S.comma),this.afterTrailingComma(S.parenR)||this.unexpected())));else if(!this.eat(S.parenR)){var _=this.start;this.eat(S.comma)&&this.eat(S.parenR)?this.raiseRecoverable(_,"Trailing comma is not allowed in import()"):this.unexpected(_)}return this.finishNode(l,"ImportExpression")},qe.parseImportMeta=function(l){this.next();var _=this.containsEsc;return l.property=this.parseIdent(!0),l.property.name!=="meta"&&this.raiseRecoverable(l.property.start,"The only valid meta property for import is 'import.meta'"),_&&this.raiseRecoverable(l.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(l.start,"Cannot use 'import.meta' outside a module"),this.finishNode(l,"MetaProperty")},qe.parseLiteral=function(l){var _=this.startNode();return _.value=l,_.raw=this.input.slice(this.start,this.end),_.raw.charCodeAt(_.raw.length-1)===110&&(_.bigint=_.value!=null?_.value.toString():_.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(_,"Literal")},qe.parseParenExpression=function(){this.expect(S.parenL);var l=this.parseExpression();return this.expect(S.parenR),l},qe.shouldParseArrow=function(l){return!this.canInsertSemicolon()},qe.parseParenAndDistinguishExpression=function(l,_){var E=this.start,O=this.startLoc,D,z=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var Q=this.start,ae=this.startLoc,pe=[],Ce=!0,Se=!1,Oe=new ua,gr=this.yieldPos,ho=this.awaitPos,fa;for(this.yieldPos=0,this.awaitPos=0;this.type!==S.parenR;)if(Ce?Ce=!1:this.expect(S.comma),z&&this.afterTrailingComma(S.parenR,!0)){Se=!0;break}else if(this.type===S.ellipsis){fa=this.start,pe.push(this.parseParenItem(this.parseRestBinding())),this.type===S.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else pe.push(this.parseMaybeAssign(!1,Oe,this.parseParenItem));var Nu=this.lastTokEnd,pa=this.lastTokEndLoc;if(this.expect(S.parenR),l&&this.shouldParseArrow(pe)&&this.eat(S.arrow))return this.checkPatternErrors(Oe,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=gr,this.awaitPos=ho,this.parseParenArrowList(E,O,pe,_);(!pe.length||Se)&&this.unexpected(this.lastTokStart),fa&&this.unexpected(fa),this.checkExpressionErrors(Oe,!0),this.yieldPos=gr||this.yieldPos,this.awaitPos=ho||this.awaitPos,pe.length>1?(D=this.startNodeAt(Q,ae),D.expressions=pe,this.finishNodeAt(D,"SequenceExpression",Nu,pa)):D=pe[0]}else D=this.parseParenExpression();if(this.options.preserveParens){var ha=this.startNodeAt(E,O);return ha.expression=D,this.finishNode(ha,"ParenthesizedExpression")}else return D},qe.parseParenItem=function(l){return l},qe.parseParenArrowList=function(l,_,E,O){return this.parseArrowExpression(this.startNodeAt(l,_),E,!1,O)};var d0=[];qe.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var l=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===S.dot){var _=this.startNodeAt(l.start,l.loc&&l.loc.start);_.name="new",l.meta=this.finishNode(_,"Identifier"),this.next();var E=this.containsEsc;return l.property=this.parseIdent(!0),l.property.name!=="target"&&this.raiseRecoverable(l.property.start,"The only valid meta property for new is 'new.target'"),E&&this.raiseRecoverable(l.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(l.start,"'new.target' can only be used in functions and class static block"),this.finishNode(l,"MetaProperty")}var O=this.start,D=this.startLoc;return l.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),O,D,!0,!1),this.eat(S.parenL)?l.arguments=this.parseExprList(S.parenR,this.options.ecmaVersion>=8,!1):l.arguments=d0,this.finishNode(l,"NewExpression")},qe.parseTemplateElement=function(l){var _=l.isTagged,E=this.startNode();return this.type===S.invalidTemplate?(_||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),E.value={raw:this.value.replace(/\r\n?/g,`
1220
+ `),cooked:null}):E.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
1221
+ `),cooked:this.value},this.next(),E.tail=this.type===S.backQuote,this.finishNode(E,"TemplateElement")},qe.parseTemplate=function(l){l===void 0&&(l={});var _=l.isTagged;_===void 0&&(_=!1);var E=this.startNode();this.next(),E.expressions=[];var O=this.parseTemplateElement({isTagged:_});for(E.quasis=[O];!O.tail;)this.type===S.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(S.dollarBraceL),E.expressions.push(this.parseExpression()),this.expect(S.braceR),E.quasis.push(O=this.parseTemplateElement({isTagged:_}));return this.next(),this.finishNode(E,"TemplateLiteral")},qe.isAsyncProp=function(l){return!l.computed&&l.key.type==="Identifier"&&l.key.name==="async"&&(this.type===S.name||this.type===S.num||this.type===S.string||this.type===S.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===S.star)&&!L.test(this.input.slice(this.lastTokEnd,this.start))},qe.parseObj=function(l,_){var E=this.startNode(),O=!0,D={};for(E.properties=[],this.next();!this.eat(S.braceR);){if(O)O=!1;else if(this.expect(S.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(S.braceR))break;var z=this.parseProperty(l,_);l||this.checkPropClash(z,D,_),E.properties.push(z)}return this.finishNode(E,l?"ObjectPattern":"ObjectExpression")},qe.parseProperty=function(l,_){var E=this.startNode(),O,D,z,Q;if(this.options.ecmaVersion>=9&&this.eat(S.ellipsis))return l?(E.argument=this.parseIdent(!1),this.type===S.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(E,"RestElement")):(E.argument=this.parseMaybeAssign(!1,_),this.type===S.comma&&_&&_.trailingComma<0&&(_.trailingComma=this.start),this.finishNode(E,"SpreadElement"));this.options.ecmaVersion>=6&&(E.method=!1,E.shorthand=!1,(l||_)&&(z=this.start,Q=this.startLoc),l||(O=this.eat(S.star)));var ae=this.containsEsc;return this.parsePropertyName(E),!l&&!ae&&this.options.ecmaVersion>=8&&!O&&this.isAsyncProp(E)?(D=!0,O=this.options.ecmaVersion>=9&&this.eat(S.star),this.parsePropertyName(E)):D=!1,this.parsePropertyValue(E,l,O,D,z,Q,_,ae),this.finishNode(E,"Property")},qe.parseGetterSetter=function(l){var _=l.key.name;this.parsePropertyName(l),l.value=this.parseMethod(!1),l.kind=_;var E=l.kind==="get"?0:1;if(l.value.params.length!==E){var O=l.value.start;l.kind==="get"?this.raiseRecoverable(O,"getter should have no params"):this.raiseRecoverable(O,"setter should have exactly one param")}else l.kind==="set"&&l.value.params[0].type==="RestElement"&&this.raiseRecoverable(l.value.params[0].start,"Setter cannot use rest params")},qe.parsePropertyValue=function(l,_,E,O,D,z,Q,ae){(E||O)&&this.type===S.colon&&this.unexpected(),this.eat(S.colon)?(l.value=_?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,Q),l.kind="init"):this.options.ecmaVersion>=6&&this.type===S.parenL?(_&&this.unexpected(),l.method=!0,l.value=this.parseMethod(E,O),l.kind="init"):!_&&!ae&&this.options.ecmaVersion>=5&&!l.computed&&l.key.type==="Identifier"&&(l.key.name==="get"||l.key.name==="set")&&this.type!==S.comma&&this.type!==S.braceR&&this.type!==S.eq?((E||O)&&this.unexpected(),this.parseGetterSetter(l)):this.options.ecmaVersion>=6&&!l.computed&&l.key.type==="Identifier"?((E||O)&&this.unexpected(),this.checkUnreserved(l.key),l.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=D),_?l.value=this.parseMaybeDefault(D,z,this.copyNode(l.key)):this.type===S.eq&&Q?(Q.shorthandAssign<0&&(Q.shorthandAssign=this.start),l.value=this.parseMaybeDefault(D,z,this.copyNode(l.key))):l.value=this.copyNode(l.key),l.kind="init",l.shorthand=!0):this.unexpected()},qe.parsePropertyName=function(l){if(this.options.ecmaVersion>=6){if(this.eat(S.bracketL))return l.computed=!0,l.key=this.parseMaybeAssign(),this.expect(S.bracketR),l.key;l.computed=!1}return l.key=this.type===S.num||this.type===S.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},qe.initFunction=function(l){l.id=null,this.options.ecmaVersion>=6&&(l.generator=l.expression=!1),this.options.ecmaVersion>=8&&(l.async=!1)},qe.parseMethod=function(l,_,E){var O=this.startNode(),D=this.yieldPos,z=this.awaitPos,Q=this.awaitIdentPos;return this.initFunction(O),this.options.ecmaVersion>=6&&(O.generator=l),this.options.ecmaVersion>=8&&(O.async=!!_),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(xs(_,O.generator)|Vr|(E?aa:0)),this.expect(S.parenL),O.params=this.parseBindingList(S.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(O,!1,!0,!1),this.yieldPos=D,this.awaitPos=z,this.awaitIdentPos=Q,this.finishNode(O,"FunctionExpression")},qe.parseArrowExpression=function(l,_,E,O){var D=this.yieldPos,z=this.awaitPos,Q=this.awaitIdentPos;return this.enterScope(xs(E,!1)|sa),this.initFunction(l),this.options.ecmaVersion>=8&&(l.async=!!E),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,l.params=this.toAssignableList(_,!0),this.parseFunctionBody(l,!0,!1,O),this.yieldPos=D,this.awaitPos=z,this.awaitIdentPos=Q,this.finishNode(l,"ArrowFunctionExpression")},qe.parseFunctionBody=function(l,_,E,O){var D=_&&this.type!==S.braceL,z=this.strict,Q=!1;if(D)l.body=this.parseMaybeAssign(O),l.expression=!0,this.checkParams(l,!1);else{var ae=this.options.ecmaVersion>=7&&!this.isSimpleParamList(l.params);(!z||ae)&&(Q=this.strictDirective(this.end),Q&&ae&&this.raiseRecoverable(l.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var pe=this.labels;this.labels=[],Q&&(this.strict=!0),this.checkParams(l,!z&&!Q&&!_&&!E&&this.isSimpleParamList(l.params)),this.strict&&l.id&&this.checkLValSimple(l.id,kh),l.body=this.parseBlock(!1,void 0,Q&&!z),l.expression=!1,this.adaptDirectivePrologue(l.body.body),this.labels=pe}this.exitScope()},qe.isSimpleParamList=function(l){for(var _=0,E=l;_<E.length;_+=1){var O=E[_];if(O.type!=="Identifier")return!1}return!0},qe.checkParams=function(l,_){for(var E=Object.create(null),O=0,D=l.params;O<D.length;O+=1){var z=D[O];this.checkLValInnerPattern(z,ks,_?null:E)}},qe.parseExprList=function(l,_,E,O){for(var D=[],z=!0;!this.eat(l);){if(z)z=!1;else if(this.expect(S.comma),_&&this.afterTrailingComma(l))break;var Q=void 0;E&&this.type===S.comma?Q=null:this.type===S.ellipsis?(Q=this.parseSpread(O),O&&this.type===S.comma&&O.trailingComma<0&&(O.trailingComma=this.start)):Q=this.parseMaybeAssign(!1,O),D.push(Q)}return D},qe.checkUnreserved=function(l){var _=l.start,E=l.end,O=l.name;if(this.inGenerator&&O==="yield"&&this.raiseRecoverable(_,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&O==="await"&&this.raiseRecoverable(_,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&wu)&&O==="arguments"&&this.raiseRecoverable(_,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(O==="arguments"||O==="await")&&this.raise(_,"Cannot use "+O+" in class static initialization block"),this.keywords.test(O)&&this.raise(_,"Unexpected keyword '"+O+"'"),!(this.options.ecmaVersion<6&&this.input.slice(_,E).indexOf("\\")!==-1)){var D=this.strict?this.reservedWordsStrict:this.reservedWords;D.test(O)&&(!this.inAsync&&O==="await"&&this.raiseRecoverable(_,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(_,"The keyword '"+O+"' is reserved"))}},qe.parseIdent=function(l){var _=this.parseIdentNode();return this.next(!!l),this.finishNode(_,"Identifier"),l||(this.checkUnreserved(_),_.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=_.start)),_},qe.parseIdentNode=function(){var l=this.startNode();return this.type===S.name?l.name=this.value:this.type.keyword?(l.name=this.type.keyword,(l.name==="class"||l.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=S.name):this.unexpected(),l},qe.parsePrivateIdent=function(){var l=this.startNode();return this.type===S.privateId?l.name=this.value:this.unexpected(),this.next(),this.finishNode(l,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(l.start,"Private field '#"+l.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(l)),l},qe.parseYield=function(l){this.yieldPos||(this.yieldPos=this.start);var _=this.startNode();return this.next(),this.type===S.semi||this.canInsertSemicolon()||this.type!==S.star&&!this.type.startsExpr?(_.delegate=!1,_.argument=null):(_.delegate=this.eat(S.star),_.argument=this.parseMaybeAssign(l)),this.finishNode(_,"YieldExpression")},qe.parseAwait=function(l){this.awaitPos||(this.awaitPos=this.start);var _=this.startNode();return this.next(),_.argument=this.parseMaybeUnary(null,!0,!1,l),this.finishNode(_,"AwaitExpression")};var Au=mt.prototype;Au.raise=function(l,_){var E=Ue(this.input,l);_+=" ("+E.line+":"+E.column+")",this.sourceFile&&(_+=" in "+this.sourceFile);var O=new SyntaxError(_);throw O.pos=l,O.loc=E,O.raisedAt=this.pos,O},Au.raiseRecoverable=Au.raise,Au.curPosition=function(){if(this.options.locations)return new ce(this.curLine,this.pos-this.lineStart)};var Zi=mt.prototype,wl=function(_){this.flags=_,this.var=[],this.lexical=[],this.functions=[]};Zi.enterScope=function(l){this.scopeStack.push(new wl(l))},Zi.exitScope=function(){this.scopeStack.pop()},Zi.treatFunctionsAsVarInScope=function(l){return l.flags&$n||!this.inModule&&l.flags&Bn},Zi.declareName=function(l,_,E){var O=!1;if(_===_n){var D=this.currentScope();O=D.lexical.indexOf(l)>-1||D.functions.indexOf(l)>-1||D.var.indexOf(l)>-1,D.lexical.push(l),this.inModule&&D.flags&Bn&&delete this.undefinedExports[l]}else if(_===oa){var z=this.currentScope();z.lexical.push(l)}else if(_===xh){var Q=this.currentScope();this.treatFunctionsAsVar?O=Q.lexical.indexOf(l)>-1:O=Q.lexical.indexOf(l)>-1||Q.var.indexOf(l)>-1,Q.functions.push(l)}else for(var ae=this.scopeStack.length-1;ae>=0;--ae){var pe=this.scopeStack[ae];if(pe.lexical.indexOf(l)>-1&&!(pe.flags&yl&&pe.lexical[0]===l)||!this.treatFunctionsAsVarInScope(pe)&&pe.functions.indexOf(l)>-1){O=!0;break}if(pe.var.push(l),this.inModule&&pe.flags&Bn&&delete this.undefinedExports[l],pe.flags&wu)break}O&&this.raiseRecoverable(E,"Identifier '"+l+"' has already been declared")},Zi.checkLocalExport=function(l){this.scopeStack[0].lexical.indexOf(l.name)===-1&&this.scopeStack[0].var.indexOf(l.name)===-1&&(this.undefinedExports[l.name]=l)},Zi.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Zi.currentVarScope=function(){for(var l=this.scopeStack.length-1;;l--){var _=this.scopeStack[l];if(_.flags&(wu|rn|ws))return _}},Zi.currentThisScope=function(){for(var l=this.scopeStack.length-1;;l--){var _=this.scopeStack[l];if(_.flags&(wu|rn|ws)&&!(_.flags&sa))return _}};var lo=function(_,E,O){this.type="",this.start=E,this.end=0,_.options.locations&&(this.loc=new Re(_,O)),_.options.directSourceFile&&(this.sourceFile=_.options.directSourceFile),_.options.ranges&&(this.range=[E,0])},Is=mt.prototype;Is.startNode=function(){return new lo(this,this.start,this.startLoc)},Is.startNodeAt=function(l,_){return new lo(this,l,_)};function Th(l,_,E,O){return l.type=_,l.end=E,this.options.locations&&(l.loc.end=O),this.options.ranges&&(l.range[1]=E),l}Is.finishNode=function(l,_){return Th.call(this,l,_,this.lastTokEnd,this.lastTokEndLoc)},Is.finishNodeAt=function(l,_,E,O){return Th.call(this,l,_,E,O)},Is.copyNode=function(l){var _=new lo(this,l.start,this.startLoc);for(var E in l)_[E]=l[E];return _};var m0="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",Eh="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Oh=Eh+" Extended_Pictographic",Nh=Oh,xl=Nh+" EBase EComp EMod EPres ExtPict",Lh=xl,g0=Lh,Ph={9:Eh,10:Oh,11:Nh,12:xl,13:Lh,14:g0},y0="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",_0={9:"",10:"",11:"",12:"",13:"",14:y0},Ch="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",qh="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Rh=qh+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Mh=Rh+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",fo=Mh+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Dh=fo+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Iu=Dh+" "+m0,v0={9:qh,10:Rh,11:Mh,12:fo,13:Dh,14:Iu},Fh={};function b0(l){var _=Fh[l]={binary:te(Ph[l]+" "+Ch),binaryOfStrings:te(_0[l]),nonBinary:{General_Category:te(Ch),Script:te(v0[l])}};_.nonBinary.Script_Extensions=_.nonBinary.Script,_.nonBinary.gc=_.nonBinary.General_Category,_.nonBinary.sc=_.nonBinary.Script,_.nonBinary.scx=_.nonBinary.Script_Extensions}for(var Tu=0,kl=[9,10,11,12,13,14];Tu<kl.length;Tu+=1){var jh=kl[Tu];b0(jh)}var be=mt.prototype,Eu=function(_,E){this.parent=_,this.base=E||this};Eu.prototype.separatedFrom=function(_){for(var E=this;E;E=E.parent)for(var O=_;O;O=O.parent)if(E.base===O.base&&E!==O)return!0;return!1},Eu.prototype.sibling=function(){return new Eu(this.parent,this.base)};var ui=function(_){this.parser=_,this.validFlags="gim"+(_.options.ecmaVersion>=6?"uy":"")+(_.options.ecmaVersion>=9?"s":"")+(_.options.ecmaVersion>=13?"d":"")+(_.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Fh[_.options.ecmaVersion>=14?14:_.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};ui.prototype.reset=function(_,E,O){var D=O.indexOf("v")!==-1,z=O.indexOf("u")!==-1;this.start=_|0,this.source=E+"",this.flags=O,D&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=z&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=z&&this.parser.options.ecmaVersion>=9)},ui.prototype.raise=function(_){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+_)},ui.prototype.at=function(_,E){E===void 0&&(E=!1);var O=this.source,D=O.length;if(_>=D)return-1;var z=O.charCodeAt(_);if(!(E||this.switchU)||z<=55295||z>=57344||_+1>=D)return z;var Q=O.charCodeAt(_+1);return Q>=56320&&Q<=57343?(z<<10)+Q-56613888:z},ui.prototype.nextIndex=function(_,E){E===void 0&&(E=!1);var O=this.source,D=O.length;if(_>=D)return D;var z=O.charCodeAt(_),Q;return!(E||this.switchU)||z<=55295||z>=57344||_+1>=D||(Q=O.charCodeAt(_+1))<56320||Q>57343?_+1:_+2},ui.prototype.current=function(_){return _===void 0&&(_=!1),this.at(this.pos,_)},ui.prototype.lookahead=function(_){return _===void 0&&(_=!1),this.at(this.nextIndex(this.pos,_),_)},ui.prototype.advance=function(_){_===void 0&&(_=!1),this.pos=this.nextIndex(this.pos,_)},ui.prototype.eat=function(_,E){return E===void 0&&(E=!1),this.current(E)===_?(this.advance(E),!0):!1},ui.prototype.eatChars=function(_,E){E===void 0&&(E=!1);for(var O=this.pos,D=0,z=_;D<z.length;D+=1){var Q=z[D],ae=this.at(O,E);if(ae===-1||ae!==Q)return!1;O=this.nextIndex(O,E)}return this.pos=O,!0},be.validateRegExpFlags=function(l){for(var _=l.validFlags,E=l.flags,O=!1,D=!1,z=0;z<E.length;z++){var Q=E.charAt(z);_.indexOf(Q)===-1&&this.raise(l.start,"Invalid regular expression flag"),E.indexOf(Q,z+1)>-1&&this.raise(l.start,"Duplicate regular expression flag"),Q==="u"&&(O=!0),Q==="v"&&(D=!0)}this.options.ecmaVersion>=15&&O&&D&&this.raise(l.start,"Invalid regular expression flag")};function S0(l){for(var _ in l)return!0;return!1}be.validateRegExpPattern=function(l){this.regexp_pattern(l),!l.switchN&&this.options.ecmaVersion>=9&&S0(l.groupNames)&&(l.switchN=!0,this.regexp_pattern(l))},be.regexp_pattern=function(l){l.pos=0,l.lastIntValue=0,l.lastStringValue="",l.lastAssertionIsQuantifiable=!1,l.numCapturingParens=0,l.maxBackReference=0,l.groupNames=Object.create(null),l.backReferenceNames.length=0,l.branchID=null,this.regexp_disjunction(l),l.pos!==l.source.length&&(l.eat(41)&&l.raise("Unmatched ')'"),(l.eat(93)||l.eat(125))&&l.raise("Lone quantifier brackets")),l.maxBackReference>l.numCapturingParens&&l.raise("Invalid escape");for(var _=0,E=l.backReferenceNames;_<E.length;_+=1){var O=E[_];l.groupNames[O]||l.raise("Invalid named capture referenced")}},be.regexp_disjunction=function(l){var _=this.options.ecmaVersion>=16;for(_&&(l.branchID=new Eu(l.branchID,null)),this.regexp_alternative(l);l.eat(124);)_&&(l.branchID=l.branchID.sibling()),this.regexp_alternative(l);_&&(l.branchID=l.branchID.parent),this.regexp_eatQuantifier(l,!0)&&l.raise("Nothing to repeat"),l.eat(123)&&l.raise("Lone quantifier brackets")},be.regexp_alternative=function(l){for(;l.pos<l.source.length&&this.regexp_eatTerm(l););},be.regexp_eatTerm=function(l){return this.regexp_eatAssertion(l)?(l.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(l)&&l.switchU&&l.raise("Invalid quantifier"),!0):(l.switchU?this.regexp_eatAtom(l):this.regexp_eatExtendedAtom(l))?(this.regexp_eatQuantifier(l),!0):!1},be.regexp_eatAssertion=function(l){var _=l.pos;if(l.lastAssertionIsQuantifiable=!1,l.eat(94)||l.eat(36))return!0;if(l.eat(92)){if(l.eat(66)||l.eat(98))return!0;l.pos=_}if(l.eat(40)&&l.eat(63)){var E=!1;if(this.options.ecmaVersion>=9&&(E=l.eat(60)),l.eat(61)||l.eat(33))return this.regexp_disjunction(l),l.eat(41)||l.raise("Unterminated group"),l.lastAssertionIsQuantifiable=!E,!0}return l.pos=_,!1},be.regexp_eatQuantifier=function(l,_){return _===void 0&&(_=!1),this.regexp_eatQuantifierPrefix(l,_)?(l.eat(63),!0):!1},be.regexp_eatQuantifierPrefix=function(l,_){return l.eat(42)||l.eat(43)||l.eat(63)||this.regexp_eatBracedQuantifier(l,_)},be.regexp_eatBracedQuantifier=function(l,_){var E=l.pos;if(l.eat(123)){var O=0,D=-1;if(this.regexp_eatDecimalDigits(l)&&(O=l.lastIntValue,l.eat(44)&&this.regexp_eatDecimalDigits(l)&&(D=l.lastIntValue),l.eat(125)))return D!==-1&&D<O&&!_&&l.raise("numbers out of order in {} quantifier"),!0;l.switchU&&!_&&l.raise("Incomplete quantifier"),l.pos=E}return!1},be.regexp_eatAtom=function(l){return this.regexp_eatPatternCharacters(l)||l.eat(46)||this.regexp_eatReverseSolidusAtomEscape(l)||this.regexp_eatCharacterClass(l)||this.regexp_eatUncapturingGroup(l)||this.regexp_eatCapturingGroup(l)},be.regexp_eatReverseSolidusAtomEscape=function(l){var _=l.pos;if(l.eat(92)){if(this.regexp_eatAtomEscape(l))return!0;l.pos=_}return!1},be.regexp_eatUncapturingGroup=function(l){var _=l.pos;if(l.eat(40)){if(l.eat(63)){if(this.options.ecmaVersion>=16){var E=this.regexp_eatModifiers(l),O=l.eat(45);if(E||O){for(var D=0;D<E.length;D++){var z=E.charAt(D);E.indexOf(z,D+1)>-1&&l.raise("Duplicate regular expression modifiers")}if(O){var Q=this.regexp_eatModifiers(l);!E&&!Q&&l.current()===58&&l.raise("Invalid regular expression modifiers");for(var ae=0;ae<Q.length;ae++){var pe=Q.charAt(ae);(Q.indexOf(pe,ae+1)>-1||E.indexOf(pe)>-1)&&l.raise("Duplicate regular expression modifiers")}}}}if(l.eat(58)){if(this.regexp_disjunction(l),l.eat(41))return!0;l.raise("Unterminated group")}}l.pos=_}return!1},be.regexp_eatCapturingGroup=function(l){if(l.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(l):l.current()===63&&l.raise("Invalid group"),this.regexp_disjunction(l),l.eat(41))return l.numCapturingParens+=1,!0;l.raise("Unterminated group")}return!1},be.regexp_eatModifiers=function(l){for(var _="",E=0;(E=l.current())!==-1&&Bh(E);)_+=ue(E),l.advance();return _};function Bh(l){return l===105||l===109||l===115}be.regexp_eatExtendedAtom=function(l){return l.eat(46)||this.regexp_eatReverseSolidusAtomEscape(l)||this.regexp_eatCharacterClass(l)||this.regexp_eatUncapturingGroup(l)||this.regexp_eatCapturingGroup(l)||this.regexp_eatInvalidBracedQuantifier(l)||this.regexp_eatExtendedPatternCharacter(l)},be.regexp_eatInvalidBracedQuantifier=function(l){return this.regexp_eatBracedQuantifier(l,!0)&&l.raise("Nothing to repeat"),!1},be.regexp_eatSyntaxCharacter=function(l){var _=l.current();return Al(_)?(l.lastIntValue=_,l.advance(),!0):!1};function Al(l){return l===36||l>=40&&l<=43||l===46||l===63||l>=91&&l<=94||l>=123&&l<=125}be.regexp_eatPatternCharacters=function(l){for(var _=l.pos,E=0;(E=l.current())!==-1&&!Al(E);)l.advance();return l.pos!==_},be.regexp_eatExtendedPatternCharacter=function(l){var _=l.current();return _!==-1&&_!==36&&!(_>=40&&_<=43)&&_!==46&&_!==63&&_!==91&&_!==94&&_!==124?(l.advance(),!0):!1},be.regexp_groupSpecifier=function(l){if(l.eat(63)){this.regexp_eatGroupName(l)||l.raise("Invalid group");var _=this.options.ecmaVersion>=16,E=l.groupNames[l.lastStringValue];if(E)if(_)for(var O=0,D=E;O<D.length;O+=1){var z=D[O];z.separatedFrom(l.branchID)||l.raise("Duplicate capture group name")}else l.raise("Duplicate capture group name");_?(E||(l.groupNames[l.lastStringValue]=[])).push(l.branchID):l.groupNames[l.lastStringValue]=!0}},be.regexp_eatGroupName=function(l){if(l.lastStringValue="",l.eat(60)){if(this.regexp_eatRegExpIdentifierName(l)&&l.eat(62))return!0;l.raise("Invalid capture group name")}return!1},be.regexp_eatRegExpIdentifierName=function(l){if(l.lastStringValue="",this.regexp_eatRegExpIdentifierStart(l)){for(l.lastStringValue+=ue(l.lastIntValue);this.regexp_eatRegExpIdentifierPart(l);)l.lastStringValue+=ue(l.lastIntValue);return!0}return!1},be.regexp_eatRegExpIdentifierStart=function(l){var _=l.pos,E=this.options.ecmaVersion>=11,O=l.current(E);return l.advance(E),O===92&&this.regexp_eatRegExpUnicodeEscapeSequence(l,E)&&(O=l.lastIntValue),$h(O)?(l.lastIntValue=O,!0):(l.pos=_,!1)};function $h(l){return h(l,!0)||l===36||l===95}be.regexp_eatRegExpIdentifierPart=function(l){var _=l.pos,E=this.options.ecmaVersion>=11,O=l.current(E);return l.advance(E),O===92&&this.regexp_eatRegExpUnicodeEscapeSequence(l,E)&&(O=l.lastIntValue),Il(O)?(l.lastIntValue=O,!0):(l.pos=_,!1)};function Il(l){return y(l,!0)||l===36||l===95||l===8204||l===8205}be.regexp_eatAtomEscape=function(l){return this.regexp_eatBackReference(l)||this.regexp_eatCharacterClassEscape(l)||this.regexp_eatCharacterEscape(l)||l.switchN&&this.regexp_eatKGroupName(l)?!0:(l.switchU&&(l.current()===99&&l.raise("Invalid unicode escape"),l.raise("Invalid escape")),!1)},be.regexp_eatBackReference=function(l){var _=l.pos;if(this.regexp_eatDecimalEscape(l)){var E=l.lastIntValue;if(l.switchU)return E>l.maxBackReference&&(l.maxBackReference=E),!0;if(E<=l.numCapturingParens)return!0;l.pos=_}return!1},be.regexp_eatKGroupName=function(l){if(l.eat(107)){if(this.regexp_eatGroupName(l))return l.backReferenceNames.push(l.lastStringValue),!0;l.raise("Invalid named reference")}return!1},be.regexp_eatCharacterEscape=function(l){return this.regexp_eatControlEscape(l)||this.regexp_eatCControlLetter(l)||this.regexp_eatZero(l)||this.regexp_eatHexEscapeSequence(l)||this.regexp_eatRegExpUnicodeEscapeSequence(l,!1)||!l.switchU&&this.regexp_eatLegacyOctalEscapeSequence(l)||this.regexp_eatIdentityEscape(l)},be.regexp_eatCControlLetter=function(l){var _=l.pos;if(l.eat(99)){if(this.regexp_eatControlLetter(l))return!0;l.pos=_}return!1},be.regexp_eatZero=function(l){return l.current()===48&&!la(l.lookahead())?(l.lastIntValue=0,l.advance(),!0):!1},be.regexp_eatControlEscape=function(l){var _=l.current();return _===116?(l.lastIntValue=9,l.advance(),!0):_===110?(l.lastIntValue=10,l.advance(),!0):_===118?(l.lastIntValue=11,l.advance(),!0):_===102?(l.lastIntValue=12,l.advance(),!0):_===114?(l.lastIntValue=13,l.advance(),!0):!1},be.regexp_eatControlLetter=function(l){var _=l.current();return Vh(_)?(l.lastIntValue=_%32,l.advance(),!0):!1};function Vh(l){return l>=65&&l<=90||l>=97&&l<=122}be.regexp_eatRegExpUnicodeEscapeSequence=function(l,_){_===void 0&&(_=!1);var E=l.pos,O=_||l.switchU;if(l.eat(117)){if(this.regexp_eatFixedHexDigits(l,4)){var D=l.lastIntValue;if(O&&D>=55296&&D<=56319){var z=l.pos;if(l.eat(92)&&l.eat(117)&&this.regexp_eatFixedHexDigits(l,4)){var Q=l.lastIntValue;if(Q>=56320&&Q<=57343)return l.lastIntValue=(D-55296)*1024+(Q-56320)+65536,!0}l.pos=z,l.lastIntValue=D}return!0}if(O&&l.eat(123)&&this.regexp_eatHexDigits(l)&&l.eat(125)&&Uh(l.lastIntValue))return!0;O&&l.raise("Invalid unicode escape"),l.pos=E}return!1};function Uh(l){return l>=0&&l<=1114111}be.regexp_eatIdentityEscape=function(l){if(l.switchU)return this.regexp_eatSyntaxCharacter(l)?!0:l.eat(47)?(l.lastIntValue=47,!0):!1;var _=l.current();return _!==99&&(!l.switchN||_!==107)?(l.lastIntValue=_,l.advance(),!0):!1},be.regexp_eatDecimalEscape=function(l){l.lastIntValue=0;var _=l.current();if(_>=49&&_<=57){do l.lastIntValue=10*l.lastIntValue+(_-48),l.advance();while((_=l.current())>=48&&_<=57);return!0}return!1};var po=0,ci=1,vn=2;be.regexp_eatCharacterClassEscape=function(l){var _=l.current();if(Wh(_))return l.lastIntValue=-1,l.advance(),ci;var E=!1;if(l.switchU&&this.options.ecmaVersion>=9&&((E=_===80)||_===112)){l.lastIntValue=-1,l.advance();var O;if(l.eat(123)&&(O=this.regexp_eatUnicodePropertyValueExpression(l))&&l.eat(125))return E&&O===vn&&l.raise("Invalid property name"),O;l.raise("Invalid property name")}return po};function Wh(l){return l===100||l===68||l===115||l===83||l===119||l===87}be.regexp_eatUnicodePropertyValueExpression=function(l){var _=l.pos;if(this.regexp_eatUnicodePropertyName(l)&&l.eat(61)){var E=l.lastStringValue;if(this.regexp_eatUnicodePropertyValue(l)){var O=l.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(l,E,O),ci}}if(l.pos=_,this.regexp_eatLoneUnicodePropertyNameOrValue(l)){var D=l.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(l,D)}return po},be.regexp_validateUnicodePropertyNameAndValue=function(l,_,E){ee(l.unicodeProperties.nonBinary,_)||l.raise("Invalid property name"),l.unicodeProperties.nonBinary[_].test(E)||l.raise("Invalid property value")},be.regexp_validateUnicodePropertyNameOrValue=function(l,_){if(l.unicodeProperties.binary.test(_))return ci;if(l.switchV&&l.unicodeProperties.binaryOfStrings.test(_))return vn;l.raise("Invalid property name")},be.regexp_eatUnicodePropertyName=function(l){var _=0;for(l.lastStringValue="";Tl(_=l.current());)l.lastStringValue+=ue(_),l.advance();return l.lastStringValue!==""};function Tl(l){return Vh(l)||l===95}be.regexp_eatUnicodePropertyValue=function(l){var _=0;for(l.lastStringValue="";El(_=l.current());)l.lastStringValue+=ue(_),l.advance();return l.lastStringValue!==""};function El(l){return Tl(l)||la(l)}be.regexp_eatLoneUnicodePropertyNameOrValue=function(l){return this.regexp_eatUnicodePropertyValue(l)},be.regexp_eatCharacterClass=function(l){if(l.eat(91)){var _=l.eat(94),E=this.regexp_classContents(l);return l.eat(93)||l.raise("Unterminated character class"),_&&E===vn&&l.raise("Negated character class may contain strings"),!0}return!1},be.regexp_classContents=function(l){return l.current()===93?ci:l.switchV?this.regexp_classSetExpression(l):(this.regexp_nonEmptyClassRanges(l),ci)},be.regexp_nonEmptyClassRanges=function(l){for(;this.regexp_eatClassAtom(l);){var _=l.lastIntValue;if(l.eat(45)&&this.regexp_eatClassAtom(l)){var E=l.lastIntValue;l.switchU&&(_===-1||E===-1)&&l.raise("Invalid character class"),_!==-1&&E!==-1&&_>E&&l.raise("Range out of order in character class")}}},be.regexp_eatClassAtom=function(l){var _=l.pos;if(l.eat(92)){if(this.regexp_eatClassEscape(l))return!0;if(l.switchU){var E=l.current();(E===99||Ll(E))&&l.raise("Invalid class escape"),l.raise("Invalid escape")}l.pos=_}var O=l.current();return O!==93?(l.lastIntValue=O,l.advance(),!0):!1},be.regexp_eatClassEscape=function(l){var _=l.pos;if(l.eat(98))return l.lastIntValue=8,!0;if(l.switchU&&l.eat(45))return l.lastIntValue=45,!0;if(!l.switchU&&l.eat(99)){if(this.regexp_eatClassControlLetter(l))return!0;l.pos=_}return this.regexp_eatCharacterClassEscape(l)||this.regexp_eatCharacterEscape(l)},be.regexp_classSetExpression=function(l){var _=ci,E;if(!this.regexp_eatClassSetRange(l))if(E=this.regexp_eatClassSetOperand(l)){E===vn&&(_=vn);for(var O=l.pos;l.eatChars([38,38]);){if(l.current()!==38&&(E=this.regexp_eatClassSetOperand(l))){E!==vn&&(_=ci);continue}l.raise("Invalid character in character class")}if(O!==l.pos)return _;for(;l.eatChars([45,45]);)this.regexp_eatClassSetOperand(l)||l.raise("Invalid character in character class");if(O!==l.pos)return _}else l.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(l)){if(E=this.regexp_eatClassSetOperand(l),!E)return _;E===vn&&(_=vn)}},be.regexp_eatClassSetRange=function(l){var _=l.pos;if(this.regexp_eatClassSetCharacter(l)){var E=l.lastIntValue;if(l.eat(45)&&this.regexp_eatClassSetCharacter(l)){var O=l.lastIntValue;return E!==-1&&O!==-1&&E>O&&l.raise("Range out of order in character class"),!0}l.pos=_}return!1},be.regexp_eatClassSetOperand=function(l){return this.regexp_eatClassSetCharacter(l)?ci:this.regexp_eatClassStringDisjunction(l)||this.regexp_eatNestedClass(l)},be.regexp_eatNestedClass=function(l){var _=l.pos;if(l.eat(91)){var E=l.eat(94),O=this.regexp_classContents(l);if(l.eat(93))return E&&O===vn&&l.raise("Negated character class may contain strings"),O;l.pos=_}if(l.eat(92)){var D=this.regexp_eatCharacterClassEscape(l);if(D)return D;l.pos=_}return null},be.regexp_eatClassStringDisjunction=function(l){var _=l.pos;if(l.eatChars([92,113])){if(l.eat(123)){var E=this.regexp_classStringDisjunctionContents(l);if(l.eat(125))return E}else l.raise("Invalid escape");l.pos=_}return null},be.regexp_classStringDisjunctionContents=function(l){for(var _=this.regexp_classString(l);l.eat(124);)this.regexp_classString(l)===vn&&(_=vn);return _},be.regexp_classString=function(l){for(var _=0;this.regexp_eatClassSetCharacter(l);)_++;return _===1?ci:vn},be.regexp_eatClassSetCharacter=function(l){var _=l.pos;if(l.eat(92))return this.regexp_eatCharacterEscape(l)||this.regexp_eatClassSetReservedPunctuator(l)?!0:l.eat(98)?(l.lastIntValue=8,!0):(l.pos=_,!1);var E=l.current();return E<0||E===l.lookahead()&&w0(E)||Gh(E)?!1:(l.advance(),l.lastIntValue=E,!0)};function w0(l){return l===33||l>=35&&l<=38||l>=42&&l<=44||l===46||l>=58&&l<=64||l===94||l===96||l===126}function Gh(l){return l===40||l===41||l===45||l===47||l>=91&&l<=93||l>=123&&l<=125}be.regexp_eatClassSetReservedPunctuator=function(l){var _=l.current();return Ol(_)?(l.lastIntValue=_,l.advance(),!0):!1};function Ol(l){return l===33||l===35||l===37||l===38||l===44||l===45||l>=58&&l<=62||l===64||l===96||l===126}be.regexp_eatClassControlLetter=function(l){var _=l.current();return la(_)||_===95?(l.lastIntValue=_%32,l.advance(),!0):!1},be.regexp_eatHexEscapeSequence=function(l){var _=l.pos;if(l.eat(120)){if(this.regexp_eatFixedHexDigits(l,2))return!0;l.switchU&&l.raise("Invalid escape"),l.pos=_}return!1},be.regexp_eatDecimalDigits=function(l){var _=l.pos,E=0;for(l.lastIntValue=0;la(E=l.current());)l.lastIntValue=10*l.lastIntValue+(E-48),l.advance();return l.pos!==_};function la(l){return l>=48&&l<=57}be.regexp_eatHexDigits=function(l){var _=l.pos,E=0;for(l.lastIntValue=0;Ts(E=l.current());)l.lastIntValue=16*l.lastIntValue+Nl(E),l.advance();return l.pos!==_};function Ts(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function Nl(l){return l>=65&&l<=70?10+(l-65):l>=97&&l<=102?10+(l-97):l-48}be.regexp_eatLegacyOctalEscapeSequence=function(l){if(this.regexp_eatOctalDigit(l)){var _=l.lastIntValue;if(this.regexp_eatOctalDigit(l)){var E=l.lastIntValue;_<=3&&this.regexp_eatOctalDigit(l)?l.lastIntValue=_*64+E*8+l.lastIntValue:l.lastIntValue=_*8+E}else l.lastIntValue=_;return!0}return!1},be.regexp_eatOctalDigit=function(l){var _=l.current();return Ll(_)?(l.lastIntValue=_-48,l.advance(),!0):(l.lastIntValue=0,!1)};function Ll(l){return l>=48&&l<=55}be.regexp_eatFixedHexDigits=function(l,_){var E=l.pos;l.lastIntValue=0;for(var O=0;O<_;++O){var D=l.current();if(!Ts(D))return l.pos=E,!1;l.lastIntValue=16*l.lastIntValue+Nl(D),l.advance()}return!0};var Ou=function(_){this.type=_.type,this.value=_.value,this.start=_.start,this.end=_.end,_.options.locations&&(this.loc=new Re(_,_.startLoc,_.endLoc)),_.options.ranges&&(this.range=[_.start,_.end])},He=mt.prototype;He.next=function(l){!l&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Ou(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},He.getToken=function(){return this.next(),new Ou(this)},typeof Symbol<"u"&&(He[Symbol.iterator]=function(){var l=this;return{next:function(){var _=l.getToken();return{done:_.type===S.eof,value:_}}}}),He.nextToken=function(){var l=this.curContext();if((!l||!l.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(S.eof);if(l.override)return l.override(this);this.readToken(this.fullCharCodeAtPos())},He.readToken=function(l){return h(l,this.options.ecmaVersion>=6)||l===92?this.readWord():this.getTokenFromCode(l)},He.fullCharCodeAt=function(l){var _=this.input.charCodeAt(l);if(_<=55295||_>=56320)return _;var E=this.input.charCodeAt(l+1);return E<=56319||E>=57344?_:(_<<10)+E-56613888},He.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},He.skipBlockComment=function(){var l=this.options.onComment&&this.curPosition(),_=this.pos,E=this.input.indexOf("*/",this.pos+=2);if(E===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=E+2,this.options.locations)for(var O=void 0,D=_;(O=F(this.input,D,this.pos))>-1;)++this.curLine,D=this.lineStart=O;this.options.onComment&&this.options.onComment(!0,this.input.slice(_+2,E),_,this.pos,l,this.curPosition())},He.skipLineComment=function(l){for(var _=this.pos,E=this.options.onComment&&this.curPosition(),O=this.input.charCodeAt(this.pos+=l);this.pos<this.input.length&&!M(O);)O=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(_+l,this.pos),_,this.pos,E,this.curPosition())},He.skipSpace=function(){e:for(;this.pos<this.input.length;){var l=this.input.charCodeAt(this.pos);switch(l){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(l>8&&l<14||l>=5760&&X.test(String.fromCharCode(l)))++this.pos;else break e}}},He.finishToken=function(l,_){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var E=this.type;this.type=l,this.value=_,this.updateContext(E)},He.readToken_dot=function(){var l=this.input.charCodeAt(this.pos+1);if(l>=48&&l<=57)return this.readNumber(!0);var _=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&l===46&&_===46?(this.pos+=3,this.finishToken(S.ellipsis)):(++this.pos,this.finishToken(S.dot))},He.readToken_slash=function(){var l=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):l===61?this.finishOp(S.assign,2):this.finishOp(S.slash,1)},He.readToken_mult_modulo_exp=function(l){var _=this.input.charCodeAt(this.pos+1),E=1,O=l===42?S.star:S.modulo;return this.options.ecmaVersion>=7&&l===42&&_===42&&(++E,O=S.starstar,_=this.input.charCodeAt(this.pos+2)),_===61?this.finishOp(S.assign,E+1):this.finishOp(O,E)},He.readToken_pipe_amp=function(l){var _=this.input.charCodeAt(this.pos+1);if(_===l){if(this.options.ecmaVersion>=12){var E=this.input.charCodeAt(this.pos+2);if(E===61)return this.finishOp(S.assign,3)}return this.finishOp(l===124?S.logicalOR:S.logicalAND,2)}return _===61?this.finishOp(S.assign,2):this.finishOp(l===124?S.bitwiseOR:S.bitwiseAND,1)},He.readToken_caret=function(){var l=this.input.charCodeAt(this.pos+1);return l===61?this.finishOp(S.assign,2):this.finishOp(S.bitwiseXOR,1)},He.readToken_plus_min=function(l){var _=this.input.charCodeAt(this.pos+1);return _===l?_===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||L.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(S.incDec,2):_===61?this.finishOp(S.assign,2):this.finishOp(S.plusMin,1)},He.readToken_lt_gt=function(l){var _=this.input.charCodeAt(this.pos+1),E=1;return _===l?(E=l===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+E)===61?this.finishOp(S.assign,E+1):this.finishOp(S.bitShift,E)):_===33&&l===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(_===61&&(E=2),this.finishOp(S.relational,E))},He.readToken_eq_excl=function(l){var _=this.input.charCodeAt(this.pos+1);return _===61?this.finishOp(S.equality,this.input.charCodeAt(this.pos+2)===61?3:2):l===61&&_===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(S.arrow)):this.finishOp(l===61?S.eq:S.prefix,1)},He.readToken_question=function(){var l=this.options.ecmaVersion;if(l>=11){var _=this.input.charCodeAt(this.pos+1);if(_===46){var E=this.input.charCodeAt(this.pos+2);if(E<48||E>57)return this.finishOp(S.questionDot,2)}if(_===63){if(l>=12){var O=this.input.charCodeAt(this.pos+2);if(O===61)return this.finishOp(S.assign,3)}return this.finishOp(S.coalesce,2)}}return this.finishOp(S.question,1)},He.readToken_numberSign=function(){var l=this.options.ecmaVersion,_=35;if(l>=13&&(++this.pos,_=this.fullCharCodeAtPos(),h(_,!0)||_===92))return this.finishToken(S.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ue(_)+"'")},He.getTokenFromCode=function(l){switch(l){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(S.parenL);case 41:return++this.pos,this.finishToken(S.parenR);case 59:return++this.pos,this.finishToken(S.semi);case 44:return++this.pos,this.finishToken(S.comma);case 91:return++this.pos,this.finishToken(S.bracketL);case 93:return++this.pos,this.finishToken(S.bracketR);case 123:return++this.pos,this.finishToken(S.braceL);case 125:return++this.pos,this.finishToken(S.braceR);case 58:return++this.pos,this.finishToken(S.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(S.backQuote);case 48:var _=this.input.charCodeAt(this.pos+1);if(_===120||_===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(_===111||_===79)return this.readRadixNumber(8);if(_===98||_===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(l);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(l);case 124:case 38:return this.readToken_pipe_amp(l);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(l);case 60:case 62:return this.readToken_lt_gt(l);case 61:case 33:return this.readToken_eq_excl(l);case 63:return this.readToken_question();case 126:return this.finishOp(S.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ue(l)+"'")},He.finishOp=function(l,_){var E=this.input.slice(this.pos,this.pos+_);return this.pos+=_,this.finishToken(l,E)},He.readRegexp=function(){for(var l,_,E=this.pos;;){this.pos>=this.input.length&&this.raise(E,"Unterminated regular expression");var O=this.input.charAt(this.pos);if(L.test(O)&&this.raise(E,"Unterminated regular expression"),l)l=!1;else{if(O==="[")_=!0;else if(O==="]"&&_)_=!1;else if(O==="/"&&!_)break;l=O==="\\"}++this.pos}var D=this.input.slice(E,this.pos);++this.pos;var z=this.pos,Q=this.readWord1();this.containsEsc&&this.unexpected(z);var ae=this.regexpState||(this.regexpState=new ui(this));ae.reset(E,D,Q),this.validateRegExpFlags(ae),this.validateRegExpPattern(ae);var pe=null;try{pe=new RegExp(D,Q)}catch{}return this.finishToken(S.regexp,{pattern:D,flags:Q,value:pe})},He.readInt=function(l,_,E){for(var O=this.options.ecmaVersion>=12&&_===void 0,D=E&&this.input.charCodeAt(this.pos)===48,z=this.pos,Q=0,ae=0,pe=0,Ce=_??1/0;pe<Ce;++pe,++this.pos){var Se=this.input.charCodeAt(this.pos),Oe=void 0;if(O&&Se===95){D&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),ae===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),pe===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),ae=Se;continue}if(Se>=97?Oe=Se-97+10:Se>=65?Oe=Se-65+10:Se>=48&&Se<=57?Oe=Se-48:Oe=1/0,Oe>=l)break;ae=Se,Q=Q*l+Oe}return O&&ae===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===z||_!=null&&this.pos-z!==_?null:Q};function Hh(l,_){return _?parseInt(l,8):parseFloat(l.replace(/_/g,""))}function Pl(l){return typeof BigInt!="function"?null:BigInt(l.replace(/_/g,""))}He.readRadixNumber=function(l){var _=this.pos;this.pos+=2;var E=this.readInt(l);return E==null&&this.raise(this.start+2,"Expected number in radix "+l),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(E=Pl(this.input.slice(_,this.pos)),++this.pos):h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(S.num,E)},He.readNumber=function(l){var _=this.pos;!l&&this.readInt(10,void 0,!0)===null&&this.raise(_,"Invalid number");var E=this.pos-_>=2&&this.input.charCodeAt(_)===48;E&&this.strict&&this.raise(_,"Invalid number");var O=this.input.charCodeAt(this.pos);if(!E&&!l&&this.options.ecmaVersion>=11&&O===110){var D=Pl(this.input.slice(_,this.pos));return++this.pos,h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(S.num,D)}E&&/[89]/.test(this.input.slice(_,this.pos))&&(E=!1),O===46&&!E&&(++this.pos,this.readInt(10),O=this.input.charCodeAt(this.pos)),(O===69||O===101)&&!E&&(O=this.input.charCodeAt(++this.pos),(O===43||O===45)&&++this.pos,this.readInt(10)===null&&this.raise(_,"Invalid number")),h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var z=Hh(this.input.slice(_,this.pos),E);return this.finishToken(S.num,z)},He.readCodePoint=function(){var l=this.input.charCodeAt(this.pos),_;if(l===123){this.options.ecmaVersion<6&&this.unexpected();var E=++this.pos;_=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,_>1114111&&this.invalidStringToken(E,"Code point out of bounds")}else _=this.readHexChar(4);return _},He.readString=function(l){for(var _="",E=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var O=this.input.charCodeAt(this.pos);if(O===l)break;O===92?(_+=this.input.slice(E,this.pos),_+=this.readEscapedChar(!1),E=this.pos):O===8232||O===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(M(O)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return _+=this.input.slice(E,this.pos++),this.finishToken(S.string,_)};var Cl={};He.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(l){if(l===Cl)this.readInvalidTemplateToken();else throw l}this.inTemplateElement=!1},He.invalidStringToken=function(l,_){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Cl;this.raise(l,_)},He.readTmplToken=function(){for(var l="",_=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var E=this.input.charCodeAt(this.pos);if(E===96||E===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===S.template||this.type===S.invalidTemplate)?E===36?(this.pos+=2,this.finishToken(S.dollarBraceL)):(++this.pos,this.finishToken(S.backQuote)):(l+=this.input.slice(_,this.pos),this.finishToken(S.template,l));if(E===92)l+=this.input.slice(_,this.pos),l+=this.readEscapedChar(!0),_=this.pos;else if(M(E)){switch(l+=this.input.slice(_,this.pos),++this.pos,E){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:l+=`
1222
+ `;break;default:l+=String.fromCharCode(E);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),_=this.pos}else++this.pos}},He.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(S.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
1223
+ `&&++this.pos;case`
1224
+ `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")},He.readEscapedChar=function(l){var _=this.input.charCodeAt(++this.pos);switch(++this.pos,_){case 110:return`
1225
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ue(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),l){var E=this.pos-1;this.invalidStringToken(E,"Invalid escape sequence in template string")}default:if(_>=48&&_<=55){var O=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],D=parseInt(O,8);return D>255&&(O=O.slice(0,-1),D=parseInt(O,8)),this.pos+=O.length-1,_=this.input.charCodeAt(this.pos),(O!=="0"||_===56||_===57)&&(this.strict||l)&&this.invalidStringToken(this.pos-1-O.length,l?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(D)}return M(_)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(_)}},He.readHexChar=function(l){var _=this.pos,E=this.readInt(16,l);return E===null&&this.invalidStringToken(_,"Bad character escape sequence"),E},He.readWord1=function(){this.containsEsc=!1;for(var l="",_=!0,E=this.pos,O=this.options.ecmaVersion>=6;this.pos<this.input.length;){var D=this.fullCharCodeAtPos();if(y(D,O))this.pos+=D<=65535?1:2;else if(D===92){this.containsEsc=!0,l+=this.input.slice(E,this.pos);var z=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var Q=this.readCodePoint();(_?h:y)(Q,O)||this.invalidStringToken(z,"Invalid Unicode escape"),l+=ue(Q),E=this.pos}else break;_=!1}return l+this.input.slice(E,this.pos)},He.readWord=function(){var l=this.readWord1(),_=S.name;return this.keywords.test(l)&&(_=I[l]),this.finishToken(_,l)};var zh="8.16.0";mt.acorn={Parser:mt,version:zh,defaultOptions:Nt,Position:ce,SourceLocation:Re,getLineInfo:Ue,Node:lo,TokenType:w,tokTypes:S,keywordTypes:I,TokContext:sn,tokContexts:gt,isIdentifierChar:y,isIdentifierStart:h,Token:Ou,isNewLine:M,lineBreak:L,lineBreakG:R,nonASCIIwhitespace:X};function x0(l,_){return mt.parse(l,_)}function k0(l,_,E){return mt.parseExpressionAt(l,_,E)}function Jh(l,_){return mt.tokenizer(l,_)}t.Node=lo,t.Parser=mt,t.Position=ce,t.SourceLocation=Re,t.TokContext=sn,t.Token=Ou,t.TokenType=w,t.defaultOptions=Nt,t.getLineInfo=Ue,t.isIdentifierChar=y,t.isIdentifierStart=h,t.isNewLine=M,t.keywordTypes=I,t.lineBreak=L,t.lineBreakG=R,t.nonASCIIwhitespace=X,t.parse=x0,t.parseExpressionAt=k0,t.tokContexts=gt,t.tokTypes=S,t.tokenizer=Jh,t.version=zh}))});var tv=P(ev=>{"use strict";b();Object.defineProperty(ev,"__esModule",{value:!0});ev.SUPPORTED_ASSET_IMAGE_EXTENSIONS=void 0;ev.SUPPORTED_ASSET_IMAGE_EXTENSIONS=["jpg","jpeg","png","gif","webp","heic","ico"]});var Tp=P(Qi=>{"use strict";b();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.identity=void 0;Qi.unique=Wle;Qi.assertNever=Gle;Qi.unexpected=Hle;Qi.isString=Jle;Qi.extname=Kle;Qi.exists=Qle;Qi.acceptsLocalBlocks=Yle;function Wle(t){return[...new Set(t)]}function Gle(t){throw new Error(`Unknown module type ${t}`)}function Hle(){return new Error("Unexpected code path encountered")}var zle=t=>t;Qi.identity=zle;function Jle(t){return typeof t=="string"}function Kle(t){return t.split(".").pop()||""}async function Qle(t,e){return t.stat(e).then(()=>!0).catch(()=>!1)}async function Yle(t,e){var r;let n=await e.getSectionSchema(t).catch(s=>{});if(!n)return new Error("Section does not exist");let i=n.validSchema;return i instanceof Error?i:((r=i.blocks)!==null&&r!==void 0?r:[]).some(s=>s.type&&"name"in s&&s.name)}});var Xk=P(uu=>{"use strict";b();Object.defineProperty(uu,"__esModule",{value:!0});uu.toCssSourceCode=Yk;uu.toSvgSourceCode=tfe;uu.toJsSourceCode=Dj;uu.parseJs=Fj;uu.toSourceCode=nfe;var Mj=gn(),Xle=Rj(),Zle=tv(),efe=Tp();async function Yk(t,e){return{type:"css",uri:t,source:e,ast:new Error("File parsing not implemented yet")}}async function tfe(t,e){return{type:"svg",uri:t,source:e,ast:new Error("File parsing not implemented yet")}}async function rfe(t,e){return{type:"image",uri:t,source:e,ast:new Error("Image files are not parsed")}}async function Dj(t,e){return{type:"javascript",uri:t,source:e,ast:Fj(e)}}function Fj(t){try{return(0,Xle.parse)(t,{ecmaVersion:"latest",sourceType:"module"})}catch(e){return(0,Mj.asError)(e)}}async function nfe(t,e){let r=(0,efe.extname)(t);if(r==="json"||r==="liquid")return(0,Mj.toSourceCode)(t,e);if(r==="js")return Dj(t,e);if(r==="css")return Yk(t,e);if(r==="svg")return Yk(t,e);if(Zle.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(r))return rfe(t,e);throw new Error(`Unknown source code type for ${t}`)}});var jj=P(eA=>{"use strict";b();Object.defineProperty(eA,"__esModule",{value:!0});eA.augmentDependencies=sfe;var cu=gn(),ife=Xk(),Zk=Tp();function sfe(t,e){var r;return{fs:e.fs,getBlockSchema:(0,cu.memoize)(e.getBlockSchema,Zk.identity),getSectionSchema:(0,cu.memoize)(e.getSectionSchema,Zk.identity),getSourceCode:(0,cu.memoize)((r=e.getSourceCode)!==null&&r!==void 0?r:async function(i){let s=await e.fs.readFile(i);return(0,ife.toSourceCode)(i,s)},Zk.identity),getWebComponentDefinitionReference:e.getWebComponentDefinitionReference,getThemeBlockNames:(0,cu.memo)(()=>(0,cu.recursiveReadDirectory)(e.fs,cu.path.join(t,"blocks"),([n])=>n.endsWith(".liquid")).then(n=>n.map(i=>cu.path.basename(i,".liquid"))))}}});var rA=P(ys=>{"use strict";b();Object.defineProperty(ys,"__esModule",{value:!0});ys.getModule=ofe;ys.getTemplateModule=$j;ys.getThemeBlockModule=Vj;ys.getSectionModule=Uj;ys.getSectionGroupModule=Wj;ys.getAssetModule=Gj;ys.getSnippetModule=Hj;ys.getLayoutModule=zj;var si=gn(),afe=tv(),Bj=Tp(),tA=new WeakMap;function ofe(t,e){let r=Jj(t);if(r.has(e))return r.get(e);let n=si.path.relative(e,t.rootUri);switch(!0){case n.startsWith("assets"):return Gj(t,si.path.basename(e));case n.startsWith("blocks"):return Vj(t,si.path.basename(e,".liquid"));case n.startsWith("layout"):return zj(t,si.path.basename(e,".liquid"));case n.startsWith("sections"):return n.endsWith(".json")?Wj(t,si.path.basename(e,".json")):Uj(t,si.path.basename(e,".liquid"));case n.startsWith("snippets"):return Hj(t,si.path.basename(e,".liquid"));case n.startsWith("templates"):return $j(t,e)}}function $j(t,e){switch((0,Bj.extname)(e)){case"json":return $a(t,{type:"JSON",kind:"template",dependencies:[],references:[],uri:e});case"liquid":return $a(t,{type:"Liquid",kind:"template",dependencies:[],references:[],uri:e});default:throw new Error(`Unknown template type for ${e}`)}}function Vj(t,e){let r=si.path.join(t.rootUri,"blocks",`${e}.liquid`);return $a(t,{type:"Liquid",kind:"block",dependencies:[],references:[],uri:r})}function Uj(t,e){let r=si.path.join(t.rootUri,"sections",`${e}.liquid`);return $a(t,{type:"Liquid",kind:"section",dependencies:[],references:[],uri:r})}function Wj(t,e){let r=si.path.join(t.rootUri,"sections",`${e}.json`);return $a(t,{type:"JSON",kind:"section-group",dependencies:[],references:[],uri:r})}function Gj(t,e){let r=(0,Bj.extname)(e),n;if(afe.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(r)?n="Image":r==="js"?n="JavaScript":r==="css"?n="CSS":r==="svg"&&(n="SVG"),!!n)return $a(t,{type:n,kind:"unused",dependencies:[],references:[],uri:si.path.join(t.rootUri,"assets",e)})}function Hj(t,e){let r=si.path.join(t.rootUri,"snippets",`${e}.liquid`);return $a(t,{type:"Liquid",kind:"snippet",uri:r,dependencies:[],references:[]})}function zj(t,e="theme"){if(e===!1)return;e===void 0&&(e="theme");let r=si.path.join(t.rootUri,"layout",`${e}.liquid`);return $a(t,{type:"Liquid",kind:"layout",uri:r,dependencies:[],references:[]})}function Jj(t){return tA.has(t)||tA.set(t,new Map),tA.get(t)}function $a(t,e){let r=Jj(t);return r.has(e.uri)||r.set(e.uri,e),r.get(e.uri)}});var Zj=P(rv=>{"use strict";b();Object.defineProperty(rv,"__esModule",{value:!0});rv.traverseModule=Ei;rv.bind=Oi;var lu=Ge(),Br=gn(),_s=Tp(),en=rA();async function Ei(t,e,r){if(!e.modules[t.uri]&&(e.modules[t.uri]=t,t.exists=await(0,_s.exists)(r.fs,t.uri),!!t.exists))switch(t.type){case"Liquid":return ufe(t,e,r);case"JSON":return pfe(t,e,r);case"JavaScript":return;case"CSS":case"SVG":case"Image":return;default:return(0,_s.assertNever)(t)}}async function ufe(t,e,r){let n=await r.getSourceCode(t.uri);if(n.ast instanceof Error)return;let i={LiquidFilter:(c,p)=>{if(["asset_url","asset_img_url","inline_asset_content"].includes(c.name)){let d=p[p.length-1];if(d.type!==lu.NodeTypes.LiquidVariable||d.expression.type!==lu.NodeTypes.String||d.filters[0]!==c)return;let m=d.expression.value,h=(0,en.getAssetModule)(e,m);return h?{target:h,sourceRange:[d.position.start,d.position.end]}:void 0}},ContentForMarkup:(c,p)=>{let d=p.at(-1);if(c.contentForType.value!=="block")return;let m=c.args.find(w=>w.name==="type");if(!m)return;let h=m.value;if(h.type!==lu.NodeTypes.String)return;let y=h.value;return{target:(0,en.getThemeBlockModule)(e,y),sourceRange:[d.position.start,c.position.end]}},HtmlElement:c=>{if(c.name.length!==1||c.name[0].type!==lu.NodeTypes.TextNode)return;let p=c.name[0],d=p.value;if(!d.includes("-"))return;let m=r.getWebComponentDefinitionReference(d);if(!m)return;let{assetName:h,range:y}=m,w=(0,en.getAssetModule)(e,h);if(w)return{target:w,sourceRange:[c.blockStartPosition.start,p.position.end],targetRange:y}},RenderMarkup:(c,p)=>{let d=c.snippet,m=p.at(-1);if(!(0,_s.isString)(d)&&d.type===lu.NodeTypes.String)return{target:(0,en.getSnippetModule)(e,d.value),sourceRange:[m.position.start,m.position.end]}},LiquidTag:c=>{switch(c.name){case lu.NamedTags.sections:if(!(0,_s.isString)(c.markup)){let p=c.markup.value;return{target:(0,en.getSectionGroupModule)(e,p),sourceRange:[c.position.start,c.position.end]}}case lu.NamedTags.section:if(!(0,_s.isString)(c.markup)){let p=c.markup.value;return{target:(0,en.getSectionModule)(e,p),sourceRange:[c.position.start,c.position.end]}}}}},s=(0,Br.visit)(n.ast,i);for(let c of s)Oi(t,c.target,{sourceRange:c.sourceRange,targetRange:c.targetRange});let u=(0,_s.unique)(s.map(c=>c.target)).map(c=>Ei(c,e,r));if(t.kind==="section"){let c=Br.path.basename(t.uri,".liquid"),p=await r.getSectionSchema(c);u.push(Kj(p,t,e,r))}else if(t.kind==="block"){let c=Br.path.basename(t.uri,".liquid"),p=await r.getBlockSchema(c);u.push(Kj(p,t,e,r))}return Promise.all(u)}async function Kj(t,e,r,n){if(!t||e.kind==="section"&&await(0,_s.acceptsLocalBlocks)(Br.path.basename(e.uri,".liquid"),n))return;let{ast:a,validSchema:u}=t;if(u instanceof Error||a instanceof Error)return;let c=[];return u.blocks&&c.push(cfe(t,e,a,u.blocks,r,n)),u.presets&&c.push(lfe(t,e,a,u.presets,r,n)),"default"in u&&u.default&&c.push(ffe(t,e,a,u.default,r,n)),Promise.all(c)}async function cfe(t,e,r,n,i,s){let a=[];for(let[u,c]of Object.entries(n)){let p=["blocks",u],m=(0,Br.nodeAtPath)(r,p).children.find(y=>y.key.value==="type");if(!m)continue;let h=[t.offset+m.loc.start.offset,t.offset+m.loc.end.offset];switch(c.type){case"@theme":{let y=await s.getThemeBlockNames().then(w=>w.filter(x=>!x.startsWith("_")));for(let w of y){let x=(0,en.getThemeBlockModule)(i,Br.path.basename(w,".liquid"));Oi(e,x,{sourceRange:h,type:"indirect"}),a.push(Ei(x,i,s))}break}case"@app":break;default:{let y=(0,en.getThemeBlockModule)(i,c.type);Oi(e,y,{sourceRange:h}),a.push(Ei(y,i,s))}}}return Promise.all(a)}async function lfe(t,e,r,n,i,s){let a=[];for(let[u,c]of n.entries()){if(!("blocks"in c))continue;let p=Array.isArray(c.blocks)?c.blocks.entries():Object.entries(c.blocks);for(let[d,m]of p){let h=["presets",u,"blocks",d],y=(0,Br.nodeAtPath)(r,h),w=(0,en.getThemeBlockModule)(i,m.type);if(!w)continue;let x=y.children.find(v=>v.key.value==="type");if(!x)continue;let k=[t.offset+x.loc.start.offset,t.offset+x.loc.end.offset];Oi(e,w,{sourceRange:k,type:"preset"}),a.push(Ei(w,i,s)),m.blocks&&a.push(Yj(t,e,r,m.blocks,h,i,s))}}return Promise.all(a)}async function Yj(t,e,r,n,i,s,a){let u=[],c=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,d]of c){let m=[...i,"blocks",p],h=(0,Br.nodeAtPath)(r,m),y=(0,en.getThemeBlockModule)(s,d.type);if(!y)continue;let w=h.children.find(k=>k.key.value==="type");if(!w)continue;let x=[t.offset+w.loc.start.offset,t.offset+w.loc.end.offset];Oi(e,y,{sourceRange:x,type:"preset"}),u.push(Ei(y,s,a)),d.blocks&&u.push(Yj(t,e,r,d.blocks,m,s,a))}return Promise.all(u)}async function ffe(t,e,r,n,i,s){let a=[];if(!("blocks"in n))return;let u=Array.isArray(n.blocks)?n.blocks.entries():Object.entries(n.blocks);for(let[c,p]of u){let d=["default","blocks",c],m=(0,Br.nodeAtPath)(r,d),h=(0,en.getThemeBlockModule)(i,p.type);if(!h)continue;let y=m.children.find(x=>x.key.value==="type");if(!y)continue;let w=[t.offset+y.loc.start.offset,t.offset+y.loc.end.offset];Oi(e,h,{sourceRange:w,type:"preset"}),a.push(Ei(h,i,s))}return Promise.all(a)}async function pfe(t,e,r){let n=await r.getSourceCode(t.uri);if(n.type!==Br.SourceCodeType.JSON)throw(0,_s.unexpected)();let i=n.ast;if(!(i instanceof Error))switch(t.kind){case"template":{let s=(0,Br.parseJSON)(n.source),a=[];for(let[p,d]of Object.entries(s.sections)){let m=d.type,h=["sections",p],y=(0,Br.nodeAtPath)(i,h),w=(0,en.getSectionModule)(e,m),x=y.children.find(T=>T.key.value==="type"),k=x.loc.start.offset,v=x.loc.end.offset;Oi(t,w,{sourceRange:[k,v]}),a.push(Ei(w,e,r),Qj(t,i,h,d,e,r))}let u=s.layout,c=(0,en.getLayoutModule)(e,s.layout);if(c){let p,d=!0;if(u!==!1&&u!==void 0){let m=["layout"],h=(0,Br.nodeAtPath)(i,m);p=[h.loc.start.offset,h.loc.end.offset],d=!1}Oi(t,c,{sourceRange:p,type:"indirect"}),a.push(Ei(c,e,r))}return Promise.all(a)}case"section-group":{let s=(0,Br.parseJSON)(n.source),a=[];for(let[u,c]of Object.entries(s.sections)){let p=c.type,d=["sections",u],m=(0,Br.nodeAtPath)(i,d),h=(0,en.getSectionModule)(e,p),y=m.children.find(v=>v.key.value==="type"),w=y.loc.start.offset,x=y.loc.end.offset;Oi(t,h,{sourceRange:[w,x]}),a.push(Ei(h,e,r),Qj(t,i,d,c,e,r))}return Promise.all(a)}default:return(0,_s.assertNever)(t.kind)}}async function Qj(t,e,r=[],n,i,s){if(!n.blocks||await(0,_s.acceptsLocalBlocks)(n.type,s))return;let u=[];for(let[c,p]of Object.entries(n.blocks)){let d=p.type,m=(0,en.getThemeBlockModule)(i,d),h=[...r,"blocks",c],w=(0,Br.nodeAtPath)(e,h).children.find(I=>I.key.value==="type"),x=w.loc.start.offset,k=w.loc.end.offset;Oi(t,m,{sourceRange:[x,k]}),u.push(Ei(m,i,s),Xj(t,e,h,p,i,s))}return Promise.all(u)}async function Xj(t,e,r=[],n,i,s){if(!n.blocks)return;let a=[];for(let[u,c]of Object.entries(n.blocks)){let p=c.type,d=(0,en.getThemeBlockModule)(i,p),m=[...r,"blocks",u],y=(0,Br.nodeAtPath)(e,m).children.find(v=>v.key.value==="type"),w=y.loc.start.offset,x=y.loc.end.offset;Oi(t,d,{sourceRange:[w,x]}),a.push(Ei(d,i,s),Xj(t,e,m,c,i,s))}return Promise.all(a)}function Oi(t,e,{sourceRange:r,targetRange:n,type:i="direct"}={}){let s={source:{uri:t.uri,range:r},target:{uri:e.uri,range:n},type:i};t.dependencies.push(s),e.references.push(s)}});var e6=P(iA=>{"use strict";b();Object.defineProperty(iA,"__esModule",{value:!0});iA.buildThemeGraph=gfe;var nA=gn(),hfe=jj(),dfe=rA(),mfe=Zj();async function gfe(t,e,r){let n=(0,hfe.augmentDependencies)(t,e);r=r??await(0,nA.recursiveReadDirectory)(n.fs,t,([s])=>{let a=s.startsWith(nA.path.join(t,"templates")),u=s.startsWith(nA.path.join(t,"sections"))&&s.endsWith(".liquid");return a||u});let i={entryPoints:[],modules:{},rootUri:t};return i.entryPoints=r.map(s=>(0,dfe.getModule)(i,s)).filter(s=>s!==void 0),await Promise.all(i.entryPoints.map(s=>(0,mfe.traverseModule)(s,i,n))),i}});var t6=P(sA=>{"use strict";b();Object.defineProperty(sA,"__esModule",{value:!0});sA.serializeThemeGraph=yfe;function yfe(t){let e=Object.values(t.modules).map(n=>({uri:n.uri,type:n.type,kind:n.kind,..."exists"in n?{exists:n.exists}:{}})),r=Object.values(t.modules).flatMap(n=>n.dependencies);return{rootUri:t.rootUri,nodes:e,edges:r}}});var n6=P((nv,r6)=>{b();(function(t,e){typeof nv=="object"&&typeof r6<"u"?e(nv):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e((t.acorn=t.acorn||{},t.acorn.walk={})))})(nv,(function(t){"use strict";function e(v,I,T,S,L){T||(T=k),(function R(M,F,X){var H=X||M.type;x(T,H,M,F,R),I[H]&&I[H](M,F)})(v,S,L)}function r(v,I,T,S,L){var R=[];T||(T=k),(function M(F,X,H){var $=H||F.type,B=F!==R[R.length-1];B&&R.push(F),x(T,$,F,X,M),I[$]&&I[$](F,X||R,R),B&&R.pop()})(v,S,L)}function n(v,I,T,S,L){var R=T?h(T,S||void 0):S;(function M(F,X,H){R[H||F.type](F,X,M)})(v,I,L)}function i(v){return typeof v=="string"?function(I){return I===v}:v||function(){return!0}}var s=function(I,T){this.node=I,this.state=T};function a(v,I,T,S,L){T||(T=k);var R;(function M(F,X,H){var $=H||F.type;x(T,$,F,X,M),R!==F&&(I(F,X,$),R=F)})(v,S,L)}function u(v,I,T,S){T||(T=k);var L=[],R;(function M(F,X,H){var $=H||F.type,B=F!==L[L.length-1];B&&L.push(F),x(T,$,F,X,M),R!==F&&(I(F,X||L,L,$),R=F),B&&L.pop()})(v,S)}function c(v,I,T,S,L,R){L||(L=k),S=i(S);try{(function M(F,X,H){var $=H||F.type;if((I==null||F.start<=I)&&(T==null||F.end>=T)&&x(L,$,F,X,M),(I==null||F.start===I)&&(T==null||F.end===T)&&S($,F))throw new s(F,X)})(v,R)}catch(M){if(M instanceof s)return M;throw M}}function p(v,I,T,S,L){T=i(T),S||(S=k);try{(function R(M,F,X){var H=X||M.type;if(!(M.start>I||M.end<I)&&(x(S,H,M,F,R),T(H,M)))throw new s(M,F)})(v,L)}catch(R){if(R instanceof s)return R;throw R}}function d(v,I,T,S,L){T=i(T),S||(S=k);try{(function R(M,F,X){if(!(M.end<I)){var H=X||M.type;if(M.start>=I&&T(H,M))throw new s(M,F);x(S,H,M,F,R)}})(v,L)}catch(R){if(R instanceof s)return R;throw R}}function m(v,I,T,S,L){T=i(T),S||(S=k);var R;return(function M(F,X,H){if(!(F.start>I)){var $=H||F.type;F.end<=I&&(!R||R.node.end<F.end)&&T($,F)&&(R=new s(F,X)),x(S,$,F,X,M)}})(v,L),R}function h(v,I){var T=Object.create(I||k);for(var S in v)T[S]=v[S];return T}function y(v,I,T){T(v,I)}function w(v,I,T){}function x(v,I,T,S,L){if(v[I]==null)throw new Error("No walker function defined for node type "+I);v[I](T,S,L)}var k={};k.Program=k.BlockStatement=k.StaticBlock=function(v,I,T){for(var S=0,L=v.body;S<L.length;S+=1){var R=L[S];T(R,I,"Statement")}},k.Statement=y,k.EmptyStatement=w,k.ExpressionStatement=k.ParenthesizedExpression=k.ChainExpression=function(v,I,T){return T(v.expression,I,"Expression")},k.IfStatement=function(v,I,T){T(v.test,I,"Expression"),T(v.consequent,I,"Statement"),v.alternate&&T(v.alternate,I,"Statement")},k.LabeledStatement=function(v,I,T){return T(v.body,I,"Statement")},k.BreakStatement=k.ContinueStatement=w,k.WithStatement=function(v,I,T){T(v.object,I,"Expression"),T(v.body,I,"Statement")},k.SwitchStatement=function(v,I,T){T(v.discriminant,I,"Expression");for(var S=0,L=v.cases;S<L.length;S+=1){var R=L[S];T(R,I)}},k.SwitchCase=function(v,I,T){v.test&&T(v.test,I,"Expression");for(var S=0,L=v.consequent;S<L.length;S+=1){var R=L[S];T(R,I,"Statement")}},k.ReturnStatement=k.YieldExpression=k.AwaitExpression=function(v,I,T){v.argument&&T(v.argument,I,"Expression")},k.ThrowStatement=k.SpreadElement=function(v,I,T){return T(v.argument,I,"Expression")},k.TryStatement=function(v,I,T){T(v.block,I,"Statement"),v.handler&&T(v.handler,I),v.finalizer&&T(v.finalizer,I,"Statement")},k.CatchClause=function(v,I,T){v.param&&T(v.param,I,"Pattern"),T(v.body,I,"Statement")},k.WhileStatement=k.DoWhileStatement=function(v,I,T){T(v.test,I,"Expression"),T(v.body,I,"Statement")},k.ForStatement=function(v,I,T){v.init&&T(v.init,I,"ForInit"),v.test&&T(v.test,I,"Expression"),v.update&&T(v.update,I,"Expression"),T(v.body,I,"Statement")},k.ForInStatement=k.ForOfStatement=function(v,I,T){T(v.left,I,"ForInit"),T(v.right,I,"Expression"),T(v.body,I,"Statement")},k.ForInit=function(v,I,T){v.type==="VariableDeclaration"?T(v,I):T(v,I,"Expression")},k.DebuggerStatement=w,k.FunctionDeclaration=function(v,I,T){return T(v,I,"Function")},k.VariableDeclaration=function(v,I,T){for(var S=0,L=v.declarations;S<L.length;S+=1){var R=L[S];T(R,I)}},k.VariableDeclarator=function(v,I,T){T(v.id,I,"Pattern"),v.init&&T(v.init,I,"Expression")},k.Function=function(v,I,T){v.id&&T(v.id,I,"Pattern");for(var S=0,L=v.params;S<L.length;S+=1){var R=L[S];T(R,I,"Pattern")}T(v.body,I,v.expression?"Expression":"Statement")},k.Pattern=function(v,I,T){v.type==="Identifier"?T(v,I,"VariablePattern"):v.type==="MemberExpression"?T(v,I,"MemberPattern"):T(v,I)},k.VariablePattern=w,k.MemberPattern=y,k.RestElement=function(v,I,T){return T(v.argument,I,"Pattern")},k.ArrayPattern=function(v,I,T){for(var S=0,L=v.elements;S<L.length;S+=1){var R=L[S];R&&T(R,I,"Pattern")}},k.ObjectPattern=function(v,I,T){for(var S=0,L=v.properties;S<L.length;S+=1){var R=L[S];R.type==="Property"?(R.computed&&T(R.key,I,"Expression"),T(R.value,I,"Pattern")):R.type==="RestElement"&&T(R.argument,I,"Pattern")}},k.Expression=y,k.ThisExpression=k.Super=k.MetaProperty=w,k.ArrayExpression=function(v,I,T){for(var S=0,L=v.elements;S<L.length;S+=1){var R=L[S];R&&T(R,I,"Expression")}},k.ObjectExpression=function(v,I,T){for(var S=0,L=v.properties;S<L.length;S+=1){var R=L[S];T(R,I)}},k.FunctionExpression=k.ArrowFunctionExpression=k.FunctionDeclaration,k.SequenceExpression=function(v,I,T){for(var S=0,L=v.expressions;S<L.length;S+=1){var R=L[S];T(R,I,"Expression")}},k.TemplateLiteral=function(v,I,T){for(var S=0,L=v.quasis;S<L.length;S+=1){var R=L[S];T(R,I)}for(var M=0,F=v.expressions;M<F.length;M+=1){var X=F[M];T(X,I,"Expression")}},k.TemplateElement=w,k.UnaryExpression=k.UpdateExpression=function(v,I,T){T(v.argument,I,"Expression")},k.BinaryExpression=k.LogicalExpression=function(v,I,T){T(v.left,I,"Expression"),T(v.right,I,"Expression")},k.AssignmentExpression=k.AssignmentPattern=function(v,I,T){T(v.left,I,"Pattern"),T(v.right,I,"Expression")},k.ConditionalExpression=function(v,I,T){T(v.test,I,"Expression"),T(v.consequent,I,"Expression"),T(v.alternate,I,"Expression")},k.NewExpression=k.CallExpression=function(v,I,T){if(T(v.callee,I,"Expression"),v.arguments)for(var S=0,L=v.arguments;S<L.length;S+=1){var R=L[S];T(R,I,"Expression")}},k.MemberExpression=function(v,I,T){T(v.object,I,"Expression"),v.computed&&T(v.property,I,"Expression")},k.ExportNamedDeclaration=k.ExportDefaultDeclaration=function(v,I,T){if(v.declaration&&T(v.declaration,I,v.type==="ExportNamedDeclaration"||v.declaration.id?"Statement":"Expression"),v.source&&T(v.source,I,"Expression"),v.attributes)for(var S=0,L=v.attributes;S<L.length;S+=1){var R=L[S];T(R,I)}},k.ExportAllDeclaration=function(v,I,T){if(v.exported&&T(v.exported,I),T(v.source,I,"Expression"),v.attributes)for(var S=0,L=v.attributes;S<L.length;S+=1){var R=L[S];T(R,I)}},k.ImportAttribute=function(v,I,T){T(v.value,I,"Expression")},k.ImportDeclaration=function(v,I,T){for(var S=0,L=v.specifiers;S<L.length;S+=1){var R=L[S];T(R,I)}if(T(v.source,I,"Expression"),v.attributes)for(var M=0,F=v.attributes;M<F.length;M+=1){var X=F[M];T(X,I)}},k.ImportExpression=function(v,I,T){T(v.source,I,"Expression"),v.options&&T(v.options,I,"Expression")},k.ImportSpecifier=k.ImportDefaultSpecifier=k.ImportNamespaceSpecifier=k.Identifier=k.PrivateIdentifier=k.Literal=w,k.TaggedTemplateExpression=function(v,I,T){T(v.tag,I,"Expression"),T(v.quasi,I,"Expression")},k.ClassDeclaration=k.ClassExpression=function(v,I,T){return T(v,I,"Class")},k.Class=function(v,I,T){v.id&&T(v.id,I,"Pattern"),v.superClass&&T(v.superClass,I,"Expression"),T(v.body,I)},k.ClassBody=function(v,I,T){for(var S=0,L=v.body;S<L.length;S+=1){var R=L[S];T(R,I)}},k.MethodDefinition=k.PropertyDefinition=k.Property=function(v,I,T){v.computed&&T(v.key,I,"Expression"),v.value&&T(v.value,I,"Expression")},t.ancestor=r,t.base=k,t.findNodeAfter=d,t.findNodeAround=p,t.findNodeAt=c,t.findNodeBefore=m,t.full=a,t.fullAncestor=u,t.make=h,t.recursive=n,t.simple=e}))});var s6=P(iv=>{"use strict";b();Object.defineProperty(iv,"__esModule",{value:!0});iv.getWebComponentMap=bfe;iv.findWebComponentReferences=i6;var aA=gn(),_fe=n6(),vfe=/^[a-z][-.\d_a-z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*([-][-.\d_a-z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*)$/u;async function bfe(t,{fs:e,getSourceCode:r}){let n=new Map,i=aA.path.join(t,"assets"),s=await(0,aA.recursiveReadDirectory)(e,i,([a])=>a.endsWith(".js"));return await Promise.all(s.map(a=>i6(a,i,r,n))),n}async function i6(t,e,r,n){let i=await r(t);if(i.type!=="javascript")return;let s=i.ast;if(!(s instanceof Error))for(let a of s.body)(0,_fe.ancestor)(a,{Literal(u,c,p){if(typeof u.value=="string"&&vfe.test(u.value)){let d=p.at(-2);if(!d||d.type!=="CallExpression")return;let m=d.callee;if(m.type!=="MemberExpression")return;let h=m.property;if(h.type!=="Identifier"||h.name!=="define")return;n.set(u.value,{assetName:aA.path.relative(t,e),range:[h.start,u.end]})}return null}})}});var o6=P(qt=>{"use strict";b();var Sfe=qt&&qt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),wfe=qt&&qt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Sfe(e,t,r)};Object.defineProperty(qt,"__esModule",{value:!0});qt.toSvgSourceCode=qt.toSourceCode=qt.toJsSourceCode=qt.toCssSourceCode=qt.findWebComponentReferences=qt.getWebComponentMap=qt.serializeThemeGraph=qt.buildThemeGraph=void 0;var xfe=e6();Object.defineProperty(qt,"buildThemeGraph",{enumerable:!0,get:function(){return xfe.buildThemeGraph}});var kfe=t6();Object.defineProperty(qt,"serializeThemeGraph",{enumerable:!0,get:function(){return kfe.serializeThemeGraph}});var a6=s6();Object.defineProperty(qt,"getWebComponentMap",{enumerable:!0,get:function(){return a6.getWebComponentMap}});Object.defineProperty(qt,"findWebComponentReferences",{enumerable:!0,get:function(){return a6.findWebComponentReferences}});var sv=Xk();Object.defineProperty(qt,"toCssSourceCode",{enumerable:!0,get:function(){return sv.toCssSourceCode}});Object.defineProperty(qt,"toJsSourceCode",{enumerable:!0,get:function(){return sv.toJsSourceCode}});Object.defineProperty(qt,"toSourceCode",{enumerable:!0,get:function(){return sv.toSourceCode}});Object.defineProperty(qt,"toSvgSourceCode",{enumerable:!0,get:function(){return sv.toSvgSourceCode}});wfe(tv(),qt)});var l6=P((iTe,uA)=>{"use strict";b();var Rt=Te("path"),u6=Te("os"),Va=u6.homedir(),oA=u6.tmpdir(),{env:Jc}=process,Afe=t=>{let e=Rt.join(Va,"Library");return{data:Rt.join(e,"Application Support",t),config:Rt.join(e,"Preferences",t),cache:Rt.join(e,"Caches",t),log:Rt.join(e,"Logs",t),temp:Rt.join(oA,t)}},Ife=t=>{let e=Jc.APPDATA||Rt.join(Va,"AppData","Roaming"),r=Jc.LOCALAPPDATA||Rt.join(Va,"AppData","Local");return{data:Rt.join(r,t,"Data"),config:Rt.join(e,t,"Config"),cache:Rt.join(r,t,"Cache"),log:Rt.join(r,t,"Log"),temp:Rt.join(oA,t)}},Tfe=t=>{let e=Rt.basename(Va);return{data:Rt.join(Jc.XDG_DATA_HOME||Rt.join(Va,".local","share"),t),config:Rt.join(Jc.XDG_CONFIG_HOME||Rt.join(Va,".config"),t),cache:Rt.join(Jc.XDG_CACHE_HOME||Rt.join(Va,".cache"),t),log:Rt.join(Jc.XDG_STATE_HOME||Rt.join(Va,".local","state"),t),temp:Rt.join(oA,e,t)}},c6=(t,e)=>{if(typeof t!="string")throw new TypeError(`Expected string, got ${typeof t}`);return e=Object.assign({suffix:"nodejs"},e),e.suffix&&(t+=`-${e.suffix}`),process.platform==="darwin"?Afe(t):process.platform==="win32"?Ife(t):Tfe(t)};uA.exports=c6;uA.exports.default=c6});var cA=P(Ni=>{"use strict";b();Object.defineProperty(Ni,"__esModule",{value:!0});Ni.memoize=Ni.memo=Ni.tap=Ni.identity=Ni.noop=void 0;var Efe=()=>{};Ni.noop=Efe;var Ofe=t=>t;Ni.identity=Ofe;var Nfe=t=>e=>(t(e),e);Ni.tap=Nfe;var f6=gn();Object.defineProperty(Ni,"memo",{enumerable:!0,get:function(){return f6.memo}});Object.defineProperty(Ni,"memoize",{enumerable:!0,get:function(){return f6.memoize}})});var dA=P(it=>{"use strict";b();var uv=it&&it.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(it,"__esModule",{value:!0});it.Manifests=it.Resources=it.ThemeLiquidDocsSchemaRoot=it.ThemeLiquidDocsRoot=it.root=void 0;it.downloadSchema=p6;it.downloadResource=h6;it.download=fA;it.resourcePath=av;it.resourceUrl=ov;it.schemaPath=pA;it.schemaUrl=hA;it.exists=d6;it.downloadThemeLiquidDocs=Rfe;var Lfe=uv(l6()),Pfe=uv(FO()),Op=uv(Te("node:fs/promises")),lA=uv(Te("node:path")),Ep=cA(),Cfe=(0,Lfe.default)("theme-liquid-docs");it.root=Cfe.cache;it.ThemeLiquidDocsRoot="https://raw.githubusercontent.com/Shopify/theme-liquid-docs/main";it.ThemeLiquidDocsSchemaRoot=`${it.ThemeLiquidDocsRoot}/schemas`;it.Resources=["filters","objects","tags","shopify_system_translations","manifest_theme","manifest_theme_app_extension"];it.Manifests={app:"manifest_theme_app_extension",theme:"manifest_theme"};var qfe={filters:"data/filters.json",objects:"data/objects.json",tags:"data/tags.json",latest:"data/latest.json",shopify_system_translations:"data/shopify_system_translations.json",manifest_theme:"schemas/manifest_theme.json",manifest_theme_app_extension:"schemas/manifest_theme_app_extension.json"};async function p6(t,e=it.root,r=Ep.noop){let n=hA(t),i=pA(t,e),s=await fA(n,r);return await Op.default.writeFile(i,s,"utf8"),s}async function h6(t,e=it.root,r=Ep.noop){let n=ov(t),i=av(t,e),s=await fA(n,r);return await Op.default.writeFile(i,s,"utf8"),s}async function fA(t,e){return t.startsWith("file:")?await Op.default.readFile(t.replace(/^file:/,""),"utf8").then((0,Ep.tap)(()=>e(`Using local file: ${t}`))).catch(r=>{throw e(`Failed to read local file: ${t}`),r}):(await(0,Pfe.default)(t)).text()}function av(t,e=it.root){return lA.default.join(e,`${t}.json`)}function ov(t){let e=qfe[t];return`${process.env.SHOPIFY_TLD_ROOT?`file:${process.env.SHOPIFY_TLD_ROOT}`:it.ThemeLiquidDocsRoot}/${e}`}function pA(t,e=it.root){return lA.default.resolve(e,lA.default.basename(t))}function hA(t){return`${process.env.SHOPIFY_TLD_ROOT?`file:${process.env.SHOPIFY_TLD_ROOT}`:it.ThemeLiquidDocsRoot}/schemas/${t}`}async function d6(t){try{return await Op.default.stat(t),!0}catch{return!1}}async function Rfe(t,e){await d6(t)||await Op.default.mkdir(t);let r=["latest"].concat(it.Resources),n=await Promise.all(r.map(a=>h6(a,t,e).then((0,Ep.tap)(()=>e(`Successfully downloaded latest resource:
1226
+ ${ov(a)}
1227
+ > ${av(a,t)}`))).catch(u=>{throw e(`Failed to download latest resource:
1228
+ ${ov(a)} to
1229
+ ${av(a,t)}
1230
+ ${u}`),u}))),s=Object.values(it.Manifests).map(a=>r.indexOf(a)).map(a=>n[a]).map(a=>JSON.parse(a)).flatMap(a=>a.schemas.map(u=>u.uri));await Promise.all(Mfe(s).map(a=>p6(a,t,e).then((0,Ep.tap)(()=>e(`Successfully downloaded schema:
1231
+ ${hA(a)}
1232
+ > ${pA(a,t)}`))).catch(u=>{throw e(`Failed to download schema: ${a}, ${u}`),u})))}function Mfe(t){return[...new Set(t).values()]}});var y6=P(Kc=>{"use strict";b();var m6=Kc&&Kc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Kc,"__esModule",{value:!0});Kc.ThemeLiquidDocsManager=void 0;var Lp=m6(Te("node:fs/promises")),cv=m6(Te("node:path")),ai=dA(),Dn=cA(),mA=class{constructor(e=Dn.noop){this.log=e,this.filters=(0,Dn.memo)(async()=>Ua(this.loaders("filters"),JSON.parse,[],this.log)),this.objects=(0,Dn.memo)(async()=>Ua(this.loaders("objects"),JSON.parse,[],this.log)),this.liquidDrops=(0,Dn.memo)(async()=>Ua(this.loaders("objects"),JSON.parse,[],this.log)),this.tags=(0,Dn.memo)(async()=>Ua(this.loaders("tags"),JSON.parse,[],this.log)),this.systemTranslations=(0,Dn.memo)(async()=>Ua(this.loaders("shopify_system_translations"),JSON.parse,{},this.log)),this.schemas=(0,Dn.memoize)(r=>Ua(this.loaders(ai.Manifests[r]),JSON.parse,{schemas:[]},this.log).then(n=>Promise.all(n.schemas.map(async i=>({uri:`${ai.ThemeLiquidDocsSchemaRoot}/${i.uri}`,fileMatch:i.fileMatch,schema:await Ua(this.schemaLoaders(i.uri),Dn.identity,"",this.log)})))),Dn.identity),this.setup=(0,Dn.memo)(async()=>{try{await(0,ai.exists)(ai.root)||await Lp.default.mkdir(ai.root,{recursive:!0});let r=await this.latestRevision();await(0,ai.downloadResource)("latest",ai.root,this.log);let n=await this.latestRevision();r!==n&&await(0,ai.downloadThemeLiquidDocs)(ai.root,this.log)}catch(r){r instanceof Error&&this.log(`Failed to setup with the following error: ${r.message}`);return}})}async latestRevision(){var e;return(e=(await Ua([Np(()=>this.load("latest"),"loadLatestRevision")],JSON.parse,{},this.log)).revision)!==null&&e!==void 0?e:""}async loadResource(e){return await this.setup(),this.load(e).then((0,Dn.tap)(()=>this.log(`Loaded resource from ${(0,ai.resourcePath)(e)}`)))}async load(e){return Lp.default.readFile((0,ai.resourcePath)(e),"utf8")}async loadSchema(e){return Lp.default.readFile((0,ai.schemaPath)(e),"utf8").then((0,Dn.tap)(()=>this.log(`Loaded schema from ${(0,ai.schemaPath)(e)}`)))}loaders(e){return[Np(()=>this.loadResource(e),`loadResource(${e})`),Np(()=>Dfe(e,this.log),`fallbackResource(${e})`)]}schemaLoaders(e){return[Np(()=>this.loadSchema(e),`loadSchema(${e})`),Np(()=>Ffe(e,this.log),`fallbackSchema(${e})`)]}};Kc.ThemeLiquidDocsManager=mA;function Np(t,e){return Object.assign(t,{loaderName:e})}async function Ua(t,e,r,n){for(let i of t)try{return e(await i())}catch(s){n(`Failed to load or transform ${i.loaderName} with the following error:
1233
+ ${s instanceof Error?s.message:s}`);continue}return r}function g6(){return cv.default.resolve(__dirname,"./data")}async function Dfe(t,e){let r=cv.default.resolve(g6(),`${t}.json`);return Lp.default.readFile(r,"utf8").then((0,Dn.tap)(()=>e(`Loaded fallback resource
1234
+ ${t} from
1235
+ ${r}`)))}async function Ffe(t,e){let r=cv.default.resolve(g6(),cv.default.basename(t));return Lp.default.readFile(r,"utf8").then((0,Dn.tap)(()=>e(`Loaded fallback schema
1236
+ ${t} from
1237
+ ${r}`)))}});var _6=P(Li=>{"use strict";b();Object.defineProperty(Li,"__esModule",{value:!0});Li.root=Li.downloadThemeLiquidDocs=Li.downloadResource=Li.Resources=Li.ThemeLiquidDocsManager=void 0;var jfe=y6();Object.defineProperty(Li,"ThemeLiquidDocsManager",{enumerable:!0,get:function(){return jfe.ThemeLiquidDocsManager}});var lv=dA();Object.defineProperty(Li,"Resources",{enumerable:!0,get:function(){return lv.Resources}});Object.defineProperty(Li,"downloadResource",{enumerable:!0,get:function(){return lv.downloadResource}});Object.defineProperty(Li,"downloadThemeLiquidDocs",{enumerable:!0,get:function(){return lv.downloadThemeLiquidDocs}});Object.defineProperty(Li,"root",{enumerable:!0,get:function(){return lv.root}})});var v6=P(gA=>{b();var fu=Te("path"),Ga=process.platform==="win32",Wa=Te("fs"),Bfe=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function $fe(){var t;if(Bfe){var e=new Error;t=r}else t=n;return t;function r(i){i&&(e.message=i.message,i=e,n(i))}function n(i){if(i){if(process.throwDeprecation)throw i;if(!process.noDeprecation){var s="fs: missing callback "+(i.stack||i.message);process.traceDeprecation?console.trace(s):console.error(s)}}}}function Vfe(t){return typeof t=="function"?t:$fe()}var dTe=fu.normalize;Ga?ra=/(.*?)(?:[\/\\]+|$)/g:ra=/(.*?)(?:[\/]+|$)/g;var ra;Ga?Pp=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:Pp=/^[\/]*/;var Pp;gA.realpathSync=function(e,r){if(e=fu.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];var n=e,i={},s={},a,u,c,p;d();function d(){var k=Pp.exec(e);a=k[0].length,u=k[0],c=k[0],p="",Ga&&!s[c]&&(Wa.lstatSync(c),s[c]=!0)}for(;a<e.length;){ra.lastIndex=a;var m=ra.exec(e);if(p=u,u+=m[0],c=p+m[1],a=ra.lastIndex,!(s[c]||r&&r[c]===c)){var h;if(r&&Object.prototype.hasOwnProperty.call(r,c))h=r[c];else{var y=Wa.lstatSync(c);if(!y.isSymbolicLink()){s[c]=!0,r&&(r[c]=c);continue}var w=null;if(!Ga){var x=y.dev.toString(32)+":"+y.ino.toString(32);i.hasOwnProperty(x)&&(w=i[x])}w===null&&(Wa.statSync(c),w=Wa.readlinkSync(c)),h=fu.resolve(p,w),r&&(r[c]=h),Ga||(i[x]=w)}e=fu.resolve(h,e.slice(a)),d()}}return r&&(r[n]=e),e};gA.realpath=function(e,r,n){if(typeof n!="function"&&(n=Vfe(r),r=null),e=fu.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return process.nextTick(n.bind(null,null,r[e]));var i=e,s={},a={},u,c,p,d;m();function m(){var k=Pp.exec(e);u=k[0].length,c=k[0],p=k[0],d="",Ga&&!a[p]?Wa.lstat(p,function(v){if(v)return n(v);a[p]=!0,h()}):process.nextTick(h)}function h(){if(u>=e.length)return r&&(r[i]=e),n(null,e);ra.lastIndex=u;var k=ra.exec(e);return d=c,c+=k[0],p=d+k[1],u=ra.lastIndex,a[p]||r&&r[p]===p?process.nextTick(h):r&&Object.prototype.hasOwnProperty.call(r,p)?x(r[p]):Wa.lstat(p,y)}function y(k,v){if(k)return n(k);if(!v.isSymbolicLink())return a[p]=!0,r&&(r[p]=p),process.nextTick(h);if(!Ga){var I=v.dev.toString(32)+":"+v.ino.toString(32);if(s.hasOwnProperty(I))return w(null,s[I],p)}Wa.stat(p,function(T){if(T)return n(T);Wa.readlink(p,function(S,L){Ga||(s[I]=L),w(S,L)})})}function w(k,v,I){if(k)return n(k);var T=fu.resolve(d,v);r&&(r[I]=T),x(T)}function x(k){e=fu.resolve(k,e.slice(u)),m()}}});var bA=P((yTe,x6)=>{b();x6.exports=Ha;Ha.realpath=Ha;Ha.sync=vA;Ha.realpathSync=vA;Ha.monkeypatch=Wfe;Ha.unmonkeypatch=Gfe;var Qc=Te("fs"),yA=Qc.realpath,_A=Qc.realpathSync,Ufe=process.version,b6=/^v[0-5]\./.test(Ufe),S6=v6();function w6(t){return t&&t.syscall==="realpath"&&(t.code==="ELOOP"||t.code==="ENOMEM"||t.code==="ENAMETOOLONG")}function Ha(t,e,r){if(b6)return yA(t,e,r);typeof e=="function"&&(r=e,e=null),yA(t,e,function(n,i){w6(n)?S6.realpath(t,e,r):r(n,i)})}function vA(t,e){if(b6)return _A(t,e);try{return _A(t,e)}catch(r){if(w6(r))return S6.realpathSync(t,e);throw r}}function Wfe(){Qc.realpath=Ha,Qc.realpathSync=vA}function Gfe(){Qc.realpath=yA,Qc.realpathSync=_A}});var A6=P((vTe,k6)=>{b();var Hfe=typeof process=="object"&&process&&process.platform==="win32";k6.exports=Hfe?{sep:"\\"}:{sep:"/"}});var pv=P((wTe,AA)=>{b();var oi=AA.exports=(t,e,r={})=>(fv(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Yc(e,r).match(t));AA.exports=oi;var xA=A6();oi.sep=xA.sep;var yn=Symbol("globstar **");oi.GLOBSTAR=yn;var zfe=HG(),I6={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},kA="[^/]",SA=kA+"*?",Jfe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Kfe="(?:(?!(?:\\/|^)\\.).)*?",O6=t=>t.split("").reduce((e,r)=>(e[r]=!0,e),{}),T6=O6("().*{}+?[]^$\\!"),Qfe=O6("[.("),E6=/\/+/;oi.filter=(t,e={})=>(r,n,i)=>oi(r,t,e);var za=(t,e={})=>{let r={};return Object.keys(t).forEach(n=>r[n]=t[n]),Object.keys(e).forEach(n=>r[n]=e[n]),r};oi.defaults=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return oi;let e=oi,r=(n,i,s)=>e(n,i,za(t,s));return r.Minimatch=class extends e.Minimatch{constructor(i,s){super(i,za(t,s))}},r.Minimatch.defaults=n=>e.defaults(za(t,n)).Minimatch,r.filter=(n,i)=>e.filter(n,za(t,i)),r.defaults=n=>e.defaults(za(t,n)),r.makeRe=(n,i)=>e.makeRe(n,za(t,i)),r.braceExpand=(n,i)=>e.braceExpand(n,za(t,i)),r.match=(n,i,s)=>e.match(n,i,za(t,s)),r};oi.braceExpand=(t,e)=>N6(t,e);var N6=(t,e={})=>(fv(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:zfe(t)),Yfe=1024*64,fv=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>Yfe)throw new TypeError("pattern is too long")},wA=Symbol("subparse");oi.makeRe=(t,e)=>new Yc(t,e||{}).makeRe();oi.match=(t,e,r={})=>{let n=new Yc(e,r);return t=t.filter(i=>n.match(i)),n.options.nonull&&!t.length&&t.push(e),t};var Xfe=t=>t.replace(/\\(.)/g,"$1"),Zfe=t=>t.replace(/\\([^-\]])/g,"$1"),epe=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),tpe=t=>t.replace(/[[\]\\]/g,"\\$&"),Yc=class{constructor(e,r){fv(e),r||(r={}),this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion!==void 0?r.maxGlobstarRecursion:200,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}debug(){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let n=this.globSet=this.braceExpand();r.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,n),n=this.globParts=n.map(i=>i.split(E6)),this.debug(this.pattern,n),n=n.map((i,s,a)=>i.map(this.parse,this)),this.debug(this.pattern,n),n=n.filter(i=>i.indexOf(!1)===-1),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,r=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r,n){return r.indexOf(yn)!==-1?this._matchGlobstar(e,r,n,0,0):this._matchOne(e,r,n,0,0)}_matchGlobstar(e,r,n,i,s){let a=-1;for(let I=s;I<r.length;I++)if(r[I]===yn){a=I;break}let u=-1;for(let I=r.length-1;I>=0;I--)if(r[I]===yn){u=I;break}let c=r.slice(s,a),p=n?r.slice(a+1):r.slice(a+1,u),d=n?[]:r.slice(u+1);if(c.length){let I=e.slice(i,i+c.length);if(!this._matchOne(I,c,n,0,0))return!1;i+=c.length}let m=0;if(d.length){if(d.length+i>e.length)return!1;let I=e.length-d.length;if(this._matchOne(e,d,n,I,0))m=d.length;else{if(e[e.length-1]!==""||i+d.length===e.length||!this._matchOne(e,d,n,I-1,0))return!1;m=d.length+1}}if(!p.length){let I=!!m;for(let T=i;T<e.length-m;T++){let S=String(e[T]);if(I=!0,S==="."||S===".."||!this.options.dot&&S.charAt(0)===".")return!1}return n||I}let h=[[[],0]],y=h[0],w=0,x=[0];for(let I of p)I===yn?(x.push(w),y=[[],0],h.push(y)):(y[0].push(I),w++);let k=h.length-1,v=e.length-m;for(let I of h)I[1]=v-(x[k--]+I[0].length);return!!this._matchGlobStarBodySections(e,h,i,0,n,0,!!m)}_matchGlobStarBodySections(e,r,n,i,s,a,u){let c=r[i];if(!c){for(let m=n;m<e.length;m++){u=!0;let h=e[m];if(h==="."||h===".."||!this.options.dot&&h.charAt(0)===".")return!1}return u}let[p,d]=c;for(;n<=d;){if(this._matchOne(e.slice(0,n+p.length),p,s,n,0)&&a<this.maxGlobstarRecursion){let y=this._matchGlobStarBodySections(e,r,n+p.length,i+1,s,a+1,u);if(y!==!1)return y}let h=e[n];if(h==="."||h===".."||!this.options.dot&&h.charAt(0)===".")return!1;n++}return s||null}_matchOne(e,r,n,i,s){let a,u,c,p;for(a=i,u=s,c=e.length,p=r.length;a<c&&u<p;a++,u++){this.debug("matchOne loop");let d=r[u],m=e[a];if(this.debug(r,d,m),d===!1||d===yn)return!1;let h;if(typeof d=="string"?(h=m===d,this.debug("string match",d,m,h)):(h=m.match(d),this.debug("pattern match",d,m,h)),!h)return!1}if(a===c&&u===p)return!0;if(a===c)return n;if(u===p)return a===c-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return N6(this.pattern,this.options)}parse(e,r){fv(e);let n=this.options;if(e==="**")if(n.noglobstar)e="*";else return yn;if(e==="")return"";let i="",s=!1,a=!1,u=[],c=[],p,d=!1,m=-1,h=-1,y,w,x,k=e.charAt(0)===".",v=n.dot||k,I=()=>k?"":v?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",T=M=>M.charAt(0)==="."?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",S=()=>{if(p){switch(p){case"*":i+=SA,s=!0;break;case"?":i+=kA,s=!0;break;default:i+="\\"+p;break}this.debug("clearStateChar %j %j",p,i),p=!1}};for(let M=0,F;M<e.length&&(F=e.charAt(M));M++){if(this.debug("%s %s %s %j",e,M,i,F),a){if(F==="/")return!1;T6[F]&&(i+="\\"),i+=F,a=!1;continue}switch(F){case"/":return!1;case"\\":if(d&&e.charAt(M+1)==="-"){i+=F;continue}S(),a=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,M,i,F),d){this.debug(" in class"),F==="!"&&M===h+1&&(F="^"),i+=F;continue}if(F==="*"&&p==="*")continue;this.debug("call clearStateChar %j",p),S(),p=F,n.noext&&S();continue;case"(":{if(d){i+="(";continue}if(!p){i+="\\(";continue}let X={type:p,start:M-1,reStart:i.length,open:I6[p].open,close:I6[p].close};this.debug(this.pattern," ",X),u.push(X),i+=X.open,X.start===0&&X.type!=="!"&&(k=!0,i+=T(e.slice(M+1))),this.debug("plType %j %j",p,i),p=!1;continue}case")":{let X=u[u.length-1];if(d||!X){i+="\\)";continue}u.pop(),S(),s=!0,w=X,i+=w.close,w.type==="!"&&c.push(Object.assign(w,{reEnd:i.length}));continue}case"|":{let X=u[u.length-1];if(d||!X){i+="\\|";continue}S(),i+="|",X.start===0&&X.type!=="!"&&(k=!0,i+=T(e.slice(M+1)));continue}case"[":if(S(),d){i+="\\"+F;continue}d=!0,h=M,m=i.length,i+=F;continue;case"]":if(M===h+1||!d){i+="\\"+F;continue}y=e.substring(h+1,M);try{RegExp("["+tpe(Zfe(y))+"]"),i+=F}catch{i=i.substring(0,m)+"(?:$.)"}s=!0,d=!1;continue;default:S(),T6[F]&&!(F==="^"&&d)&&(i+="\\"),i+=F;break}}for(d&&(y=e.slice(h+1),x=this.parse(y,wA),i=i.substring(0,m)+"\\["+x[0],s=s||x[1]),w=u.pop();w;w=u.pop()){let M;M=i.slice(w.reStart+w.open.length),this.debug("setting tail",i,w),M=M.replace(/((?:\\{2}){0,64})(\\?)\|/g,(X,H,$)=>($||($="\\"),H+H+$+"|")),this.debug(`tail=%j
1238
+ %s`,M,M,w,i);let F=w.type==="*"?SA:w.type==="?"?kA:"\\"+w.type;s=!0,i=i.slice(0,w.reStart)+F+"\\("+M}S(),a&&(i+="\\\\");let L=Qfe[i.charAt(0)];for(let M=c.length-1;M>-1;M--){let F=c[M],X=i.slice(0,F.reStart),H=i.slice(F.reStart,F.reEnd-8),$=i.slice(F.reEnd),B=i.slice(F.reEnd-8,F.reEnd)+$,Z=X.split(")").length,ee=X.split("(").length-Z,W=$;for(let te=0;te<ee;te++)W=W.replace(/\)[+*?]?/,"");$=W;let J=$===""&&r!==wA?"(?:$|\\/)":"";i=X+H+$+J+B}if(i!==""&&s&&(i="(?=.)"+i),L&&(i=I()+i),r===wA)return[i,s];if(n.nocase&&!s&&(s=e.toUpperCase()!==e.toLowerCase()),!s)return Xfe(e);let R=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",R),{_glob:e,_src:i})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?SA:r.dot?Jfe:Kfe,i=r.nocase?"i":"",s=e.map(a=>(a=a.map(u=>typeof u=="string"?epe(u):u===yn?yn:u._src).reduce((u,c)=>(u[u.length-1]===yn&&c===yn||u.push(c),u),[]),a.forEach((u,c)=>{u!==yn||a[c-1]===yn||(c===0?a.length>1?a[c+1]="(?:\\/|"+n+"\\/)?"+a[c+1]:a[c]=n:c===a.length-1?a[c-1]+="(?:\\/|"+n+")?":(a[c-1]+="(?:\\/|\\/"+n+"\\/)"+a[c+1],a[c+1]=yn))}),a.filter(u=>u!==yn).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,i)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;xA.sep!=="/"&&(e=e.split(xA.sep).join("/")),e=e.split(E6),this.debug(this.pattern,"split",e);let i=this.set;this.debug(this.pattern,"set",i);let s;for(let a=e.length-1;a>=0&&(s=e[a],!s);a--);for(let a=0;a<i.length;a++){let u=i[a],c=e;if(n.matchBase&&u.length===1&&(c=[s]),this.matchOne(c,u,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return oi.defaults(e).Minimatch}};oi.Minimatch=Yc});var TA=P(Ja=>{b();Ja.setopts=ope;Ja.ownProp=L6;Ja.makeAbs=Cp;Ja.finish=upe;Ja.mark=cpe;Ja.isIgnored=C6;Ja.childrenIgnored=lpe;function L6(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var rpe=Te("fs"),pu=Te("path"),npe=pv(),P6=Te("path").isAbsolute,IA=npe.Minimatch;function ipe(t,e){return t.localeCompare(e,"en")}function spe(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]),t.ignore.length&&(t.ignore=t.ignore.map(ape))}function ape(t){var e=null;if(t.slice(-3)==="/**"){var r=t.replace(/(\/\*\*)+$/,"");e=new IA(r,{dot:!0})}return{matcher:new IA(t,{dot:!0}),gmatcher:e}}function ope(t,e,r){if(r||(r={}),r.matchBase&&e.indexOf("/")===-1){if(r.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}t.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,t.windowsPathsNoEscape&&(e=e.replace(/\\/g,"/")),t.silent=!!r.silent,t.pattern=e,t.strict=r.strict!==!1,t.realpath=!!r.realpath,t.realpathCache=r.realpathCache||Object.create(null),t.follow=!!r.follow,t.dot=!!r.dot,t.mark=!!r.mark,t.nodir=!!r.nodir,t.nodir&&(t.mark=!0),t.sync=!!r.sync,t.nounique=!!r.nounique,t.nonull=!!r.nonull,t.nosort=!!r.nosort,t.nocase=!!r.nocase,t.stat=!!r.stat,t.noprocess=!!r.noprocess,t.absolute=!!r.absolute,t.fs=r.fs||rpe,t.maxLength=r.maxLength||1/0,t.cache=r.cache||Object.create(null),t.statCache=r.statCache||Object.create(null),t.symlinks=r.symlinks||Object.create(null),spe(t,r),t.changedCwd=!1;var n=process.cwd();L6(r,"cwd")?(t.cwd=pu.resolve(r.cwd),t.changedCwd=t.cwd!==n):t.cwd=pu.resolve(n),t.root=r.root||pu.resolve(t.cwd,"/"),t.root=pu.resolve(t.root),t.cwdAbs=P6(t.cwd)?t.cwd:Cp(t,t.cwd),t.nomount=!!r.nomount,process.platform==="win32"&&(t.root=t.root.replace(/\\/g,"/"),t.cwd=t.cwd.replace(/\\/g,"/"),t.cwdAbs=t.cwdAbs.replace(/\\/g,"/")),r.nonegate=!0,r.nocomment=!0,t.minimatch=new IA(e,r),t.options=t.minimatch.options}function upe(t){for(var e=t.nounique,r=e?[]:Object.create(null),n=0,i=t.matches.length;n<i;n++){var s=t.matches[n];if(!s||Object.keys(s).length===0){if(t.nonull){var a=t.minimatch.globSet[n];e?r.push(a):r[a]=!0}}else{var u=Object.keys(s);e?r.push.apply(r,u):u.forEach(function(c){r[c]=!0})}}if(e||(r=Object.keys(r)),t.nosort||(r=r.sort(ipe)),t.mark){for(var n=0;n<r.length;n++)r[n]=t._mark(r[n]);t.nodir&&(r=r.filter(function(c){var p=!/\/$/.test(c),d=t.cache[c]||t.cache[Cp(t,c)];return p&&d&&(p=d!=="DIR"&&!Array.isArray(d)),p}))}t.ignore.length&&(r=r.filter(function(c){return!C6(t,c)})),t.found=r}function cpe(t,e){var r=Cp(t,e),n=t.cache[r],i=e;if(n){var s=n==="DIR"||Array.isArray(n),a=e.slice(-1)==="/";if(s&&!a?i+="/":!s&&a&&(i=i.slice(0,-1)),i!==e){var u=Cp(t,i);t.statCache[u]=t.statCache[r],t.cache[u]=t.cache[r]}}return i}function Cp(t,e){var r=e;return e.charAt(0)==="/"?r=pu.join(t.root,e):P6(e)||e===""?r=e:t.changedCwd?r=pu.resolve(t.cwd,e):r=pu.resolve(e),process.platform==="win32"&&(r=r.replace(/\\/g,"/")),r}function C6(t,e){return t.ignore.length?t.ignore.some(function(r){return r.matcher.match(e)||!!(r.gmatcher&&r.gmatcher.match(e))}):!1}function lpe(t,e){return t.ignore.length?t.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(e))}):!1}});var F6=P((OTe,D6)=>{b();D6.exports=M6;M6.GlobSync=dr;var fpe=bA(),q6=pv(),ITe=q6.Minimatch,TTe=dv().Glob,ETe=Te("util"),EA=Te("path"),R6=Te("assert"),hv=Te("path").isAbsolute,hu=TA(),ppe=hu.setopts,OA=hu.ownProp,hpe=hu.childrenIgnored,dpe=hu.isIgnored;function M6(t,e){if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
1239
+ See: https://github.com/isaacs/node-glob/issues/167`);return new dr(t,e).found}function dr(t,e){if(!t)throw new Error("must provide pattern");if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
1240
+ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof dr))return new dr(t,e);if(ppe(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}dr.prototype._finish=function(){if(R6.ok(this instanceof dr),this.realpath){var t=this;this.matches.forEach(function(e,r){var n=t.matches[r]=Object.create(null);for(var i in e)try{i=t._makeAbs(i);var s=fpe.realpathSync(i,t.realpathCache);n[s]=!0}catch(a){if(a.syscall==="stat")n[t._makeAbs(i)]=!0;else throw a}})}hu.finish(this)};dr.prototype._process=function(t,e,r){R6.ok(this instanceof dr);for(var n=0;typeof t[n]=="string";)n++;var i;switch(n){case t.length:this._processSimple(t.join("/"),e);return;case 0:i=null;break;default:i=t.slice(0,n).join("/");break}var s=t.slice(n),a;i===null?a=".":((hv(i)||hv(t.map(function(p){return typeof p=="string"?p:"[*]"}).join("/")))&&(!i||!hv(i))&&(i="/"+i),a=i);var u=this._makeAbs(a);if(!hpe(this,a)){var c=s[0]===q6.GLOBSTAR;c?this._processGlobStar(i,a,u,s,e,r):this._processReaddir(i,a,u,s,e,r)}};dr.prototype._processReaddir=function(t,e,r,n,i,s){var a=this._readdir(r,s);if(a){for(var u=n[0],c=!!this.minimatch.negate,p=u._glob,d=this.dot||p.charAt(0)===".",m=[],h=0;h<a.length;h++){var y=a[h];if(y.charAt(0)!=="."||d){var w;c&&!t?w=!y.match(u):w=y.match(u),w&&m.push(y)}}var x=m.length;if(x!==0){if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var h=0;h<x;h++){var y=m[h];t&&(t.slice(-1)!=="/"?y=t+"/"+y:y=t+y),y.charAt(0)==="/"&&!this.nomount&&(y=EA.join(this.root,y)),this._emitMatch(i,y)}return}n.shift();for(var h=0;h<x;h++){var y=m[h],k;t?k=[t,y]:k=[y],this._process(k.concat(n),i,s)}}}};dr.prototype._emitMatch=function(t,e){if(!dpe(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}};dr.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r,n;try{r=this.fs.lstatSync(t)}catch(s){if(s.code==="ENOENT")return null}var i=r&&r.isSymbolicLink();return this.symlinks[t]=i,!i&&r&&!r.isDirectory()?this.cache[t]="FILE":e=this._readdir(t,!1),e};dr.prototype._readdir=function(t,e){var r;if(e&&!OA(this.symlinks,t))return this._readdirInGlobStar(t);if(OA(this.cache,t)){var n=this.cache[t];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(t,this.fs.readdirSync(t))}catch(i){return this._readdirError(t,i),null}};dr.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var n=e[r];t==="/"?n=t+n:n=t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,e};dr.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var n=new Error(e.code+" invalid cwd "+this.cwd);throw n.path=this.cwd,n.code=e.code,n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e);break}};dr.prototype._processGlobStar=function(t,e,r,n,i,s){var a=this._readdir(r,s);if(a){var u=n.slice(1),c=t?[t]:[],p=c.concat(u);this._process(p,i,!1);var d=a.length,m=this.symlinks[r];if(!(m&&s))for(var h=0;h<d;h++){var y=a[h];if(!(y.charAt(0)==="."&&!this.dot)){var w=c.concat(a[h],u);this._process(w,i,!0);var x=c.concat(a[h],n);this._process(x,i,!0)}}}};dr.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),!!r){if(t&&hv(t)&&!this.nomount){var n=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=EA.join(this.root,t):(t=EA.resolve(this.root,t),n&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}};dr.prototype._stat=function(t){var e=this._makeAbs(t),r=t.slice(-1)==="/";if(t.length>this.maxLength)return!1;if(!this.stat&&OA(this.cache,e)){var a=this.cache[e];if(Array.isArray(a)&&(a="DIR"),!r||a==="DIR")return a;if(r&&a==="FILE")return!1}var n,i=this.statCache[e];if(!i){var s;try{s=this.fs.lstatSync(e)}catch(u){if(u&&(u.code==="ENOENT"||u.code==="ENOTDIR"))return this.statCache[e]=!1,!1}if(s&&s.isSymbolicLink())try{i=this.fs.statSync(e)}catch{i=s}else i=s}this.statCache[e]=i;var a=!0;return i&&(a=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||a,r&&a==="FILE"?!1:a};dr.prototype._mark=function(t){return hu.mark(this,t)};dr.prototype._makeAbs=function(t){return hu.makeAbs(this,t)}});var B6=P((LTe,j6)=>{b();var mpe=WG(),qp=Object.create(null),gpe=jO();j6.exports=mpe(ype);function ype(t,e){return qp[t]?(qp[t].push(e),null):(qp[t]=[e],_pe(t))}function _pe(t){return gpe(function e(){var r=qp[t],n=r.length,i=vpe(arguments);try{for(var s=0;s<n;s++)r[s].apply(null,i)}finally{r.length>n?(r.splice(0,n),process.nextTick(function(){e.apply(null,i)})):delete qp[t]}})}function vpe(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n]=t[n];return r}});var dv=P((RTe,V6)=>{b();V6.exports=du;var bpe=bA(),$6=pv(),CTe=$6.Minimatch,Spe=zG(),wpe=Te("events").EventEmitter,NA=Te("path"),LA=Te("assert"),Rp=Te("path").isAbsolute,CA=F6(),mu=TA(),xpe=mu.setopts,PA=mu.ownProp,qA=B6(),qTe=Te("util"),kpe=mu.childrenIgnored,Ape=mu.isIgnored,Ipe=jO();function du(t,e,r){if(typeof e=="function"&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return CA(t,e)}return new pt(t,e,r)}du.sync=CA;var Tpe=du.GlobSync=CA.GlobSync;du.glob=du;function Epe(t,e){if(e===null||typeof e!="object")return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}du.hasMagic=function(t,e){var r=Epe({},e);r.noprocess=!0;var n=new pt(t,r),i=n.minimatch.set;if(!t)return!1;if(i.length>1)return!0;for(var s=0;s<i[0].length;s++)if(typeof i[0][s]!="string")return!0;return!1};du.Glob=pt;Spe(pt,wpe);function pt(t,e,r){if(typeof e=="function"&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new Tpe(t,e)}if(!(this instanceof pt))return new pt(t,e,r);xpe(this,t,e),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),typeof r=="function"&&(r=Ipe(r),this.on("error",r),this.on("end",function(c){r(null,c)}));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(n===0)return u();for(var s=!0,a=0;a<n;a++)this._process(this.minimatch.set[a],a,!1,u);s=!1;function u(){--i._processing,i._processing<=0&&(s?process.nextTick(function(){i._finish()}):i._finish())}}pt.prototype._finish=function(){if(LA(this instanceof pt),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();mu.finish(this),this.emit("end",this.found)}};pt.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var t=this.matches.length;if(t===0)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,n);function n(){--t===0&&e._finish()}};pt.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var n=Object.keys(r),i=this,s=n.length;if(s===0)return e();var a=this.matches[t]=Object.create(null);n.forEach(function(u,c){u=i._makeAbs(u),bpe.realpath(u,i.realpathCache,function(p,d){p?p.syscall==="stat"?a[u]=!0:i.emit("error",p):a[d]=!0,--s===0&&(i.matches[t]=a,e())})})};pt.prototype._mark=function(t){return mu.mark(this,t)};pt.prototype._makeAbs=function(t){return mu.makeAbs(this,t)};pt.prototype.abort=function(){this.aborted=!0,this.emit("abort")};pt.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};pt.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var e=0;e<n.length;e++){var i=n[e];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}};pt.prototype._process=function(t,e,r,n){if(LA(this instanceof pt),LA(typeof n=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([t,e,r,n]);return}for(var i=0;typeof t[i]=="string";)i++;var s;switch(i){case t.length:this._processSimple(t.join("/"),e,n);return;case 0:s=null;break;default:s=t.slice(0,i).join("/");break}var a=t.slice(i),u;s===null?u=".":((Rp(s)||Rp(t.map(function(d){return typeof d=="string"?d:"[*]"}).join("/")))&&(!s||!Rp(s))&&(s="/"+s),u=s);var c=this._makeAbs(u);if(kpe(this,u))return n();var p=a[0]===$6.GLOBSTAR;p?this._processGlobStar(s,u,c,a,e,r,n):this._processReaddir(s,u,c,a,e,r,n)}};pt.prototype._processReaddir=function(t,e,r,n,i,s,a){var u=this;this._readdir(r,s,function(c,p){return u._processReaddir2(t,e,r,n,i,s,p,a)})};pt.prototype._processReaddir2=function(t,e,r,n,i,s,a,u){if(!a)return u();for(var c=n[0],p=!!this.minimatch.negate,d=c._glob,m=this.dot||d.charAt(0)===".",h=[],y=0;y<a.length;y++){var w=a[y];if(w.charAt(0)!=="."||m){var x;p&&!t?x=!w.match(c):x=w.match(c),x&&h.push(w)}}var k=h.length;if(k===0)return u();if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var y=0;y<k;y++){var w=h[y];t&&(t!=="/"?w=t+"/"+w:w=t+w),w.charAt(0)==="/"&&!this.nomount&&(w=NA.join(this.root,w)),this._emitMatch(i,w)}return u()}n.shift();for(var y=0;y<k;y++){var w=h[y],v;t&&(t!=="/"?w=t+"/"+w:w=t+w),this._process([w].concat(n),i,s,u)}u()};pt.prototype._emitMatch=function(t,e){if(!this.aborted&&!Ape(this,e)){if(this.paused){this._emitQueue.push([t,e]);return}var r=Rp(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[t][e]=!0;var i=this.statCache[r];i&&this.emit("stat",e,i),this.emit("match",e)}}};pt.prototype._readdirInGlobStar=function(t,e){if(this.aborted)return;if(this.follow)return this._readdir(t,!1,e);var r="lstat\0"+t,n=this,i=qA(r,s);i&&n.fs.lstat(t,i);function s(a,u){if(a&&a.code==="ENOENT")return e();var c=u&&u.isSymbolicLink();n.symlinks[t]=c,!c&&u&&!u.isDirectory()?(n.cache[t]="FILE",e()):n._readdir(t,!1,e)}};pt.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=qA("readdir\0"+t+"\0"+e,r),!!r)){if(e&&!PA(this.symlinks,t))return this._readdirInGlobStar(t,r);if(PA(this.cache,t)){var n=this.cache[t];if(!n||n==="FILE")return r();if(Array.isArray(n))return r(null,n)}var i=this;i.fs.readdir(t,Ope(this,t,r))}};function Ope(t,e,r){return function(n,i){n?t._readdirError(e,n,r):t._readdirEntries(e,i,r)}}pt.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<e.length;n++){var i=e[n];t==="/"?i=t+i:i=t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,r(null,e)}};pt.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(t);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=e.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e);break}return r()}};pt.prototype._processGlobStar=function(t,e,r,n,i,s,a){var u=this;this._readdir(r,s,function(c,p){u._processGlobStar2(t,e,r,n,i,s,p,a)})};pt.prototype._processGlobStar2=function(t,e,r,n,i,s,a,u){if(!a)return u();var c=n.slice(1),p=t?[t]:[],d=p.concat(c);this._process(d,i,!1,u);var m=this.symlinks[r],h=a.length;if(m&&s)return u();for(var y=0;y<h;y++){var w=a[y];if(!(w.charAt(0)==="."&&!this.dot)){var x=p.concat(a[y],c);this._process(x,i,!0,u);var k=p.concat(a[y],n);this._process(k,i,!0,u)}}u()};pt.prototype._processSimple=function(t,e,r){var n=this;this._stat(t,function(i,s){n._processSimple2(t,e,i,s,r)})};pt.prototype._processSimple2=function(t,e,r,n,i){if(this.matches[e]||(this.matches[e]=Object.create(null)),!n)return i();if(t&&Rp(t)&&!this.nomount){var s=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=NA.join(this.root,t):(t=NA.resolve(this.root,t),s&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),i()};pt.prototype._stat=function(t,e){var r=this._makeAbs(t),n=t.slice(-1)==="/";if(t.length>this.maxLength)return e();if(!this.stat&&PA(this.cache,r)){var i=this.cache[r];if(Array.isArray(i)&&(i="DIR"),!n||i==="DIR")return e(null,i);if(n&&i==="FILE")return e()}var s,a=this.statCache[r];if(a!==void 0){if(a===!1)return e(null,a);var u=a.isDirectory()?"DIR":"FILE";return n&&u==="FILE"?e():e(null,u,a)}var c=this,p=qA("stat\0"+r,d);p&&c.fs.lstat(r,p);function d(m,h){if(h&&h.isSymbolicLink())return c.fs.stat(r,function(y,w){y?c._stat2(t,r,null,h,e):c._stat2(t,r,y,w,e)});c._stat2(t,r,m,h,e)}};pt.prototype._stat2=function(t,e,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return this.statCache[e]=!1,i();var s=t.slice(-1)==="/";if(this.statCache[e]=n,e.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,!1,n);var a=!0;return n&&(a=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||a,s&&a==="FILE"?i():i(null,a,n)}});var U6=P(Xc=>{"use strict";b();Object.defineProperty(Xc,"__esModule",{value:!0});Xc.saveToDiskFixApplicator=void 0;Xc.autofix=Ppe;var Npe=Te("fs/promises"),RA=gn(),Lpe=async(t,e)=>{let r=(0,RA.applyFixToString)(t.source,e);await(0,Npe.writeFile)(RA.path.fsPath(t.uri),r,"utf8")};Xc.saveToDiskFixApplicator=Lpe;async function Ppe(t,e){await(0,RA.autofix)(t,e,Xc.saveToDiskFixApplicator)}});var MA=P(Mp=>{"use strict";b();var Cpe=Mp&&Mp.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mp,"__esModule",{value:!0});Mp.fileExists=Rpe;var qpe=Cpe(Te("node:fs/promises"));async function Rpe(t){try{return await qpe.default.stat(t),!0}catch{return!1}}});var G6=P(Zc=>{"use strict";b();var W6=Zc&&Zc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zc,"__esModule",{value:!0});Zc.thisNodeModuleRoot=void 0;var $Te=W6(Te("node:path")),Mpe=W6(Te("node:os")),Dpe=()=>Mpe.default.tmpdir();Zc.thisNodeModuleRoot=Dpe});var J6=P(el=>{"use strict";b();var Fpe=el&&el.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(el,"__esModule",{value:!0});el.loadThirdPartyChecks=Vpe;el.findThirdPartyChecks=Upe;var jpe=Fpe(dv()),Bpe=Te("node:util"),$pe=(0,Bpe.promisify)(jpe.default);function Vpe(t=[]){let e=new Set;for(let r of t)try{let i=Te(r).checks;if(!Array.isArray(i))throw new Error(`Expected the 'checks' export to be an array and got ${typeof i}`);for(let s of i)Wpe(s)?e.add(s):console.error(`Expected ${s} to be a CheckDefinition, but it looks like it isn't`)}catch(n){console.error(`Error loading ${r}, ignoring it.
1241
+ ${n}`)}return[...e]}async function Upe(t){let e=[H6(t.replace(/\\/g,"/"),"/node_modules/theme-check-*/"),H6(t.replace(/\\/g,"/"),"/node_modules/@*/theme-check-*/")];return(await Promise.all(e.map(n=>$pe(n)))).flat().filter(n=>!/\@shopify\/theme-check-(node|common|browser|docs-updater)/.test(n)&&!/theme-check-vscode/.test(n))}function H6(...t){return t.flatMap(e=>e.replace(/\\/g,"/").replace(/\/+$/,"")).join("/")}function z6(t){return t!==null&&typeof t=="object"}function Wpe(t){return z6(t)&&"meta"in t&&"create"in t&&z6(t.meta)&&"code"in t.meta}});var Q6=P(Fp=>{"use strict";b();var Gpe=Fp&&Fp.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fp,"__esModule",{value:!0});Fp.loadConfigDescription=Kpe;var FA=gn(),Dp=Gpe(Te("node:path")),K6=MA(),Hpe=G6(),DA=J6(),zpe=Zf(),Jpe=t=>t.flat();async function Kpe(t,e){var r;let n=await rhe(e),i=await Promise.all([(0,DA.findThirdPartyChecks)((0,Hpe.thisNodeModuleRoot)()),(0,DA.findThirdPartyChecks)(n)]).then(Jpe),s=(0,DA.loadThirdPartyChecks)([...t.require,...i]),a=FA.allChecks.concat(s).filter(Ype(t)),u=zpe.URI.file(e);return{settings:Zpe(t.checkSettings,a),context:(r=t.context)!==null&&r!==void 0?r:"theme",checks:a,ignore:t.ignore,rootUri:Qpe(u,t.root)}}function Qpe(t,e){if(e===void 0)return FA.path.normalize(t);if(Dp.default.isAbsolute(e))throw new Error('the "root" property can only be relative');return FA.path.resolve(t,e)}var Ype=t=>e=>{var r;let n=(r=t.checkSettings[e.meta.code])!==null&&r!==void 0?r:Xpe(t,e);return n?n.enabled:!1};function Xpe(t,e){if(!e.meta.aliases)return;let r=e.meta.aliases.find(n=>t.checkSettings[n]);if(r)return t.checkSettings[r]}function Zpe(t,e){return Object.fromEntries(Object.entries(t).map(([r,n])=>[ehe(r,e),n]))}function ehe(t,e){let r=e.find(n=>{var i;return n.meta.code===t||((i=n.meta.aliases)===null||i===void 0?void 0:i.find(s=>s===t))});return r?.meta.code}async function the(t){if(Dp.default.dirname(t)===t)return!0;let[e,r]=await Promise.all([(0,K6.fileExists)(Dp.default.join(t,"node_modules")),(0,K6.fileExists)(Dp.default.join(t,".git"))]);return e||r}async function rhe(t){let e=t;for(;!await the(e);)e=Dp.default.dirname(e);return e}});var rt=P($r=>{"use strict";b();var jA=Symbol.for("yaml.alias"),Y6=Symbol.for("yaml.document"),mv=Symbol.for("yaml.map"),X6=Symbol.for("yaml.pair"),BA=Symbol.for("yaml.scalar"),gv=Symbol.for("yaml.seq"),na=Symbol.for("yaml.node.type"),nhe=t=>!!t&&typeof t=="object"&&t[na]===jA,ihe=t=>!!t&&typeof t=="object"&&t[na]===Y6,she=t=>!!t&&typeof t=="object"&&t[na]===mv,ahe=t=>!!t&&typeof t=="object"&&t[na]===X6,Z6=t=>!!t&&typeof t=="object"&&t[na]===BA,ohe=t=>!!t&&typeof t=="object"&&t[na]===gv;function e5(t){if(t&&typeof t=="object")switch(t[na]){case mv:case gv:return!0}return!1}function uhe(t){if(t&&typeof t=="object")switch(t[na]){case jA:case mv:case BA:case gv:return!0}return!1}var che=t=>(Z6(t)||e5(t))&&!!t.anchor;$r.ALIAS=jA;$r.DOC=Y6;$r.MAP=mv;$r.NODE_TYPE=na;$r.PAIR=X6;$r.SCALAR=BA;$r.SEQ=gv;$r.hasAnchor=che;$r.isAlias=nhe;$r.isCollection=e5;$r.isDocument=ihe;$r.isMap=she;$r.isNode=uhe;$r.isPair=ahe;$r.isScalar=Z6;$r.isSeq=ohe});var jp=P($A=>{"use strict";b();var mr=rt(),Fn=Symbol("break visit"),t5=Symbol("skip children"),vs=Symbol("remove node");function yv(t,e){let r=r5(e);mr.isDocument(t)?tl(null,t.contents,r,Object.freeze([t]))===vs&&(t.contents=null):tl(null,t,r,Object.freeze([]))}yv.BREAK=Fn;yv.SKIP=t5;yv.REMOVE=vs;function tl(t,e,r,n){let i=n5(t,e,r,n);if(mr.isNode(i)||mr.isPair(i))return i5(t,n,i),tl(t,i,r,n);if(typeof i!="symbol"){if(mr.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let a=tl(s,e.items[s],r,n);if(typeof a=="number")s=a-1;else{if(a===Fn)return Fn;a===vs&&(e.items.splice(s,1),s-=1)}}}else if(mr.isPair(e)){n=Object.freeze(n.concat(e));let s=tl("key",e.key,r,n);if(s===Fn)return Fn;s===vs&&(e.key=null);let a=tl("value",e.value,r,n);if(a===Fn)return Fn;a===vs&&(e.value=null)}}return i}async function _v(t,e){let r=r5(e);mr.isDocument(t)?await rl(null,t.contents,r,Object.freeze([t]))===vs&&(t.contents=null):await rl(null,t,r,Object.freeze([]))}_v.BREAK=Fn;_v.SKIP=t5;_v.REMOVE=vs;async function rl(t,e,r,n){let i=await n5(t,e,r,n);if(mr.isNode(i)||mr.isPair(i))return i5(t,n,i),rl(t,i,r,n);if(typeof i!="symbol"){if(mr.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let a=await rl(s,e.items[s],r,n);if(typeof a=="number")s=a-1;else{if(a===Fn)return Fn;a===vs&&(e.items.splice(s,1),s-=1)}}}else if(mr.isPair(e)){n=Object.freeze(n.concat(e));let s=await rl("key",e.key,r,n);if(s===Fn)return Fn;s===vs&&(e.key=null);let a=await rl("value",e.value,r,n);if(a===Fn)return Fn;a===vs&&(e.value=null)}}return i}function r5(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function n5(t,e,r,n){if(typeof r=="function")return r(t,e,n);if(mr.isMap(e))return r.Map?.(t,e,n);if(mr.isSeq(e))return r.Seq?.(t,e,n);if(mr.isPair(e))return r.Pair?.(t,e,n);if(mr.isScalar(e))return r.Scalar?.(t,e,n);if(mr.isAlias(e))return r.Alias?.(t,e,n)}function i5(t,e,r){let n=e[e.length-1];if(mr.isCollection(n))n.items[t]=r;else if(mr.isPair(n))t==="key"?n.key=r:n.value=r;else if(mr.isDocument(n))n.contents=r;else{let i=mr.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}$A.visit=yv;$A.visitAsync=_v});var VA=P(a5=>{"use strict";b();var s5=rt(),lhe=jp(),fhe={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},phe=t=>t.replace(/[!,[\]{}]/g,e=>fhe[e]),Bp=class t{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[s,a]=n;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[s]=n;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let a=/^\d+\.\d+$/.test(s);return r(6,`Unsupported YAML version ${s}`,a),!1}}default:return r(0,`Unknown directive ${i}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let a=e.slice(2,-1);return a==="!"||a==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),a)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||r(`The ${e} tag has no suffix`);let s=this.tags[n];if(s)try{return s+decodeURIComponent(i)}catch(a){return r(String(a)),null}return n==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,n]of Object.entries(this.tags))if(e.startsWith(n))return r+phe(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&s5.isNode(e.contents)){let s={};lhe.visit(e.contents,(a,u)=>{s5.isNode(u)&&u.tag&&(s[u.tag]=!0)}),i=Object.keys(s)}else i=[];for(let[s,a]of n)s==="!!"&&a==="tag:yaml.org,2002:"||(!e||i.some(u=>u.startsWith(a)))&&r.push(`%TAG ${s} ${a}`);return r.join(`
1242
+ `)}};Bp.defaultYaml={explicit:!1,version:"1.2"};Bp.defaultTags={"!!":"tag:yaml.org,2002:"};a5.Directives=Bp});var vv=P($p=>{"use strict";b();var o5=rt(),hhe=jp();function dhe(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function u5(t){let e=new Set;return hhe.visit(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}function c5(t,e){for(let r=1;;++r){let n=`${t}${r}`;if(!e.has(n))return n}}function mhe(t,e){let r=[],n=new Map,i=null;return{onAnchor:s=>{r.push(s),i??(i=u5(t));let a=c5(e,i);return i.add(a),a},setAnchors:()=>{for(let s of r){let a=n.get(s);if(typeof a=="object"&&a.anchor&&(o5.isScalar(a.node)||o5.isCollection(a.node)))a.node.anchor=a.anchor;else{let u=new Error("Failed to resolve repeated object (this should not happen)");throw u.source=s,u}}},sourceObjects:n}}$p.anchorIsValid=dhe;$p.anchorNames=u5;$p.createNodeAnchors=mhe;$p.findNewAnchor=c5});var UA=P(l5=>{"use strict";b();function Vp(t,e,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,s=n.length;i<s;++i){let a=n[i],u=Vp(t,n,String(i),a);u===void 0?delete n[i]:u!==a&&(n[i]=u)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let s=n.get(i),a=Vp(t,n,i,s);a===void 0?n.delete(i):a!==s&&n.set(i,a)}else if(n instanceof Set)for(let i of Array.from(n)){let s=Vp(t,n,i,i);s===void 0?n.delete(i):s!==i&&(n.delete(i),n.add(s))}else for(let[i,s]of Object.entries(n)){let a=Vp(t,n,i,s);a===void 0?delete n[i]:a!==s&&(n[i]=a)}return t.call(e,r,n)}l5.applyReviver=Vp});var Ka=P(p5=>{"use strict";b();var ghe=rt();function f5(t,e,r){if(Array.isArray(t))return t.map((n,i)=>f5(n,String(i),r));if(t&&typeof t.toJSON=="function"){if(!r||!ghe.hasAnchor(t))return t.toJSON(e,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n),r.onCreate=s=>{n.res=s,delete r.onCreate};let i=t.toJSON(e,r);return r.onCreate&&r.onCreate(i),i}return typeof t=="bigint"&&!r?.keep?Number(t):t}p5.toJS=f5});var bv=P(d5=>{"use strict";b();var yhe=UA(),h5=rt(),_he=Ka(),WA=class{constructor(e){Object.defineProperty(this,h5.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!h5.isDocument(e))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},u=_he.toJS(this,"",a);if(typeof i=="function")for(let{count:c,res:p}of a.anchors.values())i(p,c);return typeof s=="function"?yhe.applyReviver(s,{"":u},"",u):u}};d5.NodeBase=WA});var Up=P(m5=>{"use strict";b();var vhe=vv(),bhe=jp(),nl=rt(),She=bv(),whe=Ka(),GA=class extends She.NodeBase{constructor(e){super(nl.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let n;r?.aliasResolveCache?n=r.aliasResolveCache:(n=[],bhe.visit(e,{Node:(s,a)=>{(nl.isAlias(a)||nl.hasAnchor(a))&&n.push(a)}}),r&&(r.aliasResolveCache=n));let i;for(let s of n){if(s===this)break;s.anchor===this.source&&(i=s)}return i}toJSON(e,r){if(!r)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:s}=r,a=this.resolve(i,r);if(!a){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let u=n.get(a);if(u||(whe.toJS(a,null,r),u=n.get(a)),u?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=Sv(i,a,n)),u.count*u.aliasCount>s)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return u.res}toString(e,r,n){let i=`*${this.source}`;if(e){if(vhe.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}};function Sv(t,e,r){if(nl.isAlias(e)){let n=e.resolve(t),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(nl.isCollection(e)){let n=0;for(let i of e.items){let s=Sv(t,i,r);s>n&&(n=s)}return n}else if(nl.isPair(e)){let n=Sv(t,e.key,r),i=Sv(t,e.value,r);return Math.max(n,i)}return 1}m5.Alias=GA});var er=P(HA=>{"use strict";b();var xhe=rt(),khe=bv(),Ahe=Ka(),Ihe=t=>!t||typeof t!="function"&&typeof t!="object",Qa=class extends khe.NodeBase{constructor(e){super(xhe.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:Ahe.toJS(this.value,e,r)}toString(){return String(this.value)}};Qa.BLOCK_FOLDED="BLOCK_FOLDED";Qa.BLOCK_LITERAL="BLOCK_LITERAL";Qa.PLAIN="PLAIN";Qa.QUOTE_DOUBLE="QUOTE_DOUBLE";Qa.QUOTE_SINGLE="QUOTE_SINGLE";HA.Scalar=Qa;HA.isScalarValue=Ihe});var Wp=P(y5=>{"use strict";b();var The=Up(),gu=rt(),g5=er(),Ehe="tag:yaml.org,2002:";function Ohe(t,e,r){if(e){let n=r.filter(s=>s.tag===e),i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return r.find(n=>n.identify?.(t)&&!n.format)}function Nhe(t,e,r){if(gu.isDocument(t)&&(t=t.contents),gu.isNode(t))return t;if(gu.isPair(t)){let m=r.schema[gu.MAP].createNode?.(r.schema,null,r);return m.items.push(t),m}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:a,sourceObjects:u}=r,c;if(n&&t&&typeof t=="object"){if(c=u.get(t),c)return c.anchor??(c.anchor=i(t)),new The.Alias(c.anchor);c={anchor:null,node:null},u.set(t,c)}e?.startsWith("!!")&&(e=Ehe+e.slice(2));let p=Ohe(t,e,a.tags);if(!p){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let m=new g5.Scalar(t);return c&&(c.node=m),m}p=t instanceof Map?a[gu.MAP]:Symbol.iterator in Object(t)?a[gu.SEQ]:a[gu.MAP]}s&&(s(p),delete r.onTagObj);let d=p?.createNode?p.createNode(r.schema,t,r):typeof p?.nodeClass?.from=="function"?p.nodeClass.from(r.schema,t,r):new g5.Scalar(t);return e?d.tag=e:p.default||(d.tag=p.tag),c&&(c.node=d),d}y5.createNode=Nhe});var xv=P(wv=>{"use strict";b();var Lhe=Wp(),bs=rt(),Phe=bv();function zA(t,e,r){let n=r;for(let i=e.length-1;i>=0;--i){let s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let a=[];a[s]=n,n=a}else n=new Map([[s,n]])}return Lhe.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var _5=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,JA=class extends Phe.NodeBase{constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(n=>bs.isNode(n)||bs.isPair(n)?n.clone(e):n),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(_5(e))this.add(r);else{let[n,...i]=e,s=this.get(n,!0);if(bs.isCollection(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,zA(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[r,...n]=e;if(n.length===0)return this.delete(r);let i=this.get(r,!0);if(bs.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){let[n,...i]=e,s=this.get(n,!0);return i.length===0?!r&&bs.isScalar(s)?s.value:s:bs.isCollection(s)?s.getIn(i,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!bs.isPair(r))return!1;let n=r.value;return n==null||e&&bs.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[r,...n]=e;if(n.length===0)return this.has(r);let i=this.get(r,!0);return bs.isCollection(i)?i.hasIn(n):!1}setIn(e,r){let[n,...i]=e;if(i.length===0)this.set(n,r);else{let s=this.get(n,!0);if(bs.isCollection(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,zA(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};wv.Collection=JA;wv.collectionFromPath=zA;wv.isEmptyPath=_5});var Gp=P(kv=>{"use strict";b();var Che=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function KA(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var qhe=(t,e,r)=>t.endsWith(`
1243
+ `)?KA(r,e):r.includes(`
1244
+ `)?`
1245
+ `+KA(r,e):(t.endsWith(" ")?"":" ")+r;kv.indentComment=KA;kv.lineComment=qhe;kv.stringifyComment=Che});var b5=P(Hp=>{"use strict";b();var Rhe="flow",QA="block",Av="quoted";function Mhe(t,e,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:u}={}){if(!i||i<0)return t;i<s&&(s=0);let c=Math.max(1+s,1+i-e.length);if(t.length<=c)return t;let p=[],d={},m=i-e.length;typeof n=="number"&&(n>i-Math.max(2,s)?p.push(0):m=i-n);let h,y,w=!1,x=-1,k=-1,v=-1;r===QA&&(x=v5(t,x,e.length),x!==-1&&(m=x+c));for(let T;T=t[x+=1];){if(r===Av&&T==="\\"){switch(k=x,t[x+1]){case"x":x+=3;break;case"u":x+=5;break;case"U":x+=9;break;default:x+=1}v=x}if(T===`
1246
+ `)r===QA&&(x=v5(t,x,e.length)),m=x+e.length+c,h=void 0;else{if(T===" "&&y&&y!==" "&&y!==`
1247
+ `&&y!==" "){let S=t[x+1];S&&S!==" "&&S!==`
1248
+ `&&S!==" "&&(h=x)}if(x>=m)if(h)p.push(h),m=h+c,h=void 0;else if(r===Av){for(;y===" "||y===" ";)y=T,T=t[x+=1],w=!0;let S=x>v+1?x-2:k-1;if(d[S])return t;p.push(S),d[S]=!0,m=S+c,h=void 0}else w=!0}y=T}if(w&&u&&u(),p.length===0)return t;a&&a();let I=t.slice(0,p[0]);for(let T=0;T<p.length;++T){let S=p[T],L=p[T+1]||t.length;S===0?I=`
1249
+ ${e}${t.slice(0,L)}`:(r===Av&&d[S]&&(I+=`${t[S]}\\`),I+=`
1250
+ ${e}${t.slice(S+1,L)}`)}return I}function v5(t,e,r){let n=e,i=e+1,s=t[i];for(;s===" "||s===" ";)if(e<i+r)s=t[++e];else{do s=t[++e];while(s&&s!==`
1251
+ `);n=e,i=e+1,s=t[i]}return n}Hp.FOLD_BLOCK=QA;Hp.FOLD_FLOW=Rhe;Hp.FOLD_QUOTED=Av;Hp.foldFlowLines=Mhe});var Jp=P(S5=>{"use strict";b();var Yi=er(),Ya=b5(),Tv=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Ev=t=>/^(%|---|\.\.\.)/m.test(t);function Dhe(t,e,r){if(!e||e<0)return!1;let n=e-r,i=t.length;if(i<=n)return!1;for(let s=0,a=0;s<i;++s)if(t[s]===`
1252
+ `){if(s-a>n)return!0;if(a=s+1,i-a<=n)return!1}return!0}function zp(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Ev(t)?" ":""),a="",u=0;for(let c=0,p=r[c];p;p=r[++c])if(p===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(a+=r.slice(u,c)+"\\ ",c+=1,u=c,p="\\"),p==="\\")switch(r[c+1]){case"u":{a+=r.slice(u,c);let d=r.substr(c+2,4);switch(d){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:d.substr(0,2)==="00"?a+="\\x"+d.substr(2):a+=r.substr(c,6)}c+=5,u=c+1}break;case"n":if(n||r[c+2]==='"'||r.length<i)c+=1;else{for(a+=r.slice(u,c)+`
1253
+
1254
+ `;r[c+2]==="\\"&&r[c+3]==="n"&&r[c+4]!=='"';)a+=`
1255
+ `,c+=2;a+=s,r[c+2]===" "&&(a+="\\"),c+=1,u=c+1}break;default:c+=1}return a=u?a+r.slice(u):r,n?a:Ya.foldFlowLines(a,s,Ya.FOLD_QUOTED,Tv(e,!1))}function YA(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
1256
+ `)||/[ \t]\n|\n[ \t]/.test(t))return zp(t,e);let r=e.indent||(Ev(t)?" ":""),n="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
1257
+ ${r}`)+"'";return e.implicitKey?n:Ya.foldFlowLines(n,r,Ya.FOLD_FLOW,Tv(e,!1))}function il(t,e){let{singleQuote:r}=e.options,n;if(r===!1)n=zp;else{let i=t.includes('"'),s=t.includes("'");i&&!s?n=YA:s&&!i?n=zp:n=r?YA:zp}return n(t,e)}var XA;try{XA=new RegExp(`(^|(?<!
1258
+ ))
1259
+ +(?!
1260
+ |$)`,"g")}catch{XA=/\n+(?!\n|$)/g}function Iv({comment:t,type:e,value:r},n,i,s){let{blockQuote:a,commentString:u,lineWidth:c}=n.options;if(!a||/\n[\t ]+$/.test(r))return il(r,n);let p=n.indent||(n.forceBlockIndent||Ev(r)?" ":""),d=a==="literal"?!0:a==="folded"||e===Yi.Scalar.BLOCK_FOLDED?!1:e===Yi.Scalar.BLOCK_LITERAL?!0:!Dhe(r,c,p.length);if(!r)return d?`|
1261
+ `:`>
1262
+ `;let m,h;for(h=r.length;h>0;--h){let L=r[h-1];if(L!==`
1263
+ `&&L!==" "&&L!==" ")break}let y=r.substring(h),w=y.indexOf(`
1264
+ `);w===-1?m="-":r===y||w!==y.length-1?(m="+",s&&s()):m="",y&&(r=r.slice(0,-y.length),y[y.length-1]===`
1265
+ `&&(y=y.slice(0,-1)),y=y.replace(XA,`$&${p}`));let x=!1,k,v=-1;for(k=0;k<r.length;++k){let L=r[k];if(L===" ")x=!0;else if(L===`
1266
+ `)v=k;else break}let I=r.substring(0,v<k?v+1:k);I&&(r=r.substring(I.length),I=I.replace(/\n+/g,`$&${p}`));let S=(x?p?"2":"1":"")+m;if(t&&(S+=" "+u(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!d){let L=r.replace(/\n+/g,`
1267
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`),R=!1,M=Tv(n,!0);a!=="folded"&&e!==Yi.Scalar.BLOCK_FOLDED&&(M.onOverflow=()=>{R=!0});let F=Ya.foldFlowLines(`${I}${L}${y}`,p,Ya.FOLD_BLOCK,M);if(!R)return`>${S}
1268
+ ${p}${F}`}return r=r.replace(/\n+/g,`$&${p}`),`|${S}
1269
+ ${p}${I}${r}${y}`}function Fhe(t,e,r,n){let{type:i,value:s}=t,{actualString:a,implicitKey:u,indent:c,indentStep:p,inFlow:d}=e;if(u&&s.includes(`
1270
+ `)||d&&/[[\]{},]/.test(s))return il(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return u||d||!s.includes(`
1271
+ `)?il(s,e):Iv(t,e,r,n);if(!u&&!d&&i!==Yi.Scalar.PLAIN&&s.includes(`
1272
+ `))return Iv(t,e,r,n);if(Ev(s)){if(c==="")return e.forceBlockIndent=!0,Iv(t,e,r,n);if(u&&c===p)return il(s,e)}let m=s.replace(/\n+/g,`$&
1273
+ ${c}`);if(a){let h=x=>x.default&&x.tag!=="tag:yaml.org,2002:str"&&x.test?.test(m),{compat:y,tags:w}=e.doc.schema;if(w.some(h)||y?.some(h))return il(s,e)}return u?m:Ya.foldFlowLines(m,c,Ya.FOLD_FLOW,Tv(e,!1))}function jhe(t,e,r,n){let{implicitKey:i,inFlow:s}=e,a=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:u}=t;u!==Yi.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(u=Yi.Scalar.QUOTE_DOUBLE);let c=d=>{switch(d){case Yi.Scalar.BLOCK_FOLDED:case Yi.Scalar.BLOCK_LITERAL:return i||s?il(a.value,e):Iv(a,e,r,n);case Yi.Scalar.QUOTE_DOUBLE:return zp(a.value,e);case Yi.Scalar.QUOTE_SINGLE:return YA(a.value,e);case Yi.Scalar.PLAIN:return Fhe(a,e,r,n);default:return null}},p=c(u);if(p===null){let{defaultKeyType:d,defaultStringType:m}=e.options,h=i&&d||m;if(p=c(h),p===null)throw new Error(`Unsupported default string type ${h}`)}return p}S5.stringifyString=jhe});var Kp=P(ZA=>{"use strict";b();var Bhe=vv(),Xa=rt(),$he=Gp(),Vhe=Jp();function Uhe(t,e){let r=Object.assign({blockQuote:!0,commentString:$he.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function Whe(t,e){if(e.tag){let i=t.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let r,n;if(Xa.isScalar(e)){n=e.value;let i=t.filter(s=>s.identify?.(n));if(i.length>1){let s=i.filter(a=>a.test);s.length>0&&(i=s)}r=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else n=e,r=t.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return r}function Ghe(t,e,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],s=(Xa.isScalar(t)||Xa.isCollection(t))&&t.anchor;s&&Bhe.anchorIsValid(s)&&(r.add(s),i.push(`&${s}`));let a=t.tag??(e.default?null:e.tag);return a&&i.push(n.directives.tagString(a)),i.join(" ")}function Hhe(t,e,r,n){if(Xa.isPair(t))return t.toString(e,r,n);if(Xa.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i,s=Xa.isNode(t)?t:e.doc.createNode(t,{onTagObj:c=>i=c});i??(i=Whe(e.doc.schema.tags,s));let a=Ghe(s,i,e);a.length>0&&(e.indentAtStart=(e.indentAtStart??0)+a.length+1);let u=typeof i.stringify=="function"?i.stringify(s,e,r,n):Xa.isScalar(s)?Vhe.stringifyString(s,e,r,n):s.toString(e,r,n);return a?Xa.isScalar(s)||u[0]==="{"||u[0]==="["?`${a} ${u}`:`${a}
1274
+ ${e.indent}${u}`:u}ZA.createStringifyContext=Uhe;ZA.stringify=Hhe});var A5=P(k5=>{"use strict";b();var ia=rt(),w5=er(),x5=Kp(),Qp=Gp();function zhe({key:t,value:e},r,n,i){let{allNullValues:s,doc:a,indent:u,indentStep:c,options:{commentString:p,indentSeq:d,simpleKeys:m}}=r,h=ia.isNode(t)&&t.comment||null;if(m){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(ia.isCollection(t)||!ia.isNode(t)&&typeof t=="object"){let M="With simple keys, collection cannot be used as a key value";throw new Error(M)}}let y=!m&&(!t||h&&e==null&&!r.inFlow||ia.isCollection(t)||(ia.isScalar(t)?t.type===w5.Scalar.BLOCK_FOLDED||t.type===w5.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!y&&(m||!s),indent:u+c});let w=!1,x=!1,k=x5.stringify(t,r,()=>w=!0,()=>x=!0);if(!y&&!r.inFlow&&k.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(r.inFlow){if(s||e==null)return w&&n&&n(),k===""?"?":y?`? ${k}`:k}else if(s&&!m||e==null&&y)return k=`? ${k}`,h&&!w?k+=Qp.lineComment(k,r.indent,p(h)):x&&i&&i(),k;w&&(h=null),y?(h&&(k+=Qp.lineComment(k,r.indent,p(h))),k=`? ${k}
1275
+ ${u}:`):(k=`${k}:`,h&&(k+=Qp.lineComment(k,r.indent,p(h))));let v,I,T;ia.isNode(e)?(v=!!e.spaceBefore,I=e.commentBefore,T=e.comment):(v=!1,I=null,T=null,e&&typeof e=="object"&&(e=a.createNode(e))),r.implicitKey=!1,!y&&!h&&ia.isScalar(e)&&(r.indentAtStart=k.length+1),x=!1,!d&&c.length>=2&&!r.inFlow&&!y&&ia.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let S=!1,L=x5.stringify(e,r,()=>S=!0,()=>x=!0),R=" ";if(h||v||I){if(R=v?`
1276
+ `:"",I){let M=p(I);R+=`
1277
+ ${Qp.indentComment(M,r.indent)}`}L===""&&!r.inFlow?R===`
1278
+ `&&T&&(R=`
1279
+
1280
+ `):R+=`
1281
+ ${r.indent}`}else if(!y&&ia.isCollection(e)){let M=L[0],F=L.indexOf(`
1282
+ `),X=F!==-1,H=r.inFlow??e.flow??e.items.length===0;if(X||!H){let $=!1;if(X&&(M==="&"||M==="!")){let B=L.indexOf(" ");M==="&"&&B!==-1&&B<F&&L[B+1]==="!"&&(B=L.indexOf(" ",B+1)),(B===-1||F<B)&&($=!0)}$||(R=`
1283
+ ${r.indent}`)}}else(L===""||L[0]===`
1284
+ `)&&(R="");return k+=R+L,r.inFlow?S&&n&&n():T&&!S?k+=Qp.lineComment(k,r.indent,p(T)):x&&i&&i(),k}k5.stringifyPair=zhe});var tI=P(eI=>{"use strict";b();var I5=Te("process");function Jhe(t,...e){t==="debug"&&console.log(...e)}function Khe(t,e){(t==="debug"||t==="warn")&&(typeof I5.emitWarning=="function"?I5.emitWarning(e):console.warn(e))}eI.debug=Jhe;eI.warn=Khe});var Pv=P(Lv=>{"use strict";b();var Yp=rt(),T5=er(),Ov="<<",Nv={identify:t=>t===Ov||typeof t=="symbol"&&t.description===Ov,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new T5.Scalar(Symbol(Ov)),{addToJSMap:E5}),stringify:()=>Ov},Qhe=(t,e)=>(Nv.identify(e)||Yp.isScalar(e)&&(!e.type||e.type===T5.Scalar.PLAIN)&&Nv.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===Nv.tag&&r.default);function E5(t,e,r){if(r=t&&Yp.isAlias(r)?r.resolve(t.doc):r,Yp.isSeq(r))for(let n of r.items)rI(t,e,n);else if(Array.isArray(r))for(let n of r)rI(t,e,n);else rI(t,e,r)}function rI(t,e,r){let n=t&&Yp.isAlias(r)?r.resolve(t.doc):r;if(!Yp.isMap(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,t,Map);for(let[s,a]of i)e instanceof Map?e.has(s)||e.set(s,a):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}Lv.addMergeToJSMap=E5;Lv.isMergeKey=Qhe;Lv.merge=Nv});var iI=P(L5=>{"use strict";b();var Yhe=tI(),O5=Pv(),Xhe=Kp(),N5=rt(),nI=Ka();function Zhe(t,e,{key:r,value:n}){if(N5.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(O5.isMergeKey(t,r))O5.addMergeToJSMap(t,e,n);else{let i=nI.toJS(r,"",t);if(e instanceof Map)e.set(i,nI.toJS(n,i,t));else if(e instanceof Set)e.add(i);else{let s=ede(r,i,t),a=nI.toJS(n,s,t);s in e?Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[s]=a}}return e}function ede(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(N5.isNode(t)&&r?.doc){let n=Xhe.createStringifyContext(r.doc,{});n.anchors=new Set;for(let s of r.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=t.toString(n);if(!r.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),Yhe.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(e)}L5.addPairToJSMap=Zhe});var Za=P(sI=>{"use strict";b();var P5=Wp(),tde=A5(),rde=iI(),Cv=rt();function nde(t,e,r){let n=P5.createNode(t,void 0,r),i=P5.createNode(e,void 0,r);return new qv(n,i)}var qv=class t{constructor(e,r=null){Object.defineProperty(this,Cv.NODE_TYPE,{value:Cv.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return Cv.isNode(r)&&(r=r.clone(e)),Cv.isNode(n)&&(n=n.clone(e)),new t(r,n)}toJSON(e,r){let n=r?.mapAsMap?new Map:{};return rde.addPairToJSMap(r,n,this)}toString(e,r,n){return e?.doc?tde.stringifyPair(this,e,r,n):JSON.stringify(this)}};sI.Pair=qv;sI.createPair=nde});var aI=P(q5=>{"use strict";b();var yu=rt(),C5=Kp(),Rv=Gp();function ide(t,e,r){return(e.inFlow??t.flow?ade:sde)(t,e,r)}function sde({comment:t,items:e},r,{blockItemPrefix:n,flowChars:i,itemIndent:s,onChompKeep:a,onComment:u}){let{indent:c,options:{commentString:p}}=r,d=Object.assign({},r,{indent:s,type:null}),m=!1,h=[];for(let w=0;w<e.length;++w){let x=e[w],k=null;if(yu.isNode(x))!m&&x.spaceBefore&&h.push(""),Mv(r,h,x.commentBefore,m),x.comment&&(k=x.comment);else if(yu.isPair(x)){let I=yu.isNode(x.key)?x.key:null;I&&(!m&&I.spaceBefore&&h.push(""),Mv(r,h,I.commentBefore,m))}m=!1;let v=C5.stringify(x,d,()=>k=null,()=>m=!0);k&&(v+=Rv.lineComment(v,s,p(k))),m&&k&&(m=!1),h.push(n+v)}let y;if(h.length===0)y=i.start+i.end;else{y=h[0];for(let w=1;w<h.length;++w){let x=h[w];y+=x?`
1285
+ ${c}${x}`:`
1286
+ `}}return t?(y+=`
1287
+ `+Rv.indentComment(p(t),c),u&&u()):m&&a&&a(),y}function ade({items:t},e,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:s,flowCollectionPadding:a,options:{commentString:u}}=e;n+=s;let c=Object.assign({},e,{indent:n,inFlow:!0,type:null}),p=!1,d=0,m=[];for(let w=0;w<t.length;++w){let x=t[w],k=null;if(yu.isNode(x))x.spaceBefore&&m.push(""),Mv(e,m,x.commentBefore,!1),x.comment&&(k=x.comment);else if(yu.isPair(x)){let I=yu.isNode(x.key)?x.key:null;I&&(I.spaceBefore&&m.push(""),Mv(e,m,I.commentBefore,!1),I.comment&&(p=!0));let T=yu.isNode(x.value)?x.value:null;T?(T.comment&&(k=T.comment),T.commentBefore&&(p=!0)):x.value==null&&I?.comment&&(k=I.comment)}k&&(p=!0);let v=C5.stringify(x,c,()=>k=null);p||(p=m.length>d||v.includes(`
1288
+ `)),w<t.length-1?v+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(p||(p=m.reduce((I,T)=>I+T.length+2,2)+(v.length+2)>e.options.lineWidth)),p&&(v+=",")),k&&(v+=Rv.lineComment(v,n,u(k))),m.push(v),d=m.length}let{start:h,end:y}=r;if(m.length===0)return h+y;if(!p){let w=m.reduce((x,k)=>x+k.length+2,2);p=e.options.lineWidth>0&&w>e.options.lineWidth}if(p){let w=h;for(let x of m)w+=x?`
1289
+ ${s}${i}${x}`:`
1290
+ `;return`${w}
1291
+ ${i}${y}`}else return`${h}${a}${m.join(" ")}${a}${y}`}function Mv({indent:t,options:{commentString:e}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let s=Rv.indentComment(e(n),t);r.push(s.trimStart())}}q5.stringifyCollection=ide});var to=P(uI=>{"use strict";b();var ode=aI(),ude=iI(),cde=xv(),eo=rt(),Dv=Za(),lde=er();function Xp(t,e){let r=eo.isScalar(e)?e.value:e;for(let n of t)if(eo.isPair(n)&&(n.key===e||n.key===r||eo.isScalar(n.key)&&n.key.value===r))return n}var oI=class extends cde.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(eo.MAP,e),this.items=[]}static from(e,r,n){let{keepUndefined:i,replacer:s}=n,a=new this(e),u=(c,p)=>{if(typeof s=="function")p=s.call(r,c,p);else if(Array.isArray(s)&&!s.includes(c))return;(p!==void 0||i)&&a.items.push(Dv.createPair(c,p,n))};if(r instanceof Map)for(let[c,p]of r)u(c,p);else if(r&&typeof r=="object")for(let c of Object.keys(r))u(c,r[c]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}add(e,r){let n;eo.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Dv.Pair(e,e?.value):n=new Dv.Pair(e.key,e.value);let i=Xp(this.items,n.key),s=this.schema?.sortMapEntries;if(i){if(!r)throw new Error(`Key ${n.key} already set`);eo.isScalar(i.value)&&lde.isScalarValue(n.value)?i.value.value=n.value:i.value=n.value}else if(s){let a=this.items.findIndex(u=>s(n,u)<0);a===-1?this.items.push(n):this.items.splice(a,0,n)}else this.items.push(n)}delete(e){let r=Xp(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let i=Xp(this.items,e)?.value;return(!r&&eo.isScalar(i)?i.value:i)??void 0}has(e){return!!Xp(this.items,e)}set(e,r){this.add(new Dv.Pair(e,r),!0)}toJSON(e,r,n){let i=n?new n:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(i);for(let s of this.items)ude.addPairToJSMap(r,i,s);return i}toString(e,r,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!eo.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ode.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}};uI.YAMLMap=oI;uI.findPair=Xp});var sl=P(M5=>{"use strict";b();var fde=rt(),R5=to(),pde={collection:"map",default:!0,nodeClass:R5.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return fde.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>R5.YAMLMap.from(t,e,r)};M5.map=pde});var ro=P(D5=>{"use strict";b();var hde=Wp(),dde=aI(),mde=xv(),jv=rt(),gde=er(),yde=Ka(),cI=class extends mde.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(jv.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=Fv(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let n=Fv(e);if(typeof n!="number")return;let i=this.items[n];return!r&&jv.isScalar(i)?i.value:i}has(e){let r=Fv(e);return typeof r=="number"&&r<this.items.length}set(e,r){let n=Fv(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];jv.isScalar(i)&&gde.isScalarValue(r)?i.value=r:this.items[n]=r}toJSON(e,r){let n=[];r?.onCreate&&r.onCreate(n);let i=0;for(let s of this.items)n.push(yde.toJS(s,String(i++),r));return n}toString(e,r,n){return e?dde.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:r}):JSON.stringify(this)}static from(e,r,n){let{replacer:i}=n,s=new this(e);if(r&&Symbol.iterator in Object(r)){let a=0;for(let u of r){if(typeof i=="function"){let c=r instanceof Set?u:String(a++);u=i.call(r,c,u)}s.items.push(hde.createNode(u,void 0,n))}}return s}};function Fv(t){let e=jv.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}D5.YAMLSeq=cI});var al=P(j5=>{"use strict";b();var _de=rt(),F5=ro(),vde={collection:"seq",default:!0,nodeClass:F5.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return _de.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>F5.YAMLSeq.from(t,e,r)};j5.seq=vde});var Zp=P(B5=>{"use strict";b();var bde=Jp(),Sde={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,n){return e=Object.assign({actualString:!0},e),bde.stringifyString(t,e,r,n)}};B5.string=Sde});var Bv=P(U5=>{"use strict";b();var $5=er(),V5={identify:t=>t==null,createNode:()=>new $5.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new $5.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&V5.test.test(t)?t:e.options.nullStr};U5.nullTag=V5});var lI=P(G5=>{"use strict";b();var wde=er(),W5={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new wde.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&W5.test.test(t)){let n=t[0]==="t"||t[0]==="T";if(e===n)return t}return e?r.options.trueStr:r.options.falseStr}};G5.boolTag=W5});var ol=P(H5=>{"use strict";b();function xde({format:t,minFractionDigits:e,tag:r,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=Object.is(n,-0)?"-0":JSON.stringify(n);if(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let u=e-(s.length-a-1);for(;u-- >0;)s+="0"}return s}H5.stringifyNumber=xde});var pI=P($v=>{"use strict";b();var kde=er(),fI=ol(),Ade={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:fI.stringifyNumber},Ide={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():fI.stringifyNumber(t)}},Tde={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new kde.Scalar(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:fI.stringifyNumber};$v.float=Tde;$v.floatExp=Ide;$v.floatNaN=Ade});var dI=P(Uv=>{"use strict";b();var z5=ol(),Vv=t=>typeof t=="bigint"||Number.isInteger(t),hI=(t,e,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t.substring(e),r);function J5(t,e,r){let{value:n}=t;return Vv(n)&&n>=0?r+n.toString(e):z5.stringifyNumber(t)}var Ede={identify:t=>Vv(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,r)=>hI(t,2,8,r),stringify:t=>J5(t,8,"0o")},Ode={identify:Vv,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,r)=>hI(t,0,10,r),stringify:z5.stringifyNumber},Nde={identify:t=>Vv(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,r)=>hI(t,2,16,r),stringify:t=>J5(t,16,"0x")};Uv.int=Ode;Uv.intHex=Nde;Uv.intOct=Ede});var Q5=P(K5=>{"use strict";b();var Lde=sl(),Pde=Bv(),Cde=al(),qde=Zp(),Rde=lI(),mI=pI(),gI=dI(),Mde=[Lde.map,Cde.seq,qde.string,Pde.nullTag,Rde.boolTag,gI.intOct,gI.int,gI.intHex,mI.floatNaN,mI.floatExp,mI.float];K5.schema=Mde});var Z5=P(X5=>{"use strict";b();var Dde=er(),Fde=sl(),jde=al();function Y5(t){return typeof t=="bigint"||Number.isInteger(t)}var Wv=({value:t})=>JSON.stringify(t),Bde=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Wv},{identify:t=>t==null,createNode:()=>new Dde.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Wv},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:Wv},{identify:Y5,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),stringify:({value:t})=>Y5(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Wv}],$de={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Vde=[Fde.map,jde.seq].concat(Bde,$de);X5.schema=Vde});var _I=P(e7=>{"use strict";b();var eh=Te("buffer"),yI=er(),Ude=Jp(),Wde={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof eh.Buffer=="function")return eh.Buffer.from(t,"base64");if(typeof atob=="function"){let r=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let i=0;i<r.length;++i)n[i]=r.charCodeAt(i);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:r},n,i,s){if(!r)return"";let a=r,u;if(typeof eh.Buffer=="function")u=a instanceof eh.Buffer?a.toString("base64"):eh.Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let p=0;p<a.length;++p)c+=String.fromCharCode(a[p]);u=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=yI.Scalar.BLOCK_LITERAL),e!==yI.Scalar.QUOTE_DOUBLE){let c=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),p=Math.ceil(u.length/c),d=new Array(p);for(let m=0,h=0;m<p;++m,h+=c)d[m]=u.substr(h,c);u=d.join(e===yI.Scalar.BLOCK_LITERAL?`
1292
+ `:" ")}return Ude.stringifyString({comment:t,type:e,value:u},n,i,s)}};e7.binary=Wde});var zv=P(Hv=>{"use strict";b();var Gv=rt(),vI=Za(),Gde=er(),Hde=ro();function t7(t,e){if(Gv.isSeq(t))for(let r=0;r<t.items.length;++r){let n=t.items[r];if(!Gv.isPair(n)){if(Gv.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new vI.Pair(new Gde.Scalar(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
1293
+ ${i.key.commentBefore}`:n.commentBefore),n.comment){let s=i.value??i.key;s.comment=s.comment?`${n.comment}
1294
+ ${s.comment}`:n.comment}n=i}t.items[r]=Gv.isPair(n)?n:new vI.Pair(n)}}else e("Expected a sequence for this tag");return t}function r7(t,e,r){let{replacer:n}=r,i=new Hde.YAMLSeq(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof n=="function"&&(a=n.call(e,String(s++),a));let u,c;if(Array.isArray(a))if(a.length===2)u=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let p=Object.keys(a);if(p.length===1)u=p[0],c=a[u];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else u=a;i.items.push(vI.createPair(u,c,r))}return i}var zde={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:t7,createNode:r7};Hv.createPairs=r7;Hv.pairs=zde;Hv.resolvePairs=t7});var wI=P(SI=>{"use strict";b();var n7=rt(),bI=Ka(),th=to(),Jde=ro(),i7=zv(),_u=class t extends Jde.YAMLSeq{constructor(){super(),this.add=th.YAMLMap.prototype.add.bind(this),this.delete=th.YAMLMap.prototype.delete.bind(this),this.get=th.YAMLMap.prototype.get.bind(this),this.has=th.YAMLMap.prototype.has.bind(this),this.set=th.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let n=new Map;r?.onCreate&&r.onCreate(n);for(let i of this.items){let s,a;if(n7.isPair(i)?(s=bI.toJS(i.key,"",r),a=bI.toJS(i.value,s,r)):s=bI.toJS(i,"",r),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,a)}return n}static from(e,r,n){let i=i7.createPairs(e,r,n),s=new this;return s.items=i.items,s}};_u.tag="tag:yaml.org,2002:omap";var Kde={collection:"seq",identify:t=>t instanceof Map,nodeClass:_u,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=i7.resolvePairs(t,e),n=[];for(let{key:i}of r.items)n7.isScalar(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new _u,r)},createNode:(t,e,r)=>_u.from(t,e,r)};SI.YAMLOMap=_u;SI.omap=Kde});var c7=P(xI=>{"use strict";b();var s7=er();function a7({value:t,source:e},r){return e&&(t?o7:u7).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}var o7={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new s7.Scalar(!0),stringify:a7},u7={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new s7.Scalar(!1),stringify:a7};xI.falseTag=u7;xI.trueTag=o7});var l7=P(Jv=>{"use strict";b();var Qde=er(),kI=ol(),Yde={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:kI.stringifyNumber},Xde={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():kI.stringifyNumber(t)}},Zde={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new Qde.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let n=t.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:kI.stringifyNumber};Jv.float=Zde;Jv.floatExp=Xde;Jv.floatNaN=Yde});var p7=P(nh=>{"use strict";b();var f7=ol(),rh=t=>typeof t=="bigint"||Number.isInteger(t);function Kv(t,e,r,{intAsBigInt:n}){let i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),n){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let a=BigInt(t);return i==="-"?BigInt(-1)*a:a}let s=parseInt(t,r);return i==="-"?-1*s:s}function AI(t,e,r){let{value:n}=t;if(rh(n)){let i=n.toString(e);return n<0?"-"+r+i.substr(1):r+i}return f7.stringifyNumber(t)}var eme={identify:rh,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>Kv(t,2,2,r),stringify:t=>AI(t,2,"0b")},tme={identify:rh,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>Kv(t,1,8,r),stringify:t=>AI(t,8,"0")},rme={identify:rh,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>Kv(t,0,10,r),stringify:f7.stringifyNumber},nme={identify:rh,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>Kv(t,2,16,r),stringify:t=>AI(t,16,"0x")};nh.int=rme;nh.intBin=eme;nh.intHex=nme;nh.intOct=tme});var TI=P(II=>{"use strict";b();var Xv=rt(),Qv=Za(),Yv=to(),vu=class t extends Yv.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let r;Xv.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new Qv.Pair(e.key,null):r=new Qv.Pair(e,null),Yv.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let n=Yv.findPair(this.items,e);return!r&&Xv.isPair(n)?Xv.isScalar(n.key)?n.key.value:n.key:n}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let n=Yv.findPair(this.items,e);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new Qv.Pair(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,n);throw new Error("Set items must all have null values")}static from(e,r,n){let{replacer:i}=n,s=new this(e);if(r&&Symbol.iterator in Object(r))for(let a of r)typeof i=="function"&&(a=i.call(r,a,a)),s.items.push(Qv.createPair(a,null,n));return s}};vu.tag="tag:yaml.org,2002:set";var ime={collection:"map",identify:t=>t instanceof Set,nodeClass:vu,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,r)=>vu.from(t,e,r),resolve(t,e){if(Xv.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new vu,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};II.YAMLSet=vu;II.set=ime});var OI=P(Zv=>{"use strict";b();var sme=ol();function EI(t,e){let r=t[0],n=r==="-"||r==="+"?t.substring(1):t,i=a=>e?BigInt(a):Number(a),s=n.replace(/_/g,"").split(":").reduce((a,u)=>a*i(60)+i(u),i(0));return r==="-"?i(-1)*s:s}function h7(t){let{value:e}=t,r=a=>a;if(typeof e=="bigint")r=a=>BigInt(a);else if(isNaN(e)||!isFinite(e))return sme.stringifyNumber(t);let n="";e<0&&(n="-",e*=r(-1));let i=r(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),n+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var ame={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:r})=>EI(t,r),stringify:h7},ome={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>EI(t,!1),stringify:h7},d7={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(d7.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,s,a,u]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,p=Date.UTC(r,n-1,i,s||0,a||0,u||0,c),d=e[8];if(d&&d!=="Z"){let m=EI(d,!1);Math.abs(m)<30&&(m*=60),p-=6e4*m}return new Date(p)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Zv.floatTime=ome;Zv.intTime=ame;Zv.timestamp=d7});var y7=P(g7=>{"use strict";b();var ume=sl(),cme=Bv(),lme=al(),fme=Zp(),pme=_I(),m7=c7(),NI=l7(),e0=p7(),hme=Pv(),dme=wI(),mme=zv(),gme=TI(),LI=OI(),yme=[ume.map,lme.seq,fme.string,cme.nullTag,m7.trueTag,m7.falseTag,e0.intBin,e0.intOct,e0.int,e0.intHex,NI.floatNaN,NI.floatExp,NI.float,pme.binary,hme.merge,dme.omap,mme.pairs,gme.set,LI.intTime,LI.floatTime,LI.timestamp];g7.schema=yme});var T7=P(qI=>{"use strict";b();var S7=sl(),_me=Bv(),w7=al(),vme=Zp(),bme=lI(),PI=pI(),CI=dI(),Sme=Q5(),wme=Z5(),x7=_I(),ih=Pv(),k7=wI(),A7=zv(),_7=y7(),I7=TI(),t0=OI(),v7=new Map([["core",Sme.schema],["failsafe",[S7.map,w7.seq,vme.string]],["json",wme.schema],["yaml11",_7.schema],["yaml-1.1",_7.schema]]),b7={binary:x7.binary,bool:bme.boolTag,float:PI.float,floatExp:PI.floatExp,floatNaN:PI.floatNaN,floatTime:t0.floatTime,int:CI.int,intHex:CI.intHex,intOct:CI.intOct,intTime:t0.intTime,map:S7.map,merge:ih.merge,null:_me.nullTag,omap:k7.omap,pairs:A7.pairs,seq:w7.seq,set:I7.set,timestamp:t0.timestamp},xme={"tag:yaml.org,2002:binary":x7.binary,"tag:yaml.org,2002:merge":ih.merge,"tag:yaml.org,2002:omap":k7.omap,"tag:yaml.org,2002:pairs":A7.pairs,"tag:yaml.org,2002:set":I7.set,"tag:yaml.org,2002:timestamp":t0.timestamp};function kme(t,e,r){let n=v7.get(e);if(n&&!t)return r&&!n.includes(ih.merge)?n.concat(ih.merge):n.slice();let i=n;if(!i)if(Array.isArray(t))i=[];else{let s=Array.from(v7.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(let s of t)i=i.concat(s);else typeof t=="function"&&(i=t(i.slice()));return r&&(i=i.concat(ih.merge)),i.reduce((s,a)=>{let u=typeof a=="string"?b7[a]:a;if(!u){let c=JSON.stringify(a),p=Object.keys(b7).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${p}`)}return s.includes(u)||s.push(u),s},[])}qI.coreKnownTags=xme;qI.getTags=kme});var DI=P(E7=>{"use strict";b();var RI=rt(),Ame=sl(),Ime=al(),Tme=Zp(),r0=T7(),Eme=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,MI=class t{constructor({compat:e,customTags:r,merge:n,resolveKnownTags:i,schema:s,sortMapEntries:a,toStringDefaults:u}){this.compat=Array.isArray(e)?r0.getTags(e,"compat"):e?r0.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?r0.coreKnownTags:{},this.tags=r0.getTags(r,this.name,n),this.toStringOptions=u??null,Object.defineProperty(this,RI.MAP,{value:Ame.map}),Object.defineProperty(this,RI.SCALAR,{value:Tme.string}),Object.defineProperty(this,RI.SEQ,{value:Ime.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?Eme:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};E7.Schema=MI});var N7=P(O7=>{"use strict";b();var Ome=rt(),FI=Kp(),sh=Gp();function Nme(t,e){let r=[],n=e.directives===!0;if(e.directives!==!1&&t.directives){let c=t.directives.toString(t);c?(r.push(c),n=!0):t.directives.docStart&&(n=!0)}n&&r.push("---");let i=FI.createStringifyContext(t,e),{commentString:s}=i.options;if(t.commentBefore){r.length!==1&&r.unshift("");let c=s(t.commentBefore);r.unshift(sh.indentComment(c,""))}let a=!1,u=null;if(t.contents){if(Ome.isNode(t.contents)){if(t.contents.spaceBefore&&n&&r.push(""),t.contents.commentBefore){let d=s(t.contents.commentBefore);r.push(sh.indentComment(d,""))}i.forceBlockIndent=!!t.comment,u=t.contents.comment}let c=u?void 0:()=>a=!0,p=FI.stringify(t.contents,i,()=>u=null,c);u&&(p+=sh.lineComment(p,"",s(u))),(p[0]==="|"||p[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${p}`:r.push(p)}else r.push(FI.stringify(t.contents,i));if(t.directives?.docEnd)if(t.comment){let c=s(t.comment);c.includes(`
1295
+ `)?(r.push("..."),r.push(sh.indentComment(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=t.comment;c&&a&&(c=c.replace(/^\n+/,"")),c&&((!a||u)&&r[r.length-1]!==""&&r.push(""),r.push(sh.indentComment(s(c),"")))}return r.join(`
1296
+ `)+`
1297
+ `}O7.stringifyDocument=Nme});var ah=P(L7=>{"use strict";b();var Lme=Up(),ul=xv(),Pi=rt(),Pme=Za(),Cme=Ka(),qme=DI(),Rme=N7(),jI=vv(),Mme=UA(),Dme=Wp(),BI=VA(),$I=class t{constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Pi.NODE_TYPE,{value:Pi.DOC});let i=null;typeof r=="function"||Array.isArray(r)?i=r:n===void 0&&r&&(n=r,r=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=s;let{version:a}=s;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new BI.Directives({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(t.prototype,{[Pi.NODE_TYPE]:{value:Pi.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Pi.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){cl(this.contents)&&this.contents.add(e)}addIn(e,r){cl(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let n=jI.anchorNames(this);e.anchor=!r||n.has(r)?jI.findNewAnchor(r||"a",n):r}return new Lme.Alias(e.anchor)}createNode(e,r,n){let i;if(typeof r=="function")e=r.call({"":e},"",e),i=r;else if(Array.isArray(r)){let k=I=>typeof I=="number"||I instanceof String||I instanceof Number,v=r.filter(k).map(String);v.length>0&&(r=r.concat(v)),i=r}else n===void 0&&r&&(n=r,r=void 0);let{aliasDuplicateObjects:s,anchorPrefix:a,flow:u,keepUndefined:c,onTagObj:p,tag:d}=n??{},{onAnchor:m,setAnchors:h,sourceObjects:y}=jI.createNodeAnchors(this,a||"a"),w={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:m,onTagObj:p,replacer:i,schema:this.schema,sourceObjects:y},x=Dme.createNode(e,d,w);return u&&Pi.isCollection(x)&&(x.flow=!0),h(),x}createPair(e,r,n={}){let i=this.createNode(e,null,n),s=this.createNode(r,null,n);return new Pme.Pair(i,s)}delete(e){return cl(this.contents)?this.contents.delete(e):!1}deleteIn(e){return ul.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):cl(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return Pi.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return ul.isEmptyPath(e)?!r&&Pi.isScalar(this.contents)?this.contents.value:this.contents:Pi.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return Pi.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return ul.isEmptyPath(e)?this.contents!==void 0:Pi.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=ul.collectionFromPath(this.schema,[e],r):cl(this.contents)&&this.contents.set(e,r)}setIn(e,r){ul.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=ul.collectionFromPath(this.schema,Array.from(e),r):cl(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new BI.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new BI.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new qme.Schema(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:n,maxAliasCount:i,onAnchor:s,reviver:a}={}){let u={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=Cme.toJS(this.contents,r??"",u);if(typeof s=="function")for(let{count:p,res:d}of u.anchors.values())s(d,p);return typeof a=="function"?Mme.applyReviver(a,{"":c},"",c):c}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return Rme.stringifyDocument(this,e)}};function cl(t){if(Pi.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}L7.Document=$I});var ch=P(uh=>{"use strict";b();var oh=class extends Error{constructor(e,r,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=r}},VI=class extends oh{constructor(e,r,n){super("YAMLParseError",e,r,n)}},UI=class extends oh{constructor(e,r,n){super("YAMLWarning",e,r,n)}},Fme=(t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(u=>e.linePos(u));let{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let s=i-1,a=t.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){let u=Math.min(s-39,a.length-79);a="\u2026"+a.substring(u),s-=u-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(a.substring(0,s))){let u=t.substring(e.lineStarts[n-2],e.lineStarts[n-1]);u.length>80&&(u=u.substring(0,79)+`\u2026
1298
+ `),a=u+a}if(/[^ ]/.test(a)){let u=1,c=r.linePos[1];c?.line===n&&c.col>i&&(u=Math.max(1,Math.min(c.col-i,80-s)));let p=" ".repeat(s)+"^".repeat(u);r.message+=`:
1299
+
1300
+ ${a}
1301
+ ${p}
1302
+ `}};uh.YAMLError=oh;uh.YAMLParseError=VI;uh.YAMLWarning=UI;uh.prettifyError=Fme});var lh=P(P7=>{"use strict";b();function jme(t,{flow:e,indicator:r,next:n,offset:i,onError:s,parentIndent:a,startOnNewline:u}){let c=!1,p=u,d=u,m="",h="",y=!1,w=!1,x=null,k=null,v=null,I=null,T=null,S=null,L=null;for(let F of t)switch(w&&(F.type!=="space"&&F.type!=="newline"&&F.type!=="comma"&&s(F.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w=!1),x&&(p&&F.type!=="comment"&&F.type!=="newline"&&s(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),x=null),F.type){case"space":!e&&(r!=="doc-start"||n?.type!=="flow-collection")&&F.source.includes(" ")&&(x=F),d=!0;break;case"comment":{d||s(F,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let X=F.source.substring(1)||" ";m?m+=h+X:m=X,h="",p=!1;break}case"newline":p?m?m+=F.source:(!S||r!=="seq-item-ind")&&(c=!0):h+=F.source,p=!0,y=!0,(k||v)&&(I=F),d=!0;break;case"anchor":k&&s(F,"MULTIPLE_ANCHORS","A node can have at most one anchor"),F.source.endsWith(":")&&s(F.offset+F.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),k=F,L??(L=F.offset),p=!1,d=!1,w=!0;break;case"tag":{v&&s(F,"MULTIPLE_TAGS","A node can have at most one tag"),v=F,L??(L=F.offset),p=!1,d=!1,w=!0;break}case r:(k||v)&&s(F,"BAD_PROP_ORDER",`Anchors and tags must be after the ${F.source} indicator`),S&&s(F,"UNEXPECTED_TOKEN",`Unexpected ${F.source} in ${e??"collection"}`),S=F,p=r==="seq-item-ind"||r==="explicit-key-ind",d=!1;break;case"comma":if(e){T&&s(F,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),T=F,p=!1,d=!1;break}default:s(F,"UNEXPECTED_TOKEN",`Unexpected ${F.type} token`),p=!1,d=!1}let R=t[t.length-1],M=R?R.offset+R.source.length:i;return w&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),x&&(p&&x.indent<=a||n?.type==="block-map"||n?.type==="block-seq")&&s(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:T,found:S,spaceBefore:c,comment:m,hasNewline:y,anchor:k,tag:v,newlineAfterProp:I,end:M,start:L??M}}P7.resolveProps=jme});var n0=P(C7=>{"use strict";b();function WI(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
1303
+ `))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(WI(e.key)||WI(e.value))return!0}return!1;default:return!0}}C7.containsNewline=WI});var GI=P(q7=>{"use strict";b();var Bme=n0();function $me(t,e,r){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&Bme.containsNewline(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}q7.flowIndentCheck=$me});var HI=P(M7=>{"use strict";b();var R7=rt();function Vme(t,e,r){let{uniqueKeys:n}=t.options;if(n===!1)return!1;let i=typeof n=="function"?n:(s,a)=>s===a||R7.isScalar(s)&&R7.isScalar(a)&&s.value===a.value;return e.some(s=>i(s.key,r))}M7.mapIncludes=Vme});var V7=P($7=>{"use strict";b();var D7=Za(),Ume=to(),F7=lh(),Wme=n0(),j7=GI(),Gme=HI(),B7="All mapping items must start at the same column";function Hme({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=s?.nodeClass??Ume.YAMLMap,u=new a(r.schema);r.atRoot&&(r.atRoot=!1);let c=n.offset,p=null;for(let d of n.items){let{start:m,key:h,sep:y,value:w}=d,x=F7.resolveProps(m,{indicator:"explicit-key-ind",next:h??y?.[0],offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0}),k=!x.found;if(k){if(h&&(h.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==n.indent&&i(c,"BAD_INDENT",B7)),!x.anchor&&!x.tag&&!y){p=x.end,x.comment&&(u.comment?u.comment+=`
1304
+ `+x.comment:u.comment=x.comment);continue}(x.newlineAfterProp||Wme.containsNewline(h))&&i(h??m[m.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else x.found?.indent!==n.indent&&i(c,"BAD_INDENT",B7);r.atKey=!0;let v=x.end,I=h?t(r,h,x,i):e(r,v,m,null,x,i);r.schema.compat&&j7.flowIndentCheck(n.indent,h,i),r.atKey=!1,Gme.mapIncludes(r,u.items,I)&&i(v,"DUPLICATE_KEY","Map keys must be unique");let T=F7.resolveProps(y??[],{indicator:"map-value-ind",next:w,offset:I.range[2],onError:i,parentIndent:n.indent,startOnNewline:!h||h.type==="block-scalar"});if(c=T.end,T.found){k&&(w?.type==="block-map"&&!T.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&x.start<T.found.offset-1024&&i(I.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let S=w?t(r,w,T,i):e(r,c,y,null,T,i);r.schema.compat&&j7.flowIndentCheck(n.indent,w,i),c=S.range[2];let L=new D7.Pair(I,S);r.options.keepSourceTokens&&(L.srcToken=d),u.items.push(L)}else{k&&i(I.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),T.comment&&(I.comment?I.comment+=`
1305
+ `+T.comment:I.comment=T.comment);let S=new D7.Pair(I);r.options.keepSourceTokens&&(S.srcToken=d),u.items.push(S)}}return p&&p<c&&i(p,"IMPOSSIBLE","Map comment with trailing content"),u.range=[n.offset,c,p??c],u}$7.resolveBlockMap=Hme});var W7=P(U7=>{"use strict";b();var zme=ro(),Jme=lh(),Kme=GI();function Qme({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=s?.nodeClass??zme.YAMLSeq,u=new a(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=n.offset,p=null;for(let{start:d,value:m}of n.items){let h=Jme.resolveProps(d,{indicator:"seq-item-ind",next:m,offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||m)m?.type==="block-seq"?i(h.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{p=h.end,h.comment&&(u.comment=h.comment);continue}let y=m?t(r,m,h,i):e(r,h.end,d,null,h,i);r.schema.compat&&Kme.flowIndentCheck(n.indent,m,i),c=y.range[2],u.items.push(y)}return u.range=[n.offset,c,p??c],u}U7.resolveBlockSeq=Qme});var ll=P(G7=>{"use strict";b();function Yme(t,e,r,n){let i="";if(t){let s=!1,a="";for(let u of t){let{source:c,type:p}=u;switch(p){case"space":s=!0;break;case"comment":{r&&!s&&n(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=c.substring(1)||" ";i?i+=a+d:i=d,a="";break}case"newline":i&&(a+=c),s=!0;break;default:n(u,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=c.length}}return{comment:i,offset:e}}G7.resolveEnd=Yme});var K7=P(J7=>{"use strict";b();var Xme=rt(),Zme=Za(),H7=to(),ege=ro(),tge=ll(),z7=lh(),rge=n0(),nge=HI(),zI="Block collections are not allowed within flow collections",JI=t=>t&&(t.type==="block-map"||t.type==="block-seq");function ige({composeNode:t,composeEmptyNode:e},r,n,i,s){let a=n.start.source==="{",u=a?"flow map":"flow sequence",c=s?.nodeClass??(a?H7.YAMLMap:ege.YAMLSeq),p=new c(r.schema);p.flow=!0;let d=r.atRoot;d&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let m=n.offset+n.start.source.length;for(let k=0;k<n.items.length;++k){let v=n.items[k],{start:I,key:T,sep:S,value:L}=v,R=z7.resolveProps(I,{flow:u,indicator:"explicit-key-ind",next:T??S?.[0],offset:m,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!R.found){if(!R.anchor&&!R.tag&&!S&&!L){k===0&&R.comma?i(R.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`):k<n.items.length-1&&i(R.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${u}`),R.comment&&(p.comment?p.comment+=`
1306
+ `+R.comment:p.comment=R.comment),m=R.end;continue}!a&&r.options.strict&&rge.containsNewline(T)&&i(T,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(k===0)R.comma&&i(R.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`);else if(R.comma||i(R.start,"MISSING_CHAR",`Missing , between ${u} items`),R.comment){let M="";e:for(let F of I)switch(F.type){case"comma":case"space":break;case"comment":M=F.source.substring(1);break e;default:break e}if(M){let F=p.items[p.items.length-1];Xme.isPair(F)&&(F=F.value??F.key),F.comment?F.comment+=`
1307
+ `+M:F.comment=M,R.comment=R.comment.substring(M.length+1)}}if(!a&&!S&&!R.found){let M=L?t(r,L,R,i):e(r,R.end,S,null,R,i);p.items.push(M),m=M.range[2],JI(L)&&i(M.range,"BLOCK_IN_FLOW",zI)}else{r.atKey=!0;let M=R.end,F=T?t(r,T,R,i):e(r,M,I,null,R,i);JI(T)&&i(F.range,"BLOCK_IN_FLOW",zI),r.atKey=!1;let X=z7.resolveProps(S??[],{flow:u,indicator:"map-value-ind",next:L,offset:F.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(X.found){if(!a&&!R.found&&r.options.strict){if(S)for(let B of S){if(B===X.found)break;if(B.type==="newline"){i(B,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}R.start<X.found.offset-1024&&i(X.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else L&&("source"in L&&L.source?.[0]===":"?i(L,"MISSING_CHAR",`Missing space after : in ${u}`):i(X.start,"MISSING_CHAR",`Missing , or : between ${u} items`));let H=L?t(r,L,X,i):X.found?e(r,X.end,S,null,X,i):null;H?JI(L)&&i(H.range,"BLOCK_IN_FLOW",zI):X.comment&&(F.comment?F.comment+=`
1308
+ `+X.comment:F.comment=X.comment);let $=new Zme.Pair(F,H);if(r.options.keepSourceTokens&&($.srcToken=v),a){let B=p;nge.mapIncludes(r,B.items,F)&&i(M,"DUPLICATE_KEY","Map keys must be unique"),B.items.push($)}else{let B=new H7.YAMLMap(r.schema);B.flow=!0,B.items.push($);let Z=(H??F).range;B.range=[F.range[0],Z[1],Z[2]],p.items.push(B)}m=H?H.range[2]:X.end}}let h=a?"}":"]",[y,...w]=n.end,x=m;if(y?.source===h)x=y.offset+y.source.length;else{let k=u[0].toUpperCase()+u.substring(1),v=d?`${k} must end with a ${h}`:`${k} in block collection must be sufficiently indented and end with a ${h}`;i(m,d?"MISSING_CHAR":"BAD_INDENT",v),y&&y.source.length!==1&&w.unshift(y)}if(w.length>0){let k=tge.resolveEnd(w,x,r.options.strict,i);k.comment&&(p.comment?p.comment+=`
1309
+ `+k.comment:p.comment=k.comment),p.range=[n.offset,x,k.offset]}else p.range=[n.offset,x,x];return p}J7.resolveFlowCollection=ige});var Y7=P(Q7=>{"use strict";b();var sge=rt(),age=er(),oge=to(),uge=ro(),cge=V7(),lge=W7(),fge=K7();function KI(t,e,r,n,i,s){let a=r.type==="block-map"?cge.resolveBlockMap(t,e,r,n,s):r.type==="block-seq"?lge.resolveBlockSeq(t,e,r,n,s):fge.resolveFlowCollection(t,e,r,n,s),u=a.constructor;return i==="!"||i===u.tagName?(a.tag=u.tagName,a):(i&&(a.tag=i),a)}function pge(t,e,r,n,i){let s=n.tag,a=s?e.directives.tagName(s.source,h=>i(s,"TAG_RESOLVE_FAILED",h)):null;if(r.type==="block-seq"){let{anchor:h,newlineAfterProp:y}=n,w=h&&s?h.offset>s.offset?h:s:h??s;w&&(!y||y.offset<w.offset)&&i(w,"MISSING_CHAR","Missing newline after block sequence props")}let u=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!s||!a||a==="!"||a===oge.YAMLMap.tagName&&u==="map"||a===uge.YAMLSeq.tagName&&u==="seq")return KI(t,e,r,i,a);let c=e.schema.tags.find(h=>h.tag===a&&h.collection===u);if(!c){let h=e.schema.knownTags[a];if(h?.collection===u)e.schema.tags.push(Object.assign({},h,{default:!1})),c=h;else return h?i(s,"BAD_COLLECTION_TYPE",`${h.tag} used for ${u} collection, but expects ${h.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),KI(t,e,r,i,a)}let p=KI(t,e,r,i,a,c),d=c.resolve?.(p,h=>i(s,"TAG_RESOLVE_FAILED",h),e.options)??p,m=sge.isNode(d)?d:new age.Scalar(d);return m.range=p.range,m.tag=a,c?.format&&(m.format=c.format),m}Q7.composeCollection=pge});var YI=P(X7=>{"use strict";b();var QI=er();function hge(t,e,r){let n=e.offset,i=dge(e,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let s=i.mode===">"?QI.Scalar.BLOCK_FOLDED:QI.Scalar.BLOCK_LITERAL,a=e.source?mge(e.source):[],u=a.length;for(let x=a.length-1;x>=0;--x){let k=a[x][1];if(k===""||k==="\r")u=x;else break}if(u===0){let x=i.chomp==="+"&&a.length>0?`
1310
+ `.repeat(Math.max(1,a.length-1)):"",k=n+i.length;return e.source&&(k+=e.source.length),{value:x,type:s,comment:i.comment,range:[n,k,k]}}let c=e.indent+i.indent,p=e.offset+i.length,d=0;for(let x=0;x<u;++x){let[k,v]=a[x];if(v===""||v==="\r")i.indent===0&&k.length>c&&(c=k.length);else{k.length<c&&r(p+k.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(c=k.length),d=x,c===0&&!t.atRoot&&r(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=k.length+v.length+1}for(let x=a.length-1;x>=u;--x)a[x][0].length>c&&(u=x+1);let m="",h="",y=!1;for(let x=0;x<d;++x)m+=a[x][0].slice(c)+`
1311
+ `;for(let x=d;x<u;++x){let[k,v]=a[x];p+=k.length+v.length+1;let I=v[v.length-1]==="\r";if(I&&(v=v.slice(0,-1)),v&&k.length<c){let S=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;r(p-v.length-(I?2:1),"BAD_INDENT",S),k=""}s===QI.Scalar.BLOCK_LITERAL?(m+=h+k.slice(c)+v,h=`
1312
+ `):k.length>c||v[0]===" "?(h===" "?h=`
1313
+ `:!y&&h===`
1314
+ `&&(h=`
1315
+
1316
+ `),m+=h+k.slice(c)+v,h=`
1317
+ `,y=!0):v===""?h===`
1318
+ `?m+=`
1319
+ `:h=`
1320
+ `:(m+=h+v,h=" ",y=!1)}switch(i.chomp){case"-":break;case"+":for(let x=u;x<a.length;++x)m+=`
1321
+ `+a[x][0].slice(c);m[m.length-1]!==`
1322
+ `&&(m+=`
1323
+ `);break;default:m+=`
1324
+ `}let w=n+i.length+e.source.length;return{value:m,type:s,comment:i.comment,range:[n,w,w]}}function dge({offset:t,props:e},r,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],s=i[0],a=0,u="",c=-1;for(let h=1;h<i.length;++h){let y=i[h];if(!u&&(y==="-"||y==="+"))u=y;else{let w=Number(y);!a&&w?a=w:c===-1&&(c=t+h)}}c!==-1&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let p=!1,d="",m=i.length;for(let h=1;h<e.length;++h){let y=e[h];switch(y.type){case"space":p=!0;case"newline":m+=y.source.length;break;case"comment":r&&!p&&n(y,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),m+=y.source.length,d=y.source.substring(1);break;case"error":n(y,"UNEXPECTED_TOKEN",y.message),m+=y.source.length;break;default:{let w=`Unexpected token in block scalar header: ${y.type}`;n(y,"UNEXPECTED_TOKEN",w);let x=y.source;x&&typeof x=="string"&&(m+=x.length)}}}return{mode:s,indent:a,chomp:u,comment:d,length:m}}function mge(t){let e=t.split(/\n( *)/),r=e[0],n=r.match(/^( *)/),s=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let a=1;a<e.length;a+=2)s.push([e[a],e[a+1]]);return s}X7.resolveBlockScalar=hge});var ZI=P(eB=>{"use strict";b();var XI=er(),gge=ll();function yge(t,e,r){let{offset:n,type:i,source:s,end:a}=t,u,c,p=(h,y,w)=>r(n+h,y,w);switch(i){case"scalar":u=XI.Scalar.PLAIN,c=_ge(s,p);break;case"single-quoted-scalar":u=XI.Scalar.QUOTE_SINGLE,c=vge(s,p);break;case"double-quoted-scalar":u=XI.Scalar.QUOTE_DOUBLE,c=bge(s,p);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+s.length,n+s.length]}}let d=n+s.length,m=gge.resolveEnd(a,d,e,r);return{value:c,type:u,comment:m.comment,range:[n,d,m.offset]}}function _ge(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Z7(t)}function vge(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Z7(t.slice(1,-1)).replace(/''/g,"'")}function Z7(t){let e,r;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
1325
+ `,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
1326
+ `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(t);if(!n)return t;let i=n[1],s=" ",a=e.lastIndex;for(r.lastIndex=a;n=r.exec(t);)n[1]===""?s===`
1327
+ `?i+=s:s=`
1328
+ `:(i+=s+n[1],s=" "),a=r.lastIndex;let u=/[ \t]*(.*)/sy;return u.lastIndex=a,n=u.exec(t),i+s+(n?.[1]??"")}function bge(t,e){let r="";for(let n=1;n<t.length-1;++n){let i=t[n];if(!(i==="\r"&&t[n+1]===`
1329
+ `))if(i===`
1330
+ `){let{fold:s,offset:a}=Sge(t,n);r+=s,n=a}else if(i==="\\"){let s=t[++n],a=wge[s];if(a)r+=a;else if(s===`
1331
+ `)for(s=t[n+1];s===" "||s===" ";)s=t[++n+1];else if(s==="\r"&&t[n+1]===`
1332
+ `)for(s=t[++n+1];s===" "||s===" ";)s=t[++n+1];else if(s==="x"||s==="u"||s==="U"){let u={x:2,u:4,U:8}[s];r+=xge(t,n+1,u,e),n+=u}else{let u=t.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),r+=u}}else if(i===" "||i===" "){let s=n,a=t[n+1];for(;a===" "||a===" ";)a=t[++n+1];a!==`
1333
+ `&&!(a==="\r"&&t[n+2]===`
1334
+ `)&&(r+=n>s?t.slice(s,n+1):i)}else r+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function Sge(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===`
1335
+ `||n==="\r")&&!(n==="\r"&&t[e+2]!==`
1336
+ `);)n===`
1337
+ `&&(r+=`
1338
+ `),e+=1,n=t[e+1];return r||(r=" "),{fold:r,offset:e}}var wge={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
1339
+ `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function xge(t,e,r,n){let i=t.substr(e,r),a=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(a)){let u=t.substr(e-2,r+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),u}return String.fromCodePoint(a)}eB.resolveFlowScalar=yge});var nB=P(rB=>{"use strict";b();var bu=rt(),tB=er(),kge=YI(),Age=ZI();function Ige(t,e,r,n){let{value:i,type:s,comment:a,range:u}=e.type==="block-scalar"?kge.resolveBlockScalar(t,e,n):Age.resolveFlowScalar(e,t.options.strict,n),c=r?t.directives.tagName(r.source,m=>n(r,"TAG_RESOLVE_FAILED",m)):null,p;t.options.stringKeys&&t.atKey?p=t.schema[bu.SCALAR]:c?p=Tge(t.schema,i,c,r,n):e.type==="scalar"?p=Ege(t,i,e,n):p=t.schema[bu.SCALAR];let d;try{let m=p.resolve(i,h=>n(r??e,"TAG_RESOLVE_FAILED",h),t.options);d=bu.isScalar(m)?m:new tB.Scalar(m)}catch(m){let h=m instanceof Error?m.message:String(m);n(r??e,"TAG_RESOLVE_FAILED",h),d=new tB.Scalar(i)}return d.range=u,d.source=i,s&&(d.type=s),c&&(d.tag=c),p.format&&(d.format=p.format),a&&(d.comment=a),d}function Tge(t,e,r,n,i){if(r==="!")return t[bu.SCALAR];let s=[];for(let u of t.tags)if(!u.collection&&u.tag===r)if(u.default&&u.test)s.push(u);else return u;for(let u of s)if(u.test?.test(e))return u;let a=t.knownTags[r];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[bu.SCALAR])}function Ege({atKey:t,directives:e,schema:r},n,i,s){let a=r.tags.find(u=>(u.default===!0||t&&u.default==="key")&&u.test?.test(n))||r[bu.SCALAR];if(r.compat){let u=r.compat.find(c=>c.default&&c.test?.test(n))??r[bu.SCALAR];if(a.tag!==u.tag){let c=e.tagString(a.tag),p=e.tagString(u.tag),d=`Value may be parsed as either ${c} or ${p}`;s(i,"TAG_RESOLVE_FAILED",d,!0)}}return a}rB.composeScalar=Ige});var sB=P(iB=>{"use strict";b();function Oge(t,e,r){if(e){r??(r=e.length);for(let n=r-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++n];i?.type==="space";)t+=i.source.length,i=e[++n];break}}return t}iB.emptyScalarPosition=Oge});var uB=P(tT=>{"use strict";b();var Nge=Up(),Lge=rt(),Pge=Y7(),aB=nB(),Cge=ll(),qge=sB(),Rge={composeNode:oB,composeEmptyNode:eT};function oB(t,e,r,n){let i=t.atKey,{spaceBefore:s,comment:a,anchor:u,tag:c}=r,p,d=!0;switch(e.type){case"alias":p=Mge(t,e,n),(u||c)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=aB.composeScalar(t,e,c,n),u&&(p.anchor=u.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{p=Pge.composeCollection(Rge,t,e,r,n),u&&(p.anchor=u.source.substring(1))}catch(m){let h=m instanceof Error?m.message:String(m);n(e,"RESOURCE_EXHAUSTION",h)}break;default:{let m=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",m),d=!1}}return p??(p=eT(t,e.offset,void 0,null,r,n)),u&&p.anchor===""&&n(u,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!Lge.isScalar(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&n(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(p.spaceBefore=!0),a&&(e.type==="scalar"&&e.source===""?p.comment=a:p.commentBefore=a),t.options.keepSourceTokens&&d&&(p.srcToken=e),p}function eT(t,e,r,n,{spaceBefore:i,comment:s,anchor:a,tag:u,end:c},p){let d={type:"scalar",offset:qge.emptyScalarPosition(e,r,n),indent:-1,source:""},m=aB.composeScalar(t,d,u,p);return a&&(m.anchor=a.source.substring(1),m.anchor===""&&p(a,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(m.spaceBefore=!0),s&&(m.comment=s,m.range[2]=c),m}function Mge({options:t},{offset:e,source:r,end:n},i){let s=new Nge.Alias(r.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=e+r.length,u=Cge.resolveEnd(n,a,t.strict,i);return s.range=[e,a,u.offset],u.comment&&(s.comment=u.comment),s}tT.composeEmptyNode=eT;tT.composeNode=oB});var fB=P(lB=>{"use strict";b();var Dge=ah(),cB=uB(),Fge=ll(),jge=lh();function Bge(t,e,{offset:r,start:n,value:i,end:s},a){let u=Object.assign({_directives:e},t),c=new Dge.Document(void 0,u),p={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},d=jge.resolveProps(n,{indicator:"doc-start",next:i??s?.[0],offset:r,onError:a,parentIndent:0,startOnNewline:!0});d.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline&&a(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?cB.composeNode(p,i,d,a):cB.composeEmptyNode(p,d.end,n,null,d,a);let m=c.contents.range[2],h=Fge.resolveEnd(s,m,!1,a);return h.comment&&(c.comment=h.comment),c.range=[r,m,h.offset],c}lB.composeDoc=Bge});var nT=P(dB=>{"use strict";b();var $ge=Te("process"),Vge=VA(),Uge=ah(),fh=ch(),pB=rt(),Wge=fB(),Gge=ll();function ph(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}function hB(t){let e="",r=!1,n=!1;for(let i=0;i<t.length;++i){let s=t[i];switch(s[0]){case"#":e+=(e===""?"":n?`
1340
+
1341
+ `:`
1342
+ `)+(s.substring(1)||" "),r=!0,n=!1;break;case"%":t[i+1]?.[0]!=="#"&&(i+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:e,afterEmptyLine:n}}var rT=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,n,i,s)=>{let a=ph(r);s?this.warnings.push(new fh.YAMLWarning(a,n,i)):this.errors.push(new fh.YAMLParseError(a,n,i))},this.directives=new Vge.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:n,afterEmptyLine:i}=hB(this.prelude);if(n){let s=e.contents;if(r)e.comment=e.comment?`${e.comment}
1343
+ ${n}`:n;else if(i||e.directives.docStart||!s)e.commentBefore=n;else if(pB.isCollection(s)&&!s.flow&&s.items.length>0){let a=s.items[0];pB.isPair(a)&&(a=a.key);let u=a.commentBefore;a.commentBefore=u?`${n}
1344
+ ${u}`:n}else{let a=s.commentBefore;s.commentBefore=a?`${n}
1345
+ ${a}`:n}}r?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:hB(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,n=-1){for(let i of e)yield*this.next(i);yield*this.end(r,n)}*next(e){switch($ge.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(r,n,i)=>{let s=ph(e);s[0]+=r,this.onError(s,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=Wge.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new fh.YAMLParseError(ph(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new fh.YAMLParseError(ph(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=Gge.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
1346
+ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new fh.YAMLParseError(ph(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new Uge.Document(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,r,r],this.decorate(i,!1),yield i}}};dB.Composer=rT});var yB=P(i0=>{"use strict";b();var Hge=YI(),zge=ZI(),Jge=ch(),mB=Jp();function Kge(t,e=!0,r){if(t){let n=(i,s,a)=>{let u=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(r)r(u,s,a);else throw new Jge.YAMLParseError([u,u+1],s,a)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return zge.resolveFlowScalar(t,e,n);case"block-scalar":return Hge.resolveBlockScalar({options:{strict:e}},t,n)}}return null}function Qge(t,e){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:s=-1,type:a="PLAIN"}=e,u=mB.stringifyString({type:a,value:t},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:n,source:`
1347
+ `}];switch(u[0]){case"|":case">":{let p=u.indexOf(`
1348
+ `),d=u.substring(0,p),m=u.substring(p+1)+`
1349
+ `,h=[{type:"block-scalar-header",offset:s,indent:n,source:d}];return gB(h,c)||h.push({type:"newline",offset:-1,indent:n,source:`
1350
+ `}),{type:"block-scalar",offset:s,indent:n,props:h,source:m}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:u,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:u,end:c};default:return{type:"scalar",offset:s,indent:n,source:u,end:c}}}function Yge(t,e,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:s=!1,type:a}=r,u="indent"in t?t.indent:null;if(n&&typeof u=="number"&&(u+=2),!a)switch(t.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let p=t.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let c=mB.stringifyString({type:a,value:e},{implicitKey:i||u===null,indent:u!==null&&u>0?" ".repeat(u):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Xge(t,c);break;case'"':iT(t,c,"double-quoted-scalar");break;case"'":iT(t,c,"single-quoted-scalar");break;default:iT(t,c,"scalar")}}function Xge(t,e){let r=e.indexOf(`
1351
+ `),n=e.substring(0,r),i=e.substring(r+1)+`
1352
+ `;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=n,t.source=i}else{let{offset:s}=t,a="indent"in t?t.indent:-1,u=[{type:"block-scalar-header",offset:s,indent:a,source:n}];gB(u,"end"in t?t.end:void 0)||u.push({type:"newline",offset:-1,indent:a,source:`
1353
+ `});for(let c of Object.keys(t))c!=="type"&&c!=="offset"&&delete t[c];Object.assign(t,{type:"block-scalar",indent:a,props:u,source:i})}}function gB(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}function iT(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let n=t.props.slice(1),i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(let s of n)s.offset+=i;delete t.props,Object.assign(t,{type:r,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
1354
+ `};delete t.items,Object.assign(t,{type:r,source:e,end:[i]});break}default:{let n="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:r,indent:n,source:e,end:i})}}}i0.createScalarToken=Qge;i0.resolveAsScalar=Kge;i0.setScalarValue=Yge});var vB=P(_B=>{"use strict";b();var Zge=t=>"type"in t?a0(t):s0(t);function a0(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=a0(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=s0(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=s0(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=s0(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}function s0({start:t,key:e,sep:r,value:n}){let i="";for(let s of t)i+=s.source;if(e&&(i+=a0(e)),r)for(let s of r)i+=s.source;return n&&(i+=a0(n)),i}_B.stringify=Zge});var xB=P(wB=>{"use strict";b();var sT=Symbol("break visit"),eye=Symbol("skip children"),bB=Symbol("remove item");function Su(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),SB(Object.freeze([]),t,e)}Su.BREAK=sT;Su.SKIP=eye;Su.REMOVE=bB;Su.itemAtPath=(t,e)=>{let r=t;for(let[n,i]of e){let s=r?.[n];if(s&&"items"in s)r=s.items[i];else return}return r};Su.parentCollection=(t,e)=>{let r=Su.itemAtPath(t,e.slice(0,-1)),n=e[e.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function SB(t,e,r){let n=r(e,t);if(typeof n=="symbol")return n;for(let i of["key","value"]){let s=e[i];if(s&&"items"in s){for(let a=0;a<s.items.length;++a){let u=SB(Object.freeze(t.concat([[i,a]])),s.items[a],r);if(typeof u=="number")a=u-1;else{if(u===sT)return sT;u===bB&&(s.items.splice(a,1),a-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,t))}}return typeof n=="function"?n(e,t):n}wB.visit=Su});var o0=P(jn=>{"use strict";b();var aT=yB(),tye=vB(),rye=xB(),oT="\uFEFF",uT="",cT="",lT="",nye=t=>!!t&&"items"in t,iye=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function sye(t){switch(t){case oT:return"<BOM>";case uT:return"<DOC>";case cT:return"<FLOW_END>";case lT:return"<SCALAR>";default:return JSON.stringify(t)}}function aye(t){switch(t){case oT:return"byte-order-mark";case uT:return"doc-mode";case cT:return"flow-error-end";case lT:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
1355
+ `:case`\r
1356
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}jn.createScalarToken=aT.createScalarToken;jn.resolveAsScalar=aT.resolveAsScalar;jn.setScalarValue=aT.setScalarValue;jn.stringify=tye.stringify;jn.visit=rye.visit;jn.BOM=oT;jn.DOCUMENT=uT;jn.FLOW_END=cT;jn.SCALAR=lT;jn.isCollection=nye;jn.isScalar=iye;jn.prettyToken=sye;jn.tokenType=aye});var hT=P(AB=>{"use strict";b();var hh=o0();function Xi(t){switch(t){case void 0:case" ":case`
1357
+ `:case"\r":case" ":return!0;default:return!1}}var kB=new Set("0123456789ABCDEFabcdef"),oye=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),u0=new Set(",[]{}"),uye=new Set(` ,[]{}
1358
+ \r `),fT=t=>!t||uye.has(t),pT=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
1359
+ `?!0:r==="\r"?this.buffer[e+1]===`
1360
+ `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let n=0;for(;r===" ";)r=this.buffer[++n+e];if(r==="\r"){let i=this.buffer[n+e+1];if(i===`
1361
+ `||!i&&!this.atEnd)return e+n+1}return r===`
1362
+ `||n>=this.indentNext||!r&&!this.atEnd?e+n:-1}if(r==="-"||r==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&Xi(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
1363
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===hh.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,n=e.indexOf("#");for(;n!==-1;){let s=e[n-1];if(s===" "||s===" "){r=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let s=e[r-1];if(s===" "||s===" ")r-=1;else break}let i=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield hh.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let r=this.peek(3);if((r==="---"||r==="...")&&Xi(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Xi(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Xi(r)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(fT),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,n=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&Xi(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield hh.FLOW_END,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(fT),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||Xi(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),r=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let s=0;for(;this.buffer[r-1-s]==="\\";)s+=1;if(s%2===0)break;r=this.buffer.indexOf('"',r+1)}let n=this.buffer.substring(0,r),i=n.indexOf(`
1364
+ `,this.pos);if(i!==-1){for(;i!==-1;){let s=this.continueScalar(i+1);if(s===-1)break;i=n.indexOf(`
1365
+ `,s)}i!==-1&&(r=i-(n[i-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let r=this.buffer[++e];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>Xi(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,n;e:for(let s=this.pos;n=this.buffer[s];++s)switch(n){case" ":r+=1;break;case`
1366
+ `:e=s,r=0;break;case"\r":{let a=this.buffer[s+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
1367
+ `)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
1368
+ `,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
1369
+ `;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let s=e-1,a=this.buffer[s];a==="\r"&&(a=this.buffer[--s]);let u=s;for(;a===" ";)a=this.buffer[--s];if(a===`
1370
+ `&&s>=this.pos&&s+1+r>u)e=s;else break}while(!0);return yield hh.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let s=this.buffer[n+1];if(Xi(s)||e&&u0.has(s))break;r=n}else if(Xi(i)){let s=this.buffer[n+1];if(i==="\r"&&(s===`
1371
+ `?(n+=1,i=`
1372
+ `,s=this.buffer[n+1]):r=n),s==="#"||e&&u0.has(s))break;if(i===`
1373
+ `){let a=this.continueScalar(n+1);if(a===-1)break;n=Math.max(n,a-2)}}else{if(e&&u0.has(i))break;r=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield hh.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(fT))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,r=this.charAt(1);if(Xi(r)||e&&u0.has(r))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!Xi(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(oye.has(r))r=this.buffer[++e];else if(r==="%"&&kB.has(this.buffer[e+1])&&kB.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
1374
+ `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
1375
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,n;do n=this.buffer[++r];while(n===" "||e&&n===" ");let i=r-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=r),i}*pushUntil(e){let r=this.pos,n=this.buffer[r];for(;!e(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};AB.Lexer=pT});var mT=P(IB=>{"use strict";b();var dT=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,n=this.lineStarts.length;for(;r<n;){let s=r+n>>1;this.lineStarts[s]<e?r=s+1:n=s}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};let i=this.lineStarts[r-1];return{line:r,col:e-i+1}}}};IB.LineCounter=dT});var yT=P(LB=>{"use strict";b();var cye=Te("process"),TB=o0(),lye=hT();function no(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}function EB(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function NB(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function c0(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function fl(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function OB(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!no(e.start,"explicit-key-ind")&&!no(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,NB(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var gT=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new lye.Lexer,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,r))yield*this.next(n);r||(yield*this.end())}*next(e){if(this.source=e,cye.env.LOG_TOKENS&&console.log("|",TB.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=TB.tokenType(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&OB(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=r;else{Object.assign(i,{key:r,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:r}):i.value=r;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:r,sep:[]}):i.sep?i.value=r:Object.assign(i,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let i=r.items[r.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&EB(i.start)===-1&&(r.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<r.indent))&&(n.type==="document"?n.end=i.start:n.items.push({start:i.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{EB(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let r=c0(this.peek(2)),n=fl(r),i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
1376
+ `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
1377
+ `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",s=[];if(i&&r.sep&&!r.value){let a=[];for(let u=0;u<r.sep.length;++u){let c=r.sep[u];switch(c.type){case"newline":a.push(u);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(s=r.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":i||r.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):i||r.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(no(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(NB(r.key)&&!no(r.sep,"newline")){let a=fl(r.start),u=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:u,sep:c}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(no(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let a=fl(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):no(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);i||r.value?(e.items.push({start:s,key:a,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(a):(Object.assign(r,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!r.explicitKey&&r.sep&&!no(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:s});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||no(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:i,sep:[]}):r.sep?this.stack.push(i):Object.assign(r,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=c0(n),s=fl(i);OB(e);let a=e.end.splice(1,e.end.length);a.push(this.sourceToken);let u={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
1378
+ `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
1379
+ `,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=c0(e),n=fl(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=c0(e),n=fl(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};LB.Parser=gT});var MB=P(mh=>{"use strict";b();var PB=nT(),fye=ah(),dh=ch(),pye=tI(),hye=rt(),dye=mT(),CB=yT();function qB(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new dye.LineCounter||null,prettyErrors:e}}function mye(t,e={}){let{lineCounter:r,prettyErrors:n}=qB(e),i=new CB.Parser(r?.addNewLine),s=new PB.Composer(e),a=Array.from(s.compose(i.parse(t)));if(n&&r)for(let u of a)u.errors.forEach(dh.prettifyError(t,r)),u.warnings.forEach(dh.prettifyError(t,r));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}function RB(t,e={}){let{lineCounter:r,prettyErrors:n}=qB(e),i=new CB.Parser(r?.addNewLine),s=new PB.Composer(e),a=null;for(let u of s.compose(i.parse(t),!0,t.length))if(!a)a=u;else if(a.options.logLevel!=="silent"){a.errors.push(new dh.YAMLParseError(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(a.errors.forEach(dh.prettifyError(t,r)),a.warnings.forEach(dh.prettifyError(t,r))),a}function gye(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=RB(t,r);if(!i)return null;if(i.warnings.forEach(s=>pye.warn(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}function yye(t,e,r){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){let{keepUndefined:i}=r??e??{};if(!i)return}return hye.isDocument(t)&&!n?t.toString(r):new fye.Document(t,n,r).toString(r)}mh.parse=gye;mh.parseAllDocuments=mye;mh.parseDocument=RB;mh.stringify=yye});var FB=P(ht=>{"use strict";b();var _ye=nT(),vye=ah(),bye=DI(),_T=ch(),Sye=Up(),io=rt(),wye=Za(),xye=er(),kye=to(),Aye=ro(),Iye=o0(),Tye=hT(),Eye=mT(),Oye=yT(),l0=MB(),DB=jp();ht.Composer=_ye.Composer;ht.Document=vye.Document;ht.Schema=bye.Schema;ht.YAMLError=_T.YAMLError;ht.YAMLParseError=_T.YAMLParseError;ht.YAMLWarning=_T.YAMLWarning;ht.Alias=Sye.Alias;ht.isAlias=io.isAlias;ht.isCollection=io.isCollection;ht.isDocument=io.isDocument;ht.isMap=io.isMap;ht.isNode=io.isNode;ht.isPair=io.isPair;ht.isScalar=io.isScalar;ht.isSeq=io.isSeq;ht.Pair=wye.Pair;ht.Scalar=xye.Scalar;ht.YAMLMap=kye.YAMLMap;ht.YAMLSeq=Aye.YAMLSeq;ht.CST=Iye;ht.Lexer=Tye.Lexer;ht.LineCounter=Eye.LineCounter;ht.Parser=Oye.Parser;ht.parse=l0.parse;ht.parseAllDocuments=l0.parseAllDocuments;ht.parseDocument=l0.parseDocument;ht.stringify=l0.stringify;ht.visit=DB.visit;ht.visitAsync=DB.visitAsync});var f0=P(so=>{"use strict";b();Object.defineProperty(so,"__esModule",{value:!0});so.ConvenienceSeverities=so.LegacyIdentifiers=so.ModernIdentifiers=void 0;var gh=gn();so.ModernIdentifiers=["theme-check:nothing","theme-check:recommended","theme-check:theme-app-extension","theme-check:all"];so.LegacyIdentifiers=new Map(Object.entries({default:"theme-check:recommended",nothing:"theme-check:nothing",theme_app_extensions:"theme-check:theme-app-extension"}));so.ConvenienceSeverities={suggestion:gh.Severity.WARNING,style:gh.Severity.INFO,error:gh.Severity.ERROR,warning:gh.Severity.WARNING,info:gh.Severity.INFO}});var WB=P(_h=>{"use strict";b();var BB=_h&&_h.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_h,"__esModule",{value:!0});_h.readYamlConfigDescription=qye;var $B=gn(),Nye=Te("node:fs"),Lye=BB(Te("node:fs/promises")),pl=BB(Te("node:path")),Pye=FB(),yh=f0(),bT=class extends Error{constructor(e,r){super(e),this.name="UnresolvedAliasError",this.message=`YAML parsing error: Unresolved alias *${r}.
1380
+ Did you forget to wrap your ignore statement in quotes? '*${r}'
1381
+ ${e}`}};function Cye(t,e){try{let r=e.trim()===""?{}:(0,Pye.parse)(e);if(!UB(r))throw new Error(`Expecting parsed contents of config file at path '${t}' to be a plain object`);return r}catch(r){if(r instanceof Error&&r.name==="ReferenceError"&&r.message.includes("Unresolved alias")&&/: .*$/m.test(r.message)){let n=/: .*$/m.exec(r.message)[0].slice(2);throw new bT(r.message,n)}else throw r}}async function qye(t,e=!1){let r=pl.default.dirname(t),n=await Lye.default.readFile(t,"utf8"),i=Cye(t,n),s={checkSettings:{},ignore:[],extends:[],require:[]};i.root&&(s.root=i.root,delete i.root),i.ignore&&(s.ignore=vT(i.ignore),delete i.ignore),i.require&&(s.require=vT(i.require).map(a=>VB(r,a)).filter(ST),delete i.require),i.extends?(s.extends=vT(i.extends).map(a=>jB(r,a)).filter(ST),delete i.extends):e&&(s.extends=[jB(r,"theme-check:recommended")]),i.context&&($B.Modes.includes(i.context)&&(s.context=i.context),delete i.context),i.include_categories&&delete i.include_categories,i.exclude_categories&&delete i.exclude_categories;for(let[a,u]of Object.entries(i)){if(!UB(u))throw new Error(`Expected a plain object value for ${a} but got ${typeof u}`);s.checkSettings[a]=Rye(u)}return s}function jB(t,e){return e.startsWith(":")||yh.LegacyIdentifiers.has(e)?yh.LegacyIdentifiers.get(e.replace(/^:/,"")):e.startsWith("theme-check:")?e:VB(t,e)}function VB(t,e){return pl.default.isAbsolute(e)?e:e.startsWith(".")?pl.default.resolve(t,e):(0,Nye.realpathSync)(Te.resolve(e,{paths:Bye(t)}))}function Rye(t){let e={enabled:t.enabled||!0};for(let[r,n]of Object.entries(t))e[jye(r)]=n;return t.ignore!==void 0&&Array.isArray(t.ignore)&&t.ignore.every(ST)&&(e.ignore=t.ignore),t.severity!==void 0&&(e.severity=Mye(t.severity)),e}function Mye(t){if(Dye(t))return yh.ConvenienceSeverities[t];if(Fye(t))return t;throw new Error(`Unsupported severity: ${t}. Try one of ${Object.keys(yh.ConvenienceSeverities)}`)}function Dye(t){return typeof t=="string"&&t in yh.ConvenienceSeverities}function Fye(t){return typeof t=="number"&&t in $B.Severity}function jye(t){return t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase())}function UB(t){return Object.prototype.toString.call(t)==="[object Object]"}function ST(t){return typeof t=="string"}function vT(t){return Array.isArray(t)?t:[t]}function Bye(t){let e=pl.default.parse(t).root,r=[];for(;t!==e;)r.push(pl.default.join(t,"node_modules")),t=pl.default.dirname(t);return r}});var JB=P(wT=>{"use strict";b();Object.defineProperty(wT,"__esModule",{value:!0});wT.mergeFragments=$ye;function $ye(t,e){var r;return{root:GB(t.map(n=>n.root),e.root),extends:[],ignore:t.flatMap(n=>n.ignore).concat(e.ignore),require:t.flatMap(n=>n.require).concat(e.require),checkSettings:t.map(n=>n.checkSettings).concat(e.checkSettings).reduce(zB),context:(r=GB(t.map(n=>n.context),e.context))!==null&&r!==void 0?r:"theme"}}function GB(t,e){return t.concat(e).filter(Boolean).pop()}function zB(t,e){let r={...t};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(HB(t[n])&&HB(e[n])?r[n]=zB(t[n],e[n]):r[n]=e[n]);return r}function HB(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}});var QB=P(vh=>{"use strict";b();var Vye=vh&&vh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vh,"__esModule",{value:!0});vh.resolveConfig=xT;var KB=Vye(Te("node:path")),Uye=WB(),Wye=JB(),Gye=f0(),Hye=()=>KB.default.resolve(__dirname,"./configs");async function xT(t,e=!1){if(zye(t)){let i=KB.default.join(Hye(),t.replace(/^theme-check:/,"")+".yml");return xT(i)}let r=await(0,Uye.readYamlConfigDescription)(t,e),n=await Promise.all(r.extends.map(i=>xT(i)));return(0,Wye.mergeFragments)(n,r)}function zye(t){return Gye.ModernIdentifiers.includes(t)}});var YB=P(p0=>{"use strict";b();Object.defineProperty(p0,"__esModule",{value:!0});p0.resolveConfig=void 0;var Jye=QB();Object.defineProperty(p0,"resolveConfig",{enumerable:!0,get:function(){return Jye.resolveConfig}})});var ZB=P(TT=>{"use strict";b();Object.defineProperty(TT,"__esModule",{value:!0});TT.validateConfig=Kye;var IT=Te("node:assert");function Kye(t){for(let e of t.checks){let r=t.settings[e.meta.code];(0,IT.strict)(r,`Unexpected missing settings for ${e.meta.code} in validateConfig call`),Qye(e.meta.code,e.meta.schema,r,!0)}}function Qye(t,e,r,n){for(let i in e){let s=e[i],a=r[i];kT(i,a,s)}n&&Yye(r),Xye(t,e,r)}function Yye(t){let{severity:e,enabled:r,ignore:n}=t;e===void 0||AT("severity","number",typeof e),AT("enabled","boolean",typeof r),n===void 0||XB("ignore",n)}function Xye(t,e,r){let n=["enabled","severity","ignore"];for(let i in r)!(i in e)&&!n.includes(i)&&console.error(`Unexpected setting: ${i} for check ${t} found in configuration`)}function kT(t,e,r){let{type:n,optional:i,defaultValue:s,properties:a,itemType:u}=r.options;if(e===void 0){if(i!==!0&&s===void 0)throw new Error(`Missing required setting: ${t}`);return}if(!(s!==void 0&&e===s))switch(n){case"string":case"number":case"boolean":{AT(t,n,typeof e);break}case"object":{if(typeof e!="object"||e===null||Array.isArray(e))throw new Error(`Invalid type for setting ${t}: expected object, got ${typeof e}`);for(let c in a)kT(c,e[c],a[c]);break}case"array":{if(XB(t,e),u)for(let c of e)kT(t,c,u);break}default:throw new Error(`Unexpected setting type: ${n}`)}}function AT(t,e,r){IT.strict.strictEqual(r,e,`Invalid type for setting ${t}: expected ${e}, got ${r}`)}function XB(t,e){IT.strict.ok(Array.isArray(e),`Invalid type for setting ${t}: expected array, got ${typeof e}`)}});var e9=P(bh=>{"use strict";b();var Zye=bh&&bh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bh,"__esModule",{value:!0});bh.loadConfig=i_e;var e_e=Q6(),t_e=YB(),r_e=ZB(),n_e=Zye(Te("fs/promises"));async function i_e(t,e){if(!e)throw new Error("loadConfig cannot be called without a root argument");let r="theme-check:recommended";t||(await n_e.default.readdir(e)).some(a=>a.endsWith(".extension.toml")||a.endsWith(".app.toml"))&&(r="theme-check:theme-app-extension");let n=await(0,t_e.resolveConfig)(t??r,!0),i=await(0,e_e.loadConfigDescription)(n,e);return(0,r_e.validateConfig)(i),i}});var t9=P(Sh=>{"use strict";b();var s_e=Sh&&Sh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Sh,"__esModule",{value:!0});Sh.findConfigPath=c_e;var a_e=s_e(Te("node:path")),o_e=MA(),u_e=[".theme-check.yml"];function c_e(t){let e=u_e.map(r=>a_e.default.join(t,r));return l_e(e,o_e.fileExists)}async function l_e(t,e){for(let r of t)if(await e(r))return r}});var r9=P(hl=>{"use strict";b();Object.defineProperty(hl,"__esModule",{value:!0});hl.findConfigPath=hl.loadConfig=void 0;var f_e=e9();Object.defineProperty(hl,"loadConfig",{enumerable:!0,get:function(){return f_e.loadConfig}});var p_e=t9();Object.defineProperty(hl,"findConfigPath",{enumerable:!0,get:function(){return p_e.findConfigPath}})});var n9=P(dl=>{"use strict";b();var h_e=dl&&dl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dl,"__esModule",{value:!0});dl.NodeFileSystem=void 0;var ao=gn(),ET=h_e(Te("node:fs/promises"));dl.NodeFileSystem={async readFile(t){return ET.default.readFile(ao.path.fsPath(t),"utf8")},async readDirectory(t){return(await ET.default.readdir(ao.path.fsPath(t),{withFileTypes:!0})).map(r=>[ao.path.join(t,r.name),r.isDirectory()?ao.FileType.Directory:ao.FileType.File])},async stat(t){try{let e=await ET.default.stat(ao.path.fsPath(t));return{type:e.isDirectory()?ao.FileType.Directory:ao.FileType.File,size:e.size}}catch(e){throw new Error(`Failed to get file stat: ${e}`)}}}});var T_e=P(Vt=>{"use strict";b();var d_e=Vt&&Vt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),s9=Vt&&Vt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&d_e(e,t,r)},a9=Vt&&Vt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.loadConfig=Vt.NodeFileSystem=void 0;Vt.toSourceCode=u9;Vt.check=A_e;Vt.checkAndAutofix=I_e;Vt.themeCheckRun=OT;Vt.getThemeAndConfig=c9;Vt.getTheme=l9;Vt.getThemeFilesPathPattern=f9;var tr=gn(),m_e=o6(),g_e=_6(),y_e=Ge(),__e=a9(Te("node:fs/promises")),wh=a9(Te("node:path")),v_e=Te("node:util"),o9=Zf(),b_e=dv(),S_e=U6(),i9=r9(),ml=n9();Object.defineProperty(Vt,"NodeFileSystem",{enumerable:!0,get:function(){return ml.NodeFileSystem}});var w_e=Te("node:url"),x_e=(0,v_e.promisify)(b_e);s9(gn(),Vt);s9(f0(),Vt);var k_e=async(t,e)=>(t??(t=await(0,i9.findConfigPath)(e)),(0,i9.loadConfig)(t,e));Vt.loadConfig=k_e;async function u9(t){try{let e=await __e.default.readFile(t,"utf8");return(0,tr.toSourceCode)(tr.path.normalize(o9.URI.file(t)),e)}catch{return}}async function A_e(t,e){return(await OT(t,e)).offenses}async function I_e(t,e){let{theme:r,offenses:n}=await OT(t,e);await(0,S_e.autofix)(r,n)}async function OT(t,e,r=()=>{}){let{theme:n,config:i}=await c9(t,e),s=new g_e.ThemeLiquidDocsManager(r),a=await tr.JSONValidator.create(s,i),u=a?.isValid,c=n.map(v=>(0,tr.toSchema)(i.context,v.uri,v,u)),p=new Map(n.filter(v=>(0,tr.isBlock)(v.uri)).map(v=>[wh.default.basename(v.uri,".liquid"),(0,tr.memo)(async()=>(0,tr.toSchema)(i.context,v.uri,v,u))])),d=new Map(n.filter(v=>(0,tr.isSection)(v.uri)).map(v=>[wh.default.basename(v.uri,".liquid"),(0,tr.memo)(async()=>(0,tr.toSchema)(i.context,v.uri,v,u))])),m=new Map(n.map(v=>[wh.default.relative(o9.URI.file(t).toString(),v.uri),(0,tr.memo)(async()=>{let I=v.ast;if((0,y_e.isLiquidHtmlNode)(I)&&(0,tr.filePathSupportsLiquidDoc)(v.uri))return(0,tr.extractDocDefinition)(v.uri,I)})])),h=new Map(n.filter(v=>v.uri.endsWith(".liquid")).map(v=>[v.uri,(0,tr.memo)(async()=>(0,tr.extractCSSClassesFromLiquidUri)(v.uri,ml.NodeFileSystem))]));try{let v=tr.path.join(i.rootUri,"assets"),I=await ml.NodeFileSystem.readDirectory(v);for(let[T]of I.filter(([S])=>S.endsWith(".css")))h.set(T,(0,tr.memo)(async()=>(0,tr.extractCSSClassesFromAssetUri)(T,ml.NodeFileSystem)))}catch{}let y=async v=>{var I;return(I=d.get(v))===null||I===void 0?void 0:I()},w=async v=>{var I;return(I=p.get(v))===null||I===void 0?void 0:I()},x;try{x=await(0,m_e.buildThemeGraph)(i.rootUri,{fs:ml.NodeFileSystem,getSectionSchema:y,getBlockSchema:w,getWebComponentDefinitionReference:()=>{}})}catch{}let k=await(0,tr.check)(n,i,{fs:ml.NodeFileSystem,themeDocset:s,jsonValidationSet:s,getSectionSchema:y,getBlockSchema:w,getAppBlockSchema:async v=>{var I;return(I=p.get(v))===null||I===void 0?void 0:I()},getDocDefinition:async v=>{var I;return(I=m.get(v))===null||I===void 0?void 0:I()},getCSSClassesForURI:async v=>{var I,T;return(T=(I=h.get(v))===null||I===void 0?void 0:I())!==null&&T!==void 0?T:new Set},async getReferences(v){var I;if(!x)return[];let T=x.modules[v];return(I=T?.references)!==null&&I!==void 0?I:[]},async getDependencies(v){var I;if(!x)return[];let T=x.modules[v];return(I=T?.dependencies)!==null&&I!==void 0?I:[]}});return{theme:n,config:i,offenses:k}}async function c9(t,e){let r=await(0,Vt.loadConfig)(e,t);return{theme:await l9(r),config:r}}async function l9(t){let e=f9(t.rootUri),r=await x_e(e,{absolute:!0}).then(i=>i.filter(s=>!(0,tr.isIgnored)(s,t)));return(await Promise.all(r.map(u9))).filter(i=>i!==void 0)}function f9(t){return wh.default.normalize(wh.default.join((0,w_e.fileURLToPath)(t),"**/*.{liquid,json}")).replace(/\\/g,"/")}});export{Ge as a,Zf as b,hg as c,bt as d,Ee as e,Ks as f,op as g,mg as h,gg as i,Ma as j,yg as k,Mr as l,ei as m,Da as n,Zr as o,up as p,cp as q,_g as r,fs as s,Yo as t,Dr as u,Ct as v,vg as w,kc as x,bg as y,Ac as z,Sg as A,wg as B,xg as C,ti as D,kg as E,Ag as F,Ig as G,Eg as H,Og as I,Ng as J,Xo as K,ux as L,Cn as M,gne as N,MR as O,Ic as P,K1e as Q,fx as R,Zo as S,AM as T,IM as U,gn as V,o6 as W,_6 as X,bA as Y,pv as Z,B6 as _,FB as $,T_e as aa};
1382
+ /*! Bundled license information:
1383
+
1384
+ isobject/index.js:
1385
+ (*!
1386
+ * isobject <https://github.com/jonschlinkert/isobject>
1387
+ *
1388
+ * Copyright (c) 2014-2015, Jon Schlinkert.
1389
+ * Licensed under the MIT License.
1390
+ *)
1391
+
1392
+ line-column/lib/line-column.js:
1393
+ (**
1394
+ * line-column - Convert efficiently index to/from line-column in a string
1395
+ * @module lineColumn
1396
+ * @license MIT
1397
+ *)
1398
+
1399
+ cssesc/cssesc.js:
1400
+ (*! https://mths.be/cssesc v3.0.0 by @mathias *)
1401
+
1402
+ lodash/lodash.js:
1403
+ (**
1404
+ * @license
1405
+ * Lodash <https://lodash.com/>
1406
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1407
+ * Released under MIT license <https://lodash.com/license>
1408
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1409
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1410
+ *)
1411
+ */