shopify 5.0.1 → 5.1.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.
- package/dist/analytics-QFDTQYPM.js +1 -0
- package/dist/analytics-XADBBHOH.js +1 -0
- package/dist/bootstrap.js +1 -1
- package/dist/chunk-24Q6X53V.js +1 -0
- package/dist/{chunk-F3OM2YO6.js → chunk-25MYHE4W.js} +1 -1
- package/dist/{chunk-HP2ZAAY7.js → chunk-27JT4NA4.js} +1 -1
- package/dist/chunk-2BYW3BYX.js +1 -0
- package/dist/chunk-2KFYIYLI.js +1 -0
- package/dist/{chunk-V654BMS7.js → chunk-2KUM2RU4.js} +60 -60
- package/dist/chunk-2PD7TNFS.js +275 -0
- package/dist/{chunk-3JACWBUC.js → chunk-3C72S6LO.js} +1 -1
- package/dist/chunk-3FZ4LE6A.js +10 -0
- package/dist/{chunk-ZBVHPC6W.js → chunk-3GD5ESWN.js} +1 -1
- package/dist/chunk-3KGN6N7E.js +1 -0
- package/dist/{chunk-X4A5D3PZ.js → chunk-3MZ7ELHS.js} +2 -2
- package/dist/{chunk-VXL5FBE7.js → chunk-3PS52ZT4.js} +1 -1
- package/dist/chunk-3PYDIBTX.js +1 -0
- package/dist/chunk-3Z75BVGJ.js +1 -0
- package/dist/chunk-4FWPOGPQ.js +1 -0
- package/dist/chunk-4IP37MBX.js +1 -0
- package/dist/chunk-4NFX7YCT.js +1 -0
- package/dist/chunk-4TCXPHKN.js +1 -0
- package/dist/chunk-4WBWZIN5.js +6 -0
- package/dist/chunk-5534MHZW.js +97 -0
- package/dist/{chunk-C4EKNOLY.js → chunk-5C6CXU74.js} +1 -1
- package/dist/{chunk-56GKTWFF.js → chunk-5HOZDOJ7.js} +1 -1
- package/dist/{chunk-CX3ANDPI.js → chunk-5PSQFQL6.js} +1 -1
- package/dist/chunk-5T3ZT6CC.js +1 -0
- package/dist/chunk-62NW4EPI.js +17 -0
- package/dist/chunk-65NCQJYR.js +1 -0
- package/dist/{chunk-QGWC23HQ.js → chunk-6BYHL3DS.js} +1 -1
- package/dist/chunk-6I7DT7QR.js +3 -0
- package/dist/chunk-6IMTMS2S.js +3 -0
- package/dist/chunk-7A77JCED.js +11 -0
- package/dist/chunk-7ART2IKU.js +1 -0
- package/dist/{chunk-TTBNFGCW.js → chunk-7BPT5V24.js} +2 -2
- package/dist/{chunk-V7H7ITCF.js → chunk-7CT3NIXI.js} +1 -1
- package/dist/chunk-7DBKSSDK.js +1 -0
- package/dist/chunk-7HECBXSP.js +1 -0
- package/dist/chunk-7KID5BIR.js +4 -0
- package/dist/{chunk-63UKZLPC.js → chunk-7N7KRZOM.js} +1 -1
- package/dist/{chunk-NJVNGEOU.js → chunk-7NRHZG5Y.js} +102 -102
- package/dist/chunk-7PHDEILV.js +1 -0
- package/dist/chunk-A2NSORBM.js +2296 -0
- package/dist/chunk-A54TADAZ.js +1 -0
- package/dist/{chunk-YTUUU33R.js → chunk-AE3IQG7S.js} +1 -1
- package/dist/chunk-AGTUAQHX.js +4 -0
- package/dist/chunk-AHYI27QL.js +11 -0
- package/dist/chunk-ALINJ6J2.js +1 -0
- package/dist/chunk-AMVWKHNY.js +1 -0
- package/dist/{chunk-D4LFWIFE.js → chunk-ASKBYEO7.js} +1 -1
- package/dist/{chunk-LENSEW2F.js → chunk-AVJJGQOP.js} +1 -1
- package/dist/{chunk-QVVQUJQL.js → chunk-AY3AAV77.js} +1 -1
- package/dist/{chunk-DSKAIC7O.js → chunk-BFAOTQGH.js} +1 -1
- package/dist/{chunk-KGASGUDQ.js → chunk-BPKQA2EO.js} +1 -1
- package/dist/{chunk-KLYGMYXV.js → chunk-C2HJEGTS.js} +1 -1
- package/dist/chunk-C72QNK6O.js +4 -0
- package/dist/chunk-CDSDQTNB.js +16 -0
- package/dist/chunk-CEQGOCKX.js +1 -0
- package/dist/{chunk-QBE6XVU3.js → chunk-CIGWIKOW.js} +1 -1
- package/dist/chunk-CQAD5WML.js +1 -0
- package/dist/chunk-CRQQCT7F.js +1 -0
- package/dist/chunk-CZNUBAAG.js +3 -0
- package/dist/{chunk-WQOPLNDH.js → chunk-D7IMC2G4.js} +1 -1
- package/dist/{chunk-LGXNXAQA.js → chunk-DC7ITY6T.js} +1 -1
- package/dist/{chunk-7GHSE7SG.js → chunk-DDRP6QTC.js} +1 -1
- package/dist/{chunk-4EDE3UH7.js → chunk-DDZYIC76.js} +2 -2
- package/dist/chunk-DGIIUQH3.js +1 -0
- package/dist/{chunk-5AWELO3D.js → chunk-DMOLPSXF.js} +1 -1
- package/dist/{chunk-GSGCSBRN.js → chunk-DOLVBTCB.js} +1 -1
- package/dist/{chunk-MXXMIPUN.js → chunk-DTKGI43P.js} +2 -2
- package/dist/{chunk-37P5YOP2.js → chunk-DVD7I2TX.js} +2 -2
- package/dist/chunk-DVFVO6ZE.js +2 -0
- package/dist/{chunk-7U2MTK6I.js → chunk-DXEMSLI6.js} +1 -1
- package/dist/chunk-EDWIWZWM.js +15 -0
- package/dist/chunk-ELR6AZT4.js +9 -0
- package/dist/chunk-EVQPYZ7F.js +5 -0
- package/dist/chunk-F5QKMDP3.js +1 -0
- package/dist/{chunk-J5DUFSR4.js → chunk-F6IQWX2F.js} +1 -1
- package/dist/{chunk-XZLM4HLO.js → chunk-FAVPTYIR.js} +1 -1
- package/dist/{chunk-Q7BOSHWX.js → chunk-FDSNRKGQ.js} +1 -1
- package/dist/{chunk-DVW7NDVD.js → chunk-FHKK3QU7.js} +1 -1
- package/dist/chunk-FKKJQGYX.js +7 -0
- package/dist/chunk-FQLXQ7WN.js +16 -0
- package/dist/{chunk-6PUU6ZNQ.js → chunk-FRWQJAW2.js} +1 -1
- package/dist/{chunk-AIEVQSI3.js → chunk-FU7PYW7H.js} +1 -1
- package/dist/{chunk-5YUDEPEY.js → chunk-FYQE5E6U.js} +1 -1
- package/dist/chunk-G3EWGBXR.js +1 -0
- package/dist/chunk-G3RNO2TC.js +1 -0
- package/dist/{chunk-7NYCJG2U.js → chunk-GGCP2TIK.js} +1 -1
- package/dist/chunk-GSFWBFFH.js +1 -0
- package/dist/{chunk-NUCDRKDW.js → chunk-H2KGP2FM.js} +2 -2
- package/dist/{chunk-PVASYKSJ.js → chunk-H4K3F7PP.js} +1 -1
- package/dist/chunk-HGZ2HRPO.js +13 -0
- package/dist/chunk-HMPRWNGG.js +203 -0
- package/dist/chunk-HP4QYSBQ.js +1 -0
- package/dist/{chunk-LR4J4KYJ.js → chunk-HSTZV6H7.js} +2 -2
- package/dist/{chunk-ZHHTQRWU.js → chunk-HVUMVDUG.js} +1 -1
- package/dist/{chunk-IY5EI5V2.js → chunk-HYCNYUHW.js} +1 -1
- package/dist/{chunk-FHNJLON5.js → chunk-I3WRA2LH.js} +1 -1
- package/dist/{chunk-MS7DTL4U.js → chunk-IRLYC626.js} +2 -2
- package/dist/chunk-IWNFPBH2.js +33 -0
- package/dist/{chunk-EA5XVQJT.js → chunk-JALDNBTU.js} +1 -1
- package/dist/{chunk-ZTZGDZCE.js → chunk-JC37YZ4I.js} +1 -1
- package/dist/{chunk-DM7BTMFP.js → chunk-JG4FAT2T.js} +1 -1
- package/dist/chunk-JGLLABZR.js +8 -0
- package/dist/chunk-JIY6XWSC.js +1 -0
- package/dist/{chunk-VG2AESTZ.js → chunk-JIYCZXK5.js} +1 -1
- package/dist/chunk-JMSAHCBU.js +35 -0
- package/dist/{chunk-CWR3IFXD.js → chunk-JNSVKDBY.js} +1 -1
- package/dist/chunk-JQU2BJDH.js +3 -0
- package/dist/chunk-JVY6CCLE.js +3 -0
- package/dist/{chunk-BAHIL37I.js → chunk-K4QJEQI4.js} +1 -1
- package/dist/chunk-KCAWHJGF.js +1 -0
- package/dist/{chunk-M73IECPW.js → chunk-KFO2JNF5.js} +1 -1
- package/dist/chunk-KFR7HWCG.js +9 -0
- package/dist/{chunk-QYFU363G.js → chunk-KHZF73BL.js} +1 -1
- package/dist/{chunk-HT66BOEC.js → chunk-KM4LE7K4.js} +2 -2
- package/dist/{chunk-IILLQOUC.js → chunk-L2PUDV7Y.js} +1 -1
- package/dist/chunk-LFBFPK22.js +1 -0
- package/dist/{chunk-BN7ZXAZJ.js → chunk-LG3KEHGD.js} +2 -2
- package/dist/chunk-LGDWE3H3.js +1 -0
- package/dist/chunk-LPPEAMI6.js +1 -0
- package/dist/chunk-LXIWMYM4.js +1 -0
- package/dist/chunk-MGWCXTGD.js +1 -0
- package/dist/chunk-MGX7UG44.js +1 -0
- package/dist/chunk-MKFRKNHF.js +3 -0
- package/dist/chunk-MTT6EAQO.js +1 -0
- package/dist/{chunk-75LAVRRL.js → chunk-MU7IVBGI.js} +2 -2
- package/dist/{chunk-36TZ447N.js → chunk-MYMBHVC4.js} +1 -1
- package/dist/chunk-MZDBH4XV.js +4 -0
- package/dist/{chunk-3G2PEYPI.js → chunk-NUBJ2HK7.js} +1 -1
- package/dist/{chunk-K3YALQBQ.js → chunk-NY5N4ANL.js} +1 -1
- package/dist/{chunk-364BVGRY.js → chunk-NYMKGE3J.js} +1 -1
- package/dist/{chunk-CX5CC6P5.js → chunk-O472FAYX.js} +1 -1
- package/dist/chunk-O7HZ3EIP.js +1 -0
- package/dist/chunk-OJOF6IYG.js +9 -0
- package/dist/{chunk-EXTVC33U.js → chunk-ONZULPQH.js} +68 -66
- package/dist/chunk-ORMXPSJM.js +1 -0
- package/dist/chunk-ORYEDUKM.js +5 -0
- package/dist/{chunk-MZCIRMZJ.js → chunk-OTMYJWIP.js} +1 -1
- package/dist/chunk-OVJVFB5E.js +20 -0
- package/dist/chunk-OWQEFORZ.js +1 -0
- package/dist/{chunk-43HKFLOU.js → chunk-OXPEBT4I.js} +2 -2
- package/dist/chunk-OXZR2MB4.js +6 -0
- package/dist/chunk-OY5M52EF.js +6 -0
- package/dist/{chunk-FK5OFLSJ.js → chunk-PJZZZNWR.js} +1 -1
- package/dist/chunk-Q2LQJYRK.js +16 -0
- package/dist/chunk-QBRRFFMZ.js +1 -0
- package/dist/{chunk-KNQXCU3Y.js → chunk-QCLE5REL.js} +2 -2
- package/dist/chunk-QGQWVA7N.js +1 -0
- package/dist/chunk-QKPAB245.js +1 -0
- package/dist/chunk-QUPZOBTB.js +1 -0
- package/dist/chunk-R4E2E4NN.js +1 -0
- package/dist/{chunk-2M4BKFYF.js → chunk-R6US7F33.js} +1 -1
- package/dist/chunk-RKNVTEO3.js +5 -0
- package/dist/{chunk-2QQ7EBJD.js → chunk-RLOEI6VE.js} +1 -1
- package/dist/chunk-RSZAAN37.js +1 -0
- package/dist/{chunk-WBJ6ZHYH.js → chunk-S3RROJGG.js} +37 -37
- package/dist/chunk-S4KNPCW3.js +81 -0
- package/dist/{chunk-YFRI75U4.js → chunk-SBN3ILXO.js} +1 -1
- package/dist/chunk-SCDGLREP.js +1 -0
- package/dist/chunk-SHOMIS6Q.js +2 -0
- package/dist/chunk-SN3PMWUF.js +6 -0
- package/dist/chunk-SODCXZ5U.js +1 -0
- package/dist/chunk-SPJM7RTD.js +1 -0
- package/dist/chunk-SQL67BKI.js +5 -0
- package/dist/{chunk-MMUGP3WP.js → chunk-SURFUFAZ.js} +1 -1
- package/dist/{chunk-KOTZSPZA.js → chunk-SVQDMZJO.js} +1 -1
- package/dist/chunk-T4ZOTYOY.js +1 -0
- package/dist/chunk-T6C4WC3Z.js +2 -0
- package/dist/chunk-TD6JBHUS.js +1 -0
- package/dist/chunk-TIM4CIXZ.js +22 -0
- package/dist/{chunk-V2FCZC7U.js → chunk-TP7CTMMT.js} +1 -1
- package/dist/chunk-TSPJAMYB.js +1 -0
- package/dist/chunk-TSVEV2UD.js +26 -0
- package/dist/chunk-TTAT62N3.js +25 -0
- package/dist/{chunk-ZVEBXHEY.js → chunk-TUSS6PXB.js} +1 -1
- package/dist/chunk-TXP6KFWO.js +5 -0
- package/dist/chunk-TZHVCMZN.js +6 -0
- package/dist/chunk-UC4TOM36.js +3 -0
- package/dist/{chunk-2YGPWG3I.js → chunk-UFY4L5KQ.js} +1 -1
- package/dist/chunk-UU6UQ2QY.js +1 -0
- package/dist/chunk-V4FC72R6.js +1 -0
- package/dist/chunk-VA2S7W7H.js +10 -0
- package/dist/chunk-VE3IIC7H.js +1 -0
- package/dist/{chunk-EH22T4FI.js → chunk-VJG7VXFU.js} +2 -2
- package/dist/chunk-VQSRU5XL.js +4 -0
- package/dist/chunk-VRIFLMA3.js +70 -0
- package/dist/chunk-WBJFTCEJ.js +1 -0
- package/dist/chunk-WBPP6PO7.js +31 -0
- package/dist/chunk-WE5KY6T6.js +1 -0
- package/dist/chunk-WFPVT2IY.js +1 -0
- package/dist/{chunk-ETXBF6Q7.js → chunk-WLYXBQ2M.js} +1 -1
- package/dist/chunk-WNVOEE6T.js +7 -0
- package/dist/chunk-WPDJVUTY.js +47 -0
- package/dist/chunk-WWCYEZUU.js +1 -0
- package/dist/chunk-WWVDZ3GC.js +3 -0
- package/dist/{chunk-CXPYOLGM.js → chunk-WZBZ7FWP.js} +2 -2
- package/dist/chunk-XEZPN5TR.js +22 -0
- package/dist/{chunk-AQ34X5B3.js → chunk-XLMKHTJ5.js} +1 -1
- package/dist/chunk-XRNBCV2B.js +1 -0
- package/dist/{chunk-B4ISKIXN.js → chunk-XWLNCBAG.js} +1 -1
- package/dist/chunk-YF4AXKM4.js +1 -0
- package/dist/chunk-YKDRUAY3.js +857 -0
- package/dist/{chunk-FPOZMNT2.js → chunk-YNFQBYSL.js} +1 -1
- package/dist/{chunk-2CJQQQW4.js → chunk-YNZLLZU2.js} +1 -1
- package/dist/chunk-YOYPYB4H.js +1 -0
- package/dist/{chunk-HF4NDEX3.js → chunk-YR4J46US.js} +1 -1
- package/dist/chunk-YTL45RXR.js +103 -0
- package/dist/chunk-YVPB7OT6.js +6 -0
- package/dist/chunk-YYWSHRO2.js +89 -0
- package/dist/{chunk-5XOEMYEQ.js → chunk-Z5QEXS6F.js} +1 -1
- package/dist/chunk-Z5WFRYVQ.js +6 -0
- package/dist/{chunk-P5W5RVE6.js → chunk-Z6ZRS256.js} +1 -1
- package/dist/chunk-ZMOW2YZ4.js +18 -0
- package/dist/chunk-ZMU4EYXT.js +1 -0
- package/dist/{chunk-ACA2BGAD.js → chunk-ZNEPRGFY.js} +1 -1
- package/dist/chunk-ZXZWMXXK.js +7 -0
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import/channel-config.js +1 -1
- package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs-next.js +1 -0
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/security/check.js +1 -1
- package/dist/cli/commands/app/security/clean.js +1 -1
- package/dist/cli/commands/app/security/instructions.js +1 -1
- package/dist/cli/commands/app/security/record.js +1 -1
- package/dist/cli/commands/app/security/review.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.d.ts +10 -10
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.d.ts +7 -7
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.d.ts +7 -7
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -7
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -7
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.d.ts +21 -21
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.d.ts +23 -23
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.d.ts +90 -90
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.d.ts +7 -7
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.d.ts +24 -24
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.d.ts +7 -7
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli-version-check-V25AVSZ6.js +1 -0
- package/dist/{command-event-context-LFUZ7UCA.js → command-event-context-ILIANB5Q.js} +1 -1
- package/dist/command-json-schema-C5UZXP2W.js +1 -0
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-OCGEEV4U.js +1 -0
- package/dist/custom-oclif-loader-ZVUKMRGH.js +1 -0
- package/dist/data/filters.json +41 -2
- package/dist/data/local_block_entry.json +1 -1
- package/dist/data/manifest_theme.json +1 -0
- package/dist/data/objects.json +78 -36
- package/dist/data/section.json +1 -1
- package/dist/data/shopify_system_translations.json +240 -23
- package/dist/data/strict_settings.json +24 -0
- package/dist/data/tags.json +57 -24
- package/dist/data/theme_block.json +1 -1
- package/dist/deprecations-A5AXXKIK.js +1 -0
- package/dist/dist-NORLLIHQ.js +1 -0
- package/dist/dist-XBM4XZS4.js +1 -0
- package/dist/environment-5P7JJ3GI.js +1 -0
- package/dist/environments-Y5JEI3U3.js +1 -0
- package/dist/error-GI4DXVDU.js +1 -0
- package/dist/error-handler-BS2ZENQV.js +1 -0
- package/dist/fs-UOOLPOHJ.js +1 -0
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +2 -2
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/http-2OXOS2AW.js +1 -0
- package/dist/http-proxy-node16-NZZ674YW.js +38 -0
- package/dist/index.js +12 -12
- package/dist/is-global-CI77T7NE.js +1 -0
- package/dist/json-error-6PBUR4LQ.js +1 -0
- package/dist/latest-version-75YEFEMK.js +9 -0
- package/dist/lib-4JVADMNT.js +1 -0
- package/dist/lib-L4STV5B2.js +1 -0
- package/dist/lib-LEEN55OD.js +1 -0
- package/dist/{local-KA3IWOZ6.js → local-5NIWPWDS.js} +1 -1
- package/dist/metadata-IXPNNPNJ.js +1 -0
- package/dist/{morph-CRY35DIK.js → morph-H7XQP55V.js} +3 -3
- package/dist/node-package-manager-ALFEGGD6.js +1 -0
- package/dist/notifications-system-FQW3GKH2.js +1 -0
- package/dist/{npa-A4YSCQ5Q.js → npa-LVYMN7GE.js} +1 -1
- package/dist/os-6TNQTEUN.js +1 -0
- package/dist/output-LEOB5LAM.js +1 -0
- package/dist/{prettier-EGVCP5CY.js → prettier-VLTY4MIE.js} +1 -1
- package/dist/registry-auth-token-EDH77OOW.js +1 -0
- package/dist/registry-url-JMNV3LLX.js +1 -0
- package/dist/semver-HHZRKD6Y.js +1 -0
- package/dist/system-J4CTESP5.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-YDUI56E3.js +1 -0
- package/dist/upgrade-LBCZORG2.js +1 -0
- package/dist/version-2YL4YEQ2.js +1 -0
- package/dist/version-X2CPQVWQ.js +1 -0
- package/dist/workerd-5UPTEWNI.js +18 -0
- package/oclif.manifest.json +25622 -1132
- package/package.json +7 -7
- package/dist/analytics-RSUIYNLC.js +0 -1
- package/dist/analytics-V2SDYXQJ.js +0 -1
- package/dist/chunk-2AW3KBTP.js +0 -1
- package/dist/chunk-2M535QQJ.js +0 -6
- package/dist/chunk-2NZ7GDDR.js +0 -2
- package/dist/chunk-2RFCYZMG.js +0 -47
- package/dist/chunk-2S5NPJEJ.js +0 -5
- package/dist/chunk-2TPLPZA2.js +0 -3
- package/dist/chunk-32O27NE3.js +0 -1
- package/dist/chunk-335BUVBP.js +0 -1
- package/dist/chunk-46JYM3GH.js +0 -1
- package/dist/chunk-4GQEXVDT.js +0 -1
- package/dist/chunk-4IUXLUFD.js +0 -6
- package/dist/chunk-4QZ6OBXL.js +0 -4
- package/dist/chunk-4SDCXKYR.js +0 -31
- package/dist/chunk-5AQ5JT2V.js +0 -7
- package/dist/chunk-5D4FNAAD.js +0 -3
- package/dist/chunk-5TWYJQQO.js +0 -1
- package/dist/chunk-5YXYYQBX.js +0 -1
- package/dist/chunk-6JZC6UKY.js +0 -20
- package/dist/chunk-6Y6A2QGK.js +0 -3
- package/dist/chunk-7AWAOPLA.js +0 -1
- package/dist/chunk-7XAEI4XT.js +0 -3
- package/dist/chunk-A7LBGXWG.js +0 -1
- package/dist/chunk-ADVLRSSO.js +0 -1
- package/dist/chunk-AOBE6HN6.js +0 -31
- package/dist/chunk-B2VE7WOX.js +0 -1
- package/dist/chunk-BB7GAZP6.js +0 -1
- package/dist/chunk-BNTOGZLY.js +0 -1
- package/dist/chunk-BOAGJ6P5.js +0 -1
- package/dist/chunk-BU3JQM3W.js +0 -1
- package/dist/chunk-C3LL5CZA.js +0 -1
- package/dist/chunk-CFUZ6574.js +0 -15
- package/dist/chunk-CKVVJ4XO.js +0 -1
- package/dist/chunk-CNPBDSDL.js +0 -1
- package/dist/chunk-DTRENW4Q.js +0 -272
- package/dist/chunk-E3CTHNQS.js +0 -1
- package/dist/chunk-FFSDGRAN.js +0 -1
- package/dist/chunk-FNWXMCSD.js +0 -97
- package/dist/chunk-FS5PZCZ3.js +0 -1
- package/dist/chunk-FTHVOIK7.js +0 -4
- package/dist/chunk-FVRI7ZKE.js +0 -103
- package/dist/chunk-FZCGRIOM.js +0 -1
- package/dist/chunk-GCKGQFV7.js +0 -1
- package/dist/chunk-GGJUPL4W.js +0 -6
- package/dist/chunk-GHU6YEXH.js +0 -15
- package/dist/chunk-GNPIKPHB.js +0 -1
- package/dist/chunk-H57KYDEI.js +0 -16
- package/dist/chunk-HB3MJYBK.js +0 -1
- package/dist/chunk-HNU6R7RT.js +0 -7
- package/dist/chunk-HPT3UXZ5.js +0 -4
- package/dist/chunk-HXNGLDMU.js +0 -1
- package/dist/chunk-IAL6IQYW.js +0 -16
- package/dist/chunk-IULZYDCI.js +0 -9
- package/dist/chunk-IWTOC6DG.js +0 -1
- package/dist/chunk-J3JPJCWP.js +0 -1
- package/dist/chunk-J3UXIC23.js +0 -10
- package/dist/chunk-J7BTC45S.js +0 -1
- package/dist/chunk-JMVK2BIB.js +0 -3
- package/dist/chunk-JUTULEWW.js +0 -5
- package/dist/chunk-KT5QQOES.js +0 -3
- package/dist/chunk-KVF55INC.js +0 -5
- package/dist/chunk-L6VONMA2.js +0 -5
- package/dist/chunk-LWMKZJ4M.js +0 -1
- package/dist/chunk-M2KX3PXA.js +0 -1
- package/dist/chunk-M7NLCGCP.js +0 -6
- package/dist/chunk-MHWETFNT.js +0 -1
- package/dist/chunk-MNWT2SQO.js +0 -2265
- package/dist/chunk-MU2X7NGF.js +0 -11
- package/dist/chunk-MZWPIFAM.js +0 -70
- package/dist/chunk-NCPZVARH.js +0 -836
- package/dist/chunk-NMECLRGK.js +0 -11
- package/dist/chunk-NMLLRFZF.js +0 -1
- package/dist/chunk-NPB753M3.js +0 -1
- package/dist/chunk-OH7BQZQ7.js +0 -2
- package/dist/chunk-OLKLHVHA.js +0 -22
- package/dist/chunk-OPVXPDOQ.js +0 -1
- package/dist/chunk-OQUXGAF2.js +0 -1
- package/dist/chunk-OUMERKRE.js +0 -10
- package/dist/chunk-OYGIQDME.js +0 -1
- package/dist/chunk-PNZURX3S.js +0 -1
- package/dist/chunk-PRKJVU4Y.js +0 -1
- package/dist/chunk-PXFPVGWV.js +0 -1
- package/dist/chunk-Q2ORJEB2.js +0 -25
- package/dist/chunk-QFWWCZOI.js +0 -1
- package/dist/chunk-QFYLJVJW.js +0 -77
- package/dist/chunk-QX3T6G5X.js +0 -1
- package/dist/chunk-RDXLDCMI.js +0 -3
- package/dist/chunk-REDUS6EW.js +0 -1
- package/dist/chunk-RFZNFTVM.js +0 -1
- package/dist/chunk-RIG66DIQ.js +0 -18
- package/dist/chunk-RNUEPPVN.js +0 -1
- package/dist/chunk-RWTAPWLJ.js +0 -3
- package/dist/chunk-T5YVYVSW.js +0 -1
- package/dist/chunk-UDPYSL3M.js +0 -4
- package/dist/chunk-ULMNNGGX.js +0 -6
- package/dist/chunk-URCH4ITT.js +0 -1
- package/dist/chunk-UU2R56LN.js +0 -12
- package/dist/chunk-V75WUEFU.js +0 -1
- package/dist/chunk-VXD26GIG.js +0 -1
- package/dist/chunk-W7S6SYBM.js +0 -2
- package/dist/chunk-WAY723TL.js +0 -16
- package/dist/chunk-WFOU5M4H.js +0 -16
- package/dist/chunk-WGOSE3RL.js +0 -4
- package/dist/chunk-WQ6W725N.js +0 -1
- package/dist/chunk-X7DCL5LT.js +0 -1
- package/dist/chunk-XDXHSGDL.js +0 -1
- package/dist/chunk-XKKKMV46.js +0 -6
- package/dist/chunk-XRVJJG6W.js +0 -26
- package/dist/chunk-XV6XCOTG.js +0 -319
- package/dist/chunk-XYFYQWKW.js +0 -1
- package/dist/chunk-YCUEDZDA.js +0 -1
- package/dist/chunk-YQ63ZFYT.js +0 -1
- package/dist/chunk-YXIFSIRX.js +0 -1
- package/dist/chunk-ZDQO6CNY.js +0 -1
- package/dist/chunk-ZGASBRSQ.js +0 -5
- package/dist/command-json-schema-6EGXCM4B.js +0 -1
- package/dist/conf-store-E7ELDWBA.js +0 -1
- package/dist/custom-oclif-loader-FKFZJPHF.js +0 -1
- package/dist/deprecations-RNGBHZYB.js +0 -1
- package/dist/dist-VHIZZDYK.js +0 -1
- package/dist/dist-WXI5YQYP.js +0 -1
- package/dist/environment-O7ECODHU.js +0 -1
- package/dist/environments-WZJ6MRTH.js +0 -1
- package/dist/error-IFB626JA.js +0 -1
- package/dist/error-handler-OVJYVIOZ.js +0 -1
- package/dist/fs-7UOUHJDO.js +0 -1
- package/dist/http-proxy-node16-D3JUYA5D.js +0 -38
- package/dist/is-global-XW3CVHLK.js +0 -1
- package/dist/json-error-C2U7ZLCG.js +0 -1
- package/dist/latest-version-LDWU5F7A.js +0 -49
- package/dist/lib-PJHT4MKY.js +0 -1
- package/dist/lib-VKSQ65BQ.js +0 -1
- package/dist/lib-YEZOHXF3.js +0 -1
- package/dist/metadata-6JI7HF5B.js +0 -1
- package/dist/node-package-manager-X3QIEMMX.js +0 -1
- package/dist/notifications-system-OXGLT2R4.js +0 -1
- package/dist/os-NORIEVMI.js +0 -1
- package/dist/output-K3JTLRJD.js +0 -1
- package/dist/system-LTHR2T7L.js +0 -1
- package/dist/ui-MYUBVKCK.js +0 -1
- package/dist/upgrade-MFTWBXL3.js +0 -1
- package/dist/version-BNGPPAUU.js +0 -1
- package/dist/version-RCGFWSB4.js +0 -1
- package/dist/workerd-ISSXMKIH.js +0 -18
- /package/dist/{chunk-YLQ3LNNY.js → chunk-2S3FHQFS.js} +0 -0
- /package/dist/{chunk-YRHFPXC3.js → chunk-Z2AV4BWZ.js} +0 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import{a as yx}from"./chunk-IWOTLFOY.js";import{Ia as d3,Ja as gx,e as mx}from"./chunk-YKDRUAY3.js";import{b as f3}from"./chunk-UU6UQ2QY.js";import{n as hx}from"./chunk-S4KNPCW3.js";import{a as ce,b as Oe,c as x,d as $y,e as Ka,f as Uy,g as d}from"./chunk-VKWPEFWQ.js";var zy=x(Hy=>{"use strict";d();Object.defineProperty(Hy,"__esModule",{value:!0});Hy.deepGet=p3;function p3(e,t){return t.reduce((n,r)=>n?.[r],e)}});var _x=x(Ss=>{"use strict";d();Object.defineProperty(Ss,"__esModule",{value:!0});Ss.first=h3;Ss.last=m3;Ss.findLast=g3;Ss.findLastIndex=Wy;Ss.findLastAndIndex=y3;function h3(e){return e[0]}function m3(e,t=0){return e[e.length-1+t]}function g3(e,t){return e[Wy(e,t)]}function Wy(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}function y3(e,t){let n=Wy(e,t);return[e[n],n]}});var Gy=x((Xpe,vx)=>{d();var _3={}.toString;vx.exports=Array.isArray||function(e){return _3.call(e)=="[object Array]"}});var kx=x((ehe,bx)=>{"use strict";d();var v3=Gy();bx.exports=function(t){return t!=null&&typeof t=="object"&&v3(t)===!1}});var Jy=x((rhe,Sx)=>{"use strict";d();var b3=Gy(),k3=kx(),nhe=Array.prototype.slice;Sx.exports=Ya;function Ya(e,t){if(!(this instanceof Ya))return typeof t=="number"?new Ya(e).fromIndex(t):new Ya(e,t);this.str=e||"",this.lineToIndex=S3(this.str),t=t||{},this.origin=typeof t.origin>"u"?1:t.origin}Ya.prototype.fromIndex=function(e){if(e<0||e>=this.str.length||isNaN(e))return null;var t=T3(e,this.lineToIndex);return{line:t+this.origin,col:e-this.lineToIndex[t]+this.origin}};Ya.prototype.toIndex=function(e,t){if(typeof t>"u")return b3(e)&&e.length>=2?this.toIndex(e[0],e[1]):k3(e)&&"line"in e&&("col"in e||"column"in e)?this.toIndex(e.line,"col"in e?e.col:e.column):-1;if(isNaN(e)||isNaN(t))return-1;if(e-=this.origin,t-=this.origin,e>=0&&t>=0&&e<this.lineToIndex.length){var n=this.lineToIndex[e],r=e===this.lineToIndex.length-1?this.str.length:this.lineToIndex[e+1];if(t<r-n)return n+t}return-1};function S3(e){for(var t=e.split(`
|
|
2
|
+
`),n=new Array(t.length),r=0,i=0,s=t.length;i<s;i++)n[i]=r,r+=t[i].length+1;return n}function T3(e,t){if(e>=t[t.length-1])return t.length-1;for(var n=0,r=t.length-2,i;n<r;)if(i=n+(r-n>>1),e<t[i])r=i-1;else if(e>=t[i+1])n=i+1;else{n=i;break}return n}});var Tx=x(Qa=>{"use strict";d();var w3=Qa&&Qa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qa,"__esModule",{value:!0});Qa.getPosition=E3;Qa.getOffset=A3;var x3=w3(Jy());function E3(e,t){if(t<0)return{index:t,line:-1,character:-1};let n=Math.min(t,e.length),r=0,i=0;for(let s=e.indexOf(`
|
|
3
|
+
`);s!==-1&&s<n;s=e.indexOf(`
|
|
4
|
+
`,s+1))r++,i=s+1;return{index:t,line:r,character:n-i}}function A3(e,t,n){return(0,x3.default)(e,{origin:1}).toIndex(t,n)}});var Ef=x(xf=>{"use strict";d();Object.defineProperty(xf,"__esModule",{value:!0});xf.isError=N3;xf.asError=P3;var O3={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 N3(e){return e instanceof Error}function P3(e){return e instanceof Error?e:typeof e=="string"?new Error(e):e&&typeof e=="object"&&"error"in e?new Error(C3(e)):e&&typeof e.toString=="function"?new Error(e.toString()):new Error("An unknown error occurred")}function C3(e){return O3[e.error]||"Unknown parse error."}});var Yy=x(Ky=>{"use strict";d();Object.defineProperty(Ky,"__esModule",{value:!0});Ky.assertNever=L3;function L3(e){throw new Error(`We should never reach this code, you are missing a case for ${e}`)}});var Xy=x(Af=>{"use strict";d();Object.defineProperty(Af,"__esModule",{value:!0});Af.memo=q3;Af.memoize=I3;var Qy=Symbol("Unset");function q3(e){let t=Qy,n=(...r)=>(t===Qy&&(t=e(...r)),t);return n.clearCache=()=>{t=Qy},n}function I3(e,t){let n={},r=(...i)=>{let s=t(...i);return n[s]||(n[s]=e(...i)),n[s]};return r.force=(...i)=>(r.invalidate(...i),r(...i)),r.invalidate=(...i)=>{let s=t(...i);delete n[s]},r.clearCache=()=>{n={}},r}});var e_=x(Zy=>{"use strict";d();Object.defineProperty(Zy,"__esModule",{value:!0});Zy.indexBy=M3;function M3(e,t){let n={};for(let r of t)n[e(r)]=r;return n}});function Ts(e,t=!1){let n=e.length,r=0,i="",s=0,a=16,o=0,c=0,l=0,f=0,m=0;function p(T,y){let A=0,N=0;for(;A<T||!y;){let O=e.charCodeAt(r);if(O>=48&&O<=57)N=N*16+O-48;else if(O>=65&&O<=70)N=N*16+O-65+10;else if(O>=97&&O<=102)N=N*16+O-97+10;else break;r++,A++}return A<T&&(N=-1),N}function g(T){r=T,i="",s=0,a=16,m=0}function v(){let T=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&Xa(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&Xa(e.charCodeAt(r)))for(r++;r<e.length&&Xa(e.charCodeAt(r));)r++;else return m=3,e.substring(T,r);let y=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&Xa(e.charCodeAt(r))){for(r++;r<e.length&&Xa(e.charCodeAt(r));)r++;y=r}else m=3;return e.substring(T,y)}function b(){let T="",y=r;for(;;){if(r>=n){T+=e.substring(y,r),m=2;break}let A=e.charCodeAt(r);if(A===34){T+=e.substring(y,r),r++;break}if(A===92){if(T+=e.substring(y,r),r++,r>=n){m=2;break}switch(e.charCodeAt(r++)){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+=`
|
|
5
|
+
`;break;case 114:T+="\r";break;case 116:T+=" ";break;case 117:let O=p(4,!0);O>=0?T+=String.fromCharCode(O):m=4;break;default:m=5}y=r;continue}if(A>=0&&A<=31)if(Fc(A)){T+=e.substring(y,r),m=2;break}else m=6;r++}return T}function _(){if(i="",m=0,s=r,c=o,f=l,r>=n)return s=n,a=17;let T=e.charCodeAt(r);if(t_(T)){do r++,i+=String.fromCharCode(T),T=e.charCodeAt(r);while(t_(T));return a=15}if(Fc(T))return r++,i+=String.fromCharCode(T),T===13&&e.charCodeAt(r)===10&&(r++,i+=`
|
|
6
|
+
`),o++,l=r,a=14;switch(T){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,i=b(),a=10;case 47:let y=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!Fc(e.charCodeAt(r));)r++;return i=e.substring(y,r),a=12}if(e.charCodeAt(r+1)===42){r+=2;let A=n-1,N=!1;for(;r<A;){let O=e.charCodeAt(r);if(O===42&&e.charCodeAt(r+1)===47){r+=2,N=!0;break}r++,Fc(O)&&(O===13&&e.charCodeAt(r)===10&&r++,o++,l=r)}return N||(r++,m=1),i=e.substring(y,r),a=13}return i+=String.fromCharCode(T),r++,a=16;case 45:if(i+=String.fromCharCode(T),r++,r===n||!Xa(e.charCodeAt(r)))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+=v(),a=11;default:for(;r<n&&k(T);)r++,T=e.charCodeAt(r);if(s!==r){switch(i=e.substring(s,r),i){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return i+=String.fromCharCode(T),r++,a=16}}function k(T){if(t_(T)||Fc(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 w(){let T;do T=_();while(T>=12&&T<=15);return T}return{setPosition:g,getPosition:()=>r,scan:t?w:_,getToken:()=>a,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>c,getTokenStartCharacter:()=>s-f,getTokenError:()=>m}}function t_(e){return e===32||e===9}function Fc(e){return e===10||e===13}function Xa(e){return e>=48&&e<=57}var wx,Of=Oe(()=>{"use strict";d();(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(wx||(wx={}))});var hn,Za,n_,xx,Ex=Oe(()=>{d();hn=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),Za=200,n_={" ":{"\n":new Array(Za).fill(0).map((e,t)=>`
|
|
7
|
+
`+" ".repeat(t)),"\r":new Array(Za).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Za).fill(0).map((e,t)=>`\r
|
|
8
|
+
`+" ".repeat(t))}," ":{"\n":new Array(Za).fill(0).map((e,t)=>`
|
|
9
|
+
`+" ".repeat(t)),"\r":new Array(Za).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Za).fill(0).map((e,t)=>`\r
|
|
10
|
+
`+" ".repeat(t))}},xx=[`
|
|
11
|
+
`,"\r",`\r
|
|
12
|
+
`]});function Nf(e,t,n){let r,i,s,a,o;if(t){for(a=t.offset,o=a+t.length,s=a;s>0&&!Vc(e,s-1);)s--;let A=o;for(;A<e.length&&!Vc(e,A);)A++;i=e.substring(s,A),r=D3(i,n)}else i=e,r=0,s=0,a=0,o=e.length;let c=j3(n,e),l=xx.includes(c),f=0,m=0,p;n.insertSpaces?p=hn[n.tabSize||4]??eo(hn[1],n.tabSize||4):p=" ";let g=p===" "?" ":" ",v=Ts(i,!1),b=!1;function _(){if(f>1)return eo(c,f)+eo(p,r+m);let A=p.length*(r+m);return!l||A>n_[g][c].length?c+eo(p,r+m):A<=0?c:n_[g][c][A]}function k(){let A=v.scan();for(f=0;A===15||A===14;)A===14&&n.keepLines?f+=1:A===14&&(f=1),A=v.scan();return b=A===16||v.getTokenError()!==0,A}let w=[];function T(A,N,O){!b&&(!t||N<o&&O>a)&&e.substring(N,O)!==A&&w.push({offset:N,length:O-N,content:A})}let y=k();if(n.keepLines&&f>0&&T(eo(c,f),0,0),y!==17){let A=v.getTokenOffset()+s,N=p.length*r<20&&n.insertSpaces?hn[p.length*r]:eo(p,r);T(N,s,A)}for(;y!==17;){let A=v.getTokenOffset()+v.getTokenLength()+s,N=k(),O="",q=!1;for(;f===0&&(N===12||N===13);){let M=v.getTokenOffset()+s;T(hn[1],A,M),A=v.getTokenOffset()+v.getTokenLength()+s,q=N===12,O=q?_():"",N=k()}if(N===2)y!==1&&m--,n.keepLines&&f>0||!n.keepLines&&y!==1?O=_():n.keepLines&&(O=hn[1]);else if(N===4)y!==3&&m--,n.keepLines&&f>0||!n.keepLines&&y!==3?O=_():n.keepLines&&(O=hn[1]);else{switch(y){case 3:case 1:m++,n.keepLines&&f>0||!n.keepLines?O=_():O=hn[1];break;case 5:n.keepLines&&f>0||!n.keepLines?O=_():O=hn[1];break;case 12:O=_();break;case 13:f>0?O=_():q||(O=hn[1]);break;case 6:n.keepLines&&f>0?O=_():q||(O=hn[1]);break;case 10:n.keepLines&&f>0?O=_():N===6&&!q&&(O="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&f>0?O=_():(N===12||N===13)&&!q?O=hn[1]:N!==5&&N!==17&&(b=!0);break;case 16:b=!0;break}f>0&&(N===12||N===13)&&(O=_())}N===17&&(n.keepLines&&f>0?O=_():O=n.insertFinalNewline?c:"");let j=v.getTokenOffset()+s;T(O,A,j),y=N}return w}function eo(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}function D3(e,t){let n=0,r=0,i=t.tabSize||4;for(;n<e.length;){let s=e.charAt(n);if(s===hn[1])r++;else if(s===" ")r+=i;else break;n++}return Math.floor(r/i)}function j3(e,t){for(let n=0;n<t.length;n++){let r=t.charAt(n);if(r==="\r")return n+1<t.length&&t.charAt(n+1)===`
|
|
13
|
+
`?`\r
|
|
14
|
+
`:"\r";if(r===`
|
|
15
|
+
`)return`
|
|
16
|
+
`}return e&&e.eol||`
|
|
17
|
+
`}function Vc(e,t){return`\r
|
|
18
|
+
`.indexOf(e.charAt(t))!==-1}var r_=Oe(()=>{"use strict";d();Of();Ex()});function Ax(e,t){let n=[],r=new Object,i,s={value:{},offset:0,length:0,type:"object",parent:void 0},a=!1;function o(c,l,f,m){s.value=c,s.offset=l,s.length=f,s.type=m,s.colonOffset=void 0,i=s}try{Hc(e,{onObjectBegin:(c,l)=>{if(t<=c)throw r;i=void 0,a=t>c,n.push("")},onObjectProperty:(c,l,f)=>{if(t<l||(o(c,l,f,"property"),n[n.length-1]=c,t<=l+f))throw r},onObjectEnd:(c,l)=>{if(t<=c)throw r;i=void 0,n.pop()},onArrayBegin:(c,l)=>{if(t<=c)throw r;i=void 0,n.push(0)},onArrayEnd:(c,l)=>{if(t<=c)throw r;i=void 0,n.pop()},onLiteralValue:(c,l,f)=>{if(t<l||(o(c,l,f,Px(c)),t<=l+f))throw r},onSeparator:(c,l,f)=>{if(t<=l)throw r;if(c===":"&&i&&i.type==="property")i.colonOffset=l,a=!1,i=void 0;else if(c===","){let m=n[n.length-1];typeof m=="number"?n[n.length-1]=m+1:(a=!0,n[n.length-1]=""),i=void 0}}})}catch(c){if(c!==r)throw c}return{path:n,previousNode:i,isAtPropertyKey:a,matches:c=>{let l=0;for(let f=0;l<c.length&&f<n.length;f++)if(c[l]===n[f]||c[l]==="*")l++;else if(c[l]!=="**")return!1;return l===c.length}}}function Ox(e,t=[],n=$c.DEFAULT){let r=null,i=[],s=[];function a(c){Array.isArray(i)?i.push(c):r!==null&&(i[r]=c)}return Hc(e,{onObjectBegin:()=>{let c={};a(c),s.push(i),i=c,r=null},onObjectProperty:c=>{r=c},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{let c=[];a(c),s.push(i),i=c,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(c,l,f)=>{t.push({error:c,offset:l,length:f})}},n),i[0]}function Cf(e,t=[],n=$c.DEFAULT){let r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(c){r.type==="property"&&(r.length=c-r.offset,r=r.parent)}function s(c){return r.children.push(c),c}Hc(e,{onObjectBegin:c=>{r=s({type:"object",offset:c,length:-1,parent:r,children:[]})},onObjectProperty:(c,l,f)=>{r=s({type:"property",offset:l,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:c,offset:l,length:f,parent:r})},onObjectEnd:(c,l)=>{i(c+l),r.length=c+l-r.offset,r=r.parent,i(c+l)},onArrayBegin:(c,l)=>{r=s({type:"array",offset:c,length:-1,parent:r,children:[]})},onArrayEnd:(c,l)=>{r.length=c+l-r.offset,r=r.parent,i(c+l)},onLiteralValue:(c,l,f)=>{s({type:Px(c),offset:l,length:f,parent:r,value:c}),i(l+f)},onSeparator:(c,l,f)=>{r.type==="property"&&(c===":"?r.colonOffset=l:c===","&&i(l))},onError:(c,l,f)=>{t.push({error:c,offset:l,length:f})}},n);let o=r.children[0];return o&&delete o.parent,o}function Uc(e,t){if(!e)return;let n=e;for(let r of t)if(typeof r=="string"){if(n.type!=="object"||!Array.isArray(n.children))return;let i=!1;for(let s of n.children)if(Array.isArray(s.children)&&s.children[0].value===r&&s.children.length===2){n=s.children[1],i=!0;break}if(!i)return}else{let i=r;if(n.type!=="array"||i<0||!Array.isArray(n.children)||i>=n.children.length)return;n=n.children[i]}return n}function i_(e){if(!e.parent||!e.parent.children)return[];let t=i_(e.parent);if(e.parent.type==="property"){let n=e.parent.children[0].value;t.push(n)}else if(e.parent.type==="array"){let n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function Pf(e){switch(e.type){case"array":return e.children.map(Pf);case"object":let t=Object.create(null);for(let n of e.children){let r=n.children[1];r&&(t[n.children[0].value]=Pf(r))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function F3(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function s_(e,t,n=!1){if(F3(e,t,n)){let r=e.children;if(Array.isArray(r))for(let i=0;i<r.length&&r[i].offset<=t;i++){let s=s_(r[i],t,n);if(s)return s}return e}}function Hc(e,t,n=$c.DEFAULT){let r=Ts(e,!1),i=[],s=0;function a($){return $?()=>s===0&&$(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function o($){return $?I=>s===0&&$(I,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c($){return $?I=>s===0&&$(I,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function l($){return $?()=>{s>0?s++:$(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(s=1)}:()=>!0}function f($){return $?()=>{s>0&&s--,s===0&&$(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let m=l(t.onObjectBegin),p=c(t.onObjectProperty),g=f(t.onObjectEnd),v=l(t.onArrayBegin),b=f(t.onArrayEnd),_=c(t.onLiteralValue),k=o(t.onSeparator),w=a(t.onComment),T=o(t.onError),y=n&&n.disallowComments,A=n&&n.allowTrailingComma;function N(){for(;;){let $=r.scan();switch(r.getTokenError()){case 4:O(14);break;case 5:O(15);break;case 3:O(13);break;case 1:y||O(11);break;case 2:O(12);break;case 6:O(16);break}switch($){case 12:case 13:y?O(10):w();break;case 16:O(1);break;case 15:case 14:break;default:return $}}}function O($,I=[],B=[]){if(T($),I.length+B.length>0){let U=r.getToken();for(;U!==17;){if(I.indexOf(U)!==-1){N();break}else if(B.indexOf(U)!==-1)break;U=N()}}}function q($){let I=r.getTokenValue();return $?_(I):(p(I),i.push(I)),N(),!0}function j(){switch(r.getToken()){case 11:let $=r.getTokenValue(),I=Number($);isNaN(I)&&(O(2),I=0),_(I);break;case 7:_(null);break;case 8:_(!0);break;case 9:_(!1);break;default:return!1}return N(),!0}function M(){return r.getToken()!==10?(O(3,[],[2,5]),!1):(q(!1),r.getToken()===6?(k(":"),N(),V()||O(4,[],[2,5])):O(5,[],[2,5]),i.pop(),!0)}function C(){m(),N();let $=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if($||O(4,[],[]),k(","),N(),r.getToken()===2&&A)break}else $&&O(6,[],[]);M()||O(4,[],[2,5]),$=!0}return g(),r.getToken()!==2?O(7,[2],[]):N(),!0}function L(){v(),N();let $=!0,I=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(I||O(4,[],[]),k(","),N(),r.getToken()===4&&A)break}else I&&O(6,[],[]);$?(i.push(0),$=!1):i[i.length-1]++,V()||O(4,[],[4,5]),I=!0}return b(),$||i.pop(),r.getToken()!==4?O(8,[4],[]):N(),!0}function V(){switch(r.getToken()){case 3:return L();case 1:return C();case 10:return q(!0);default:return j()}}return N(),r.getToken()===17?n.allowEmptyContent?!0:(O(4,[],[]),!1):V()?(r.getToken()!==17&&O(9,[],[]),!0):(O(4,[],[]),!1)}function Nx(e,t){let n=Ts(e),r=[],i,s=0,a;do switch(a=n.getPosition(),i=n.scan(),i){case 12:case 13:case 17:s!==a&&r.push(e.substring(s,a)),t!==void 0&&r.push(n.getTokenValue().replace(/[^\r\n]/g,t)),s=n.getPosition();break}while(i!==17);return r.join("")}function Px(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}var $c,a_=Oe(()=>{"use strict";d();Of();(function(e){e.DEFAULT={allowTrailingComma:!1}})($c||($c={}))});function Cx(e,t,n,r){let i=t.slice(),a=Cf(e,[]),o,c;for(;i.length>0&&(c=i.pop(),o=Uc(a,i),o===void 0&&n!==void 0);)typeof c=="string"?n={[c]:n}:n=[n];if(o)if(o.type==="object"&&typeof c=="string"&&Array.isArray(o.children)){let l=Uc(o,[c]);if(l!==void 0)if(n===void 0){if(!l.parent)throw new Error("Malformed AST");let f=o.children.indexOf(l.parent),m,p=l.parent.offset+l.parent.length;if(f>0){let g=o.children[f-1];m=g.offset+g.length}else m=o.offset+1,o.children.length>1&&(p=o.children[1].offset);return ws(e,{offset:m,length:p-m,content:""},r)}else return ws(e,{offset:l.offset,length:l.length,content:JSON.stringify(n)},r);else{if(n===void 0)return[];let f=`${JSON.stringify(c)}: ${JSON.stringify(n)}`,m=r.getInsertionIndex?r.getInsertionIndex(o.children.map(g=>g.children[0].value)):o.children.length,p;if(m>0){let g=o.children[m-1];p={offset:g.offset+g.length,length:0,content:","+f}}else o.children.length===0?p={offset:o.offset+1,length:0,content:f}:p={offset:o.offset+1,length:0,content:f+","};return ws(e,p,r)}}else if(o.type==="array"&&typeof c=="number"&&Array.isArray(o.children)){let l=c;if(l===-1){let f=`${JSON.stringify(n)}`,m;if(o.children.length===0)m={offset:o.offset+1,length:0,content:f};else{let p=o.children[o.children.length-1];m={offset:p.offset+p.length,length:0,content:","+f}}return ws(e,m,r)}else if(n===void 0&&o.children.length>=0){let f=c,m=o.children[f],p;if(o.children.length===1)p={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===f){let g=o.children[f-1],v=g.offset+g.length,b=o.offset+o.length;p={offset:v,length:b-2-v,content:""}}else p={offset:m.offset,length:o.children[f+1].offset-m.offset,content:""};return ws(e,p,r)}else if(n!==void 0){let f,m=`${JSON.stringify(n)}`;if(!r.isArrayInsertion&&o.children.length>c){let p=o.children[c];f={offset:p.offset,length:p.length,content:m}}else if(o.children.length===0||c===0)f={offset:o.offset+1,length:0,content:o.children.length===0?m:m+","};else{let p=c>o.children.length?o.children.length:c,g=o.children[p-1];f={offset:g.offset+g.length,length:0,content:","+m}}return ws(e,f,r)}else throw new Error(`Can not ${n===void 0?"remove":r.isArrayInsertion?"insert":"modify"} Array index ${l} as length is not sufficient`)}else throw new Error(`Can not add ${typeof c!="number"?"index":"property"} to parent of type ${o.type}`);else{if(n===void 0)throw new Error("Can not delete in empty document");return ws(e,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(n)},r)}}function ws(e,t,n){if(!n.formattingOptions)return[t];let r=Lf(e,t),i=t.offset,s=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!Vc(r,i-1);)i--;for(;s<r.length&&!Vc(r,s);)s++}let a=Nf(r,{offset:i,length:s-i},{...n.formattingOptions,keepLines:!1});for(let c=a.length-1;c>=0;c--){let l=a[c];r=Lf(r,l),i=Math.min(i,l.offset),s=Math.max(s,l.offset+l.length),s+=l.content.length-l.length}let o=e.length-(r.length-s)-i;return[{offset:i,length:o,content:r.substring(i,s)}]}function Lf(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var Lx=Oe(()=>{"use strict";d();r_();a_()});var to={};$y(to,{ParseErrorCode:()=>u_,ScanError:()=>o_,SyntaxKind:()=>c_,applyEdits:()=>Y3,createScanner:()=>mn,findNodeAtLocation:()=>z3,findNodeAtOffset:()=>f_,format:()=>h_,getLocation:()=>U3,getNodePath:()=>d_,getNodeValue:()=>p_,modify:()=>K3,parse:()=>l_,parseTree:()=>H3,printParseErrorCode:()=>J3,stripComments:()=>G3,visit:()=>W3});function J3(e){switch(e){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 h_(e,t,n){return Nf(e,t,n)}function K3(e,t,n,r){return Cx(e,t,n,r)}function Y3(e,t){let n=t.slice(0).sort((i,s)=>{let a=i.offset-s.offset;return a===0?i.length-s.length:a}),r=e.length;for(let i=n.length-1;i>=0;i--){let s=n[i];if(s.offset+s.length<=r)e=Lf(e,s);else throw new Error("Overlapping edit");r=s.offset}return e}var mn,o_,c_,U3,l_,H3,z3,f_,d_,p_,W3,G3,u_,vr=Oe(()=>{"use strict";d();r_();Lx();Of();a_();mn=Ts;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(o_||(o_={}));(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(c_||(c_={}));U3=Ax,l_=Ox,H3=Cf,z3=Uc,f_=s_,d_=i_,p_=Pf,W3=Hc,G3=Nx;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(u_||(u_={}))});var Ge=x(no=>{"use strict";d();Object.defineProperty(no,"__esModule",{value:!0});no.parseJSON=eU;no.nodeAtPath=tU;no.getLocStart=nU;no.getLocEnd=rU;var Q3=(vr(),Uy(to)),X3=Ce(),Z3={disallowComments:!1,allowTrailingComma:!0,allowEmptyContent:!1};function eU(e,t,n){try{let r=[],i=(0,Q3.parse)(e,r,Z3);if(r.length&&n)throw r[0];return i}catch(r){return t!==void 0?t:(0,X3.asError)(r)}}function tU(e,t){return t.reduce((n,r)=>{if(n)switch(n.type){case"Object":{let i=n.children.find(s=>s.key.value===r);return i?i.value:void 0}case"Array":return n.children[r];case"Literal":return;case"Identifier":return;case"Property":return}},e)}function nU(e){return e.loc?.start.offset??0}function rU(e){return e.loc?.end.offset??0}});var Ix=x((xs,qx)=>{d();var zc=mx(),iU=zc.default||zc,qf=function(e,t){return/^\/\//.test(e)&&(e="https:"+e),iU.call(this,e,t)};qf.ponyfill=!0;qx.exports=xs=qf;xs.fetch=qf;xs.Headers=zc.Headers;xs.Request=zc.Request;xs.Response=zc.Response;xs.default=qf});var In=x(Es=>{"use strict";d();Object.defineProperty(Es,"__esModule",{value:!0});Es.doesFileExist=Mx;Es.doesFileExceedThreshold=Rx;Es.getFileSize=aU;Es.hasRemoteAssetSizeExceededThreshold=oU;Es.hasLocalAssetSizeExceededThreshold=cU;var sU=Ix();async function Mx(e,t){let n=e.toUri(t);return await e.fileExists(n)}async function Rx(e,t,n){let r=e.toUri(t);if(!e.fileSize)return[!1,0];let i=await e.fileSize(r);return[i>n,i]}async function aU(e){try{let t=await(0,sU.fetch)(e,{method:"HEAD"});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);let n=t.headers.get("Content-Length");return n===null?0:parseFloat(n)}catch{return 0}}async function oU(e,t,n){return await e.remoteFileSize(t)>n}async function cU(e,t,n){if(!await Mx(e,t))return!1;let[i,s]=await Rx(e,t,n);return i}});var $x=x(ki=>{"use strict";d();Object.defineProperty(ki,"__esModule",{value:!0});ki.getBlocks=jx;ki.isInvalidPresetBlock=Bx;ki.isInvalidDefaultBlock=lU;ki.validateNestedBlocks=Fx;ki.reportWarning=g_;ki.validateBlockFileExistence=Vx;var m_=Ge(),uU=In();function jx(e){let t=[],n=[],r={},i=[],s=e.blocks,a=e.presets;function o(f,m){if(!f)return;"name"in f?n.push({node:f,path:["blocks",String(m),"type"]}):f.type!=="@app"&&t.push({node:f,path:["blocks",String(m),"type"]})}function c(f,m,p=0){f&&(r[p]||(r[p]=[]),r[p].push({node:f,path:m.concat("type")}),"blocks"in f&&(Array.isArray(f.blocks)?f.blocks.forEach((g,v)=>{c(g,m.concat("blocks",String(v)),p+1)}):typeof f.blocks=="object"&&f.blocks!==null&&Object.entries(f.blocks).forEach(([g,v])=>{c(v,m.concat("blocks",g),p+1)})))}function l(f,m){"name"in f&&i.push({node:f,path:["default","blocks",String(m),"type"]})}return Array.isArray(s)&&s.forEach((f,m)=>{o(f,m)}),a&&a.forEach((f,m)=>{"blocks"in f&&f.blocks&&(Array.isArray(f.blocks)?f.blocks.forEach((p,g)=>{c(p,["presets",String(m),"blocks",String(g)],0)}):typeof f.blocks=="object"&&Object.entries(f.blocks).forEach(([p,g])=>{c(g,["presets",String(m),"blocks",p],0)}))}),"default"in e&&e.default?.blocks?.forEach((f,m)=>{l(f,m)}),{rootLevelThemeBlocks:t,rootLevelLocalBlocks:n,presetLevelBlocks:r,defaultLevelBlocks:i,hasRootBlocksDeclaration:Array.isArray(s)}}function Bx(e,t,n,r,i=!0){if(t.static)return!r.some(l=>l.type===t.type&&l.id===e);let s=t.type.startsWith("_");if(s&&!i)return!1;let a=n.some(l=>l.node.type==="@theme"),o=s||!a;return!n.some(l=>l.node.type===t.type)&&o}function lU(e,t,n=!0){let r=e.type.startsWith("_");if(r&&!n)return!1;let i=t.some(o=>o.node.type==="@theme"),s=r||!i;return!t.some(o=>o.node.type===e.type)&&s}async function Dx(e,t,n,r,i,s,a,o,c=[]){let l=(0,m_.nodeAtPath)(o,t),f="id"in e?e.id:t.at(-2);if(l){if(Bx(f,e,i,c)){let p=!!e.static,g=e.type.startsWith("_"),v=p?`Could not find a static block of type "${e.type}" with id "${f}" in "blocks/${r.type}.liquid".`:g?`Private block type "${e.type}" is not allowed in "${r.type}" blocks.`:`Block type "${e.type}" is not allowed in "${r.type}" blocks. Allowed types are: ${s.join(", ")}.`;g_(v,a,l,n)}await Vx(e.type,n)||g_(`Theme block 'blocks/${e.type}.liquid' does not exist.`,a,l,n)}"blocks"in e&&e.blocks&&await Fx(n,e,e.blocks,t.slice(0,-1),a,o)}async function Fx(e,t,n,r,i,s){if(!n)return;let a=await e.getBlockSchema?.(t.type);if(!a||a instanceof Error)return;let{validSchema:o,staticBlockDefs:c}=a;if(!o||o instanceof Error)return;let{rootLevelThemeBlocks:l}=jx(o),f=l.map(m=>m.node.type);Array.isArray(n)?await Promise.all(n.map((m,p)=>{let g=r.concat(["blocks",String(p),"type"]);return Dx(m,g,e,t,l,f,i,s,c)})):typeof n=="object"&&await Promise.all(Object.entries(n).map(([m,p])=>{let g=r.concat(["blocks",m,"type"]);return Dx(p,g,e,t,l,f,i,s,c)}))}function g_(e,t,n,r){r.report({message:e,startIndex:t+(0,m_.getLocStart)(n),endIndex:t+(0,m_.getLocEnd)(n)})}async function Vx(e,t){if(e==="@theme"||e==="@app")return!0;let n=`blocks/${e}.liquid`;return await(0,uU.doesFileExist)(t,n)}});var Qe=x(bt=>{"use strict";d();Object.defineProperty(bt,"__esModule",{value:!0});bt.nonTraversableProperties=bt.LoopNamedTags=bt.LiquidNodeTypes=bt.HtmlNodeTypes=bt.Comparators=bt.RawTags=bt.NamedTags=bt.NodeTypes=void 0;var Xn;(function(e){e.Document="Document",e.LiquidRawTag="LiquidRawTag",e.LiquidTag="LiquidTag",e.LiquidBranch="LiquidBranch",e.LiquidVariableOutput="LiquidVariableOutput",e.HtmlSelfClosingElement="HtmlSelfClosingElement",e.HtmlVoidElement="HtmlVoidElement",e.HtmlDoctype="HtmlDoctype",e.HtmlComment="HtmlComment",e.HtmlElement="HtmlElement",e.HtmlDanglingMarkerClose="HtmlDanglingMarkerClose",e.HtmlRawNode="HtmlRawNode",e.AttrSingleQuoted="AttrSingleQuoted",e.AttrDoubleQuoted="AttrDoubleQuoted",e.AttrUnquoted="AttrUnquoted",e.AttrEmpty="AttrEmpty",e.TextNode="TextNode",e.YAMLFrontmatter="YAMLFrontmatter",e.LiquidVariable="LiquidVariable",e.LiquidFilter="LiquidFilter",e.NamedArgument="NamedArgument",e.LiquidLiteral="LiquidLiteral",e.BooleanExpression="BooleanExpression",e.String="String",e.Number="Number",e.Range="Range",e.VariableLookup="VariableLookup",e.Comparison="Comparison",e.LogicalExpression="LogicalExpression",e.AssignMarkup="AssignMarkup",e.BlockMarkup="BlockMarkup",e.ContentForMarkup="ContentForMarkup",e.CycleMarkup="CycleMarkup",e.ForMarkup="ForMarkup",e.PaginateMarkup="PaginateMarkup",e.RawMarkup="RawMarkup",e.RenderMarkup="RenderMarkup",e.SectionMarkup="SectionMarkup",e.RenderVariableExpression="RenderVariableExpression",e.RenderAliasExpression="RenderAliasExpression",e.LiquidDocDescriptionNode="LiquidDocDescriptionNode",e.LiquidDocParamNode="LiquidDocParamNode",e.LiquidDocExampleNode="LiquidDocExampleNode",e.LiquidDocPromptNode="LiquidDocPromptNode",e.LiquidErrorNode="LiquidErrorNode"})(Xn||(bt.NodeTypes=Xn={}));var If;(function(e){e.assign="assign",e.block="block",e.capture="capture",e.case="case",e.content_for="content_for",e.cycle="cycle",e.decrement="decrement",e.echo="echo",e.elsif="elsif",e.for="for",e.form="form",e.if="if",e.ifchanged="ifchanged",e.include="include",e.increment="increment",e.layout="layout",e.liquid="liquid",e.paginate="paginate",e.partial="partial",e.render="render",e.section="section",e.sections="sections",e.tablerow="tablerow",e.unless="unless",e.when="when"})(If||(bt.NamedTags=If={}));var Ux;(function(e){e.comment="comment",e.doc="doc",e.javascript="javascript",e.raw="raw",e.schema="schema",e.style="style",e.stylesheet="stylesheet"})(Ux||(bt.RawTags=Ux={}));var Hx;(function(e){e.CONTAINS="contains",e.EQUAL="==",e.GREATER_THAN=">",e.GREATER_THAN_OR_EQUAL=">=",e.LESS_THAN="<",e.LESS_THAN_OR_EQUAL="<=",e.NOT_EQUAL="!="})(Hx||(bt.Comparators=Hx={}));bt.HtmlNodeTypes=[Xn.HtmlElement,Xn.HtmlDanglingMarkerClose,Xn.HtmlRawNode,Xn.HtmlVoidElement,Xn.HtmlSelfClosingElement];bt.LiquidNodeTypes=[Xn.LiquidTag,Xn.LiquidVariableOutput,Xn.LiquidBranch,Xn.LiquidRawTag];bt.LoopNamedTags=[If.for,If.tablerow];bt.nonTraversableProperties=new Set(["parentNode","prev","next","firstChild","lastChild"])});var Gr=x(As=>{"use strict";d();Object.defineProperty(As,"__esModule",{value:!0});As.assertNever=fU;As.locStart=dU;As.locEnd=pU;As.deepGet=hU;As.dropLast=mU;function fU(e){throw new Error(`Unexpected object: ${e.type}`)}function dU(e){return e.position.start}function pU(e){return e.position.end}function hU(e,t){return e.reduce((n,r)=>{if(n&&n[r]!==void 0)return n[r]},t)}function mU(e,t){let n=[...t];for(let r=0;r<e;r++)n.pop();return n}});var De=x(Wc=>{"use strict";d();Object.defineProperty(Wc,"__esModule",{value:!0});Wc.TagKind=void 0;Wc.isStructuralEndTag=gU;var zx;(function(e){e.Block="block",e.Tag="tag",e.Raw="raw"})(zx||(Wc.TagKind=zx={}));function gU(e,t){return t!==void 0}});var Gc=x(ro=>{"use strict";d();Object.defineProperty(ro,"__esModule",{value:!0});ro.rawBodyRuleLookup=bU;ro.liquidTagTokenName=kU;ro.findRawBodyEnd=Kx;ro.findRawLineBodyEnd=Yx;var yU=De(),y_="[ \\t\\n\\v\\f\\r]",Jx=new RegExp(`^\\{%-?${y_}*(#|\\w+)${y_}*[\\s\\S]*?-?%\\}$`),Wx=new RegExp(`\\{%-?${y_}*(\\w+)`,"y"),_U=/^(#|\w+)/,vU=/^[ \t\v\f\r]*$/,Gx=/\{[{%]/g;function bU(e){return t=>{let n=e(t);return n?.kind===yU.TagKind.Raw?n.body:void 0}}function kU(e){return Jx.exec(e)?.[1]}function Kx(e,t,n,r,i){let s=`end${n}`,a=t,o=1;for(;a<e.length;){if(Gx.lastIndex=a,e[a]!=="{"||e[a+1]!=="%"&&e[a+1]!=="{"){let m=Gx.exec(e);if(!m)return null;a=m.index}let c=e[a+1]==="%"?Qx(e,a+2):wU(e,a+2),l=e.slice(a,c),f=SU(l,r.delimiter);if(f?.[1]===s){if(o-=1,o===0){let m=a+f.index;return{tagStart:m,tagEnd:c,wsStart:e[m+2]==="-"?"-":"",wsEnd:l[l.length-3]==="-"?"-":""}}}else if(f?.[1]===n){if(r.sameName==="rejected")return null;r.sameName==="nests"&&(o+=1)}else if(f&&r.opaque.includes(f[1])){let m=i(f[1]);if(m){let p=Kx(e,c,f[1],m,i);if(!p)return null;a=p.tagEnd;continue}}a=c}return null}function Yx(e,t,n,r,i,s){if(!i.closesInLiquidTag)return null;let a=`end${r}`,o=1;for(let c=n;c<t.length;c++){let l=TU(e,t[c]);if(l===a){if(o-=1,o===0)return c}else if(l===r){if(i.sameName==="rejected")return null;i.sameName==="nests"&&(o+=1)}else if(l!==void 0&&i.opaque.includes(l)){let f=s(l);if(f){let m=Yx(e,t,c+1,l,f,s);if(m===null)return null;c=m}}}return null}function SU(e,t){if(e.endsWith("%}")){if(t==="leading")return Jx.exec(e)??void 0;for(let n=e.lastIndexOf("{%",e.length-3);n!==-1;n=e.lastIndexOf("{%",n-1)){Wx.lastIndex=n;let r=Wx.exec(e);if(r)return r;if(n===0)break}}}function TU(e,t){let n=e.lastIndexOf(`
|
|
19
|
+
`,t.nameOffset-1)+1;if(vU.test(e.slice(n,t.nameOffset)))return _U.exec(t.tagName)?.[1]}function Qx(e,t){let n=e.indexOf("%}",t);return n===-1?t:n+2}function wU(e,t){let n=t,r=e[n++],i=r;for(;i!==void 0;){for(;r!==void 0&&r!=="}"&&r!=="{";)r=e[n++];if(r===void 0||n>=e.length)return e.length;if(i=e[n++],r==="}")return i==="}"?n:n-1;if(r==="{"&&i==="%")return Qx(e,n);r=i}return e.length}});var Mf=x(Os=>{"use strict";d();Object.defineProperty(Os,"__esModule",{value:!0});Os.unlessTag=Os.ifTag=void 0;Os.elsifBranchParse=xU;var Xx=De();function Zx(e,t,n){return t.conditionalExpression()}Os.ifTag={kind:Xx.TagKind.Block,branches:["elsif","else"],parse:Zx};Os.unlessTag={kind:Xx.TagKind.Block,branches:["elsif","else"],parse:Zx};function xU(e,t){return t.conditionalExpression()}});var xt=x(Kc=>{"use strict";d();Object.defineProperty(Kc,"__esModule",{value:!0});Kc.MarkupTokenType=void 0;Kc.tokenizeMarkup=NU;var Ne;(function(e){e.Id="Id",e.String="String",e.Number="Number",e.Dot="Dot",e.DotDot="DotDot",e.Pipe="Pipe",e.Colon="Colon",e.Comma="Comma",e.OpenRound="OpenRound",e.CloseRound="CloseRound",e.OpenSquare="OpenSquare",e.CloseSquare="CloseSquare",e.Dash="Dash",e.Comparison="Comparison",e.Equality="Equality",e.Logical="Logical",e.EndOfString="EndOfString"})(Ne||(Kc.MarkupTokenType=Ne={}));var Jc=/[a-zA-Z_][\w-]*\??/y,Si=/\d[\d_]*(\.\d[\d_]*)?/y,__=/\s+/y,EU=/'[^']*'/y,AU=/"[^"]*"/y;function eE(e){return e>=48&&e<=57}function OU(e){return e<=32||e>=160}function NU(e,t=0){let n=[],r=0,i;for(;r<e.length;){if(OU(e.charCodeAt(r))&&(__.lastIndex=r,__.test(e))){r=__.lastIndex;continue}let s=e[r],a=r+1<e.length?e[r+1]:"";if(s==="'"||s==='"'){let c=s==="'"?EU:AU;if(c.lastIndex=r,c.test(e)){let l=e.slice(r,c.lastIndex);n.push({type:Ne.String,value:l,start:r+t,end:c.lastIndex+t}),i=Ne.String,r=c.lastIndex;continue}}if(s==="-"&&eE(e.charCodeAt(r+1))&&(Si.lastIndex=r+1,Si.test(e))){let c=e.slice(r,Si.lastIndex);n.push({type:Ne.Number,value:c,start:r+t,end:Si.lastIndex+t}),i=Ne.Number,r=Si.lastIndex;continue}if(eE(e.charCodeAt(r))&&(Si.lastIndex=r,Si.test(e))){let c=Si.lastIndex,l=e.slice(r,c);n.push({type:Ne.Number,value:l,start:r+t,end:c+t}),i=Ne.Number,r=c;continue}if(Jc.lastIndex=r,Jc.test(e)){let c=e.slice(r,Jc.lastIndex),l=Ne.Id;i!==Ne.Dot&&(c==="contains"?l=Ne.Comparison:(c==="and"||c==="or")&&(l=Ne.Logical)),n.push({type:l,value:c,start:r+t,end:Jc.lastIndex+t}),i=l,r=Jc.lastIndex;continue}if(a!==""){let c=s+a;if(c==="=="||c==="!="){n.push({type:Ne.Equality,value:c,start:r+t,end:r+2+t}),i=Ne.Equality,r+=2;continue}if(c===">="||c==="<="){n.push({type:Ne.Comparison,value:c,start:r+t,end:r+2+t}),i=Ne.Comparison,r+=2;continue}if(c===".."){n.push({type:Ne.DotDot,value:"..",start:r+t,end:r+2+t}),i=Ne.DotDot,r+=2;continue}}let o=PU(s);if(o!==void 0){n.push({type:o,value:s,start:r+t,end:r+1+t}),i=o,r+=1;continue}r+=1}return n.push({type:Ne.EndOfString,value:"",start:e.length+t,end:e.length+t}),n}function PU(e){switch(e){case".":return Ne.Dot;case"|":return Ne.Pipe;case":":return Ne.Colon;case",":return Ne.Comma;case"(":return Ne.OpenRound;case")":return Ne.CloseRound;case"[":return Ne.OpenSquare;case"]":return Ne.CloseSquare;case"-":return Ne.Dash;case">":return Ne.Comparison;case"<":return Ne.Comparison;case"=":return Ne.Equality;default:return}}});var Qc=x(Yc=>{"use strict";d();Object.defineProperty(Yc,"__esModule",{value:!0});Yc.caseTag=void 0;Yc.whenBranchParse=qU;var io=xt(),CU=De(),LU=Qe();Yc.caseTag={kind:CU.TagKind.Block,branches:["when","else"],parse(e,t,n){return t.valueExpression()}};function qU(e,t){let n=[t.valueExpression()];for(;;){if(t.consumeOptional(io.MarkupTokenType.Comma)){if(t.isLax()&&!t.atValueStart())break;n.push(t.valueExpression());continue}let s=t.peek();if(s.type===io.MarkupTokenType.Logical&&s.value==="or"){if(t.consume(io.MarkupTokenType.Logical),t.isLax()&&!t.atValueStart())break;n.push(t.valueExpression());continue}break}let r=t.peek(),i=n[n.length-1];return r.type===io.MarkupTokenType.Colon&&t.look(io.MarkupTokenType.EndOfString,1)&&i.type===LU.NodeTypes.String&&i.position.end===r.start&&t.consume(io.MarkupTokenType.Colon),t.isLax()&&!t.isAtEnd()&&t.discardTrailing(),n}});var iE=x(so=>{"use strict";d();Object.defineProperty(so,"__esModule",{value:!0});so.tablerowTag=so.forTag=void 0;var tE=xt(),IU=Qe(),nE=De();function rE(e,t,n){let r=t.consume(tE.MarkupTokenType.Id);if(!t.id("in"))throw new Error("Expected 'in'");let i=t.valueExpression(),s=t.id("reversed"),a=[];for(;!t.isAtEnd();)if(t.consumeOptional(tE.MarkupTokenType.Comma),t.isLax())try{a.push(t.namedArgument())}catch{break}else a.push(t.namedArgument());return{type:IU.NodeTypes.ForMarkup,variableName:r.value,collection:i,reversed:s,args:a,position:{start:r.start,end:t.peek().start},source:i.source}}so.forTag={kind:nE.TagKind.Block,branches:["else"],parse:rE};so.tablerowTag={kind:nE.TagKind.Block,branches:["else"],parse:rE}});var sE=x(Rf=>{"use strict";d();Object.defineProperty(Rf,"__esModule",{value:!0});Rf.assignTag=void 0;var v_=xt(),MU=Qe(),RU=De();Rf.assignTag={kind:RU.TagKind.Tag,parse(e,t,n){let r=t.peek().start,i;if(t.isLax()){let c=t.consumeRawUntil(v_.MarkupTokenType.Equality).match(/[\w\-.[\]()]+/g);if(i=c?c[c.length-1]:"",i.length===0)throw new Error("Expected an assignment target before '=' in assign tag")}else i=t.consume(v_.MarkupTokenType.Id).value;if(t.consume(v_.MarkupTokenType.Equality).value!=="=")throw new Error("Expected '=' in assign tag");let a=t.liquidVariable();return{type:MU.NodeTypes.AssignMarkup,name:i,value:a,position:{start:r,end:t.peek().start},source:a.source}}}});var aE=x(Df=>{"use strict";d();Object.defineProperty(Df,"__esModule",{value:!0});Df.echoTag=void 0;var DU=De();Df.echoTag={kind:DU.TagKind.Tag,parse(e,t,n){return t.liquidVariable()}}});var uE=x(ao=>{"use strict";d();Object.defineProperty(ao,"__esModule",{value:!0});ao.includeTag=ao.renderTag=void 0;var Zc=xt(),Xc=Qe(),oE=De();function jU(e){return e.look(Zc.MarkupTokenType.Id)&&e.look(Zc.MarkupTokenType.Colon,1)}function cE(e,t,n,r=!1){let i=t.valueExpression();if(!r&&i.type!==Xc.NodeTypes.String&&i.type!==Xc.NodeTypes.VariableLookup)throw new Error(`Expected string or variable lookup for snippet, got ${i.type}`);let s=null,a=null,o=null,c=t.peek().start;if(t.id("for")?o="for":t.id("with")&&(o="with"),o!==null){let p=t.valueExpression();s={type:Xc.NodeTypes.RenderVariableExpression,kind:o,name:p,position:{start:c,end:p.position.end},source:p.source}}let l=t.peek().start;if(t.id("as")){let p=t.consume(Zc.MarkupTokenType.Id);a={type:Xc.NodeTypes.RenderAliasExpression,value:p.value,position:{start:l,end:p.end},source:i.source}}let f=[];for(t.consumeOptional(Zc.MarkupTokenType.Comma);jU(t);)f.push(t.namedArgument()),t.consumeOptional(Zc.MarkupTokenType.Comma);let m=t.peek().start;return{type:Xc.NodeTypes.RenderMarkup,snippet:i,variable:s,alias:a,args:f,position:{start:i.position.start,end:m},source:i.source}}ao.renderTag={kind:oE.TagKind.Tag,parse:cE};ao.includeTag={kind:oE.TagKind.Tag,parse:(e,t,n)=>cE(e,t,n,!0)}});var fE=x(jf=>{"use strict";d();Object.defineProperty(jf,"__esModule",{value:!0});jf.cycleTag=void 0;var lE=xt(),BU=Qe(),FU=De();jf.cycleTag={kind:FU.TagKind.Tag,parse(e,t,n){let r=t.valueExpression(),i=null,s=[];for(t.consumeOptional(lE.MarkupTokenType.Colon)?(i=r,s.push(t.valueExpression())):s.push(r);t.consumeOptional(lE.MarkupTokenType.Comma)&&!(t.isLax()&&t.isAtEnd());)s.push(t.valueExpression());return{type:BU.NodeTypes.CycleMarkup,groupName:i,args:s,position:{start:r.position.start,end:t.peek().start},source:r.source}}}});var pE=x(Bf=>{"use strict";d();Object.defineProperty(Bf,"__esModule",{value:!0});Bf.sectionTag=void 0;var VU=xt(),dE=Qe(),$U=De();Bf.sectionTag={kind:$U.TagKind.Tag,parse(e,t,n){let r=t.valueExpression();if(r.type!==dE.NodeTypes.String)throw new Error(`Expected string for section name, got ${r.type}`);let i=[];return t.consumeOptional(VU.MarkupTokenType.Comma)&&i.push(...t.blockNamedArguments()),{type:dE.NodeTypes.SectionMarkup,name:r,args:i,position:{start:r.position.start,end:t.peek().start},source:r.source}}}});var mE=x(Ff=>{"use strict";d();Object.defineProperty(Ff,"__esModule",{value:!0});Ff.contentForTag=void 0;var b_=xt(),hE=Qe(),UU=De();Ff.contentForTag={kind:UU.TagKind.Tag,parse(e,t,n){let r=t.valueExpression();if(r.type!==hE.NodeTypes.String)throw new Error(`Expected string for content_for type, got ${r.type}`);let i=[];for(t.consumeOptional(b_.MarkupTokenType.Comma);t.look(b_.MarkupTokenType.Id);){try{i.push(t.namedArgument())}catch{break}t.consumeOptional(b_.MarkupTokenType.Comma)}return{type:hE.NodeTypes.ContentForMarkup,contentForType:r,args:i,position:{start:r.position.start,end:t.peek().start},source:r.source}}}});var yE=x(Vf=>{"use strict";d();Object.defineProperty(Vf,"__esModule",{value:!0});Vf.blockTag=void 0;var HU=xt(),gE=Qe(),zU=De(),WU=/^_?[a-zA-Z0-9][\w-]*$/,GU=/^shopify:\/\/apps\/[A-Za-z0-9][A-Za-z0-9_-]*\/blocks\/[A-Za-z0-9][A-Za-z0-9_-]*\/[0-9A-Fa-f]{8}(?:-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12}$/;Vf.blockTag={kind:zU.TagKind.Block,branches:[],parse(e,t,n){if(t.isAtEnd())throw new Error("in 'block' - missing block type");let r=t.valueExpression();if(r.type!==gE.NodeTypes.String)throw new Error("in 'block' - file name must be a string literal");if(!WU.test(r.value)&&!GU.test(r.value))throw new Error(`in 'block' - '${r.value}' is not a valid block type`);let i=[];if(t.consumeOptional(HU.MarkupTokenType.Comma)&&!t.isAtEnd()&&(i=t.blockNamedArguments()),!t.isAtEnd()){let s=t.peek();throw new Error(`Unexpected token in 'block' tag: ${s.value}`)}return{type:gE.NodeTypes.BlockMarkup,name:r,args:i,position:{start:r.position.start,end:t.peek().start},source:r.source}}}});var vE=x($f=>{"use strict";d();Object.defineProperty($f,"__esModule",{value:!0});$f.paginateTag=void 0;var _E=xt(),JU=Qe(),KU=De();$f.paginateTag={kind:KU.TagKind.Block,branches:[],parse(e,t,n){let r=t.valueExpression();if(!t.id("by"))throw new Error("Expected 'by' in paginate tag");let i=t.valueExpression(),s=[];return t.consumeOptional(_E.MarkupTokenType.Comma)?s.push(...t.namedArguments()):t.isTolerant()&&t.peek().type===_E.MarkupTokenType.Id&&s.push(...t.namedArguments()),{type:JU.NodeTypes.PaginateMarkup,collection:r,pageSize:i,args:s,position:{start:r.position.start,end:t.peek().start},source:r.source}}}});var bE=x(Uf=>{"use strict";d();Object.defineProperty(Uf,"__esModule",{value:!0});Uf.formTag=void 0;var YU=De();Uf.formTag={kind:YU.TagKind.Block,branches:[],parse(e,t,n){return t.arguments()}}});var kE=x(Hf=>{"use strict";d();Object.defineProperty(Hf,"__esModule",{value:!0});Hf.incrementTag=void 0;var QU=De();Hf.incrementTag={kind:QU.TagKind.Tag,parse(e,t,n){return t.variableLookup()}}});var SE=x(zf=>{"use strict";d();Object.defineProperty(zf,"__esModule",{value:!0});zf.decrementTag=void 0;var XU=De();zf.decrementTag={kind:XU.TagKind.Tag,parse(e,t,n){return t.variableLookup()}}});var TE=x(Wf=>{"use strict";d();Object.defineProperty(Wf,"__esModule",{value:!0});Wf.captureTag=void 0;var ZU=Qe(),e7=De(),t7=/((?:\(?[\w\-.[\]]\)?)+)/;Wf.captureTag={kind:e7.TagKind.Block,branches:[],parse(e,t,n){if(t.isLax()){let{source:r,bodyStart:i,bodyEnd:s}=t.bodyContext(),a=t7.exec(r.slice(i,s));if(a)return{type:ZU.NodeTypes.VariableLookup,name:a[1],lookups:[],position:{start:i,end:s},source:r}}return t.variableLookup()}}});var wE=x(Gf=>{"use strict";d();Object.defineProperty(Gf,"__esModule",{value:!0});Gf.layoutTag=void 0;var n7=De();Gf.layoutTag={kind:n7.TagKind.Tag,parse(e,t,n){return t.valueExpression()}}});var xE=x(Jf=>{"use strict";d();Object.defineProperty(Jf,"__esModule",{value:!0});Jf.sectionsTag=void 0;var r7=Qe(),i7=De();Jf.sectionsTag={kind:i7.TagKind.Tag,parse(e,t,n){let r=t.valueExpression();if(r.type!==r7.NodeTypes.String)throw new Error(`Expected string for sections name, got ${r.type}`);return r}}});var EE=x(Kf=>{"use strict";d();Object.defineProperty(Kf,"__esModule",{value:!0});Kf.partialTag=void 0;var s7=Qe(),a7=De();Kf.partialTag={kind:a7.TagKind.Block,branches:[],parse(e,t,n){let r=t.valueExpression();if(r.type!==s7.NodeTypes.String)throw new Error(`Expected string for partial name, got ${r.type}`);return r}}});var AE=x(Yf=>{"use strict";d();Object.defineProperty(Yf,"__esModule",{value:!0});Yf.ifchangedTag=void 0;var o7=De();Yf.ifchangedTag={kind:o7.TagKind.Block,branches:[],parse(e,t,n){return null}}});var OE=x(Qf=>{"use strict";d();Object.defineProperty(Qf,"__esModule",{value:!0});Qf.breakTag=void 0;var c7=De();Qf.breakTag={kind:c7.TagKind.Tag,parse(e,t,n){if(!t.isAtEnd())throw new Error(`'${e}' tag does not accept markup`);return""}}});var NE=x(Xf=>{"use strict";d();Object.defineProperty(Xf,"__esModule",{value:!0});Xf.continueTag=void 0;var u7=De();Xf.continueTag={kind:u7.TagKind.Tag,parse(e,t,n){if(!t.isAtEnd())throw new Error(`'${e}' tag does not accept markup`);return""}}});var PE=x(Ut=>{"use strict";d();Object.defineProperty(Ut,"__esModule",{value:!0});Ut.stylesheetRaw=Ut.styleRaw=Ut.schemaRaw=Ut.javascriptRaw=Ut.rawRaw=Ut.docRaw=Ut.commentRaw=void 0;var Ns=De(),eu={delimiter:"trailing",sameName:"ignored",opaque:[],closesInLiquidTag:!1},l7={...eu,sameName:"rejected"},f7={delimiter:"leading",sameName:"nests",opaque:["raw"],closesInLiquidTag:!0},d7={delimiter:"leading",sameName:"nests",opaque:["comment","doc","javascript","raw","schema","stylesheet"],closesInLiquidTag:!0};function Ps(e,t,n){if(!t.isAtEnd())throw new Error(`'${e}' tag does not accept markup`)}Ut.commentRaw={kind:Ns.TagKind.Raw,body:f7,parseLiquidInBody:!1,parse:Ps};Ut.docRaw={kind:Ns.TagKind.Raw,body:l7,parse:Ps};Ut.rawRaw={kind:Ns.TagKind.Raw,body:eu,parseLiquidInBody:!1,parse:Ps};Ut.javascriptRaw={kind:Ns.TagKind.Raw,body:eu,parseLiquidInBody:!0,parse:Ps};Ut.schemaRaw={kind:Ns.TagKind.Raw,body:eu,parseLiquidInBody:!1,parse:Ps};Ut.styleRaw={kind:Ns.TagKind.Raw,body:d7,parseLiquidInBody:!0,parse:Ps};Ut.stylesheetRaw={kind:Ns.TagKind.Raw,body:eu,parseLiquidInBody:!0,parse:Ps}});var CE=x(Zf=>{"use strict";d();Object.defineProperty(Zf,"__esModule",{value:!0});Zf.liquidTag=void 0;var p7=De();function h7(e,t){return e.endsWith(",")?/^\w+\s*:/.test(t.trimStart()):!1}function m7(e,t){let n=[],r=e.split(`
|
|
20
|
+
`),i=[],s=0;for(let a=0;a<r.length;a++){let o=r[a],c=t+s;if(i.length>0){let l=i[i.length-1],f=l.raw.trimEnd();if(h7(f,o)){l.raw+=`
|
|
21
|
+
`+o,s+=o.length+1;continue}}i.push({raw:o,startIndex:c}),s+=o.length+1}for(let{raw:a,startIndex:o}of i){let c=a.trimStart(),l=a.length-c.length;if(c.length>0){let f=a.lastIndexOf(`
|
|
22
|
+
`),m=f===-1?a:a.slice(f+1),p=f===-1?o+a.trimEnd().length:o+f+1+m.trimEnd().length,g,v,b,_,k=c.indexOf(`
|
|
23
|
+
`),w=k===-1?c:c.slice(0,k);if(w.startsWith("#"))g="#",v=c.slice(1).replace(/^[ \t]/,""),_=o+l,b=o+l+1+(c.length-1-v.length);else{let T=w.search(/\s/);if(T===-1)g=w,v="",_=o+l,b=o+l+w.length;else{g=w.slice(0,T);let y=c.slice(T);v=y.trimStart(),_=o+l,b=o+l+T+(y.length-v.length)}}n.push({tagName:g,markup:v,markupOffset:b,nameOffset:_,lineEnd:p})}}return n}Zf.liquidTag={kind:p7.TagKind.Tag,parse(e,t,n){let{source:r,bodyStart:i,bodyEnd:s}=t.bodyContext(),a=r.slice(i,s),c={lines:m7(a,i),index:0},l=[];for(;c.index<c.lines.length;){let f=c.lines[c.index];c.index++,l.push(n.parseLiquidStatement(f.tagName,f.markup,f.markupOffset,c))}return l}}});var td=x(ed=>{"use strict";d();Object.defineProperty(ed,"__esModule",{value:!0});ed.builtinTags=void 0;var LE=Mf(),g7=Qc(),qE=iE(),y7=sE(),_7=aE(),IE=uE(),v7=fE(),b7=pE(),k7=mE(),S7=yE(),T7=vE(),w7=bE(),x7=kE(),E7=SE(),A7=TE(),O7=wE(),N7=xE(),P7=EE(),C7=AE(),L7=OE(),q7=NE(),Cs=PE(),I7=CE();ed.builtinTags={assign:y7.assignTag,block:S7.blockTag,break:L7.breakTag,capture:A7.captureTag,case:g7.caseTag,content_for:k7.contentForTag,continue:q7.continueTag,cycle:v7.cycleTag,decrement:E7.decrementTag,echo:_7.echoTag,for:qE.forTag,form:w7.formTag,if:LE.ifTag,ifchanged:C7.ifchangedTag,include:IE.includeTag,increment:x7.incrementTag,layout:O7.layoutTag,liquid:I7.liquidTag,paginate:T7.paginateTag,partial:P7.partialTag,render:IE.renderTag,section:b7.sectionTag,sections:N7.sectionsTag,tablerow:qE.tablerowTag,unless:LE.unlessTag,comment:Cs.commentRaw,doc:Cs.docRaw,javascript:Cs.javascriptRaw,raw:Cs.rawRaw,schema:Cs.schemaRaw,style:Cs.styleRaw,stylesheet:Cs.stylesheetRaw}});var Jr=x(Ti=>{"use strict";d();Object.defineProperty(Ti,"__esModule",{value:!0});Ti.Environment=Ti.isStructuralEndTag=Ti.TagKind=void 0;var ME=De();Object.defineProperty(Ti,"TagKind",{enumerable:!0,get:function(){return ME.TagKind}});Object.defineProperty(Ti,"isStructuralEndTag",{enumerable:!0,get:function(){return ME.isStructuralEndTag}});var M7=De(),R7=td(),k_=class e{builtins;custom;registryVersion=0;rawTagStates;static _default;constructor(t={}){this.builtins=new Map(Object.entries(t)),this.custom=new Map}tagForName(t){return this.custom.get(t)??this.builtins.get(t)}registerTag(t,n){let r=n.kind===M7.TagKind.Raw?JSON.stringify([!!n.parseLiquidInBody,n.body.delimiter,n.body.sameName,n.body.closesInLiquidTag,n.body.opaque]):void 0;this.custom.get(t)===n&&this.rawTagStates?.get(t)===r||(this.custom.set(t,n),r!==void 0?(this.rawTagStates??=new Map).set(t,r):this.rawTagStates?.delete(t),this.registryVersion++)}get tagRegistryVersion(){return this.registryVersion}usesBuiltinTags(){return this===e._default&&this.custom.size===0&&this.tagForName===e.prototype.tagForName}static default(){return e._default||(e._default=new e(R7.builtinTags)),e._default}static resetDefault(){e._default=void 0}};Ti.Environment=k_});var gn=x(co=>{"use strict";d();Object.defineProperty(co,"__esModule",{value:!0});co.TokenType=void 0;co.tokenize=B7;co.tokenizeWithoutFastPath=F7;var jE=Gr(),nd=Gc(),Ls=Jr(),rd=/\{%-?\s*(raw|comment|doc|schema|javascript|stylesheet|style)(?=\s|-?%})/g,S_=/\{[{%]|<|-->/g,T_=/\{[{%]/g,D7=/["{]/g,j7=/['{]/g,le;(function(e){e.Text="Text",e.LiquidTagOpen="LiquidTagOpen",e.LiquidTagClose="LiquidTagClose",e.LiquidVariableOutputOpen="LiquidVariableOutputOpen",e.LiquidVariableOutputClose="LiquidVariableOutputClose",e.HtmlTagOpen="HtmlTagOpen",e.HtmlCloseTagOpen="HtmlCloseTagOpen",e.HtmlTagClose="HtmlTagClose",e.HtmlSelfClose="HtmlSelfClose",e.HtmlCommentOpen="HtmlCommentOpen",e.HtmlCommentClose="HtmlCommentClose",e.HtmlDoctypeOpen="HtmlDoctypeOpen",e.HtmlEquals="HtmlEquals",e.HtmlQuoteOpen="HtmlQuoteOpen",e.HtmlQuoteClose="HtmlQuoteClose",e.YamlFrontmatter="YamlFrontmatter",e.EndOfInput="EndOfInput"})(le||(co.TokenType=le={}));function B7(e,t={}){if(t.builtinRawTags&&t.rawBodyEnds&&(t.rawBodyEnds=void 0),!e.length)return[{type:le.EndOfInput,start:0,end:0}];if(e[0]==="<"&&e[1]!=="!")return Is(e,t,oo);let n=e[1]==="%";if(!t.insideHtmlComment&&!t.insideQuotedAttribute&&!t.insideHtmlTag&&e[0]==="{"&&(e[1]==="{"||n)){let r=e[2]==="-"?3:2,i=e.indexOf(n?"%}":"}}",r);if((i===-1||i+2===e.length)&&(!n||!t.rawBodyRule&&(!t.rawTags||t.builtinRawTags)||i===-1)){let s=i===-1?e.length:i>r&&e[i-1]==="-"?i-1:i,a=[{type:n?le.LiquidTagOpen:le.LiquidVariableOutputOpen,start:0,end:r}];return s>r&&a.push({type:le.Text,start:r,end:s}),i!==-1&&a.push({type:n?le.LiquidTagClose:le.LiquidVariableOutputClose,start:s,end:i+2}),a.push({type:le.EndOfInput,start:e.length,end:e.length}),a}return V7(e,t,i)}if(!t.rawText&&!t.insideHtmlComment&&!t.insideQuotedAttribute&&!t.insideHtmlTag&&e.startsWith("<!--")&&e[4]!==">"&&!e.startsWith("->",4)&&e.indexOf("-->",4)===e.length-3&&e.indexOf("--!>",4)===-1&&e.indexOf("<",4)===-1&&e.indexOf("{",4)===-1){let r=e.length-3,i=[{type:le.HtmlCommentOpen,start:0,end:4}];return r>4&&i.push({type:le.Text,start:4,end:r}),i.push({type:le.HtmlCommentClose,start:r,end:e.length}),i.push({type:le.EndOfInput,start:e.length,end:e.length}),i}if(!t.insideHtmlComment&&!t.insideQuotedAttribute&&!t.insideHtmlTag&&e[0]!=="{"&&e[0]!=="<"&&e[0]!=="-"){let r=t.rawText?T_:S_;r.lastIndex=0;let i=r.exec(e);return i?Is(e,t,oo,[{type:le.Text,start:0,end:i.index}],i.index):[{type:le.Text,start:0,end:e.length},{type:le.EndOfInput,start:e.length,end:e.length}]}return Is(e,t,oo)}function F7(e,t={}){return Is(e,t,(n,r)=>r)}function V7(e,t,n){let r=[],i=0,s=-1,a="",o=0;for(;i<e.length;){let c=e[o+1]==="%";i=o+(e[o+2]==="-"?3:2);let l=o===0?n:e.indexOf(c?"%}":"}}",i),f;if(c&&t.rawTags&&t.builtinRawTags){if(s<o){rd.lastIndex=o;let v=rd.exec(e);s=v?.index??1/0,a=v?.[1]??""}if(s===o){let v=t.rawTags.tagForName(a);if(v?.kind===Ls.TagKind.Raw&&!v.parseLiquidInBody&&l!==-1&&(f=(0,nd.findRawBodyEnd)(e,l+2,a,v.body,b=>{let _=t.rawTags.tagForName(b);return _?.kind===Ls.TagKind.Raw?_.body:void 0})??void 0),!f)return Is(e,t,oo,r,o);s=f.tagEnd-1}}r.push({type:c?le.LiquidTagOpen:le.LiquidVariableOutputOpen,start:o,end:i});let m=l===-1?e.length:l>i&&e[l-1]==="-"?l-1:l;if(i<m&&r.push({type:le.Text,start:i,end:m}),l===-1)break;let p={type:c?le.LiquidTagClose:le.LiquidVariableOutputClose,start:m,end:l+2};if(r.push(p),c&&(t.rawBodyRule||t.rawTags&&!t.builtinRawTags)){let v;if(t.rawBodyRule)v=(0,nd.liquidTagTokenName)(e.slice(o,l+2));else{let k=e.slice(o+(e[o+2]==="-"?3:2),m).trim(),w=k.search(/\s/);v=w===-1?k:k.slice(0,w)}let b=v===void 0?void 0:t.rawTags?.tagForName(v),_=v===void 0?void 0:t.rawBodyRule?.(v)??(b?.kind===Ls.TagKind.Raw?b.body:void 0);if(_)return Is(e,t,oo,r,l+2,{start:o,name:v,rule:_,definition:b})}if(f&&((t.rawBodyEnds??=[])[r.length-1]=f),i=f?.tagEnd??l+2,i===e.length)break;if(e[i]==="{"&&(e[i+1]==="{"||e[i+1]==="%")){o=i;continue}S_.lastIndex=i;let g=S_.exec(e);if(o=g?.index??e.length,i<o&&r.push({type:le.Text,start:i,end:o}),!g)break;if(g[0]!=="{{"&&g[0]!=="{%")return Is(e,t,oo,r,o)}return r.push({type:le.EndOfInput,start:e.length,end:e.length}),r}function Is(e,t,n,r=[],i=0,s){let a=[],o=we.Default,c=i,l=-1;i>0&&r[r.length-1]?.type===le.Text&&(l=r.pop().start);let f=e,m,p=-1,g=-1,v="",b,_=!1,k="",w=-1,T=-1,y=!1,A=0,N,O="";t.insideHtmlComment?o=we.HtmlComment:t.insideQuotedAttribute?(k=t.insideQuotedAttribute,a.push(we.HtmlTag),o=we.QuotedValue):t.insideHtmlTag?o=we.HtmlTag:t.rawText&&(o=we.RawText);function q(z){let de=c+z;return de<f.length?e[de]:""}function j(z){return f.startsWith(z,c)}function M(){l!==-1&&(r.push({type:le.Text,start:l,end:c}),l=-1)}function C(z,de){M(),r.push({type:z,start:c,end:c+de}),c+=de}function L(z){a.push(o),o=z}function V(){o=a.length>0?a.pop():we.Default}function $(){l===-1&&(l=c)}if(c===0&&!t.skipFrontmatter&&(j(`---
|
|
24
|
+
`)||j(`---\r
|
|
25
|
+
`))){let z=e.indexOf(`
|
|
26
|
+
`,0)+1,de=e.indexOf(`
|
|
27
|
+
---`,z);if(de!==-1){let pe=de+4;pe<e.length&&e[pe]==="\r"&&pe++,pe<e.length&&e[pe]===`
|
|
28
|
+
`&&pe++,r.push({type:le.YamlFrontmatter,start:0,end:pe}),c=pe}}function I(){let z=f[c+1];return z==="{"?(C(le.LiquidVariableOutputOpen,f[c+2]==="-"?3:2),L(we.LiquidVariableOutput),!0):z==="%"?(T=c,C(le.LiquidTagOpen,f[c+2]==="-"?3:2),L(we.LiquidTag),!0):!1}function B(z){if(!t.rawTags&&!t.rawBodyRule||y&&t.parseHtml!==!1||c<=p)return;let de;if(z)de=z.name;else if(t.builtinRawTags){if(g<T){rd.lastIndex=T;let pn=rd.exec(e);g=pn?.index??1/0,v=pn?.[1]??""}if(g!==T)return;g=T+1,de=v}else if(t.rawTags){let pn=r[r.length-1],Hr=e.slice(T+(e[T+2]==="-"?3:2),pn.start).trim(),bs=Hr.search(/\s/);de=bs===-1?Hr:Hr.slice(0,bs)}else de=(0,nd.liquidTagTokenName)(e.slice(T,c));if(de===void 0)return;let pe=z?.definition??t.rawTags?.tagForName(de),dn=z?.rule??t.rawBodyRule?.(de)??(pe?.kind===Ls.TagKind.Raw?pe.body:void 0);if(!dn)return;let Ur=t.rawBodyRule??(pn=>{let Hr=t.rawTags?.tagForName(pn);return Hr?.kind===Ls.TagKind.Raw?Hr.body:void 0});if(m?.get(de)?.has(f.length))return;let gt=(0,nd.findRawBodyEnd)(f,c,de,dn,Ur);if(!gt){m??=new Map;let pn=m.get(de)??new Set;pn.add(f.length),m.set(de,pn);return}if(t.builtinRawTags&&((t.rawBodyEnds??=[])[r.length-1]=gt,pe?.kind===Ls.TagKind.Raw&&!pe.parseLiquidInBody)){c=gt.tagEnd;return}T_.lastIndex=c;let Ft=T_.exec(e);if(!Ft||Ft.index+2>gt.tagStart){c<gt.tagStart&&C(le.Text,gt.tagStart-c);return}let vs=e.slice(0,gt.tagStart),Ic=Ft.index+(vs[Ft.index+2]==="-"?3:2);if(Ft[0]==="{{"&&vs.indexOf("}}",Ic)===-1){c<Ft.index&&C(le.Text,Ft.index-c),C(le.LiquidVariableOutputOpen,Ic-Ft.index),c<gt.tagStart&&C(le.Text,gt.tagStart-c);return}(b??=[]).push({end:gt,mode:o,depth:a.length,quote:k,rawTextTag:O}),pe?.kind===Ls.TagKind.Raw&&!pe.parseLiquidInBody&&(p=gt.tagStart),f=vs,o=we.RawText,O=""}function U(){if(!b)return!1;for(;c>=f.length;){let z=b.pop();if(!z)return!1;M(),o=z.mode,a.length=z.depth,k=z.quote,O=z.rawTextTag;let de=b[b.length-1];f=de?e.slice(0,de.end.tagStart):e}return!0}function J(z){let de=/^(svg|script|style)(?=[\s/>]|$)/i.exec(e.slice(z,z+7));return de?de[1].toLowerCase():/^svg\{/i.test(e.slice(z,z+4))?"svg":void 0}function Q(z){return/^<\/svg\s*>/i.test(e.slice(z,z+64))}function Y(z){if(O===""||e.slice(z+2,z+2+O.length).toLowerCase()!==O)return!1;let pe=z+2+O.length;for(;pe<e.length&&/\s/.test(e[pe]);)pe++;return e[pe]===">"}function he(){let z=N;N=void 0,z==="svg"?A++:z!==void 0&&!A&&o===we.Default&&(O=z,L(we.RawText))}for(s&&(T=s.start,B(s));c<f.length||U();)switch(o){case we.LiquidTag:{j("-%}")?(C(le.LiquidTagClose,3),V(),B()):j("%}")?(C(le.LiquidTagClose,2),V(),B()):($(),c=n(f,c+1,o,k,_));break}case we.LiquidVariableOutput:{j("-}}")?(C(le.LiquidVariableOutputClose,3),V()):j("}}")?(C(le.LiquidVariableOutputClose,2),V()):($(),c=n(f,c+1,o,k,_));break}case we.Default:{let z=f.charCodeAt(c);if(z===Mn&&I())continue;if(z===wi&&j("<!--")&&A){C(le.HtmlCommentOpen,4);continue}if(z===qs&&j("-->")&&A){C(le.HtmlCommentClose,3);continue}if(z===wi&&j("<!--")){C(le.HtmlCommentOpen,4),L(we.HtmlComment),w=c;continue}if(z===wi&&j("<!")){y=!0,C(le.HtmlDoctypeOpen,2),L(we.HtmlTag);continue}if(z===wi&&j("</")&&DE(e.charCodeAt(c+2))){A&&Q(c)&&A--,C(le.HtmlCloseTagOpen,2),L(we.HtmlTag);continue}if(z===wi&&DE(e.charCodeAt(c+1))){N=J(c+1),C(le.HtmlTagOpen,1),L(we.HtmlTag);continue}$(),c=n(f,c+1,o,k,_);break}case we.HtmlTag:{let z=f.charCodeAt(c);if(z===Mn&&I())continue;if(z===VE&&j("/>")){C(le.HtmlSelfClose,2),V(),N=void 0;continue}if(z===w_){C(le.HtmlTagClose,1),V(),y=!1,he();continue}if(z===$E){C(le.HtmlEquals,1);continue}if(z===BE||z===FE||HE(z)){k=q(0),C(le.HtmlQuoteOpen,1),L(we.QuotedValue);continue}let de=UE(z);l!==-1&&de!==_&&M(),l===-1&&(_=de),$(),c=n(f,c+1,o,k,_);break}case we.QuotedValue:{let z=f.charCodeAt(c);if(z===Mn&&I())continue;if(z===k.charCodeAt(0)||z===zE(k).charCodeAt(0)){C(le.HtmlQuoteClose,1),V();continue}$(),c=n(f,c+1,o,k,_);break}case we.HtmlComment:{let z=f.charCodeAt(c);if(z===Mn&&I())continue;if(c===w){if(z===w_){C(le.HtmlCommentClose,1),V();continue}if(z===qs&&j("->")){C(le.HtmlCommentClose,2),V();continue}}if(z===qs&&j("-->")){C(le.HtmlCommentClose,3),V();continue}if(z===qs&&j("--!>")){C(le.HtmlCommentClose,4),V();continue}$(),c=n(f,c+1,o,k,_);break}case we.RawText:{let z=f.charCodeAt(c);if(z===Mn&&I())continue;if(z===wi&&j("</")&&Y(c)){V(),O="",C(le.HtmlCloseTagOpen,2),L(we.HtmlTag);continue}$(),c=n(f,c+1,o,k,_);break}default:(0,jE.assertNever)(o)}return M(),r.push({type:le.EndOfInput,start:e.length,end:e.length}),r}function oo(e,t,n,r,i){switch(n){case we.Default:return $7(e,t);case we.HtmlTag:return H7(e,t,i);case we.QuotedValue:return z7(e,t,r);case we.LiquidTag:return RE(e,t,"%}");case we.LiquidVariableOutput:return RE(e,t,"}}");case we.RawText:return W7(e,t);case we.HtmlComment:return U7(e,t);default:return(0,jE.assertNever)(n)}}var BE=34,FE=39,qs=45,VE=47,wi=60,$E=61,w_=62,Mn=123;function $7(e,t){for(let n=t;n<e.length;n++){let r=e.charCodeAt(n);if(r===Mn||r===wi||r===qs)return n}return e.length}function U7(e,t){for(let n=t;n<e.length;n++){let r=e.charCodeAt(n);if(r===Mn||r===qs)return n}return e.length}function H7(e,t,n){for(let r=t;r<e.length;r++){let i=e.charCodeAt(r);if(i===Mn||i===VE||i===w_||i===$E||i===BE||i===FE||HE(i)||UE(i)!==n)return r}return e.length}function z7(e,t,n){let r=n.charCodeAt(0),i=zE(n).charCodeAt(0),s=Math.min(t+16,e.length);for(let o=t;o<s;o++){let c=e.charCodeAt(o);if(c===Mn||c===r||c===i)return o}if(s===e.length)return s;let a=n==='"'?D7:n==="'"?j7:void 0;if(a)return a.lastIndex=s,a.exec(e)?.index??e.length;for(let o=s;o<e.length;o++){let c=e.charCodeAt(o);if(c===Mn||c===r||c===i)return o}return e.length}function W7(e,t){for(let n=t;n<e.length;n++){let r=e.charCodeAt(n);if(r===Mn||r===wi)return n}return e.length}function RE(e,t,n){let r=e.indexOf(n,t);return r===-1?e.length:r>t&&e.charCodeAt(r-1)===qs?r-1:r}function DE(e){return e>=97&&e<=122||e>=65&&e<=90||e===Mn}function UE(e){return e<160?e===32||e>=9&&e<=13:e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}var we;(function(e){e.Default="Default",e.HtmlTag="HtmlTag",e.QuotedValue="QuotedValue",e.LiquidTag="LiquidTag",e.LiquidVariableOutput="LiquidVariableOutput",e.RawText="RawText",e.HtmlComment="HtmlComment"})(we||(we={}));function HE(e){return e===8216||e===8217||e===8220||e===8221}function zE(e){switch(e){case"\u201C":return"\u201D";case"\u201D":return"\u201C";case"\u2018":return"\u2019";case"\u2019":return"\u2018";default:return e}}});var Zn=x(uo=>{"use strict";d();var G7=uo&&uo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(uo,"__esModule",{value:!0});uo.LiquidHTMLASTParsingError=void 0;var J7=G7(Jy()),x_=class extends SyntaxError{loc;unclosed;constructor(t,n,r,i,s){super(t),this.name="LiquidHTMLParsingError",this.unclosed=s??null;let a=(0,J7.default)(n),o=Math.max(0,n.length-1),c=a.fromIndex(Math.min(Math.max(r,0),o)),l=a.fromIndex(Math.min(Math.max(i,0),o));this.loc={start:{line:c?.line??1,column:c?.col??1},end:{line:l?.line??1,column:l?.col??1}}}};uo.LiquidHTMLASTParsingError=x_});var WE=x(id=>{"use strict";d();Object.defineProperty(id,"__esModule",{value:!0});id.ParserBase=void 0;var Kt=gn(),K7=Zn(),Y7=Jr(),E_=class{tokenizeOptions;tokens;source;p;rawBodyEnds;constructor(t,n,r,i){this.tokenizeOptions=r,this.tokens=t,this.source=n,this.p=0,i&&(this.rawBodyEnds=i),r?.rawTags&&(this.rawTagVersion=r.rawTags.tagRegistryVersion,this.inspectedRawBodyEnd=0,this.rawTagValidUntil=n.length)}consume(t){let n=this.tokens[this.p];if(n.type!==t)throw new K7.LiquidHTMLASTParsingError(`Expected ${t} but got ${n.type}`,this.source,n.start,n.end);return this.p++,n}accept(t){return this.tokens[this.p].type===t?this.tokens[this.p++]:null}check(t,n=0){let r=this.p+n;return r<this.tokens.length&&this.tokens[r].type===t}peek(){return this.tokens[this.p]}advance(){return this.tokens[this.p++]}isAtEnd(){return this.tokens[this.p].type===Kt.TokenType.EndOfInput}getSource(){return this.source}tokenAt(t){return this.tokens[t]}isTolerant(){return!1}hasToken(t){return t<this.tokens.length}tokenCount(){return this.tokens.length}getPosition(){return this.p}rawBodyEndFor(t){if(this.tokens[this.p-1]===t)return this.rawBodyEnds?.[this.p-1]}setPosition(t){this.p=t}seekToSourceOffset(t){if(this.tokens[this.p]?.start===t&&this.tokens[this.p-1]?.start!==t)return;if(this.tokens[this.p+3]?.start===t&&this.tokens[this.p+2].start<t){this.p+=3;return}let n=0,r=this.tokens.length;for(;n<r;){let i=n+(r-n>>>1);this.tokens[i].start<t?n=i+1:r=i}this.p=n}ensureRawBoundary(t,n){this.tokenizeOptions?.rawTags&&(this.inspectedRawBodyEnd=Math.max(n,this.inspectedRawBodyEnd),!(this.rawTagVersion===this.tokenizeOptions.rawTags.tagRegistryVersion&&t<this.rawTagValidUntil&&n<=this.rawTagValidUntil)&&(this.rawTagValidUntil=this.recoverRawBoundaries(t,n),this.rawTagVersion=this.tokenizeOptions.rawTags.tagRegistryVersion))}retokenizeRawText(t,n,r){this.rawBodyEnds=void 0;let i=this.tokens.filter(l=>l.end<=t),s=this.tokenizeSlice(t,n,{rawText:!0}),a=this.tokens.findIndex(l=>l.type===Kt.TokenType.HtmlTagClose&&l.end===r),c=a!==-1&&this.tokens[a+1]?.start===r?[...this.tokenizeSlice(n,r),...this.tokens.slice(a+1)]:this.tokenizeSlice(n,this.source.length,{},!0);this.tokens=[...i,...s,...c],this.p=i.length}tokenizeSlice(t,n,r={},i=!1){let s=(0,Kt.tokenize)(this.source.slice(t,n),{...this.tokenizeOptions??{rawTags:Y7.Environment.default(),parseHtml:!0},...r,skipFrontmatter:!0});i||s.pop();for(let a of s)a.start+=t,a.end+=t;return s}recoverRawBoundaries(t,n){this.rawBodyEnds=void 0,this.seekToSourceOffset(t);let r=this.tokens.slice(0,this.p),i=r.length-1,s=r[i]?.type===Kt.TokenType.HtmlTagClose?Kt.TokenType.HtmlTagOpen:Kt.TokenType.LiquidTagOpen;for(;i>0&&r[i].type!==s;)i--;let a=r.slice(0,i),o=!1,c=!1,l;for(let g of a)g.type===Kt.TokenType.HtmlCommentOpen?c=!0:g.type===Kt.TokenType.HtmlCommentClose&&(c=!1),g.type===Kt.TokenType.HtmlTagOpen||g.type===Kt.TokenType.HtmlCloseTagOpen||g.type===Kt.TokenType.HtmlDoctypeOpen?o=!0:g.type===Kt.TokenType.HtmlTagClose||g.type===Kt.TokenType.HtmlSelfClose?o=!1:g.type===Kt.TokenType.HtmlQuoteOpen?l=this.source[g.start]:g.type===Kt.TokenType.HtmlQuoteClose&&(l=void 0);let f=this.rawTextBound!==void 0,m=Math.min(this.rawTextBound??this.source.length,this.inspectedRawBodyEnd>n?this.inspectedRawBodyEnd:this.source.length),p=r[i]?.start??t;return this.tokens=a.concat(this.tokenizeSlice(p,m,{insideHtmlTag:!f&&o,insideQuotedAttribute:f?void 0:l,rawText:f,insideHtmlComment:!f&&c},m===this.source.length),m===this.source.length?[]:this.tokens.filter(g=>g.start>=m)),this.seekToSourceOffset(t),m}};id.ParserBase=E_});var br=x(Xe=>{"use strict";d();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.makeDocumentNode=Q7;Xe.envelopeFromTokens=X7;Xe.makeLiquidTagBaseCase=Z7;Xe.makeLiquidTagNamed=e9;Xe.makeLiquidBranchUnnamed=t9;Xe.makeLiquidBranchNamed=n9;Xe.makeLiquidRawTag=r9;Xe.makeLiquidVariableOutput=i9;Xe.makeTextNode=s9;Xe.makeRawMarkup=a9;Xe.makeYamlFrontmatter=o9;Xe.makeHtmlElement=c9;Xe.makeHtmlVoidElement=u9;Xe.makeHtmlSelfClosingElement=l9;Xe.makeHtmlRawNode=f9;Xe.makeHtmlComment=d9;Xe.makeHtmlDoctype=p9;Xe.makeAttrDoubleQuoted=h9;Xe.makeAttrSingleQuoted=m9;Xe.makeAttrUnquoted=g9;Xe.makeAttrEmpty=y9;Xe.makeHtmlDanglingMarkerClose=_9;var ct=Qe();function Q7(e,t){return{type:ct.NodeTypes.Document,children:e,name:"#document",_source:t,position:{start:0,end:t.length},source:t}}function X7(e,t,n){let r=n.slice(e.end,t.start),i=r.trimStart(),s=r.length-i.length,a=i.search(/\s/),o=a===-1?i.trim():i.slice(0,a),l=s+o.length,f=r.slice(l),m=l;for(;m<r.length&&(r[m]===" "||r[m]===" ");)m++;let p=e.end+m,g=e.end-e.start>2?"-":"",v=t.end-t.start>2?"-":"";return{tagName:o,markupString:f,markupOffset:p,markupEnd:t.start,whitespaceStart:g,whitespaceEnd:v,blockStartPosition:{start:e.start,end:t.end},source:n}}function Z7(e,t,n,r,i,s=!1){let a=n?n.end:e.blockStartPosition.end;return{type:ct.NodeTypes.LiquidTag,name:e.tagName,markup:s?e.markupString:e.markupString.trim(),children:t,whitespaceStart:e.whitespaceStart,whitespaceEnd:e.whitespaceEnd,delimiterWhitespaceStart:r?.start,delimiterWhitespaceEnd:r?.end,blockStartPosition:e.blockStartPosition,blockEndPosition:n,markupPosition:{start:e.markupOffset,end:e.markupEnd},position:{start:e.blockStartPosition.start,end:a},source:e.source,reason:i}}function e9(e,t,n,r,i){let s=r?r.end:e.blockStartPosition.end;return{type:ct.NodeTypes.LiquidTag,name:e.tagName,markup:t,children:n,whitespaceStart:e.whitespaceStart,whitespaceEnd:e.whitespaceEnd,delimiterWhitespaceStart:i?.start,delimiterWhitespaceEnd:i?.end,blockStartPosition:e.blockStartPosition,blockEndPosition:r,markupPosition:{start:e.markupOffset,end:e.markupEnd},position:{start:e.blockStartPosition.start,end:s},source:e.source}}function t9(e,t){return{type:ct.NodeTypes.LiquidBranch,name:null,markup:"",children:[],whitespaceStart:"",whitespaceEnd:"",markupPosition:{start:e,end:e},blockStartPosition:{start:e,end:e},blockEndPosition:{start:-1,end:-1},position:{start:e,end:e},source:t}}function n9(e,t){return{type:ct.NodeTypes.LiquidBranch,name:e.tagName,markup:t,children:[],whitespaceStart:e.whitespaceStart,whitespaceEnd:e.whitespaceEnd,markupPosition:{start:e.markupOffset,end:e.markupEnd},blockStartPosition:e.blockStartPosition,blockEndPosition:{start:-1,end:-1},position:{start:e.blockStartPosition.start,end:e.blockStartPosition.end},source:e.source}}function r9(e,t,n,r){let i=e.markupEnd;for(;i>e.markupOffset&&(e.source[i-1]===" "||e.source[i-1]===" ");)i--;return{type:ct.NodeTypes.LiquidRawTag,name:e.tagName,markup:e.markupString.trim(),markupPosition:{start:e.markupOffset,end:i},body:t,whitespaceStart:e.whitespaceStart,whitespaceEnd:e.whitespaceEnd,delimiterWhitespaceStart:r.start,delimiterWhitespaceEnd:r.end,blockStartPosition:e.blockStartPosition,blockEndPosition:n,position:{start:e.blockStartPosition.start,end:n.end},source:e.source}}function i9(e,t,n,r){return{type:ct.NodeTypes.LiquidVariableOutput,markup:n,whitespaceStart:e.end-e.start>2?"-":"",whitespaceEnd:t.end-t.start>2?"-":"",markupPosition:{start:e.end,end:t.start},position:{start:e.start,end:t.end},source:r}}function s9(e,t,n,r){return{type:ct.NodeTypes.TextNode,value:e,position:{start:t,end:n},source:r}}function a9(e,t,n,r,i,s){return{type:ct.NodeTypes.RawMarkup,kind:e,value:t,nodes:n,position:{start:r,end:i},source:s}}function o9(e,t,n,r){return{type:ct.NodeTypes.YAMLFrontmatter,body:e,position:{start:t,end:n},source:r}}function c9(e,t,n,r,i,s){return{type:ct.NodeTypes.HtmlElement,name:e,attributes:t,children:n,blockStartPosition:r,blockEndPosition:i,position:{start:r.start,end:i.end},source:s}}function u9(e,t,n,r){return{type:ct.NodeTypes.HtmlVoidElement,name:e,attributes:t,blockStartPosition:n,position:n,source:r}}function l9(e,t,n,r){return{type:ct.NodeTypes.HtmlSelfClosingElement,name:e,attributes:t,blockStartPosition:n,position:n,source:r}}function f9(e,t,n,r,i,s){return{type:ct.NodeTypes.HtmlRawNode,name:e,attributes:t,body:n,blockStartPosition:r,blockEndPosition:i,position:{start:r.start,end:i.end},source:s}}function d9(e,t,n,r){return{type:ct.NodeTypes.HtmlComment,body:r.slice(t.end,n.start).trim(),children:e,blockStartPosition:t,blockEndPosition:n,position:{start:t.start,end:n.end},source:r}}function p9(e,t,n,r){return{type:ct.NodeTypes.HtmlDoctype,legacyDoctypeString:e,position:{start:t,end:n},source:r}}function h9(e,t,n,r,i,s){return{type:ct.NodeTypes.AttrDoubleQuoted,name:e,value:t,attributePosition:n,position:{start:r,end:i},source:s}}function m9(e,t,n,r,i,s){return{type:ct.NodeTypes.AttrSingleQuoted,name:e,value:t,attributePosition:n,position:{start:r,end:i},source:s}}function g9(e,t,n,r,i,s){return{type:ct.NodeTypes.AttrUnquoted,name:e,value:t,attributePosition:n,position:{start:r,end:i},source:s}}function y9(e,t,n,r){return{type:ct.NodeTypes.AttrEmpty,name:e,position:{start:t,end:n},source:r}}function _9(e,t,n,r){return{type:ct.NodeTypes.HtmlDanglingMarkerClose,name:e,blockStartPosition:{start:t,end:n},position:{start:t,end:n},source:r}}});var lo=x(Kr=>{"use strict";d();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.ChildFilterMode=void 0;Kr.filterChildren=b9;Kr.mergeAdjacentTextNodes=ad;Kr.mergeAdjacentTextNodesTrimmed=QE;Kr.mergeAdjacentTextNodesStripEdges=XE;Kr.compoundNamesMatch=k9;var sd=Qe(),YE=br(),v9=Gr(),tu;(function(e){e[e.Syntactic=0]="Syntactic",e[e.Preserve=1]="Preserve",e[e.StripEdges=2]="StripEdges"})(tu||(Kr.ChildFilterMode=tu={}));function b9(e,t,n){switch(e){case tu.Syntactic:return QE(t,n);case tu.Preserve:return ad(t,n);case tu.StripEdges:return XE(t,n);default:(0,v9.assertNever)(e)}}function Ms(e){return e.type===sd.NodeTypes.TextNode}function GE(e){return e.type===sd.NodeTypes.LiquidVariableOutput}function ad(e,t){if(e.length<=1)return e;let n=[],r=-1;for(let i=0;i<=e.length;i++){let s=e[i],a=r!==-1,o=s!==void 0&&Ms(s);if(o&&!a){r=i;continue}if(!o&&a){let c=i-1;if(r===c)n.push(e[r]);else{let l=e[r],f=e[c];n.push((0,YE.makeTextNode)(t.slice(l.position.start,f.position.end),l.position.start,f.position.end,t))}r=-1}s!==void 0&&!o&&n.push(s)}return n}function QE(e,t){let n=ad(e,t);if(n.length===0)return n;let r=[];for(let i=0;i<n.length;i++){let s=n[i];if(!Ms(s)){r.push(s);continue}let a=s.value,o=s.position.start,c=s.position.end,l=n[i-1];if(!l||!Ms(l)){let m=a.trimStart(),p=a.length-m.length;a=m,o+=p}let f=n[i+1];if(!f||!Ms(f)){let m=a.trimEnd(),p=a.length-m.length;a=m,c-=p}a.length>0&&r.push((0,YE.makeTextNode)(a,o,c,t))}return r}function XE(e,t){let n=ad(e,t),r=0,i=n.length;for(;r<i&&JE(n[r]);)r++;for(;i>r&&JE(n[i-1]);)i--;return r===0&&i===n.length?n:n.slice(r,i)}function JE(e){return Ms(e)&&/^\s+$/.test(e.value)}function k9(e,t){if(KE(e)&&KE(t))return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.type!==i.type)return!1;if(Ms(r)&&Ms(i)){if(r.value!==i.value)return!1;continue}if(GE(r)&&GE(i)){let s=typeof r.markup=="string"?r.markup:r.markup.rawSource,a=typeof i.markup=="string"?i.markup:i.markup.rawSource;if(s!==a)return!1;continue}if(r.type===i.type&&"source"in r&&"source"in i){let s=r.source.slice(r.position.start,r.position.end),a=i.source.slice(i.position.start,i.position.end);if(s!==a)return!1;continue}return!1}return!0}function KE(e){return e.length===1&&(e[0].type===sd.NodeTypes.LiquidTag||e[0].type===sd.NodeTypes.LiquidRawTag)}});var eA=x(Et=>{"use strict";d();Object.defineProperty(Et,"__esModule",{value:!0});Et.COMPARISON_OPERATORS=Et.EQUALITY_OPERATORS=Et.LOGICAL_OPERATORS=Et.ComparisonOperator=Et.EqualityOperator=Et.LogicalOperator=void 0;Et.isBinaryExpression=A_;Et.adaptConditional=od;Et.adaptComplex=w9;var er=Qe(),ZE=Gr(),nu;(function(e){e.And="and",e.Or="or"})(nu||(Et.LogicalOperator=nu={}));var ru;(function(e){e.Equal="==",e.NotEqual="!="})(ru||(Et.EqualityOperator=ru={}));var xi;(function(e){e.LessThan="<",e.GreaterThan=">",e.LessThanOrEqual="<=",e.GreaterThanOrEqual=">=",e.Contains="contains"})(xi||(Et.ComparisonOperator=xi={}));Et.LOGICAL_OPERATORS=new Set(Object.values(nu));Et.EQUALITY_OPERATORS=new Set(Object.values(ru));Et.COMPARISON_OPERATORS=new Set(Object.values(xi));function A_(e){return"kind"in e}function S9(e){switch(e){case nu.And:return"and";case nu.Or:return"or";default:return(0,ZE.assertNever)(e)}}function T9(e){switch(e){case ru.Equal:return er.Comparators.EQUAL;case ru.NotEqual:return er.Comparators.NOT_EQUAL;case xi.LessThan:return er.Comparators.LESS_THAN;case xi.GreaterThan:return er.Comparators.GREATER_THAN;case xi.LessThanOrEqual:return er.Comparators.LESS_THAN_OR_EQUAL;case xi.GreaterThanOrEqual:return er.Comparators.GREATER_THAN_OR_EQUAL;case xi.Contains:return er.Comparators.CONTAINS;default:return e}}function od(e){if(!A_(e))return e;switch(e.kind){case"logical":{let t=od(e.right);return t.type===er.NodeTypes.LogicalExpression&&(t.position={...t.position,start:e.opStart}),{type:er.NodeTypes.LogicalExpression,relation:S9(e.op),left:od(e.left),right:t,position:e.position,source:e.source}}case"comparison":return{type:er.NodeTypes.Comparison,comparator:T9(e.op),left:e.left,right:e.right,position:e.position,source:e.source};default:return(0,ZE.assertNever)(e)}}function w9(e){return A_(e)?{type:er.NodeTypes.BooleanExpression,condition:od(e),position:e.position,source:e.source}:e}});var Rs=x(cd=>{"use strict";d();Object.defineProperty(cd,"__esModule",{value:!0});cd.MarkupParser=void 0;var Ei=Zn(),x9=fo(),iu=eA(),dt=Qe(),H=xt(),N_=class e{static WORD_SEGMENT_RE=/[\w-]+\??/y;tokens;source;p;markupStart;markupEnd;lax;tolerant;inCondition;constructor(t,n,r,i){this.tokens=t,this.source=n,this.p=0,this.markupStart=r??t[0]?.start??0,this.markupEnd=i??this.computeLastTokenEnd(),this.lax=!1,this.tolerant=!1,this.inCondition=!1}enableLax(){return this.lax=!0,this}isLax(){return this.lax}enableTolerant(){return this.tolerant=!0,this}isTolerant(){return this.tolerant}consumeRawUntil(t){let n=this.peek().start,r=n;for(;!this.isAtEnd()&&this.peek().type!==t;)r=this.peek().end,this.p+=1;return this.source.slice(n,r).trim()}discardRemaining(){for(;!this.isAtEnd();)this.p+=1}discardTrailing(){this.lax&&this.discardRemaining()}atValueStart(){switch(this.peek().type){case H.MarkupTokenType.String:case H.MarkupTokenType.Number:case H.MarkupTokenType.Id:case H.MarkupTokenType.OpenSquare:case H.MarkupTokenType.OpenRound:return!0;case H.MarkupTokenType.Dash:return this.lax;default:return!1}}atArgumentStart(){switch(this.peek().type){case H.MarkupTokenType.String:case H.MarkupTokenType.Number:case H.MarkupTokenType.Id:case H.MarkupTokenType.OpenSquare:case H.MarkupTokenType.OpenRound:return!0;default:return!1}}openSquareContinuesLookup(t,n){return this.lax?!/\S/.test(this.source.slice(t,n.start)):!0}skipToNextPipe(){for(;!this.isAtEnd()&&!this.look(H.MarkupTokenType.Pipe);)this.p+=1}consume(t){let n=this.tokens[this.p];if(n.type!==t)throw new Ei.LiquidHTMLASTParsingError(`Expected ${t} but found ${n.type} (${n.value})`,this.source,n.start,n.end);return this.p+=1,n}consumeOptional(t){let n=this.tokens[this.p];return n.type!==t?null:(this.p+=1,n)}look(t,n=0){let r=this.p+n;return r<0||r>=this.tokens.length?!1:this.tokens[r].type===t}peek(){return this.tokens[this.p]}id(t){let n=this.tokens[this.p];return n.type!==H.MarkupTokenType.Id||n.value!==t?!1:(this.p+=1,!0)}isAtEnd(){return this.tokens[this.p].type===H.MarkupTokenType.EndOfString}eosStart(){return this.tokens[this.tokens.length-1].start}bodyContext(){for(;!this.isAtEnd();)this.p++;return{source:this.source,bodyStart:this.markupStart,bodyEnd:this.markupEnd}}remainingSource(){let t=this.tokens[this.p];if(t.type===H.MarkupTokenType.EndOfString)return"";let n=this.tokens[this.tokens.length-1];return this.source.slice(t.start,n.start).trim()}valueExpression(){let t=this.peek();switch(t.type){case H.MarkupTokenType.String:return this.p+=1,{type:dt.NodeTypes.String,single:t.value[0]==="'",value:t.value.slice(1,-1),position:{start:t.start,end:t.end},source:this.source};case H.MarkupTokenType.Number:{if(this.lax){let n=this.tokens[this.p+1];if(n&&n.type===H.MarkupTokenType.Id&&n.start===t.end)return this.p+=2,{type:dt.NodeTypes.VariableLookup,name:this.source.slice(t.start,n.end),lookups:[],position:{start:t.start,end:n.end},source:this.source};if(this.laxLookupSeparatorFollows(t.end))return this.variableLookup()}return this.p+=1,{type:dt.NodeTypes.Number,value:t.value,position:{start:t.start,end:t.end},source:this.source}}case H.MarkupTokenType.Id:{let n=this.tokens[this.p+1],r=n?.type===H.MarkupTokenType.OpenSquare&&this.openSquareContinuesLookup(t.end,n);return A9(t.value)&&!this.look(H.MarkupTokenType.Dot,1)&&!r&&!(this.lax&&this.laxLookupSeparatorFollows(t.end))?(this.p+=1,{type:dt.NodeTypes.LiquidLiteral,keyword:t.value,value:x9.LiquidLiteralValues[t.value],position:{start:t.start,end:t.end},source:this.source}):this.variableLookup()}case H.MarkupTokenType.OpenSquare:return this.variableLookup();case H.MarkupTokenType.Dot:if(this.lax){let n=this.tokens[this.p+1];if(n&&n.type===H.MarkupTokenType.Number&&n.start===t.end){let r=n.value.split(".")[0],i=n.end,s=2;if(!n.value.includes(".")){let a=this.tokens[this.p+s];for(;a&&a.start===i&&!a.value.includes(".")&&(a.type===H.MarkupTokenType.Id||a.type===H.MarkupTokenType.Dash||a.type===H.MarkupTokenType.Number);)r+=a.value,i=a.end,s+=1,a=this.tokens[this.p+s]}return this.p+=s,{type:dt.NodeTypes.VariableLookup,name:r,lookups:[],position:{start:t.start,end:i},source:this.source}}}throw new Ei.LiquidHTMLASTParsingError(`Expected expression but found ${t.type} (${t.value})`,this.source,t.start,t.end);case H.MarkupTokenType.OpenRound:{let n=this.consume(H.MarkupTokenType.OpenRound);if(this.lax&&!this.parenContainsRange()){let o=this.consumeRawUntil(H.MarkupTokenType.CloseRound);return this.consumeOptional(H.MarkupTokenType.CloseRound),this.discardRemaining(),{type:dt.NodeTypes.VariableLookup,name:o,lookups:[],position:{start:n.start,end:this.eosStart()},source:this.source}}let r=this.valueExpression();if(this.consume(H.MarkupTokenType.DotDot),this.lax)for(;this.look(H.MarkupTokenType.Dot)||this.look(H.MarkupTokenType.DotDot);)this.p+=1;let i=this.valueExpression(),s=this.lax?this.consumeOptional(H.MarkupTokenType.CloseRound):this.consume(H.MarkupTokenType.CloseRound),a=s?s.end:i.position.end;return{type:dt.NodeTypes.Range,start:r,end:i,position:{start:n.start,end:a},source:this.source}}case H.MarkupTokenType.Dash:if(this.lax)return this.p+=1,{type:dt.NodeTypes.VariableLookup,name:"-",lookups:[],position:{start:t.start,end:t.end},source:this.source};throw new Ei.LiquidHTMLASTParsingError(`Expected expression but found ${t.type} (${t.value})`,this.source,t.start,t.end);default:throw new Ei.LiquidHTMLASTParsingError(`Expected expression but found ${t.type} (${t.value})`,this.source,t.start,t.end)}}parenContainsRange(){let t=0;for(let n=this.p;n<this.tokens.length;n++){let r=this.tokens[n];if(r.type===H.MarkupTokenType.EndOfString)break;if(r.type===H.MarkupTokenType.OpenRound)t+=1;else if(r.type===H.MarkupTokenType.CloseRound){if(t===0)break;t-=1}else if(r.type===H.MarkupTokenType.DotDot&&t===0)return!0}return!1}variableLookup(){let t,n,r=this.peek();if(r.type===H.MarkupTokenType.Id){let c=this.consume(H.MarkupTokenType.Id);t=c.value,n=c.start}else if(r.type===H.MarkupTokenType.OpenSquare)t=null,n=r.start;else if(this.lax&&r.type===H.MarkupTokenType.Number&&this.laxLookupSeparatorFollows(r.end))this.p+=1,t=r.value,n=r.start;else throw new Ei.LiquidHTMLASTParsingError(`Expected identifier or [ but found ${r.type} (${r.value})`,this.source,r.start,r.end);let i=[],s=[],a=t!==null?this.tokens[this.p-1].end:n,o=null;for(;!this.isAtEnd();)if(this.consumeOptional(H.MarkupTokenType.Dot)){let c=this.consume(H.MarkupTokenType.Id);i.push({type:dt.NodeTypes.String,value:c.value,position:{start:c.start,end:c.end},source:this.source}),s.push("bareword"),a=c.end}else if(this.look(H.MarkupTokenType.OpenSquare)&&this.openSquareContinuesLookup(a,this.peek())){this.consume(H.MarkupTokenType.OpenSquare);let c=this.valueExpression(),l=this.lax?this.consumeOptional(H.MarkupTokenType.CloseSquare):this.consume(H.MarkupTokenType.CloseSquare);if(i.push(c),s.push("subscript"),a=l?l.end:c.position.end,this.lax&&!l&&!this.look(H.MarkupTokenType.Dot)&&!this.look(H.MarkupTokenType.OpenSquare))break}else if(this.lax&&!this.inCondition&&(o=this.tryConsumeLaxLookupSeparator(a)))i.push({type:dt.NodeTypes.String,value:o.value,position:{start:o.start,end:o.end},source:this.source}),s.push("bareword"),a=o.end;else break;if(this.lax&&t===null&&i.length===1&&i[0].type===dt.NodeTypes.VariableLookup&&i[0].name===null&&i[0].lookups.length===1){let c=i[0].lookupModes?.[0];return{type:dt.NodeTypes.VariableLookup,name:null,lookups:[i[0].lookups[0]],lookupModes:c?[c]:["subscript"],position:{start:n,end:a},source:this.source}}return{type:dt.NodeTypes.VariableLookup,name:t,lookups:i,lookupModes:s,position:{start:n,end:a},source:this.source}}tryConsumeLaxLookupSeparator(t){let n=this.p,r=t;for(;n<this.tokens.length;){let c=this.tokens[n];if(c.type===H.MarkupTokenType.EndOfString||c.start!==r)return null;if(!((c.type===H.MarkupTokenType.Equality||c.type===H.MarkupTokenType.Comparison)&&/^[=<>!]+$/.test(c.value)))break;r=c.end,n+=1}if(n===this.p)return null;e.WORD_SEGMENT_RE.lastIndex=r;let i=e.WORD_SEGMENT_RE.exec(this.source);if(!i||i.index!==r)return null;let s=i[0],a=r+s.length,o=n;for(;o<this.tokens.length&&this.tokens[o].type!==H.MarkupTokenType.EndOfString&&this.tokens[o].start>=r&&this.tokens[o].end<=a;)o+=1;return this.p=o,{value:s,start:r,end:a}}laxLookupSeparatorFollows(t){let n=this.p+1,r=n,i=t;for(;r<this.tokens.length;){let a=this.tokens[r];if(a.type===H.MarkupTokenType.EndOfString||a.start!==i||!((a.type===H.MarkupTokenType.Equality||a.type===H.MarkupTokenType.Comparison)&&/^[=<>!]+$/.test(a.value)))break;i=a.end,r+=1}if(r===n)return!1;if(!this.inCondition)return!0;e.WORD_SEGMENT_RE.lastIndex=i;let s=e.WORD_SEGMENT_RE.exec(this.source);return!!s&&s.index===i}comparison(){this.lax&&this.inCondition&&this.skipLaxConditionParens();let t=this.valueExpression(),n=this.peek();if(this.lax&&this.inCondition&&n.type!==H.MarkupTokenType.Logical){let i=this.laxConditionOperatorRun(t.position.end);if(i&&!O_(i.value))return this.unknownOperatorComparison(t,i);if(i&&O_(i.value)&&n.type!==H.MarkupTokenType.Comparison&&n.type!==H.MarkupTokenType.Equality)return this.mergedOperatorComparison(t,i)}if(n.type!==H.MarkupTokenType.Comparison&&n.type!==H.MarkupTokenType.Equality)return this.lax&&this.consumeOptional(H.MarkupTokenType.CloseRound),t;if(!O_(n.value)){if(this.lax)return t;throw new Ei.LiquidHTMLASTParsingError(`Unknown operator ${n.value}`,this.source,n.start,n.end)}if(this.p+=1,this.lax&&!this.atValueStart())return t;let r=this.valueExpression();return this.lax&&this.consumeOptional(H.MarkupTokenType.CloseRound),{kind:"comparison",left:t,op:n.value,right:r,position:{start:t.position.start,end:r.position.end},source:this.source}}laxConditionOperatorRun(t){let n=t;for(;n<this.markupEnd&&/\s/.test(this.source[n]);)n+=1;let r=/^[=!<>a-z_]+/.exec(this.source.slice(n,this.markupEnd));return r?{value:r[0],start:n,end:n+r[0].length}:null}unknownOperatorComparison(t,n){for(;this.peek().type!==H.MarkupTokenType.EndOfString&&this.peek().start<n.end;)this.p+=1;let r=t;if(this.atValueStart()){let i=this.p;try{r=this.valueExpression()}catch{for(this.p=i;this.peek().type!==H.MarkupTokenType.EndOfString&&this.peek().type!==H.MarkupTokenType.Logical;)this.p+=1;r=t}}return this.consumeOptional(H.MarkupTokenType.CloseRound),{kind:"comparison",left:t,op:n.value,right:r,position:{start:t.position.start,end:r.position.end},source:this.source}}mergedOperatorComparison(t,n){for(;this.peek().type!==H.MarkupTokenType.EndOfString&&this.peek().start<n.end;)this.p+=1;let r=this.source.slice(n.end,this.markupEnd),i=new e((0,H.tokenizeMarkup)(r,n.end),this.source,n.end,this.markupEnd).enableLax(),s={type:dt.NodeTypes.VariableLookup,name:null,lookups:[],position:{start:n.end,end:n.end},source:this.source};for(i.atValueStart()&&(s=i.valueExpression());this.peek().type!==H.MarkupTokenType.EndOfString&&this.peek().start<s.position.end;)this.p+=1;return this.consumeOptional(H.MarkupTokenType.CloseRound),{kind:"comparison",left:t,op:n.value,right:s,position:{start:t.position.start,end:s.position.end},source:this.source}}skipLaxConditionParens(){for(;this.look(H.MarkupTokenType.OpenRound)&&!this.parenAtCursorContainsRange();)this.p+=1}parenAtCursorContainsRange(){let t=0;for(let n=this.p;n<this.tokens.length;n++){let r=this.tokens[n];if(r.type===H.MarkupTokenType.EndOfString)break;if(r.type===H.MarkupTokenType.OpenRound)t+=1;else if(r.type===H.MarkupTokenType.CloseRound){if(t-=1,t===0)break}else if(r.type===H.MarkupTokenType.DotDot&&t===1)return!0}return!1}logicalExpr(){let t=this.comparison(),n=this.peek();if(n.type!==H.MarkupTokenType.Logical)return t;if(!E9(n.value)){if(this.lax)return t;throw new Ei.LiquidHTMLASTParsingError(`Unknown logical operator: ${n.value}`,this.source,n.start,n.end)}let r=n.start;this.p+=1;let i=this.logicalExpr();return{kind:"logical",left:t,op:n.value,right:i,opStart:r,position:{start:t.position.start,end:i.position.end},source:this.source}}conditionalExpression(){let t=this.inCondition;this.inCondition=!0;let n;try{n=(0,iu.adaptConditional)(this.logicalExpr())}finally{this.inCondition=t}return this.lax&&this.discardRemaining(),n.type===dt.NodeTypes.LogicalExpression&&tA(n,this.eosStart()),n}expression(){return(0,iu.adaptComplex)(this.logicalExpr())}liquidVariable(){let t=this.expression(),n=this.filters(t.position.end);this.lax&&this.discardRemaining();let r=n.length>0?n[n.length-1].position.end:t.position.end,i=t.position.start,a=this.tokens[this.tokens.length-1].start;return{type:dt.NodeTypes.LiquidVariable,expression:t,filters:n,rawSource:this.source.slice(i,r),position:{start:i,end:a},source:this.source}}filters(t=0){let n=[];for(;this.consumeOptional(H.MarkupTokenType.Pipe);){if((this.lax||this.tolerant)&&!this.look(H.MarkupTokenType.Id)){this.skipToNextPipe();continue}let r=this.filter(t);n.push(r),t=r.position.end,this.lax&&!this.isAtEnd()&&!this.look(H.MarkupTokenType.Pipe)&&this.skipToNextPipe()}return n}filter(t){let n=this.consume(H.MarkupTokenType.Id),r=[],i=n.end,s=this.consumeOptional(H.MarkupTokenType.Colon);if(s){i=s.end;let a=this.isAtEnd()||this.look(H.MarkupTokenType.Pipe),o=!/\S/.test(this.source.slice(s.end,this.peek().start));!(a&&o)&&(!(this.lax||this.tolerant)||this.atArgumentStart())&&(r=this.arguments()),r.length>0&&(i=r[r.length-1].position.end)}return{type:dt.NodeTypes.LiquidFilter,name:n.value,args:r,position:{start:t,end:i},source:this.source}}argument(){return this.look(H.MarkupTokenType.Id)&&this.lookaheadForNamedArgument()?this.namedArgument():this.valueExpression()}lookaheadForNamedArgument(){let t=1;for(;this.look(H.MarkupTokenType.Dot,t)&&this.look(H.MarkupTokenType.Id,t+1);)t+=2;return this.look(H.MarkupTokenType.Colon,t)}namedArgument(){let t=this.consume(H.MarkupTokenType.Id),n=t.value;for(;this.consumeOptional(H.MarkupTokenType.Dot);){let i=this.consume(H.MarkupTokenType.Id);n+="."+i.value}this.consume(H.MarkupTokenType.Colon);let r=this.valueExpression();return{type:dt.NodeTypes.NamedArgument,name:n,value:r,position:{start:t.start,end:r.position.end},source:this.source}}arguments(){let t=[];for(t.push(this.argument());this.consumeOptional(H.MarkupTokenType.Comma)&&!((this.lax||this.tolerant)&&!this.atArgumentStart());)t.push(this.argument());return t}namedArguments(){let t=[];for(t.push(this.namedArgument());this.consumeOptional(H.MarkupTokenType.Comma)&&this.look(H.MarkupTokenType.Id);)t.push(this.namedArgument());return t}blockNamedArguments(){let t=[];for(this.pushBlockNamedArgument(t);this.consumeOptional(H.MarkupTokenType.Comma)&&this.look(H.MarkupTokenType.Id);)this.pushBlockNamedArgument(t);return t}pushBlockNamedArgument(t){let n=this.consume(H.MarkupTokenType.Id),r=n.value;for(;this.consumeOptional(H.MarkupTokenType.Dot);){let a=this.consume(H.MarkupTokenType.Id);r+="."+a.value}this.consume(H.MarkupTokenType.Colon);let i=this.blockValueExpression(),s={start:n.start,end:i.position.end};t.push({type:dt.NodeTypes.NamedArgument,name:r,value:i,position:s,source:this.source})}blockValueExpression(){return this.look(H.MarkupTokenType.OpenSquare)?this.blockArrayLiteral():this.valueExpression()}assertNotNestedArray(){if(this.look(H.MarkupTokenType.OpenSquare)){let t=this.peek();throw new Ei.LiquidHTMLASTParsingError("nested arrays are not supported in block array literal",this.source,t.start,t.end)}}blockArrayLiteral(){let t=this.consume(H.MarkupTokenType.OpenSquare),n=[];for(;!this.look(H.MarkupTokenType.CloseSquare);)this.assertNotNestedArray(),n.push(this.valueExpression()),this.look(H.MarkupTokenType.CloseSquare)||this.consume(H.MarkupTokenType.Comma);let r=this.consume(H.MarkupTokenType.CloseSquare);return{type:"BlockArrayLiteral",elements:n,position:{start:t.start,end:r.end},source:this.source}}computeLastTokenEnd(){for(let t=this.tokens.length-1;t>=0;t--)if(this.tokens[t].type!==H.MarkupTokenType.EndOfString)return this.tokens[t].end;return this.tokens[0]?.start??0}};cd.MarkupParser=N_;function tA(e,t){e.type===dt.NodeTypes.LogicalExpression&&(e.position={...e.position,end:t},tA(e.right,t))}function O_(e){return iu.EQUALITY_OPERATORS.has(e)||iu.COMPARISON_OPERATORS.has(e)}function E9(e){return iu.LOGICAL_OPERATORS.has(e)}function A9(e){switch(e){case"nil":case"null":case"true":case"false":case"blank":case"empty":return!0;default:return!1}}});var nA=x(L_=>{"use strict";d();Object.defineProperty(L_,"__esModule",{value:!0});L_.parseLiquidVariableOutput=P9;var P_=gn(),C_=br(),O9=Rs(),N9=xt();function P9(e){let t=e.consume(P_.TokenType.LiquidVariableOutputOpen);e.accept(P_.TokenType.Text);let n=e.consume(P_.TokenType.LiquidVariableOutputClose),r=e.getSource(),i=r.slice(t.end,n.start);try{let s=(0,N9.tokenizeMarkup)(i,t.end),a=new O9.MarkupParser(s,r);e.isTolerant()&&a.enableTolerant();let o=a.liquidVariable();return a.isAtEnd()?(0,C_.makeLiquidVariableOutput)(t,n,o,r):(0,C_.makeLiquidVariableOutput)(t,n,i.trim(),r)}catch{return(0,C_.makeLiquidVariableOutput)(t,n,i.trim(),r)}}});var su=x(tr=>{"use strict";d();Object.defineProperty(tr,"__esModule",{value:!0});tr.parseBlockTag=I9;tr.parseBlockBody=iA;tr.parseBranchedBody=sA;tr.finalizeBranch=ud;tr.parseBranchMarkup=aA;tr.peekTagName=M_;tr.isBlockTerminator=M9;tr.consumeEndTag=R9;tr.isBranchName=cA;var yn=gn(),Ds=br(),Yr=lo(),rA=Jr(),po=Zn(),C9=Gr(),q_=Rs(),I_=xt(),L9=Mf(),q9=Qc();function I9(e,t,n,r){let i,s=!1,a;try{let c=r.start-n.markupString.length,l=(0,I_.tokenizeMarkup)(n.markupString,c),f=new q_.MarkupParser(l,e.getSource());e.isTolerant()&&f.enableTolerant(),i=t.parse(n.tagName,f,e),f.isAtEnd()?s=!0:(i=void 0,a="unexpected tokens after markup")}catch(c){i=void 0,a=c instanceof Error?c.message:"unknown error"}let o=e.blockAllowUnclosedHtml;e.blockAllowUnclosedHtml=D9.has(n.tagName);try{if(t.branches.length===0){let{children:m,endPosition:p,endWhitespace:g}=iA(e,n);return s?(0,Ds.makeLiquidTagNamed)(n,i,m,p,g):(0,Ds.makeLiquidTagBaseCase)(n,m,p,g,a)}let{branches:c,endPosition:l,endWhitespace:f}=sA(e,n,t);return s?(0,Ds.makeLiquidTagNamed)(n,i,c,l,f):(0,Ds.makeLiquidTagBaseCase)(n,c,l,f,a)}finally{e.blockAllowUnclosedHtml=o}}function iA(e,t){let n=t.tagName,r=[];for(;!e.isAtEnd();){if(e.check(yn.TokenType.LiquidTagOpen)){let s=e.peekTagName();if(s===`end${n}`){let a=e.consumeEndTag();return{children:(0,Yr.filterChildren)(Yr.ChildFilterMode.Syntactic,r,e.getSource()),endPosition:a.position,endWhitespace:a.whitespace}}if(s&&s.startsWith("end")){let a=s.slice(3);if((0,rA.isStructuralEndTag)(a,e.blockEnv.tagForName(a)))throw new po.LiquidHTMLASTParsingError(`Attempting to close LiquidTag '${a}' before LiquidTag '${n}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end)}if(s&&(s==="else"||s==="elsif"||s==="when"))throw new po.LiquidHTMLASTParsingError(`Attempting to open LiquidBranch '${s}' before LiquidTag '${n}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end)}let i=e.getPosition();if(e.blockInAttributeContext&&!e.blockInAttributeValueContext?r.push(...e.parseBranchAttributes()):r.push(e.parseNodeInScope(r)),e.getPosition()===i){if(e.blockAllowUnclosedDocumentNode||oA(e,n),e.check(yn.TokenType.LiquidTagOpen)){r.push(e.parseLiquidTag());continue}break}}{let i=(0,Yr.filterChildren)(Yr.ChildFilterMode.Syntactic,r,e.getSource()),s=e.peek().start,a={start:s,end:s};if(e.blockAllowUnclosedDocumentNode)return{children:i,endPosition:a,endWhitespace:{start:"",end:""}};throw new po.LiquidHTMLASTParsingError(`Attempting to end parsing before LiquidTag '${n}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end)}}function sA(e,t,n){let r=t.tagName,i=t.blockStartPosition.end,s=[],a=(0,Ds.makeLiquidBranchUnnamed)(i,e.getSource()),o=[],c=e.blockInAttributeValueContext?Yr.ChildFilterMode.Preserve:Yr.ChildFilterMode.Syntactic;for(;!e.isAtEnd();){if(e.check(yn.TokenType.LiquidTagOpen)){let f=e.peekTagName();if(f===`end${r}`){ud(a,o,e.peek().start,e.getSource(),c),s.push(a);let m=e.consumeEndTag();return{branches:s,endPosition:m.position,endWhitespace:m.whitespace}}if(cA(f)&&n.branches.includes(f)){ud(a,o,e.peek().start,e.getSource(),c),s.push(a);let m=e.consume(yn.TokenType.LiquidTagOpen);e.accept(yn.TokenType.Text);let p=e.consume(yn.TokenType.LiquidTagClose),g=(0,Ds.envelopeFromTokens)(m,p,e.getSource()),v=aA(e,f,g);a=(0,Ds.makeLiquidBranchNamed)(g,v),o=[];continue}if(f&&f.startsWith("end")){let m=f.slice(3);if((0,rA.isStructuralEndTag)(m,e.blockEnv.tagForName(m)))throw new po.LiquidHTMLASTParsingError(`Attempting to close LiquidTag '${m}' before LiquidTag '${r}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end)}}let l=e.getPosition();if(e.blockInAttributeContext&&!e.blockInAttributeValueContext?o.push(...e.parseBranchAttributes()):o.push(e.parseNodeInScope(o)),e.getPosition()===l){if(e.blockAllowUnclosedDocumentNode||oA(e,r),e.check(yn.TokenType.LiquidTagOpen)){o.push(e.parseLiquidTag());continue}break}}{let l=e.peek().start;ud(a,o,l,e.getSource(),c),s.push(a);let f={start:l,end:l};if(e.blockAllowUnclosedDocumentNode)return{branches:s,endPosition:f,endWhitespace:{start:"",end:""}};throw new po.LiquidHTMLASTParsingError(`Attempting to end parsing before LiquidTag '${r}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end)}}function ud(e,t,n,r,i=Yr.ChildFilterMode.StripEdges){let s=(0,Yr.mergeAdjacentTextNodes)(t,r);if(e.children=(0,Yr.filterChildren)(i,t,r),e.blockEndPosition={start:n,end:n},e.position.end=n,s.length>0){let a=s[s.length-1].position.end;a>n&&(e.position.end=a)}}function aA(e,t,n){let r=n.whitespaceEnd==="-"?3:2,s=n.blockStartPosition.end-r-n.markupString.length;switch(t){case"elsif":try{let a=(0,I_.tokenizeMarkup)(n.markupString,s),o=new q_.MarkupParser(a,e.getSource());e.isTolerant()&&o.enableTolerant();let c=(0,L9.elsifBranchParse)(t,o);return o.isAtEnd()?c:n.markupString.trim()}catch{return n.markupString.trim()}case"when":try{let a=(0,I_.tokenizeMarkup)(n.markupString,s),o=new q_.MarkupParser(a,e.getSource());e.isTolerant()&&o.enableTolerant();let c=(0,q9.whenBranchParse)(t,o);return o.isAtEnd()?c:n.markupString.trim()}catch{return n.markupString.trim()}case"else":return"";default:return(0,C9.assertNever)(t)}}function M_(e){if(!e.check(yn.TokenType.LiquidTagOpen))return null;let n=(e.check(yn.TokenType.Text,1)?e.getSource().slice(e.tokenAt(e.getPosition()+1).start,e.tokenAt(e.getPosition()+1).end):"").trimStart(),r=n.search(/\s/);return r===-1?n.trim():n.slice(0,r)}function M9(e){if(!e.check(yn.TokenType.LiquidTagOpen))return!1;let t=M_(e);return t?t.startsWith("end")||t==="elsif"||t==="else"||t==="when":!1}function oA(e,t){let n=e.peek(),r=M_(e);throw new po.LiquidHTMLASTParsingError(`Unexpected Liquid tag '${r??n.type}' inside LiquidTag '${t}'`,e.getSource(),n.start,n.end)}function R9(e){let t=e.consume(yn.TokenType.LiquidTagOpen);e.accept(yn.TokenType.Text);let n=e.consume(yn.TokenType.LiquidTagClose),r=t.end-t.start>2?"-":"",i=n.end-n.start>2?"-":"";return{position:{start:t.start,end:n.end},whitespace:{start:r,end:i}}}function cA(e){return e==="elsif"||e==="else"||e==="when"}var D9=new Set(["if","unless","case"])});var V_=x(Oi=>{"use strict";d();Object.defineProperty(Oi,"__esModule",{value:!0});Oi.ParamTokenType=Oi.LiquidDocTokenType=void 0;Oi.tokenizeLiquidDoc=j9;Oi.tokenizeParamContent=B9;var mo;(function(e){e.Annotation="Annotation",e.TextLine="TextLine",e.Newline="Newline",e.EndOfInput="EndOfInput"})(mo||(Oi.LiquidDocTokenType=mo={}));var Ai;(function(e){e.Type="Type",e.OptionalName="OptionalName",e.Word="Word",e.Dash="Dash",e.Text="Text",e.EndOfInput="EndOfInput"})(Ai||(Oi.ParamTokenType=Ai={}));function j9(e,t){let n=[],r=0,i=!1;for(;r<e.length;){if(D_.lastIndex=r,D_.test(e)){let f=D_.lastIndex;n.push({type:mo.Newline,value:e.slice(r,f),start:r+t,end:f+t}),r=f,i=!1;continue}ho.lastIndex=r;let s=ho.test(e)?ho.lastIndex:r;if(R_.lastIndex=s,R_.test(e)){let f=R_.lastIndex;n.push({type:mo.Annotation,value:e.slice(s+1,f),start:s+t,end:f+t}),r=f,i=!0,ho.lastIndex=r,ho.test(e)&&(r=ho.lastIndex);continue}let a=e.indexOf(`
|
|
29
|
+
`,r),o=a===-1?e.length:a,c=o;if(!i){let f=e.slice(r,o);uA.lastIndex=0;let m=uA.exec(f);m&&(c=r+m.index+1)}let l=e.slice(r,c);l.length>0&&n.push({type:mo.TextLine,value:l,start:r+t,end:c+t}),r=c,i=!1}return n.push({type:mo.EndOfInput,value:"",start:e.length+t,end:e.length+t}),n}function B9(e,t){let n=[],r=0;for(;r<e.length;){if(F_.lastIndex=r,F_.test(e)){r=F_.lastIndex;continue}let i=F9(e,r);if(i!==void 0){n.push({type:Ai.Type,value:e.slice(r+1,i-1),start:r+t,end:i+t}),r=i;continue}if(j_.lastIndex=r,j_.test(e)){let a=j_.lastIndex;n.push({type:Ai.OptionalName,value:e.slice(r+1,a-1),start:r+t,end:a+t}),r=a;continue}if(e[r]==="-"&&(r+1>=e.length||e[r+1]===" "||e[r+1]===" ")){n.push({type:Ai.Dash,value:"-",start:r+t,end:r+1+t}),r+=1;continue}if(B_.lastIndex=r,B_.test(e)){let a=B_.lastIndex;n.push({type:Ai.Word,value:e.slice(r,a),start:r+t,end:a+t}),r=a;continue}let s=e.slice(r);n.push({type:Ai.Text,value:s,start:r+t,end:e.length+t}),r=e.length}return n.push({type:Ai.EndOfInput,value:"",start:e.length+t,end:e.length+t}),n}function F9(e,t){if(e[t]==="{")for(let n=t+1;n<e.length;n++){let r=e[n];if(r==="'"||r==='"'){let i=e.indexOf(r,n+1);if(i===-1){let s=e.indexOf("}",n+1);return s===-1?void 0:s+1}n=i;continue}if(r==="}")return n+1}}var R_=/@(\w+)/y,ho=/[ \t]+/y,D_=/\r?\n/y,uA=/.@\w+/g,j_=/\[([^\]]*)\]/y,B_=/[\w][\w-]*/y,F_=/[ \t]+/y});var lA=x(js=>{"use strict";d();Object.defineProperty(js,"__esModule",{value:!0});js.makeTextNode=V9;js.makeLiquidDocParamNode=$9;js.makeLiquidDocDescriptionNode=U9;js.makeLiquidDocExampleNode=H9;js.makeLiquidDocPromptNode=z9;var au=Qe();function V9(e,t,n,r){return{type:au.NodeTypes.TextNode,value:e,position:{start:t,end:n},source:r}}function $9(e,t,n,r,i,s,a){return{type:au.NodeTypes.LiquidDocParamNode,name:"param",paramName:e,paramType:t,paramDescription:n,required:r,position:{start:i,end:s},source:a}}function U9(e,t,n,r,i,s){return{type:au.NodeTypes.LiquidDocDescriptionNode,name:"description",content:e,isImplicit:t,isInline:n,position:{start:r,end:i},source:s}}function H9(e,t,n,r,i){return{type:au.NodeTypes.LiquidDocExampleNode,name:"example",content:e,isInline:t,position:{start:n,end:r},source:i}}function z9(e,t,n,r){return{type:au.NodeTypes.LiquidDocPromptNode,name:"prompt",content:e,position:{start:t,end:n},source:r}}});var dA=x(ou=>{"use strict";d();Object.defineProperty(ou,"__esModule",{value:!0});ou.LiquidDocParser=void 0;ou.parseLiquidDoc=G9;var xe=V_(),fA=V_(),$e=lA(),W9=Gr();function G9(e,t,n){let r=(0,fA.tokenizeLiquidDoc)(e,t);return new ld(r,n).parse()}var ld=class{tokens;source;p;constructor(t,n){this.tokens=t,this.source=n,this.p=0}parse(){let t=[];for(this.skipBlankLines(),this.check(xe.LiquidDocTokenType.TextLine)&&t.push(this.parseImplicitDescription()),this.skipBlankLines();!this.isAtEnd();){if(this.check(xe.LiquidDocTokenType.Newline)){this.skipNewlines();continue}if(this.check(xe.LiquidDocTokenType.Annotation)){t.push(this.parseAnnotation());continue}if(this.check(xe.LiquidDocTokenType.TextLine)&&this.peek().value.trim()===""){this.advance();continue}if(this.check(xe.LiquidDocTokenType.TextLine)){let{value:r,startPos:i,endPos:s}=this.collectContentLines({trimTrailingNewlines:!0});r.trim().length>0&&t.push((0,$e.makeTextNode)(r,i,s,this.source));continue}let n=this.advance();t.push((0,$e.makeTextNode)(n.value,n.start,n.end,this.source))}return t}parseImplicitDescription(){let{value:t,startPos:n,endPos:r}=this.collectContentLines(),i=(0,$e.makeTextNode)(t,n,r,this.source);return(0,$e.makeLiquidDocDescriptionNode)(i,!0,!0,n,r,this.source)}parseAnnotation(){let t=this.consume(xe.LiquidDocTokenType.Annotation),n=t.value;if(n!==_n.Description&&n.startsWith(_n.Description))return this.parseGluedDescription(t);if(!J9(n))return this.parseUnsupportedAnnotation(t);switch(n){case _n.Param:return this.parseParam(t);case _n.Description:return this.parseDescription(t);case _n.Example:return this.parseExample(t);case _n.Prompt:return this.parsePrompt(t);default:(0,W9.assertNever)(n)}}parseParam(t){let n=t.start,r=this.accept(xe.LiquidDocTokenType.TextLine);if(!r){let y=(0,$e.makeTextNode)("",t.end,t.end,this.source);return(0,$e.makeLiquidDocParamNode)(y,null,null,!0,n,t.end,this.source)}let i=new $_((0,fA.tokenizeParamContent)(r.value,r.start)),s=null,a=i.accept(xe.ParamTokenType.Type);a&&(s=(0,$e.makeTextNode)(a.value,a.start+1,a.end-1,this.source));let o,c,l=i.accept(xe.ParamTokenType.OptionalName);if(l)c=!1,o=(0,$e.makeTextNode)(l.value,l.start+1,l.end-1,this.source);else{c=!0;let y=i.accept(xe.ParamTokenType.Word);y?o=(0,$e.makeTextNode)(y.value,y.start,y.end,this.source):o=(0,$e.makeTextNode)("",t.end,t.end,this.source)}let f=null,m=i.accept(xe.ParamTokenType.Dash),p=-1,g=-1;for(;!i.isAtEnd();){let y=i.advance();p===-1&&(p=y.start),g=y.end}let v=p!==-1?this.source.slice(p,g):"",{value:b,startPos:_,endPos:k}=this.collectContentLines({stopAtParagraphBreak:!0,trimTrailingNewlines:!0}),w=b.trim().length>0;if(v||w){let y=w?v+b:v,A=p!==-1?p:m?m.end+1:t.end,N=w?k:g;f=(0,$e.makeTextNode)(y,A,N,this.source)}let T=f?.position.end??r.end;return(0,$e.makeLiquidDocParamNode)(o,s,f,c,n,T,this.source)}parseDescription(t){let n=t.start,r=this.accept(xe.LiquidDocTokenType.TextLine);if(r!==null){let{value:f,endPos:m}=this.collectContentLines(),p=f.trim().length>0,g=p?r.value+f:r.value,v=p?m:r.end,b=(0,$e.makeTextNode)(g,r.start,v,this.source);return(0,$e.makeLiquidDocDescriptionNode)(b,!1,!0,n,v,this.source)}this.skipBlankLines();let{value:s,startPos:a,endPos:o}=this.collectContentLines(),c=s?a:t.end,l=(0,$e.makeTextNode)(s||"",c,s?o:c,this.source);return(0,$e.makeLiquidDocDescriptionNode)(l,!1,!1,n,s?o:c,this.source)}parseGluedDescription(t){let n=t.start,r=n+1+_n.Description.length,i=this.accept(xe.LiquidDocTokenType.TextLine),{value:s,endPos:a}=this.collectContentLines(),o=s.trim().length>0,c;o?c=a:i?c=i.end:c=t.end;let l=(0,$e.makeTextNode)(this.source.slice(r,c),r,c,this.source);return(0,$e.makeLiquidDocDescriptionNode)(l,!1,!0,n,c,this.source)}parseExample(t){let n=t.start,r=this.accept(xe.LiquidDocTokenType.TextLine);if(r!==null){let{value:f,endPos:m}=this.collectContentLines(),p=f.trim().length>0,g=p?r.value+f:r.value,v=p?m:r.end,b=(0,$e.makeTextNode)(g,r.start,v,this.source);return(0,$e.makeLiquidDocExampleNode)(b,!0,n,v,this.source)}this.skipBlankLines();let{value:s,startPos:a,endPos:o}=this.collectContentLines(),c=s?a:t.end,l=(0,$e.makeTextNode)(s||"",c,s?o:c,this.source);return(0,$e.makeLiquidDocExampleNode)(l,!1,n,s?o:c,this.source)}parsePrompt(t){let n=t.start,{value:r,startPos:i,endPos:s}=this.collectContentLines(),a=r?i:t.end,o=(0,$e.makeTextNode)(r||"",a,r?s:a,this.source);return(0,$e.makeLiquidDocPromptNode)(o,n,r?s:a,this.source)}parseUnsupportedAnnotation(t){let n=t.start,r=this.accept(xe.LiquidDocTokenType.TextLine);if(r){let s=this.source.slice(n,r.end);return(0,$e.makeTextNode)(s,n,r.end,this.source)}let i="@"+t.value;return(0,$e.makeTextNode)(i,n,t.end,this.source)}peek(){return this.tokens[this.p]}consume(t){let n=this.peek();if(n.type!==t)throw new Error(`Expected ${t} but found ${n.type} (${JSON.stringify(n.value)})`);return this.advance(),n}accept(t){return this.peek().type!==t?null:this.advance()}check(t){return this.tokens[this.p].type===t}isAtEnd(){return this.check(xe.LiquidDocTokenType.EndOfInput)}advance(){return this.tokens[this.p++]}skipNewlines(){let t=!1;for(;this.check(xe.LiquidDocTokenType.Newline);)this.advance(),t=!0;return t}skipBlankLines(){for(;!this.isAtEnd();){if(this.check(xe.LiquidDocTokenType.Newline)){this.advance();continue}if(this.check(xe.LiquidDocTokenType.TextLine)&&this.peek().value.trim()===""){this.advance();continue}break}}collectContentLines(t={}){let{stopAtParagraphBreak:n=!1,trimTrailingNewlines:r=!1}=t,i="",s=this.tokens[this.p]?.start??this.tokens[this.p-1].end,a=s;for(;!this.isAtEnd();){let o=this.peek();if(this.check(xe.LiquidDocTokenType.Annotation))break;if(this.check(xe.LiquidDocTokenType.Newline)){let l=this.p+1;for(;l<this.tokens.length;){let m=this.tokens[l];if(m.type===xe.LiquidDocTokenType.Newline){l++;continue}if(m.type===xe.LiquidDocTokenType.TextLine&&m.value.trim()===""){l++;continue}break}let f=l-this.p;if(n&&f>=2&&l<this.tokens.length&&this.tokens[l].type===xe.LiquidDocTokenType.TextLine&&this.tokens[l].value.trim()!=="")break;if(l<this.tokens.length&&this.tokens[l].type===xe.LiquidDocTokenType.Annotation){for(;this.p<l&&(this.check(xe.LiquidDocTokenType.Newline)||this.check(xe.LiquidDocTokenType.TextLine)&&this.peek().value.trim()==="");)r||(this.check(xe.LiquidDocTokenType.Newline)&&(i+=`
|
|
30
|
+
`),a=this.peek().end),this.advance();break}if(l>=this.tokens.length||this.tokens[l].type===xe.LiquidDocTokenType.EndOfInput){for(;!this.isAtEnd()&&(this.check(xe.LiquidDocTokenType.Newline)||this.check(xe.LiquidDocTokenType.TextLine)&&this.peek().value.trim()==="");)r||(this.check(xe.LiquidDocTokenType.Newline)&&(i+=`
|
|
31
|
+
`),a=this.peek().end),this.advance();break}i+=`
|
|
32
|
+
`,a=o.end,this.advance();continue}if(this.check(xe.LiquidDocTokenType.TextLine)&&o.value.trim()===""){this.advance();continue}if(i===""){let l=o.value.length-o.value.trimStart().length;s=o.start+l}let c=i===""?o.value.trimStart():o.value;i+=c,a=o.end,this.advance()}return{value:i,startPos:s,endPos:a}}};ou.LiquidDocParser=ld;var _n;(function(e){e.Param="param",e.Description="description",e.Example="example",e.Prompt="prompt"})(_n||(_n={}));function J9(e){return e===_n.Param||e===_n.Description||e===_n.Example||e===_n.Prompt}var $_=class{tokens;p=0;constructor(t){this.tokens=t}accept(t){return this.tokens[this.p].type!==t?null:this.tokens[this.p++]}check(t){return this.tokens[this.p].type===t}isAtEnd(){return this.check(xe.ParamTokenType.EndOfInput)}current(){return this.tokens[this.p]}advance(){return this.tokens[this.p++]}}});var dd=x(yo=>{"use strict";d();Object.defineProperty(yo,"__esModule",{value:!0});yo.parseRawTag=Q9;yo.parseLiquidInRange=hA;yo.parseRawTagBody=mA;yo.rawMarkupKindForTag=gA;var go=gn(),cu=br(),fd=lo(),Ni=fo(),pA=Gc(),K9=Zn(),Y9=dA();function Q9(e,t,n,r){let i=n.tagName,s=e.rawBodyEndFor(r)??(0,pA.findRawBodyEnd)(e.getSource(),r.end,i,t.body,(0,pA.rawBodyRuleLookup)(p=>e.tagForName(p)));if(!s)throw new K9.LiquidHTMLASTParsingError(`Attempting to end parsing before LiquidRawTag '${i}' was closed`,e.getSource(),n.blockStartPosition.start,n.blockStartPosition.end);let a=r.end,o=s.tagStart,c=e.getSource().slice(a,o);e.ensureRawBoundary(a,o);let l=mA(e,t,i,a,o),f=(0,cu.makeRawMarkup)(gA(i,c),c,l,a,o,e.getSource());e.seekToSourceOffset(s.tagEnd);let m={start:s.tagStart,end:s.tagEnd};return(0,cu.makeLiquidRawTag)(n,f,m,{start:s.wsStart,end:s.wsEnd})}function hA(e,t,n){let r=[],i=e.getSource(),s=e.rawParseHtml;e.rawParseHtml=!1;let a=e.getPosition();for(;e.hasToken(a)&&e.tokenAt(a).start<n;){let o=e.tokenAt(a);if(o.type===go.TokenType.LiquidVariableOutputOpen||o.type===go.TokenType.LiquidTagOpen){let c=o.type===go.TokenType.LiquidVariableOutputOpen?go.TokenType.LiquidVariableOutputClose:go.TokenType.LiquidTagClose,l=a+1;for(;e.hasToken(l)&&e.tokenAt(l).type!==c;)l++;if(!(e.hasToken(l)&&e.tokenAt(l).end<=n)){for(r.push((0,cu.makeTextNode)(i.slice(o.start,n),o.start,n,i));e.hasToken(a)&&e.tokenAt(a).start<n;)a++;break}e.setPosition(a),r.push(o.type===go.TokenType.LiquidVariableOutputOpen?e.parseLiquidVariableOutput():e.parseLiquidTag()),a=e.getPosition();continue}r.push((0,cu.makeTextNode)(i.slice(o.start,o.end),o.start,o.end,i)),a++}return e.rawParseHtml=s,e.setPosition(a),(0,fd.filterChildren)(fd.ChildFilterMode.Syntactic,r,i)}function mA(e,t,n,r,i){if(n==="doc"){let c=e.getSource().slice(r,i);return(0,Y9.parseLiquidDoc)(c,r,e.getSource())}if(t.parseLiquidInBody===!0)return hA(e,r,i);if(r>=i)return[];let s=e.getSource(),a=s.slice(r,i),o=(0,cu.makeTextNode)(a,r,i,s);return(0,fd.filterChildren)(fd.ChildFilterMode.Syntactic,[o],s)}function gA(e,t=""){switch(e){case"javascript":return Ni.RawMarkupKinds.javascript;case"stylesheet":return/\{[{%]/.test(t)?Ni.RawMarkupKinds.text:Ni.RawMarkupKinds.css;case"style":return/\{[{%]/.test(t)?Ni.RawMarkupKinds.text:Ni.RawMarkupKinds.css;case"schema":return Ni.RawMarkupKinds.json;case"raw":case"comment":case"doc":return Ni.RawMarkupKinds.text;default:return Ni.RawMarkupKinds.text}}});var yA=x(H_=>{"use strict";d();Object.defineProperty(H_,"__esModule",{value:!0});H_.parseLiquidTag=i5;var U_=gn(),_o=br(),pd=Jr(),X9=Zn(),Z9=Gr(),e5=Rs(),t5=xt(),n5=su(),r5=dd();function i5(e){let t=e.consume(U_.TokenType.LiquidTagOpen);e.accept(U_.TokenType.Text);let n=e.consume(U_.TokenType.LiquidTagClose),r=(0,_o.envelopeFromTokens)(t,n,e.getSource());if(r.tagName.startsWith("#")){let s=r.tagName.slice(1)+r.markupString,a=r.markupEnd-s.length;return(0,_o.makeLiquidTagBaseCase)({...r,tagName:"#",markupString:s,markupOffset:a})}if(r.tagName.startsWith("end")){let s=r.tagName.slice(3),a=e.tagForName(s);if((0,pd.isStructuralEndTag)(s,a))throw new X9.LiquidHTMLASTParsingError(`Attempting to close LiquidTag '${s}' before it was opened without a matching '${s}'`,e.getSource(),t.start,n.end)}let i=e.tagForName(r.tagName);if(!i)return(0,_o.makeLiquidTagBaseCase)(r);switch(i.kind){case pd.TagKind.Tag:return s5(e,i,r,n);case pd.TagKind.Block:return(0,n5.parseBlockTag)(e,i,r,n);case pd.TagKind.Raw:return(0,r5.parseRawTag)(e,i,r,n);default:return(0,Z9.assertNever)(i)}}function s5(e,t,n,r){let i;try{let s=r.start-n.markupString.length,a=s+n.markupString.length,o=(0,t5.tokenizeMarkup)(n.markupString,s),c=new e5.MarkupParser(o,e.getSource(),s,a);e.isTolerant()&&c.enableTolerant();let l=t.parse(n.tagName,c,e);return c.isAtEnd()?(0,_o.makeLiquidTagNamed)(n,l):(0,_o.makeLiquidTagBaseCase)(n,void 0,void 0,void 0,"unexpected tokens after markup")}catch(s){return i=s instanceof Error?s.message:"unknown error",(0,_o.makeLiquidTagBaseCase)(n,void 0,void 0,void 0,i)}}});var z_=x(Rn=>{"use strict";d();Object.defineProperty(Rn,"__esModule",{value:!0});Rn.HTML_RAW_TAGS=Rn.VOID_ELEMENTS=Rn.RAW_TAGS=Rn.BLOCKS=Rn.TAGS_WITHOUT_MARKUP=void 0;Rn.TAGS_WITHOUT_MARKUP=["style","schema","javascript","else","break","continue","comment","raw","doc"];Rn.BLOCKS=["if","unless","for","case","tablerow","capture","form","paginate","block","ifchanged","partial"];Rn.RAW_TAGS=["raw","javascript","schema","stylesheet","style","comment","doc"];Rn.VOID_ELEMENTS=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];Rn.HTML_RAW_TAGS=["script","style","svg"]});var SA=x(G_=>{"use strict";d();Object.defineProperty(G_,"__esModule",{value:!0});G_.closesInnermostBranchOpenedElement=a5;var Bs=Qe();function a5(e,t){let n=_A.get(e);for(n===void 0&&(n={read:0,stack:bA},_A.set(e,n));n.read<e.length;)n.stack=kA(n.stack,e[n.read]),n.read+=1;return n.stack.length>0&&n.stack[n.stack.length-1]===t.toLowerCase()}var bA=[],_A=new WeakMap,o5=new Set(["if","unless","case"]),c5="";function W_(e,t){let n=e;for(let r of t)n=kA(n,r);return n}function kA(e,t){switch(t.type){case Bs.NodeTypes.HtmlElement:{let n=t.blockEndPosition;return n.start!==n.end?e:W_([...e,vA(t.name)??c5],t.children)}case Bs.NodeTypes.HtmlDanglingMarkerClose:{let n=vA(t.name),r=e[e.length-1];return n!==null&&r===n?e.slice(0,-1):e}case Bs.NodeTypes.LiquidTag:return u5(e,t);default:return e}}function u5(e,t){if(!Array.isArray(t.children)||t.children.length===0)return e;let n=[],r=t.children.every(i=>i.type===Bs.NodeTypes.LiquidBranch);if(o5.has(t.name)&&r){let i=!1;for(let s of t.children)s.type===Bs.NodeTypes.LiquidBranch&&(t.name==="case"&&s.name===null||(s.name==="else"&&(i=!0),n.push(W_(e,s.children))));i||n.push(e)}else{let i=r?t.children.flatMap(s=>s.type===Bs.NodeTypes.LiquidBranch?s.children:[]):t.children;n.push(W_(e,i),e)}return l5(n)}function l5(e){let[t,...n]=e;if(t===void 0)return bA;let r=t.length;for(let i of n){r=Math.min(r,i.length);for(let s=0;s<r;s++)if(i[s]!==t[s]){r=s;break}}return r===t.length?t:t.slice(0,r)}function vA(e){if(e.length!==1)return null;let t=e[0];return t.type===Bs.NodeTypes.TextNode?t.value.toLowerCase():null}});var IA=x(kt=>{"use strict";d();Object.defineProperty(kt,"__esModule",{value:!0});kt.parseHtmlElement=d5;kt.parseHtmlRawBody=TA;kt.parseHtmlComment=p5;kt.parseHtmlDoctype=g5;kt.parseOrphanedHtmlCloseTag=y5;kt.closesBranchOpenedElement=wA;kt.parseHtmlDanglingMarkerClose=xA;kt.parseBranchAttributesImpl=_5;kt.parseCompoundName=Li;kt.parseAttributes=EA;kt.parseQuotedAttributeValue=NA;kt.parseUnquotedAttributeValue=PA;kt.extractPlainName=uu;kt.peekHtmlCloseTagMatches=T5;kt.scanForHtmlCloseTag=LA;kt.rawMarkupKindForHtmlTag=qA;var ae=gn(),Ht=br(),Pi=lo(),md=Qe(),Ci=fo(),K_=z_(),Fs=Zn(),f5=SA(),Y_=Gc();function d5(e){let t=e.getSource(),n=e.peek().start;e.consume(ae.TokenType.HtmlTagOpen);let r=Li(e),i=EA(e);if(e.accept(ae.TokenType.HtmlSelfClose)){let v=e.tokenAt(e.getPosition()-1).end,b={start:n,end:v};return(0,Ht.makeHtmlSelfClosingElement)(r,i,b,t)}e.consume(ae.TokenType.HtmlTagClose);let s=e.tokenAt(e.getPosition()-1).end,a={start:n,end:s},o=uu(r);if(o!==null&&K_.VOID_ELEMENTS.includes(o.toLowerCase()))return(0,Ht.makeHtmlVoidElement)(o,i,a,t);if(o!==null&&K_.HTML_RAW_TAGS.includes(o.toLowerCase()))return TA(e,o,i,a);let c=[];for(;!e.isAtEnd();){if(e.check(ae.TokenType.HtmlCloseTagOpen)){if(wA(e,c)){c.push(xA(e));continue}break}if(e.isBlockTerminator()){if(!e.htmlAllowUnclosedHtml){let v=e.peekTagName();throw new Fs.LiquidHTMLASTParsingError(`Attempting to close LiquidTag '${v}' before HtmlElement '${o||"compound"}' was closed`,t,n,s)}break}c.push(e.parseNode())}if(e.isAtEnd()||e.htmlAllowUnclosedHtml&&e.isBlockTerminator()){if(!e.htmlAllowUnclosedHtml)throw new Fs.LiquidHTMLASTParsingError(`Attempting to end parsing before HtmlElement '${o||"compound"}' was closed`,t,n,s);let v=c.length>0?c[c.length-1].position.end:s,b={start:v,end:v},_=(0,Pi.filterChildren)(Pi.ChildFilterMode.Syntactic,c,t);return(0,Ht.makeHtmlElement)(r,i,_,a,b,t)}let l=e.peek().start;e.consume(ae.TokenType.HtmlCloseTagOpen);let f=Li(e);for(;e.check(ae.TokenType.Text);){let v=t.slice(e.tokenAt(e.getPosition()).start,e.tokenAt(e.getPosition()).end);if(/^\s*$/.test(v))e.advance();else break}e.consume(ae.TokenType.HtmlTagClose);let m=e.tokenAt(e.getPosition()-1).end;if(!(0,Pi.compoundNamesMatch)(r,f)){let v=uu(f);throw new Fs.LiquidHTMLASTParsingError(`Attempting to close HtmlElement '${v||"compound"}' before HtmlElement '${o||"compound"}' was closed`,t,l,m)}let p={start:l,end:m},g=(0,Pi.filterChildren)(Pi.ChildFilterMode.Syntactic,c,t);return(0,Ht.makeHtmlElement)(r,i,g,a,p,t)}function TA(e,t,n,r){let i=e.getSource(),s=r.end,a=!e.htmlUsesBuiltinTags;a&&e.ensureRawBoundary(s,s);let o=LA(e,t),c=(a||o===-1)&&(w5.has(t.toLowerCase())||a&&o===-1&&t.toLowerCase()==="svg")?x5(i,s,t,(0,Y_.rawBodyRuleLookup)(w=>e.tagForName(w))):null;if(c&&(o===-1||e.tokenAt(o).start!==c.start))e.retokenizeRawText(s,c.start,c.end);else if(!c&&o===-1)throw new Fs.LiquidHTMLASTParsingError(`Attempting to end parsing before HtmlRawNode '${t}' was closed`,i,r.start,r.end);let l=c?c.start:e.tokenAt(o).start,f=i.slice(s,l),m=e.rawTextBound;a&&(e.rawTextBound=l);let p=e.parseLiquidInRange(s,l);a&&(e.rawTextBound=m);let g=qA(t,n,f),v=(0,Ht.makeRawMarkup)(g,f,p,s,l,i);e.seekToSourceOffset(l);let b=e.peek().start;for(e.consume(ae.TokenType.HtmlCloseTagOpen);e.check(ae.TokenType.Text);)e.advance();let _=e.consume(ae.TokenType.HtmlTagClose).end,k={start:b,end:_};return(0,Ht.makeHtmlRawNode)(t,n,v,r,k,i)}function p5(e){if(e.htmlOpaqueComments)return h5(e);let t=e.getSource(),n=e.peek().start,r={start:n,end:n};if(e.check(ae.TokenType.HtmlCommentOpen)){let c=e.consume(ae.TokenType.HtmlCommentOpen);r={start:c.start,end:c.end},e.htmlOpenComment=r}let i=[],s=null,a=e.htmlParseHtml;e.htmlParseHtml=!1;try{for(;e.htmlOpenComment!==null;){if(e.isAtEnd()){e.htmlOpenComment=null;break}if(e.check(ae.TokenType.HtmlCommentClose)){let c=e.consume(ae.TokenType.HtmlCommentClose);s={start:c.start,end:c.end},e.htmlOpenComment=null;break}if(e.isBlockTerminator())break;i.push(e.parseNode())}}finally{e.htmlParseHtml=a}let o=e.peek().start;return(0,Ht.makeHtmlComment)((0,Pi.filterChildren)(Pi.ChildFilterMode.Syntactic,i,t),r,s??{start:o,end:o},t)}function h5(e){let t=e.getSource(),n=e.consume(ae.TokenType.HtmlCommentOpen);for(;!e.isAtEnd()&&!e.check(ae.TokenType.HtmlCommentClose);)e.advance();if(e.isAtEnd())throw m5(t,n);let r=e.consume(ae.TokenType.HtmlCommentClose);return(0,Ht.makeHtmlComment)([],{start:n.start,end:n.end},{start:r.start,end:r.end},t)}function m5(e,t){return new Fs.LiquidHTMLASTParsingError("Attempting to end parsing before HtmlComment '<!--' was closed",e,t.start,t.end)}function g5(e){let t=e.getSource(),n=e.consume(ae.TokenType.HtmlDoctypeOpen);for(;!e.isAtEnd()&&!e.check(ae.TokenType.HtmlTagClose);)e.advance();let r=e.consume(ae.TokenType.HtmlTagClose),i=t.slice(n.end,r.start).trim(),s=i.match(/^doctype\s+html\s*(.*)/i),a=s?s[1].length>0?s[1]:null:i;return(0,Ht.makeHtmlDoctype)(a,n.start,r.end,t)}function y5(e){let t=e.getSource(),n=e.peek().start;e.consume(ae.TokenType.HtmlCloseTagOpen);let r=Li(e);for(;e.check(ae.TokenType.Text);){let a=t.slice(e.tokenAt(e.getPosition()).start,e.tokenAt(e.getPosition()).end);if(/^\s*$/.test(a))e.advance();else break}let i=e.consume(ae.TokenType.HtmlTagClose).end,s=uu(r);throw new Fs.LiquidHTMLASTParsingError(`Attempting to close HtmlElement '${s||"compound"}' before it was opened`,t,n,i)}function wA(e,t){if(!e.htmlPairDanglingCloseTags)return!1;let n=e.peek().end,r=/^([A-Za-z][^\s/>{}]*)\s*>/.exec(e.getSource().slice(n,n+256));return r?(0,f5.closesInnermostBranchOpenedElement)(t,r[1]):!1}function xA(e){let t=e.getSource(),n=e.peek().start;e.consume(ae.TokenType.HtmlCloseTagOpen);let r=Li(e);for(;e.check(ae.TokenType.Text);){let s=t.slice(e.tokenAt(e.getPosition()).start,e.tokenAt(e.getPosition()).end);if(/^\s*$/.test(s))e.advance();else break}e.consume(ae.TokenType.HtmlTagClose);let i=e.tokenAt(e.getPosition()-1).end;return(0,Ht.makeHtmlDanglingMarkerClose)(r,n,i,t)}function _5(e){let t=[];for(;!e.isAtEnd()&&(hd(e),!(e.isAtEnd()||e.check(ae.TokenType.HtmlTagClose)||e.check(ae.TokenType.HtmlSelfClose)||e.isBlockTerminator()));){if(e.check(ae.TokenType.LiquidTagOpen)){let i=e.htmlInAttributeContext;e.htmlInAttributeContext=!0,t.push(e.parseLiquidTag()),e.htmlInAttributeContext=i;continue}if(e.check(ae.TokenType.LiquidVariableOutputOpen)){t.push(e.parseLiquidVariableOutput());continue}let n=e.peek().start,r=Li(e);if(r.length===0){e.advance();continue}t.push(AA(e,r,n))}return t}function Li(e){let t=[];for(;!e.isAtEnd();){if(e.check(ae.TokenType.LiquidVariableOutputOpen)){t.push(e.parseLiquidVariableOutput());continue}if(!e.htmlInAttributeContext&&e.check(ae.TokenType.LiquidTagOpen)&&!t.some(r=>r.type===md.NodeTypes.LiquidVariableOutput)&&!b5(e,t)){t.push(e.parseLiquidTag());continue}let n=CA(e);if(n!==null){t.push(n);continue}break}return t}function EA(e){let t=e.htmlInAttributeContext;e.htmlInAttributeContext=!0;try{return v5(e)}finally{e.htmlInAttributeContext=t}}function v5(e){let t=[];for(;!e.isAtEnd()&&(hd(e),!(e.isAtEnd()||e.check(ae.TokenType.HtmlTagClose)||e.check(ae.TokenType.HtmlSelfClose)));){if(e.check(ae.TokenType.LiquidTagOpen)){let i=e.htmlInAttributeContext;e.htmlInAttributeContext=!0,t.push(e.parseLiquidTag()),e.htmlInAttributeContext=i;continue}if(e.check(ae.TokenType.LiquidVariableOutputOpen)){t.push(e.parseLiquidVariableOutput());continue}let n=e.peek().start,r=Li(e);if(r.length===0){e.advance();continue}t.push(AA(e,r,n))}return t}function AA(e,t,n){let r=e.getSource();if(hd(e),!e.accept(ae.TokenType.HtmlEquals)){let f=t[t.length-1];return(0,Ht.makeAttrEmpty)(t,n,f.position.end,r)}hd(e);let i=e.accept(ae.TokenType.HtmlQuoteOpen);if(!i){let{value:f,end:m}=PA(e),p={start:f.length>0?f[0].position.start:e.peek().start,end:m};return(0,Ht.makeAttrUnquoted)(t,f,p,n,m,r)}let s=r[i.start],a=i.end,o=NA(e),c=e.consume(ae.TokenType.HtmlQuoteClose),l={start:a,end:c.start};return s==='"'||s==="\u201C"||s==="\u201D"?(0,Ht.makeAttrDoubleQuoted)(t,o,l,n,c.end,r):(0,Ht.makeAttrSingleQuoted)(t,o,l,n,c.end,r)}function hd(e){for(;e.check(ae.TokenType.Text)&&OA(e,e.peek());)e.advance()}function OA(e,t){return/^\s/.test(e.getSource().slice(t.start,t.start+1))}function NA(e){let t=[],n=e.getSource();for(;!e.isAtEnd()&&!e.check(ae.TokenType.HtmlQuoteClose);)if(e.check(ae.TokenType.LiquidVariableOutputOpen))t.push(e.parseLiquidVariableOutput());else if(e.check(ae.TokenType.LiquidTagOpen)){let r=e.peekTagName();if(r&&(O5.has(r)||r.startsWith("end"))){let s=e.peek();throw new Fs.LiquidHTMLASTParsingError(`Unexpected Liquid tag '${r}' inside quoted attribute value`,n,s.start,s.end)}let i=e.htmlInAttributeValueContext;e.htmlInAttributeValueContext=!0,t.push(e.parseLiquidTag()),e.htmlInAttributeValueContext=i}else if(e.check(ae.TokenType.Text)){let r=e.advance();t.push((0,Ht.makeTextNode)(n.slice(r.start,r.end),r.start,r.end,n))}else break;return t}function PA(e){let t=[],n=e.peek().start;for(;!e.isAtEnd()&&!(e.check(ae.TokenType.HtmlTagClose)||e.check(ae.TokenType.HtmlSelfClose));){let r=CA(e);if(r){t.push(r),n=r.position.end;continue}if(e.check(ae.TokenType.LiquidVariableOutputOpen)){let i=e.parseLiquidVariableOutput();t.push(i),n=i.position.end;continue}break}return{value:t,end:n}}function CA(e){if(!e.check(ae.TokenType.Text))return null;let t=e.peek();if(OA(e,t))return null;e.advance();let n=e.getSource();return(0,Ht.makeTextNode)(n.slice(t.start,t.end),t.start,t.end,n)}function b5(e,t){if(!t.some(r=>r.type===md.NodeTypes.TextNode))return!1;let n=e.peekTagName();return n===null||!K_.BLOCKS.includes(n)?!1:S5(e)}function k5(e){return e!==void 0&&(e.type===ae.TokenType.LiquidVariableOutputOpen||e.type===ae.TokenType.LiquidTagOpen)&&e.end-e.start===3}function S5(e){let t=e.getSource(),n=!1,r=!1;for(let i=e.getPosition();e.hasToken(i);i++){let s=e.tokenAt(i);switch(s.type){case ae.TokenType.LiquidTagOpen:n=!0;break;case ae.TokenType.LiquidTagClose:n=!1,r=s.end-s.start===3;break;case ae.TokenType.Text:if(!n){let a=t.slice(s.start,s.end);if(r&&(a=a.replace(/^\s+/,"")),r=!1,a.length===0||/^\s+$/.test(a)&&k5(e.tokenAt(i+1)))break;return/^\s/.test(a)}break;case ae.TokenType.LiquidVariableOutputOpen:if(!n)return!1;break;case ae.TokenType.HtmlTagClose:case ae.TokenType.HtmlSelfClose:case ae.TokenType.EndOfInput:if(!n)return!1;break}}return!1}function uu(e){return e.length===1&&e[0].type===md.NodeTypes.TextNode?e[0].value:null}function T5(e,t){if(!e.check(ae.TokenType.HtmlCloseTagOpen))return!1;let n=e.getPosition();e.advance();let r=Li(e);return e.setPosition(n),(0,Pi.compoundNamesMatch)(t,r)}function LA(e,t){let n=t.toLowerCase(),r=e.getSource(),i=e.getPosition(),s=0;for(let a=i;e.hasToken(a);a++){let o=e.tokenAt(a);if(o.type===ae.TokenType.HtmlTagOpen){let f=a+1;if(!e.hasToken(f)||e.tokenAt(f).type!==ae.TokenType.Text)continue;let m=r.slice(e.tokenAt(f).start,e.tokenAt(f).end).trimStart(),p=m.search(/\s/);(p===-1?m.trim():m.slice(0,p)).toLowerCase()===n&&s++;continue}if(o.type!==ae.TokenType.HtmlCloseTagOpen)continue;let c=a+1;for(;e.hasToken(c)&&e.tokenAt(c).type===ae.TokenType.Text;)c++;if(c===a+1)continue;if(r.slice(o.end,e.tokenAt(c-1).end).trim().toLowerCase()===n){if(s===0)return a;s--}}return-1}var w5=new Set(["script","style"]),J_=/\s*>/y;function x5(e,t,n,r){let i=n.toLowerCase(),s=t;for(;s<e.length;){let a=e.startsWith("{{",s)?"}}":e.startsWith("{%",s)?"%}":null;if(a){let o=e.indexOf(a,s+2);if(o===-1)return null;let c=o+2,l=a==="%}"?(0,Y_.liquidTagTokenName)(e.slice(s,c)):void 0,f=l?r(l):void 0;if(l&&f){let m=(0,Y_.findRawBodyEnd)(e,c,l,f,r);if(!m)return null;s=m.tagEnd}else s=c;continue}if(e.startsWith("</",s)&&e.slice(s+2,s+2+i.length).toLowerCase()===i&&(J_.lastIndex=s+2+i.length,J_.test(e)))return{start:s,end:J_.lastIndex};s++}return null}function qA(e,t=[],n=""){switch(e.toLowerCase()){case"script":return E5(t);case"style":return/\{[{%]/.test(n)?Ci.RawMarkupKinds.text:Ci.RawMarkupKinds.css;default:return Ci.RawMarkupKinds.text}}function E5(e){let t=A5(e,"type");return t===null?Ci.RawMarkupKinds.javascript:t==="text/html"?Ci.RawMarkupKinds.html:t==="text/markdown"?Ci.RawMarkupKinds.markdown:t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules"?Ci.RawMarkupKinds.json:Ci.RawMarkupKinds.javascript}function A5(e,t){for(let n of e){if(!("name"in n)||!("value"in n))continue;let r=n,i=uu(r.name);if(i===null||i.toLowerCase()!==t)continue;let s=r.value;return s.length===1&&s[0].type===md.NodeTypes.TextNode?s[0].value:null}return null}var O5=new Set(["else","elsif","when"])});var MA=x(Q_=>{"use strict";d();Object.defineProperty(Q_,"__esModule",{value:!0});Q_.envelopeFromLine=N5;function N5(e,t){return{tagName:e.tagName,markupString:e.markup,markupOffset:e.markupOffset,markupEnd:e.markupOffset+e.markup.length,whitespaceStart:"",whitespaceEnd:"",blockStartPosition:{start:e.nameOffset,end:e.lineEnd},source:t}}});var UA=x(Ii=>{"use strict";d();Object.defineProperty(Ii,"__esModule",{value:!0});Ii.parseLiquidStatement=X_;Ii.parseLineBlockTag=jA;Ii.parseLineRawTag=BA;Ii.parseLineBlockBody=FA;Ii.parseLineBranchedBody=VA;Ii.parseLineBranchMarkup=$A;var rn=br(),yd=Jr(),bd=Zn(),RA=Gr(),_d=Rs(),vd=xt(),P5=Mf(),C5=Qc(),DA=MA(),gd=su(),qi=lo(),L5=dd(),q5=Gc();function X_(e,t,n,r,i){let s=i.lines[i.index-1],a=(0,DA.envelopeFromLine)(s,e.getSource());if(t==="#")return(0,rn.makeLiquidTagBaseCase)(a,void 0,void 0,void 0,void 0,!0);if(t.startsWith("end"))throw new bd.LiquidHTMLASTParsingError(`Unexpected end tag '${t}' in {% liquid %} block`,e.getSource(),s.nameOffset,s.lineEnd);let o=e.lineEnv.tagForName(t);if(!o)return(0,rn.makeLiquidTagBaseCase)(a);switch(o.kind){case yd.TagKind.Tag:{let c;try{let l=(0,vd.tokenizeMarkup)(n,r),f=new _d.MarkupParser(l,e.getSource(),r,a.markupEnd);e.isTolerant()&&f.enableTolerant();let m=o.parse(t,f,e);return f.isAtEnd()?(0,rn.makeLiquidTagNamed)(a,m):(0,rn.makeLiquidTagBaseCase)(a,void 0,void 0,void 0,"unexpected tokens after markup")}catch(l){return c=l instanceof Error?l.message:"unknown error",(0,rn.makeLiquidTagBaseCase)(a,void 0,void 0,void 0,c)}}case yd.TagKind.Block:return jA(e,o,a,n,r,i);case yd.TagKind.Raw:return BA(e,o,a,i);default:return(0,RA.assertNever)(o)}}function jA(e,t,n,r,i,s){let a,o=!1,c;try{let m=(0,vd.tokenizeMarkup)(r,i),p=new _d.MarkupParser(m,e.getSource());e.isTolerant()&&p.enableTolerant(),a=t.parse(n.tagName,p,e),p.isAtEnd()?o=!0:(a=void 0,c="unexpected tokens after markup")}catch(m){a=void 0,c=m instanceof Error?m.message:"unknown error"}if(t.branches.length===0){let{children:m,endPosition:p}=FA(e,n.tagName,s);return o?(0,rn.makeLiquidTagNamed)(n,a,m,p,{start:"",end:""}):(0,rn.makeLiquidTagBaseCase)(n,m,p,{start:"",end:""},c)}let{branches:l,endPosition:f}=VA(e,n.tagName,t,s);return o?(0,rn.makeLiquidTagNamed)(n,a,l,f,{start:"",end:""}):(0,rn.makeLiquidTagBaseCase)(n,l,f,{start:"",end:""},c)}function BA(e,t,n,r){let i=n.tagName,s=`end${i}`,a=r.index>0&&r.index<=r.lines.length?r.lines[r.index-1].lineEnd:n.blockStartPosition.end,o=r.index>0&&r.index<=r.lines.length?r.lines[r.index-1].lineEnd+1:n.blockStartPosition.end,c=(0,q5.findRawLineBodyEnd)(e.getSource(),r.lines,r.index,i,t.body,_=>{let k=e.lineEnv.tagForName(_);return k?.kind===yd.TagKind.Raw?k.body:void 0})??-1;if(c===-1)throw new bd.LiquidHTMLASTParsingError(`Unclosed raw tag '${i}' in {% liquid %} block`,e.getSource(),n.blockStartPosition.start,n.blockStartPosition.end);let l=r.lines[c],f=l.nameOffset,m=e.getSource(),p=m.slice(o,f),g=o<f?(0,qi.filterChildren)(qi.ChildFilterMode.Syntactic,[(0,rn.makeTextNode)(p,o,f,m)],m):[],v=(0,rn.makeRawMarkup)((0,L5.rawMarkupKindForTag)(i,p),p,g,a,f,m),b={start:l.nameOffset,end:l.nameOffset+s.length};return r.index=c+1,(0,rn.makeLiquidRawTag)(n,v,b,{start:"",end:""})}function FA(e,t,n){let r=[];for(;n.index<n.lines.length;){let i=n.lines[n.index];if(i.tagName===`end${t}`){n.index++;let s={start:i.nameOffset,end:i.nameOffset+i.tagName.length};return{children:r,endPosition:s}}n.index++,r.push(X_(e,i.tagName,i.markup,i.markupOffset,n))}if(e.lineAllowUnclosedDocumentNode){let i=n.lines.length>0?n.lines[n.lines.length-1].lineEnd:0;return{children:r,endPosition:{start:i,end:i}}}throw new bd.LiquidHTMLASTParsingError(`Unclosed block tag '${t}' in {% liquid %} block`,e.getSource(),0,0)}function VA(e,t,n,r){let i=[],s=r.index>0?r.lines[r.index-1].lineEnd:0,a=(0,rn.makeLiquidBranchUnnamed)(s,e.getSource()),o=[];for(;r.index<r.lines.length;){let c=r.lines[r.index];if(c.tagName===`end${t}`){(0,gd.finalizeBranch)(a,o,c.nameOffset,e.getSource(),e.lineParseHtml?qi.ChildFilterMode.StripEdges:qi.ChildFilterMode.Syntactic),i.push(a),r.index++;let l={start:c.nameOffset,end:c.nameOffset+c.tagName.length};return{branches:i,endPosition:l}}if((0,gd.isBranchName)(c.tagName)&&n.branches.includes(c.tagName)){(0,gd.finalizeBranch)(a,o,c.nameOffset,e.getSource(),e.lineParseHtml?qi.ChildFilterMode.StripEdges:qi.ChildFilterMode.Syntactic),i.push(a);let l=(0,DA.envelopeFromLine)(c,e.getSource()),f=$A(c.tagName,l,e.getSource(),e.isTolerant());a=(0,rn.makeLiquidBranchNamed)(l,f),o=[],r.index++;continue}r.index++,o.push(X_(e,c.tagName,c.markup,c.markupOffset,r))}if(e.lineAllowUnclosedDocumentNode){let c=r.lines.length>0?r.lines[r.lines.length-1].lineEnd:0;return(0,gd.finalizeBranch)(a,o,c,e.getSource(),e.lineParseHtml?qi.ChildFilterMode.StripEdges:qi.ChildFilterMode.Syntactic),i.push(a),{branches:i,endPosition:{start:c,end:c}}}throw new bd.LiquidHTMLASTParsingError(`Unclosed block tag '${t}' in {% liquid %} block`,e.getSource(),0,0)}function $A(e,t,n,r=!1){switch(e){case"elsif":try{let i=(0,vd.tokenizeMarkup)(t.markupString,t.markupOffset),s=new _d.MarkupParser(i,n);r&&s.enableTolerant();let a=(0,P5.elsifBranchParse)(e,s);return s.isAtEnd()?a:t.markupString.trim()}catch{return t.markupString.trim()}case"when":try{let i=(0,vd.tokenizeMarkup)(t.markupString,t.markupOffset),s=new _d.MarkupParser(i,n);r&&s.enableTolerant();let a=(0,C5.whenBranchParse)(e,s);return s.isAtEnd()?a:t.markupString.trim()}catch{return t.markupString.trim()}case"else":return"";default:return(0,RA.assertNever)(e)}}});var zA=x(lu=>{"use strict";d();Object.defineProperty(lu,"__esModule",{value:!0});lu.parseNode=R5;lu.parseYamlFrontmatter=HA;lu.advanceAsText=Mi;var At=gn(),Z_=br(),I5=Zn(),M5=Gr();function R5(e){if(e.dispatchParseHtml&&e.dispatchOpenHtmlComment!==null&&!e.isBlockTerminator())return e.parseHtmlComment();let t=e.peek();switch(t.type){case At.TokenType.Text:return e.advance(),(0,Z_.makeTextNode)(e.getSource().slice(t.start,t.end),t.start,t.end,e.getSource());case At.TokenType.YamlFrontmatter:return HA(e);case At.TokenType.EndOfInput:throw new I5.LiquidHTMLASTParsingError("Unexpected end of input in parseNode",e.getSource(),t.start,t.end);case At.TokenType.LiquidVariableOutputOpen:return e.parseLiquidVariableOutput();case At.TokenType.LiquidTagOpen:return e.parseLiquidTag();case At.TokenType.LiquidTagClose:case At.TokenType.LiquidVariableOutputClose:return Mi(e);case At.TokenType.HtmlTagOpen:return e.dispatchParseHtml?e.parseHtmlElement():Mi(e);case At.TokenType.HtmlCloseTagOpen:return e.dispatchParseHtml&&e.dispatchAllowUnclosedHtml?e.parseHtmlDanglingMarkerClose():e.dispatchParseHtml?e.parseOrphanedHtmlCloseTag():Mi(e);case At.TokenType.HtmlCommentOpen:return e.dispatchParseHtml?e.parseHtmlComment():(e.dispatchOpenHtmlComment===null&&(e.dispatchOpenHtmlComment={start:t.start,end:t.end}),Mi(e));case At.TokenType.HtmlDoctypeOpen:return e.dispatchParseHtml?e.parseHtmlDoctype():Mi(e);case At.TokenType.HtmlCommentClose:return e.dispatchOpenHtmlComment=null,Mi(e);case At.TokenType.HtmlTagClose:case At.TokenType.HtmlSelfClose:case At.TokenType.HtmlEquals:case At.TokenType.HtmlQuoteOpen:case At.TokenType.HtmlQuoteClose:return Mi(e);default:return(0,M5.assertNever)(t.type)}}function HA(e){let t=e.advance(),n=e.getSource(),r=n.slice(t.start,t.end),i=r.indexOf(`
|
|
33
|
+
`),s=r.lastIndexOf("---"),a=i!==-1&&s>i?r.slice(i+1,s):"";return(0,Z_.makeYamlFrontmatter)(a,t.start,t.end,n)}function Mi(e){let t=e.advance(),n=e.getSource();return(0,Z_.makeTextNode)(n.slice(t.start,t.end),t.start,t.end,n)}});var nv=x(vo=>{"use strict";d();Object.defineProperty(vo,"__esModule",{value:!0});vo.finalizeBranch=vo.DocumentParser=void 0;var WA=gn(),D5=WE(),j5=br(),GA=lo();Jr();var B5=nA(),ev=su(),F5=dd(),V5=yA(),Vs=IA(),$5=UA(),JA=zA(),tv=class extends D5.ParserBase{env;_parseHtml;_allowUnclosedHtml;_allowUnclosedDocumentNode;_pairDanglingCloseTags=!1;_inAttributeContext=!1;_inAttributeValueContext=!1;_openHtmlComment=null;_opaqueHtmlComments;constructor(t,n,r,i,s=!1,a=!1,o){super(t,n,r.usesBuiltinTags()?void 0:{rawTags:r,parseHtml:i},o),this.env=r,this._parseHtml=i,this._allowUnclosedHtml=s,this._allowUnclosedDocumentNode=s,this._opaqueHtmlComments=a}get rawParseHtml(){return this._parseHtml}set rawParseHtml(t){this._parseHtml=t}get blockEnv(){return this.env}get blockParseHtml(){return this._parseHtml}get blockAllowUnclosedHtml(){return this._allowUnclosedHtml}set blockAllowUnclosedHtml(t){this._allowUnclosedHtml=t}get blockAllowUnclosedDocumentNode(){return this._allowUnclosedDocumentNode}get blockInAttributeContext(){return this._inAttributeContext}get blockInAttributeValueContext(){return this._inAttributeValueContext}set blockInAttributeValueContext(t){this._inAttributeValueContext=t}get htmlParseHtml(){return this._parseHtml}set htmlParseHtml(t){this._parseHtml=t}get htmlOpenComment(){return this._openHtmlComment}set htmlOpenComment(t){this._openHtmlComment=t}get htmlOpaqueComments(){return this._opaqueHtmlComments}get htmlUsesBuiltinTags(){return this.env.usesBuiltinTags()}get htmlAllowUnclosedHtml(){return this._allowUnclosedHtml}set htmlAllowUnclosedHtml(t){this._allowUnclosedHtml=t}get htmlPairDanglingCloseTags(){return this._pairDanglingCloseTags}set pairDanglingCloseTags(t){this._pairDanglingCloseTags=t}get htmlInAttributeContext(){return this._inAttributeContext}set htmlInAttributeContext(t){this._inAttributeContext=t}get htmlInAttributeValueContext(){return this._inAttributeValueContext}set htmlInAttributeValueContext(t){this._inAttributeValueContext=t}get lineEnv(){return this.env}get lineParseHtml(){return this._parseHtml}get lineAllowUnclosedDocumentNode(){return this._allowUnclosedDocumentNode}get dispatchParseHtml(){return this._parseHtml}get dispatchAllowUnclosedHtml(){return this._allowUnclosedHtml}get dispatchOpenHtmlComment(){return this._openHtmlComment}set dispatchOpenHtmlComment(t){this._openHtmlComment=t}tagForName(t){return this.env.tagForName(t)}parseDocument(){let t=[];for(this.check(WA.TokenType.YamlFrontmatter)&&t.push((0,JA.parseNode)(this));!this.isAtEnd();)t.push(this.parseNodeInScope(t));return this._openHtmlComment=null,(0,j5.makeDocumentNode)((0,GA.filterChildren)(GA.ChildFilterMode.Syntactic,t,this.source),this.source)}parseNode(){return(0,JA.parseNode)(this)}parseNodeInScope(t){return this.check(WA.TokenType.HtmlCloseTagOpen)&&(0,Vs.closesBranchOpenedElement)(this,t)?this.parseHtmlDanglingMarkerClose():this.parseNode()}parseLiquidTag(){return(0,V5.parseLiquidTag)(this)}parseLiquidVariableOutput(){return(0,B5.parseLiquidVariableOutput)(this)}peekTagName(){return(0,ev.peekTagName)(this)}isBlockTerminator(){return(0,ev.isBlockTerminator)(this)}consumeEndTag(){return(0,ev.consumeEndTag)(this)}parseLiquidInRange(t,n){return(0,F5.parseLiquidInRange)(this,t,n)}parseBranchAttributes(){return(0,Vs.parseBranchAttributesImpl)(this)}parseLiquidStatement(t,n,r,i){return(0,$5.parseLiquidStatement)(this,t,n,r,i)}parseHtmlElement(){return(0,Vs.parseHtmlElement)(this)}parseHtmlComment(){return(0,Vs.parseHtmlComment)(this)}parseHtmlDoctype(){return(0,Vs.parseHtmlDoctype)(this)}parseOrphanedHtmlCloseTag(){return(0,Vs.parseOrphanedHtmlCloseTag)(this)}parseHtmlDanglingMarkerClose(){return(0,Vs.parseHtmlDanglingMarkerClose)(this)}};vo.DocumentParser=tv;var U5=su();Object.defineProperty(vo,"finalizeBranch",{enumerable:!0,get:function(){return U5.finalizeBranch}})});var fo=x(nr=>{"use strict";d();Object.defineProperty(nr,"__esModule",{value:!0});nr.RawMarkupKinds=nr.LiquidLiteralValues=void 0;nr.isBranchedTag=H5;nr.toLiquidAST=z5;nr.toLiquidHtmlAST=W5;nr.walk=rv;nr.isLiquidHtmlNode=iv;var sv=Qe(),YA=nv(),QA=gn(),XA=Jr();nr.LiquidLiteralValues={nil:null,null:null,true:!0,false:!1,blank:"",empty:""};var KA;(function(e){e.css="css",e.html="html",e.javascript="javascript",e.json="json",e.markdown="markdown",e.typescript="typescript",e.text="text"})(KA||(nr.RawMarkupKinds=KA={}));function H5(e){return e.type===sv.NodeTypes.LiquidTag&&["if","for","unless","case"].includes(e.name)}function z5(e,t={allowUnclosedDocumentNode:!0,mode:"tolerant"}){let n=t.environment??XA.Environment.default(),r={rawTags:n,builtinRawTags:n.usesBuiltinTags(),parseHtml:!1},i=(0,QA.tokenize)(e,r);return new YA.DocumentParser(i,e,n,!1,t.allowUnclosedDocumentNode,!1,r.rawBodyEnds).parseDocument()}function W5(e,t={allowUnclosedDocumentNode:!1,mode:"tolerant"}){let n=t.environment??XA.Environment.default(),r={rawTags:n,builtinRawTags:n.usesBuiltinTags(),parseHtml:!0},i=(0,QA.tokenize)(e,r),s=new YA.DocumentParser(i,e,n,!0,t.allowUnclosedDocumentNode,t.opaqueHtmlComments,r.rawBodyEnds);return s.pairDanglingCloseTags=t.pairDanglingCloseTags??!1,s.parseDocument()}function rv(e,t,n){for(let r of Object.keys(e)){if(sv.nonTraversableProperties.has(r))continue;let i=e[r];Array.isArray(i)?i.filter(iv).forEach(s=>rv(s,t,e)):iv(i)&&rv(i,t,e)}t(e,n)}function iv(e){return e!==null&&typeof e=="object"&&"type"in e&&sv.NodeTypes.hasOwnProperty(e.type)}});var tO=x(kr=>{"use strict";d();Object.defineProperty(kr,"__esModule",{value:!0});kr.TolerantDocumentParser=kr.RESYNC_TOKENS=void 0;kr.isResyncToken=ZA;kr.tokenTypeName=Y5;kr.makeLiquidErrorNode=eO;var G5=nv(),Ri=gn(),J5=Qe(),K5=Zn();kr.RESYNC_TOKENS=new Set([Ri.TokenType.LiquidTagOpen,Ri.TokenType.LiquidVariableOutputOpen,Ri.TokenType.HtmlTagOpen,Ri.TokenType.HtmlCloseTagOpen,Ri.TokenType.HtmlCommentOpen,Ri.TokenType.HtmlDoctypeOpen,Ri.TokenType.EndOfInput]);function ZA(e){return kr.RESYNC_TOKENS.has(e)}function Y5(e){return e}function eO(e,t,n,r,i){return{type:J5.NodeTypes.LiquidErrorNode,position:{start:e,end:t},source:n,message:r,found:i}}var av=class extends G5.DocumentParser{isTolerant(){return!0}parseNode(){let t=this.peek(),n=this.getPosition();try{return super.parseNode()}catch(r){if(!(r instanceof K5.LiquidHTMLASTParsingError))throw r;let i=this.getSource(),s=this.peek().type;for(this.getPosition()<=n&&this.advance();!this.isAtEnd()&&!this.isResyncPoint();)this.advance();let a=this.peek().start;return eO(t.start,a,i,r.message,s)}}isResyncPoint(){let t=this.peek().type;return ZA(t)||t===Ri.TokenType.HtmlCommentClose&&this.htmlOpenComment!==null}};kr.TolerantDocumentParser=av});var sO=x(fu=>{"use strict";d();Object.defineProperty(fu,"__esModule",{value:!0});fu.toTolerantLiquidAST=Z5;fu.toTolerantLiquidHtmlAST=eH;fu.findErrorNodeAtOffset=tH;var Q5=fo(),nO=tO(),rO=gn(),iO=Jr(),X5=Qe();function Z5(e,t={allowUnclosedDocumentNode:!0,mode:"tolerant"}){let n=t.environment??iO.Environment.default(),r={rawTags:n,builtinRawTags:n.usesBuiltinTags(),parseHtml:!1},i=(0,rO.tokenize)(e,r);return new nO.TolerantDocumentParser(i,e,n,!1,t.allowUnclosedDocumentNode,!1,r.rawBodyEnds).parseDocument()}function eH(e,t={allowUnclosedDocumentNode:!0,mode:"tolerant"}){let n=t.environment??iO.Environment.default(),r={rawTags:n,builtinRawTags:n.usesBuiltinTags(),parseHtml:!0},i=(0,rO.tokenize)(e,r);return new nO.TolerantDocumentParser(i,e,n,!0,t.allowUnclosedDocumentNode,t.opaqueHtmlComments,r.rawBodyEnds).parseDocument()}function tH(e,t){let n=new Map,r=[];if((0,Q5.walk)(e,(o,c)=>{n.set(o,c),o.type===X5.NodeTypes.LiquidErrorNode&&t>=o.position.start&&t<=o.position.end&&r.push(o)}),r.length===0)return null;let i=o=>{let c=[],l=n.get(o);for(;l!==void 0;)c.push(l),l=n.get(l);return c.reverse()},s=r[0],a=i(s).length;for(let o=1;o<r.length;o++){let c=i(r[o]).length;c>a&&(s=r[o],a=c)}return{node:s,ancestors:i(s)}}});var aO=x(kd=>{"use strict";d();Object.defineProperty(kd,"__esModule",{value:!0});kd.getConditionalComment=void 0;var nH=/(<!--\[if[^\]]*]>)((.|\n)*)(<!\[endif\]-->)$/,rH=e=>{let t=e.match(nH);if(t)return{startTag:t[1],body:t[2].trim(),endTag:t[4]}};kd.getConditionalComment=rH});var cO=x($s=>{"use strict";d();Object.defineProperty($s,"__esModule",{value:!0});$s.LaxTagRecoveryError=void 0;$s.laxRecoverVariable=oH;$s.laxRecoverTagMarkup=cH;$s.laxRecoverWhenValues=uH;var ov=Rs(),cv=xt(),iH=td(),sH=Qc(),oO=De(),aH={parseLiquidStatement(e,t,n,r){throw new Error("lax-recover: nested statement parsing is not supported during recovery")}};function oH(e,t,n){try{let r=(0,cv.tokenizeMarkup)(e,n);return new ov.MarkupParser(r,t,n,n+e.length).enableLax().liquidVariable()}catch{return}}function cH(e,t,n,r,i){let s=iH.builtinTags[e];if(!s||s.kind!==oO.TagKind.Tag&&s.kind!==oO.TagKind.Block)throw new Sd(`Unknown tag '${e}'`);if((e==="increment"||e==="decrement")&&t.trim()==="")return;let a=(0,cv.tokenizeMarkup)(t,r),o=new ov.MarkupParser(a,n,r,i).enableLax();return s.parse(e,o,aH)}var Sd=class extends Error{constructor(t){super(t),this.name="LaxTagRecoveryError"}};$s.LaxTagRecoveryError=Sd;function uH(e,t,n,r){try{let i=(0,cv.tokenizeMarkup)(e,n),s=new ov.MarkupParser(i,t,n,r).enableLax();return(0,sH.whenBranchParse)("when",s)}catch{return}}});var ue=x(ve=>{"use strict";d();var lH=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),uv=ve&&ve.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&lH(t,e,n)};Object.defineProperty(ve,"__esModule",{value:!0});ve.LaxTagRecoveryError=ve.laxRecoverWhenValues=ve.laxRecoverTagMarkup=ve.laxRecoverVariable=ve.builtinTags=ve.MarkupParser=ve.MarkupTokenType=ve.tokenizeMarkup=ve.TokenType=ve.tokenize=ve.getConditionalComment=ve.BLOCKS=ve.VOID_ELEMENTS=ve.RAW_TAGS=ve.TAGS_WITHOUT_MARKUP=ve.toTolerantLiquidHtmlAST=ve.toTolerantLiquidAST=ve.findErrorNodeAtOffset=void 0;uv(fo(),ve);uv(Qe(),ve);uv(Zn(),ve);var lv=sO();Object.defineProperty(ve,"findErrorNodeAtOffset",{enumerable:!0,get:function(){return lv.findErrorNodeAtOffset}});Object.defineProperty(ve,"toTolerantLiquidAST",{enumerable:!0,get:function(){return lv.toTolerantLiquidAST}});Object.defineProperty(ve,"toTolerantLiquidHtmlAST",{enumerable:!0,get:function(){return lv.toTolerantLiquidHtmlAST}});var Td=z_();Object.defineProperty(ve,"TAGS_WITHOUT_MARKUP",{enumerable:!0,get:function(){return Td.TAGS_WITHOUT_MARKUP}});Object.defineProperty(ve,"RAW_TAGS",{enumerable:!0,get:function(){return Td.RAW_TAGS}});Object.defineProperty(ve,"VOID_ELEMENTS",{enumerable:!0,get:function(){return Td.VOID_ELEMENTS}});Object.defineProperty(ve,"BLOCKS",{enumerable:!0,get:function(){return Td.BLOCKS}});var fH=aO();Object.defineProperty(ve,"getConditionalComment",{enumerable:!0,get:function(){return fH.getConditionalComment}});var uO=gn();Object.defineProperty(ve,"tokenize",{enumerable:!0,get:function(){return uO.tokenize}});Object.defineProperty(ve,"TokenType",{enumerable:!0,get:function(){return uO.TokenType}});var lO=xt();Object.defineProperty(ve,"tokenizeMarkup",{enumerable:!0,get:function(){return lO.tokenizeMarkup}});Object.defineProperty(ve,"MarkupTokenType",{enumerable:!0,get:function(){return lO.MarkupTokenType}});var dH=Rs();Object.defineProperty(ve,"MarkupParser",{enumerable:!0,get:function(){return dH.MarkupParser}});var pH=td();Object.defineProperty(ve,"builtinTags",{enumerable:!0,get:function(){return pH.builtinTags}});var wd=cO();Object.defineProperty(ve,"laxRecoverVariable",{enumerable:!0,get:function(){return wd.laxRecoverVariable}});Object.defineProperty(ve,"laxRecoverTagMarkup",{enumerable:!0,get:function(){return wd.laxRecoverTagMarkup}});Object.defineProperty(ve,"laxRecoverWhenValues",{enumerable:!0,get:function(){return wd.laxRecoverWhenValues}});Object.defineProperty(ve,"LaxTagRecoveryError",{enumerable:!0,get:function(){return wd.LaxTagRecoveryError}})});var dv=x((Fge,fv)=>{d();var Ed=process||{},fO=Ed.argv||[],xd=Ed.env||{},hH=!(xd.NO_COLOR||fO.includes("--no-color"))&&(!!xd.FORCE_COLOR||fO.includes("--color")||Ed.platform==="win32"||(Ed.stdout||{}).isTTY&&xd.TERM!=="dumb"||!!xd.CI),mH=(e,t,n=e)=>r=>{let i=""+r,s=i.indexOf(t,e.length);return~s?e+gH(i,t,n,s)+t:e+i+t},gH=(e,t,n,r)=>{let i="",s=0;do i+=e.substring(s,r)+n,s=r+t.length,r=e.indexOf(t,s);while(~r);return i+e.substring(s)},dO=(e=hH)=>{let t=e?mH:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};fv.exports=dO();fv.exports.createColors=dO});var Nd=x(($ge,hO)=>{"use strict";d();var Ad=/[\t\n\f\r "#'()/;[\\\]{}]/g,Od=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,yH=/.[\r\n"'(/\\]/,pO=/[\da-f]/i;hO.exports=function(t,n={}){let r=t.css.valueOf(),i=n.ignoreErrors,s,a,o,c,l,f,m,p,g,v,b=r.length,_=0,k=[],w=[],T=-1;function y(){return _}function A(j){throw t.error("Unclosed "+j,_)}function N(){return w.length===0&&_>=b}function O(j){if(w.length)return w.pop();if(_>=b)return;let M=j?j.ignoreUnclosed:!1;switch(s=r.charCodeAt(_),s){case 10:case 32:case 9:case 13:case 12:{c=_;do c+=1,s=r.charCodeAt(c);while(s===32||s===10||s===9||s===13||s===12);f=["space",r.slice(_,c)],_=c-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let C=String.fromCharCode(s);f=[C,C,_];break}case 40:{if(v=k.length?k.pop()[1]:"",g=r.charCodeAt(_+1),v==="url"&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){c=_;do{if(m=!1,c=r.indexOf(")",c+1),c===-1)if(i||M){c=_;break}else A("bracket");for(p=c;r.charCodeAt(p-1)===92;)p-=1,m=!m}while(m);f=["brackets",r.slice(_,c+1),_,c],_=c}else _<=T?f=["(","(",_]:(c=r.indexOf(")",_+1),a=r.slice(_,c+1),c===-1||yH.test(a)?(T=c===-1?b:c,f=["(","(",_]):(f=["brackets",a,_,c],_=c));break}case 39:case 34:{l=s===39?"'":'"',c=_;do{if(m=!1,c=r.indexOf(l,c+1),c===-1)if(i||M){c=_+1;break}else A("string");for(p=c;r.charCodeAt(p-1)===92;)p-=1,m=!m}while(m);f=["string",r.slice(_,c+1),_,c],_=c;break}case 64:{Ad.lastIndex=_+1,Ad.test(r),Ad.lastIndex===0?c=r.length-1:c=Ad.lastIndex-2,f=["at-word",r.slice(_,c+1),_,c],_=c;break}case 92:{for(c=_,o=!0;r.charCodeAt(c+1)===92;)c+=1,o=!o;if(s=r.charCodeAt(c+1),o&&s!==47&&s!==32&&s!==10&&s!==9&&s!==13&&s!==12&&(c+=1,pO.test(r.charAt(c)))){for(;pO.test(r.charAt(c+1));)c+=1;r.charCodeAt(c+1)===32&&(c+=1)}f=["word",r.slice(_,c+1),_,c],_=c;break}default:{s===47&&r.charCodeAt(_+1)===42?(c=r.indexOf("*/",_+2)+1,c===0&&(i||M?c=r.length:A("comment")),f=["comment",r.slice(_,c+1),_,c],_=c):(Od.lastIndex=_+1,Od.test(r),Od.lastIndex===0?c=r.length-1:c=Od.lastIndex-2,f=["word",r.slice(_,c+1),_,c],k.push(f),_=c);break}}return _++,f}function q(j){w.push(j)}return{back:q,endOfFile:N,nextToken:O,position:y}}});var pv=x((Hge,yO)=>{"use strict";d();var Yt=dv(),_H=Nd(),mO;function vH(e){mO=e}var bH={";":Yt.yellow,":":Yt.yellow,"(":Yt.cyan,")":Yt.cyan,"[":Yt.yellow,"]":Yt.yellow,"{":Yt.yellow,"}":Yt.yellow,"at-word":Yt.cyan,brackets:Yt.cyan,call:Yt.cyan,class:Yt.yellow,comment:Yt.gray,hash:Yt.magenta,string:Yt.green};function kH([e,t],n){if(e==="word"){if(t[0]===".")return"class";if(t[0]==="#")return"hash"}if(!n.endOfFile()){let r=n.nextToken();if(n.back(r),r[0]==="brackets"||r[0]==="(")return"call"}return e}function gO(e){let t=_H(new mO(e),{ignoreErrors:!0}),n="";for(;!t.endOfFile();){let r=t.nextToken(),i=bH[kH(r,t)];i?n+=r[1].split(/\r?\n/).map(s=>i(s)).join(`
|
|
34
|
+
`):n+=r[1]}return n}gO.registerInput=vH;yO.exports=gO});var Pd=x((Wge,bO)=>{"use strict";d();var _O=dv(),vO=pv(),du=class e extends Error{constructor(t,n,r,i,s,a){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),i&&(this.source=i),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}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(t){if(!this.source)return"";let n=this.source;t==null&&(t=_O.isColorSupported);let r=f=>f,i=f=>f,s=f=>f;if(t){let{bold:f,gray:m,red:p}=_O.createColors(!0);i=g=>f(p(g)),r=g=>m(g),vO&&(s=g=>vO(g))}let a=n.split(/\r?\n/),o=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),l=String(c).length;return a.slice(o,c).map((f,m)=>{let p=o+1+m,g=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(f.length>160){let b=20,_=Math.max(0,this.column-b),k=Math.max(this.column+b,this.endColumn+b),w=f.slice(_,k),T=r(g.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return i(">")+r(g)+s(w)+`
|
|
35
|
+
`+T+i("^")}let v=r(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(g)+s(f)+`
|
|
36
|
+
`+v+i("^")}return" "+r(g)+s(f)}).join(`
|
|
37
|
+
`)}toString(){let t=this.showSourceCode();return t&&(t=`
|
|
38
|
+
|
|
39
|
+
`+t+`
|
|
40
|
+
`),this.name+": "+this.message+t}};bO.exports=du;du.default=du});var hv=x((Jge,xO)=>{"use strict";d();var SH=/(<)(\/?style\b)/gi,TH=/(<)(!--)/g,wH=/[\t\n\f\r "#'()/;[\\\]{}]/;function rr(e){return typeof e!="string"||!e.includes("<")?e:e.replace(SH,"\\3c $2").replace(TH,"\\3c $2")}var kO={after:`
|
|
41
|
+
`,beforeClose:`
|
|
42
|
+
`,beforeComment:`
|
|
43
|
+
`,beforeDecl:`
|
|
44
|
+
`,beforeOpen:" ",beforeRule:`
|
|
45
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function xH(e){return e[0].toUpperCase()+e.slice(1)}function SO(e,t){let n="@"+t.name,r=t.params?e.rawValue(t,"params"):"",i=t.raws.afterName;return typeof i>"u"?i=r?" ":"":i===""&&r&&!wH.test(r[0])&&(i=" "),n+i+r}function wO(e,t,n){let r=n.nodes,i=r.length-1;for(;i>0&&r[i].type==="comment";)i-=1;let s=e.raw(n,"semicolon"),a=n.type==="document";for(let o=r.length-1;o>=0;o--){let c=r[o],l=i!==o||s;!l&&o<r.length-1&&(c.type==="atrule"&&!c.nodes||c.type==="decl"&&c.prop.startsWith("--"))&&(l=!0),t.push({document:a,node:c,semicolon:l})}}function TO(e,t,n,r){let i=e.raw(n,"between","beforeOpen");e.builder(rr(r+i)+"{",n,"start");let s=n.nodes&&n.nodes.length,a=()=>{let o=s?e.raw(n,"after"):e.raw(n,"after","emptyBody");o&&e.builder(rr(o)),e.builder("}",n,"end"),n.type==="rule"&&n.raws.ownSemicolon&&e.builder(rr(n.raws.ownSemicolon),n,"end")};s?(t.push(a),wO(e,t,n)):a()}var pu=class e{constructor(t){this.builder=t}atrule(t,n){let r=SO(this,t);if(t.nodes)this.block(t,r);else{let i=(t.raws.between||"")+(n?";":"");this.builder(rr(r+i),t)}}beforeAfter(t,n){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):n==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let i=t.parent,s=0;for(;i&&i.type!=="root";)s+=1,i=i.parent;if(r.includes(`
|
|
46
|
+
`)){let a=this.raw(t,null,"indent");if(a.length)for(let o=0;o<s;o++)r+=a}return r}block(t,n){let r=this.raw(t,"between","beforeOpen");this.builder(rr(n+r)+"{",t,"start");let i;t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(rr(i)),this.builder("}",t,"end")}body(t){let n=e.prototype,r=["atrule","block","body","rule","stringify"].every(s=>this[s]===n[s]),i=[];for(wO(this,i,t);i.length>0;){let s=i.pop();if(typeof s=="function"){s();continue}let a=s.node,o=this.raw(a,"before");o&&this.builder(s.document?o:rr(o)),r&&a.type==="rule"?TO(this,i,a,this.rawValue(a,"selector")):r&&a.type==="atrule"&&a.nodes?TO(this,i,a,SO(this,a)):this.stringify(a,s.semicolon)}}comment(t){let n=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(rr("/*"+n+t.text+r+"*/"),t)}decl(t,n){let r=t.raws,i=this.raw(t,"between","colon"),s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=r.important||" !important"),n&&(s+=";"),this.builder(rr(s),t)}document(t){this.body(t)}raw(t,n,r){let i;if(r||(r=n),n&&(i=t.raws[n],typeof i<"u"))return i;let s=t.parent;if(r==="before"&&(!s||s.type==="root"&&s.first===t||s&&s.type==="document"))return"";if(!s)return kO[r];let a=t.root(),o=a.rawCache||(a.rawCache={});if(typeof o[r]<"u")return o[r];if(r==="before"||r==="after")return this.beforeAfter(t,r);{let c="raw"+xH(r);this[c]?i=this[c](a,t):a.walk(l=>{if(i=l.raws[n],typeof i<"u")return!1})}return typeof i>"u"&&(i=kO[r]),o[r]=i,i}rawBeforeClose(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
|
|
47
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(t,n){let r;return t.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
48
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,n){let r;return t.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
49
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let n;return t.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(t){let n;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
|
|
50
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(t){let n;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(t){if(t.raws.indent)return t.raws.indent;let n;return t.walk(r=>{let i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&typeof r.raws.before<"u"){let s=r.raws.before.split(`
|
|
51
|
+
`);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let r=t[n],i=t.raws[n];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\uFEFF",t,"start"),this.body(t),t.raws.after){let n=t.raws.after,r=t.parent&&t.parent.type==="document";this.builder(r?n:rr(n))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(rr(t.raws.ownSemicolon),t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};xO.exports=pu;pu.default=pu});var hu=x((Yge,EO)=>{"use strict";d();var EH=hv();function mv(e,t){new EH(t).stringify(e)}EO.exports=mv;mv.default=mv});var mu=x((Xge,gv)=>{"use strict";d();gv.exports.isClean=Symbol("isClean");gv.exports.my=Symbol("my")});var _u=x((eye,AO)=>{"use strict";d();var AH=Pd(),OH=hv(),NH=hu(),{isClean:gu,my:PH}=mu();function CH(e,t){let n=new e.constructor,r=[[e,n,t]];for(;r.length>0;){let[i,s,a]=r.pop();for(let o in i){if(!Object.prototype.hasOwnProperty.call(i,o)||o==="proxyCache")continue;let c=i[o],l=typeof c;if(o==="parent"&&l==="object")a&&(s[o]=a);else if(o==="source")s[o]=c;else if(Array.isArray(c)){let f=[];s[o]=f;for(let m of c){let p=new m.constructor;f.push(p),r.push([m,p,s])}}else{if(l==="object"&&c!==null){let f=new c.constructor;r.push([c,f,void 0]),c=f}s[o]=c}}}return n}function Sr(e,t){if(t&&typeof t.offset<"u")return t.offset;let n=1,r=1,i=0;for(let s=0;s<e.length;s++){if(r===t.line&&n===t.column){i=s;break}e[s]===`
|
|
52
|
+
`?(n=1,r+=1):n+=1}return i}var yu=class e{get proxyOf(){return this}constructor(t={}){this.raws={},this[gu]=!1,this[PH]=!0;for(let n of Object.keys(t))if(n!=="__proto__")if(n==="nodes"){this.nodes=[];for(let r of t[n])typeof r.clone=="function"&&r.parent?this.append(r.clone()):this.append(r)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=CH(this);for(let r in t)n[r]=t[r];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:r,start:i}=this.rangeBy(n);return this.source.input.error(t,{column:i.column,line:i.line},{column:r.column,line:r.line},n)}return new AH(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markClean(){this[gu]=!0}markDirty(){if(this[gu]){this[gu]=!1;let t=this;for(;t=t.parent;)t[gu]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:Sr(n,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){let s=n.slice(Sr(n,this.source.start),Sr(n,this.source.end)).indexOf(t.word);s!==-1&&(r=this.positionInside(s))}return r}positionInside(t){let n=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,s=Sr(i,this.source.start),a=s+t;for(let o=s;o<a;o++)i[o]===`
|
|
53
|
+
`?(n=1,r+=1):n+=1;return{column:n,line:r,offset:a}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:Sr(n,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:Sr(n,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){let a=n.slice(Sr(n,this.source.start),Sr(n,this.source.end)).indexOf(t.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:Sr(n,t.start)}:typeof t.index=="number"&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:Sr(n,t.end)}:typeof t.endIndex=="number"?i=this.positionInside(t.endIndex):typeof t.index=="number"&&(i=this.positionInside(t.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,n){return new OH().raw(this,t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let n=this,r=!1;for(let i of t)i===this?r=!0:r?(this.parent.insertAfter(n,i),n=i):this.parent.insertBefore(n,i);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,n){let r=n==null;n=n||new Map;let i=[],s=[[this,i,0]];for(let o=0;o<s.length;o++){let[c,l,f]=s[o],m={};l[f]=m;for(let p in c){if(!Object.prototype.hasOwnProperty.call(c,p)||p==="parent"||p==="proxyCache")continue;let g=c[p];if(Array.isArray(g)){let v=[];m[p]=v;for(let b=0;b<g.length;b++){let _=g[b];typeof _=="object"&&_.toJSON?_.toJSON===e.prototype.toJSON?s.push([_,v,b]):v[b]=_.toJSON(null,n):v[b]=_}}else if(typeof g=="object"&&g.toJSON)g.toJSON===e.prototype.toJSON?s.push([g,m,p]):m[p]=g.toJSON(null,n);else if(p==="source"){if(g==null)continue;let v=n.get(g.input);v==null&&(v=n.size,n.set(g.input,v)),m[p]={end:g.end,inputId:v,start:g.start}}else m[p]=g}}let a=i[0];return r&&(a.inputs=[...n.keys()].map(o=>o.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=NH){t.stringify&&(t=t.stringify);let n="";return t(this,r=>{n+=r}),n}warn(t,n,r={}){let i={node:this};for(let s in r)i[s]=r[s];return t.warn(n,i)}};AO.exports=yu;yu.default=yu});var bo=x((nye,OO)=>{"use strict";d();var LH=_u(),vu=class extends LH{constructor(t){super(t),this.type="comment"}};OO.exports=vu;vu.default=vu});var ku=x((iye,NO)=>{"use strict";d();var qH=_u(),bu=class extends qH{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}};NO.exports=bu;bu.default=bu});var Qr=x((aye,DO)=>{"use strict";d();var CO=bo(),LO=ku(),PO=_u(),{isClean:qO,my:IO}=mu(),yv,MO,RO,_v;function IH(e){let t=e.slice();for(;t.length>0;){let n=t.pop();if(delete n.source,n.nodes){n.nodes=n.nodes.slice();for(let r of n.nodes)t.push(r)}}return e.slice()}function MH(e){let t=[e];for(;t.length>0;){let n=t.pop();if(n[qO]=!1,n.proxyOf.nodes)for(let r of n.proxyOf.nodes)t.push(r)}}var Tr=class e extends PO{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(...t){for(let n of t){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){let n=[this];for(;n.length>0;){let r=n.pop();if(r!==this&&r.cleanRaws!==e.prototype.cleanRaws){r.cleanRaws(t);continue}if(PO.prototype.cleanRaws.call(r,t),r.nodes)for(let i of r.nodes)n.push(i)}}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=t(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:t[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>t[n](...r.map(i=>typeof i=="function"?(s,a)=>i(s.toProxy(),a):i)):n==="every"||n==="some"?r=>t[n]((i,...s)=>r(i.toProxy(),...s)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let r=this.index(t),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<s&&(this.indexes[a]=s+i.length);return this.markDirty(),this}insertBefore(t,n){let r=this.index(t),i=r===0?"prepend":!1,s=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(t);for(let o of s)this.proxyOf.nodes.splice(r,0,o);let a;for(let o in this.indexes)a=this.indexes[o],r<=a&&(this.indexes[o]=a+s.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=IH(MO(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new LO(t)]}else if(t.selector||t.selectors)t=[new _v(t)];else if(t.name)t=[new yv(t)];else if(t.text)t=[new CO(t)];else throw new Error("Unknown node type in node creation");return t.map(i=>(i[IO]||e.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[qO]&&MH(i),i.raws||(i.raws={}),typeof i.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(i.raws.before=n.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(!this.proxyOf.nodes)return;let n=[{iterator:this.getIterator(),node:this.proxyOf}];for(;n.length>0;){let{iterator:r,node:i}=n[n.length-1],s=i.indexes[r];if(s>=i.proxyOf.nodes.length){delete i.indexes[r],n.pop();let c=n[n.length-1];c&&(c.node.indexes[c.iterator]+=1);continue}let a=i.proxyOf.nodes[s],o;try{o=t(a,s)}catch(c){throw a.addToError(c)}if(o===!1){for(let c of n)delete c.node.indexes[c.iterator];return!1}a.walk&&a.proxyOf.nodes?n.push({iterator:a.getIterator(),node:a}):i.indexes[r]+=1}}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};Tr.registerParse=e=>{MO=e};Tr.registerRule=e=>{_v=e};Tr.registerAtRule=e=>{yv=e};Tr.registerRoot=e=>{RO=e};DO.exports=Tr;Tr.default=Tr;Tr.rebuild=e=>{let t=[e];for(;t.length>0;){let n=t.pop();if(n.type==="atrule"?Object.setPrototypeOf(n,yv.prototype):n.type==="rule"?Object.setPrototypeOf(n,_v.prototype):n.type==="decl"?Object.setPrototypeOf(n,LO.prototype):n.type==="comment"?Object.setPrototypeOf(n,CO.prototype):n.type==="root"&&Object.setPrototypeOf(n,RO.prototype),n[IO]=!0,n.nodes)for(let r of n.nodes)t.push(r)}}});var Cd=x((cye,BO)=>{"use strict";d();var jO=Qr(),ko=class extends jO{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};BO.exports=ko;ko.default=ko;jO.registerAtRule(ko)});var Ld=x((lye,$O)=>{"use strict";d();var RH=Qr(),FO,VO,Us=class extends RH{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new FO(new VO,this,t).stringify()}};Us.registerLazyResult=e=>{FO=e};Us.registerProcessor=e=>{VO=e};$O.exports=Us;Us.default=Us});var HO=x((dye,UO)=>{d();var DH="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",jH=(e,t=21)=>(n=t)=>{let r="",i=n|0;for(;i-- >0;)r+=e[Math.random()*e.length|0];return r},BH=(e=21)=>{let t="",n=e|0;for(;n-- >0;)t+=DH[Math.random()*64|0];return t};UO.exports={nanoid:BH,customAlphabet:jH}});var WO=x(vv=>{d();var zO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");vv.encode=function(e){if(0<=e&&e<zO.length)return zO[e];throw new TypeError("Must be between 0 and 63: "+e)};vv.decode=function(e){var t=65,n=90,r=97,i=122,s=48,a=57,o=43,c=47,l=26,f=52;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+l:s<=e&&e<=a?e-s+f:e==o?62:e==c?63:-1}});var Sv=x(kv=>{d();var GO=WO(),bv=5,JO=1<<bv,KO=JO-1,YO=JO;function FH(e){return e<0?(-e<<1)+1:(e<<1)+0}function VH(e){var t=(e&1)===1,n=e>>1;return t?-n:n}kv.encode=function(t){var n="",r,i=FH(t);do r=i&KO,i>>>=bv,i>0&&(r|=YO),n+=GO.encode(r);while(i>0);return n};kv.decode=function(t,n,r){var i=t.length,s=0,a=0,o,c;do{if(n>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=GO.decode(t.charCodeAt(n++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(n-1));o=!!(c&YO),c&=KO,s=s+(c<<a),a+=bv}while(o);r.value=VH(s),r.rest=n}});var To=x(St=>{d();function $H(e,t,n){if(t in e)return e[t];if(arguments.length===3)return n;throw new Error('"'+t+'" is a required argument.')}St.getArg=$H;var QO=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,UH=/^data:.+\,.+$/;function Su(e){var t=e.match(QO);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}St.urlParse=Su;function So(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}St.urlGenerate=So;var HH=32;function zH(e){var t=[];return function(n){for(var r=0;r<t.length;r++)if(t[r].input===n){var i=t[0];return t[0]=t[r],t[r]=i,t[0].result}var s=e(n);return t.unshift({input:n,result:s}),t.length>HH&&t.pop(),s}}var Tv=zH(function(t){var n=t,r=Su(t);if(r){if(!r.path)return t;n=r.path}for(var i=St.isAbsolute(n),s=[],a=0,o=0;;)if(a=o,o=n.indexOf("/",a),o===-1){s.push(n.slice(a));break}else for(s.push(n.slice(a,o));o<n.length&&n[o]==="/";)o++;for(var c,l=0,o=s.length-1;o>=0;o--)c=s[o],c==="."?s.splice(o,1):c===".."?l++:l>0&&(c===""?(s.splice(o+1,l),l=0):(s.splice(o,2),l--));return n=s.join("/"),n===""&&(n=i?"/":"."),r?(r.path=n,So(r)):n});St.normalize=Tv;function XO(e,t){e===""&&(e="."),t===""&&(t=".");var n=Su(t),r=Su(e);if(r&&(e=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),So(n);if(n||t.match(UH))return t;if(r&&!r.host&&!r.path)return r.host=t,So(r);var i=t.charAt(0)==="/"?t:Tv(e.replace(/\/+$/,"")+"/"+t);return r?(r.path=i,So(r)):i}St.join=XO;St.isAbsolute=function(e){return e.charAt(0)==="/"||QO.test(e)};function WH(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var n=0;t.indexOf(e+"/")!==0;){var r=e.lastIndexOf("/");if(r<0||(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/)))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)}St.relative=WH;var ZO=(function(){var e=Object.create(null);return!("__proto__"in e)})();function eN(e){return e}function GH(e){return tN(e)?"$"+e:e}St.toSetString=ZO?eN:GH;function JH(e){return tN(e)?e.slice(1):e}St.fromSetString=ZO?eN:JH;function tN(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var n=t-10;n>=0;n--)if(e.charCodeAt(n)!==36)return!1;return!0}function KH(e,t,n){var r=Xr(e.source,t.source);return r!==0||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:Xr(e.name,t.name)}St.compareByOriginalPositions=KH;function YH(e,t,n){var r;return r=e.originalLine-t.originalLine,r!==0||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:Xr(e.name,t.name)}St.compareByOriginalPositionsNoSource=YH;function QH(e,t,n){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0||n)||(r=Xr(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:Xr(e.name,t.name)}St.compareByGeneratedPositionsDeflated=QH;function XH(e,t,n){var r=e.generatedColumn-t.generatedColumn;return r!==0||n||(r=Xr(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:Xr(e.name,t.name)}St.compareByGeneratedPositionsDeflatedNoLine=XH;function Xr(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function ZH(e,t){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=Xr(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:Xr(e.name,t.name)}St.compareByGeneratedPositionsInflated=ZH;function e6(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}St.parseSourceMapInput=e6;function t6(e,t,n){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),n){var r=Su(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var i=r.path.lastIndexOf("/");i>=0&&(r.path=r.path.substring(0,i+1))}t=XO(So(r),t)}return Tv(t)}St.computeSourceURL=t6});var Ev=x(nN=>{d();var wv=To(),xv=Object.prototype.hasOwnProperty,Hs=typeof Map<"u";function Zr(){this._array=[],this._set=Hs?new Map:Object.create(null)}Zr.fromArray=function(t,n){for(var r=new Zr,i=0,s=t.length;i<s;i++)r.add(t[i],n);return r};Zr.prototype.size=function(){return Hs?this._set.size:Object.getOwnPropertyNames(this._set).length};Zr.prototype.add=function(t,n){var r=Hs?t:wv.toSetString(t),i=Hs?this.has(t):xv.call(this._set,r),s=this._array.length;(!i||n)&&this._array.push(t),i||(Hs?this._set.set(t,s):this._set[r]=s)};Zr.prototype.has=function(t){if(Hs)return this._set.has(t);var n=wv.toSetString(t);return xv.call(this._set,n)};Zr.prototype.indexOf=function(t){if(Hs){var n=this._set.get(t);if(n>=0)return n}else{var r=wv.toSetString(t);if(xv.call(this._set,r))return this._set[r]}throw new Error('"'+t+'" is not in the set.')};Zr.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};Zr.prototype.toArray=function(){return this._array.slice()};nN.ArraySet=Zr});var sN=x(iN=>{d();var rN=To();function n6(e,t){var n=e.generatedLine,r=t.generatedLine,i=e.generatedColumn,s=t.generatedColumn;return r>n||r==n&&s>=i||rN.compareByGeneratedPositionsInflated(e,t)<=0}function qd(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}qd.prototype.unsortedForEach=function(t,n){this._array.forEach(t,n)};qd.prototype.add=function(t){n6(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};qd.prototype.toArray=function(){return this._sorted||(this._array.sort(rN.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};iN.MappingList=qd});var Av=x(aN=>{d();var Tu=Sv(),ut=To(),Id=Ev().ArraySet,r6=sN().MappingList;function Dn(e){e||(e={}),this._file=ut.getArg(e,"file",null),this._sourceRoot=ut.getArg(e,"sourceRoot",null),this._skipValidation=ut.getArg(e,"skipValidation",!1),this._ignoreInvalidMapping=ut.getArg(e,"ignoreInvalidMapping",!1),this._sources=new Id,this._names=new Id,this._mappings=new r6,this._sourcesContents=null}Dn.prototype._version=3;Dn.fromSourceMap=function(t,n){var r=t.sourceRoot,i=new Dn(Object.assign(n||{},{file:t.file,sourceRoot:r}));return t.eachMapping(function(s){var a={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(a.source=s.source,r!=null&&(a.source=ut.relative(r,a.source)),a.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(a.name=s.name)),i.addMapping(a)}),t.sources.forEach(function(s){var a=s;r!==null&&(a=ut.relative(r,s)),i._sources.has(a)||i._sources.add(a);var o=t.sourceContentFor(s);o!=null&&i.setSourceContent(s,o)}),i};Dn.prototype.addMapping=function(t){var n=ut.getArg(t,"generated"),r=ut.getArg(t,"original",null),i=ut.getArg(t,"source",null),s=ut.getArg(t,"name",null);!this._skipValidation&&this._validateMapping(n,r,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:n.line,generatedColumn:n.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:s}))};Dn.prototype.setSourceContent=function(t,n){var r=t;this._sourceRoot!=null&&(r=ut.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ut.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[ut.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Dn.prototype.applySourceMap=function(t,n,r){var i=n;if(n==null){if(t.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=t.file}var s=this._sourceRoot;s!=null&&(i=ut.relative(s,i));var a=new Id,o=new Id;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,r!=null&&(c.source=ut.join(r,c.source)),s!=null&&(c.source=ut.relative(s,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var f=c.source;f!=null&&!a.has(f)&&a.add(f);var m=c.name;m!=null&&!o.has(m)&&o.add(m)},this),this._sources=a,this._names=o,t.sources.forEach(function(c){var l=t.sourceContentFor(c);l!=null&&(r!=null&&(c=ut.join(r,c)),s!=null&&(c=ut.relative(s,c)),this.setSourceContent(c,l))},this)};Dn.prototype._validateMapping=function(t,n,r,i){if(n&&typeof n.line!="number"&&typeof n.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(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!n&&!r&&!i)){if(t&&"line"in t&&"column"in t&&n&&"line"in n&&"column"in n&&t.line>0&&t.column>=0&&n.line>0&&n.column>=0&&r)return;var s="Invalid mapping: "+JSON.stringify({generated:t,source:r,original:n,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};Dn.prototype._serializeMappings=function(){for(var t=0,n=1,r=0,i=0,s=0,a=0,o="",c,l,f,m,p=this._mappings.toArray(),g=0,v=p.length;g<v;g++){if(l=p[g],c="",l.generatedLine!==n){t=0;var b=l.generatedLine-n;c+=b===1?";":";".repeat(b),n=l.generatedLine}else if(g>0){if(!ut.compareByGeneratedPositionsInflated(l,p[g-1]))continue;c+=","}c+=Tu.encode(l.generatedColumn-t),t=l.generatedColumn,l.source!=null&&(m=this._sources.indexOf(l.source),c+=Tu.encode(m-a),a=m,c+=Tu.encode(l.originalLine-1-i),i=l.originalLine-1,c+=Tu.encode(l.originalColumn-r),r=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),c+=Tu.encode(f-s),s=f)),o+=c}return o};Dn.prototype._generateSourcesContent=function(t,n){return t.map(function(r){if(!this._sourcesContents)return null;n!=null&&(r=ut.relative(n,r));var i=ut.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Dn.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};Dn.prototype.toString=function(){return JSON.stringify(this.toJSON())};aN.SourceMapGenerator=Dn});var oN=x(zs=>{d();zs.GREATEST_LOWER_BOUND=1;zs.LEAST_UPPER_BOUND=2;function Ov(e,t,n,r,i,s){var a=Math.floor((t-e)/2)+e,o=i(n,r[a],!0);return o===0?a:o>0?t-a>1?Ov(a,t,n,r,i,s):s==zs.LEAST_UPPER_BOUND?t<r.length?t:-1:a:a-e>1?Ov(e,a,n,r,i,s):s==zs.LEAST_UPPER_BOUND?a:e<0?-1:e}zs.search=function(t,n,r,i){if(n.length===0)return-1;var s=Ov(-1,n.length,t,n,r,i||zs.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&r(n[s],n[s-1],!0)===0;)--s;return s}});var fN=x(lN=>{d();function uN(e){function t(i,s,a){var o=i[s];i[s]=i[a],i[a]=o}function n(i,s){return Math.round(i+Math.random()*(s-i))}function r(i,s,a,o){if(a<o){var c=n(a,o),l=a-1;t(i,c,o);for(var f=i[o],m=a;m<o;m++)s(i[m],f,!1)<=0&&(l+=1,t(i,l,m));t(i,l+1,m);var p=l+1;r(i,s,a,p-1),r(i,s,p+1,o)}}return r}function i6(e){let t=uN.toString();return new Function(`return ${t}`)()(e)}var s6=(function(){try{return new Function("return 0")(),!0}catch{return!1}})(),cN=new WeakMap;lN.quickSort=function(e,t,n=0){let r=s6?cN.get(t):uN(t);r===void 0&&(r=i6(t),cN.set(t,r)),r(e,t,n,e.length-1)}});var mN=x(Rd=>{d();var se=To(),Pv=oN(),wo=Ev().ArraySet,a6=Sv(),wu=fN().quickSort,Md=1e7;function Je(e,t){var n=e;return typeof e=="string"&&(n=se.parseSourceMapInput(e)),n.sections!=null?new ir(n,t):new Ot(n,t)}Je.fromSourceMap=function(e,t){return Ot.fromSourceMap(e,t)};Je.prototype._version=3;Je.prototype.__generatedMappings=null;Object.defineProperty(Je.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Je.prototype.__originalMappings=null;Object.defineProperty(Je.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Je.prototype._charIsMappingSeparator=function(t,n){var r=t.charAt(n);return r===";"||r===","};Je.prototype._parseMappings=function(t,n){throw new Error("Subclasses must implement _parseMappings")};Je.GENERATED_ORDER=1;Je.ORIGINAL_ORDER=2;Je.GREATEST_LOWER_BOUND=1;Je.LEAST_UPPER_BOUND=2;Je.prototype.eachMapping=function(t,n,r){var i=n||null,s=r||Je.GENERATED_ORDER,a;switch(s){case Je.GENERATED_ORDER:a=this._generatedMappings;break;case Je.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var o=this.sourceRoot,c=t.bind(i),l=this._names,f=this._sources,m=this._sourceMapURL,p=0,g=a.length;p<g;p++){var v=a[p],b=v.source===null?null:f.at(v.source);b!==null&&(b=se.computeSourceURL(o,b,m)),c({source:b,generatedLine:v.generatedLine,generatedColumn:v.generatedColumn,originalLine:v.originalLine,originalColumn:v.originalColumn,name:v.name===null?null:l.at(v.name)})}};Je.prototype.allGeneratedPositionsFor=function(t){var n=se.getArg(t,"line"),r={source:se.getArg(t,"source"),originalLine:n,originalColumn:se.getArg(t,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var i=[],s=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,Pv.LEAST_UPPER_BOUND);if(s>=0){var a=this._originalMappings[s];if(t.column===void 0)for(var o=a.originalLine;a&&a.originalLine===o;)i.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var c=a.originalColumn;a&&a.originalLine===n&&a.originalColumn==c;)i.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return i};Rd.SourceMapConsumer=Je;function Ot(e,t){var n=e;typeof e=="string"&&(n=se.parseSourceMapInput(e));var r=se.getArg(n,"version"),i=se.getArg(n,"sources"),s=se.getArg(n,"names",[]),a=se.getArg(n,"sourceRoot",null),o=se.getArg(n,"sourcesContent",null),c=se.getArg(n,"mappings"),l=se.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);a&&(a=se.normalize(a)),i=i.map(String).map(se.normalize).map(function(f){return a&&se.isAbsolute(a)&&se.isAbsolute(f)?se.relative(a,f):f}),this._names=wo.fromArray(s.map(String),!0),this._sources=wo.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return se.computeSourceURL(a,f,t)}),this.sourceRoot=a,this.sourcesContent=o,this._mappings=c,this._sourceMapURL=t,this.file=l}Ot.prototype=Object.create(Je.prototype);Ot.prototype.consumer=Je;Ot.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=se.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var n;for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==e)return n;return-1};Ot.fromSourceMap=function(t,n){var r=Object.create(Ot.prototype),i=r._names=wo.fromArray(t._names.toArray(),!0),s=r._sources=wo.fromArray(t._sources.toArray(),!0);r.sourceRoot=t._sourceRoot,r.sourcesContent=t._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=t._file,r._sourceMapURL=n,r._absoluteSources=r._sources.toArray().map(function(g){return se.computeSourceURL(r.sourceRoot,g,n)});for(var a=t._mappings.toArray().slice(),o=r.__generatedMappings=[],c=r.__originalMappings=[],l=0,f=a.length;l<f;l++){var m=a[l],p=new hN;p.generatedLine=m.generatedLine,p.generatedColumn=m.generatedColumn,m.source&&(p.source=s.indexOf(m.source),p.originalLine=m.originalLine,p.originalColumn=m.originalColumn,m.name&&(p.name=i.indexOf(m.name)),c.push(p)),o.push(p)}return wu(r.__originalMappings,se.compareByOriginalPositions),r};Ot.prototype._version=3;Object.defineProperty(Ot.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function hN(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Nv=se.compareByGeneratedPositionsDeflatedNoLine;function dN(e,t){let n=e.length,r=e.length-t;if(!(r<=1))if(r==2){let i=e[t],s=e[t+1];Nv(i,s)>0&&(e[t]=s,e[t+1]=i)}else if(r<20)for(let i=t;i<n;i++)for(let s=i;s>t;s--){let a=e[s-1],o=e[s];if(Nv(a,o)<=0)break;e[s-1]=o,e[s]=a}else wu(e,Nv,t)}Ot.prototype._parseMappings=function(t,n){var r=1,i=0,s=0,a=0,o=0,c=0,l=t.length,f=0,m={},p={},g=[],v=[],b,_,k,w,T;let y=0;for(;f<l;)if(t.charAt(f)===";")r++,f++,i=0,dN(v,y),y=v.length;else if(t.charAt(f)===",")f++;else{for(b=new hN,b.generatedLine=r,w=f;w<l&&!this._charIsMappingSeparator(t,w);w++);for(_=t.slice(f,w),k=[];f<w;)a6.decode(t,f,p),T=p.value,f=p.rest,k.push(T);if(k.length===2)throw new Error("Found a source, but no line and column");if(k.length===3)throw new Error("Found a source and line, but no column");if(b.generatedColumn=i+k[0],i=b.generatedColumn,k.length>1&&(b.source=o+k[1],o+=k[1],b.originalLine=s+k[2],s=b.originalLine,b.originalLine+=1,b.originalColumn=a+k[3],a=b.originalColumn,k.length>4&&(b.name=c+k[4],c+=k[4])),v.push(b),typeof b.originalLine=="number"){let N=b.source;for(;g.length<=N;)g.push(null);g[N]===null&&(g[N]=[]),g[N].push(b)}}dN(v,y),this.__generatedMappings=v;for(var A=0;A<g.length;A++)g[A]!=null&&wu(g[A],se.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...g)};Ot.prototype._findMapping=function(t,n,r,i,s,a){if(t[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[r]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return Pv.search(t,n,s,a)};Ot.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var n=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var r=this._generatedMappings[t+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}};Ot.prototype.originalPositionFor=function(t){var n={generatedLine:se.getArg(t,"line"),generatedColumn:se.getArg(t,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",se.compareByGeneratedPositionsDeflated,se.getArg(t,"bias",Je.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var s=se.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=se.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var a=se.getArg(i,"name",null);return a!==null&&(a=this._names.at(a)),{source:s,line:se.getArg(i,"originalLine",null),column:se.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};Ot.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Ot.prototype.sourceContentFor=function(t,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(t);if(r>=0)return this.sourcesContent[r];var i=t;this.sourceRoot!=null&&(i=se.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=se.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(n)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Ot.prototype.generatedPositionFor=function(t){var n=se.getArg(t,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:se.getArg(t,"line"),originalColumn:se.getArg(t,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,se.getArg(t,"bias",Je.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:se.getArg(s,"generatedLine",null),column:se.getArg(s,"generatedColumn",null),lastColumn:se.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Rd.BasicSourceMapConsumer=Ot;function ir(e,t){var n=e;typeof e=="string"&&(n=se.parseSourceMapInput(e));var r=se.getArg(n,"version"),i=se.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new wo,this._names=new wo;var s={line:-1,column:0},a=0;this._sections=i.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var c=se.getArg(o,"offset"),l=se.getArg(c,"line"),f=se.getArg(c,"column");if(!pN(l)||!pN(f))throw new Error("Section offset line and column must be non-negative integers.");if(l>Md)throw new Error("Section offset line must not exceed "+Md+".");if(l<s.line||l===s.line&&f<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");s=c;var m=new Je(se.getArg(o,"map"),t),p=l+(m._maxOffsetLine||0);if(p>Md)throw new Error("Section offset line must not exceed "+Md+", including offsets of nested sections.");return p>a&&(a=p),{generatedOffset:{generatedLine:l+1,generatedColumn:f+1},consumer:m}}),this._maxOffsetLine=a}function pN(e){return typeof e=="number"&&e>=0&&e<=9007199254740991&&Math.floor(e)===e}ir.prototype=Object.create(Je.prototype);ir.prototype.constructor=Je;ir.prototype._version=3;Object.defineProperty(ir.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=this._sections[t].consumer.sources,r=0;r<n.length;r++)e.push(n[r]);return e}});ir.prototype.originalPositionFor=function(t){var n={generatedLine:se.getArg(t,"line"),generatedColumn:se.getArg(t,"column")},r=Pv.search(n,this._sections,function(s,a){var o=s.generatedLine-a.generatedOffset.generatedLine;return o||s.generatedColumn-a.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:n.generatedLine-(i.generatedOffset.generatedLine-1),column:n.generatedColumn-(i.generatedOffset.generatedLine===n.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};ir.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};ir.prototype.sourceContentFor=function(t,n){for(var r=0;r<this._sections.length;r++){var i=this._sections[r],s=i.consumer.sourceContentFor(t,!0);if(s||s==="")return s}if(n)return null;throw new Error('"'+t+'" is not in the SourceMap.')};ir.prototype.generatedPositionFor=function(t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(se.getArg(t,"source"))!==-1){var i=r.consumer.generatedPositionFor(t);if(i){var s={line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};ir.prototype._parseMappings=function(t,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],s=i.consumer._generatedMappings,a=0;a<s.length;a++){var o=s[a],c=i.consumer._sources.at(o.source);c!==null&&(c=se.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var l=null;o.name&&(l=i.consumer._names.at(o.name),this._names.add(l),l=this._names.indexOf(l));var f={source:c,generatedLine:o.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(i.generatedOffset.generatedLine===o.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:l};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}wu(this.__generatedMappings,se.compareByGeneratedPositionsDeflated),wu(this.__originalMappings,se.compareByOriginalPositions)};Rd.IndexedSourceMapConsumer=ir});var yN=x(gN=>{d();var o6=Av().SourceMapGenerator,Dd=To(),c6=/(\r?\n)/,u6=10,xo="$$$isSourceNode$$$";function vn(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=n??null,this.name=i??null,this[xo]=!0,r!=null&&this.add(r)}vn.fromStringWithSourceMap=function(t,n,r){var i=new vn,s=t.split(c6),a=0,o=function(){var p=v(),g=v()||"";return p+g;function v(){return a<s.length?s[a++]:void 0}},c=1,l=0,f=null;return n.eachMapping(function(p){if(f!==null)if(c<p.generatedLine)m(f,o()),c++,l=0;else{var g=s[a]||"",v=g.substr(0,p.generatedColumn-l);s[a]=g.substr(p.generatedColumn-l),l=p.generatedColumn,m(f,v),f=p;return}for(;c<p.generatedLine;){if(a>=s.length){c=p.generatedLine;break}i.add(o()),c++}if(l<p.generatedColumn){var g=s[a]||"";i.add(g.substr(0,p.generatedColumn)),s[a]=g.substr(p.generatedColumn),l=p.generatedColumn}f=p},this),a<s.length&&(f&&m(f,o()),i.add(s.splice(a).join(""))),n.sources.forEach(function(p){var g=n.sourceContentFor(p);g!=null&&(r!=null&&(p=Dd.join(r,p)),i.setSourceContent(p,g))}),i;function m(p,g){if(p===null||p.source===void 0)i.add(g);else{var v=r?Dd.join(r,p.source):p.source;i.add(new vn(p.originalLine,p.originalColumn,v,g,p.name))}}};vn.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(n){this.add(n)},this);else if(t[xo]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};vn.prototype.prepend=function(t){if(Array.isArray(t))for(var n=t.length-1;n>=0;n--)this.prepend(t[n]);else if(t[xo]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};vn.prototype.walk=function(t){for(var n,r=0,i=this.children.length;r<i;r++)n=this.children[r],n[xo]?n.walk(t):n!==""&&t(n,{source:this.source,line:this.line,column:this.column,name:this.name})};vn.prototype.join=function(t){var n,r,i=this.children.length;if(i>0){for(n=[],r=0;r<i-1;r++)n.push(this.children[r]),n.push(t);n.push(this.children[r]),this.children=n}return this};vn.prototype.replaceRight=function(t,n){var r=this.children[this.children.length-1];return r[xo]?r.replaceRight(t,n):typeof r=="string"?this.children[this.children.length-1]=r.replace(t,n):this.children.push("".replace(t,n)),this};vn.prototype.setSourceContent=function(t,n){this.sourceContents[Dd.toSetString(t)]=n};vn.prototype.walkSourceContents=function(t){for(var n=0,r=this.children.length;n<r;n++)this.children[n][xo]&&this.children[n].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),n=0,r=i.length;n<r;n++)t(Dd.fromSetString(i[n]),this.sourceContents[i[n]])};vn.prototype.toString=function(){var t="";return this.walk(function(n){t+=n}),t};vn.prototype.toStringWithSourceMap=function(t){var n={code:"",line:1,column:0},r=new o6(t),i=!1,s=null,a=null,o=null,c=null;return this.walk(function(l,f){n.code+=l,f.source!==null&&f.line!==null&&f.column!==null?((s!==f.source||a!==f.line||o!==f.column||c!==f.name)&&r.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:n.line,column:n.column},name:f.name}),s=f.source,a=f.line,o=f.column,c=f.name,i=!0):i&&(r.addMapping({generated:{line:n.line,column:n.column}}),s=null,i=!1);for(var m=0,p=l.length;m<p;m++)l.charCodeAt(m)===u6?(n.line++,n.column=0,m+1===p?(s=null,i=!1):i&&r.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:n.line,column:n.column},name:f.name})):n.column++}),this.walkSourceContents(function(l,f){r.setSourceContent(l,f)}),{code:n.code,map:r}};gN.SourceNode=vn});var Bd=x(jd=>{d();jd.SourceMapGenerator=Av().SourceMapGenerator;jd.SourceMapConsumer=mN().SourceMapConsumer;jd.SourceNode=yN().SourceNode});var Cv=x((Rye,kN)=>{"use strict";d();var{existsSync:l6,readFileSync:f6,realpathSync:d6}=ce("fs"),{dirname:Fd,isAbsolute:p6,join:h6,relative:m6,sep:g6}=ce("path"),{SourceMapConsumer:_N,SourceMapGenerator:vN}=Bd();function bN(e){try{return d6(e)}catch{return e}}function y6(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var xu=class{constructor(t,n){if(n.map===!1)return;n.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,i=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=Fd(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new _N(this.json||this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/,a=t.match(i)||t.match(s);if(a)return decodeURIComponent(t.substr(a[0].length));let o=t.match(n)||t.match(r);if(o)return y6(t.substr(o[0].length));let c=t.slice(22);throw c=c.slice(0,c.indexOf(",")),new Error("Unsupported source map encoding "+c)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let r=t.lastIndexOf(n.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}loadFile(t,n,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(t)||!n)return;let i=m6(bN(Fd(n)),bN(t));if(i===".."||i.startsWith(".."+g6)||p6(i))return}if(this.root=Fd(t),l6(t))return this.mapFile=t,f6(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(t);if(r){let i=this.loadFile(r,t,!0);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(n instanceof _N)return vN.fromSourceMap(n).toString();if(n instanceof vN)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;t&&(r=h6(Fd(t),r));let i=this.loadFile(r,t,!1);if(i)try{this.json=JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return i}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};kN.exports=xu;xu.default=xu});var Eu=x((jye,EN)=>{"use strict";d();var{nanoid:_6}=HO(),{isAbsolute:Iv,resolve:Mv}=ce("path"),{SourceMapConsumer:v6,SourceMapGenerator:b6}=Bd(),{fileURLToPath:SN,pathToFileURL:Vd}=ce("url"),TN=Pd(),k6=Cv(),Lv=pv(),qv=Symbol("lineToIndexCache"),S6=!!(v6&&b6),wN=!!(Mv&&Iv);function xN(e){if(e[qv])return e[qv];let t=e.css.split(`
|
|
54
|
+
`),n=new Array(t.length),r=0;for(let i=0,s=t.length;i<s;i++)n[i]=r,r+=t[i].length+1;return e[qv]=n,n}var Eo=class{get from(){return this.file||this.id}constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.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,n.document&&(this.document=n.document.toString()),n.from&&(!wN||/^\w+:\/\//.test(n.from)||Iv(n.from)?this.file=n.from:this.file=Mv(n.from)),wN&&S6){let r=new k6(this.css,n);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+_6(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,r,i={}){let s,a,o,c,l;if(n&&typeof n=="object"){let m=n,p=r;if(typeof m.offset=="number"){c=m.offset;let g=this.fromOffset(c);n=g.line,r=g.col}else n=m.line,r=m.column,c=this.fromLineAndColumn(n,r);if(typeof p.offset=="number"){o=p.offset;let g=this.fromOffset(o);a=g.line,s=g.col}else a=p.line,s=p.column,o=this.fromLineAndColumn(p.line,p.column)}else if(r)c=this.fromLineAndColumn(n,r);else{c=n;let m=this.fromOffset(c);n=m.line,r=m.col}let f=this.origin(n,r,a,s);return f?l=new TN(t,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,i.plugin):l=new TN(t,a===void 0?n:{column:r,line:n},a===void 0?r:{column:s,line:a},this.css,this.file,i.plugin),l.input={column:r,endColumn:s,endLine:a,endOffset:o,line:n,offset:c,source:this.css},this.file&&(Vd&&(l.input.url=Vd(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,n){return xN(this)[t-1]+n-1}fromOffset(t){let n=xN(this),r=n[n.length-1],i=0;if(t>=r)i=n.length-1;else{let s=n.length-2,a;for(;i<s;)if(a=i+(s-i>>1),t<n[a])s=a-1;else if(t>=n[a+1])i=a+1;else{i=a;break}}return{col:t-n[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Mv(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,r,i){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:n-1,line:t});if(!a.source)return!1;let o;if(typeof r=="number"){let m=s.originalPositionFor({column:i-1,line:r});m.source&&(o=m)}let c;Iv(a.source)?c=Vd(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||Vd(this.map.mapFile));let l={column:a.column+1,endColumn:o&&o.column+1,endLine:o&&o.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(SN)l.file=SN(c);else throw new Error("file: protocol is not available in this PostCSS build");let f=s.sourceContentFor(a.source);return f&&(l.source=f),l}toJSON(){let t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};EN.exports=Eo;Eo.default=Eo;Lv&&Lv.registerInput&&Lv.registerInput(Eo)});var Ao=x((Fye,PN)=>{"use strict";d();var AN=Qr(),ON,NN,Di=class extends AN{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,r){let i=new Set;for(let a of Array.isArray(t)?t:[t])a&&typeof a=="object"&&!a.parent&&a.raws&&typeof a.raws.before<"u"&&i.add(a.raws);let s=super.normalize(t);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let a of s)i.has(a.raws)||(a.raws.before=n.raws.before)}return s}removeChild(t,n){let r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new ON(new NN,this,t).stringify()}};Di.registerLazyResult=e=>{ON=e};Di.registerProcessor=e=>{NN=e};PN.exports=Di;Di.default=Di;AN.registerRoot(Di)});var Rv=x(($ye,CN)=>{"use strict";d();var Au={comma(e){return Au.split(e,[","],!0)},space(e){let t=[" ",`
|
|
55
|
+
`," "];return Au.split(e,t)},split(e,t,n){if(typeof e!="string")return[];let r=[],i="",s=!1,a=0,o=!1,c="",l=!1;for(let f of e)l?l=!1:f==="\\"?l=!0:o?f===c&&(o=!1):f==='"'||f==="'"?(o=!0,c=f):f==="("?a+=1:f===")"?a>0&&(a-=1):a===0&&t.includes(f)&&(s=!0),s?(i!==""&&r.push(i.trim()),i="",s=!1):i+=f;return(n||i!=="")&&r.push(i.trim()),r}};CN.exports=Au;Au.default=Au});var $d=x((Hye,qN)=>{"use strict";d();var LN=Qr(),T6=Rv(),Oo=class extends LN{get selectors(){return T6.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};qN.exports=Oo;Oo.default=Oo;LN.registerRule(Oo)});var RN=x((Wye,MN)=>{"use strict";d();var w6=Cd(),x6=bo(),E6=ku(),A6=Eu(),O6=Cv(),N6=Ao(),P6=$d();function IN(e,t){return e.inputs?e.inputs.map(n=>{let r={...n,__proto__:A6.prototype};return r.map&&(r.map={...r.map,__proto__:O6.prototype}),r}):t}function C6(e,t,n){let r={...e};if(delete r.inputs,delete r.nodes,r.source){let{inputId:s,...a}=r.source;r.source=a,s!=null&&(r.source.input=t[s])}let i;if(r.type==="root")i=new N6(r);else if(r.type==="decl")i=new E6(r);else if(r.type==="rule")i=new P6(r);else if(r.type==="comment")i=new x6(r);else if(r.type==="atrule")i=new w6(r);else throw new Error("Unknown node type: "+e.type);if(n){i.nodes=n;for(let s of n)s.parent=i}return i}function Ud(e,t){if(Array.isArray(e))return e.map(i=>Ud(i));let n,r=[{childIndex:0,children:[],inputs:IN(e,t),json:e}];for(;r.length>0;){let i=r[r.length-1],s=i.json.nodes;if(s&&i.childIndex<s.length){let o=s[i.childIndex];i.childIndex+=1,r.push({childIndex:0,children:[],inputs:IN(o,i.inputs),json:o});continue}r.pop();let a=C6(i.json,i.inputs,s?i.children:void 0);r.length>0?r[r.length-1].children.push(a):n=a}return n}MN.exports=Ud;Ud.default=Ud});var jv=x((Jye,$N)=>{"use strict";d();var{dirname:Hd,relative:jN,resolve:BN,sep:FN}=ce("path"),{SourceMapConsumer:VN,SourceMapGenerator:zd}=Bd(),{pathToFileURL:DN}=ce("url"),L6=Eu(),q6=!!(VN&&zd),I6=!!(Hd&&BN&&jN&&FN),Dv=class{constructor(t,n,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,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 t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`
|
|
56
|
+
`;this.css.includes(`\r
|
|
57
|
+
`)&&(n=`\r
|
|
58
|
+
`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),r=t.root||Hd(t.file),i;this.mapOpts.sourcesContent===!1?(i=new VN(t.text),i.sourcesContent&&(i.sourcesContent=null)):i=t.consumer(),this.map.applySourceMap(i,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else if(this.css){let t;for(;(t=this.css.lastIndexOf("/*#"))!==-1;){let n=this.css.indexOf("*/",t+3);if(n===-1)break;for(;t>0&&this.css[t-1]===`
|
|
59
|
+
`;)t--;this.css=this.css.slice(0,t)+this.css.slice(n+2)}}}}generate(){if(this.clearAnnotation(),I6&&q6&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=zd.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new zd({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 zd({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,n=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,a;this.stringify(this.root,(o,c,l)=>{if(this.css+=o,c&&l!=="end"&&(i.generated.line=t,i.generated.column=n-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=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=o.match(/\n/g),a?(t+=a.length,s=o.lastIndexOf(`
|
|
60
|
+
`),n=o.length-s):n+=o.length,c&&l!=="start"){let f=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==f.last||f.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=t,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=t,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.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(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let r=this.opts.to?Hd(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Hd(BN(r,this.mapOpts.annotation)));let i=jN(r,t);return this.memoizedPaths.set(t,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new L6(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!t[r]){t[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(DN){let r=DN(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;FN==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};$N.exports=Dv});var Vv=x((Yye,zN)=>{"use strict";d();var M6=Cd(),R6=bo(),D6=ku(),j6=Ao(),UN=$d(),B6=Nd(),HN={empty:!0,space:!0};function F6(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}function Bv(e,t,n){let r="";for(let i=t;i<n;i++)r+=e[i][1];return r}var Fv=class{constructor(t){this.input=t,this.root=new j6,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new M6;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,i,s,a=!1,o=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?l.push(r==="("?")":"]"):r==="{"&&l.length>0?l.push("}"):r===l[l.length-1]&&l.pop(),l.length===0)if(r===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){o=!0;break}else if(r==="}"){if(c.length>0){for(s=c.length-1,i=c[s];i&&i[0]==="space";)i=c[--s];i&&(n.source.end=this.getPosition(i[3]||i[2]),n.source.end.offset++)}this.end(t);break}else c.push(t);else c.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(n.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(n,"params",c),a&&(t=c[c.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let r=0,i;for(let s=n-1;s>=0&&(i=t[s],!(i[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(t){let n=0,r,i,s;for(let[a,o]of t.entries()){if(i=o,s=i[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(t){let n=new R6;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let r=t[1].slice(2,-2);if(!r.trim())n.text="",n.raws.left=r,n.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=i[2],n.raws.left=i[1],n.raws.right=i[3]}}createTokenizer(){this.tokenizer=B6(this.input)}decl(t,n){let r=new D6;this.init(r,t[0][2]);let i=t[t.length-1];i[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||F6(t)),r.source.end.offset++;let s=0;for(;t[s][0]!=="word";)s===t.length-1&&this.unknownWord([t[s]]),s++;r.raws.before+=Bv(t,0,s),r.source.start=this.getPosition(t[s][2]);let a=s;for(;s<t.length;){let p=t[s][0];if(p===":"||p==="space"||p==="comment")break;s++}r.prop=Bv(t,a,s);let o=s,c;for(;s<t.length&&(c=t[s],s++,c[0]!==":");)c[0]==="word"&&/\w/.test(c[1])&&this.unknownWord([c]);r.raws.between=Bv(t,o,s),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let l=s;for(;s<t.length;){let p=t[s][0];if(p!=="space"&&p!=="comment")break;s++}let f=t.slice(l,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(let p=t.length-1;p>=0;p--){if(c=t[p],c[1].toLowerCase()==="!important"){r.important=!0;let g=this.stringFrom(t,p);g=this.spacesFromEnd(t)+g,g!==" !important"&&(r.raws.important=g);break}else if(c[1].toLowerCase()==="important"){let g=t.slice(0),v="";for(let b=p;b>0;b--){let _=g[b][0];if(v.trim().startsWith("!")&&_!=="space")break;v=g.pop()[1]+v}v.trim().startsWith("!")&&(r.important=!0,r.raws.important=v,t=g)}if(c[0]!=="space"&&c[0]!=="comment")break}t.some(p=>p[0]!=="space"&&p[0]!=="comment")&&(r.raws.between+=f.map(p=>p[1]).join(""),f=[]),this.raw(r,"value",f.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new UN;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="",n.source.end=this.getPosition(t[2]),n.source.end.offset+=n.raws.ownSemicolon.length)}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,r=null,i=!1,s=null,a=[],o=t[1].startsWith("--"),c=[],l=t;for(;l;){if(r=l[0],c.push(l),r==="("||r==="[")s||(s=l),a.push(r==="("?")":"]");else if(o&&i&&r==="{")s||(s=l),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(c,o);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),n=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(s),n&&i){if(!o)for(;c.length&&(l=c[c.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,o)}else this.unknownWord(c)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,r,i){let s,a,o=r.length,c="",l=!0,f,m;for(let p=0;p<o;p+=1)s=r[p],a=s[0],a==="space"&&p===o-1&&!i?l=!1:a==="comment"?(m=r[p-1]?r[p-1][0]:"empty",f=r[p+1]?r[p+1][0]:"empty",!HN[m]&&!HN[f]?c.slice(-1)===","?l=!1:c+=s[1]:l=!1):c+=s[1];if(!l){let p=r.reduce((g,v)=>g+v[1],"");t.raws[n]={raw:p,value:c}}t[n]=c}rule(t){t.pop();let n=new UN;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let n,r="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],n==="space");)r=t.pop()[1]+r;return r}stringFrom(t,n){let r="";for(let i=n;i<t.length;i++)r+=t[i][1];return t.splice(n,t.length-n),r}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};zN.exports=Fv});var Gd=x((Xye,WN)=>{"use strict";d();var V6=Qr(),$6=Eu(),U6=Vv();function Wd(e,t){let n=new $6(e,t),r=new U6(n);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&t&&t.from&&(/\.scss$/i.test(t.from)?i.message+=`
|
|
61
|
+
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(t.from)?i.message+=`
|
|
62
|
+
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(t.from)&&(i.message+=`
|
|
63
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}WN.exports=Wd;Wd.default=Wd;V6.registerParse(Wd)});var $v=x((e_e,GN)=>{"use strict";d();var H6=Qr(),{my:z6}=mu(),Ou=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){n.node[z6]||H6.rebuild(n.node);let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}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}};GN.exports=Ou;Ou.default=Ou});var Jd=x((n_e,JN)=>{"use strict";d();var W6=$v(),Nu=class{get content(){return this.css}constructor(t,n,r){this.processor=t,this.messages=[],this.root=n,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new W6(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}};JN.exports=Nu;Nu.default=Nu});var Uv=x((i_e,YN)=>{"use strict";d();var KN={};YN.exports=function(t){KN[t]||(KN[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var Wv=x((a_e,eP)=>{"use strict";d();var G6=Qr(),J6=Ld(),K6=jv(),Y6=Gd(),QN=Jd(),Q6=Ao(),X6=hu(),{isClean:sr,my:Z6}=mu(),e8=Uv(),t8={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},n8={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},r8={Once:!0,postcssPlugin:!0,prepare:!0},No=0;function Pu(e){return typeof e=="object"&&typeof e.then=="function"}function Hv(e){let t=!1,n=t8[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,No,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,No,n+"Exit"]:[n,n+"Exit"]}function XN(e){let t;return e.type==="document"?t=["Document",No,"DocumentExit"]:e.type==="root"?t=["Root",No,"RootExit"]:t=Hv(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function ZN(e){let t=[e];for(;t.length>0;){let n=t.pop();if(n[sr]=!1,n.nodes)for(let r of n.nodes)t.push(r)}return e}var zv={},ji=class e{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(t,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=ZN(n);else if(n instanceof e||n instanceof QN)i=ZN(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let s=Y6;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{i=s(n,r)}catch(a){this.processed=!0,this.error=a}i&&!i[Z6]&&G6.rebuild(i)}this.result=new QN(t,i,r),this.helpers={...zv,postcss:zv,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(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin)t.plugin=r.postcssPlugin,t.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,s=r.postcssVersion,a=this.result.processor.version,o=s.split("."),c=a.split(".");(o[0]!==c[0]||parseInt(o[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 t}prepareVisitors(){this.listeners={};let t=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!n8[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!r8[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?t(n,r,n[r][i]):t(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&t(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let n=this.plugins[t],r=this.runOnRoot(n);if(Pu(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[sr];){t[sr]=!0;let n=[XN(t)];for(;n.length>0;){let r=this.visitTick(n);if(Pu(r))try{await r}catch(i){let s=n[n.length-1].node;throw this.handleError(i,s)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let i=t.nodes.map(s=>r(s,this.helpers));await Promise.all(i)}else await r(t,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return Pu(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=X6;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let r=this.result.root.source;if(t.map===void 0&&!(r&&r.input&&r.input.map)){let a="";return n(this.result.root,o=>{a+=o}),this.result.css=a,this.result}let s=new K6(n,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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 t of this.plugins){let n=this.runOnRoot(t);if(Pu(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[sr];)t[sr]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||e8("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(t,n)}toString(){return this.css}visitSync(t,n){for(let[r,i]of t){this.result.lastPlugin=r;let s;try{s=i(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Pu(s))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[a,o]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return o(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let a=n.iterator;n.descending&&(n.descending=!1,r.indexes[a]+=1);let o;for(;o=r.nodes[r.indexes[a]];){if(!o[sr]){o[sr]=!0,n.descending=!0,t.push(XN(o));return}r.indexes[a]+=1}n.iterator=0,delete r.indexes[a]}let s=n.events;for(;n.eventIndex<s.length;){let a=s[n.eventIndex];if(n.eventIndex+=1,a===No){r.nodes&&r.nodes.length&&(r[sr]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[sr]=!0;let n=[{eventIndex:0,events:Hv(t),iterator:0,node:t}];for(;n.length>0;){let r=n[n.length-1],i=r.node;if(r.iterator!==0){let s=r.iterator;r.descending&&(r.descending=!1,i.indexes[s]+=1);let a,o=!1;for(;a=i.nodes[i.indexes[s]];){if(!a[sr]){a[sr]=!0,r.descending=!0,n.push({eventIndex:0,events:Hv(a),iterator:0,node:a}),o=!0;break}i.indexes[s]+=1}if(o)continue;r.iterator=0,delete i.indexes[s]}if(r.eventIndex<r.events.length){let s=r.events[r.eventIndex];if(r.eventIndex+=1,s===No)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{let a=this.listeners[s];a&&this.visitSync(a,i.toProxy())&&n.pop()}continue}n.pop()}}warnings(){return this.sync().warnings()}};ji.registerPostcss=e=>{zv=e};eP.exports=ji;ji.default=ji;Q6.registerLazyResult(ji);J6.registerLazyResult(ji)});var nP=x((c_e,tP)=>{"use strict";d();var i8=jv(),s8=Gd(),a8=Jd(),o8=hu(),c8=Uv(),Cu=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 t,n=s8;try{t=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,n,r){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;let i=o8;this.result=new a8(this._processor,void 0,this._opts),this.result.css=n;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new i8(i,void 0,this._opts,n);if(a.isMap()){let[o,c]=a.generate();o&&(this.result.css=o),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(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return process.env.NODE_ENV!=="production"&&("from"in this._opts||c8("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(t,n)}toString(){return this._css}warnings(){return[]}};tP.exports=Cu;Cu.default=Cu});var iP=x((l_e,rP)=>{"use strict";d();var u8=Ld(),l8=Wv(),f8=nP(),d8=Ao(),Ws=class{constructor(t=[]){this.version="8.5.26",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(typeof r=="object"&&(r.parse||r.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(r+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new f8(this,t,n):new l8(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};rP.exports=Ws;Ws.default=Ws;d8.registerProcessor(Ws);u8.registerProcessor(Ws)});var dP=x((d_e,fP)=>{"use strict";d();var sP=Cd(),aP=bo(),p8=Qr(),h8=Pd(),oP=ku(),cP=Ld(),m8=RN(),g8=Eu(),y8=Wv(),_8=Rv(),v8=_u(),b8=Gd(),Gv=iP(),k8=Jd(),uP=Ao(),lP=$d(),S8=hu(),T8=$v();function Re(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Gv(e)}Re.plugin=function(t,n){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
|
|
64
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
65
|
+
https://www.w3ctech.com/topic/2226`));let o=n(...a);return o.postcssPlugin=t,o.postcssVersion=new Gv().version,o}let s;return Object.defineProperty(i,"postcss",{get(){return s||(s=i()),s}}),i.process=function(a,o,c){return Re([i(c)]).process(a,o)},i};Re.stringify=S8;Re.parse=b8;Re.fromJSON=m8;Re.list=_8;Re.comment=e=>new aP(e);Re.atRule=e=>new sP(e);Re.decl=e=>new oP(e);Re.rule=e=>new lP(e);Re.root=e=>new uP(e);Re.document=e=>new cP(e);Re.CssSyntaxError=h8;Re.Declaration=oP;Re.Container=p8;Re.Processor=Gv;Re.Document=cP;Re.Comment=aP;Re.Warning=T8;Re.AtRule=sP;Re.Result=k8;Re.Input=g8;Re.Rule=lP;Re.Root=uP;Re.Node=v8;y8.registerPostcss(Re);fP.exports=Re;Re.default=Re});var hP=x((h_e,pP)=>{d();var w8=bo(),x8=Vv(),E8=Nd(),Jv=class extends x8{checkMissedSemicolon(){}comment(t){let n=new w8;this.init(n,t[2]);let r=this.input.fromOffset(t[3])||this.input.fromOffset(this.input.css.length-1);n.source.end={column:r.col,line:r.line,offset:t[3]+1};let i=t[1].slice(2);if(i.slice(-2)==="*/"&&(i=i.slice(0,-2)),/^\s*$/.test(i))n.text="",n.raws.left=i,n.raws.right="";else{let s=i.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=E8(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some(n=>n[0]==="word")&&super.decl(t)}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(t){let n=this.colon(t);if(n===!1)return;let r,i;for(r=n-1;r>=0&&t[r][0]!=="word";r--);if(r===0||r<0)return;for(i=r-1;i>=0;i--)if(t[i][0]!=="space"){i+=1;break}let s=t.slice(r),a=t.slice(i,r);t.splice(i,t.length-i),this.spaces=a.map(o=>o[1]).join(""),this.decl(s)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map(n=>n[1]).join("")}unnamedAtrule(t){t.name=""}};pP.exports=Jv});var gP=x((g_e,mP)=>{d();var{Input:A8}=dP(),O8=hP();mP.exports=function(t,n){let r=new A8(t,n),i=new O8(r);return i.parse(),i.root}});var Yv=x(Kv=>{"use strict";d();Object.defineProperty(Kv,"__esModule",{value:!0});Kv.default=C8;function N8(e){for(var t=e.toLowerCase(),n="",r=!1,i=0;i<6&&t[i]!==void 0;i++){var s=t.charCodeAt(i),a=s>=97&&s<=102||s>=48&&s<=57;if(r=s===32,!a)break;n+=t[i]}if(n.length!==0){var o=parseInt(n,16),c=o>=55296&&o<=57343;return c||o===0||o>1114111?["\uFFFD",n.length+(r?1:0)]:[String.fromCodePoint(o),n.length+(r?1:0)]}}var P8=/\\/;function C8(e){var t=P8.test(e);if(!t)return e;for(var n="",r=0;r<e.length;r++){if(e[r]==="\\"){var i=N8(e.slice(r+1,r+7));if(i!==void 0){n+=i[0],r+=i[1];continue}if(e[r+1]==="\\"){n+="\\",r++;continue}e.length===r+1&&(n+=e[r]);continue}n+=e[r]}return n}});var yP=x(Qv=>{"use strict";d();Object.defineProperty(Qv,"__esModule",{value:!0});Qv.default=L8;function L8(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(;t.length>0;){var r=t.shift();if(!e[r])return;e=e[r]}return e}});var _P=x(Xv=>{"use strict";d();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.default=q8;function q8(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(;t.length>0;){var r=t.shift();e[r]||(e[r]={}),e=e[r]}}});var vP=x(Zv=>{"use strict";d();Object.defineProperty(Zv,"__esModule",{value:!0});Zv.default=I8;function I8(e){for(var t="",n=e.indexOf("/*"),r=0;n>=0;){t=t+e.slice(r,n);var i=e.indexOf("*/",n+2);if(i<0)return t;r=i+2,n=e.indexOf("/*",r)}return t=t+e.slice(r),t}});var bP=x(Po=>{"use strict";d();Object.defineProperty(Po,"__esModule",{value:!0});Po.MAX_NESTING_DEPTH=void 0;Po.default=M8;Po.MAX_NESTING_DEPTH=256;function M8(e){return Number.isSafeInteger(e)&&e>=0?e:Po.MAX_NESTING_DEPTH}});var Co=x(zt=>{"use strict";d();var Lu=zt&&zt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zt,"__esModule",{value:!0});zt.MAX_NESTING_DEPTH=zt.resolveMaxNestingDepth=zt.stripComments=zt.ensureObject=zt.getProp=zt.unesc=void 0;var R8=Yv();Object.defineProperty(zt,"unesc",{enumerable:!0,get:function(){return Lu(R8).default}});var D8=yP();Object.defineProperty(zt,"getProp",{enumerable:!0,get:function(){return Lu(D8).default}});var j8=_P();Object.defineProperty(zt,"ensureObject",{enumerable:!0,get:function(){return Lu(j8).default}});var B8=vP();Object.defineProperty(zt,"stripComments",{enumerable:!0,get:function(){return Lu(B8).default}});var kP=bP();Object.defineProperty(zt,"resolveMaxNestingDepth",{enumerable:!0,get:function(){return Lu(kP).default}});Object.defineProperty(zt,"MAX_NESTING_DEPTH",{enumerable:!0,get:function(){return kP.MAX_NESTING_DEPTH}})});var ei=x(tb=>{"use strict";d();Object.defineProperty(tb,"__esModule",{value:!0});var Kd=Co(),eb=function(e,t,n){if(n===void 0&&(n=0),n>Kd.MAX_NESTING_DEPTH)throw new Error("Cannot clone selector: nesting depth exceeds the maximum of ".concat(Kd.MAX_NESTING_DEPTH,"."));if(typeof e!="object"||e===null)return e;var r=new e.constructor;for(var i in e)if(e.hasOwnProperty(i)){var s=e[i],a=typeof s;i==="parent"&&a==="object"?t&&(r[i]=t):s instanceof Array?r[i]=s.map(function(o){return eb(o,r,n+1)}):r[i]=eb(s,r,n+1)}return r},F8=(function(){function e(t){t===void 0&&(t={}),Object.assign(this,t),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}return e.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.prototype.replaceWith=function(){if(this.parent){for(var t in arguments)this.parent.insertBefore(this,arguments[t]);this.remove()}return this},e.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},e.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},e.prototype.clone=function(t){t===void 0&&(t={});var n=eb(this);for(var r in t)n[r]=t[r];return n},e.prototype.appendToPropertyAndEscape=function(t,n,r){this.raws||(this.raws={});var i=this[t],s=this.raws[t];this[t]=i+n,s||r!==n?this.raws[t]=(s||i)+r:delete this.raws[t]},e.prototype.setPropertyAndEscape=function(t,n,r){this.raws||(this.raws={}),this[t]=n,this.raws[t]=r},e.prototype.setPropertyWithoutEscape=function(t,n){this[t]=n,this.raws&&delete this.raws[t]},e.prototype.isAtPosition=function(t,n){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>t||this.source.end.line<t||this.source.start.line===t&&this.source.start.column>n||this.source.end.line===t&&this.source.end.column<n)},e.prototype.stringifyProperty=function(t){return this.raws&&this.raws[t]||this[t]},Object.defineProperty(e.prototype,"rawSpaceBefore",{get:function(){var t=this.raws&&this.raws.spaces&&this.raws.spaces.before;return t===void 0&&(t=this.spaces&&this.spaces.before),t||""},set:function(t){(0,Kd.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rawSpaceAfter",{get:function(){var t=this.raws&&this.raws.spaces&&this.raws.spaces.after;return t===void 0&&(t=this.spaces.after),t||""},set:function(t){(0,Kd.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=t},enumerable:!1,configurable:!0}),e.prototype.valueToString=function(){return String(this.stringifyProperty("value"))},e.prototype.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},e.prototype._stringify=function(){return this.toString()},e})();tb.default=F8});var Nt=x(Ue=>{"use strict";d();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.UNIVERSAL=Ue.ATTRIBUTE=Ue.CLASS=Ue.COMBINATOR=Ue.COMMENT=Ue.ID=Ue.NESTING=Ue.PSEUDO=Ue.ROOT=Ue.SELECTOR=Ue.STRING=Ue.TAG=void 0;Ue.TAG="tag";Ue.STRING="string";Ue.SELECTOR="selector";Ue.ROOT="root";Ue.PSEUDO="pseudo";Ue.NESTING="nesting";Ue.ID="id";Ue.COMMENT="comment";Ue.COMBINATOR="combinator";Ue.CLASS="class";Ue.ATTRIBUTE="attribute";Ue.UNIVERSAL="universal"});var Yd=x(yt=>{"use strict";d();var V8=yt&&yt.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),$8=yt&&yt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),U8=yt&&yt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),H8=yt&&yt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&$8(n,t,r[i]);return U8(n,t),n}})(),z8=yt&&yt.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},SP=yt&&yt.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},TP=yt&&yt.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},W8=yt&&yt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yt,"__esModule",{value:!0});var nb=Co(),G8=W8(ei()),ti=H8(Nt()),J8=(function(e){V8(t,e);function t(n){var r=e.call(this,n)||this;return r.nodes||(r.nodes=[]),r}return t.prototype.append=function(n){return n.parent=this,this.nodes.push(n),this},t.prototype.prepend=function(n){n.parent=this,this.nodes.unshift(n);for(var r in this.indexes)this.indexes[r]++;return this},t.prototype.at=function(n){return this.nodes[n]},t.prototype.index=function(n){return typeof n=="number"?n:this.nodes.indexOf(n)},Object.defineProperty(t.prototype,"first",{get:function(){return this.at(0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this.at(this.length-1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length},enumerable:!1,configurable:!0}),t.prototype.removeChild=function(n){n=this.index(n),this.at(n).parent=void 0,this.nodes.splice(n,1);var r;for(var i in this.indexes)r=this.indexes[i],r>=n&&(this.indexes[i]=r-1);return this},t.prototype.removeAll=function(){var n,r;try{for(var i=z8(this.nodes),s=i.next();!s.done;s=i.next()){var a=s.value;a.parent=void 0}}catch(o){n={error:o}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this.nodes=[],this},t.prototype.empty=function(){return this.removeAll()},t.prototype.insertAfter=function(n,r){var i;r.parent=this;for(var s=this.index(n),a=[],o=2;o<arguments.length;o++)a.push(arguments[o]);(i=this.nodes).splice.apply(i,TP([s+1,0,r],SP(a),!1)),r.parent=this;var c;for(var l in this.indexes)c=this.indexes[l],s<c&&(this.indexes[l]=c+arguments.length-1);return this},t.prototype.insertBefore=function(n,r){var i;r.parent=this;for(var s=this.index(n),a=[],o=2;o<arguments.length;o++)a.push(arguments[o]);(i=this.nodes).splice.apply(i,TP([s,0,r],SP(a),!1)),r.parent=this;var c;for(var l in this.indexes)c=this.indexes[l],c>=s&&(this.indexes[l]=c+arguments.length-1);return this},t.prototype._findChildAtPosition=function(n,r){var i=void 0;return this.each(function(s){if(s.atPosition){var a=s.atPosition(n,r);if(a)return i=a,!1}else if(s.isAtPosition(n,r))return i=s,!1}),i},t.prototype.atPosition=function(n,r){if(this.isAtPosition(n,r))return this._findChildAtPosition(n,r)||this},t.prototype._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))},t.prototype.each=function(n){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var r=this.lastEach;if(this.indexes[r]=0,!!this.length){for(var i,s;this.indexes[r]<this.length&&(i=this.indexes[r],s=n(this.at(i),i),s!==!1);)this.indexes[r]+=1;if(delete this.indexes[r],s===!1)return!1}},t.prototype.walk=function(n,r){if(r===void 0&&(r=0),r>nb.MAX_NESTING_DEPTH)throw new Error("Cannot walk selector: nesting depth exceeds the maximum of ".concat(nb.MAX_NESTING_DEPTH,"."));return this.each(function(i,s){var a=n(i,s);if(a!==!1&&i.length&&(a=i.walk(n,r+1)),a===!1)return!1})},t.prototype.walkAttributes=function(n){var r=this;return this.walk(function(i){if(i.type===ti.ATTRIBUTE)return n.call(r,i)})},t.prototype.walkClasses=function(n){var r=this;return this.walk(function(i){if(i.type===ti.CLASS)return n.call(r,i)})},t.prototype.walkCombinators=function(n){var r=this;return this.walk(function(i){if(i.type===ti.COMBINATOR)return n.call(r,i)})},t.prototype.walkComments=function(n){var r=this;return this.walk(function(i){if(i.type===ti.COMMENT)return n.call(r,i)})},t.prototype.walkIds=function(n){var r=this;return this.walk(function(i){if(i.type===ti.ID)return n.call(r,i)})},t.prototype.walkNesting=function(n){var r=this;return this.walk(function(i){if(i.type===ti.NESTING)return n.call(r,i)})},t.prototype.walkPseudos=function(n){var r=this;return this.walk(function(i){if(i.type===ti.PSEUDO)return n.call(r,i)})},t.prototype.walkTags=function(n){var r=this;return this.walk(function(i){if(i.type===ti.TAG)return n.call(r,i)})},t.prototype.walkUniversals=function(n){var r=this;return this.walk(function(i){if(i.type===ti.UNIVERSAL)return n.call(r,i)})},t.prototype.split=function(n){var r=this,i=[];return this.reduce(function(s,a,o){var c=n.call(r,a);return i.push(a),c?(s.push(i),i=[]):o===r.length-1&&s.push(i),s},[])},t.prototype.map=function(n){return this.nodes.map(n)},t.prototype.reduce=function(n,r){return this.nodes.reduce(n,r)},t.prototype.every=function(n){return this.nodes.every(n)},t.prototype.some=function(n){return this.nodes.some(n)},t.prototype.filter=function(n){return this.nodes.filter(n)},t.prototype.sort=function(n){return this.nodes.sort(n)},t.prototype.toString=function(n){return n===void 0&&(n={}),this._stringify(n,0,(0,nb.resolveMaxNestingDepth)(n.maxNestingDepth))},t.prototype._stringify=function(n,r,i){var s=this;return this.map(function(a){return s._stringifyChild(a,n,r,i)}).join("")},t.prototype._stringifyChild=function(n,r,i,s){return typeof n._stringify=="function"?n._stringify(r,i,s):String(n)},t})(G8.default);yt.default=J8});var rb=x(Gs=>{"use strict";d();var K8=Gs&&Gs.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Y8=Gs&&Gs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gs,"__esModule",{value:!0});var Q8=Y8(Yd()),X8=Nt(),Z8=(function(e){K8(t,e);function t(n){var r=e.call(this,n)||this;return r.type=X8.ROOT,r}return t.prototype._stringify=function(n,r,i){var s=this,a=this.reduce(function(o,c){return o.push(s._stringifyChild(c,n,r,i)),o},[]).join(",");return this.trailingComma?a+",":a},t.prototype.error=function(n,r){return this._error?this._error(n,r):new Error(n)},Object.defineProperty(t.prototype,"errorGenerator",{set:function(n){this._error=n},enumerable:!1,configurable:!0}),t})(Q8.default);Gs.default=Z8});var ib=x(Js=>{"use strict";d();var ez=Js&&Js.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),tz=Js&&Js.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Js,"__esModule",{value:!0});var nz=tz(Yd()),rz=Nt(),iz=(function(e){ez(t,e);function t(n){var r=e.call(this,n)||this;return r.type=rz.SELECTOR,r}return t})(nz.default);Js.default=iz});var Qd=x((F_e,wP)=>{"use strict";d();var sz={},az=sz.hasOwnProperty,oz=function(t,n){if(!t)return n;var r={};for(var i in n)r[i]=az.call(t,i)?t[i]:n[i];return r},cz=/[ -,\.\/:-@\[-\^`\{-~]/,uz=/[ -,\.\/:-@\[\]\^`\{-~]/,lz=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,sb=function e(t,n){n=oz(n,e.options),n.quotes!="single"&&n.quotes!="double"&&(n.quotes="single");for(var r=n.quotes=="double"?'"':"'",i=n.isIdentifier,s=t.charAt(0),a="",o=0,c=t.length;o<c;){var l=t.charAt(o++),f=l.charCodeAt(),m=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&o<c){var p=t.charCodeAt(o++);(p&64512)==56320?f=((f&1023)<<10)+(p&1023)+65536:o--}m="\\"+f.toString(16).toUpperCase()+" "}else n.escapeEverything?cz.test(l)?m="\\"+l:m="\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?m="\\"+f.toString(16).toUpperCase()+" ":l=="\\"||!i&&(l=='"'&&r==l||l=="'"&&r==l)||i&&uz.test(l)?m="\\"+l:m=l;a+=m}return i&&(/^-[-\d]/.test(a)?a="\\-"+a.slice(1):/\d/.test(s)&&(a="\\3"+s+" "+a.slice(1))),a=a.replace(lz,function(g,v,b){return v&&v.length%2?g:(v||"")+b}),!i&&n.wrap?r+a+r:a};sb.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};sb.version="3.0.0";wP.exports=sb});var ab=x(Ks=>{"use strict";d();var fz=Ks&&Ks.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),xP=Ks&&Ks.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ks,"__esModule",{value:!0});var dz=xP(Qd()),pz=Co(),hz=xP(ei()),mz=Nt(),gz=(function(e){fz(t,e);function t(n){var r=e.call(this,n)||this;return r.type=mz.CLASS,r._constructed=!0,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(n){if(this._constructed){var r=(0,dz.default)(n,{isIdentifier:!0});r!==n?((0,pz.ensureObject)(this,"raws"),this.raws.value=r):this.raws&&delete this.raws.value}this._value=n},enumerable:!1,configurable:!0}),t.prototype.valueToString=function(){return"."+e.prototype.valueToString.call(this)},t})(hz.default);Ks.default=gz});var ob=x(Ys=>{"use strict";d();var yz=Ys&&Ys.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),_z=Ys&&Ys.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ys,"__esModule",{value:!0});var vz=_z(ei()),bz=Nt(),kz=(function(e){yz(t,e);function t(n){var r=e.call(this,n)||this;return r.type=bz.COMMENT,r}return t})(vz.default);Ys.default=kz});var cb=x(Qs=>{"use strict";d();var Sz=Qs&&Qs.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Tz=Qs&&Qs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qs,"__esModule",{value:!0});var wz=Tz(ei()),xz=Nt(),Ez=(function(e){Sz(t,e);function t(n){var r=e.call(this,n)||this;return r.type=xz.ID,r}return t.prototype.valueToString=function(){return"#"+e.prototype.valueToString.call(this)},t})(wz.default);Qs.default=Ez});var Xd=x(Xs=>{"use strict";d();var Az=Xs&&Xs.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),EP=Xs&&Xs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xs,"__esModule",{value:!0});var Oz=EP(Qd()),Nz=Co(),Pz=EP(ei()),Cz=(function(e){Az(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this._namespace},set:function(n){if(n===!0||n==="*"||n==="&"){this._namespace=n,this.raws&&delete this.raws.namespace;return}var r=(0,Oz.default)(n,{isIdentifier:!0});this._namespace=n,r!==n?((0,Nz.ensureObject)(this,"raws"),this.raws.namespace=r):this.raws&&delete this.raws.namespace},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ns",{get:function(){return this._namespace},set:function(n){this.namespace=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"namespaceString",{get:function(){if(this.namespace){var n=this.stringifyProperty("namespace");return n===!0?"":n}else return""},enumerable:!1,configurable:!0}),t.prototype.qualifiedName=function(n){return this.namespace?"".concat(this.namespaceString,"|").concat(n):n},t.prototype.valueToString=function(){return this.qualifiedName(e.prototype.valueToString.call(this))},t})(Pz.default);Xs.default=Cz});var ub=x(Zs=>{"use strict";d();var Lz=Zs&&Zs.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),qz=Zs&&Zs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zs,"__esModule",{value:!0});var Iz=qz(Xd()),Mz=Nt(),Rz=(function(e){Lz(t,e);function t(n){var r=e.call(this,n)||this;return r.type=Mz.TAG,r}return t})(Iz.default);Zs.default=Rz});var lb=x(ea=>{"use strict";d();var Dz=ea&&ea.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+AP(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),jz=ea&&ea.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ea,"__esModule",{value:!0});var Bz=jz(ei()),Fz=Nt(),AP=(function(e){Dz(t,e);function t(n){var r=e.call(this,n)||this;return r.type=Fz.STRING,r}return t})(Bz.default);ea.default=AP});var fb=x(ta=>{"use strict";d();var Vz=ta&&ta.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),$z=ta&&ta.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ta,"__esModule",{value:!0});var Uz=$z(Yd()),Hz=Nt(),zz=(function(e){Vz(t,e);function t(n){var r=e.call(this,n)||this;return r.type=Hz.PSEUDO,r}return t.prototype._stringify=function(n,r,i){var s=this;if(r>=i)throw new Error("Cannot serialize selector: nesting depth exceeds the maximum of ".concat(i,"."));var a=this.length?"("+this.map(function(o){return s._stringifyChild(o,n,r+1,i)}).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),a,this.rawSpaceAfter].join("")},t})(Uz.default);ta.default=zz});var NP=x((nve,OP)=>{d();OP.exports=ce("util").deprecate});var gb=x(Bi=>{"use strict";d();var Wz=Bi&&Bi.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),hb=Bi&&Bi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},db;Object.defineProperty(Bi,"__esModule",{value:!0});Bi.unescapeValue=mb;var qu=hb(Qd()),Gz=hb(Yv()),Jz=hb(Xd()),Kz=Nt(),Iu=NP(),Yz=/^('|")([^]*)\1$/,Qz=Iu(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),Xz=Iu(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),Zz=Iu(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function mb(e){var t=!1,n=null,r=e,i=r.match(Yz);return i&&(n=i[1],r=i[2]),r=(0,Gz.default)(r),r!==e&&(t=!0),{deprecatedUsage:t,unescaped:r,quoteMark:n}}function eW(e){if(e.quoteMark!==void 0||e.value===void 0)return e;Zz();var t=mb(e.value),n=t.quoteMark,r=t.unescaped;return e.raws||(e.raws={}),e.raws.value===void 0&&(e.raws.value=e.value),e.value=r,e.quoteMark=n,e}var tW=(function(e){Wz(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,eW(n))||this;return r.type=Kz.ATTRIBUTE,r.raws=r.raws||{},Object.defineProperty(r.raws,"unquoted",{get:Iu(function(){return r.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:Iu(function(){return r.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),r._constructed=!0,r}return t.prototype.getQuotedValue=function(n){n===void 0&&(n={});var r=this._determineQuoteMark(n),i=pb[r],s=(0,qu.default)(this._value,i);return s},t.prototype._determineQuoteMark=function(n){return n.smart?this.smartQuoteMark(n):this.preferredQuoteMark(n)},t.prototype.setValue=function(n,r){r===void 0&&(r={}),this._value=n,this._quoteMark=this._determineQuoteMark(r),this._syncRawValue()},t.prototype.smartQuoteMark=function(n){var r=this.value,i=r.replace(/[^']/g,"").length,s=r.replace(/[^"]/g,"").length;if(i+s===0){var a=(0,qu.default)(r,{isIdentifier:!0});if(a===r)return t.NO_QUOTE;var o=this.preferredQuoteMark(n);if(o===t.NO_QUOTE){var c=this.quoteMark||n.quoteMark||t.DOUBLE_QUOTE,l=pb[c],f=(0,qu.default)(r,l);if(f.length<a.length)return c}return o}else return s===i?this.preferredQuoteMark(n):s<i?t.DOUBLE_QUOTE:t.SINGLE_QUOTE},t.prototype.preferredQuoteMark=function(n){var r=n.preferCurrentQuoteMark?this.quoteMark:n.quoteMark;return r===void 0&&(r=n.preferCurrentQuoteMark?n.quoteMark:this.quoteMark),r===void 0&&(r=t.DOUBLE_QUOTE),r},Object.defineProperty(t.prototype,"quoted",{get:function(){var n=this.quoteMark;return n==="'"||n==='"'},set:function(n){Xz()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quoteMark",{get:function(){return this._quoteMark},set:function(n){if(!this._constructed){this._quoteMark=n;return}this._quoteMark!==n&&(this._quoteMark=n,this._syncRawValue())},enumerable:!1,configurable:!0}),t.prototype._syncRawValue=function(){var n=(0,qu.default)(this._value,pb[this.quoteMark]);n===this._value?this.raws&&delete this.raws.value:this.raws.value=n},Object.defineProperty(t.prototype,"qualifiedAttribute",{get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"insensitiveFlag",{get:function(){return this.insensitive?"i":""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(n){if(this._constructed){var r=mb(n),i=r.deprecatedUsage,s=r.unescaped,a=r.quoteMark;if(i&&Qz(),s===this._value&&a===this._quoteMark)return;this._value=s,this._quoteMark=a,this._syncRawValue()}else this._value=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"insensitive",{get:function(){return this._insensitive},set:function(n){n||(this._insensitive=!1,this.raws&&(this.raws.insensitiveFlag==="I"||this.raws.insensitiveFlag==="i")&&(this.raws.insensitiveFlag=void 0)),this._insensitive=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attribute",{get:function(){return this._attribute},set:function(n){this._handleEscapes("attribute",n),this._attribute=n},enumerable:!1,configurable:!0}),t.prototype._handleEscapes=function(n,r){if(this._constructed){var i=(0,qu.default)(r,{isIdentifier:!0});i!==r?this.raws[n]=i:delete this.raws[n]}},t.prototype._spacesFor=function(n){var r={before:"",after:""},i=this.spaces[n]||{},s=this.raws.spaces&&this.raws.spaces[n]||{};return Object.assign(r,i,s)},t.prototype._stringFor=function(n,r,i){r===void 0&&(r=n),i===void 0&&(i=PP);var s=this._spacesFor(r);return i(this.stringifyProperty(n),s)},t.prototype.offsetOf=function(n){var r=1,i=this._spacesFor("attribute");if(r+=i.before.length,n==="namespace"||n==="ns")return this.namespace?r:-1;if(n==="attributeNS"||(r+=this.namespaceString.length,this.namespace&&(r+=1),n==="attribute"))return r;r+=this.stringifyProperty("attribute").length,r+=i.after.length;var s=this._spacesFor("operator");r+=s.before.length;var a=this.stringifyProperty("operator");if(n==="operator")return a?r:-1;r+=a.length,r+=s.after.length;var o=this._spacesFor("value");r+=o.before.length;var c=this.stringifyProperty("value");if(n==="value")return c?r:-1;r+=c.length,r+=o.after.length;var l=this._spacesFor("insensitive");return r+=l.before.length,n==="insensitive"&&this.insensitive?r:-1},t.prototype.toString=function(){var n=this,r=[this.rawSpaceBefore,"["];return r.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(r.push(this._stringFor("operator")),r.push(this._stringFor("value")),r.push(this._stringFor("insensitiveFlag","insensitive",function(i,s){return i.length>0&&!n.quoted&&s.before.length===0&&!(n.spaces.value&&n.spaces.value.after)&&(s.before=" "),PP(i,s)}))),r.push("]"),r.push(this.rawSpaceAfter),r.join("")},t.NO_QUOTE=null,t.SINGLE_QUOTE="'",t.DOUBLE_QUOTE='"',t})(Jz.default);Bi.default=tW;var pb=(db={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},db[null]={isIdentifier:!0},db);function PP(e,t){return"".concat(t.before).concat(e).concat(t.after)}});var yb=x(na=>{"use strict";d();var nW=na&&na.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),rW=na&&na.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(na,"__esModule",{value:!0});var iW=rW(Xd()),sW=Nt(),aW=(function(e){nW(t,e);function t(n){var r=e.call(this,n)||this;return r.type=sW.UNIVERSAL,r.value="*",r}return t})(iW.default);na.default=aW});var _b=x(ra=>{"use strict";d();var oW=ra&&ra.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),cW=ra&&ra.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ra,"__esModule",{value:!0});var uW=cW(ei()),lW=Nt(),fW=(function(e){oW(t,e);function t(n){var r=e.call(this,n)||this;return r.type=lW.COMBINATOR,r}return t})(uW.default);ra.default=fW});var vb=x(ia=>{"use strict";d();var dW=ia&&ia.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),pW=ia&&ia.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ia,"__esModule",{value:!0});var hW=pW(ei()),mW=Nt(),gW=(function(e){dW(t,e);function t(n){var r=e.call(this,n)||this;return r.type=mW.NESTING,r.value="&",r}return t})(hW.default);ia.default=gW});var CP=x(bb=>{"use strict";d();Object.defineProperty(bb,"__esModule",{value:!0});bb.default=yW;function yW(e){return e.sort(function(t,n){return t-n})}});var kb=x(ne=>{"use strict";d();Object.defineProperty(ne,"__esModule",{value:!0});ne.combinator=ne.word=ne.comment=ne.str=ne.tab=ne.newline=ne.feed=ne.cr=ne.backslash=ne.bang=ne.slash=ne.doubleQuote=ne.singleQuote=ne.space=ne.greaterThan=ne.pipe=ne.equals=ne.plus=ne.caret=ne.tilde=ne.dollar=ne.closeSquare=ne.openSquare=ne.closeParenthesis=ne.openParenthesis=ne.semicolon=ne.colon=ne.comma=ne.at=ne.asterisk=ne.ampersand=void 0;ne.ampersand=38;ne.asterisk=42;ne.at=64;ne.comma=44;ne.colon=58;ne.semicolon=59;ne.openParenthesis=40;ne.closeParenthesis=41;ne.openSquare=91;ne.closeSquare=93;ne.dollar=36;ne.tilde=126;ne.caret=94;ne.plus=43;ne.equals=61;ne.pipe=124;ne.greaterThan=62;ne.space=32;ne.singleQuote=39;ne.doubleQuote=34;ne.slash=47;ne.bang=33;ne.backslash=92;ne.cr=13;ne.feed=12;ne.newline=10;ne.tab=9;ne.str=ne.singleQuote;ne.comment=-1;ne.word=-2;ne.combinator=-3});var qP=x(ar=>{"use strict";d();var _W=ar&&ar.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),vW=ar&&ar.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),bW=ar&&ar.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&_W(n,t,r[i]);return vW(n,t),n}})(),Lo,Be;Object.defineProperty(ar,"__esModule",{value:!0});ar.FIELDS=void 0;ar.default=xW;var Z=bW(kb()),kW=(Lo={},Lo[Z.tab]=!0,Lo[Z.newline]=!0,Lo[Z.cr]=!0,Lo[Z.feed]=!0,Lo),SW=(Be={},Be[Z.space]=!0,Be[Z.tab]=!0,Be[Z.newline]=!0,Be[Z.cr]=!0,Be[Z.feed]=!0,Be[Z.ampersand]=!0,Be[Z.asterisk]=!0,Be[Z.bang]=!0,Be[Z.comma]=!0,Be[Z.colon]=!0,Be[Z.semicolon]=!0,Be[Z.openParenthesis]=!0,Be[Z.closeParenthesis]=!0,Be[Z.openSquare]=!0,Be[Z.closeSquare]=!0,Be[Z.singleQuote]=!0,Be[Z.doubleQuote]=!0,Be[Z.plus]=!0,Be[Z.pipe]=!0,Be[Z.tilde]=!0,Be[Z.greaterThan]=!0,Be[Z.equals]=!0,Be[Z.dollar]=!0,Be[Z.caret]=!0,Be[Z.slash]=!0,Be),Sb={},LP="0123456789abcdefABCDEF";for(Zd=0;Zd<LP.length;Zd++)Sb[LP.charCodeAt(Zd)]=!0;var Zd;function TW(e,t){var n=t,r;do{if(r=e.charCodeAt(n),SW[r])return n-1;r===Z.backslash?n=wW(e,n)+1:n++}while(n<e.length);return n-1}function wW(e,t){var n=t,r=e.charCodeAt(n+1);if(!kW[r])if(Sb[r]){var i=0;do n++,i++,r=e.charCodeAt(n+1);while(Sb[r]&&i<6);i<6&&r===Z.space&&n++}else n++;return n}ar.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};function xW(e){var t=[],n=e.css.valueOf(),r=n.length,i=-1,s=1,a=0,o=0,c,l,f,m,p,g,v,b,_,k,w,T,y;function A(N,O){if(e.safe)n+=O,_=n.length-1;else throw e.error("Unclosed "+N,s,a-i,a)}for(;a<r;){switch(c=n.charCodeAt(a),c===Z.newline&&(i=a,s+=1),c){case Z.space:case Z.tab:case Z.newline:case Z.cr:case Z.feed:_=a;do _+=1,c=n.charCodeAt(_),c===Z.newline&&(i=_,s+=1);while(c===Z.space||c===Z.newline||c===Z.tab||c===Z.cr||c===Z.feed);y=Z.space,m=s,f=_-i-1,o=_;break;case Z.plus:case Z.greaterThan:case Z.tilde:case Z.pipe:_=a;do _+=1,c=n.charCodeAt(_);while(c===Z.plus||c===Z.greaterThan||c===Z.tilde||c===Z.pipe);y=Z.combinator,m=s,f=a-i,o=_;break;case Z.asterisk:case Z.ampersand:case Z.bang:case Z.comma:case Z.equals:case Z.dollar:case Z.caret:case Z.openSquare:case Z.closeSquare:case Z.colon:case Z.semicolon:case Z.openParenthesis:case Z.closeParenthesis:_=a,y=c,m=s,f=a-i,o=_+1;break;case Z.singleQuote:case Z.doubleQuote:T=c===Z.singleQuote?"'":'"',_=a;do for(p=!1,_=n.indexOf(T,_+1),_===-1&&A("quote",T),g=_;n.charCodeAt(g-1)===Z.backslash;)g-=1,p=!p;while(p);y=Z.str,m=s,f=a-i,o=_+1;break;default:c===Z.slash&&n.charCodeAt(a+1)===Z.asterisk?(_=n.indexOf("*/",a+2)+1,_===0&&A("comment","*/"),l=n.slice(a,_+1),b=l.split(`
|
|
66
|
+
`),v=b.length-1,v>0?(k=s+v,w=_-b[v].length):(k=s,w=i),y=Z.comment,s=k,m=k,f=_-w):c===Z.slash?(_=a,y=c,m=s,f=a-i,o=_+1):(_=TW(n,a),y=Z.word,m=s,f=_-i),o=_+1;break}t.push([y,s,a-i,m,f,a,o]),w&&(i=w,w=null),a=o}return t}});var FP=x(Pt=>{"use strict";d();var ep=Pt&&Pt.__assign||function(){return ep=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ep.apply(this,arguments)},EW=Pt&&Pt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),AW=Pt&&Pt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tp=Pt&&Pt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&EW(n,t,r[i]);return AW(n,t),n}})(),IP=Pt&&Pt.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},MP=Pt&&Pt.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},jn=Pt&&Pt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},sa,Tb;Object.defineProperty(Pt,"__esModule",{value:!0});var OW=jn(rb()),wb=jn(ib()),NW=jn(ab()),RP=jn(ob()),PW=jn(cb()),CW=jn(ub()),xb=jn(lb()),LW=jn(fb()),DP=tp(gb()),qW=jn(yb()),Eb=jn(_b()),IW=jn(vb()),MW=jn(CP()),W=tp(qP()),ee=tp(kb()),RW=tp(Nt()),Ke=Co(),Nb=(sa={},sa[ee.space]=!0,sa[ee.cr]=!0,sa[ee.feed]=!0,sa[ee.newline]=!0,sa[ee.tab]=!0,sa),DW=ep(ep({},Nb),(Tb={},Tb[ee.comment]=!0,Tb));function jP(e){return{line:e[W.FIELDS.START_LINE],column:e[W.FIELDS.START_COL]}}function BP(e){return{line:e[W.FIELDS.END_LINE],column:e[W.FIELDS.END_COL]}}function aa(e,t,n,r){return{start:{line:e,column:t},end:{line:n,column:r}}}function qo(e){return aa(e[W.FIELDS.START_LINE],e[W.FIELDS.START_COL],e[W.FIELDS.END_LINE],e[W.FIELDS.END_COL])}function Ab(e,t){if(e)return aa(e[W.FIELDS.START_LINE],e[W.FIELDS.START_COL],t[W.FIELDS.END_LINE],t[W.FIELDS.END_COL])}function Io(e,t){var n=e[t];if(typeof n=="string")return n.indexOf("\\")!==-1&&((0,Ke.ensureObject)(e,"raws"),e[t]=(0,Ke.unesc)(n),e.raws[t]===void 0&&(e.raws[t]=n)),e}function Ob(e,t){for(var n=-1,r=[];(n=e.indexOf(t,n+1))!==-1;)r.push(n);return r}function jW(){return Array.from(new Set(Array.prototype.concat.apply([],arguments)))}var BW=(function(){function e(t,n){n===void 0&&(n={}),this.rule=t,this.options=Object.assign({lossy:!1,safe:!1},n),this.position=0,this.nestingDepth=0,this.maxNestingDepth=(0,Ke.resolveMaxNestingDepth)(this.options.maxNestingDepth),this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,W.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var r=Ab(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new OW.default({source:r}),this.root.errorGenerator=this._errorGenerator();var i=new wb.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(i),this.current=i,this.loop()}return e.prototype._errorGenerator=function(){var t=this;return function(n,r){return typeof t.rule=="string"?new Error(n):t.rule.error(n,r)}},e.prototype.attribute=function(){var t=[],n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[W.FIELDS.TYPE]!==ee.closeSquare;)t.push(this.currToken),this.position++;if(!this.currToken)return this.expected("closing square bracket",n[W.FIELDS.START_POS]);if(this.currToken[W.FIELDS.TYPE]!==ee.closeSquare)return this.expected("closing square bracket",this.currToken[W.FIELDS.START_POS]);var r=t.length,i={source:aa(n[1],n[2],this.currToken[3],this.currToken[4]),sourceIndex:n[W.FIELDS.START_POS]};if(r===1&&!~[ee.word].indexOf(t[0][W.FIELDS.TYPE]))return this.expected("attribute",t[0][W.FIELDS.START_POS]);for(var s=0,a="",o="",c=null,l=!1;s<r;){var f=t[s],m=this.content(f),p=t[s+1];switch(f[W.FIELDS.TYPE]){case ee.space:if(l=!0,this.options.lossy)break;if(c){(0,Ke.ensureObject)(i,"spaces",c);var g=i.spaces[c].after||"";i.spaces[c].after=g+m;var v=(0,Ke.getProp)(i,"raws","spaces",c,"after")||null;v&&(i.raws.spaces[c].after=v+m)}else a=a+m,o=o+m;break;case ee.asterisk:if(p[W.FIELDS.TYPE]===ee.equals)i.operator=m,c="operator";else if((!i.namespace||c==="namespace"&&!l)&&p){a&&((0,Ke.ensureObject)(i,"spaces","attribute"),i.spaces.attribute.before=a,a=""),o&&((0,Ke.ensureObject)(i,"raws","spaces","attribute"),i.raws.spaces.attribute.before=o,o=""),i.namespace=(i.namespace||"")+m;var b=(0,Ke.getProp)(i,"raws","namespace")||null;b&&(i.raws.namespace+=m),c="namespace"}l=!1;break;case ee.dollar:if(c==="value"){var _=(0,Ke.getProp)(i,"raws","value");i.value+="$",_&&(i.raws.value=_+"$");break}case ee.caret:p[W.FIELDS.TYPE]===ee.equals&&(i.operator=m,c="operator"),l=!1;break;case ee.combinator:if(m==="~"&&p[W.FIELDS.TYPE]===ee.equals&&(i.operator=m,c="operator"),m!=="|"){l=!1;break}p[W.FIELDS.TYPE]===ee.equals?(i.operator=m,c="operator"):!i.namespace&&!i.attribute&&(i.namespace=!0),l=!1;break;case ee.word:if(p&&this.content(p)==="|"&&t[s+2]&&t[s+2][W.FIELDS.TYPE]!==ee.equals&&!i.operator&&!i.namespace)i.namespace=m,c="namespace";else if(!i.attribute||c==="attribute"&&!l){a&&((0,Ke.ensureObject)(i,"spaces","attribute"),i.spaces.attribute.before=a,a=""),o&&((0,Ke.ensureObject)(i,"raws","spaces","attribute"),i.raws.spaces.attribute.before=o,o=""),i.attribute=(i.attribute||"")+m;var b=(0,Ke.getProp)(i,"raws","attribute")||null;b&&(i.raws.attribute+=m),c="attribute"}else if(!i.value&&i.value!==""||c==="value"&&!(l||i.quoteMark)){var k=(0,Ke.unesc)(m),_=(0,Ke.getProp)(i,"raws","value")||"",w=i.value||"";i.value=w+k,i.quoteMark=null,(k!==m||_)&&((0,Ke.ensureObject)(i,"raws"),i.raws.value=(_||w)+m),c="value"}else{var T=m==="i"||m==="I";(i.value||i.value==="")&&(i.quoteMark||l)?(i.insensitive=T,(!T||m==="I")&&((0,Ke.ensureObject)(i,"raws"),i.raws.insensitiveFlag=m),c="insensitive",a&&((0,Ke.ensureObject)(i,"spaces","insensitive"),i.spaces.insensitive.before=a,a=""),o&&((0,Ke.ensureObject)(i,"raws","spaces","insensitive"),i.raws.spaces.insensitive.before=o,o="")):(i.value||i.value==="")&&(c="value",i.value+=m,i.raws.value&&(i.raws.value+=m))}l=!1;break;case ee.str:if(!i.attribute||!i.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:f[W.FIELDS.START_POS]});var y=(0,DP.unescapeValue)(m),A=y.unescaped,N=y.quoteMark;i.value=A,i.quoteMark=N,c="value",(0,Ke.ensureObject)(i,"raws"),i.raws.value=m,l=!1;break;case ee.equals:if(!i.attribute)return this.expected("attribute",f[W.FIELDS.START_POS],m);if(i.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:f[W.FIELDS.START_POS]});i.operator=i.operator?i.operator+m:m,c="operator",l=!1;break;case ee.comment:if(c)if(l||p&&p[W.FIELDS.TYPE]===ee.space||c==="insensitive"){var O=(0,Ke.getProp)(i,"spaces",c,"after")||"",q=(0,Ke.getProp)(i,"raws","spaces",c,"after")||O;(0,Ke.ensureObject)(i,"raws","spaces",c),i.raws.spaces[c].after=q+m}else{var j=i[c]||"",M=(0,Ke.getProp)(i,"raws",c)||j;(0,Ke.ensureObject)(i,"raws"),i.raws[c]=M+m}else o=o+m;break;default:return this.error('Unexpected "'.concat(m,'" found.'),{index:f[W.FIELDS.START_POS]})}s++}Io(i,"attribute"),Io(i,"namespace"),this.newNode(new DP.default(i)),this.position++},e.prototype.parseWhitespaceEquivalentTokens=function(t){t<0&&(t=this.tokens.length);var n=this.position,r=[],i="",s=void 0;do if(Nb[this.currToken[W.FIELDS.TYPE]])this.options.lossy||(i+=this.content());else if(this.currToken[W.FIELDS.TYPE]===ee.comment){var a={};i&&(a.before=i,i=""),s=new RP.default({value:this.content(),source:qo(this.currToken),sourceIndex:this.currToken[W.FIELDS.START_POS],spaces:a}),r.push(s)}while(++this.position<t);if(i){if(s)s.spaces.after=i;else if(!this.options.lossy){var o=this.tokens[n],c=this.tokens[this.position-1];r.push(new xb.default({value:"",source:aa(o[W.FIELDS.START_LINE],o[W.FIELDS.START_COL],c[W.FIELDS.END_LINE],c[W.FIELDS.END_COL]),sourceIndex:o[W.FIELDS.START_POS],spaces:{before:i,after:""}}))}}return r},e.prototype.convertWhitespaceNodesToSpace=function(t,n){var r=this;n===void 0&&(n=!1);var i="",s="";t.forEach(function(o){var c=r.lossySpace(o.spaces.before,n),l=r.lossySpace(o.rawSpaceBefore,n);i+=c+r.lossySpace(o.spaces.after,n&&c.length===0),s+=c+o.value+r.lossySpace(o.rawSpaceAfter,n&&l.length===0)}),s===i&&(s=void 0);var a={space:i,rawSpace:s};return a},e.prototype.isNamedCombinator=function(t){return t===void 0&&(t=this.position),this.tokens[t+0]&&this.tokens[t+0][W.FIELDS.TYPE]===ee.slash&&this.tokens[t+1]&&this.tokens[t+1][W.FIELDS.TYPE]===ee.word&&this.tokens[t+2]&&this.tokens[t+2][W.FIELDS.TYPE]===ee.slash},e.prototype.namedCombinator=function(){if(this.isNamedCombinator()){var t=this.content(this.tokens[this.position+1]),n=(0,Ke.unesc)(t).toLowerCase(),r={};n!==t&&(r.value="/".concat(t,"/"));var i=new Eb.default({value:"/".concat(n,"/"),source:aa(this.currToken[W.FIELDS.START_LINE],this.currToken[W.FIELDS.START_COL],this.tokens[this.position+2][W.FIELDS.END_LINE],this.tokens[this.position+2][W.FIELDS.END_COL]),sourceIndex:this.currToken[W.FIELDS.START_POS],raws:r});return this.position=this.position+3,i}else this.unexpected()},e.prototype.combinator=function(){var t=this;if(this.content()==="|")return this.namespace();var n=this.locateNextMeaningfulToken(this.position);if(n<0||this.tokens[n][W.FIELDS.TYPE]===ee.comma||this.tokens[n][W.FIELDS.TYPE]===ee.closeParenthesis){var r=this.parseWhitespaceEquivalentTokens(n);if(r.length>0){var i=this.current.last;if(i){var s=this.convertWhitespaceNodesToSpace(r),a=s.space,o=s.rawSpace;o!==void 0&&(i.rawSpaceAfter+=o),i.spaces.after+=a}else r.forEach(function(b){return t.newNode(b)})}return}var c=this.currToken,l=void 0;n>this.position&&(l=this.parseWhitespaceEquivalentTokens(n));var f;if(this.isNamedCombinator()?f=this.namedCombinator():this.currToken[W.FIELDS.TYPE]===ee.combinator?(f=new Eb.default({value:this.content(),source:qo(this.currToken),sourceIndex:this.currToken[W.FIELDS.START_POS]}),this.position++):Nb[this.currToken[W.FIELDS.TYPE]]||l||this.unexpected(),f){if(l){var m=this.convertWhitespaceNodesToSpace(l),a=m.space,o=m.rawSpace;f.spaces.before=a,f.rawSpaceBefore=o}}else{var p=this.convertWhitespaceNodesToSpace(l,!0),a=p.space,o=p.rawSpace;o||(o=a);var g={},v={spaces:{}};a.endsWith(" ")&&o.endsWith(" ")?(g.before=a.slice(0,a.length-1),v.spaces.before=o.slice(0,o.length-1)):a[0]===" "&&o[0]===" "?(g.after=a.slice(1),v.spaces.after=o.slice(1)):v.value=o,f=new Eb.default({value:" ",source:Ab(c,this.tokens[this.position-1]),sourceIndex:c[W.FIELDS.START_POS],spaces:g,raws:v})}return this.currToken&&this.currToken[W.FIELDS.TYPE]===ee.space&&(f.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(f)},e.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var t=new wb.default({source:{start:jP(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][W.FIELDS.START_POS]});this.current.parent.append(t),this.current=t,this.position++},e.prototype.comment=function(){var t=this.currToken;this.newNode(new RP.default({value:this.content(),source:qo(t),sourceIndex:t[W.FIELDS.START_POS]})),this.position++},e.prototype.error=function(t,n){throw this.root.error(t,n)},e.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[W.FIELDS.START_POS]})},e.prototype.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[W.FIELDS.START_POS])},e.prototype.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[W.FIELDS.START_POS])},e.prototype.unexpected=function(){return this.error("Unexpected '".concat(this.content(),"'. Escaping special characters with \\ may help."),this.currToken[W.FIELDS.START_POS])},e.prototype.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[W.FIELDS.START_POS])},e.prototype.namespace=function(){var t=this.prevToken,n=t&&(t[W.FIELDS.TYPE]===ee.word||t[W.FIELDS.TYPE]===ee.asterisk||t[W.FIELDS.TYPE]===ee.ampersand)?this.content(t):!0;if(!this.nextToken)return this.unexpectedPipe();if(this.nextToken[W.FIELDS.TYPE]===ee.word)return this.position++,this.word(n);if(this.nextToken[W.FIELDS.TYPE]===ee.asterisk)return this.position++,this.universal(n);this.unexpectedPipe()},e.prototype.nesting=function(){if(this.nextToken){var t=this.content(this.nextToken);if(t==="|"){this.position++;return}}var n=this.currToken;this.newNode(new IW.default({value:this.content(),source:qo(n),sourceIndex:n[W.FIELDS.START_POS]})),this.position++},e.prototype.parentheses=function(){var t=this.current.last,n=1,r=this.currToken;if(this.position++,t&&t.type===RW.PSEUDO){var i=new wb.default({source:{start:jP(this.tokens[this.position])},sourceIndex:this.tokens[this.position][W.FIELDS.START_POS]}),s=this.current;t.append(i),this.current=i,this.nestingDepth++;try{for(this.nestingDepth>this.maxNestingDepth&&this.error("Cannot parse selector: nesting depth exceeds the maximum of ".concat(this.maxNestingDepth,"."),{index:this.currToken[W.FIELDS.START_POS]});this.position<this.tokens.length&&n;)this.currToken[W.FIELDS.TYPE]===ee.openParenthesis&&n++,this.currToken[W.FIELDS.TYPE]===ee.closeParenthesis&&n--,n?this.parse():(this.current.source.end=BP(this.currToken),this.current.parent.source.end=BP(this.currToken),this.position++)}finally{this.nestingDepth--}this.current=s}else{for(var a=this.currToken,o="(",c=void 0;this.position<this.tokens.length&&n;)this.currToken[W.FIELDS.TYPE]===ee.openParenthesis&&n++,this.currToken[W.FIELDS.TYPE]===ee.closeParenthesis&&n--,c=this.currToken,o+=this.parseParenthesisToken(this.currToken),this.position++;t?t.appendToPropertyAndEscape("value",o,o):this.newNode(new xb.default({value:o,source:aa(a[W.FIELDS.START_LINE],a[W.FIELDS.START_COL],c[W.FIELDS.END_LINE],c[W.FIELDS.END_COL]),sourceIndex:a[W.FIELDS.START_POS]}))}if(n)return this.expected("closing parenthesis",(this.currToken||r)[W.FIELDS.START_POS])},e.prototype.pseudo=function(){for(var t=this,n="",r=this.currToken;this.currToken&&this.currToken[W.FIELDS.TYPE]===ee.colon;)n+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[W.FIELDS.TYPE]===ee.word)this.splitWord(!1,function(i,s){n+=i,t.newNode(new LW.default({value:n,source:Ab(r,t.currToken),sourceIndex:r[W.FIELDS.START_POS]})),s>1&&t.nextToken&&t.nextToken[W.FIELDS.TYPE]===ee.openParenthesis&&t.error("Misplaced parenthesis.",{index:t.nextToken[W.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[W.FIELDS.START_POS])},e.prototype.space=function(){var t=this.content();this.position===0||this.prevToken[W.FIELDS.TYPE]===ee.comma||this.prevToken[W.FIELDS.TYPE]===ee.openParenthesis||this.current.nodes.every(function(n){return n.type==="comment"})?(this.spaces=this.optionalSpace(t),this.position++):this.position===this.tokens.length-1||this.nextToken[W.FIELDS.TYPE]===ee.comma||this.nextToken[W.FIELDS.TYPE]===ee.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(t),this.position++):this.combinator()},e.prototype.string=function(){var t=this.currToken;this.newNode(new xb.default({value:this.content(),source:qo(t),sourceIndex:t[W.FIELDS.START_POS]})),this.position++},e.prototype.universal=function(t){var n=this.nextToken;if(n&&this.content(n)==="|")return this.position++,this.namespace();var r=this.currToken;this.newNode(new qW.default({value:this.content(),source:qo(r),sourceIndex:r[W.FIELDS.START_POS]}),t),this.position++},e.prototype.splitWord=function(t,n){for(var r=this,i=this.nextToken,s=this.content();i&&~[ee.dollar,ee.caret,ee.equals,ee.word].indexOf(i[W.FIELDS.TYPE]);){this.position++;var a=this.content();if(s+=a,a.lastIndexOf("\\")===a.length-1){var o=this.nextToken;o&&o[W.FIELDS.TYPE]===ee.space&&(s+=this.requiredSpace(this.content(o)),this.position++)}i=this.nextToken}var c=Ob(s,".").filter(function(b){var _=s[b-1]==="\\",k=/^\d+\.\d+%$/.test(s);return!_&&!k}),l=Ob(s,"#").filter(function(b){return s[b-1]!=="\\"}),f=Ob(s,"#{");if(f.length){var m=new Set(f);l=l.filter(function(b){return!m.has(b)})}var p=new Set(c),g=new Set(l),v=(0,MW.default)(jW(MP(MP([0],IP(c),!1),IP(l),!1)));v.forEach(function(b,_){var k=v[_+1]||s.length,w=s.slice(b,k);if(_===0&&n)return n.call(r,w,v.length);var T,y=r.currToken,A=y[W.FIELDS.START_POS]+v[_],N=aa(y[1],y[2]+b,y[3],y[2]+(k-1));if(p.has(b)){var O={value:w.slice(1),source:N,sourceIndex:A};T=new NW.default(Io(O,"value"))}else if(g.has(b)){var q={value:w.slice(1),source:N,sourceIndex:A};T=new PW.default(Io(q,"value"))}else{var j={value:w,source:N,sourceIndex:A};Io(j,"value"),T=new CW.default(j)}r.newNode(T,t),t=null}),this.position++},e.prototype.word=function(t){var n=this.nextToken;return n&&this.content(n)==="|"?(this.position++,this.namespace()):this.splitWord(t)},e.prototype.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},e.prototype.parse=function(t){switch(this.currToken[W.FIELDS.TYPE]){case ee.space:this.space();break;case ee.comment:this.comment();break;case ee.openParenthesis:this.parentheses();break;case ee.closeParenthesis:t&&this.missingParenthesis();break;case ee.openSquare:this.attribute();break;case ee.dollar:case ee.caret:case ee.equals:case ee.word:this.word();break;case ee.colon:this.pseudo();break;case ee.comma:this.comma();break;case ee.asterisk:this.universal();break;case ee.ampersand:this.nesting();break;case ee.slash:case ee.combinator:this.combinator();break;case ee.str:this.string();break;case ee.closeSquare:this.missingSquareBracket();case ee.semicolon:this.missingBackslash();default:this.unexpected()}},e.prototype.expected=function(t,n,r){if(Array.isArray(t)){var i=t.pop();t="".concat(t.join(", ")," or ").concat(i)}var s=/^[aeiou]/.test(t[0])?"an":"a";return r?this.error("Expected ".concat(s," ").concat(t,', found "').concat(r,'" instead.'),{index:n}):this.error("Expected ".concat(s," ").concat(t,"."),{index:n})},e.prototype.requiredSpace=function(t){return this.options.lossy?" ":t},e.prototype.optionalSpace=function(t){return this.options.lossy?"":t},e.prototype.lossySpace=function(t,n){return this.options.lossy?n?" ":"":t},e.prototype.parseParenthesisToken=function(t){var n=this.content(t);return t[W.FIELDS.TYPE]===ee.space?this.requiredSpace(n):n},e.prototype.newNode=function(t,n){return n&&(/^ +$/.test(n)&&(this.options.lossy||(this.spaces=(this.spaces||"")+n),n=!0),t.namespace=n,Io(t,"namespace")),this.spaces&&(t.spaces.before=this.spaces,this.spaces=""),this.current.append(t)},e.prototype.content=function(t){return t===void 0&&(t=this.currToken),this.css.slice(t[W.FIELDS.START_POS],t[W.FIELDS.END_POS])},Object.defineProperty(e.prototype,"currToken",{get:function(){return this.tokens[this.position]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextToken",{get:function(){return this.tokens[this.position+1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"prevToken",{get:function(){return this.tokens[this.position-1]},enumerable:!1,configurable:!0}),e.prototype.locateNextMeaningfulToken=function(t){t===void 0&&(t=this.position+1);for(var n=t;n<this.tokens.length;)if(DW[this.tokens[n][W.FIELDS.TYPE]]){n++;continue}else return n;return-1},e})();Pt.default=BW});var VP=x(Mu=>{"use strict";d();var FW=Mu&&Mu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mu,"__esModule",{value:!0});var VW=FW(FP()),$W=(function(){function e(t,n){this.func=t||function(){},this.funcRes=null,this.options=n}return e.prototype._shouldUpdateSelector=function(t,n){n===void 0&&(n={});var r=Object.assign({},this.options,n);return r.updateSelector===!1?!1:typeof t!="string"},e.prototype._isLossy=function(t){t===void 0&&(t={});var n=Object.assign({},this.options,t);return n.lossless===!1},e.prototype._root=function(t,n){n===void 0&&(n={});var r=new VW.default(t,this._parseOptions(n));return r.root},e.prototype._parseOptions=function(t){var n=Object.assign({},this.options,t);return{lossy:this._isLossy(n),maxNestingDepth:n.maxNestingDepth}},e.prototype._stringifyOptions=function(t){var n=Object.assign({},this.options,t);return{maxNestingDepth:n.maxNestingDepth}},e.prototype._run=function(t,n){var r=this;return n===void 0&&(n={}),new Promise(function(i,s){try{var a=r._root(t,n);Promise.resolve(r.func(a)).then(function(o){var c=void 0;return r._shouldUpdateSelector(t,n)&&(c=a.toString(r._stringifyOptions(n)),t.selector=c),{transform:o,root:a,string:c}}).then(i,s)}catch(o){s(o);return}})},e.prototype._runSync=function(t,n){n===void 0&&(n={});var r=this._root(t,n),i=this.func(r);if(i&&typeof i.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var s=void 0;return n.updateSelector&&typeof t!="string"&&(s=r.toString(this._stringifyOptions(n)),t.selector=s),{transform:i,root:r,string:s}},e.prototype.ast=function(t,n){return this._run(t,n).then(function(r){return r.root})},e.prototype.astSync=function(t,n){return this._runSync(t,n).root},e.prototype.transform=function(t,n){return this._run(t,n).then(function(r){return r.transform})},e.prototype.transformSync=function(t,n){return this._runSync(t,n).transform},e.prototype.process=function(t,n){var r=this;return this._run(t,n).then(function(i){return i.string||i.root.toString(r._stringifyOptions(n))})},e.prototype.processSync=function(t,n){var r=this._runSync(t,n);return r.string||r.root.toString(this._stringifyOptions(n))},e})();Mu.default=$W});var $P=x(je=>{"use strict";d();var Bn=je&&je.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(je,"__esModule",{value:!0});je.universal=je.tag=je.string=je.selector=je.root=je.pseudo=je.nesting=je.id=je.comment=je.combinator=je.className=je.attribute=void 0;var UW=Bn(gb()),HW=Bn(ab()),zW=Bn(_b()),WW=Bn(ob()),GW=Bn(cb()),JW=Bn(vb()),KW=Bn(fb()),YW=Bn(rb()),QW=Bn(ib()),XW=Bn(lb()),ZW=Bn(ub()),eG=Bn(yb()),tG=function(e){return new UW.default(e)};je.attribute=tG;var nG=function(e){return new HW.default(e)};je.className=nG;var rG=function(e){return new zW.default(e)};je.combinator=rG;var iG=function(e){return new WW.default(e)};je.comment=iG;var sG=function(e){return new GW.default(e)};je.id=sG;var aG=function(e){return new JW.default(e)};je.nesting=aG;var oG=function(e){return new KW.default(e)};je.pseudo=oG;var cG=function(e){return new YW.default(e)};je.root=cG;var uG=function(e){return new QW.default(e)};je.selector=uG;var lG=function(e){return new XW.default(e)};je.string=lG;var fG=function(e){return new ZW.default(e)};je.tag=fG;var dG=function(e){return new eG.default(e)};je.universal=dG});var HP=x(Te=>{"use strict";d();var sn;Object.defineProperty(Te,"__esModule",{value:!0});Te.isUniversal=Te.isTag=Te.isString=Te.isSelector=Te.isRoot=Te.isPseudo=Te.isNesting=Te.isIdentifier=Te.isComment=Te.isCombinator=Te.isClassName=Te.isAttribute=void 0;Te.isNode=Pb;Te.isPseudoElement=UP;Te.isPseudoClass=hG;Te.isContainer=mG;Te.isNamespace=gG;var Ze=Nt(),pG=(sn={},sn[Ze.ATTRIBUTE]=!0,sn[Ze.CLASS]=!0,sn[Ze.COMBINATOR]=!0,sn[Ze.COMMENT]=!0,sn[Ze.ID]=!0,sn[Ze.NESTING]=!0,sn[Ze.PSEUDO]=!0,sn[Ze.ROOT]=!0,sn[Ze.SELECTOR]=!0,sn[Ze.STRING]=!0,sn[Ze.TAG]=!0,sn[Ze.UNIVERSAL]=!0,sn);function Pb(e){return typeof e=="object"&&pG[e.type]}function Fn(e,t){return Pb(t)&&t.type===e}Te.isAttribute=Fn.bind(null,Ze.ATTRIBUTE);Te.isClassName=Fn.bind(null,Ze.CLASS);Te.isCombinator=Fn.bind(null,Ze.COMBINATOR);Te.isComment=Fn.bind(null,Ze.COMMENT);Te.isIdentifier=Fn.bind(null,Ze.ID);Te.isNesting=Fn.bind(null,Ze.NESTING);Te.isPseudo=Fn.bind(null,Ze.PSEUDO);Te.isRoot=Fn.bind(null,Ze.ROOT);Te.isSelector=Fn.bind(null,Ze.SELECTOR);Te.isString=Fn.bind(null,Ze.STRING);Te.isTag=Fn.bind(null,Ze.TAG);Te.isUniversal=Fn.bind(null,Ze.UNIVERSAL);function UP(e){return(0,Te.isPseudo)(e)&&e.value&&(e.value.startsWith("::")||e.value.toLowerCase()===":before"||e.value.toLowerCase()===":after"||e.value.toLowerCase()===":first-letter"||e.value.toLowerCase()===":first-line")}function hG(e){return(0,Te.isPseudo)(e)&&!UP(e)}function mG(e){return!!(Pb(e)&&e.walk)}function gG(e){return(0,Te.isAttribute)(e)||(0,Te.isTag)(e)}});var zP=x(ni=>{"use strict";d();var yG=ni&&ni.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Cb=ni&&ni.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&yG(t,e,n)};Object.defineProperty(ni,"__esModule",{value:!0});Cb(Nt(),ni);Cb($P(),ni);Cb(HP(),ni)});var GP=x((ri,WP)=>{"use strict";d();var _G=ri&&ri.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),vG=ri&&ri.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),bG=ri&&ri.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&_G(n,t,r[i]);return vG(n,t),n}})(),kG=ri&&ri.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},SG=kG(VP()),TG=bG(zP()),Lb=function(e){return new SG.default(e)};Object.assign(Lb,TG);delete Lb.__esModule;WP.exports=Lb});var Fe=x(Qt=>{"use strict";d();Object.defineProperty(Qt,"__esModule",{value:!0});Qt.isNodeOfType=Fi;Qt.isLiquidBranch=wG;Qt.getHtmlNodeName=xG;Qt.isHtmlTag=EG;Qt.isAttr=AG;Qt.isHtmlAttribute=OG;Qt.isValuedHtmlAttribute=NG;Qt.valueIncludes=PG;Qt.hasAttributeValueOf=CG;Qt.isLiquidString=LG;Qt.isLoopScopedVariable=qG;Qt.isLoopLiquidTag=JP;Qt.isWithinRawTagThatDoesNotParseItsContents=RG;var Ct=ue();function Fi(e,t){return t?.type===e}function wG(e){return Fi(Ct.NodeTypes.LiquidBranch,e)}function xG(e){if(typeof e.name=="string")return e.name;if(e.name.length===1&&Fi(Ct.NodeTypes.TextNode,e.name[0]))return e.name[0].value}function EG(e,t){return e.name.length===1&&e.name[0].type===Ct.NodeTypes.TextNode&&e.name[0].value===t&&!!e.blockEndPosition}function AG(e,t){return e.name.length===1&&Fi(Ct.NodeTypes.TextNode,e.name[0])&&e.name[0].value===t}function OG(e){return[Ct.NodeTypes.AttrUnquoted,Ct.NodeTypes.AttrDoubleQuoted,Ct.NodeTypes.AttrSingleQuoted,Ct.NodeTypes.AttrEmpty].some(t=>Fi(t,e))}function NG(e){return[Ct.NodeTypes.AttrUnquoted,Ct.NodeTypes.AttrDoubleQuoted,Ct.NodeTypes.AttrSingleQuoted].some(t=>Fi(t,e))}function PG(e,t){let n=new RegExp(`(^|\\s)${t}(\\s|$)`,"g");return e.value.filter(r=>Fi(Ct.NodeTypes.TextNode,r)).some(r=>n.test(r.value))}function CG(e,t){return e.value.length===1&&Fi(Ct.NodeTypes.TextNode,e.value[0])&&e.value[0].value===t}function LG(e){return e.type===Ct.NodeTypes.String}function qG(e,t){return t.some(n=>n.type===Ct.NodeTypes.LiquidTag&&JP(n)&&typeof n.markup!="string"&&n.markup.variableName===e)}function JP(e){return Ct.LoopNamedTags.includes(e.name)}var IG=["raw","stylesheet","javascript","schema"];function MG(e){return e.type===Ct.NodeTypes.LiquidRawTag&&IG.includes(e.name)}function RG(e){return e.some(MG)}});var ii=x(Mo=>{"use strict";d();Object.defineProperty(Mo,"__esModule",{value:!0});Mo.visit=DG;Mo.forEachChildNodes=rp;Mo.findCurrentNode=jG;Mo.findJSONNode=VG;var np=ue();function KP(e){return e!==null&&typeof e=="object"&&typeof e.type=="string"}function DG(e,t){let n=[],r=[{node:e,lineage:[]}],i=(s,a)=>r.push({node:s,lineage:a});for(;r.length>0;){let{node:s,lineage:a}=r.pop(),o=t[s.type],c=o?o(s,a):void 0;Array.isArray(c)?n.push(...c):c!==void 0&&n.push(c),rp(s,a.concat(s),i)}return n}function rp(e,t,n){for(let r of Object.values(e))if(Array.isArray(r))for(let i=r.length-1;i>=0;i--)KP(r[i])&&n(r[i],t);else KP(r)&&n(r,t)}function jG(e,t){let n,r=e,i=[];for(;r!==n;)n=r,rp(r,i.concat(r),(s,a)=>{(FG(s)||BG(s,t)&&YP(s)<=YP(r))&&(r=s,i=a)});return[r,i]}function BG(e,t){switch(e.type){case np.NodeTypes.String:case np.NodeTypes.VariableLookup:case np.NodeTypes.LogicalExpression:case np.NodeTypes.Comparison:return e.position.start<=t&&t<=e.position.end;default:return e.position.start<t&&t<=e.position.end}}function YP(e){return e.position.end-e.position.start}function FG(e){return"blockEndPosition"in e?e.blockEndPosition?.end===-1:"children"in e?e.children.length>0:!1}function VG(e,t){let n,r=e,i=[],s=t;for(;r!==n;)n=r,rp(r,i.concat(r),(a,o)=>{a.loc.start.offset<=s&&s<a.loc.end.offset&&(r=a,i=o)});return[r,i]}});var ip=x(wr=>{"use strict";d();var QP=wr&&wr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wr,"__esModule",{value:!0});wr.extractCSSClassNames=qb;wr.extractCSSClassesFromLiquidAST=ZP;wr.extractCSSClassesFromLiquidUri=zG;wr.extractCSSClassesFromAssetUri=WG;wr.collectUsedClasses=Ru;wr.collectUsedClassesFromSvg=JG;var Ro=ue(),$G=QP(gP()),UG=QP(GP()),HG=Fe(),XP=ii();function qb(e){let t=new Set;return(0,$G.default)(e).walkRules(r=>{try{(0,UG.default)().astSync(r.selector).walk(s=>{s.type==="class"&&t.add(s.value)})}catch{}}),t}function ZP(e){let t=new Set,n=(0,XP.visit)(e,{LiquidRawTag(r){if(r.name==="stylesheet")return r.body.value}});for(let r of n)for(let i of qb(r))t.add(i);return t}async function zG(e,t){let n=new Set;try{let r=await t.readFile(e);if(!/\{%-?\s*stylesheet/.test(r))return n;let i=(0,Ro.toLiquidHtmlAST)(r);if(i instanceof Error)return n;for(let s of ZP(i))n.add(s)}catch{}return n}async function WG(e,t){try{let n=await t.readFile(e);return qb(n)}catch{return new Set}}function GG(e){return e.name.length===1&&e.name[0].type===Ro.NodeTypes.TextNode&&e.name[0].value.toLowerCase()==="class"}function Ru(e,t){for(let n of e){if(!(0,HG.isValuedHtmlAttribute)(n)||!GG(n))continue;let r=n.value;for(let i=0;i<r.length;i++){let s=r[i];if(s.type!==Ro.NodeTypes.TextNode)continue;let a=s,o=a.value,c=a.position.start,l=i>0&&r[i-1].type!==Ro.NodeTypes.TextNode,f=i<r.length-1&&r[i+1].type!==Ro.NodeTypes.TextNode,m=[],p=/\S+/g,g;for(;(g=p.exec(o))!==null;)m.push({className:g[0],startIndex:c+g.index,endIndex:c+g.index+g[0].length});m.length!==0&&(l&&!/^\s/.test(o)&&m.shift(),f&&!/\s$/.test(o)&&m.pop(),t.push(...m))}}}function JG(e,t,n,r){Ru(e,r);try{let i=(0,Ro.toLiquidHtmlAST)(t);if(i instanceof Error)return;let s=[],a={HtmlElement(o){Ru(o.attributes,s)},HtmlVoidElement(o){Ru(o.attributes,s)},HtmlSelfClosingElement(o){Ru(o.attributes,s)}};(0,XP.visit)(i,a);for(let o of s)r.push({className:o.className,startIndex:o.startIndex+n,endIndex:o.endIndex+n})}catch{}}});var ju=x((Du,Ib)=>{d();(function(e,t){if(typeof Du=="object"&&typeof Ib=="object")Ib.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var n=t();for(var r in n)(typeof Du=="object"?Du:e)[r]=n[r]}})(Du,(()=>(()=>{"use strict";var e={975:i=>{function s(c){if(typeof c!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(c))}function a(c,l){for(var f,m="",p=0,g=-1,v=0,b=0;b<=c.length;++b){if(b<c.length)f=c.charCodeAt(b);else{if(f===47)break;f=47}if(f===47){if(!(g===b-1||v===1))if(g!==b-1&&v===2){if(m.length<2||p!==2||m.charCodeAt(m.length-1)!==46||m.charCodeAt(m.length-2)!==46){if(m.length>2){var _=m.lastIndexOf("/");if(_!==m.length-1){_===-1?(m="",p=0):p=(m=m.slice(0,_)).length-1-m.lastIndexOf("/"),g=b,v=0;continue}}else if(m.length===2||m.length===1){m="",p=0,g=b,v=0;continue}}l&&(m.length>0?m+="/..":m="..",p=2)}else m.length>0?m+="/"+c.slice(g+1,b):m=c.slice(g+1,b),p=b-g-1;g=b,v=0}else f===46&&v!==-1?++v:v=-1}return m}var o={resolve:function(){for(var c,l="",f=!1,m=arguments.length-1;m>=-1&&!f;m--){var p;m>=0?p=arguments[m]:(c===void 0&&(c=process.cwd()),p=c),s(p),p.length!==0&&(l=p+"/"+l,f=p.charCodeAt(0)===47)}return l=a(l,!f),f?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(c){if(s(c),c.length===0)return".";var l=c.charCodeAt(0)===47,f=c.charCodeAt(c.length-1)===47;return(c=a(c,!l)).length!==0||l||(c="."),c.length>0&&f&&(c+="/"),l?"/"+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,l=0;l<arguments.length;++l){var f=arguments[l];s(f),f.length>0&&(c===void 0?c=f:c+="/"+f)}return c===void 0?".":o.normalize(c)},relative:function(c,l){if(s(c),s(l),c===l||(c=o.resolve(c))===(l=o.resolve(l)))return"";for(var f=1;f<c.length&&c.charCodeAt(f)===47;++f);for(var m=c.length,p=m-f,g=1;g<l.length&&l.charCodeAt(g)===47;++g);for(var v=l.length-g,b=p<v?p:v,_=-1,k=0;k<=b;++k){if(k===b){if(v>b){if(l.charCodeAt(g+k)===47)return l.slice(g+k+1);if(k===0)return l.slice(g+k)}else p>b&&(c.charCodeAt(f+k)===47?_=k:k===0&&(_=0));break}var w=c.charCodeAt(f+k);if(w!==l.charCodeAt(g+k))break;w===47&&(_=k)}var T="";for(k=f+_+1;k<=m;++k)k!==m&&c.charCodeAt(k)!==47||(T.length===0?T+="..":T+="/..");return T.length>0?T+l.slice(g+_):(g+=_,l.charCodeAt(g)===47&&++g,l.slice(g))},_makeLong:function(c){return c},dirname:function(c){if(s(c),c.length===0)return".";for(var l=c.charCodeAt(0),f=l===47,m=-1,p=!0,g=c.length-1;g>=1;--g)if((l=c.charCodeAt(g))===47){if(!p){m=g;break}}else p=!1;return m===-1?f?"/":".":f&&m===1?"//":c.slice(0,m)},basename:function(c,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');s(c);var f,m=0,p=-1,g=!0;if(l!==void 0&&l.length>0&&l.length<=c.length){if(l.length===c.length&&l===c)return"";var v=l.length-1,b=-1;for(f=c.length-1;f>=0;--f){var _=c.charCodeAt(f);if(_===47){if(!g){m=f+1;break}}else b===-1&&(g=!1,b=f+1),v>=0&&(_===l.charCodeAt(v)?--v==-1&&(p=f):(v=-1,p=b))}return m===p?p=b:p===-1&&(p=c.length),c.slice(m,p)}for(f=c.length-1;f>=0;--f)if(c.charCodeAt(f)===47){if(!g){m=f+1;break}}else p===-1&&(g=!1,p=f+1);return p===-1?"":c.slice(m,p)},extname:function(c){s(c);for(var l=-1,f=0,m=-1,p=!0,g=0,v=c.length-1;v>=0;--v){var b=c.charCodeAt(v);if(b!==47)m===-1&&(p=!1,m=v+1),b===46?l===-1?l=v:g!==1&&(g=1):l!==-1&&(g=-1);else if(!p){f=v+1;break}}return l===-1||m===-1||g===0||g===1&&l===m-1&&l===f+1?"":c.slice(l,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(l,f){var m=f.dir||f.root,p=f.base||(f.name||"")+(f.ext||"");return m?m===f.root?m+p:m+"/"+p:p})(0,c)},parse:function(c){s(c);var l={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return l;var f,m=c.charCodeAt(0),p=m===47;p?(l.root="/",f=1):f=0;for(var g=-1,v=0,b=-1,_=!0,k=c.length-1,w=0;k>=f;--k)if((m=c.charCodeAt(k))!==47)b===-1&&(_=!1,b=k+1),m===46?g===-1?g=k:w!==1&&(w=1):g!==-1&&(w=-1);else if(!_){v=k+1;break}return g===-1||b===-1||w===0||w===1&&g===b-1&&g===v+1?b!==-1&&(l.base=l.name=v===0&&p?c.slice(1,b):c.slice(v,b)):(v===0&&p?(l.name=c.slice(1,g),l.base=c.slice(1,b)):(l.name=c.slice(v,g),l.base=c.slice(v,b)),l.ext=c.slice(g,b)),v>0?l.dir=c.slice(0,v-1):p&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o},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 o=a(70),c=/^\w[\w\d+.-]*$/,l=/^\//,f=/^\/\//;function m(M,C){if(!M.scheme&&C)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${M.authority}", path: "${M.path}", query: "${M.query}", fragment: "${M.fragment}"}`);if(M.scheme&&!c.test(M.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(M.path){if(M.authority){if(!l.test(M.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(f.test(M.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="",g="/",v=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class b{static isUri(C){return C instanceof b||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="string"&&typeof C.with=="function"&&typeof C.toString=="function"}scheme;authority;path;query;fragment;constructor(C,L,V,$,I,B=!1){typeof C=="object"?(this.scheme=C.scheme||p,this.authority=C.authority||p,this.path=C.path||p,this.query=C.query||p,this.fragment=C.fragment||p):(this.scheme=(function(U,J){return U||J?U:"file"})(C,B),this.authority=L||p,this.path=(function(U,J){switch(U){case"https":case"http":case"file":J?J[0]!==g&&(J=g+J):J=g}return J})(this.scheme,V||p),this.query=$||p,this.fragment=I||p,m(this,B))}get fsPath(){return A(this,!1)}with(C){if(!C)return this;let{scheme:L,authority:V,path:$,query:I,fragment:B}=C;return L===void 0?L=this.scheme:L===null&&(L=p),V===void 0?V=this.authority:V===null&&(V=p),$===void 0?$=this.path:$===null&&($=p),I===void 0?I=this.query:I===null&&(I=p),B===void 0?B=this.fragment:B===null&&(B=p),L===this.scheme&&V===this.authority&&$===this.path&&I===this.query&&B===this.fragment?this:new k(L,V,$,I,B)}static parse(C,L=!1){let V=v.exec(C);return V?new k(V[2]||p,j(V[4]||p),j(V[5]||p),j(V[7]||p),j(V[9]||p),L):new k(p,p,p,p,p)}static file(C){let L=p;if(o.isWindows&&(C=C.replace(/\\/g,g)),C[0]===g&&C[1]===g){let V=C.indexOf(g,2);V===-1?(L=C.substring(2),C=g):(L=C.substring(2,V),C=C.substring(V)||g)}return new k("file",L,C,p,p)}static from(C){let L=new k(C.scheme,C.authority,C.path,C.query,C.fragment);return m(L,!0),L}toString(C=!1){return N(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof b)return C;{let L=new k(C);return L._formatted=C.external,L._fsPath=C._sep===_?C.fsPath:null,L}}return C}}s.URI=b;let _=o.isWindows?1:void 0;class k extends b{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=A(this,!1)),this._fsPath}toString(C=!1){return C?N(this,!0):(this._formatted||(this._formatted=N(this,!1)),this._formatted)}toJSON(){let C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=_),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}let w={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(M,C,L){let V,$=-1;for(let I=0;I<M.length;I++){let B=M.charCodeAt(I);if(B>=97&&B<=122||B>=65&&B<=90||B>=48&&B<=57||B===45||B===46||B===95||B===126||C&&B===47||L&&B===91||L&&B===93||L&&B===58)$!==-1&&(V+=encodeURIComponent(M.substring($,I)),$=-1),V!==void 0&&(V+=M.charAt(I));else{V===void 0&&(V=M.substr(0,I));let U=w[B];U!==void 0?($!==-1&&(V+=encodeURIComponent(M.substring($,I)),$=-1),V+=U):$===-1&&($=I)}}return $!==-1&&(V+=encodeURIComponent(M.substring($))),V!==void 0?V:M}function y(M){let C;for(let L=0;L<M.length;L++){let V=M.charCodeAt(L);V===35||V===63?(C===void 0&&(C=M.substr(0,L)),C+=w[V]):C!==void 0&&(C+=M[L])}return C!==void 0?C:M}function A(M,C){let L;return L=M.authority&&M.path.length>1&&M.scheme==="file"?`//${M.authority}${M.path}`:M.path.charCodeAt(0)===47&&(M.path.charCodeAt(1)>=65&&M.path.charCodeAt(1)<=90||M.path.charCodeAt(1)>=97&&M.path.charCodeAt(1)<=122)&&M.path.charCodeAt(2)===58?C?M.path.substr(1):M.path[1].toLowerCase()+M.path.substr(2):M.path,o.isWindows&&(L=L.replace(/\//g,"\\")),L}function N(M,C){let L=C?y:T,V="",{scheme:$,authority:I,path:B,query:U,fragment:J}=M;if($&&(V+=$,V+=":"),(I||$==="file")&&(V+=g,V+=g),I){let Q=I.indexOf("@");if(Q!==-1){let Y=I.substr(0,Q);I=I.substr(Q+1),Q=Y.lastIndexOf(":"),Q===-1?V+=L(Y,!1,!1):(V+=L(Y.substr(0,Q),!1,!1),V+=":",V+=L(Y.substr(Q+1),!1,!0)),V+="@"}I=I.toLowerCase(),Q=I.lastIndexOf(":"),Q===-1?V+=L(I,!1,!0):(V+=L(I.substr(0,Q),!1,!0),V+=I.substr(Q))}if(B){if(B.length>=3&&B.charCodeAt(0)===47&&B.charCodeAt(2)===58){let Q=B.charCodeAt(1);Q>=65&&Q<=90&&(B=`/${String.fromCharCode(Q+32)}:${B.substr(3)}`)}else if(B.length>=2&&B.charCodeAt(1)===58){let Q=B.charCodeAt(0);Q>=65&&Q<=90&&(B=`${String.fromCharCode(Q+32)}:${B.substr(2)}`)}V+=L(B,!0,!1)}return U&&(V+="?",V+=L(U,!1,!1)),J&&(V+="#",V+=C?J:T(J,!1,!1)),V}function O(M){try{return decodeURIComponent(M)}catch{return M.length>3?M.substr(0,3)+O(M.substr(3)):M}}s.uriToFsPath=A;let q=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function j(M){return M.match(q)?M.replace(q,(C=>O(C))):M}},552:function(i,s,a){var o=this&&this.__createBinding||(Object.create?function(v,b,_,k){k===void 0&&(k=_);var w=Object.getOwnPropertyDescriptor(b,_);w&&!("get"in w?!b.__esModule:w.writable||w.configurable)||(w={enumerable:!0,get:function(){return b[_]}}),Object.defineProperty(v,k,w)}:function(v,b,_,k){k===void 0&&(k=_),v[k]=b[_]}),c=this&&this.__setModuleDefault||(Object.create?function(v,b){Object.defineProperty(v,"default",{enumerable:!0,value:b})}:function(v,b){v.default=b}),l=this&&this.__importStar||function(v){if(v&&v.__esModule)return v;var b={};if(v!=null)for(var _ in v)_!=="default"&&Object.prototype.hasOwnProperty.call(v,_)&&o(b,v,_);return c(b,v),b};Object.defineProperty(s,"__esModule",{value:!0}),s.Utils=void 0;let f=l(a(975)),m=f.posix||f,p="/";var g;(function(v){v.joinPath=function(b,..._){return b.with({path:m.join(b.path,..._)})},v.resolvePath=function(b,..._){let k=b.path,w=!1;k[0]!==p&&(k=p+k,w=!0);let T=m.resolve(k,..._);return w&&T[0]===p&&!b.authority&&(T=T.substring(1)),b.with({path:T})},v.dirname=function(b){if(b.path.length===0||b.path===p)return b;let _=m.dirname(b.path);return _.length===1&&_.charCodeAt(0)===46&&(_=""),b.with({path:_})},v.basename=function(b){return m.basename(b.path)},v.extname=function(b){return m.extname(b.path)}})(g||(s.Utils=g={}))}},t={};function n(i){var s=t[i];if(s!==void 0)return s.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,n),a.exports}var r={};return(()=>{var i=r;Object.defineProperty(i,"__esModule",{value:!0}),i.Utils=i.URI=void 0;let s=n(231);Object.defineProperty(i,"URI",{enumerable:!0,get:function(){return s.URI}});let a=n(552);Object.defineProperty(i,"Utils",{enumerable:!0,get:function(){return a.Utils}})})(),r})()))});var xr=x(bn=>{"use strict";d();Object.defineProperty(bn,"__esModule",{value:!0});bn.Utils=bn.URI=void 0;bn.relative=KG;bn.join=YG;bn.resolve=QG;bn.normalize=Bu;bn.dirname=XG;bn.basename=ZG;bn.fsPath=eJ;var Vi=ju();Object.defineProperty(bn,"URI",{enumerable:!0,get:function(){return Vi.URI}});Object.defineProperty(bn,"Utils",{enumerable:!0,get:function(){return Vi.Utils}});function KG(e,t){return Bu(e).replace(t,"").replace(/\\\\/g,"/").replace(/^\/+/,"")}function YG(e,...t){return Bu(Vi.Utils.joinPath(Do(e),...t))}function QG(e,t){return Bu(Vi.Utils.resolvePath(Do(e),t))}function Bu(e){return Do(e).toString(!0).replace(/\\/g,"/")}function XG(e){return Bu(Vi.Utils.dirname(Do(e)))}function ZG(e,t){let n=Vi.Utils.basename(Do(e));return t?n.replace(new RegExp(`${t.replace(/\./g,"\\.")}$`),""):n}function eJ(e){return Do(e).fsPath}function Do(e){return Vi.URI.isUri(e)?e:Vi.URI.parse(e)}});var Mb=x(Vn=>{"use strict";d();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.location=Vn.JSONCParseErrors=void 0;Vn.toJSONNode=rJ;var tJ=Ce(),nJ=(vr(),Uy(to)),sp=class extends Error{errors;constructor(t,n){super(t),this.errors=n}};Vn.JSONCParseErrors=sp;function rJ(e){let t=[],n=(0,nJ.parseTree)(e,t,{allowTrailingComma:!0,disallowComments:!1});if(t.length||n===void 0)throw new sp("Failed to parse JSONC",t);return ap(n)}function ap(e){switch(e.type){case"object":return iJ(e);case"property":return aJ(e);case"array":return sJ(e);case"boolean":case"null":case"number":case"string":return cJ(e);default:(0,tJ.assertNever)(e.type)}}function iJ(e){return{type:"Object",children:(e.children??[]).map(ap),loc:(0,Vn.location)(e.offset,e.offset+e.length)}}function sJ(e){return{type:"Array",children:e.children.map(ap),loc:(0,Vn.location)(e.offset,e.offset+e.length)}}function aJ(e){return{type:"Property",key:oJ(e.children[0]),value:ap(e.children[1]),loc:(0,Vn.location)(e.offset,e.offset+e.length)}}function oJ(e){return{type:"Identifier",value:e.value,raw:JSON.stringify(e.value),loc:(0,Vn.location)(e.offset,e.offset+e.length)}}function cJ(e){return{type:"Literal",value:e.value,raw:JSON.stringify(e.value),loc:(0,Vn.location)(e.offset,e.offset+e.length)}}var uJ=(e,t)=>({start:eC(e),end:eC(t)});Vn.location=uJ;var eC=e=>({offset:e})});var nC=x(tC=>{"use strict";d();Object.defineProperty(tC,"__esModule",{value:!0})});var rC=x(op=>{"use strict";d();Object.defineProperty(op,"__esModule",{value:!0});op.SchemaProp=void 0;var Rb=class e{options;constructor(t){this.options=t}static string(t){return new e({type:"string",defaultValue:t})}static number(t){return new e({type:"number",defaultValue:t})}static boolean(t){return new e({type:"boolean",defaultValue:t})}static object(t,n){return new e({type:"object",defaultValue:n,properties:t})}static array(t,n){return new e({type:"array",defaultValue:n,itemType:t})}optional(){return this.options.optional=!0,this}defaultValue(){return this.options.defaultValue}};op.SchemaProp=Rb});var sC=x(iC=>{"use strict";d();Object.defineProperty(iC,"__esModule",{value:!0})});var oC=x(aC=>{"use strict";d();Object.defineProperty(aC,"__esModule",{value:!0})});var cC=x(cp=>{"use strict";d();Object.defineProperty(cp,"__esModule",{value:!0});cp.Setting=void 0;var lJ=oC();Object.defineProperty(cp,"Setting",{enumerable:!0,get:function(){return lJ.Setting}})});var lC=x(si=>{"use strict";d();var fJ=si&&si.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),dJ=si&&si.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&fJ(t,e,n)};Object.defineProperty(si,"__esModule",{value:!0});si.ThemeSchemaType=void 0;dJ(cC(),si);var uC;(function(e){e.AppBlock="app-block",e.Block="block",e.Section="section"})(uC||(si.ThemeSchemaType=uC={}))});var K=x(Le=>{"use strict";d();var pJ=Le&&Le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),up=Le&&Le.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&pJ(t,e,n)};Object.defineProperty(Le,"__esModule",{value:!0});Le.ConfigTarget=Le.Severity=Le.LiquidHtmlNodeTypes=Le.SourceCodeType=Le.Modes=Le.isLiteralNode=Le.isValueNode=Le.isPropertyNode=Le.isArrayNode=Le.isObjectNode=void 0;var hJ=ue();Object.defineProperty(Le,"LiquidHtmlNodeTypes",{enumerable:!0,get:function(){return hJ.NodeTypes}});up(nC(),Le);up(rC(),Le);up(sC(),Le);up(lC(),Le);var mJ=e=>e?.type==="Object";Le.isObjectNode=mJ;var gJ=e=>e?.type==="Array";Le.isArrayNode=gJ;var yJ=e=>e?.type==="Property";Le.isPropertyNode=yJ;var _J=e=>e?.type==="Value";Le.isValueNode=_J;var vJ=e=>e?.type==="Literal";Le.isLiteralNode=vJ;Le.Modes=["theme","app"];var fC;(function(e){e.JSON="JSON",e.LiquidHtml="LiquidHtml"})(fC||(Le.SourceCodeType=fC={}));var dC;(function(e){e[e.ERROR=0]="ERROR",e[e.WARNING=1]="WARNING",e[e.INFO=2]="INFO"})(dC||(Le.Severity=dC={}));var pC;(function(e){e.All="all",e.Recommended="recommended",e.ThemeAppExtension="theme-app-extension"})(pC||(Le.ConfigTarget=pC={}))});var Fu=x(or=>{"use strict";d();var bJ=or&&or.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),kJ=or&&or.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),SJ=or&&or.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&bJ(n,t,r[i]);return kJ(n,t),n}})();Object.defineProperty(or,"__esModule",{value:!0});or.toLiquidHTMLAST=yC;or.toJSONAST=_C;or.toSourceCode=xJ;var TJ=ue(),wJ=Mb(),hC=SJ(xr()),mC=K(),gC=Ef();function yC(e){try{return(0,TJ.toLiquidHtmlAST)(e)}catch(t){return(0,gC.asError)(t)}}function _C(e){try{return(0,wJ.toJSONNode)(e)}catch(t){return(0,gC.asError)(t)}}function xJ(e,t,n){return e.endsWith(".liquid")?{uri:hC.normalize(e),source:t,type:mC.SourceCodeType.LiquidHtml,ast:yC(t),version:n}:{uri:hC.normalize(e),source:t,type:mC.SourceCodeType.JSON,ast:_C(t),version:n}}});var He=x(pt=>{"use strict";d();var EJ=pt&&pt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),AJ=pt&&pt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),OJ=pt&&pt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&EJ(n,t,r[i]);return AJ(n,t),n}})();Object.defineProperty(pt,"__esModule",{value:!0});pt.toSchema=NJ;pt.isBlock=lp;pt.isSection=jb;pt.isSnippet=PJ;pt.isBlockSchema=CJ;pt.isSectionSchema=LJ;pt.toBlockSchema=TC;pt.toSectionSchema=wC;pt.toAppBlockSchema=xC;pt.hasNoSchemaTag=qJ;pt.getSchema=IJ;pt.getSchemaFromJSON=MJ;var Db=ue(),vC=Ge(),oa=OJ(xr()),bC=Fu(),jo=K(),kC=ii();async function NJ(e,t,n,r,i=!0){if(n.type===jo.SourceCodeType.LiquidHtml)switch(!0){case(e==="app"&&lp(t)):return xC(t,n.ast,i);case(e==="theme"&&lp(t)):return TC(t,n.ast,r,i);case(e==="theme"&&jb(t)):return wC(t,n.ast,r,i);default:return}}function lp(e){return oa.dirname(e).endsWith("blocks")}function jb(e){return oa.dirname(e).endsWith("sections")}function PJ(e){return oa.dirname(e).endsWith("snippets")}function CJ(e){return e?.type===jo.ThemeSchemaType.Block}function LJ(e){return e?.type===jo.ThemeSchemaType.Section}async function SC(e,t,n,r){return r?t instanceof Error||await r(e,t.body.value)?n:new Error("Invalid schema"):new Error("No JSON validator provided")}async function TC(e,t,n,r){let i=oa.basename(e,".liquid"),s=Bb(t),a=AC(t),o=Fb(s,r),c=Vb(s);return{type:jo.ThemeSchemaType.Block,validSchema:await SC(e,s,o,n),offset:s instanceof Error?0:s.blockStartPosition.end,name:i,parsed:o,ast:c,value:s instanceof Error?"":s.body.value,staticBlockDefs:a}}async function wC(e,t,n,r){let i=oa.basename(e,".liquid"),s=Bb(t),a=AC(t),o=Fb(s,r),c=Vb(s);return{type:jo.ThemeSchemaType.Section,validSchema:await SC(e,s,o,n),offset:s instanceof Error?0:s.blockStartPosition.end,name:i,parsed:o,ast:c,value:s instanceof Error?"":s.body.value,staticBlockDefs:a}}async function xC(e,t,n){let r=oa.basename(e,".liquid"),i=Bb(t),s=Fb(i,n),a=Vb(i);return{type:jo.ThemeSchemaType.AppBlock,offset:i instanceof Error?0:i.blockStartPosition.end,name:r,parsed:s,ast:a,value:i instanceof Error?"":i.body.value}}var EC="No schema tag found";function qJ(e){return e.parsed instanceof Error&&e.parsed.message===EC}function Bb(e){return e instanceof Error?e:(0,kC.visit)(e,{LiquidRawTag(t){if(t.name==="schema")return t}})[0]??new Error(EC)}function AC(e){return e instanceof Error?[]:(0,kC.visit)(e,{LiquidTag(t){if(t.name!==Db.NamedTags.content_for||typeof t.markup=="string")return;let n=t.markup;if(n.contentForType.value!=="block")return;let r=n.args.find(s=>s.name==="type"),i=n.args.find(s=>s.name==="id");if(!(!r||!i)&&r.value.type===Db.NodeTypes.String&&i.value.type===Db.NodeTypes.String)return{type:r.value.value,id:i.value.value}}})}function IJ(e){let t=oa.basename(e.file.uri,".liquid");switch(!0){case lp(e.file.uri):return e.getBlockSchema?.(t);case jb(e.file.uri):return e.getSectionSchema?.(t);default:return}}async function MJ(e){let t=e.file.source,n=(0,vC.parseJSON)(t),r=(0,bC.toJSONAST)(t);return{parsed:n,ast:r}}function Fb(e,t){return e instanceof Error?e:(0,vC.parseJSON)(e.body.value,void 0,t)}function Vb(e){return e instanceof Error?e:(0,bC.toJSONAST)(e.body.value)}});var fp=x(Vu=>{"use strict";d();Object.defineProperty(Vu,"__esModule",{value:!0});Vu.getAncestorUris=RJ;Vu.getAllSnippetDescendantUris=DJ;Vu.getRenderedSnippetUris=jJ;var OC=He();async function RJ(e,t){let n=[],r=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(r.has(s))continue;r.add(s);let a=await t(s);for(let o of a)o.type==="direct"&&!r.has(o.source.uri)&&(n.push(o.source.uri),i.push(o.source.uri))}return n}async function DJ(e,t){let n=[],r=new Set,i=[...e];for(;i.length>0;){let s=i.shift();if(r.has(s))continue;r.add(s),n.push(s);let a=await t(s);for(let o of a)o.type==="direct"&&(0,OC.isSnippet)(o.target.uri)&&!r.has(o.target.uri)&&i.push(o.target.uri)}return n}async function jJ(e,t){return(await t(e)).filter(r=>r.type==="direct"&&(0,OC.isSnippet)(r.target.uri)).map(r=>r.target.uri)}});var Ce=x(Wt=>{"use strict";d();var BJ=Wt&&Wt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Er=Wt&&Wt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&BJ(t,e,n)};Object.defineProperty(Wt,"__esModule",{value:!0});Er(zy(),Wt);Er(_x(),Wt);Er(Tx(),Wt);Er(Ef(),Wt);Er(Yy(),Wt);Er(Xy(),Wt);Er(e_(),Wt);Er($x(),Wt);Er(ip(),Wt);Er(fp(),Wt)});var Ub=x(dp=>{"use strict";d();Object.defineProperty(dp,"__esModule",{value:!0});dp.AugmentedThemeDocset=void 0;var $u=Ce(),NC=e=>({name:e}),FJ=[["camelcase","camelize"],["handle","handleize"],["t","translate"]],VJ=e=>([t,n])=>{let r=e.find(i=>i.name===n);return r?{...r,name:t}:NC(t)},$J=["_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"],UJ=["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"],PC=(e,t,n)=>({name:e,...t&&{access:t},...n&&{return_type:n}}),HJ=["customer_address","product_variant"],zJ=UJ.map(e=>PC(e,{global:!1,parents:[],template:[]},[{type:"string",name:""}])),WJ=e=>({name:e}),GJ=["elsif","ifchanged","when","schema"],$b=class{themeDocset;constructor(t){this.themeDocset=t}isAugmented=!0;filters=(0,$u.memo)(async()=>{let t=await this.themeDocset.filters();return[...t,...FJ.map(VJ(t)),...$J.map(NC)]});objects=(0,$u.memo)(async()=>[...await this.themeDocset.objects(),...HJ.map(t=>PC(t)),...zJ]);liquidDrops=(0,$u.memo)(async()=>(await this.themeDocset.objects()).filter(t=>t.access?t.deprecated?!1:!t.access.global||t.access.global&&t.access.parents.length>0:!0));tags=(0,$u.memo)(async()=>[...await this.themeDocset.tags(),...GJ.map(WJ)]);systemTranslations=(0,$u.memo)(async()=>this.themeDocset.systemTranslations())};dp.AugmentedThemeDocset=$b});var zb=x(ca=>{"use strict";d();Object.defineProperty(ca,"__esModule",{value:!0});ca.parseDocParamType=JJ;ca.parseStringLiterals=CC;ca.parseParamType=LC;ca.normalizeNamedParamType=KJ;ca.parseParamTypeSyntax=Hb;function JJ(e,t){let n=CC(t);if(n)return n.length===1?n[0]:{kind:"union",types:n};let r=LC(e,t);if(!r)return;let[i,s]=r;return s?{kind:"array",valueType:i}:{kind:"named",name:i}}function CC(e){if(/[\r\n]/.test(e))return;let t=[],n=0;function r(){for(;e[n]===" "||e[n]===" ";)n++}for(;n<e.length;){r();let i=e[n];if(i!=="'"&&i!=='"')return;let s=e.indexOf(i,n+1);if(s===-1)return;if(t.push({kind:"literal",value:e.slice(n+1,s),raw:e.slice(n,s+1)}),n=s+1,r(),n===e.length)return t;if(e[n]!=="|")return;n++}}function LC(e,t){let n=Hb(t);if(!(!n||!e.has(n[0])))return n}function KJ(e){let t=e.toLowerCase();return Hb(t)?t:void 0}function Hb(e){let t=e.match(/^([a-z_]+)(\[\])?$/);if(t)return[t[1],!!t[2]]}});var $i=x(tt=>{"use strict";d();Object.defineProperty(tt,"__esModule",{value:!0});tt.SupportedDocTagTypes=tt.BasicParamTypes=tt.parseStringLiterals=tt.parseParamTypeSyntax=tt.parseParamType=tt.parseDocParamType=tt.normalizeNamedParamType=void 0;tt.getDefaultValueForType=ZJ;tt.inferArgumentType=Wb;tt.isTypeCompatible=MC;tt.checkArgumentType=eK;tt.getArgumentTypeMismatchMessage=nK;tt.filePathSupportsLiquidDoc=rK;tt.getValidParamTypes=iK;var ua=ue(),YJ=Ce(),QJ=He(),XJ=He(),pp=zb(),Uu=zb();Object.defineProperty(tt,"normalizeNamedParamType",{enumerable:!0,get:function(){return Uu.normalizeNamedParamType}});Object.defineProperty(tt,"parseDocParamType",{enumerable:!0,get:function(){return Uu.parseDocParamType}});Object.defineProperty(tt,"parseParamType",{enumerable:!0,get:function(){return Uu.parseParamType}});Object.defineProperty(tt,"parseParamTypeSyntax",{enumerable:!0,get:function(){return Uu.parseParamTypeSyntax}});Object.defineProperty(tt,"parseStringLiterals",{enumerable:!0,get:function(){return Uu.parseStringLiterals}});var Gt;(function(e){e.String="string",e.Number="number",e.Boolean="boolean",e.Object="object"})(Gt||(tt.BasicParamTypes=Gt={}));var qC;(function(e){e.Param="param",e.Example="example",e.Description="description"})(qC||(tt.SupportedDocTagTypes=qC={}));function ZJ(e){let t=e?(0,pp.parseStringLiterals)(e):void 0;if(t)return t[0].raw;switch(e?.toLowerCase()){case Gt.String:return"''";case Gt.Number:return"0";case Gt.Boolean:return"false";case Gt.Object:default:return""}}function Wb(e){switch(e.type){case ua.NodeTypes.String:return Gt.String;case ua.NodeTypes.Number:return Gt.Number;case ua.NodeTypes.LiquidLiteral:return Gt.Boolean;case ua.NodeTypes.Range:case ua.NodeTypes.VariableLookup:return Gt.Object;default:return(0,YJ.assertNever)(e)}}function MC(e,t){let n=e.toLowerCase();return n===Gt.Boolean?!0:n===t}function eK(e,t){if(t.type===ua.NodeTypes.VariableLookup)return{kind:"unchecked"};let n=(0,pp.parseStringLiterals)(e);if(n)return IC(t.type===ua.NodeTypes.String&&n.some(i=>i.value===t.value));if(t.type==="BlockArrayLiteral")return{kind:"unchecked"};let r=(0,pp.normalizeNamedParamType)(e);return r?tK(r)?IC(MC(r,Wb(t))):{kind:"named-type",type:r}:{kind:"unchecked"}}function IC(e){return e?{kind:"compatible"}:{kind:"incompatible"}}function tK(e){return Object.values(Gt).some(t=>t===e)}function nK(e,t,n){if((0,pp.parseStringLiterals)(t)){let i=n.source.slice(n.position.start,n.position.end);return`Invalid value for argument '${e}': expected ${t.trim()}, got ${i}`}let r=n.type==="BlockArrayLiteral"?"array":Wb(n);return`Type mismatch for argument '${e}': expected ${t.toLowerCase()}, got ${r}`}function rK(e){return(0,QJ.isSnippet)(e)||(0,XJ.isBlock)(e)}function iK(e){let t=new Map([[Gt.String,void 0],[Gt.Number,void 0],[Gt.Boolean,void 0],[Gt.Object,"A generic type used to represent any liquid object or primitive value."]]);return e.forEach(n=>t.set(n.name,n.summary||n.description)),t}});var hp=x(Gb=>{"use strict";d();Object.defineProperty(Gb,"__esModule",{value:!0});Gb.schemaSettingLiquidType=sK;function sK(e){switch(e){case"checkbox":return"boolean";case"number":case"range":return"number";case"color_background":case"color_palette":case"html":case"inline_richtext":case"liquid":case"radio":case"richtext":case"select":case"text":case"text_alignment":case"textarea":case"url":case"video_url":return"string";case"article":case"blog":case"collection":case"color":case"color_scheme":case"page":case"product":case"video":return e;case"font_picker":return"font";case"image_picker":return"image";case"link_list":return"linklist";case"collection_list":return"collection[]";case"product_list":return"product[]";default:return}}});var ai=x(Ar=>{"use strict";d();Object.defineProperty(Ar,"__esModule",{value:!0});Ar.BLOCK_CONTENT_PARAMETER=void 0;Ar.makeGetBlockParameters=cK;Ar.resolveBlockParameters=Jb;Ar.liquidDocType=DC;var RC=$i(),aK=hp(),oK=He();Ar.BLOCK_CONTENT_PARAMETER="content";function cK({getBlockSchema:e,getDocDefinition:t}){if(!e||!t)return async()=>{};let n=new Map,r=async i=>{let[s,a]=await Promise.all([e(i),t(`blocks/${i}.liquid`)]);if(!(!s||!a))return s.validSchema instanceof Error?(0,oK.hasNoSchemaTag)(s)?Jb(void 0,a):void 0:Jb(s.validSchema,a)};return i=>(n.has(i)||n.set(i,r(i)),n.get(i))}function Jb(e,t){let n=new Map([[Ar.BLOCK_CONTENT_PARAMETER,{name:Ar.BLOCK_CONTENT_PARAMETER,type:"string",required:!1}]]);for(let r of e?.settings??[])lK(r)&&n.set(r.id,{name:r.id,type:r.id===Ar.BLOCK_CONTENT_PARAMETER?"string":(0,aK.schemaSettingLiquidType)(r.type),required:!1,schemaSetting:r});for(let r of t?.liquidDoc?.parameters??[])n.set(r.name,uK(n.get(r.name),r));return n}function DC(e){return e?(0,RC.normalizeNamedParamType)(e):void 0}function uK(e,t){return e?{...e,required:t.required,liquidDoc:t}:{name:t.name,type:t.type&&(0,RC.parseStringLiterals)(t.type)?t.type.trim():DC(t.type),required:t.required,liquidDoc:t}}function lK(e){return typeof e.id=="string"&&e.type!=="header"&&e.type!=="paragraph"}});function la(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!la(e[n],t[n]))return!1}else{let i=[];for(r in e)i.push(r);i.sort();let s=[];for(r in t)s.push(r);if(s.sort(),!la(i,s))return!1;for(n=0;n<i.length;n++)if(!la(e[i[n]],t[i[n]]))return!1}return!0}function Lt(e){return typeof e=="number"}function kn(e){return typeof e<"u"}function $n(e){return typeof e=="boolean"}function mp(e){return typeof e=="string"}function Or(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Hu=Oe(()=>{d()});function fK(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function Ui(e,t){let n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:n===0?e===t:!1}function fa(e){let t="";fK(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch{try{return new RegExp(e,t)}catch{return}}}function Kb(e){let t=0;for(let n=0;n<e.length;n++){t++;let r=e.charCodeAt(n);55296<=r&&r<=56319&&n++}return t}var zu=Oe(()=>{d()});var gp,Yb,BC,yp,Ve,fe,oi,FC,Wu,_p,vp,Hi,bp,Qb,qt,VC,$C,Sn,zi,Jt,Xb,Bo,UC,Gu,Zb,ek,tk,Ju,HC,kp,nk,zC,Nr,da,It,nt,Sp,WC,GC,JC,Fo,Tp,Vo,wp,KC,YC,xp,Ep,Tn,QC,Ap,XC,Op,Np,Pp,Cp,Lp,ZC,eL,qp,pa,tL,nL,rL,iL,sL,aL,oL,rk,ik,cL,uL,lL,fL,dL,pL,hL,mL,gL,sk,D,ak=Oe(()=>{"use strict";d();(function(e){function t(n){return typeof n=="string"}e.is=t})(gp||(gp={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(Yb||(Yb={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(BC||(BC={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(yp||(yp={}));(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=yp.MAX_VALUE),i===Number.MAX_VALUE&&(i=yp.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return D.objectLiteral(i)&&D.uinteger(i.line)&&D.uinteger(i.character)}e.is=n})(Ve||(Ve={}));(function(e){function t(r,i,s,a){if(D.uinteger(r)&&D.uinteger(i)&&D.uinteger(s)&&D.uinteger(a))return{start:Ve.create(r,i),end:Ve.create(s,a)};if(Ve.is(r)&&Ve.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}e.create=t;function n(r){let i=r;return D.objectLiteral(i)&&Ve.is(i.start)&&Ve.is(i.end)}e.is=n})(fe||(fe={}));(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return D.objectLiteral(i)&&fe.is(i.range)&&(D.string(i.uri)||D.undefined(i.uri))}e.is=n})(oi||(oi={}));(function(e){function t(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}e.create=t;function n(r){let i=r;return D.objectLiteral(i)&&fe.is(i.targetRange)&&D.string(i.targetUri)&&fe.is(i.targetSelectionRange)&&(fe.is(i.originSelectionRange)||D.undefined(i.originSelectionRange))}e.is=n})(FC||(FC={}));(function(e){function t(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}e.create=t;function n(r){let i=r;return D.objectLiteral(i)&&D.numberRange(i.red,0,1)&&D.numberRange(i.green,0,1)&&D.numberRange(i.blue,0,1)&&D.numberRange(i.alpha,0,1)}e.is=n})(Wu||(Wu={}));(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){let i=r;return D.objectLiteral(i)&&fe.is(i.range)&&Wu.is(i.color)}e.is=n})(_p||(_p={}));(function(e){function t(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}e.create=t;function n(r){let i=r;return D.objectLiteral(i)&&D.string(i.label)&&(D.undefined(i.textEdit)||Jt.is(i))&&(D.undefined(i.additionalTextEdits)||D.typedArray(i.additionalTextEdits,Jt.is))}e.is=n})(vp||(vp={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Hi||(Hi={}));(function(e){function t(r,i,s,a,o,c){let l={startLine:r,endLine:i};return D.defined(s)&&(l.startCharacter=s),D.defined(a)&&(l.endCharacter=a),D.defined(o)&&(l.kind=o),D.defined(c)&&(l.collapsedText=c),l}e.create=t;function n(r){let i=r;return D.objectLiteral(i)&&D.uinteger(i.startLine)&&D.uinteger(i.startLine)&&(D.undefined(i.startCharacter)||D.uinteger(i.startCharacter))&&(D.undefined(i.endCharacter)||D.uinteger(i.endCharacter))&&(D.undefined(i.kind)||D.string(i.kind))}e.is=n})(bp||(bp={}));(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return D.defined(i)&&oi.is(i.location)&&D.string(i.message)}e.is=n})(Qb||(Qb={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(qt||(qt={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(VC||(VC={}));(function(e){function t(n){let r=n;return D.objectLiteral(r)&&D.string(r.href)}e.is=t})($C||($C={}));(function(e){function t(r,i,s,a,o,c){let l={range:r,message:i};return D.defined(s)&&(l.severity=s),D.defined(a)&&(l.code=a),D.defined(o)&&(l.source=o),D.defined(c)&&(l.relatedInformation=c),l}e.create=t;function n(r){var i;let s=r;return D.defined(s)&&fe.is(s.range)&&D.string(s.message)&&(D.number(s.severity)||D.undefined(s.severity))&&(D.integer(s.code)||D.string(s.code)||D.undefined(s.code))&&(D.undefined(s.codeDescription)||D.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(D.string(s.source)||D.undefined(s.source))&&(D.undefined(s.relatedInformation)||D.typedArray(s.relatedInformation,Qb.is))}e.is=n})(Sn||(Sn={}));(function(e){function t(r,i,...s){let a={title:r,command:i};return D.defined(s)&&s.length>0&&(a.arguments=s),a}e.create=t;function n(r){let i=r;return D.defined(i)&&D.string(i.title)&&D.string(i.command)}e.is=n})(zi||(zi={}));(function(e){function t(s,a){return{range:s,newText:a}}e.replace=t;function n(s,a){return{range:{start:s,end:s},newText:a}}e.insert=n;function r(s){return{range:s,newText:""}}e.del=r;function i(s){let a=s;return D.objectLiteral(a)&&D.string(a.newText)&&fe.is(a.range)}e.is=i})(Jt||(Jt={}));(function(e){function t(r,i,s){let a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function n(r){let i=r;return D.objectLiteral(i)&&D.string(i.label)&&(D.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(D.string(i.description)||i.description===void 0)}e.is=n})(Xb||(Xb={}));(function(e){function t(n){let r=n;return D.string(r)}e.is=t})(Bo||(Bo={}));(function(e){function t(s,a,o){return{range:s,newText:a,annotationId:o}}e.replace=t;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}e.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}e.del=r;function i(s){let a=s;return Jt.is(a)&&(Xb.is(a.annotationId)||Bo.is(a.annotationId))}e.is=i})(UC||(UC={}));(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return D.defined(i)&&nk.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(Gu||(Gu={}));(function(e){function t(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&D.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||D.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||D.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Bo.is(i.annotationId))}e.is=n})(Zb||(Zb={}));(function(e){function t(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&D.string(i.oldUri)&&D.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||D.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||D.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Bo.is(i.annotationId))}e.is=n})(ek||(ek={}));(function(e){function t(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&D.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||D.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||D.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Bo.is(i.annotationId))}e.is=n})(tk||(tk={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>D.string(i.kind)?Zb.is(i)||ek.is(i)||tk.is(i):Gu.is(i)))}e.is=t})(Ju||(Ju={}));(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return D.defined(i)&&D.string(i.uri)}e.is=n})(HC||(HC={}));(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return D.defined(i)&&D.string(i.uri)&&D.integer(i.version)}e.is=n})(kp||(kp={}));(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return D.defined(i)&&D.string(i.uri)&&(i.version===null||D.integer(i.version))}e.is=n})(nk||(nk={}));(function(e){function t(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}e.create=t;function n(r){let i=r;return D.defined(i)&&D.string(i.uri)&&D.string(i.languageId)&&D.integer(i.version)&&D.string(i.text)}e.is=n})(zC||(zC={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(Nr||(Nr={}));(function(e){function t(n){let r=n;return D.objectLiteral(n)&&Nr.is(r.kind)&&D.string(r.value)}e.is=t})(da||(da={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(It||(It={}));(function(e){e.PlainText=1,e.Snippet=2})(nt||(nt={}));(function(e){e.Deprecated=1})(Sp||(Sp={}));(function(e){function t(r,i,s){return{newText:r,insert:i,replace:s}}e.create=t;function n(r){let i=r;return i&&D.string(i.newText)&&fe.is(i.insert)&&fe.is(i.replace)}e.is=n})(WC||(WC={}));(function(e){e.asIs=1,e.adjustIndentation=2})(GC||(GC={}));(function(e){function t(n){let r=n;return r&&(D.string(r.detail)||r.detail===void 0)&&(D.string(r.description)||r.description===void 0)}e.is=t})(JC||(JC={}));(function(e){function t(n){return{label:n}}e.create=t})(Fo||(Fo={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(Tp||(Tp={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let i=r;return D.string(i)||D.objectLiteral(i)&&D.string(i.language)&&D.string(i.value)}e.is=n})(Vo||(Vo={}));(function(e){function t(n){let r=n;return!!r&&D.objectLiteral(r)&&(da.is(r.contents)||Vo.is(r.contents)||D.typedArray(r.contents,Vo.is))&&(n.range===void 0||fe.is(n.range))}e.is=t})(wp||(wp={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(KC||(KC={}));(function(e){function t(n,r,...i){let s={label:n};return D.defined(r)&&(s.documentation=r),D.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(YC||(YC={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(xp||(xp={}));(function(e){function t(n,r){let i={range:n};return D.number(r)&&(i.kind=r),i}e.create=t})(Ep||(Ep={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Tn||(Tn={}));(function(e){e.Deprecated=1})(QC||(QC={}));(function(e){function t(n,r,i,s,a){let o={name:n,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}e.create=t})(Ap||(Ap={}));(function(e){function t(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(XC||(XC={}));(function(e){function t(r,i,s,a,o,c){let l={name:r,detail:i,kind:s,range:a,selectionRange:o};return c!==void 0&&(l.children=c),l}e.create=t;function n(r){let i=r;return i&&D.string(i.name)&&D.number(i.kind)&&fe.is(i.range)&&fe.is(i.selectionRange)&&(i.detail===void 0||D.string(i.detail))&&(i.deprecated===void 0||D.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(Op||(Op={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Np||(Np={}));(function(e){e.Invoked=1,e.Automatic=2})(Pp||(Pp={}));(function(e){function t(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}e.create=t;function n(r){let i=r;return D.defined(i)&&D.typedArray(i.diagnostics,Sn.is)&&(i.only===void 0||D.typedArray(i.only,D.string))&&(i.triggerKind===void 0||i.triggerKind===Pp.Invoked||i.triggerKind===Pp.Automatic)}e.is=n})(Cp||(Cp={}));(function(e){function t(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):zi.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}e.create=t;function n(r){let i=r;return i&&D.string(i.title)&&(i.diagnostics===void 0||D.typedArray(i.diagnostics,Sn.is))&&(i.kind===void 0||D.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||zi.is(i.command))&&(i.isPreferred===void 0||D.boolean(i.isPreferred))&&(i.edit===void 0||Ju.is(i.edit))}e.is=n})(Lp||(Lp={}));(function(e){function t(r,i){let s={range:r};return D.defined(i)&&(s.data=i),s}e.create=t;function n(r){let i=r;return D.defined(i)&&fe.is(i.range)&&(D.undefined(i.command)||zi.is(i.command))}e.is=n})(ZC||(ZC={}));(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return D.defined(i)&&D.uinteger(i.tabSize)&&D.boolean(i.insertSpaces)}e.is=n})(eL||(eL={}));(function(e){function t(r,i,s){return{range:r,target:i,data:s}}e.create=t;function n(r){let i=r;return D.defined(i)&&fe.is(i.range)&&(D.undefined(i.target)||D.string(i.target))}e.is=n})(qp||(qp={}));(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return D.objectLiteral(i)&&fe.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(pa||(pa={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(tL||(tL={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(nL||(nL={}));(function(e){function t(n){let r=n;return D.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(rL||(rL={}));(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){let i=r;return i!=null&&fe.is(i.range)&&D.string(i.text)}e.is=n})(iL||(iL={}));(function(e){function t(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}e.create=t;function n(r){let i=r;return i!=null&&fe.is(i.range)&&D.boolean(i.caseSensitiveLookup)&&(D.string(i.variableName)||i.variableName===void 0)}e.is=n})(sL||(sL={}));(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){let i=r;return i!=null&&fe.is(i.range)&&(D.string(i.expression)||i.expression===void 0)}e.is=n})(aL||(aL={}));(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){let i=r;return D.defined(i)&&fe.is(r.stoppedLocation)}e.is=n})(oL||(oL={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(rk||(rk={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let i=r;return D.objectLiteral(i)&&(i.tooltip===void 0||D.string(i.tooltip)||da.is(i.tooltip))&&(i.location===void 0||oi.is(i.location))&&(i.command===void 0||zi.is(i.command))}e.is=n})(ik||(ik={}));(function(e){function t(r,i,s){let a={position:r,label:i};return s!==void 0&&(a.kind=s),a}e.create=t;function n(r){let i=r;return D.objectLiteral(i)&&Ve.is(i.position)&&(D.string(i.label)||D.typedArray(i.label,ik.is))&&(i.kind===void 0||rk.is(i.kind))&&i.textEdits===void 0||D.typedArray(i.textEdits,Jt.is)&&(i.tooltip===void 0||D.string(i.tooltip)||da.is(i.tooltip))&&(i.paddingLeft===void 0||D.boolean(i.paddingLeft))&&(i.paddingRight===void 0||D.boolean(i.paddingRight))}e.is=n})(cL||(cL={}));(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(uL||(uL={}));(function(e){function t(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}e.create=t})(lL||(lL={}));(function(e){function t(n){return{items:n}}e.create=t})(fL||(fL={}));(function(e){e.Invoked=0,e.Automatic=1})(dL||(dL={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(pL||(pL={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(hL||(hL={}));(function(e){function t(n){let r=n;return D.objectLiteral(r)&&Yb.is(r.uri)&&D.string(r.name)}e.is=t})(mL||(mL={}));(function(e){function t(s,a,o,c){return new sk(s,a,o,c)}e.create=t;function n(s){let a=s;return!!(D.defined(a)&&D.string(a.uri)&&(D.undefined(a.languageId)||D.string(a.languageId))&&D.uinteger(a.lineCount)&&D.func(a.getText)&&D.func(a.positionAt)&&D.func(a.offsetAt))}e.is=n;function r(s,a){let o=s.getText(),c=i(a,(f,m)=>{let p=f.range.start.line-m.range.start.line;return p===0?f.range.start.character-m.range.start.character:p}),l=o.length;for(let f=c.length-1;f>=0;f--){let m=c[f],p=s.offsetAt(m.range.start),g=s.offsetAt(m.range.end);if(g<=l)o=o.substring(0,p)+m.newText+o.substring(g,o.length);else throw new Error("Overlapping edit");l=p}return o}e.applyEdits=r;function i(s,a){if(s.length<=1)return s;let o=s.length/2|0,c=s.slice(0,o),l=s.slice(o);i(c,a),i(l,a);let f=0,m=0,p=0;for(;f<c.length&&m<l.length;)a(c[f],l[m])<=0?s[p++]=c[f++]:s[p++]=l[m++];for(;f<c.length;)s[p++]=c[f++];for(;m<l.length;)s[p++]=l[m++];return s}})(gL||(gL={}));sk=class{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){this._content=t.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(t.push(i),r=!1);let s=n.charAt(i);r=s==="\r"||s===`
|
|
67
|
+
`,s==="\r"&&i+1<n.length&&n.charAt(i+1)===`
|
|
68
|
+
`&&i++}r&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Ve.create(0,t);for(;r<i;){let a=Math.floor((r+i)/2);n[a]>t?i=a:r=a+1}let s=r-1;return Ve.create(s,t-n[s])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}};(function(e){let t=Object.prototype.toString;function n(g){return typeof g<"u"}e.defined=n;function r(g){return typeof g>"u"}e.undefined=r;function i(g){return g===!0||g===!1}e.boolean=i;function s(g){return t.call(g)==="[object String]"}e.string=s;function a(g){return t.call(g)==="[object Number]"}e.number=a;function o(g,v,b){return t.call(g)==="[object Number]"&&v<=g&&g<=b}e.numberRange=o;function c(g){return t.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}e.integer=c;function l(g){return t.call(g)==="[object Number]"&&0<=g&&g<=2147483647}e.uinteger=l;function f(g){return t.call(g)==="[object Function]"}e.func=f;function m(g){return g!==null&&typeof g=="object"}e.objectLiteral=m;function p(g,v){return Array.isArray(g)&&g.every(v)}e.typedArray=p})(D||(D={}))});var pK={};$y(pK,{TextDocument:()=>an});function ok(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);ok(r,t),ok(i,t);let s=0,a=0,o=0;for(;s<r.length&&a<i.length;)t(r[s],i[a])<=0?e[o++]=r[s++]:e[o++]=i[a++];for(;s<r.length;)e[o++]=r[s++];for(;a<i.length;)e[o++]=i[a++];return e}function yL(e,t,n=0){let r=t?[n]:[];for(let i=0;i<e.length;i++){let s=e.charCodeAt(i);_L(s)&&(s===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function _L(e){return e===13||e===10}function vL(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function dK(e){let t=vL(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Ip,an,bL=Oe(()=>{"use strict";d();Ip=class e{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let i=vL(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);let o=Math.max(i.start.line,0),c=Math.max(i.end.line,0),l=this._lineOffsets,f=yL(r.text,!1,s);if(c-o===f.length)for(let p=0,g=f.length;p<g;p++)l[p+o+1]=f[p];else f.length<1e4?l.splice(o+1,c-o,...f):this._lineOffsets=l=l.slice(0,o+1).concat(f,l.slice(c+1));let m=r.text.length-(a-s);if(m!==0)for(let p=o+1+f.length,g=l.length;p<g;p++)l[p]=l[p]+m}else if(e.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=yL(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:t};for(;r<i;){let a=Math.floor((r+i)/2);n[a]>t?i=a:r=a+1}let s=r-1;return t=this.ensureBeforeEOL(t,n[s]),{line:s,character:t-n[s]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let i=t.line+1<n.length?n[t.line+1]:this._content.length,s=Math.min(r+t.character,i);return this.ensureBeforeEOL(s,r)}ensureBeforeEOL(t,n){for(;t>n&&_L(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(i,s,a,o){return new Ip(i,s,a,o)}e.create=t;function n(i,s,a){if(i instanceof Ip)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(i,s){let a=i.getText(),o=ok(s.map(dK),(f,m)=>{let p=f.range.start.line-m.range.start.line;return p===0?f.range.start.character-m.range.start.character:p}),c=0,l=[];for(let f of o){let m=i.offsetAt(f.range.start);if(m<c)throw new Error("Overlapping edit");m>c&&l.push(a.substring(c,m)),f.newText.length&&l.push(f.newText),c=i.offsetAt(f.range.end)}return l.push(a.substr(c)),l.join("")}e.applyEdits=r})(an||(an={}))});function hK(e){return e>=ge.SchemaResolveError}var ge,Xt,ck,wn=Oe(()=>{d();ak();bL();(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature",e[e.SchemaResolveError=65536]="SchemaResolveError"})(ge||(ge={}));(function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"})(Xt||(Xt={}));(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Nr.Markdown,Nr.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}})(ck||(ck={}))});var kL,$o,Obe,uk=Oe(()=>{d();(()=>{"use strict";var e={975:C=>{function L(I){if(typeof I!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(I))}function V(I,B){for(var U,J="",Q=0,Y=-1,he=0,z=0;z<=I.length;++z){if(z<I.length)U=I.charCodeAt(z);else{if(U===47)break;U=47}if(U===47){if(!(Y===z-1||he===1))if(Y!==z-1&&he===2){if(J.length<2||Q!==2||J.charCodeAt(J.length-1)!==46||J.charCodeAt(J.length-2)!==46){if(J.length>2){var de=J.lastIndexOf("/");if(de!==J.length-1){de===-1?(J="",Q=0):Q=(J=J.slice(0,de)).length-1-J.lastIndexOf("/"),Y=z,he=0;continue}}else if(J.length===2||J.length===1){J="",Q=0,Y=z,he=0;continue}}B&&(J.length>0?J+="/..":J="..",Q=2)}else J.length>0?J+="/"+I.slice(Y+1,z):J=I.slice(Y+1,z),Q=z-Y-1;Y=z,he=0}else U===46&&he!==-1?++he:he=-1}return J}var $={resolve:function(){for(var I,B="",U=!1,J=arguments.length-1;J>=-1&&!U;J--){var Q;J>=0?Q=arguments[J]:(I===void 0&&(I=process.cwd()),Q=I),L(Q),Q.length!==0&&(B=Q+"/"+B,U=Q.charCodeAt(0)===47)}return B=V(B,!U),U?B.length>0?"/"+B:"/":B.length>0?B:"."},normalize:function(I){if(L(I),I.length===0)return".";var B=I.charCodeAt(0)===47,U=I.charCodeAt(I.length-1)===47;return(I=V(I,!B)).length!==0||B||(I="."),I.length>0&&U&&(I+="/"),B?"/"+I:I},isAbsolute:function(I){return L(I),I.length>0&&I.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var I,B=0;B<arguments.length;++B){var U=arguments[B];L(U),U.length>0&&(I===void 0?I=U:I+="/"+U)}return I===void 0?".":$.normalize(I)},relative:function(I,B){if(L(I),L(B),I===B||(I=$.resolve(I))===(B=$.resolve(B)))return"";for(var U=1;U<I.length&&I.charCodeAt(U)===47;++U);for(var J=I.length,Q=J-U,Y=1;Y<B.length&&B.charCodeAt(Y)===47;++Y);for(var he=B.length-Y,z=Q<he?Q:he,de=-1,pe=0;pe<=z;++pe){if(pe===z){if(he>z){if(B.charCodeAt(Y+pe)===47)return B.slice(Y+pe+1);if(pe===0)return B.slice(Y+pe)}else Q>z&&(I.charCodeAt(U+pe)===47?de=pe:pe===0&&(de=0));break}var dn=I.charCodeAt(U+pe);if(dn!==B.charCodeAt(Y+pe))break;dn===47&&(de=pe)}var Ur="";for(pe=U+de+1;pe<=J;++pe)pe!==J&&I.charCodeAt(pe)!==47||(Ur.length===0?Ur+="..":Ur+="/..");return Ur.length>0?Ur+B.slice(Y+de):(Y+=de,B.charCodeAt(Y)===47&&++Y,B.slice(Y))},_makeLong:function(I){return I},dirname:function(I){if(L(I),I.length===0)return".";for(var B=I.charCodeAt(0),U=B===47,J=-1,Q=!0,Y=I.length-1;Y>=1;--Y)if((B=I.charCodeAt(Y))===47){if(!Q){J=Y;break}}else Q=!1;return J===-1?U?"/":".":U&&J===1?"//":I.slice(0,J)},basename:function(I,B){if(B!==void 0&&typeof B!="string")throw new TypeError('"ext" argument must be a string');L(I);var U,J=0,Q=-1,Y=!0;if(B!==void 0&&B.length>0&&B.length<=I.length){if(B.length===I.length&&B===I)return"";var he=B.length-1,z=-1;for(U=I.length-1;U>=0;--U){var de=I.charCodeAt(U);if(de===47){if(!Y){J=U+1;break}}else z===-1&&(Y=!1,z=U+1),he>=0&&(de===B.charCodeAt(he)?--he==-1&&(Q=U):(he=-1,Q=z))}return J===Q?Q=z:Q===-1&&(Q=I.length),I.slice(J,Q)}for(U=I.length-1;U>=0;--U)if(I.charCodeAt(U)===47){if(!Y){J=U+1;break}}else Q===-1&&(Y=!1,Q=U+1);return Q===-1?"":I.slice(J,Q)},extname:function(I){L(I);for(var B=-1,U=0,J=-1,Q=!0,Y=0,he=I.length-1;he>=0;--he){var z=I.charCodeAt(he);if(z!==47)J===-1&&(Q=!1,J=he+1),z===46?B===-1?B=he:Y!==1&&(Y=1):B!==-1&&(Y=-1);else if(!Q){U=he+1;break}}return B===-1||J===-1||Y===0||Y===1&&B===J-1&&B===U+1?"":I.slice(B,J)},format:function(I){if(I===null||typeof I!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof I);return(function(B,U){var J=U.dir||U.root,Q=U.base||(U.name||"")+(U.ext||"");return J?J===U.root?J+Q:J+"/"+Q:Q})(0,I)},parse:function(I){L(I);var B={root:"",dir:"",base:"",ext:"",name:""};if(I.length===0)return B;var U,J=I.charCodeAt(0),Q=J===47;Q?(B.root="/",U=1):U=0;for(var Y=-1,he=0,z=-1,de=!0,pe=I.length-1,dn=0;pe>=U;--pe)if((J=I.charCodeAt(pe))!==47)z===-1&&(de=!1,z=pe+1),J===46?Y===-1?Y=pe:dn!==1&&(dn=1):Y!==-1&&(dn=-1);else if(!de){he=pe+1;break}return Y===-1||z===-1||dn===0||dn===1&&Y===z-1&&Y===he+1?z!==-1&&(B.base=B.name=he===0&&Q?I.slice(1,z):I.slice(he,z)):(he===0&&Q?(B.name=I.slice(1,Y),B.base=I.slice(1,z)):(B.name=I.slice(he,Y),B.base=I.slice(he,z)),B.ext=I.slice(Y,z)),he>0?B.dir=I.slice(0,he-1):Q&&(B.dir="/"),B},sep:"/",delimiter:":",win32:null,posix:null};$.posix=$,C.exports=$}},t={};function n(C){var L=t[C];if(L!==void 0)return L.exports;var V=t[C]={exports:{}};return e[C](V,V.exports,n),V.exports}n.d=(C,L)=>{for(var V in L)n.o(L,V)&&!n.o(C,V)&&Object.defineProperty(C,V,{enumerable:!0,get:L[V]})},n.o=(C,L)=>Object.prototype.hasOwnProperty.call(C,L),n.r=C=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(C,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:()=>p,Utils:()=>M}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function c(C,L){if(!C.scheme&&L)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${C.authority}", path: "${C.path}", query: "${C.query}", fragment: "${C.fragment}"}`);if(C.scheme&&!s.test(C.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(C.path){if(C.authority){if(!a.test(C.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(o.test(C.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let l="",f="/",m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(L){return L instanceof p||!!L&&typeof L.authority=="string"&&typeof L.fragment=="string"&&typeof L.path=="string"&&typeof L.query=="string"&&typeof L.scheme=="string"&&typeof L.fsPath=="string"&&typeof L.with=="function"&&typeof L.toString=="function"}scheme;authority;path;query;fragment;constructor(L,V,$,I,B,U=!1){typeof L=="object"?(this.scheme=L.scheme||l,this.authority=L.authority||l,this.path=L.path||l,this.query=L.query||l,this.fragment=L.fragment||l):(this.scheme=(function(J,Q){return J||Q?J:"file"})(L,U),this.authority=V||l,this.path=(function(J,Q){switch(J){case"https":case"http":case"file":Q?Q[0]!==f&&(Q=f+Q):Q=f}return Q})(this.scheme,$||l),this.query=I||l,this.fragment=B||l,c(this,U))}get fsPath(){return w(this,!1)}with(L){if(!L)return this;let{scheme:V,authority:$,path:I,query:B,fragment:U}=L;return V===void 0?V=this.scheme:V===null&&(V=l),$===void 0?$=this.authority:$===null&&($=l),I===void 0?I=this.path:I===null&&(I=l),B===void 0?B=this.query:B===null&&(B=l),U===void 0?U=this.fragment:U===null&&(U=l),V===this.scheme&&$===this.authority&&I===this.path&&B===this.query&&U===this.fragment?this:new v(V,$,I,B,U)}static parse(L,V=!1){let $=m.exec(L);return $?new v($[2]||l,N($[4]||l),N($[5]||l),N($[7]||l),N($[9]||l),V):new v(l,l,l,l,l)}static file(L){let V=l;if(i&&(L=L.replace(/\\/g,f)),L[0]===f&&L[1]===f){let $=L.indexOf(f,2);$===-1?(V=L.substring(2),L=f):(V=L.substring(2,$),L=L.substring($)||f)}return new v("file",V,L,l,l)}static from(L){let V=new v(L.scheme,L.authority,L.path,L.query,L.fragment);return c(V,!0),V}toString(L=!1){return T(this,L)}toJSON(){return this}static revive(L){if(L){if(L instanceof p)return L;{let V=new v(L);return V._formatted=L.external,V._fsPath=L._sep===g?L.fsPath:null,V}}return L}}let g=i?1:void 0;class v extends p{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath}toString(L=!1){return L?T(this,!0):(this._formatted||(this._formatted=T(this,!1)),this._formatted)}toJSON(){let L={$mid:1};return this._fsPath&&(L.fsPath=this._fsPath,L._sep=g),this._formatted&&(L.external=this._formatted),this.path&&(L.path=this.path),this.scheme&&(L.scheme=this.scheme),this.authority&&(L.authority=this.authority),this.query&&(L.query=this.query),this.fragment&&(L.fragment=this.fragment),L}}let b={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 _(C,L,V){let $,I=-1;for(let B=0;B<C.length;B++){let U=C.charCodeAt(B);if(U>=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===45||U===46||U===95||U===126||L&&U===47||V&&U===91||V&&U===93||V&&U===58)I!==-1&&($+=encodeURIComponent(C.substring(I,B)),I=-1),$!==void 0&&($+=C.charAt(B));else{$===void 0&&($=C.substr(0,B));let J=b[U];J!==void 0?(I!==-1&&($+=encodeURIComponent(C.substring(I,B)),I=-1),$+=J):I===-1&&(I=B)}}return I!==-1&&($+=encodeURIComponent(C.substring(I))),$!==void 0?$:C}function k(C){let L;for(let V=0;V<C.length;V++){let $=C.charCodeAt(V);$===35||$===63?(L===void 0&&(L=C.substr(0,V)),L+=b[$]):L!==void 0&&(L+=C[V])}return L!==void 0?L:C}function w(C,L){let V;return V=C.authority&&C.path.length>1&&C.scheme==="file"?`//${C.authority}${C.path}`:C.path.charCodeAt(0)===47&&(C.path.charCodeAt(1)>=65&&C.path.charCodeAt(1)<=90||C.path.charCodeAt(1)>=97&&C.path.charCodeAt(1)<=122)&&C.path.charCodeAt(2)===58?L?C.path.substr(1):C.path[1].toLowerCase()+C.path.substr(2):C.path,i&&(V=V.replace(/\//g,"\\")),V}function T(C,L){let V=L?k:_,$="",{scheme:I,authority:B,path:U,query:J,fragment:Q}=C;if(I&&($+=I,$+=":"),(B||I==="file")&&($+=f,$+=f),B){let Y=B.indexOf("@");if(Y!==-1){let he=B.substr(0,Y);B=B.substr(Y+1),Y=he.lastIndexOf(":"),Y===-1?$+=V(he,!1,!1):($+=V(he.substr(0,Y),!1,!1),$+=":",$+=V(he.substr(Y+1),!1,!0)),$+="@"}B=B.toLowerCase(),Y=B.lastIndexOf(":"),Y===-1?$+=V(B,!1,!0):($+=V(B.substr(0,Y),!1,!0),$+=B.substr(Y))}if(U){if(U.length>=3&&U.charCodeAt(0)===47&&U.charCodeAt(2)===58){let Y=U.charCodeAt(1);Y>=65&&Y<=90&&(U=`/${String.fromCharCode(Y+32)}:${U.substr(3)}`)}else if(U.length>=2&&U.charCodeAt(1)===58){let Y=U.charCodeAt(0);Y>=65&&Y<=90&&(U=`${String.fromCharCode(Y+32)}:${U.substr(2)}`)}$+=V(U,!0,!1)}return J&&($+="?",$+=V(J,!1,!1)),Q&&($+="#",$+=L?Q:_(Q,!1,!1)),$}function y(C){try{return decodeURIComponent(C)}catch{return C.length>3?C.substr(0,3)+y(C.substr(3)):C}}let A=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function N(C){return C.match(A)?C.replace(A,(L=>y(L))):C}var O=n(975);let q=O.posix||O,j="/";var M;(function(C){C.joinPath=function(L,...V){return L.with({path:q.join(L.path,...V)})},C.resolvePath=function(L,...V){let $=L.path,I=!1;$[0]!==j&&($=j+$,I=!0);let B=q.resolve($,...V);return I&&B[0]===j&&!L.authority&&(B=B.substring(1)),L.with({path:B})},C.dirname=function(L){if(L.path.length===0||L.path===j)return L;let V=q.dirname(L.path);return V.length===1&&V.charCodeAt(0)===46&&(V=""),L.with({path:V})},C.basename=function(L){return q.basename(L.path)},C.extname=function(L){return q.extname(L.path)}})(M||(M={})),kL=r})();({URI:$o,Utils:Obe}=kL)});var ha=x((Cbe,xL)=>{"use strict";d();var lk=Object.defineProperty,mK=Object.getOwnPropertyDescriptor,gK=Object.getOwnPropertyNames,yK=Object.prototype.hasOwnProperty,_K=(e,t)=>{for(var n in t)lk(e,n,{get:t[n],enumerable:!0})},vK=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of gK(t))!yK.call(e,i)&&i!==n&&lk(e,i,{get:()=>t[i],enumerable:!(r=mK(t,i))||r.enumerable});return e},bK=e=>vK(lk({},"__esModule",{value:!0}),e),TL={};_K(TL,{config:()=>xK,t:()=>wL});xL.exports=bK(TL);var kK=ce("fs"),SK=ce("fs/promises");async function TK(e){if(e.protocol==="file:")return await(0,SK.readFile)(e,"utf8");if(e.protocol==="http:"||e.protocol==="https:"){let t=await fetch(e.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!t.ok){let r=`Unexpected ${t.status} response while trying to read ${e}`;try{r+=`: ${await t.text()}`}catch{}throw new Error(r)}return await t.text()}throw new Error("Unsupported protocol")}function wK(e){return(0,kK.readFileSync)(e,"utf8")}var Ku;function xK(e){if("contents"in e){typeof e.contents=="string"?Ku=JSON.parse(e.contents):Ku=e.contents;return}if("fsPath"in e){let t=wK(e.fsPath),n=JSON.parse(t);Ku=SL(n)?n.contents.bundle:n;return}if(e.uri){let t=e.uri;return typeof e.uri=="string"&&(t=new URL(e.uri)),new Promise((n,r)=>{TK(t).then(i=>{try{let s=JSON.parse(i);Ku=SL(s)?s.contents.bundle:s,n()}catch(s){r(s)}}).catch(i=>{r(i)})})}}function wL(...e){let t=e[0],n,r,i;if(typeof t=="string")n=t,r=t,e.splice(0,1),i=!e||typeof e[0]!="object"?e:e[0];else if(t instanceof Array){let a=e.slice(1);if(t.length!==a.length+1)throw new Error("expected a string as the first argument to l10n.t");let o=t[0];for(let c=1;c<t.length;c++)o+=`{${c-1}}`+t[c];return wL(o,...a)}else r=t.message,n=r,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=t.args??{};let s=Ku?.[n];return s?typeof s=="string"?Mp(s,i):s.comment?Mp(s.message,i):Mp(r,i):Mp(r,i)}var EK=/{([^}]+)}/g;function Mp(e,t){return Object.keys(t).length===0?e:e.replace(EK,(n,r)=>t[r]??n)}function SL(e){return typeof e?.contents?.bundle=="object"&&typeof e?.version=="string"}});function Mt(e){return $n(e)?e?{}:{not:{}}:e}function ui(e){e.startsWith(AL)&&(e=OK+e.substring(AL.length));try{return $o.parse(e).toString(!0)}catch{return e}}function yk(e){return NK[ui(e)]??void 0}function NL(e,t=[],n=[]){return new jp(e,t,n)}function Pr(e){return p_(e)}function Qu(e){return d_(e)}function _k(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function OL(e,t=Xt.v2020_12){let n=e.$schema;return n?yk(n)??t:t}function Tt(e,t,n,r,i){if(!e||!r.include(e))return;if(e.type==="property")return Tt(e.valueNode,t,n,r,i);let s=e;switch(a(),s.type){case"object":m(s);break;case"array":f(s);break;case"string":l(s);break;case"number":c(s);break}r.add({node:s,schema:t});function a(){function p(T){return s.type===T||T==="integer"&&s.type==="number"&&s.isInteger}if(Array.isArray(t.type)?t.type.some(p)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||te.t("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(p(t.type)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||te.t('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(let T of t.allOf){let y=new wt,A=r.newSub();Tt(s,Mt(T),y,A,i),n.merge(y),r.merge(A)}let g=Mt(t.not);if(g){let T=new wt,y=r.newSub();Tt(s,g,T,y,i),T.hasProblems()||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||te.t("Matches a schema that is not allowed.")});for(let A of y.schemas)A.inverted=!A.inverted,r.add(A)}let v=(T,y)=>{let A=[],N=o(T)??T,O;for(let q of N){let j=Mt(q),M=new wt,C=r.newSub();if(Tt(s,j,M,C,i),M.hasProblems()||A.push(j),!O)O={schema:j,validationResult:M,matchingSchemas:C};else if(!y&&!M.hasProblems()&&!O.validationResult.hasProblems())O.matchingSchemas.merge(C),O.validationResult.propertiesMatches+=M.propertiesMatches,O.validationResult.propertiesValueMatches+=M.propertiesValueMatches,O.validationResult.mergeProcessedProperties(M);else{let L=M.compare(O.validationResult);L>0?O={schema:j,validationResult:M,matchingSchemas:C}:L===0&&(O.matchingSchemas.merge(C),O.validationResult.mergeEnumValues(M))}}return A.length>1&&y&&n.problems.push({location:{offset:s.offset,length:1},message:te.t("Matches multiple schemas when only one must validate.")}),O&&(O.validationResult.updateEnumMismatchProblemMessages(),n.merge(O.validationResult),r.merge(O.matchingSchemas)),A.length};Array.isArray(t.anyOf)&&v(t.anyOf,!1),Array.isArray(t.oneOf)&&v(t.oneOf,!0);let b=T=>{let y=new wt,A=r.newSub();Tt(s,Mt(T),y,A,i),n.merge(y),r.merge(A)},_=(T,y,A)=>{let N=Mt(T),O=new wt,q=r.newSub();Tt(s,N,O,q,i),r.merge(q),n.mergeProcessedProperties(O),O.hasProblems()?A&&b(A):y&&b(y)},k=Mt(t.if);if(k&&_(k,Mt(t.then),Mt(t.else)),Array.isArray(t.enum)){let T=Pr(s),y=!1;for(let A of t.enum)if(la(T,A)){y=!0;break}n.enumValues=t.enum,n.enumValueMatch=y,y||n.problems.push({location:{offset:s.offset,length:s.length},code:ge.EnumValueMismatch,message:t.errorMessage||te.t("Value is not accepted. Valid values: {0}.",t.enum.map(A=>JSON.stringify(A)).join(", "))})}if(kn(t.const)){let T=Pr(s);la(T,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:s.offset,length:s.length},code:ge.EnumValueMismatch,message:t.errorMessage||te.t("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}let w=t.deprecationMessage;if(w||t.deprecated){w=w||te.t("Value is deprecated");let T=s.parent?.type==="property"?s.parent:s;n.problems.push({location:{offset:T.offset,length:T.length},severity:qt.Warning,message:w,code:ge.Deprecated})}}function o(p){if(p.length<2)return;let g=b=>{let _=new Map;for(let k=0;k<p.length;k++){let w=b(Mt(p[k]),k);if(!w)return;w.forEach(([T,y])=>{if(y.const!==void 0){_.has(T)||_.set(T,new Map);let A=_.get(T);A.has(y.const)||A.set(y.const,[]),A.get(y.const).push(k)}})}return _},v=(b,_)=>{for(let[k,w]of b){let T=new Set;if(w.forEach(y=>y.forEach(A=>T.add(A))),T.size===p.length){let y=_(k),A=w.get(y);if(A?.length)return A.map(N=>p[N]);break}}};if(s.type==="object"&&s.properties?.length){let b=g(_=>_.properties?Object.entries(_.properties).map(([k,w])=>[k,Mt(w)]):void 0);if(b)return v(b,_=>{let k=s.properties.find(w=>w.keyNode.value===_);return k?.valueNode?.type==="string"?k.valueNode.value:void 0})}else if(s.type==="array"&&s.items?.length){let b=g(_=>{let k=_.prefixItems||(Array.isArray(_.items)?_.items:void 0);return k?k.map((w,T)=>[T,Mt(w)]):void 0});if(b)return v(b,_=>{let k=s.items[_];return k?.type==="string"?k.value:void 0})}}function c(p){let g=p.value;function v(A){let N=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(A.toString());return N&&{value:Number(N[1]+(N[2]||"")),multiplier:(N[2]?.length||0)-(parseInt(N[3])||0)}}if(Lt(t.multipleOf)){let A=-1;if(Number.isInteger(t.multipleOf))A=g%t.multipleOf;else{let N=v(t.multipleOf),O=v(g);if(N&&O){let q=10**Math.abs(O.multiplier-N.multiplier);O.multiplier<N.multiplier?O.value*=q:N.value*=q,A=O.value%N.value}}A!==0&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Value is not divisible by {0}.",t.multipleOf)})}function b(A,N){if(Lt(N))return N;if($n(N)&&N)return A}function _(A,N){if(!$n(N)||!N)return A}let k=b(t.minimum,t.exclusiveMinimum);Lt(k)&&g<=k&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Value is below the exclusive minimum of {0}.",k)});let w=b(t.maximum,t.exclusiveMaximum);Lt(w)&&g>=w&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Value is above the exclusive maximum of {0}.",w)});let T=_(t.minimum,t.exclusiveMinimum);Lt(T)&&g<T&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Value is below the minimum of {0}.",T)});let y=_(t.maximum,t.exclusiveMaximum);Lt(y)&&g>y&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Value is above the maximum of {0}.",y)})}function l(p){if(Lt(t.minLength)&&Kb(p.value)<t.minLength&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("String is shorter than the minimum length of {0}.",t.minLength)}),Lt(t.maxLength)&&Kb(p.value)>t.maxLength&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("String is longer than the maximum length of {0}.",t.maxLength)}),mp(t.pattern)){let g=fa(t.pattern);g&&!g.test(p.value)&&n.problems.push({location:{offset:p.offset,length:p.length},message:t.patternErrorMessage||t.errorMessage||te.t('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let v;if(!p.value)v=te.t("URI expected.");else{let b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(p.value);b?!b[2]&&t.format==="uri"&&(v=te.t("URI with a scheme is expected.")):v=te.t("URI is expected.")}v&&n.problems.push({location:{offset:p.offset,length:p.length},message:t.patternErrorMessage||t.errorMessage||te.t("String is not a URI: {0}",v)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":let g=AK[t.format];(!p.value||!g.pattern.exec(p.value))&&n.problems.push({location:{offset:p.offset,length:p.length},message:t.patternErrorMessage||t.errorMessage||g.errorMessage});default:}}function f(p){let g,v;i.schemaDraft>=Xt.v2020_12?(g=t.prefixItems,v=Array.isArray(t.items)?void 0:t.items):(g=Array.isArray(t.items)?t.items:void 0,v=Array.isArray(t.items)?t.additionalItems:t.items);let b=0;if(g!==void 0){let w=Math.min(g.length,p.items.length);for(;b<w;b++){let T=g[b],y=Mt(T),A=new wt,N=p.items[b];N&&(Tt(N,y,A,r,i),n.mergePropertyMatch(A)),n.processedProperties.add(String(b))}}if(v!==void 0&&b<p.items.length)if(typeof v=="boolean")for(v===!1&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Array has too many items according to schema. Expected {0} or fewer.",b)});b<p.items.length;b++)n.processedProperties.add(String(b)),n.propertiesValueMatches++;else for(;b<p.items.length;b++){let w=new wt;Tt(p.items[b],v,w,r,i),n.mergePropertyMatch(w),n.processedProperties.add(String(b))}let _=Mt(t.contains);if(_){let w=0;for(let T=0;T<p.items.length;T++){let y=p.items[T],A=new wt;Tt(y,_,A,Uo.instance,i),A.hasProblems()||(w++,i.schemaDraft>=Xt.v2020_12&&n.processedProperties.add(String(T)))}w===0&&!Lt(t.minContains)&&n.problems.push({location:{offset:p.offset,length:p.length},message:t.errorMessage||te.t("Array does not contain required item.")}),Lt(t.minContains)&&w<t.minContains&&n.problems.push({location:{offset:p.offset,length:p.length},message:t.errorMessage||te.t("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),Lt(t.maxContains)&&w>t.maxContains&&n.problems.push({location:{offset:p.offset,length:p.length},message:t.errorMessage||te.t("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}let k=t.unevaluatedItems;if(k!==void 0)for(let w=0;w<p.items.length;w++){if(!n.processedProperties.has(String(w)))if(k===!1)n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Item does not match any validation rule from the array.")});else{let T=new wt;Tt(p.items[w],t.unevaluatedItems,T,r,i),n.mergePropertyMatch(T)}n.processedProperties.add(String(w)),n.propertiesValueMatches++}if(Lt(t.minItems)&&p.items.length<t.minItems&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Array has too few items. Expected {0} or more.",t.minItems)}),Lt(t.maxItems)&&p.items.length>t.maxItems&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Array has too many items. Expected {0} or fewer.",t.maxItems)}),t.uniqueItems===!0){let T=function(){for(let y=0;y<w.length-1;y++){let A=w[y];for(let N=y+1;N<w.length;N++)if(la(A,w[N]))return!0}return!1},w=Pr(p);T()&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Array has duplicate items.")})}}function m(p){let g=Object.create(null),v=new Set;for(let y of p.properties){let A=y.keyNode.value;g[A]=y.valueNode,v.add(A)}if(Array.isArray(t.required)){for(let y of t.required)if(!g[y]){let A=p.parent&&p.parent.type==="property"&&p.parent.keyNode,N=A?{offset:A.offset,length:A.length}:{offset:p.offset,length:1};n.problems.push({location:N,message:te.t('Missing property "{0}".',y)})}}let b=y=>{v.delete(y),n.processedProperties.add(y)};if(t.properties)for(let y of Object.keys(t.properties)){b(y);let A=t.properties[y],N=g[y];if(N)if($n(A))if(A)n.propertiesMatches++,n.propertiesValueMatches++;else{let O=N.parent;n.problems.push({location:{offset:O.keyNode.offset,length:O.keyNode.length},message:t.errorMessage||te.t("Property {0} is not allowed.",y)})}else{let O=new wt;Tt(N,A,O,r,i),n.mergePropertyMatch(O)}}if(t.patternProperties)for(let y of Object.keys(t.patternProperties)){let A=fa(y);if(A){let N=[];for(let O of v)if(A.test(O)){N.push(O);let q=g[O];if(q){let j=t.patternProperties[y];if($n(j))if(j)n.propertiesMatches++,n.propertiesValueMatches++;else{let M=q.parent;n.problems.push({location:{offset:M.keyNode.offset,length:M.keyNode.length},message:t.errorMessage||te.t("Property {0} is not allowed.",O)})}else{let M=new wt;Tt(q,j,M,r,i),n.mergePropertyMatch(M)}}}N.forEach(b)}}let _=t.additionalProperties;if(_!==void 0)for(let y of v){b(y);let A=g[y];if(A){if(_===!1){let N=A.parent;n.problems.push({location:{offset:N.keyNode.offset,length:N.keyNode.length},message:t.errorMessage||te.t("Property {0} is not allowed.",y)})}else if(_!==!0){let N=new wt;Tt(A,_,N,r,i),n.mergePropertyMatch(N)}}}let k=t.unevaluatedProperties;if(k!==void 0){let y=[];for(let A of v)if(!n.processedProperties.has(A)){y.push(A);let N=g[A];if(N){if(k===!1){let O=N.parent;n.problems.push({location:{offset:O.keyNode.offset,length:O.keyNode.length},message:t.errorMessage||te.t("Property {0} is not allowed.",A)})}else if(k!==!0){let O=new wt;Tt(N,k,O,r,i),n.mergePropertyMatch(O)}}}y.forEach(b)}if(Lt(t.maxProperties)&&p.properties.length>t.maxProperties&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Object has more properties than limit of {0}.",t.maxProperties)}),Lt(t.minProperties)&&p.properties.length<t.minProperties&&n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependentRequired)for(let y in t.dependentRequired){let A=g[y],N=t.dependentRequired[y];A&&Array.isArray(N)&&T(y,N)}if(t.dependentSchemas)for(let y in t.dependentSchemas){let A=g[y],N=t.dependentSchemas[y];A&&Or(N)&&T(y,N)}if(t.dependencies)for(let y in t.dependencies)g[y]&&T(y,t.dependencies[y]);let w=Mt(t.propertyNames);if(w)for(let y of p.properties){let A=y.keyNode;A&&Tt(A,w,n,r,i)}function T(y,A){if(Array.isArray(A))for(let N of A)g[N]?n.propertiesValueMatches++:n.problems.push({location:{offset:p.offset,length:p.length},message:te.t("Object is missing property {0} required by property {1}.",N,y)});else{let N=Mt(A);if(N){let O=new wt;Tt(p,N,O,r,i),n.mergePropertyMatch(O)}}}}}function PL(e,t){let n=[],r=-1,i=e.getText(),s=mn(i,!1),a=t&&t.collectComments?[]:void 0;function o(){for(;;){let O=s.scan();switch(m(),O){case 12:case 13:Array.isArray(a)&&a.push(fe.create(e.positionAt(s.getTokenOffset()),e.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return O}}}function c(O){return s.getToken()===O?(o(),!0):!1}function l(O,q,j,M,C=qt.Error){if(n.length===0||j!==r){let L=fe.create(e.positionAt(j),e.positionAt(M));n.push(Sn.create(L,O,C,q,e.languageId)),r=j}}function f(O,q,j=void 0,M=[],C=[]){let L=s.getTokenOffset(),V=s.getTokenOffset()+s.getTokenLength();if(L===V&&L>0){for(L--;L>0&&/\s/.test(i.charAt(L));)L--;V=L+1}if(l(O,q,L,V),j&&p(j,!1),M.length+C.length>0){let $=s.getToken();for(;$!==17;){if(M.indexOf($)!==-1){o();break}else if(C.indexOf($)!==-1)break;$=o()}}return j}function m(){switch(s.getTokenError()){case 4:return f(te.t("Invalid unicode sequence in string."),ge.InvalidUnicode),!0;case 5:return f(te.t("Invalid escape character in string."),ge.InvalidEscapeCharacter),!0;case 3:return f(te.t("Unexpected end of number."),ge.UnexpectedEndOfNumber),!0;case 1:return f(te.t("Unexpected end of comment."),ge.UnexpectedEndOfComment),!0;case 2:return f(te.t("Unexpected end of string."),ge.UnexpectedEndOfString),!0;case 6:return f(te.t("Invalid characters in string. Control characters must be escaped."),ge.InvalidCharacter),!0}return!1}function p(O,q){return O.length=s.getTokenOffset()+s.getTokenLength()-O.offset,q&&o(),O}function g(O){if(s.getToken()!==3)return;let q=new dk(O,s.getTokenOffset());o();let j=0,M=!1;for(;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){M||f(te.t("Value expected"),ge.ValueExpected);let L=s.getTokenOffset();if(o(),s.getToken()===4){M&&l(te.t("Trailing comma"),ge.TrailingComma,L,L+1);continue}}else M&&f(te.t("Expected comma"),ge.CommaExpected);let C=y(q);C?q.items.push(C):f(te.t("Value expected"),ge.ValueExpected,void 0,[],[4,5]),M=!0}return s.getToken()!==4?f(te.t("Expected comma or closing bracket"),ge.CommaOrCloseBacketExpected,q):p(q,!0)}let v=new Yu(void 0,0,0);function b(O,q){let j=new hk(O,s.getTokenOffset(),v),M=k(j);if(!M)if(s.getToken()===16){f(te.t("Property keys must be doublequoted"),ge.PropertyKeysMustBeDoublequoted);let L=new Yu(j,s.getTokenOffset(),s.getTokenLength());L.value=s.getTokenValue(),M=L,o()}else return;if(j.keyNode=M,M.value!=="//"){let L=q[M.value];L?(l(te.t("Duplicate object key"),ge.DuplicateKey,j.keyNode.offset,j.keyNode.offset+j.keyNode.length,qt.Warning),Or(L)&&l(te.t("Duplicate object key"),ge.DuplicateKey,L.keyNode.offset,L.keyNode.offset+L.keyNode.length,qt.Warning),q[M.value]=!0):q[M.value]=j}if(s.getToken()===6)j.colonOffset=s.getTokenOffset(),o();else if(f(te.t("Colon expected"),ge.ColonExpected),s.getToken()===10&&e.positionAt(M.offset+M.length).line<e.positionAt(s.getTokenOffset()).line)return j.length=M.length,j;let C=y(j);return C?(j.valueNode=C,j.length=C.offset+C.length-j.offset,j):f(te.t("Value expected"),ge.ValueExpected,j,[],[2,5])}function _(O){if(s.getToken()!==1)return;let q=new mk(O,s.getTokenOffset()),j=Object.create(null);o();let M=!1;for(;s.getToken()!==2&&s.getToken()!==17;){if(s.getToken()===5){M||f(te.t("Property expected"),ge.PropertyExpected);let L=s.getTokenOffset();if(o(),s.getToken()===2){M&&l(te.t("Trailing comma"),ge.TrailingComma,L,L+1);continue}}else M&&f(te.t("Expected comma"),ge.CommaExpected);let C=b(q,j);C?q.properties.push(C):f(te.t("Property expected"),ge.PropertyExpected,void 0,[],[2,5]),M=!0}return s.getToken()!==2?f(te.t("Expected comma or closing brace"),ge.CommaOrCloseBraceExpected,q):p(q,!0)}function k(O){if(s.getToken()!==10)return;let q=new Yu(O,s.getTokenOffset());return q.value=s.getTokenValue(),p(q,!0)}function w(O){if(s.getToken()!==11)return;let q=new pk(O,s.getTokenOffset());if(s.getTokenError()===0){let j=s.getTokenValue();try{let M=JSON.parse(j);if(!Lt(M))return f(te.t("Invalid number format."),ge.Undefined,q);q.value=M}catch{return f(te.t("Invalid number format."),ge.Undefined,q)}q.isInteger=j.indexOf(".")===-1}return p(q,!0)}function T(O){let q;switch(s.getToken()){case 7:return p(new fk(O,s.getTokenOffset()),!0);case 8:return p(new Rp(O,!0,s.getTokenOffset()),!0);case 9:return p(new Rp(O,!1,s.getTokenOffset()),!0);default:return}}function y(O){return g(O)||_(O)||k(O)||w(O)||T(O)}let A;return o()!==17&&(A=y(A),A?s.getToken()!==17&&f(te.t("End of file expected."),ge.Undefined):f(te.t("Expected a JSON object, array or literal."),ge.Undefined)),new jp(A,n,a)}var te,AK,ci,fk,Rp,dk,pk,Yu,hk,mk,EL,AL,OK,NK,Dp,gk,Uo,wt,jp,Ho=Oe(()=>{d();vr();Hu();zu();wn();uk();te=Ka(ha()),AK={"color-hex":{errorMessage:te.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:te.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:te.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:te.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:te.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:te.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:te.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:te.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}},ci=class{constructor(t,n,r=0){this.offset=n,this.length=r,this.parent=t}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},fk=class extends ci{constructor(t,n){super(t,n),this.type="null",this.value=null}},Rp=class extends ci{constructor(t,n,r){super(t,r),this.type="boolean",this.value=n}},dk=class extends ci{constructor(t,n){super(t,n),this.type="array",this.items=[]}get children(){return this.items}},pk=class extends ci{constructor(t,n){super(t,n),this.type="number",this.isInteger=!0,this.value=Number.NaN}},Yu=class extends ci{constructor(t,n,r){super(t,n,r),this.type="string",this.value=""}},hk=class extends ci{constructor(t,n,r){super(t,n),this.type="property",this.colonOffset=-1,this.keyNode=r}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},mk=class extends ci{constructor(t,n){super(t,n),this.type="object",this.properties=[]}get children(){return this.properties}};(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(EL||(EL={}));AL="http://json-schema.org/",OK="https://json-schema.org/";NK={"https://json-schema.org/draft-03/schema":Xt.v3,"https://json-schema.org/draft-04/schema":Xt.v4,"https://json-schema.org/draft-06/schema":Xt.v6,"https://json-schema.org/draft-07/schema":Xt.v7,"https://json-schema.org/draft/2019-09/schema":Xt.v2019_09,"https://json-schema.org/draft/2020-12/schema":Xt.v2020_12},Dp=class{constructor(t){this.schemaDraft=t}},gk=class e{constructor(t=-1,n){this.focusOffset=t,this.exclude=n,this.schemas=[]}add(t){this.schemas.push(t)}merge(t){Array.prototype.push.apply(this.schemas,t.schemas)}include(t){return(this.focusOffset===-1||_k(t,this.focusOffset))&&t!==this.exclude}newSub(){return new e(-1,this.exclude)}},Uo=class{constructor(){}get schemas(){return[]}add(t){}merge(t){}include(t){return!0}newSub(){return this}};Uo.instance=new Uo;wt=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(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches+=t.propertiesMatches,this.propertiesValueMatches+=t.propertiesValueMatches,this.mergeProcessedProperties(t)}mergeEnumValues(t){!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues&&(this.enumValues=this.enumValues.concat(t.enumValues))}updateEnumMismatchProblemMessages(){if(!this.enumValueMatch&&this.enumValues)for(let t of this.problems)t.code===ge.EnumValueMismatch&&(t.message=te.t("Value is not accepted. Valid values: {0}.",this.enumValues.map(n=>JSON.stringify(n)).join(", ")))}mergePropertyMatch(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++}mergeProcessedProperties(t){t.processedProperties.forEach(n=>this.processedProperties.add(n))}compare(t){let n=this.hasProblems();return n!==t.hasProblems()?n?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches}};jp=class{constructor(t,n=[],r=[]){this.root=t,this.syntaxErrors=n,this.comments=r}getNodeFromOffset(t,n=!1){if(this.root)return f_(this.root,t,n)}visit(t){if(this.root){let n=r=>{let i=t(r),s=r.children;if(Array.isArray(s))for(let a=0;a<s.length&&i;a++)i=n(s[a]);return i};n(this.root)}}validate(t,n,r=qt.Warning,i){if(this.root&&n){let s=new wt;return Tt(this.root,n,s,Uo.instance,new Dp(i??OL(n))),s.problems.map(a=>{let o=fe.create(t.positionAt(a.location.offset),t.positionAt(a.location.offset+a.location.length));return Sn.create(o,a.message,a.severity??r,a.code)})}}getMatchingSchemas(t,n=-1,r){if(this.root&&t){let i=new gk(n,r),s=OL(t),a=new Dp(s);return Tt(this.root,t,new wt,i,a),i.schemas}return[]}}});function Bp(e,t,n){if(e!==null&&typeof e=="object"){let r=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";let i=`[
|
|
69
|
+
`;for(let s=0;s<e.length;s++)i+=r+Bp(e[s],r,n),s<e.length-1&&(i+=","),i+=`
|
|
70
|
+
`;return i+=t+"]",i}else{let i=Object.keys(e);if(i.length===0)return"{}";let s=`{
|
|
71
|
+
`;for(let a=0;a<i.length;a++){let o=i[a];s+=r+JSON.stringify(o)+": "+Bp(e[o],r,n),a<i.length-1&&(s+=","),s+=`
|
|
72
|
+
`}return s+=t+"}",s}}return n(e)}var CL=Oe(()=>{d()});var Xu,PK,CK,Fp,LL=Oe(()=>{d();Ho();vr();CL();zu();Hu();wn();Xu=Ka(ha()),PK=[",","}","]"],CK=[":"],Fp=class{constructor(t,n=[],r=Promise,i={}){this.schemaService=t,this.contributions=n,this.promiseConstructor=r,this.clientCapabilities=i}doResolve(t){for(let n=this.contributions.length-1;n>=0;n--){let r=this.contributions[n].resolveCompletion;if(r){let i=r(t);if(i)return i}}return this.promiseConstructor.resolve(t)}doComplete(t,n,r){let i={items:[],isIncomplete:!1},s=t.getText(),a=t.offsetAt(n),o=r.getNodeFromOffset(a,!0);if(this.isInComment(t,o?o.offset:0,a))return Promise.resolve(i);if(o&&a===o.offset+o.length&&a>0){let g=s[a-1];(o.type==="object"&&g==="}"||o.type==="array"&&g==="]")&&(o=o.parent)}let c=this.getCurrentWord(t,a),l;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))l=fe.create(t.positionAt(o.offset),t.positionAt(o.offset+o.length));else{let g=a-c.length;g>0&&s[g-1]==='"'&&g--,l=fe.create(t.positionAt(g),n)}let f=!1,m=new Map,p={add:g=>{let v=g.label,b=m.get(v);if(b)b.documentation||(b.documentation=g.documentation),b.detail||(b.detail=g.detail),b.labelDetails||(b.labelDetails=g.labelDetails);else{if(v=v.replace(/[\n]/g,"\u21B5"),v.length>60){let _=v.substr(0,57).trim()+"...";m.has(_)||(v=_)}g.textEdit=Jt.replace(l,g.insertText),f&&(g.commitCharacters=g.kind===It.Property?CK:PK),g.label=v,m.set(v,g),i.items.push(g)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:g=>{console.error(g)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(t.uri,r).then(g=>{let v=[],b=!0,_="",k;if(o&&o.type==="string"){let T=o.parent;T&&T.type==="property"&&T.keyNode===o&&(b=!T.valueNode,k=T,_=s.substr(o.offset+1,o.length-2),T&&(o=T.parent))}if(o&&o.type==="object"){if(o.offset===a)return i;o.properties.forEach(N=>{(!k||k!==N)&&m.set(N.keyNode.value,Fo.create("__"))});let y="";b&&(y=this.evaluateSeparatorAfter(t,t.offsetAt(l.end))),g?this.getPropertyCompletions(g,r,o,b,y,p):this.getSchemaLessPropertyCompletions(r,o,_,p);let A=Qu(o);this.contributions.forEach(N=>{let O=N.collectPropertyCompletions(t.uri,A,c,b,y==="",p);O&&v.push(O)}),!g&&c.length>0&&s.charAt(a-c.length-1)!=='"'&&(p.add({kind:It.Property,label:this.getLabelForValue(c),insertText:this.getInsertTextForProperty(c,void 0,!1,y),insertTextFormat:nt.Snippet,documentation:""}),p.setAsIncomplete())}let w={};return g?this.getValueCompletions(g,r,o,a,t,p,w):this.getSchemaLessValueCompletions(r,o,a,t,p),this.contributions.length>0&&this.getContributedValueCompletions(r,o,a,t,p,v),this.promiseConstructor.all(v).then(()=>{if(p.getNumberOfProposals()===0){let T=a;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(T=o.offset+o.length);let y=this.evaluateSeparatorAfter(t,T);this.addFillerValueCompletions(w,y,p)}return i})})}getPropertyCompletions(t,n,r,i,s,a){n.getMatchingSchemas(t.schema,r.offset).forEach(c=>{if(c.node===r&&!c.inverted){let l=c.schema.properties;l&&Object.keys(l).forEach(m=>{let p=l[m];if(typeof p=="object"&&!p.deprecationMessage&&!p.doNotSuggest){let g={kind:It.Property,label:m,insertText:this.getInsertTextForProperty(m,p,i,s),insertTextFormat:nt.Snippet,filterText:this.getFilterTextForValue(m),documentation:this.fromMarkup(p.markdownDescription)||p.description||""};p.completionDetail!==void 0&&(g.detail=p.completionDetail),p.suggestSortText!==void 0&&(g.sortText=p.suggestSortText),g.insertText&&Ui(g.insertText,`$1${s}`)&&(g.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(g)}});let f=c.schema.propertyNames;if(typeof f=="object"&&!f.deprecationMessage&&!f.doNotSuggest){let m=(p,g,v,b)=>{let _={kind:It.Property,label:p,insertText:this.getInsertTextForProperty(p,void 0,i,s),insertTextFormat:nt.Snippet,filterText:this.getFilterTextForValue(p),documentation:g||this.fromMarkup(f.markdownDescription)||f.description||"",sortText:b,detail:v};_.insertText&&Ui(_.insertText,`$1${s}`)&&(_.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(_)};if(f.enum)for(let p=0;p<f.enum.length;p++){let g;f.markdownEnumDescriptions&&p<f.markdownEnumDescriptions.length?g=this.fromMarkup(f.markdownEnumDescriptions[p]):f.enumDescriptions&&p<f.enumDescriptions.length&&(g=f.enumDescriptions[p]);let v=f.enumSortTexts?.[p],b=f.enumDetails?.[p];m(f.enum[p],g,b,v)}if(f.examples)for(let p=0;p<f.examples.length;p++)m(f.examples[p],void 0,void 0,void 0);f.const&&m(f.const,void 0,f.completionDetail,f.suggestSortText)}}})}getSchemaLessPropertyCompletions(t,n,r,i){let s=a=>{a.properties.forEach(o=>{let c=o.keyNode.value;i.add({kind:It.Property,label:c,insertText:this.getInsertTextForValue(c,""),insertTextFormat:nt.Snippet,filterText:this.getFilterTextForValue(c),documentation:""})})};if(n.parent)if(n.parent.type==="property"){let a=n.parent.keyNode.value;t.visit(o=>(o.type==="property"&&o!==n.parent&&o.keyNode.value===a&&o.valueNode&&o.valueNode.type==="object"&&s(o.valueNode),!0))}else n.parent.type==="array"&&n.parent.items.forEach(a=>{a.type==="object"&&a!==n&&s(a)});else n.type==="object"&&i.add({kind:It.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:nt.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(t,n,r,i,s){let a=r;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(a=n.offset+n.length,n=n.parent),!n){s.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:nt.Snippet,documentation:""}),s.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:nt.Snippet,documentation:""});return}let o=this.evaluateSeparatorAfter(i,a),c=l=>{l.parent&&!_k(l.parent,r,!0)&&s.add({kind:this.getSuggestionKind(l.type),label:this.getLabelTextForMatchingNode(l,i),insertText:this.getInsertTextForMatchingNode(l,i,o),insertTextFormat:nt.Snippet,documentation:""}),l.type==="boolean"&&this.addBooleanValueCompletion(!l.value,o,s)};if(n.type==="property"&&r>(n.colonOffset||0)){let l=n.valueNode;if(l&&(r>l.offset+l.length||l.type==="object"||l.type==="array"))return;let f=n.keyNode.value;t.visit(m=>(m.type==="property"&&m.keyNode.value===f&&m.valueNode&&c(m.valueNode),!0)),f==="$schema"&&n.parent&&!n.parent.parent&&this.addDollarSchemaCompletions(o,s)}if(n.type==="array")if(n.parent&&n.parent.type==="property"){let l=n.parent.keyNode.value;t.visit(f=>(f.type==="property"&&f.keyNode.value===l&&f.valueNode&&f.valueNode.type==="array"&&f.valueNode.items.forEach(c),!0))}else n.items.forEach(c)}getValueCompletions(t,n,r,i,s,a,o){let c=i,l,f;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(c=r.offset+r.length,f=r,r=r.parent),!r){this.addSchemaValueCompletions(t.schema,"",a,o);return}if(r.type==="property"&&i>(r.colonOffset||0)){let m=r.valueNode;if(m&&i>m.offset+m.length)return;l=r.keyNode.value,r=r.parent}if(r&&(l!==void 0||r.type==="array")){let m=this.evaluateSeparatorAfter(s,c),p=n.getMatchingSchemas(t.schema,r.offset,f);for(let g of p)if(g.node===r&&!g.inverted&&g.schema){if(r.type==="array"&&g.schema.items){let v=a;if(g.schema.uniqueItems){let b=new Set;r.children.forEach(_=>{_.type!=="array"&&_.type!=="object"&&b.add(this.getLabelForValue(Pr(_)))}),v={...a,add(_){b.has(_.label)||a.add(_)}}}if(Array.isArray(g.schema.items)){let b=this.findItemAtOffset(r,s,i);b<g.schema.items.length&&this.addSchemaValueCompletions(g.schema.items[b],m,v,o)}else this.addSchemaValueCompletions(g.schema.items,m,v,o)}if(l!==void 0){let v=!1;if(g.schema.properties){let b=g.schema.properties[l];b&&(v=!0,this.addSchemaValueCompletions(b,m,a,o))}if(g.schema.patternProperties&&!v){for(let b of Object.keys(g.schema.patternProperties))if(fa(b)?.test(l)){v=!0;let k=g.schema.patternProperties[b];this.addSchemaValueCompletions(k,m,a,o)}}if(g.schema.additionalProperties&&!v){let b=g.schema.additionalProperties;this.addSchemaValueCompletions(b,m,a,o)}}}l==="$schema"&&!r.parent&&this.addDollarSchemaCompletions(m,a),o.boolean&&(this.addBooleanValueCompletion(!0,m,a),this.addBooleanValueCompletion(!1,m,a)),o.null&&this.addNullValueCompletion(m,a)}}getContributedValueCompletions(t,n,r,i,s,a){if(!n)this.contributions.forEach(o=>{let c=o.collectDefaultCompletions(i.uri,s);c&&a.push(c)});else if((n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(n=n.parent),n&&n.type==="property"&&r>(n.colonOffset||0)){let o=n.keyNode.value,c=n.valueNode;if((!c||r<=c.offset+c.length)&&n.parent){let l=Qu(n.parent);this.contributions.forEach(f=>{let m=f.collectValueCompletions(i.uri,l,o,s);m&&a.push(m)})}}}addSchemaValueCompletions(t,n,r,i){typeof t=="object"&&(this.addEnumValueCompletions(t,n,r),this.addDefaultValueCompletions(t,n,r),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(s=>this.addSchemaValueCompletions(s,n,r,i)),Array.isArray(t.anyOf)&&t.anyOf.forEach(s=>this.addSchemaValueCompletions(s,n,r,i)),Array.isArray(t.oneOf)&&t.oneOf.forEach(s=>this.addSchemaValueCompletions(s,n,r,i)))}addDefaultValueCompletions(t,n,r,i=0){let s=!1;if(kn(t.default)){let a=t.type,o=t.default;for(let l=i;l>0;l--)o=[o],a="array";let c={kind:this.getSuggestionKind(a),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,n),insertTextFormat:nt.Snippet};this.doesSupportsLabelDetails()?c.labelDetails={description:Xu.t("Default value")}:c.detail=Xu.t("Default value"),r.add(c),s=!0}Array.isArray(t.examples)&&t.examples.forEach(a=>{let o=t.type,c=a;for(let l=i;l>0;l--)c=[c],o="array";r.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(c),insertText:this.getInsertTextForValue(c,n),insertTextFormat:nt.Snippet}),s=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(a=>{let o=t.type,c=a.body,l=a.label,f,m;if(kn(c)){let p=t.type;for(let g=i;g>0;g--)c=[c],p="array";f=this.getInsertTextForSnippetValue(c,n),m=this.getFilterTextForSnippetValue(c),l=l||this.getLabelForSnippetValue(c)}else if(typeof a.bodyText=="string"){let p="",g="",v="";for(let b=i;b>0;b--)p=p+v+`[
|
|
73
|
+
`,g=g+`
|
|
74
|
+
`+v+"]",v+=" ",o="array";f=p+v+a.bodyText.split(`
|
|
75
|
+
`).join(`
|
|
76
|
+
`+v)+g+n,l=l||f,m=f.replace(/[\n]/g,"")}else return;r.add({kind:this.getSuggestionKind(o),label:l,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:f,insertTextFormat:nt.Snippet,filterText:m}),s=!0}),!s&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,n,r,i+1)}addEnumValueCompletions(t,n,r){if(kn(t.const)&&r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,n),insertTextFormat:nt.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(let i=0,s=t.enum.length;i<s;i++){let a=t.enum[i],o=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&i<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(t.markdownEnumDescriptions[i]):t.enumDescriptions&&i<t.enumDescriptions.length&&(o=t.enumDescriptions[i]),r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,n),insertTextFormat:nt.Snippet,sortText:t.enumSortTexts?.[i],detail:t.enumDetails?.[i],documentation:o})}}collectTypes(t,n){if(Array.isArray(t.enum)||kn(t.const))return;let r=t.type;Array.isArray(r)?r.forEach(i=>n[i]=!0):r&&(n[r]=!0)}addFillerValueCompletions(t,n,r){t.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},n),insertTextFormat:nt.Snippet,detail:Xu.t("New object"),documentation:""}),t.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],n),insertTextFormat:nt.Snippet,detail:Xu.t("New array"),documentation:""})}addBooleanValueCompletion(t,n,r){r.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,n),insertTextFormat:nt.Snippet,documentation:""})}addNullValueCompletion(t,n){n.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:nt.Snippet,documentation:""})}addDollarSchemaCompletions(t,n){this.schemaService.getRegisteredSchemaIds(i=>i==="http"||i==="https").forEach(i=>{i.startsWith("https://json-schema.org/draft-")&&(i=i+"#"),n.add({kind:It.Module,label:this.getLabelForValue(i),filterText:this.getFilterTextForValue(i),insertText:this.getInsertTextForValue(i,t),insertTextFormat:nt.Snippet,documentation:""})})}getLabelForValue(t){return JSON.stringify(t)}getValueFromLabel(t){return JSON.parse(t)}getFilterTextForValue(t){return JSON.stringify(t)}getFilterTextForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(t){return t.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(t,n){let r=JSON.stringify(t,null," ");return r==="{}"?"{$1}"+n:r==="[]"?"[$1]"+n:this.getInsertTextForPlainText(r+n)}getInsertTextForSnippetValue(t,n){return Bp(t,"",i=>typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i))+n}getInsertTextForGuessedValue(t,n){switch(typeof t){case"object":return t===null?"${1:null}"+n:this.getInsertTextForValue(t,n);case"string":let r=JSON.stringify(t);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),'"${1:'+r+'}"'+n;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+n}return this.getInsertTextForValue(t,n)}getSuggestionKind(t){if(Array.isArray(t)){let n=t;t=n.length>0?n[0]:void 0}if(!t)return It.Value;switch(t){case"string":return It.Value;case"object":return It.Module;case"property":return It.Property;default:return It.Value}}getLabelTextForMatchingNode(t,n){switch(t.type){case"array":return"[]";case"object":return"{}";default:return n.getText().substr(t.offset,t.length)}}getInsertTextForMatchingNode(t,n,r){switch(t.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:let i=n.getText().substr(t.offset,t.length)+r;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(t,n,r,i){let s=this.getInsertTextForValue(t,"");if(!r)return s;let a=s+": ",o,c=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){let l=n.defaultSnippets[0].body;kn(l)&&(o=this.getInsertTextForSnippetValue(l,""))}c+=n.defaultSnippets.length}if(n.enum&&(!o&&n.enum.length===1&&(o=this.getInsertTextForGuessedValue(n.enum[0],"")),c+=n.enum.length),kn(n.const)&&(o||(o=this.getInsertTextForGuessedValue(n.const,"")),c++),kn(n.default)&&(o||(o=this.getInsertTextForGuessedValue(n.default,"")),c++),Array.isArray(n.examples)&&n.examples.length&&(o||(o=this.getInsertTextForGuessedValue(n.examples[0],"")),c+=n.examples.length),c===0){let l=Array.isArray(n.type)?n.type[0]:n.type;switch(l||(n.properties?l="object":n.items&&(l="array")),l){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return s}}}return(!o||c>1)&&(o="$1"),a+o+i}getCurrentWord(t,n){let r=n-1,i=t.getText();for(;r>=0&&`
|
|
77
|
+
\r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)}evaluateSeparatorAfter(t,n){let r=mn(t.getText(),!0);switch(r.setPosition(n),r.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(t,n,r){let i=mn(n.getText(),!0),s=t.items;for(let a=s.length-1;a>=0;a--){let o=s[a];if(r>o.offset+o.length)return i.setPosition(o.offset+o.length),i.scan()===5&&r>=i.getTokenOffset()+i.getTokenLength()?a+1:a;if(r>=o.offset)return a}return 0}isInComment(t,n,r){let i=mn(t.getText(),!1);i.setPosition(n);let s=i.scan();for(;s!==17&&i.getTokenOffset()+i.getTokenLength()<r;)s=i.scan();return(s===12||s===13)&&i.getTokenOffset()<=r}fromMarkup(t){if(t&&this.doesSupportMarkdown())return{kind:Nr.Markdown,value:t}}doesSupportMarkdown(){if(!kn(this.supportsMarkdown)){let t=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(t)&&t.indexOf(Nr.Markdown)!==-1}return this.supportsMarkdown}doesSupportsCommitCharacters(){return kn(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return kn(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}});function bk(e){if(e)return e.trim().replace(/[\\`*_{}[\]()<>#+\-.!]/g,"\\$&").replace(/(^ +)/mg,(t,n)=>" ".repeat(n.length)).replace(/( {2,})/g,(t,n)=>" "+" ".repeat(n.length-1)).replace(/(\t+)/g,(t,n)=>" ".repeat(n.length*4)).replace(/\n/g,`\\
|
|
78
|
+
`)}function LK(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Vp,qL=Oe(()=>{d();Ho();wn();Vp=class{constructor(t,n=[],r){this.schemaService=t,this.contributions=n,this.promise=r||Promise}doHover(t,n,r){let i=t.offsetAt(n),s=r.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 f=s.parent;if(f&&f.type==="property"&&f.keyNode===s&&(s=f.valueNode,!s))return this.promise.resolve(null)}let o=fe.create(t.positionAt(a.offset),t.positionAt(a.offset+a.length)),c=f=>({contents:f,range:o}),l=Qu(s);for(let f=this.contributions.length-1;f>=0;f--){let p=this.contributions[f].getInfoContribution(t.uri,l);if(p)return p.then(g=>c(g))}return this.schemaService.getSchemaForResource(t.uri,r).then(f=>{if(!f)return null;let m,p,g,v,b=r.getMatchingSchemas(f.schema,s.offset).filter(k=>k.node===s&&!k.inverted).map(k=>k.schema);for(let k of b)if(m=m||k.title,p=p||k.markdownDescription||bk(k.description),k.enum){let w=k.enum.indexOf(Pr(s));k.markdownEnumDescriptions?g=k.markdownEnumDescriptions[w]:k.enumDescriptions&&(g=bk(k.enumDescriptions[w])),g&&(v=k.enum[w],typeof v!="string"&&(v=JSON.stringify(v)))}let _="";return m&&(_=bk(m)),p&&(_.length>0&&(_+=`
|
|
79
|
+
|
|
80
|
+
`),_+=p),g&&(_.length>0&&(_+=`
|
|
81
|
+
|
|
82
|
+
`),_+=`\`${LK(v)}\`: ${g}`),c([_])})}}});function ML(e){if(e&&typeof e=="object"){if($n(e.allowComments))return e.allowComments;if(e.allOf)for(let t of e.allOf){let n=ML(t);if($n(n))return n}}}function RL(e){if(e&&typeof e=="object"){if($n(e.allowTrailingCommas))return e.allowTrailingCommas;let t=e;if($n(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(let n of e.allOf){let r=RL(n);if($n(r))return r}}}function $p(e){switch(e){case"error":return qt.Error;case"warning":return qt.Warning;case"ignore":return}}var IL,Up,qK,DL=Oe(()=>{d();wn();IL=Ka(ha());Hu();Up=class{constructor(t,n){this.jsonSchemaService=t,this.promise=n,this.validationEnabled=!0}configure(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:qt.Error)}doValidation(t,n,r,i){if(!this.validationEnabled)return this.promise.resolve([]);let s=[],a={},o=l=>{let f=l.range.start.line+" "+l.range.start.character+" "+l.message;a[f]||(a[f]=!0,s.push(l))},c=l=>{let f=r?.trailingCommas?$p(r.trailingCommas):qt.Error,m=r?.comments?$p(r.comments):this.commentSeverity,p=r?.schemaValidation?$p(r.schemaValidation):qt.Warning,g=r?.schemaRequest?$p(r.schemaRequest):qt.Warning;if(l){let v=(b,_,k)=>{if(n.root&&g){let w=n.root,T=w.type==="object"?w.properties[0]:void 0;if(T&&T.keyNode.value==="$schema"){let y=T.valueNode||T,A=fe.create(t.positionAt(y.offset),t.positionAt(y.offset+y.length));o(Sn.create(A,b,g,_,"json",k))}else{let y=fe.create(t.positionAt(w.offset),t.positionAt(w.offset+1));o(Sn.create(y,b,g,_,"json",k))}}};if(l.errors.length){let b=l.errors[0];v(b.message,b.code,b.relatedInformation)}else if(p){for(let _ of l.warnings)v(_.message,_.code,_.relatedInformation);let b=n.validate(t,l.schema,p,r?.schemaDraft);b&&b.forEach(o)}ML(l.schema)&&(m=void 0),RL(l.schema)&&(f=void 0)}for(let v of n.syntaxErrors){if(v.code===ge.TrailingComma){if(typeof f!="number")continue;v.severity=f}o(v)}if(typeof m=="number"){let v=IL.t("Comments are not permitted in JSON.");n.comments.forEach(b=>{o(Sn.create(b,v,m,ge.CommentNotPermitted))})}return s};if(i){let l=i.id||"schemaservice://untitled/"+qK++;return this.jsonSchemaService.registerExternalSchema({uri:l,schema:i}).getResolvedSchema().then(m=>c(m))}return this.jsonSchemaService.getSchemaForResource(t.uri,n).then(l=>c(l))}getLanguageStatus(t,n){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(t.uri,n)}}},qK=0});function lt(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function jL(e){if(e[0]==="#")switch(e.length){case 4:return{red:lt(e.charCodeAt(1))*17/255,green:lt(e.charCodeAt(2))*17/255,blue:lt(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:lt(e.charCodeAt(1))*17/255,green:lt(e.charCodeAt(2))*17/255,blue:lt(e.charCodeAt(3))*17/255,alpha:lt(e.charCodeAt(4))*17/255};case 7:return{red:(lt(e.charCodeAt(1))*16+lt(e.charCodeAt(2)))/255,green:(lt(e.charCodeAt(3))*16+lt(e.charCodeAt(4)))/255,blue:(lt(e.charCodeAt(5))*16+lt(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(lt(e.charCodeAt(1))*16+lt(e.charCodeAt(2)))/255,green:(lt(e.charCodeAt(3))*16+lt(e.charCodeAt(4)))/255,blue:(lt(e.charCodeAt(5))*16+lt(e.charCodeAt(6)))/255,alpha:(lt(e.charCodeAt(7))*16+lt(e.charCodeAt(8)))/255}}}var BL=Oe(()=>{d()});function Wi(e,t){return fe.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function FL(e){return Pr(e)||VL.t("<empty>")}var VL,Hp,$L=Oe(()=>{d();Ho();zu();BL();VL=Ka(ha());wn();Hp=class{constructor(t){this.schemaService=t}findDocumentSymbols(t,n,r={resultLimit:Number.MAX_VALUE}){let i=n.root;if(!i)return[];let s=r.resultLimit||Number.MAX_VALUE,a=t.uri;if((a==="vscode://defaultsettings/keybindings.json"||Ui(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let p=[];for(let g of i.items)if(g.type==="object"){for(let v of g.properties)if(v.keyNode.value==="key"&&v.valueNode){let b=oi.create(t.uri,Wi(t,g));if(p.push({name:FL(v.valueNode),kind:Tn.Function,location:b}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),p}}return p}let o=[{node:i,containerName:""}],c=0,l=!1,f=[],m=(p,g)=>{p.type==="array"?p.items.forEach(v=>{v&&o.push({node:v,containerName:g})}):p.type==="object"&&p.properties.forEach(v=>{let b=v.valueNode;if(b)if(s>0){s--;let _=oi.create(t.uri,Wi(t,v)),k=g?g+"."+v.keyNode.value:v.keyNode.value;f.push({name:this.getKeyLabel(v),kind:this.getSymbolKind(b.type),location:_,containerName:g}),o.push({node:b,containerName:k})}else l=!0})};for(;c<o.length;){let p=o[c++];m(p.node,p.containerName)}return l&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),f}findDocumentSymbols2(t,n,r={resultLimit:Number.MAX_VALUE}){let i=n.root;if(!i)return[];let s=r.resultLimit||Number.MAX_VALUE,a=t.uri;if((a==="vscode://defaultsettings/keybindings.json"||Ui(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let p=[];for(let g of i.items)if(g.type==="object"){for(let v of g.properties)if(v.keyNode.value==="key"&&v.valueNode){let b=Wi(t,g),_=Wi(t,v.keyNode);if(p.push({name:FL(v.valueNode),kind:Tn.Function,range:b,selectionRange:_}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),p}}return p}let o=[],c=[{node:i,result:o}],l=0,f=!1,m=(p,g)=>{p.type==="array"?p.items.forEach((v,b)=>{if(v)if(s>0){s--;let _=Wi(t,v),k=_,T={name:String(b),kind:this.getSymbolKind(v.type),range:_,selectionRange:k,children:[]};g.push(T),c.push({result:T.children,node:v})}else f=!0}):p.type==="object"&&p.properties.forEach(v=>{let b=v.valueNode;if(b)if(s>0){s--;let _=Wi(t,v),k=Wi(t,v.keyNode),w=[],T={name:this.getKeyLabel(v),kind:this.getSymbolKind(b.type),range:_,selectionRange:k,children:w,detail:this.getDetail(b)};g.push(T),c.push({result:w,node:b})}else f=!0})};for(;l<c.length;){let p=c[l++];m(p.node,p.result)}return f&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),o}getSymbolKind(t){switch(t){case"object":return Tn.Module;case"string":return Tn.String;case"number":return Tn.Number;case"array":return Tn.Array;case"boolean":return Tn.Boolean;default:return Tn.Variable}}getKeyLabel(t){let n=t.keyNode.value;return n&&(n=n.replace(/[\n]/g,"\u21B5")),n&&n.trim()?n:`"${n}"`}getDetail(t){if(t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}}findDocumentColors(t,n,r){return this.schemaService.getSchemaForResource(t.uri,n).then(i=>{let s=[];if(i){let a=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,o=n.getMatchingSchemas(i.schema),c={};for(let l of o)if(!l.inverted&&l.schema&&(l.schema.format==="color"||l.schema.format==="color-hex")&&l.node&&l.node.type==="string"){let f=String(l.node.offset);if(!c[f]){let m=jL(Pr(l.node));if(m){let p=Wi(t,l.node);s.push({color:m,range:p})}if(c[f]=!0,a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(t.uri),s}}}return s})}getColorPresentations(t,n,r,i){let s=[],a=Math.round(r.red*255),o=Math.round(r.green*255),c=Math.round(r.blue*255);function l(m){let p=m.toString(16);return p.length!==2?"0"+p:p}let f;return r.alpha===1?f=`#${l(a)}${l(o)}${l(c)}`:f=`#${l(a)}${l(o)}${l(c)}${l(Math.round(r.alpha*255))}`,s.push({label:f,textEdit:Jt.replace(i,JSON.stringify(f))}),s}}});var UL,HL=Oe(()=>{d();UL={$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 zL,WL=Oe(()=>{d();zL={$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 ye,zp,IK,GL=Oe(()=>{d();HL();WL();ye=Ka(ha()),zp={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":zL,"https://json-schema.org/draft/2019-09/schema":UL}},IK={id:ye.t("A unique identifier for the schema."),$schema:ye.t("The schema to verify this document against."),title:ye.t("A descriptive title of the schema."),description:ye.t("A long description of the schema. Used in hover menus and suggestions."),default:ye.t("A default value. Used by suggestions."),multipleOf:ye.t("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:ye.t("The maximum numerical value, inclusive by default."),exclusiveMaximum:ye.t("Makes the maximum property exclusive."),minimum:ye.t("The minimum numerical value, inclusive by default."),exclusiveMinimum:ye.t("Makes the minimum property exclusive."),maxLength:ye.t("The maximum length of a string."),minLength:ye.t("The minimum length of a string."),pattern:ye.t("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:ye.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:ye.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:ye.t("The maximum number of items that can be inside an array. Inclusive."),minItems:ye.t("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:ye.t("If all of the items in the array must be unique. Defaults to false."),maxProperties:ye.t("The maximum number of properties an object can have. Inclusive."),minProperties:ye.t("The minimum number of properties an object can have. Inclusive."),required:ye.t("An array of strings that lists the names of all properties required on this object."),additionalProperties:ye.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:ye.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:ye.t("A map of property names to schemas for each property."),patternProperties:ye.t("A map of regular expressions on property names to schemas for matching properties."),dependencies:ye.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:ye.t("The set of literal values that are valid."),type:ye.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:ye.t("Describes the format expected for the value. By default, not used for validation"),allOf:ye.t("An array of schemas, all of which must match."),anyOf:ye.t("An array of schemas, where at least one must match."),oneOf:ye.t("An array of schemas, exactly one of which must match."),not:ye.t("A schema which must not match."),$id:ye.t("A unique identifier for the schema."),$ref:ye.t("Reference a definition hosted on any location."),$comment:ye.t("Comments from schema authors to readers or maintainers of the schema."),readOnly:ye.t("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:ye.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:ye.t('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:ye.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:ye.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:ye.t("Describes the media type of a string property."),contentEncoding:ye.t("Describes the content encoding of a string property."),if:ye.t('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:ye.t('The "then" subschema is used for validation when the "if" subschema succeeds.'),else:ye.t('The "else" subschema is used for validation when the "if" subschema fails.')};for(let e in zp.schemas){let t=zp.schemas[e];for(let n in t.properties){let r=t.properties[n];typeof r=="boolean"&&(r=t.properties[n]={});let i=IK[n];i&&(r.description=i)}}});function JL(e,t){if(typeof e!="string")throw new TypeError("Expected a string");let n=String(e),r="",i=t?!!t.extended:!1,s=t?!!t.globstar:!1,a=!1,o=t&&typeof t.flags=="string"?t.flags:"",c;for(let l=0,f=n.length;l<f;l++)switch(c=n[l],c){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+c;break;case"?":if(i){r+=".";break}case"[":case"]":if(i){r+=c;break}case"{":if(i){a=!0,r+="(";break}case"}":if(i){a=!1,r+=")";break}case",":if(a){r+="|";break}r+="\\"+c;break;case"*":let m=n[l-1],p=1;for(;n[l+1]==="*";)p++,l++;let g=n[l+1];s?p>1&&(m==="/"||m===void 0||m==="{"||m===",")&&(g==="/"||g===void 0||g===","||g==="}")?(g==="/"?l++:m==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)":r+=".*";break;default:r+=c}return(!o||!~o.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,o)}var KL=Oe(()=>{d()});function Cr(e,t,n){let r=n?[{location:{uri:n,range:fe.create(0,0,0,0)},message:e}]:void 0;return{message:e,code:t,relatedInformation:r}}function YL(e){try{return $o.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function Zu(e){try{let t=$o.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}var cr,MK,RK,kk,Sk,ma,Wp,Gp,DK,QL=Oe(()=>{d();vr();uk();zu();Ho();wn();cr=Ka(ha());KL();Hu();ak();MK="!",RK="/",kk=class{constructor(t,n,r){this.folderUri=n,this.uris=r,this.globWrappers=[];try{for(let i of t){let s=i[0]!==MK;s||(i=i.substring(1)),i.length>0&&(i[0]===RK&&(i=i.substring(1)),this.globWrappers.push({regexp:JL("**/"+i,{extended:!0,globstar:!0}),include:s}))}n&&(n=YL(n),n.endsWith("/")||(n=n+"/"),this.folderUri=n)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(t){if(this.folderUri&&!t.startsWith(this.folderUri))return!1;let n=!1;for(let{regexp:r,include:i}of this.globWrappers)r.test(t)&&(n=i);return n}getURIs(){return this.uris}},Sk=class{constructor(t,n,r){this.service=t,this.uri=n,this.dependencies=new Set,this.anchors=void 0,r&&(this.unresolvedSchema=this.service.promise.resolve(new ma(r)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(t=>this.service.resolveSchemaContent(t,this))),this.resolvedSchema}clearSchema(){let t=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,t}},ma=class{constructor(t,n=[]){this.schema=t,this.errors=n}};Wp=class{constructor(t,n=[],r=[],i){this.schema=t,this.errors=n,this.warnings=r,this.schemaDraft=i}getSection(t){let n=this.getSectionRecursive(t,this.schema);if(n)return Mt(n)}getSectionRecursive(t,n){if(!n||typeof n=="boolean"||t.length===0)return n;let r=t.shift();if(n.properties&&typeof n.properties[r])return this.getSectionRecursive(t,n.properties[r]);if(n.patternProperties){for(let i of Object.keys(n.patternProperties))if(fa(i)?.test(r))return this.getSectionRecursive(t,n.patternProperties[i])}else{if(typeof n.additionalProperties=="object")return this.getSectionRecursive(t,n.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(n.items)){let i=parseInt(r,10);if(!isNaN(i)&&n.items[i])return this.getSectionRecursive(t,n.items[i])}else if(n.items)return this.getSectionRecursive(t,n.items)}}}},Gp=class{constructor(t,n,r){this.contextService=n,this.requestService=t,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(t){return Object.keys(this.registeredSchemasIds).filter(n=>{let r=$o.parse(n).scheme;return r!=="schemaservice"&&(!t||t(r))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(t){this.cachedSchemaForResource=void 0;let n=!1;t=ui(t);let r=[t],i=Object.keys(this.schemasById).map(s=>this.schemasById[s]);for(;r.length;){let s=r.pop();for(let a=0;a<i.length;a++){let o=i[a];o&&(o.uri===s||o.dependencies.has(s))&&(o.uri!==s&&r.push(o.uri),o.clearSchema()&&(n=!0),i[a]=void 0)}}return n}setSchemaContributions(t){if(t.schemas){let n=t.schemas;for(let r in n){let i=ui(r);this.contributionSchemas[i]=this.addSchemaHandle(i,n[r])}}if(Array.isArray(t.schemaAssociations)){let n=t.schemaAssociations;for(let r of n){let i=r.uris.map(ui),s=this.addFilePatternAssociation(r.pattern,r.folderUri,i);this.contributionAssociations.push(s)}}}addSchemaHandle(t,n){let r=new Sk(this,t,n);return this.schemasById[t]=r,r}getOrAddSchemaHandle(t,n){return this.schemasById[t]||this.addSchemaHandle(t,n)}addFilePatternAssociation(t,n,r){let i=new kk(t,n,r);return this.filePatternAssociations.push(i),i}registerExternalSchema(t){let n=ui(t.uri);return this.registeredSchemasIds[n]=!0,this.cachedSchemaForResource=void 0,t.fileMatch&&t.fileMatch.length&&this.addFilePatternAssociation(t.fileMatch,t.folderUri,[n]),t.schema?this.addSchemaHandle(n,t.schema):this.getOrAddSchemaHandle(n)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(let t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(let t of this.contributionAssociations)this.filePatternAssociations.push(t)}getResolvedSchema(t){let n=ui(t),r=this.schemasById[n];return r?r.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(t){if(!this.requestService){let n=cr.t("Unable to load schema from '{0}'. No schema request service available",Zu(t));return this.promise.resolve(new ma({},[Cr(n,ge.SchemaResolveError,t)]))}return this.requestService(t).then(n=>{if(!n){let a=cr.t("Unable to load schema from '{0}': No content.",Zu(t));return new ma({},[Cr(a,ge.SchemaResolveError,t)])}let r=[];n.charCodeAt(0)===65279&&(r.push(Cr(cr.t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",Zu(t)),ge.SchemaResolveError,t)),n=n.trimStart());let i={},s=[];return i=l_(n,s),s.length&&r.push(Cr(cr.t("Unable to parse content from '{0}': Parse error at offset {1}.",Zu(t),s[0].offset),ge.SchemaResolveError,t)),new ma(i,r)},n=>{let{message:r,code:i}=n;if(typeof r!="string"){let o=n.toString(),c=n.toString().split("Error: ");c.length>1&&(o=c[1]),Ui(o,".")&&(o=o.substr(0,o.length-1)),r=o}let s=ge.SchemaResolveError;typeof i=="number"&&i<65536&&(s+=i);let a=cr.t("Unable to load schema from '{0}': {1}.",Zu(t),r);return new ma({},[Cr(a,s,t)])})}resolveSchemaContent(t,n){let r=t.errors.slice(0),i=t.schema,s=i.$schema?yk(i.$schema):void 0;if(s===Xt.v3)return this.promise.resolve(new Wp({},[Cr(cr.t("Draft-03 schemas are not supported."),ge.SchemaUnsupportedFeature)],[],s));let a=new Set,o=this.contextService,c=(b,_)=>{_=decodeURIComponent(_);let k=b;return _[0]==="/"&&(_=_.substring(1)),_.split("/").some(w=>(w=w.replace(/~1/g,"/").replace(/~0/g,"~"),k=k[w],!k)),k},l=(b,_,k)=>(_.anchors||(_.anchors=v(b)),_.anchors.get(k)),f=(b,_)=>{for(let k in _)_.hasOwnProperty(k)&&k!=="id"&&k!=="$id"&&(b[k]=_[k])},m=(b,_,k,w)=>{let T;if(w===void 0||w.length===0?T=_:w.charAt(0)==="/"?T=c(_,w):T=l(_,k,w),T)f(b,T);else{let y=cr.t("$ref '{0}' in '{1}' can not be resolved.",w||"",k.uri);r.push(Cr(y,ge.SchemaResolveError))}},p=(b,_,k,w)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/.*/.test(_)&&(_=o.resolveRelativePath(_,w.uri)),_=ui(_);let T=this.getOrAddSchemaHandle(_);return T.getUnresolvedSchema().then(y=>{if(w.dependencies.add(_),y.errors.length){let A=y.errors[0],N=k?_+"#"+k:_,O=k?cr.t("Problems loading reference '{0}': {1}",k,A.message):A.message;r.push(Cr(O,A.code,_))}return m(b,y.schema,T,k),g(b,y.schema,T)})},g=(b,_,k)=>{let w=[];return this.traverseNodes(b,T=>{let y=new Set;for(;T.$ref;){let A=T.$ref,N=A.split("#",2);if(delete T.$ref,N[0].length>0){w.push(p(T,N[0],N[1],k));return}else if(!y.has(A)){let O=N[1];m(T,_,k,O),y.add(A)}}T.$recursiveRef&&a.add("$recursiveRef"),T.$dynamicRef&&a.add("$dynamicRef")}),this.promise.all(w)},v=b=>{let _=new Map;return this.traverseNodes(b,k=>{let w=k.$id||k.id,T=mp(w)&&w.charAt(0)==="#"?w.substring(1):k.$anchor;T&&(_.has(T)?r.push(Cr(cr.t("Duplicate anchor declaration: '{0}'",T),ge.SchemaResolveError)):_.set(T,k)),k.$recursiveAnchor&&a.add("$recursiveAnchor"),k.$dynamicAnchor&&a.add("$dynamicAnchor")}),_};return g(i,i,n).then(b=>{let _=[];return a.size&&_.push(Cr(cr.t("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(a.keys()).join(", ")),ge.SchemaUnsupportedFeature)),new Wp(i,r,_,s)})}traverseNodes(t,n){if(!t||typeof t!="object")return Promise.resolve(null);let r=new Set,i=(...f)=>{for(let m of f)Or(m)&&c.push(m)},s=(...f)=>{for(let m of f)if(Or(m))for(let p in m){let v=m[p];Or(v)&&c.push(v)}},a=(...f)=>{for(let m of f)if(Array.isArray(m))for(let p of m)Or(p)&&c.push(p)},o=f=>{if(Array.isArray(f))for(let m of f)Or(m)&&c.push(m);else Or(f)&&c.push(f)},c=[t],l=c.pop();for(;l;)r.has(l)||(r.add(l),n(l),i(l.additionalItems,l.additionalProperties,l.not,l.contains,l.propertyNames,l.if,l.then,l.else,l.unevaluatedItems,l.unevaluatedProperties),s(l.definitions,l.$defs,l.properties,l.patternProperties,l.dependencies,l.dependentSchemas),a(l.anyOf,l.allOf,l.oneOf,l.prefixItems),o(l.items)),l=c.pop()}getSchemaFromProperty(t,n){if(n.root?.type==="object"){for(let r of n.root.properties)if(r.keyNode.value==="$schema"&&r.valueNode?.type==="string"){let i=r.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(i)&&(i=this.contextService.resolveRelativePath(i,t)),i}}}getAssociatedSchemas(t){let n=Object.create(null),r=[],i=YL(t);for(let s of this.filePatternAssociations)if(s.matchesPattern(i))for(let a of s.getURIs())n[a]||(r.push(a),n[a]=!0);return r}getSchemaURIsForResource(t,n){let r=n&&this.getSchemaFromProperty(t,n);return r?[r]:this.getAssociatedSchemas(t)}getSchemaForResource(t,n){if(n){let s=this.getSchemaFromProperty(t,n);if(s){let a=ui(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;let r=this.getAssociatedSchemas(t),i=r.length>0?this.createCombinedSchema(t,r).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:i},i}createCombinedSchema(t,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);{let r="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:n.map(s=>({$ref:s}))};return this.addSchemaHandle(r,i)}}getMatchingSchemas(t,n,r){if(r){let i=r.id||"schemaservice://untitled/matchingSchemas/"+DK++;return this.addSchemaHandle(i,r).getResolvedSchema().then(a=>n.getMatchingSchemas(a.schema).filter(o=>!o.inverted))}return this.getSchemaForResource(t.uri,n).then(i=>i?n.getMatchingSchemas(i.schema).filter(s=>!s.inverted):[])}},DK=0});function XL(e,t){let n=[],r=[],i=[],s=-1,a=mn(e.getText(),!1),o=a.scan();function c(v){n.push(v),r.push(i.length)}for(;o!==17;){switch(o){case 1:case 3:{let v=e.positionAt(a.getTokenOffset()).line,b={startLine:v,endLine:v,kind:o===1?"object":"array"};i.push(b);break}case 2:case 4:{let v=o===2?"object":"array";if(i.length>0&&i[i.length-1].kind===v){let b=i.pop(),_=e.positionAt(a.getTokenOffset()).line;b&&_>b.startLine+1&&s!==b.startLine&&(b.endLine=_-1,c(b),s=b.startLine)}break}case 13:{let v=e.positionAt(a.getTokenOffset()).line,b=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&v+1<e.lineCount?a.setPosition(e.offsetAt(Ve.create(v+1,0))):v<b&&(c({startLine:v,endLine:b,kind:Hi.Comment}),s=v);break}case 12:{let b=e.getText().substr(a.getTokenOffset(),a.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(b){let _=e.positionAt(a.getTokenOffset()).line;if(b[1]){let k={startLine:_,endLine:_,kind:Hi.Region};i.push(k)}else{let k=i.length-1;for(;k>=0&&i[k].kind!==Hi.Region;)k--;if(k>=0){let w=i[k];i.length=k,_>w.startLine&&s!==w.startLine&&(w.endLine=_,c(w),s=w.startLine)}}}break}}o=a.scan()}let l=t&&t.rangeLimit;if(typeof l!="number"||n.length<=l)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);let f=[];for(let v of r)v<30&&(f[v]=(f[v]||0)+1);let m=0,p=0;for(let v=0;v<f.length;v++){let b=f[v];if(b){if(b+m>l){p=v;break}m+=b}}let g=[];for(let v=0;v<n.length;v++){let b=r[v];typeof b=="number"&&(b<p||b===p&&m++<l)&&g.push(n[v])}return g}var ZL=Oe(()=>{d();vr();wn()});function eq(e,t,n){function r(o){let c=e.offsetAt(o),l=n.getNodeFromOffset(c,!0),f=[];for(;l;){switch(l.type){case"string":case"object":case"array":let p=l.offset+1,g=l.offset+l.length-1;p<g&&c>=p&&c<=g&&f.push(i(p,g)),f.push(i(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":f.push(i(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){let p=a(l.offset+l.length,5);p!==-1&&f.push(i(l.offset,p))}l=l.parent}let m;for(let p=f.length-1;p>=0;p--)m=pa.create(f[p],m);return m||(m=pa.create(fe.create(o,o))),m}function i(o,c){return fe.create(e.positionAt(o),e.positionAt(c))}let s=mn(e.getText(),!0);function a(o,c){return s.setPosition(o),s.scan()===c?s.getTokenOffset()+s.getTokenLength():-1}return t.map(r)}var tq=Oe(()=>{d();wn();vr()});function el(e,t,n){let r;if(n){let s=e.offsetAt(n.start),a=e.offsetAt(n.end)-s;r={offset:s,length:a}}let i={tabSize:t?t.tabSize:4,insertSpaces:t?.insertSpaces===!0,insertFinalNewline:t?.insertFinalNewline===!0,eol:`
|
|
83
|
+
`,keepLines:t?.keepLines===!0};return h_(e.getText(),r,i).map(s=>Jt.replace(fe.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),s.content))}var Tk=Oe(()=>{d();vr();wn()});function jK(e,t){let n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function BK(e,t,n){let r=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(r<i)return 0;if(r>s)return e.length;let a=0,o=e.length-1;for(;a<=o;){let c=o+a>>1,l=n(t,e[c]);if(l>0)a=c+1;else if(l<0)o=c-1;else return c}return-a-1}var ft,ga,nq=Oe(()=>{d();(function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"})(ft||(ft={}));ga=class{constructor(t,n){this.propertyName=t??"",this.beginningLineNumber=n,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(t){if(t.parent=this,this.childrenProperties.length>0){let n=0;t.noKeyName?n=this.childrenProperties.length:n=BK(this.childrenProperties,t,jK),n<0&&(n=n*-1-1),this.childrenProperties.splice(n,0,t)}else this.childrenProperties.push(t);return t}}});function iq(e,t){let n={...t,keepLines:!1},r=an.applyEdits(e,el(e,n,void 0)),i=an.create("test://test.json","json",0,r),s=FK(i),a=VK(i,s),o=el(a,n,void 0),c=an.applyEdits(a,o);return[Jt.replace(fe.create(Ve.create(0,0),e.positionAt(e.getText().length)),c)]}function FK(e){let t=e.getText(),n=mn(t,!1),r=new ga,i=r,s=r,a=r,o,c=0,l=0,f,m,p=-1,g=-1,v=0,b=0,_=[],k=!1,w=!1;for(;(o=n.scan())!==17;){if(k===!0&&o!==14&&o!==15&&o!==12&&o!==13&&s.endLineNumber===void 0){let T=n.getTokenStartLine();m===2||m===4?a.endLineNumber=T-1:s.endLineNumber=T-1,v=T,k=!1}if(w===!0&&o!==14&&o!==15&&o!==12&&o!==13&&(v=n.getTokenStartLine(),w=!1),n.getTokenStartLine()!==c){for(let T=c;T<n.getTokenStartLine();T++){let y=e.getText(fe.create(Ve.create(T,0),Ve.create(T+1,0))).length;l=l+y}c=n.getTokenStartLine()}switch(o){case 10:{if(f===void 0||f===1||f===5&&_[_.length-1]===ft.Object){let T=new ga(n.getTokenValue(),v);a=s,s=i.addChildProperty(T)}break}case 3:{if(r.beginningLineNumber===void 0&&(r.beginningLineNumber=n.getTokenStartLine()),_[_.length-1]===ft.Object)i=s;else if(_[_.length-1]===ft.Array){let T=new ga(n.getTokenValue(),v);T.noKeyName=!0,a=s,s=i.addChildProperty(T),i=s}_.push(ft.Array),s.type=ft.Array,v=n.getTokenStartLine(),v++;break}case 1:{if(r.beginningLineNumber===void 0)r.beginningLineNumber=n.getTokenStartLine();else if(_[_.length-1]===ft.Array){let T=new ga(n.getTokenValue(),v);T.noKeyName=!0,a=s,s=i.addChildProperty(T)}s.type=ft.Object,_.push(ft.Object),i=s,v=n.getTokenStartLine(),v++;break}case 4:{b=n.getTokenStartLine(),_.pop(),s.endLineNumber===void 0&&(f===2||f===4)&&(s.endLineNumber=b-1,s.lastProperty=!0,s.lineWhereToAddComma=p,s.indexWhereToAddComa=g,a=s,s=s?s.parent:void 0,i=s),r.endLineNumber=b,v=b+1;break}case 2:{b=n.getTokenStartLine(),_.pop(),f!==1&&(s.endLineNumber===void 0&&(s.endLineNumber=b-1,s.lastProperty=!0,s.lineWhereToAddComma=p,s.indexWhereToAddComa=g),a=s,s=s?s.parent:void 0,i=s),r.endLineNumber=n.getTokenStartLine(),v=b+1;break}case 5:{b=n.getTokenStartLine(),s.endLineNumber===void 0&&(_[_.length-1]===ft.Object||_[_.length-1]===ft.Array&&(f===2||f===4))&&(s.endLineNumber=b,s.commaIndex=n.getTokenOffset()-l,s.commaLine=b),(f===2||f===4)&&(a=s,s=s?s.parent:void 0,i=s),v=b+1;break}case 13:{f===5&&p===n.getTokenStartLine()&&(_[_.length-1]===ft.Array&&(m===2||m===4)||_[_.length-1]===ft.Object)&&(_[_.length-1]===ft.Array&&(m===2||m===4)||_[_.length-1]===ft.Object)&&(s.endLineNumber=void 0,k=!0),(f===1||f===3)&&p===n.getTokenStartLine()&&(w=!0);break}}o!==14&&o!==13&&o!==12&&o!==15&&(m=f,f=o,p=n.getTokenStartLine(),g=n.getTokenOffset()+n.getTokenLength()-l)}return r}function VK(e,t){if(t.childrenProperties.length===0)return e;let n=an.create("test://test.json","json",0,e.getText()),r=[];for(rq(r,t,t.beginningLineNumber);r.length>0;){let i=r.shift(),s=i.propertyTreeArray,a=i.beginningLineNumber;for(let o=0;o<s.length;o++){let c=s[o],l=fe.create(Ve.create(c.beginningLineNumber,0),Ve.create(c.endLineNumber+1,0)),f=e.getText(l),m=an.create("test://test.json","json",0,f);if(c.lastProperty===!0&&o!==s.length-1){let v=c.lineWhereToAddComma-c.beginningLineNumber,b=c.indexWhereToAddComa,_={range:fe.create(Ve.create(v,b),Ve.create(v,b)),text:","};an.update(m,[_],1)}else if(c.lastProperty===!1&&o===s.length-1){let v=c.commaIndex,_=c.commaLine-c.beginningLineNumber,k={range:fe.create(Ve.create(_,v),Ve.create(_,v+1)),text:""};an.update(m,[k],1)}let p=c.endLineNumber-c.beginningLineNumber+1,g={range:fe.create(Ve.create(a,0),Ve.create(a+p,0)),text:m.getText()};an.update(n,[g],1),rq(r,c,a),a=a+p}}return n}function $K(e){e.sort((t,n)=>t.propertyName.localeCompare(n.propertyName))}function rq(e,t,n){if(t.childrenProperties.length!==0)if(t.type===ft.Object){let r=1/0;for(let s of t.childrenProperties)s.beginningLineNumber<r&&(r=s.beginningLineNumber);let i=r-t.beginningLineNumber;n=n+i,$K(t.childrenProperties),e.push(new Jp(n,t.childrenProperties))}else t.type===ft.Array&&sq(e,t,n)}function sq(e,t,n){for(let r of t.childrenProperties){if(r.type===ft.Object){let i=1/0;for(let a of r.childrenProperties)a.beginningLineNumber<i&&(i=a.beginningLineNumber);let s=i-r.beginningLineNumber;e.push(new Jp(n+r.beginningLineNumber-t.beginningLineNumber+s,r.childrenProperties))}r.type===ft.Array&&sq(e,r,n+r.beginningLineNumber-t.beginningLineNumber)}}var Jp,aq=Oe(()=>{d();vr();wn();Tk();nq();Jp=class{constructor(t,n){this.beginningLineNumber=t,this.propertyTreeArray=n}}});function oq(e,t){let n=[];return t.visit(r=>{if(r.type==="property"&&r.keyNode.value==="$ref"&&r.valueNode?.type==="string"){let i=r.valueNode.value,s=HK(t,i);if(s){let a=e.positionAt(s.offset);n.push({target:`${e.uri}#${a.line+1},${a.character+1}`,range:UK(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function UK(e,t){return fe.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function HK(e,t){let n=zK(t);return n?wk(n,e.root):null}function wk(e,t){if(!t)return null;if(e.length===0)return t;let n=e.shift();if(t&&t.type==="object"){let r=t.properties.find(i=>i.keyNode.value===n);return r?wk(e,r.valueNode):null}else if(t&&t.type==="array"&&n.match(/^(0|[1-9][0-9]*)$/)){let r=Number.parseInt(n),i=t.items[r];return i?wk(e,i):null}return null}function zK(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(WK)}function WK(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var cq=Oe(()=>{d();wn()});var uq={};$y(uq,{ClientCapabilities:()=>ck,CodeAction:()=>Lp,CodeActionContext:()=>Cp,CodeActionKind:()=>Np,Color:()=>Wu,ColorInformation:()=>_p,ColorPresentation:()=>vp,Command:()=>zi,CompletionItem:()=>Fo,CompletionItemKind:()=>It,CompletionItemTag:()=>Sp,CompletionList:()=>Tp,Diagnostic:()=>Sn,DiagnosticSeverity:()=>qt,DocumentHighlight:()=>Ep,DocumentHighlightKind:()=>xp,DocumentLink:()=>qp,DocumentSymbol:()=>Op,DocumentUri:()=>gp,ErrorCode:()=>ge,FoldingRange:()=>bp,FoldingRangeKind:()=>Hi,Hover:()=>wp,InsertTextFormat:()=>nt,Location:()=>oi,MarkedString:()=>Vo,MarkupContent:()=>da,MarkupKind:()=>Nr,Position:()=>Ve,Range:()=>fe,SchemaDraft:()=>Xt,SelectionRange:()=>pa,SymbolInformation:()=>Ap,SymbolKind:()=>Tn,TextDocument:()=>an,TextDocumentEdit:()=>Gu,TextEdit:()=>Jt,VersionedTextDocumentIdentifier:()=>kp,WorkspaceEdit:()=>Ju,getLanguageService:()=>GK,isSchemaResolveError:()=>hK});function GK(e){let t=e.promiseConstructor||Promise,n=new Gp(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(zp);let r=new Fp(n,e.contributions,t,e.clientCapabilities),i=new Vp(n,e.contributions,t),s=new Hp(n),a=new Up(n,t);return{configure:o=>{n.clearExternalSchemas(),o.schemas?.forEach(n.registerExternalSchema.bind(n)),a.configure(o)},resetSchema:o=>n.onResourceChange(o),doValidation:a.doValidation.bind(a),getLanguageStatus:a.getLanguageStatus.bind(a),parseJSONDocument:o=>PL(o,{collectComments:!0}),newJSONDocument:(o,c,l)=>NL(o,c,l),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),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:XL,getSelectionRanges:eq,findDefinition:()=>Promise.resolve([]),findLinks:oq,format:(o,c,l)=>el(o,l,c),sort:(o,c)=>iq(o,c)}}var lq=Oe(()=>{d();LL();qL();DL();$L();Ho();GL();QL();ZL();tq();aq();Tk();cq();wn()});var Ak=x(tl=>{"use strict";d();Object.defineProperty(tl,"__esModule",{value:!0});tl.JSONValidator=void 0;tl.isValid=fq;var xk=(lq(),Uy(uq)),JK=Ce(),Ek=class e{service;schemas;static async create(t,n){if(t)return new e(await t.schemas(n.context))}constructor(t){this.schemas=(0,JK.indexBy)(n=>n.uri,t),this.service=(0,xk.getLanguageService)({schemaRequestService:this.getSchemaForURI.bind(this),workspaceContext:{resolveRelativePath:(n,r)=>new URL(n,r).toString()}}),this.service.configure({schemas:t.map(n=>({uri:n.uri,fileMatch:n.fileMatch}))})}validate=async(t,n)=>{let r=xk.TextDocument.create(t,"json",0,n);return(await this.getOffsetDiagnostics(r)).map(s=>({message:s.message,startIndex:r.offsetAt(s.range.start),endIndex:r.offsetAt(s.range.end)}))};isValid=async(t,n)=>fq(this.service,t,n);async getOffsetDiagnostics(t){let n=this.service.parseJSONDocument(t);return this.service.doValidation(t,n,{schemaValidation:"error",trailingCommas:"ignore",comments:"ignore"})}async getSchemaForURI(t){let n=this.schemas[t]?.schema;return n||`No schema for '${t}' found`}};tl.JSONValidator=Ek;async function fq(e,t,n){let r=xk.TextDocument.create(t,"json",0,n),i=e.parseJSONDocument(r);return(await e.doValidation(r,i,{schemaValidation:"error",trailingCommas:"ignore",comments:"ignore"})).every(a=>a.severity!==1)}});var Ok=x(Kp=>{"use strict";d();Object.defineProperty(Kp,"__esModule",{value:!0});Kp.FileType=void 0;var dq;(function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"})(dq||(Kp.FileType=dq={}))});var Yp=x(Ye=>{"use strict";d();Object.defineProperty(Ye,"__esModule",{value:!0});Ye.makeGetMetafieldDefinitions=Ye.FETCHED_METAFIELD_CATEGORIES=Ye.makeGetDefaultSchemaTranslations=Ye.makeGetDefaultTranslations=Ye.makeGetDefaultSchemaLocale=Ye.makeGetDefaultLocale=Ye.makeGetDefaultSchemaLocaleFileUri=Ye.makeGetDefaultLocaleFileUri=Ye.makeFileSize=Ye.makeFileExists=void 0;Ye.recursiveReadDirectory=kq;Ye.isDirectory=Nk;var pq=ju(),hq=Ok(),Pk=Ge(),mq=xr(),KK=K(),gq=Ce(),YK=e=>async function(n){try{return await e.stat(n),!0}catch{return!1}};Ye.makeFileExists=YK;var QK=e=>async function(n){try{return(await e.stat(n)).size}catch{return 0}};Ye.makeFileSize=QK;Ye.makeGetDefaultLocaleFileUri=yq("default.json");Ye.makeGetDefaultSchemaLocaleFileUri=yq(".default.schema.json");function yq(e=".default.json"){return function(n){return r=>Ck(n,r,e)}}Ye.makeGetDefaultLocale=_q(".default.json");Ye.makeGetDefaultSchemaLocale=_q(".default.schema.json");function _q(e=".default.json"){return function(n,r){return bq(()=>XK(n,r,e))}}Ye.makeGetDefaultTranslations=vq(".default.json");Ye.makeGetDefaultSchemaTranslations=vq(".default.schema.json");function vq(e=".default.json"){return function(n,r,i){return bq(()=>ZK(n,r,i,e))}}async function Ck(e,t,n=".default.json"){return(await e.readDirectory((0,mq.join)(t,"locales"))).find(([i])=>i.endsWith(n))?.[0]}async function XK(e,t,n){try{let r=await Ck(e,t,n);return r?pq.Utils.basename(pq.URI.parse(r)).split(".")[0]:"en"}catch(r){return console.error(r),"en"}}async function ZK(e,t,n,r){try{let i=eY(t,r);if(i)return i;let s=await Ck(e,n,r);if(!s)return{};let a=await e.readFile(s);return(0,Pk.parseJSON)(a,{})}catch(i){return console.error(i),{}}}function eY(e,t){let n=e.find(i=>i.type===KK.SourceCodeType.JSON&&i.uri.match(/locales/)&&i.uri.endsWith(t));if(!n)return;let r=(0,Pk.parseJSON)(n.source);if(!(0,gq.isError)(r))return r}function bq(e){let t;return async(...n)=>(t||(t=e(...n)),t)}async function kq(e,t,n){let i=(await e.readDirectory(t)).filter(a=>!nY(a)&&(Nk(a)||n(a)));return(await Promise.all(i.map(a=>Nk(a)?kq(e,a[0],n):Promise.resolve([a[0]])))).flat()}function Nk([e,t]){return t===hq.FileType.Directory}var tY=[".git","node_modules","dist","build","tmp","vendor"];function nY([e,t]){return t===hq.FileType.Directory&&tY.some(n=>e.endsWith(n))}Ye.FETCHED_METAFIELD_CATEGORIES=["article","blog","collection","company","company_location","location","market","order","page","product","variant","shop"];var rY=e=>async function(t){let n={article:[],blog:[],collection:[],company:[],company_location:[],location:[],market:[],order:[],page:[],product:[],variant:[],shop:[]};try{let r=await e.readFile((0,mq.join)(t,".shopify","metafields.json")),i=(0,Pk.parseJSON)(r);return(0,gq.isError)(i)?n:Ye.FETCHED_METAFIELD_CATEGORIES.reduce((s,a)=>{try{s[a]=i[a].map(o=>({key:o.key,name:o.name,namespace:o.namespace,description:o.description,type:{category:o.type.category,name:o.type.name}}))}catch{}return s},n)}catch{return n}};Ye.makeGetMetafieldDefinitions=rY});var xq=x(Qp=>{"use strict";d();Object.defineProperty(Qp,"__esModule",{value:!0});Qp.createDisabledChecksModule=aY;Qp.findNextLinePosition=wq;var Tq=K(),iY=ii(),sY=Ce();function aY(){let e="@all",n=new Map;function r(a,o,c){let[l,f,m]=o.trim().match(/^(?:theme\-check\-(disable-next-line|disable|enable)) ?(.*)/)||[];(m?m.split(/,[ ]*/):[e]).forEach(g=>{let v=n.get(a.uri);if(f==="disable-next-line"&&!(0,sY.isError)(a.ast)){let b=wq(a.ast,c);b&&(v.has(g)||v.set(g,[]),v.get(g).push({from:b.start,to:b.end}))}if(f==="disable"&&(v.has(g)||v.set(g,[]),v.get(g).push({from:c.position.end})),f==="enable"){let b=v.get(g);if(b)b[b.length-1].to=c.position.start;else if(g===e)for(let _ of v.values())for(let k of _)k.to||(k.to=c.position.start)}})}let i={meta:{schema:{}},create:({file:a})=>({async onCodePathStart(){n.set(a.uri,new Map)},async LiquidRawTag(o){o.name==="comment"&&r(a,o.body.value,o)},async LiquidTag(o){typeof o.markup!="string"||o.name!=="#"||r(a,o.markup,o)}})};function s(a){return[e,a.check].flatMap(c=>n.has(a.uri)?n.get(a.uri).has(c)?n.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 wq(e,t){let[n,r]=(0,iY.findCurrentNode)(e,t.position.end),i=r.at(-1),s=r.at(-2),a=Sq(i,n);if(!(!a&&(i&&(a=Sq(s,i)),!a)))return"blockStartPosition"in a?a.type===Tq.LiquidHtmlNodeTypes.LiquidRawTag&&a.name==="doc"?a.position:a.blockStartPosition:a.position}function Sq(e,t){if(!e)return;let n=[];e.type===Tq.LiquidHtmlNodeTypes.LiquidTag&&Array.isArray(e.markup)?n=e.markup:"children"in e&&(n=e.children||[]);let r=n.findIndex(s=>s===t);return r===-1?void 0:n.at(r+1)}});var qk=x(Lk=>{"use strict";d();Object.defineProperty(Lk,"__esModule",{value:!0});Lk.isIgnored=cY;var oY=hx();function cY(e,t,n){return[...uY(n,t),...Eq(t.ignore)].map(i=>i.replace(/^\//,t.rootUri+"/").replace(/^([^\/])/,"**/$1").replace(/\/\*$/,"/**")).some(i=>(0,oY.minimatch)(e,i))}function uY(e,t){return e?Eq(t.settings[e.meta.code]?.ignore):[]}function Eq(e){return e??[]}});var Oq=x(Ik=>{"use strict";d();Object.defineProperty(Ik,"__esModule",{value:!0});Ik.visitLiquid=fY;var lY=ue();function Aq(e){return!!e&&typeof e=="object"&&"type"in e}function fY(e,t){let n=[{node:e,ancestors:[]}];for(;n.length>0;){let{node:r,ancestors:i}=n.pop(),s=i.concat(r);t(r.type,r,i);for(let a in r){if(!r.hasOwnProperty(a)||lY.nonTraversableProperties.has(a))continue;let o=r[a];if(Array.isArray(o))for(let c=o.length-1;c>=0;c--){let l=o[c];Aq(l)&&n.push({node:l,ancestors:s})}else Aq(o)&&n.push({node:o,ancestors:s})}t(`${r.type}:exit`,r,i)}}});var Pq=x(Mk=>{"use strict";d();Object.defineProperty(Mk,"__esModule",{value:!0});Mk.visitJSON=pY;function Nq(e){return!!e&&typeof e=="object"&&"type"in e}var dY=new Set(["loc"]);async function pY(e,t){let n=[{node:e,ancestors:[]}],r;for(;n.length>0;){let{node:i,ancestors:s}=n.pop(),a=s.concat(i);r=t[i.type],r&&await r(i,s);for(let o in i){if(!i.hasOwnProperty(o)||dY.has(o))continue;let c=i[o];if(Array.isArray(c))for(let l=c.length-1;l>=0;l--){let f=c[l];Nq(f)&&n.push({node:f,ancestors:a})}else Nq(c)&&n.push({node:c,ancestors:a})}r=t[`${i.type}:exit`],r&&await r(i,s)}}});var Cq=x(zo=>{"use strict";d();Object.defineProperty(zo,"__esModule",{value:!0});zo.visitJSON=zo.visitLiquid=void 0;var hY=Oq();Object.defineProperty(zo,"visitLiquid",{enumerable:!0,get:function(){return hY.visitLiquid}});var mY=Pq();Object.defineProperty(zo,"visitJSON",{enumerable:!0,get:function(){return mY.visitJSON}})});var Lq=x(Wo=>{"use strict";d();Object.defineProperty(Wo,"__esModule",{value:!0});Wo.AppBlockValidTags=Wo.ForbiddenTag=void 0;var Rk=K(),Dk;(function(e){e.JavaScript="javascript",e.StyleSheet="stylesheet",e.Include="include",e.Layout="layout",e.Section="section",e.Sections="sections"})(Dk||(Wo.ForbiddenTag=Dk={}));var gY=e=>Object.values(Dk).includes(e),yY=e=>`Theme app extension blocks cannot contain '${e}' tags`;Wo.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:Rk.SourceCodeType.LiquidHtml,severity:Rk.Severity.ERROR,schema:{},targets:[Rk.ConfigTarget.ThemeAppExtension]},create(e){let t=async n=>{if(gY(n.name)){let r=n.blockEndPosition?n.blockEndPosition.end:n.position.end,i=n.blockStartPosition.start,s=yY(n.name);return e.report({message:s,startIndex:i,endIndex:r})}};return{LiquidRawTag:t,LiquidTag:t}}}});var Mq=x(Xp=>{"use strict";d();Object.defineProperty(Xp,"__esModule",{value:!0});Xp.AssetPreload=void 0;var Iq=ue(),qq=K(),li=Fe();function _Y(e){return(0,li.isAttr)(e,"rel")&&e.value.some(t=>t.type===Iq.NodeTypes.TextNode&&t.value==="preload")}function vY(e){return e.some(t=>(0,li.isAttr)(t,"as")&&(0,li.hasAttributeValueOf)(t,"image"))&&e.some(t=>(0,li.isAttr)(t,"fetchpriority")&&(0,li.hasAttributeValueOf)(t,"high"))}Xp.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:qq.SourceCodeType.LiquidHtml,severity:qq.Severity.WARNING,schema:{},targets:[]},create(e){return{async HtmlVoidElement(t){let n=t.attributes.find(r=>(0,li.isValuedHtmlAttribute)(r)&&_Y(r));if(t.name==="link"&&n){let r=t.attributes.filter(li.isValuedHtmlAttribute);if(vY(r))return;let s=r.find(o=>(0,li.isAttr)(o,"as"))?.value.find(o=>(0,li.isNodeOfType)(Iq.NodeTypes.TextNode,o))?.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",e.report({message:a,startIndex:t.position.start,endIndex:t.position.end})}}}}}});var Dq=x(eh=>{"use strict";d();Object.defineProperty(eh,"__esModule",{value:!0});eh.AssetSizeAppBlockCSS=void 0;var bY=Ge(),Zp=K(),kY=Ce(),Rq=In(),SY={thresholdInBytes:Zp.SchemaProp.number(1e5)};eh.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:Zp.SourceCodeType.LiquidHtml,severity:Zp.Severity.ERROR,schema:SY,targets:[Zp.ConfigTarget.ThemeAppExtension]},create(e){return e.fileSize?{async LiquidRawTag(t){if(t.name!=="schema")return;let n=(0,bY.parseJSON)(t.body.value);if((0,kY.isError)(n))return;let r=n.stylesheet;if(!r)return;let i=`assets/${r}`,s=e.settings.thresholdInBytes,a=t.body.position.start+t.body.value.indexOf(r),o=a+r.length;if(!await(0,Rq.doesFileExist)(e,i)){e.report({message:`'${r}' does not exist.`,startIndex:a,endIndex:o});return}let[l,f]=await(0,Rq.doesFileExceedThreshold)(e,i,s);l&&e.report({message:`The file size for '${r}' (${f} B) exceeds the configured threshold (${s} B)`,startIndex:a,endIndex:o})}}:{}}}});var Bq=x(nh=>{"use strict";d();Object.defineProperty(nh,"__esModule",{value:!0});nh.AssetSizeAppBlockJavaScript=void 0;var TY=Ge(),th=K(),wY=Ce(),jq=In(),xY={thresholdInBytes:th.SchemaProp.number(1e4)};nh.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:th.SourceCodeType.LiquidHtml,severity:th.Severity.ERROR,schema:xY,targets:[th.ConfigTarget.ThemeAppExtension]},create(e){return e.fileSize?{async LiquidRawTag(t){if(t.name!=="schema")return;let n=(0,TY.parseJSON)(t.body.value);if((0,wY.isError)(n))return;let r=n.javascript;if(!r)return;let i=`assets/${r}`,s=e.settings.thresholdInBytes,a=t.body.position.start+t.body.value.indexOf(r),o=a+r.length;if(!await(0,jq.doesFileExist)(e,i)){e.report({message:`'${r}' does not exist.`,startIndex:a,endIndex:o});return}let[l,f]=await(0,jq.doesFileExceedThreshold)(e,i,s);l&&e.report({message:`The file size for '${r}' (${f} B) exceeds the configured threshold (${s} B)`,startIndex:a,endIndex:o})}}:{}}}});var Vq=x(rh=>{"use strict";d();Object.defineProperty(rh,"__esModule",{value:!0});rh.AssetSizeCSS=void 0;var Jo=ue(),jk=K(),EY=Ce(),Fq=In(),Go=Fe(),AY={thresholdInBytes:jk.SchemaProp.number(1e5)};function OY(e){return e.type===Jo.NodeTypes.TextNode}function NY(e){return e.type===Jo.NodeTypes.LiquidVariableOutput}function PY(e){return typeof e!="string"&&e.type===Jo.NodeTypes.LiquidVariable}function CY(e){return e.type===Jo.NodeTypes.String}rh.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:jk.SourceCodeType.LiquidHtml,severity:jk.Severity.ERROR,schema:AY,targets:[]},create(e){if(!e.fileSize)return{};let t=e.settings.thresholdInBytes;async function n(i,s){await(0,Fq.hasRemoteAssetSizeExceededThreshold)(e,i,t)&&e.report({message:`The CSS file size exceeds the threshold of ${t} bytes`,startIndex:s.start,endIndex:s.end})}async function r(i,s){await(0,Fq.hasLocalAssetSizeExceededThreshold)(e,`assets/${i}`,t)&&e.report({message:`The CSS file size exceeds the threshold of ${t} bytes`,startIndex:s.start,endIndex:s.end})}return{async HtmlVoidElement(i){if(i.name!=="link"||!i.attributes.filter(Go.isValuedHtmlAttribute).find(o=>(0,Go.isAttr)(o,"rel")&&(0,Go.valueIncludes)(o,"stylesheet")))return;let a=i.attributes.filter(Go.isValuedHtmlAttribute).find(o=>(0,Go.isAttr)(o,"href"));if(a&&a.value.length===1){if(OY(a.value[0])&&/(https?:)?\/\//.test(a.value[0].value)){let o=a.value[0].value;await n(o,a.attributePosition)}if(NY(a.value[0])&&PY(a.value[0].markup)&&CY(a.value[0].markup.expression)&&a.value[0].markup.filters.length===1&&a.value[0].markup.filters[0].name==="asset_url"){let o=a.value[0].markup.expression.value;await r(o,a.attributePosition)}}},async LiquidFilter(i,s){if(i.name!=="stylesheet_tag")return;let a=(0,EY.last)(s);if(!(!a||!(0,Go.isNodeOfType)(Jo.NodeTypes.LiquidVariable,a))&&a.expression.type===Jo.NodeTypes.String){if(a.expression.value[0].length==1&&a.filters.length==1&&/(https?:)?\/\//.test(a.expression.value)){let o=a.expression.value;await n(o,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 o=a.expression.value;await r(o,a.position)}}}}}}});var Uq=x(ih=>{"use strict";d();Object.defineProperty(ih,"__esModule",{value:!0});ih.AssetSizeJavaScript=void 0;var Ko=ue(),Fk=K(),LY=Ce(),$q=In(),Bk=Fe(),qY={thresholdInBytes:Fk.SchemaProp.number(1e4)};function IY(e){return e.type===Ko.NodeTypes.TextNode}function MY(e){return e.type===Ko.NodeTypes.LiquidVariableOutput}function RY(e){return typeof e!="string"&&e.type===Ko.NodeTypes.LiquidVariable}function DY(e){return e.type===Ko.NodeTypes.String}ih.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:Fk.SourceCodeType.LiquidHtml,severity:Fk.Severity.ERROR,schema:qY,targets:[]},create(e){if(!e.fileSize)return{};let t=e.settings.thresholdInBytes;async function n(i,s){await(0,$q.hasRemoteAssetSizeExceededThreshold)(e,i,t)&&e.report({message:`JavaScript on every page load exceeds compressed size threshold (${t} Bytes), consider using the import on interaction pattern.`,startIndex:s.start,endIndex:s.end})}async function r(i,s){await(0,$q.hasLocalAssetSizeExceededThreshold)(e,`assets/${i}`,t)&&e.report({message:`JavaScript on every page load exceeds compressed size threshold (${t} 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(Bk.isValuedHtmlAttribute).find(a=>(0,Bk.isAttr)(a,"src"));if(s&&s.value.length===1){if(IY(s.value[0])&&/(https?:)?\/\//.test(s.value[0].value)){let a=s.value[0].value;await n(a,s.attributePosition)}if(MY(s.value[0])&&RY(s.value[0].markup)&&DY(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 r(a,s.attributePosition)}}},async LiquidFilter(i,s){if(i.name!=="script_tag")return;let a=(0,LY.last)(s);if(!(!a||!(0,Bk.isNodeOfType)(Ko.NodeTypes.LiquidVariable,a))&&a.expression.type===Ko.NodeTypes.String){if(a.expression.value[0].length==1&&a.filters.length==1&&/(https?:)?\/\//.test(a.expression.value)){let o=a.expression.value;await n(o,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 o=a.expression.value;await r(o,a.position)}}}}}}});var Gq=x(ah=>{"use strict";d();Object.defineProperty(ah,"__esModule",{value:!0});ah.BlockIdUsage=void 0;var sh=ue(),Hq=K();ah.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:Hq.SourceCodeType.LiquidHtml,severity:Hq.Severity.WARNING,schema:{},targets:[]},create(e){return{async Comparison(t,n){t.comparator==="=="&&t.left.type===sh.NodeTypes.VariableLookup&&zq(t.left)&&Wq(e,t.position)},async VariableLookup(t,n){let r=n.at(-1);r?.type===sh.NodeTypes.LiquidTag&&r.name==="case"&&zq(t)&&Wq(e,t.position)}}}};function zq(e){return e.type==sh.NodeTypes.VariableLookup&&e.name==="block"&&e.lookups[0]&&e.lookups[0].type===sh.NodeTypes.String&&e.lookups[0].value==="id"}function Wq(e,t){e.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:t.start,endIndex:t.end})}});var Kq=x(oh=>{"use strict";d();Object.defineProperty(oh,"__esModule",{value:!0});oh.CdnPreconnect=void 0;var Jq=K(),ya=Fe();oh.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:Jq.SourceCodeType.LiquidHtml,severity:Jq.Severity.ERROR,schema:{},targets:[]},create(e){function t(n){(0,ya.getHtmlNodeName)(n)!=="link"||!n.attributes.filter(ya.isValuedHtmlAttribute).some(s=>(0,ya.isAttr)(s,"rel")&&(0,ya.valueIncludes)(s,"preconnect"))||!n.attributes.filter(ya.isValuedHtmlAttribute).some(s=>(0,ya.isAttr)(s,"href")&&(0,ya.valueIncludes)(s,".+cdn.shopify.com.+"))||e.report({message:"Preconnecting to cdn.shopify.com is unnecessary and can lead to worse performance",startIndex:n.position.start,endIndex:n.position.end})}return{async HtmlVoidElement(n){t(n)},async HtmlSelfClosingElement(n){t(n)}}}}});var Xq=x(ch=>{"use strict";d();Object.defineProperty(ch,"__esModule",{value:!0});ch.ContentForHeaderModification=void 0;var Yq=ue(),Qq=K(),jY=Fe();function BY(e){return e.name==="assign"&&typeof e.markup!="string"}function FY(e){return e.name==="capture"&&typeof e.markup!="string"}function VY(e){return e.name==="echo"&&typeof e.markup!="string"}ch.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:Qq.SourceCodeType.LiquidHtml,severity:Qq.Severity.ERROR,schema:{},targets:[]},create(e){function t(n,r){(0,jY.isNodeOfType)(Yq.NodeTypes.VariableLookup,n)&&n.name==="content_for_header"&&e.report({message:"Do not rely on the content of `content_for_header`",startIndex:r.start,endIndex:r.end})}return{async LiquidTag(n){if(BY(n))t(n.markup.value.expression,n.position);else if(VY(n))t(n.markup.expression,n.position);else if(FY(n)&&n.children)for(let r of n.children)r.type===Yq.NodeTypes.LiquidVariableOutput&&typeof r.markup!="string"&&t(r.markup.expression,r.position)},async LiquidVariableOutput(n){typeof n.markup!="string"&&n.markup.filters.length&&t(n.markup.expression,n.position)}}}}});var eI=x(uh=>{"use strict";d();Object.defineProperty(uh,"__esModule",{value:!0});uh.DeprecateBgsizes=void 0;var Zq=K(),nl=Fe();uh.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:Zq.SourceCodeType.LiquidHtml,severity:Zq.Severity.WARNING,schema:{},targets:[]},create(e){return{async HtmlElement(t){let n=t.attributes.filter(nl.isValuedHtmlAttribute).find(i=>(0,nl.isAttr)(i,"class")&&(0,nl.valueIncludes)(i,"lazyload"));if(n){let i=n;e.report({message:'Use the native loading="lazy" attribute instead of lazysizes',startIndex:i.attributePosition.start,endIndex:i.attributePosition.end})}let r=t.attributes.find(i=>(0,nl.isValuedHtmlAttribute)(i)&&(0,nl.isAttr)(i,"data-bgset"));r&&e.report({message:"Use the CSS imageset attribute instead of data-bgset",startIndex:r.position.start,endIndex:r.position.end})}}}}});var nI=x(lh=>{"use strict";d();Object.defineProperty(lh,"__esModule",{value:!0});lh.DeprecateLazysizes=void 0;var tI=K(),Lr=Fe();function $Y(e){return(0,Lr.isAttr)(e,"data-srcset")||(0,Lr.isAttr)(e,"data-sizes")}lh.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:tI.SourceCodeType.LiquidHtml,severity:tI.Severity.WARNING,schema:{},targets:[]},create(e){function t(n){if((0,Lr.getHtmlNodeName)(n)!=="img")return;let r=n.attributes.filter(Lr.isHtmlAttribute),i=r.some(c=>(0,Lr.isAttr)(c,"src")),s=r.some(c=>(0,Lr.isAttr)(c,"loading"));i&&s||!n.attributes.filter(Lr.isValuedHtmlAttribute).some(c=>(0,Lr.isAttr)(c,"class")&&(0,Lr.valueIncludes)(c,"lazyload"))||!n.attributes.filter(Lr.isValuedHtmlAttribute).some($Y)||e.report({message:'Use the native loading="lazy" attribute instead of lazysizes',startIndex:n.position.start,endIndex:n.position.end})}return{async HtmlVoidElement(n){t(n)},async HtmlSelfClosingElement(n){t(n)}}}}});var oI=x(Qo=>{"use strict";d();Object.defineProperty(Qo,"__esModule",{value:!0});Qo.fixHexToRgba=UY;Qo.suggestImgTagFix=HY;Qo.suggestImgUrlFix=zY;Qo.suggestImageUrlFix=WY;var mh=ue(),gh=Fe(),rI=5760,iI={pico:16,icon:32,thumb:50,small:100,compact:160,medium:240,large:480,grande:600,original:1024};function UY(e){if(e.args.length>1)return;let{start:t,end:n}=yh(e),r=Yo(e,0),i;return r?i=` color_to_rgb | color_modify: 'alpha', ${r}`:i=" color_to_rgb",s=>s.replace(t,n,i)}function HY(e){let t="Replace 'img_tag' with 'image_tag'.",n=Yo(e,0),r=Yo(e,1),i=Yo(e,2),{width:s,height:a}=$k(i,{width:-1,height:-1}),{start:o,end:c}=yh(e),l=Uk({width:s,height:a}),f={width:s,height:a,alt:ph(n),class:ph(r)},m=dh("image_url",l),p=dh("image_tag",f);return[{message:t,fix:g=>{let v=`${m} |${p}`;g.replace(o,c,v)}}]}function zY(e){let t="Replace 'img_url' with 'image_url'.",n=fh(e,"crop"),r=fh(e,"format"),i=fh(e,"scale"),s=Yo(e,0),a=e.args.at(0);if(Vk(i?.value)||Vk(a))return;let{width:o,height:c}=Uk(GY(e,$k(s))),{start:l,end:f}=yh(e),m={width:o,height:c};return hh(n?.value)&&(m.crop=ph(n.value.value)),hh(r?.value)&&(m.format=ph(r.value.value)),Vk(r?.value)&&(m.format=r.value.name),[{message:t,fix:p=>{let g=dh("image_url",m);p.replace(l,f,g)}}]}function WY(e,t){let n=`Replace '${e}' with 'image_url'.`,r=Yo(t,0),{width:i,height:s}=Uk($k(r)),{start:a,end:o}=yh(t);return[{message:n,fix:c=>{let l=dh("image_url",{width:i,height:s});c.replace(a,o,l)}}]}function $k(e,t={width:100,height:100}){if(!e)return{...t};if(e in iI){let i=iI[e];return{width:i,height:i}}let[n,r]=e.split("x").map(i=>parseInt(i));return sI({width:n,height:r})}function GY(e,t){let n=parseInt(JY(e,"scale")||"0")||1;return sI({width:t.width*n,height:t.height*n})}function sI(e){return{width:Math.min(e.width,rI),height:Math.min(e.height,rI)}}function Uk(e){let{width:t,height:n}=e;return(!n||n===-1)&&(!t||t===-1)&&(t=100),{width:t,height:n}}function Yo(e,t){let n=e.args.at(t);if(aI(n)||hh(n))return n.value}function JY(e,t){let r=fh(e,t)?.value;if(aI(r)||hh(r))return r.value}function fh(e,t){return e.args.find(r=>(0,gh.isNodeOfType)(mh.NodeTypes.NamedArgument,r)&&r.name===t)}function dh(e,t){let n=Object.entries(t).filter(([r,i])=>i&&i!==-1).map(([r,i])=>`${r}: ${i}`).join(", ");return n?` ${e}: ${n}`:` ${e}`}function yh(e){let t=e.position,n=e.source.slice(t.start).indexOf("|");return{start:t.start+n+1,end:t.end}}function ph(e){return e?`'${e}'`:null}function Vk(e){return(0,gh.isNodeOfType)(mh.NodeTypes.VariableLookup,e)}function hh(e){return(0,gh.isNodeOfType)(mh.NodeTypes.String,e)}function aI(e){return(0,gh.isNodeOfType)(mh.NodeTypes.Number,e)}});var uI=x(vh=>{"use strict";d();Object.defineProperty(vh,"__esModule",{value:!0});vh.DeprecatedFilter=void 0;var cI=K(),_h=oI();vh.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:cI.SourceCodeType.LiquidHtml,severity:cI.Severity.WARNING,schema:{},targets:[]},create(e){return e.themeDocset?{LiquidFilter:async t=>{let n=await e.themeDocset.filters(),r=n.find(l=>l.deprecated&&l.name===t.name);if(!r)return;let i=XY(r),s=n.find(l=>l.name===i),a=QY(r,s),o=KY(t),c=YY(t);e.report({message:a,suggest:o,fix:c,startIndex:t.position.start+1,endIndex:t.position.end})}}:{}}};function KY(e){let t=e.name;switch(t){case"img_tag":return(0,_h.suggestImgTagFix)(e);case"img_url":return(0,_h.suggestImgUrlFix)(e);case"article_img_url":case"collection_img_url":case"product_img_url":return(0,_h.suggestImageUrlFix)(t,e);case"currency_selector":return}}function YY(e){if(e.name==="hex_to_rgba")return(0,_h.fixHexToRgba)(e)}function QY(e,t){return t?`Deprecated filter '${e.name}', consider using '${t.name}'.`:`Deprecated filter '${e.name}'.`}function XY(e){return e.deprecation_reason?.match(/replaced by \[`(.+?)`\]/)?.[1]}});var kh=x(bh=>{"use strict";d();Object.defineProperty(bh,"__esModule",{value:!0});bh.DEPRECATED_FONT_HANDLES=void 0;bh.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 mI=x(Th=>{"use strict";d();Object.defineProperty(Th,"__esModule",{value:!0});Th.DeprecatedFontsOnSectionsAndBlocks=void 0;var ZY=He(),lI=K(),Sh=Ge(),Hk=kh();Th.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:lI.SourceCodeType.LiquidHtml,severity:lI.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=await(0,ZY.getSchema)(e),{validSchema:r,ast:i}=n??{};if(!r||r instanceof Error||!i||i instanceof Error)return;let s=t.blockStartPosition.end;eQ(r,s,i,e),tQ(r,s,i,e),await nQ(r,s,i,e),"default"in r&&await rQ(r,s,i,e)}}}};function eQ(e,t,n,r){let i=e.settings;i&&fI(i,t,n,["settings"],r)}function fI(e,t,n,r,i){e.forEach((s,a)=>{if(s.type==="font_picker"&&s.default&&Hk.DEPRECATED_FONT_HANDLES.has(s.default)){let o=r.concat([String(a),"default"]);zk(i,t,n,o,`setting '${s.id}' is using deprecated font '${s.default}'`)}})}function tQ(e,t,n,r){let i=e.blocks;i&&i.forEach((s,a)=>{"settings"in s&&s.settings&&fI(s.settings,t,n,["blocks",String(a),"settings"],r)})}async function nQ(e,t,n,r){let i=e.presets;if(i)for(let[s,a]of i.entries()){let o=["presets",String(s)];await dI(a.settings??{},"blocks"in a?a.blocks:void 0,e,t,n,o,r)}}async function dI(e,t,n,r,i,s,a){e&&typeof e=="object"&&Object.entries(e).forEach(([o,c])=>{if(hI(n.settings??[],o)&&Hk.DEPRECATED_FONT_HANDLES.has(c)){let l=s.concat(["settings",o]);zk(a,r,i,l,`setting '${o}' is using deprecated font '${c}'`)}}),t&&await pI(t,n,r,i,a,s)}async function pI(e,t,n,r,i,s){let a=Array.isArray(e)?e.entries():Object.entries(e);for(let[o,c]of a){let l=s.concat(["blocks",String(o)]),f=null;if(t.blocks?.forEach(m=>{m.type===c.type&&"name"in m&&(f=m)}),!f){let m=await i.getBlockSchema?.(c.type);if(!m||m instanceof Error||(f=m.validSchema,!f||f instanceof Error))continue}for(let[m,p]of Object.entries(c.settings??{}))p&&Hk.DEPRECATED_FONT_HANDLES.has(p)&&hI(f.settings??[],m)&&zk(i,n,r,l.concat(["settings",m]),`setting '${m}' is using deprecated font '${p}'`);"blocks"in c&&c.blocks&&await pI(c.blocks,t,n,r,i,l)}}async function rQ(e,t,n,r){let i=e.default;if(!i||typeof i!="object")return;let s=["default"];await dI(i.settings??{},"blocks"in i?i.blocks:void 0,e,t,n,s,r)}function hI(e,t){return e.some(n=>n.id===t&&n.type==="font_picker")}function zk(e,t,n,r,i,s=!0){let a=(0,Sh.nodeAtPath)(n,r),o=s?t+(0,Sh.getLocStart)(a):t+(0,Sh.getLocEnd)(a)-1,c=t+(0,Sh.getLocEnd)(a);e.report({message:i,startIndex:o,endIndex:c})}});var _I=x(wh=>{"use strict";d();Object.defineProperty(wh,"__esModule",{value:!0});wh.DeprecatedFontsOnSettingsData=void 0;var gI=K(),yI=Ge(),iQ=kh();wh.DeprecatedFontsOnSettingsData={meta:{code:"DeprecatedFontsOnSettingsData",name:"Check for deprecated fonts in settings_data settings values",docs:{description:"Warns on deprecated fonts in settings_data settings values.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-fonts-on-settings-data"},type:gI.SourceCodeType.JSON,severity:gI.Severity.WARNING,schema:{},targets:[]},create(e){return e.toRelativePath(e.file.uri)!=="config/settings_data.json"?{}:{async Property(n){n.value.type==="Literal"&&typeof n.value.value=="string"&&iQ.DEPRECATED_FONT_HANDLES.has(n.value.value)&&e.report({message:`The font "${n.value.value}" is deprecated`,startIndex:(0,yI.getLocStart)(n.value),endIndex:(0,yI.getLocEnd)(n.value)})}}}}});var bI=x(Eh=>{"use strict";d();Object.defineProperty(Eh,"__esModule",{value:!0});Eh.DeprecatedFontsOnSettingsSchema=void 0;var xh=K(),vI=Ge(),sQ=kh();Eh.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:xh.SourceCodeType.JSON,severity:xh.Severity.WARNING,schema:{},targets:[]},create(e){return e.toRelativePath(e.file.uri)!=="config/settings_schema.json"?{}:{async Property(n){if(n.key.value==="settings"&&(0,xh.isArrayNode)(n.value)){for(let r of n.value.children)if((0,xh.isObjectNode)(r)){let i=r.children.find(s=>s.key.value==="type");if(i&&i.value.type==="Literal"&&i.value.value==="font_picker"){let s=r.children.find(a=>a.key.value==="default");if(s&&s.value.type==="Literal"&&typeof s.value.value=="string"){let a=s.value.value;sQ.DEPRECATED_FONT_HANDLES.has(a)&&e.report({message:`The font "${a}" is deprecated`,startIndex:(0,vI.getLocStart)(s.value),endIndex:(0,vI.getLocEnd)(s.value)})}}}}}}}}});var SI=x(Ah=>{"use strict";d();Object.defineProperty(Ah,"__esModule",{value:!0});Ah.DeprecatedTag=void 0;var kI=K();Ah.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:kI.SourceCodeType.LiquidHtml,severity:kI.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name==="include"){let r=t.source.substring(t.position.start).indexOf("include"),i=r+7,s=t.position.start+r,a=t.position.start+i;e.report({message:"Use the 'render' tag instead of 'include'",startIndex:s,endIndex:a,suggest:[{message:"Replace 'include' with 'render'",fix:o=>{o.replace(s,a,"render")}}]})}}}}}});var ur=x(xn=>{"use strict";d();Object.defineProperty(xn,"__esModule",{value:!0});xn.reportUnknownArguments=aQ;xn.reportMissingArguments=oQ;xn.reportDuplicateArguments=cQ;xn.findTypeMismatchParams=uQ;xn.reportTypeMismatches=lQ;xn.generateTypeMismatchSuggestions=wI;xn.getBlockName=dQ;xn.getSnippetName=pQ;xn.getLiquidDocParams=hQ;xn.makeRemoveArgumentCorrector=Wk;xn.makeAddArgumentCorrector=xI;var _a=ue(),rl=$i(),TI=Fe();function aQ(e,t,n,r){let i="";t.type===_a.NodeTypes.ContentForMarkup?i=` in content_for tag for static block '${r}'`:t.type===_a.NodeTypes.RenderMarkup&&(i=` in render tag for snippet '${r}'`);for(let s of n)e.report({message:`Unknown argument '${s.name}'${i}.`,startIndex:s.position.start,endIndex:s.position.end,suggest:[{message:`Remove '${s.name}'`,fix:Wk(t,s)}]})}function oQ(e,t,n,r){let i="";t.type===_a.NodeTypes.ContentForMarkup?i=` in content_for tag for static block '${r}'`:t.type===_a.NodeTypes.RenderMarkup&&(i=` in render tag for snippet '${r}'`);for(let s of n)e.report({message:`Missing required argument '${s.name}'${i}.`,startIndex:t.position.start,endIndex:t.position.end,suggest:[{message:`Add required argument '${s.name}'`,fix:xI(t,s)}]})}function cQ(e,t,n,r){let i="";t.type===_a.NodeTypes.ContentForMarkup?i=` in content_for tag for static block '${r}'`:t.type===_a.NodeTypes.RenderMarkup&&(i=` in render tag for snippet '${r}'`);for(let s of n)e.report({message:`Duplicate argument '${s.name}'${i}.`,startIndex:s.position.start,endIndex:s.position.end,suggest:[{message:`Remove duplicate argument '${s.name}'`,fix:Wk(t,s)}]})}function uQ(e,t){let n=[];for(let r of t){let i=e.get(r.name);i?.type&&(0,rl.checkArgumentType)(i.type,r.value).kind==="incompatible"&&n.push(r)}return n}function lQ(e,t,n){for(let r of t){let i=n.get(r.name);if(!i||!i.type)continue;let s=wI(i.type,r.value.position.start,r.value.position.end);e.report({message:(0,rl.getArgumentTypeMismatchMessage)(r.name,i.type,r.value),startIndex:r.value.position.start,endIndex:r.value.position.end,suggest:s})}}function wI(e,t,n){let r=(0,rl.parseStringLiterals)(e);if(r)return r.map(a=>({message:`Replace with ${a.raw}`,fix:o=>o.replace(t,n,a.raw)}));e=e.toLowerCase();let i=(0,rl.getDefaultValueForType)(e),s=[];return i!==""&&s.push({message:`Replace with default value '${i}' for ${e}`,fix:a=>a.replace(t,n,i)}),s.push({message:"Remove value",fix:a=>a.remove(t,n)}),s}function fQ(e,t){return e.args.length==1||t.position.start==e.args[e.args.length-1].position.start}function dQ(e){if(e.contentForType.value!=="block")return;let t=e.args.find(n=>n.name=="type")?.value;if(!(!t||!(0,TI.isLiquidString)(t)))return t.value}function pQ(e){if((0,TI.isLiquidString)(e.snippet))return e.snippet.value}async function hQ(e,t){let n=e.getDocDefinition&&await e.getDocDefinition(t);if(n?.liquidDoc?.parameters)return new Map(n.liquidDoc.parameters.map(r=>[r.name,r]))}function Wk(e,t){return n=>{let r=EI(e),i=r.slice(e.position.start,t.position.start),a=r.slice(t.position.end,e.position.end).match(/^\s*,\s*/);if(a){if(fQ(e,t)){let l=i.match(/,\s*$/),f=l?t.position.start-l[0].length:t.position.start;return n.remove(f,t.position.end+a[0].replace(/\s+$/,"").length)}return n.remove(t.position.start,t.position.end+a[0].length)}let o=i.match(/,\s*$/),c=o?t.position.start-o[0].length:t.position.start;return n.remove(c,t.position.end)}}function xI(e,t){return n=>{let r=EI(e),i=`, ${t.name}: ${(0,rl.getDefaultValueForType)(t.type)}`;if(e.args.length==0)return n.insert(e.position.end-1,i);let s=e.args[e.args.length-1],o=r.substring(s.position.end,e.position.end).match(/\s*,\s*/);return o?n.replace(s.position.end,s.position.end+o[0].length,`${i} `):n.insert(s.position.end,i)}}function EI(e){return e.source?e.source:e.args.length>0?e.args[0].source:e.type===_a.NodeTypes.ContentForMarkup?e.contentForType.source:e.snippet.source}});var NI=x(Oh=>{"use strict";d();Object.defineProperty(Oh,"__esModule",{value:!0});Oh.DuplicateRenderSnippetArguments=void 0;var AI=K(),OI=ur();Oh.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:AI.SourceCodeType.LiquidHtml,severity:AI.Severity.WARNING,schema:{},targets:[]},create(e){return{async RenderMarkup(t){let n=(0,OI.getSnippetName)(t);if(!n)return;let r=new Set,i=[];t.alias?.value&&r.add(t.alias.value);for(let s of t.args)r.has(s.name)&&i.push(s),r.add(s.name);(0,OI.reportDuplicateArguments)(e,t,i,n)}}}}});var LI=x(Nh=>{"use strict";d();Object.defineProperty(Nh,"__esModule",{value:!0});Nh.DuplicateContentForArguments=void 0;var PI=K(),CI=ur();Nh.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:PI.SourceCodeType.LiquidHtml,severity:PI.Severity.WARNING,schema:{},targets:[]},create(e){return{async ContentForMarkup(t){let n=(0,CI.getBlockName)(t);if(!n)return;let r=new Set,i=[];for(let s of t.args)r.has(s.name)&&i.push(s),r.add(s.name);(0,CI.reportDuplicateArguments)(e,t,i,n)}}}}});var II=x(Ph=>{"use strict";d();Object.defineProperty(Ph,"__esModule",{value:!0});Ph.EmptyBlockContent=void 0;var qI=K(),mQ=He();Ph.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:qI.SourceCodeType.LiquidHtml,severity:qI.Severity.WARNING,schema:{},targets:[]},create(e){let t=!1,n={start:0,end:0};return{async LiquidTag(r){if(r.name!=="content_for")return;let i=r.markup;typeof i=="object"&&i.contentForType.value==="blocks"&&(n.start=r.blockStartPosition.start,n.end=r.blockStartPosition.end,t=!0)},async onCodePathEnd(){let r=await(0,mQ.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let a=i.blocks;t&&!a?e.report({message:`The 'content_for "blocks"' tag is present, but the blocks array is not defined.`,startIndex:n.start,endIndex:n.end}):t&&a&&a.length===0&&e.report({message:`The 'content_for "blocks"' tag is present, but the blocks array is empty.`,startIndex:n.start,endIndex:n.end})}}}}});var jI=x(Lh=>{"use strict";d();Object.defineProperty(Lh,"__esModule",{value:!0});Lh.HardcodedRoutes=void 0;var gQ=ue(),MI=K(),Ch=Fe(),Gk={"/":"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"},DI=Object.keys(Gk).reverse();Lh.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:MI.SourceCodeType.LiquidHtml,severity:MI.Severity.WARNING,schema:{},targets:[]},create(e){return{async HtmlElement(t){let n=t.attributes.filter(Ch.isValuedHtmlAttribute).find(r=>((0,Ch.isAttr)(r,"action")||(0,Ch.isAttr)(r,"href"))&&RI(r));if(n){let r=n,i=RI(r),s=Gk[i],a=r.attributePosition.start,o=a+i.length;e.report({message:`Use routes object {{ routes.${s} }} instead of hardcoding ${i}`,startIndex:a,endIndex:o})}},async LiquidFilter(t){if(t.name!=="link_to")return;let n=t.args[0],r=n.type==="String"?n.value:"",i=DI.find(s=>s==="/"?s===r:r.startsWith(s));if(i){let s=Gk[i],a=n.position.start+1;e.report({message:`Use routes object {{ routes.${s} }} instead of hardcoding ${i}`,startIndex:a,endIndex:a+i.length})}}}}};function RI(e){if(!(0,Ch.isNodeOfType)(gQ.NodeTypes.TextNode,e.value[0]))return;let t=e.value[0].value;return DI.find(n=>n==="/"?n===t&&e.value.length===1:t.startsWith(n))}});var FI=x(Ih=>{"use strict";d();Object.defineProperty(Ih,"__esModule",{value:!0});Ih.ImgWidthAndHeight=void 0;var BI=K(),qh=Fe();Ih.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:BI.SourceCodeType.LiquidHtml,severity:BI.Severity.ERROR,schema:{},targets:[]},create(e){return{async HtmlVoidElement(t){if(t.name==="img"){let n=t.attributes.find(s=>(0,qh.isValuedHtmlAttribute)(s)&&(0,qh.isAttr)(s,"width")),r=t.attributes.find(s=>(0,qh.isValuedHtmlAttribute)(s)&&(0,qh.isAttr)(s,"height")),i=[];if(n||i.push("width"),r||i.push("height"),i.length>0){let s=i.length===1?"attribute":"attributes";e.report({message:`Missing ${i.join(" and ")} ${s} on img tag`,startIndex:t.position.start,endIndex:t.position.end})}}}}}}});var HI=x(Mh=>{"use strict";d();Object.defineProperty(Mh,"__esModule",{value:!0});Mh.isPropertyNode=_Q;Mh.getAllBlocks=UI;var Jk=Ge(),yQ=In();function _Q(e){return typeof e=="object"&&e!==null}function $I(e){return e.filter(t=>t==="blocks").length>1}function VI(e,t,n,r){r.report({message:e,startIndex:t+(0,Jk.getLocStart)(n),endIndex:t+(0,Jk.getLocEnd)(n)})}async function vQ(e,t){if(e==="@theme"||e==="@app")return!0;let n=`blocks/${e}.liquid`;return await(0,yQ.doesFileExist)(t,n)}async function bQ(e,t,n){let r=[];if(!e)return r;let i=$I(t)?await n.getBlockSchema?.(e):await n.getSectionSchema?.(e);if(!i||i instanceof Error)return r;let{validSchema:s}=i;return!s||s instanceof Error||Array.isArray(s.blocks)&&s.blocks.forEach(a=>{!("name"in a)&&a.type!=="@app"&&r.push(a.type)}),r}async function kQ(e,t,n,r,i,s,a){let o=await bQ(r,i,a);if(o.length===0)return;if(!await vQ(e,a))VI(`Theme block 'blocks/${e}.liquid' does not exist.`,s,n,a);else{if(t)return;{let l=e.startsWith("_"),f=o.includes("@theme"),m=o.includes(e);if(l?m:m||f)return;{let p=$I(i)?"blocks":"sections";VI(`Block type '${e}' is not allowed in '${p}/${r}.liquid'.`,s,n,a)}}}}async function UI(e,t,n,r,i,s){await Promise.all(Object.entries(r).map(async([a,o])=>{if(o.type){let c=i.concat(a,"type"),l=(0,Jk.nodeAtPath)(e,c);l&&await kQ(o.type,o.static,l,n,i,t,s)}"blocks"in o&&await UI(e,t,o.type,o.blocks,i.concat(a,"blocks"),s)}))}});var WI=x(Rh=>{"use strict";d();Object.defineProperty(Rh,"__esModule",{value:!0});Rh.JSONMissingBlock=void 0;var SQ=He(),zI=K(),Kk=HI();Rh.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:zI.SourceCodeType.JSON,severity:zI.Severity.ERROR,schema:{},targets:[]},create(e){return e.toRelativePath(e.file.uri).startsWith("templates/")?{async onCodePathEnd(){let n=await(0,SQ.getSchemaFromJSON)(e),{ast:r}=n??{};if(!r||r instanceof Error||!n)return;let i=n.parsed.sections;i&&await Promise.all(Object.entries(i).map(async([s,a])=>{(0,Kk.isPropertyNode)(a)&&"blocks"in a&&(0,Kk.isPropertyNode)(a.blocks)&&"type"in a&&await(0,Kk.getAllBlocks)(r,0,a.type,a.blocks,["sections",s,"blocks"],e)}))}}:{}}}});var JI=x(Dh=>{"use strict";d();Object.defineProperty(Dh,"__esModule",{value:!0});Dh.JSONMissingSection=void 0;var Yk=Ge(),TQ=He(),GI=K(),wQ=In(),xQ=["apps","_blocks"];Dh.JSONMissingSection={meta:{code:"JSONMissingSection",name:"Check for missing section files in JSON templates and section groups",docs:{description:"This check ensures that section types in JSON templates and section groups refer to existing section files.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-missing-section"},type:GI.SourceCodeType.JSON,severity:GI.Severity.ERROR,schema:{},targets:[]},create(e){let t=e.toRelativePath(e.file.uri),n=t.startsWith("templates/"),r=t.startsWith("sections/");return!n&&!r?{}:{async onCodePathEnd(){let i=await(0,TQ.getSchemaFromJSON)(e),{ast:s}=i??{};if(!s||s instanceof Error)return;let a=(0,Yk.nodeAtPath)(s,["sections"]);!a||a.type!=="Object"||await Promise.all(a.children.map(async o=>{let c=o.value;if(c.type!=="Object")return;let l=c.children.find(p=>p.key.value==="type")?.value;if(!l||l.type!=="Literal")return;let f=l.value;typeof f!="string"||xQ.includes(f)||await(0,wQ.doesFileExist)(e,`sections/${f}.liquid`)||e.report({message:`Section type '${f}' does not refer to an existing section file`,startIndex:(0,Yk.getLocStart)(l),endIndex:(0,Yk.getLocEnd)(l)})}))}}}}});var YI=x(jh=>{"use strict";d();Object.defineProperty(jh,"__esModule",{value:!0});jh.JSONSyntaxError=void 0;var EQ=Mb(),KI=K(),AQ=Ce();function OQ(e){return("rawMessage"in e?e.rawMessage:e.message).replace(/\s+at \d+:\d+/,"")}jh.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:KI.SourceCodeType.JSON,severity:KI.Severity.ERROR,schema:{},targets:[],deprecated:!0},create(e){if(e.validateJSON)return{};let t=e.file.ast;return(0,AQ.isError)(t)?{async onCodePathStart(n){if(n.ast instanceof EQ.JSONCParseErrors)for(let r of n.ast.errors)e.report({message:NQ(r.error),startIndex:r.offset,endIndex:r.offset+r.length});else e.report({message:OQ(t),startIndex:0,endIndex:n.source.length})}}:{}}};function NQ(e){switch(e){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 ZI=x(Bh=>{"use strict";d();Object.defineProperty(Bh,"__esModule",{value:!0});Bh.LiquidFreeSettings=void 0;var PQ=Fu(),QI=K(),CQ=ii();Bh.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:QI.SourceCodeType.LiquidHtml,severity:QI.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.source.slice(t.blockStartPosition.end,t.blockEndPosition.start),r=(0,PQ.toJSONAST)(n);r instanceof Error||(0,CQ.visit)(r,{Property(i,s){if(!qQ(s,"settings")||!XI(i.value)||LQ(s))return;let{value:a,loc:o}=i.value,c=i.key.value;typeof a=="string"&&c!=="visible_if"&&a.includes("{%")&&a.includes("%}")&&e.report({message:"Settings values cannot contain liquid logic.",startIndex:t.blockStartPosition.end+o.start.offset,endIndex:t.blockStartPosition.end+o.end.offset})}})}}}};function XI(e){return e.type==="Literal"}function LQ(e){let t=e.at(-1);return!t||t.type!=="Object"?!1:t.children.some(({key:n,value:r})=>n.value!=="type"||!XI(r)?!1:r.value==="liquid")}function qQ(e,t){return e.some((n,r)=>{let i=e[r-1];return(n.type==="Array"||n.type==="Object")&&i?.type==="Property"&&i.key?.value===t})}});var qr=x(fi=>{"use strict";d();Object.defineProperty(fi,"__esModule",{value:!0});fi.INVALID_SYNTAX_MESSAGE=void 0;fi.getValuesInMarkup=IQ;fi.getFragmentsInMarkup=jQ;fi.getRangeMatch=sM;fi.doesFragmentContainUnsupportedParentheses=BQ;fi.fragmentKeyValuePair=FQ;fi.INVALID_SYNTAX_MESSAGE="Syntax is not supported";function IQ(e){return[...e.matchAll(new RegExp(rM,"g"))].map(t=>({value:t[0],index:t.index}))}var MQ='"[^"]*"',RQ="'[^']*'",eM="\\s*(-?\\d+(?:\\.\\d+)?|\\w+(?:\\.\\w+)*)\\s*",Qk=`\\(\\s*${eM}(\\.{2,})\\s*${eM}\\s*\\)`,tM="[^\\s,]+",nM=`(${MQ}|${RQ})`,rM=`(${nM}|${Qk}|${tM})`,iM=`(\\S+):\\s*${rM}`,DQ=new RegExp(`${nM}|${Qk}|${iM}|${tM}`,"g");function jQ(e){return[...e.matchAll(DQ)].map(t=>({value:t[0],index:t.index}))}function sM(e){return e.match(Qk)}function BQ(e){return sM(e)?!1:e.includes("(")||e.includes(")")}function FQ(e){let t=e.match(new RegExp(iM));if(!t)return;let[,n,r]=t;return{key:n,value:r}}});var oM=x(Xk=>{"use strict";d();Object.defineProperty(Xk,"__esModule",{value:!0});Xk.detectMultipleAssignValues=VQ;var aM=qr();function VQ(e){let t=/([^=]+)(=\s*)([^|]+)(?:\s*\|\s*.*)?$/m;if(e.name!=="assign")return;let n=e.markup;if(typeof n!="string")return;let r=n.match(t);if(!r)return;let[i,s,a,o]=r,c=(0,aM.getValuesInMarkup)(o).at(0)?.value;if(!c)return;let l=(p,g)=>{let v=p.indexOf(n,g);return{startIndex:v+s.length+a.length+c.length,endIndex:v+s.length+a.length+o.trimEnd().length}},{startIndex:f,endIndex:m}=l(e.source,e.position.start);if(!(m<=f)&&!(m<=f))return{message:aM.INVALID_SYNTAX_MESSAGE,startIndex:f,endIndex:m,fix:p=>{p.replace(f,m,"")}}}});var uM=x(Zk=>{"use strict";d();Object.defineProperty(Zk,"__esModule",{value:!0});Zk.detectInvalidBooleanExpressions=HQ;var cM=ue(),$Q=qr(),UQ=Fe();function HQ(e,t){if((0,UQ.isWithinRawTagThatDoesNotParseItsContents)(t))return;let n=e.condition;if(!(n.type!==cM.NodeTypes.Comparison&&n.type!==cM.NodeTypes.LogicalExpression))return{message:$Q.INVALID_SYNTAX_MESSAGE,startIndex:e.position.start,endIndex:e.position.end,fix:r=>{r.replace(e.position.start,e.position.end,e.source.slice(n.left.position.start,n.left.position.end))}}}});var lM=x(t0=>{"use strict";d();Object.defineProperty(t0,"__esModule",{value:!0});t0.detectInvalidEchoValue=WQ;var zQ=ue(),e0=qr();function WQ(e){let t=/([^|]*)(?:\s*\|\s*.*)?$/m;if(e.type===zQ.NodeTypes.LiquidTag&&e.name!=="echo")return;let n=e.markup;if(typeof n!="string"||!n)return;let r=n.match(t);if(!r)return;let[,i]=r,s=(0,e0.getValuesInMarkup)(i).at(0)?.value;if(!s){let l=e.source.indexOf(n,e.position.start),f=l+n.length;return{message:e0.INVALID_SYNTAX_MESSAGE,startIndex:l,endIndex:f,fix:m=>{m.replace(l,f,"blank")}}}let a=(l,f)=>{let m=l.indexOf(n,f);return{startIndex:m+s.length,endIndex:m+i.trimEnd().length}},{startIndex:o,endIndex:c}=a(e.source,e.position.start);if(!(c<=o))return{message:e0.INVALID_SYNTAX_MESSAGE,startIndex:o,endIndex:c,fix:l=>{l.replace(o,c,"")}}}});var hM=x(n0=>{"use strict";d();Object.defineProperty(n0,"__esModule",{value:!0});n0.detectInvalidConditionalNode=KQ;var pM=qr(),GQ={logical:/^(and|or)$/,comparison:/^(==|!=|>=|<=|>|<|contains)$/,invalid:/^[@#$&]$/,literal:/^(['"][^'"]*['"]|\d+(?:\.\d+)?|true|false|nil|empty|blank)$/};function JQ(e){for(let[t,n]of Object.entries(GQ))if(n.test(e))return t;return"variable"}function KQ(e){if(!("name"in e)||!e.name||!["if","elsif","unless"].includes(String(e.name)))return;let t=e.markup;if(typeof t!="string"||!t.trim())return;let n=ZQ(t);if(!n)return;let r=e.blockStartPosition||e.position,s=e.source.slice(r.start,r.end).indexOf(t);if(s<0)return;let a=r.start+s,o=a+t.length;return{message:`${pM.INVALID_SYNTAX_MESSAGE}: ${n.message}`,startIndex:a,endIndex:o,fix:c=>{c.replace(a,o,n.fix)}}}function fM(e){return e.type==="literal"||e.type==="variable"}function dM(e){return e.type==="logical"||e.type==="comparison"}function YQ(e){let t=e[0];return e.length===1&&t.value==="contains"?null:t.type==="invalid"||t.type==="comparison"?{message:`Conditional cannot start with '${t.value}'. Use a variable or value instead`,fix:"false"}:null}function QQ(e){for(let r=0;r<=e.length-4;r++){let[i,s,a]=e.slice(r,r+3),o=e.slice(r+3);if(fM(i)&&s.type==="comparison"&&fM(a)&&o.length>0&&o[0].type!=="logical"){let c=e.slice(0,r+3).map(m=>m.value).join(" "),l=o.map(m=>m.value).join(" ");return/&&|\|\|/.test(l)?{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 XQ(e){for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n.type==="literal"&&!dM(r)){let i=e.slice(t+1);if(!(i[0]?.type==="variable"&&i.some(dM))){let a=i.map(c=>c.value).join(" ");return/&&|\|\|/.test(a)?{message:`Expression stops at truthy value '${n.value}', and will ignore: '${a}'. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,fix:n.value}:{message:`Expression stops at truthy value '${n.value}', and will ignore: '${a}'`,fix:n.value}}}}return null}function ZQ(e){let t=e.trim();if(!t)return null;let n=(0,pM.getValuesInMarkup)(t).map(({value:r})=>({value:r,type:JQ(r)}));return n.length===0?null:YQ(n)||QQ(n)||XQ(n)}});var yM=x(Xo=>{"use strict";d();Object.defineProperty(Xo,"__esModule",{value:!0});Xo.INVALID_LOOP_RANGE_MESSAGE=void 0;Xo.detectInvalidLoopRange=nX;var mM=ue(),eX=qr(),tX=Fe();Xo.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 nX(e){if(e.type===mM.NodeTypes.LiquidTag&&!(0,tX.isLoopLiquidTag)(e))return;let t=e.markup;if(t){if(typeof t=="string")return gM(e,t);if(t.collection.type===mM.NodeTypes.Range)return gM(e,e.source.slice(t.collection.position.start,t.collection.position.end))}}function gM(e,t){let n=(0,eX.getRangeMatch)(t);if(!n||n.index===void 0)return;let[r,i,,s]=n,a=i,o=s;!isNaN(Number(i))&&Number(i)%1!==0&&(a=`${Math.trunc(Number(i))}`),!isNaN(Number(s))&&Number(s)%1!==0&&(o=`${Math.trunc(Number(s))}`);let c=`(${a}..${o})`;if(t.slice(n.index,n.index+r.length)===c)return;let f=e.source.indexOf(t,e.position.start)+n.index,m=f+r.length;return{message:Xo.INVALID_LOOP_RANGE_MESSAGE,startIndex:f,endIndex:m,fix:p=>{p.replace(f,m,c)}}}});var vM=x(i0=>{"use strict";d();Object.defineProperty(i0,"__esModule",{value:!0});i0.detectInvalidLoopArguments=sX;var rX=ue(),r0=qr(),iX=Fe();function sX(e,t=[]){if(e.type===rX.NodeTypes.LiquidTag&&!(0,iX.isLoopLiquidTag)(e))return;let n=e.markup;if(!n)return;typeof n!="string"&&(n=n.source.slice(n.position.start,n.position.end));let r=(0,r0.getFragmentsInMarkup)(n);if(r.length<=3)return;let i=e.source.indexOf(n,e.position.start),s=i+r.at(3).index,a=i+r.at(-1).index+r.at(-1).value.length,o=[],c=!1,l=[];for(let f=3;f<r.length;f++){let m=r[f];if((0,r0.doesFragmentContainUnsupportedParentheses)(m.value)){c=!0,l.push(m.value);continue}let p=(0,r0.fragmentKeyValuePair)(m.value);if(p){if(c=!0,!_M(t,e.name,p.key,!1)){l.push(m.value);continue}}else if(c||!_M(t,e.name,m.value,!0)){c=!0,l.push(m.value);continue}o.push(m.value)}if(l.length!==0)return{message:`Arguments must be provided in the format \`${e.name} in <array> <positional arguments> <named arguments>\`. Invalid/Unknown arguments: ${l.join(", ")}`,startIndex:s,endIndex:a,fix:f=>{f.replace(s,a,o.join(" "))}}}function _M(e,t,n,r){return e.find(i=>i.name===t)?.parameters?.some(i=>i.name===n&&i.positional===r)||!1}});var bM=x(a0=>{"use strict";d();Object.defineProperty(a0,"__esModule",{value:!0});a0.detectConditionalNodeUnsupportedParenthesis=aX;var s0=qr();function aX(e){if(!["if","elsif","unless"].includes(e.name)||typeof e.markup!="string"||!e.markup.trim())return;let t=e.source.indexOf(e.markup,e.position.start),r=(0,s0.getFragmentsInMarkup)(e.markup).filter(i=>(0,s0.doesFragmentContainUnsupportedParentheses)(i.value));if(r.length)return{message:s0.INVALID_SYNTAX_MESSAGE,startIndex:t,endIndex:t+e.markup.length,fix:i=>{for(let s of r)i.replace(t+s.index,t+s.index+s.value.length,s.value.replace(/[\(\)]/g,""))}}}});var SM=x(u0=>{"use strict";d();Object.defineProperty(u0,"__esModule",{value:!0});u0.detectInvalidFilterName=oX;var Zo=ue(),kM=qr();async function oX(e,t){if(!t)return[];if(e.type===Zo.NodeTypes.LiquidVariableOutput)return typeof e.markup=="string"?c0(e,e.markup,t):o0(e,e.markup,t);if(e.type===Zo.NodeTypes.LiquidTag){if(e.name===Zo.NamedTags.echo){if(typeof e.markup=="string")return c0(e,e.markup,t);if(e.markup.type===Zo.NodeTypes.LiquidVariable)return o0(e,e.markup,t)}if(e.name===Zo.NamedTags.assign){if(typeof e.markup=="string")return c0(e,e.markup,t);if(e.markup.type===Zo.NodeTypes.AssignMarkup)return o0(e,e.markup.value,t)}}return[]}async function o0(e,t,n){let r=n,i=e.source,s=t.position.end,a=[];for(let o of t.filters){if(!r.some(p=>p.name===o.name))continue;let c=i.indexOf(o.name,o.position.start);if(c===-1)continue;let l=c+o.name.length,f=i.slice(l,s).match(/^([^\s:|]+)/)?.[1];if(!f)continue;let m=l+f.length;a.push({message:`${kM.INVALID_SYNTAX_MESSAGE} Filter '${o.name}' has trailing characters '${f}' that should be removed.`,startIndex:l,endIndex:m,fix:p=>{p.replace(l,m,"")}})}return a}async function c0(e,t,n){let r=n,i=t.trim(),s=[],a=/\|\s*([a-zA-Z][a-zA-Z0-9_]*)/g,o=Array.from(i.matchAll(a));for(let c of o){let l=c[1];if(!r.some(_=>_.name===l))continue;let f=c.index+c[0].length,p=i.slice(f).match(/^(?!\s*(?::|$|\|\s*[a-zA-Z]|\|\s*\||\s*\|\s*(?:[}%]|$)))([^:|]+?)(?=\s*(?::|$|\|))/)?.[1];if(!p)continue;let v=e.source.indexOf(t,e.position.start)+f,b=v+p.length;s.push({message:`${kM.INVALID_SYNTAX_MESSAGE} Filter '${l}' has trailing characters '${p}' that should be removed.`,startIndex:v,endIndex:b,fix:_=>{_.replace(v,b,"")}})}return s}});var xM=x(l0=>{"use strict";d();Object.defineProperty(l0,"__esModule",{value:!0});l0.detectInvalidPipeSyntax=cX;var ec=ue(),TM=qr();async function cX(e){if(e.type===ec.NodeTypes.LiquidVariableOutput)return typeof e.markup!="string"?[]:wM(e,e.markup);if(e.type===ec.NodeTypes.LiquidTag){if(e.name===ec.NamedTags.echo&&typeof e.markup!="string")return[];if(e.name===ec.NamedTags.assign&&typeof e.markup!="string")return[];if(typeof e.markup=="string"&&(e.name===ec.NamedTags.echo||e.name===ec.NamedTags.assign))return wM(e,e.markup)}return[]}async function wM(e,t){let n=[],r=t.trim(),i=/(\|\s*){2,}/g,s=Array.from(r.matchAll(i));for(let c of s){if(c.index+c[0].length===r.length)continue;let l=e.source.indexOf(t,e.position.start);if(l===-1)continue;let f=l+c.index,m=f+c[0].length;n.push({message:`${TM.INVALID_SYNTAX_MESSAGE}. Remove extra \`|\` character(s).`,startIndex:f,endIndex:m,fix:p=>{p.replace(f,m,"| ")}})}let a=/(\s*\|)+\s*$/,o=r.match(a);if(o){let c=e.source.indexOf(t,e.position.start);if(c===-1)return n;let l=o.index,f=c+l,m=f+o[0].length;n.push({message:`${TM.INVALID_SYNTAX_MESSAGE}. Remove the trailing \`|\` character.`,startIndex:f,endIndex:m,fix:p=>{p.replace(f,m,"")}})}return n}});var CM=x(Vh=>{"use strict";d();Object.defineProperty(Vh,"__esModule",{value:!0});Vh.LiquidHTMLSyntaxError=void 0;var EM=K(),f0=Ce(),uX=oM(),lX=uM(),AM=lM(),OM=hM(),fX=yM(),dX=vM(),pX=bM(),NM=SM(),PM=xM(),Fh=Fe();function hX(e){return"name"in e&&e.name==="LiquidHTMLParsingError"&&"loc"in e}function mX(e,t){return e.replace(/Line \d+, col \d+:\s+/,"SyntaxError: ").replace(/(?!<expected ".+",) not .*/,` not "${t}"`)}Vh.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,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-html-syntax-error"},type:EM.SourceCodeType.LiquidHtml,severity:EM.Severity.ERROR,schema:{},targets:[]},create(e){let t=e.file.ast,n=e.themeDocset?.filters(),r=e.themeDocset?.tags();return(0,f0.isError)(t)?{async onCodePathStart(i){if(hX(t)){let{start:s,end:a}=t.loc,o=(0,f0.getOffset)(i.source,s.line,s.column),c=(0,f0.getOffset)(i.source,a.line,a.column);o===c&&(c+=1);let l=i.source.slice(o,c);e.report({message:mX(t.message,l),startIndex:o,endIndex:c})}else e.report({message:t.message,startIndex:0,endIndex:i.source.length})}}:{async BooleanExpression(i,s){if((0,Fh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=(0,lX.detectInvalidBooleanExpressions)(i,s);a&&e.report(a)},async LiquidTag(i,s){if((0,Fh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=[(0,uX.detectMultipleAssignValues)(i),(0,AM.detectInvalidEchoValue)(i),(0,fX.detectInvalidLoopRange)(i),(0,dX.detectInvalidLoopArguments)(i,await r)].filter(Boolean),o=(0,pX.detectConditionalNodeUnsupportedParenthesis)(i)||(0,OM.detectInvalidConditionalNode)(i);o&&a.push(o),a.forEach(e.report);let c=await(0,NM.detectInvalidFilterName)(i,await n);c.length>0&&c.forEach(f=>e.report(f));let l=await(0,PM.detectInvalidPipeSyntax)(i);l.length>0&&l.forEach(f=>e.report(f))},async LiquidBranch(i,s){if((0,Fh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=(0,OM.detectInvalidConditionalNode)(i);a&&e.report(a)},async LiquidVariableOutput(i,s){if((0,Fh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=await(0,NM.detectInvalidFilterName)(i,await n);a.length>0&&a.forEach(l=>e.report(l));let o=await(0,PM.detectInvalidPipeSyntax)(i);o.length>0&&o.forEach(l=>e.report(l));let c=(0,AM.detectInvalidEchoValue)(i);c&&e.report(c)}}}}});var IM=x($h=>{"use strict";d();Object.defineProperty($h,"__esModule",{value:!0});$h.MatchingTranslations=void 0;var LM=K(),qM=new Set(["zero","one","two","few","many","other"]);$h.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:LM.SourceCodeType.JSON,severity:LM.Severity.ERROR,schema:{},targets:[]},create(e){let t=new Set,n=new Set,r=new Map,i=e.file,s=i.uri,a=e.toRelativePath(s),o=i.ast,c=a.startsWith("locales/"),l=s.endsWith(".default.json")||s.endsWith(".default.schema.json"),f=s.endsWith(".schema.json");if(!c||l||o instanceof Error)return{};let m=()=>t.size>0,p=({type:A})=>A==="Literal",g=A=>qM.has(A.key.value),v=A=>A.startsWith("shopify.")||A.startsWith("customer_accounts."),b=A=>t.has(A)??!1,_=A=>[...qM].some(N=>A.endsWith(N)),k=A=>Object.keys(A).reduce((O,q)=>{if(typeof A[q]!="object")return O.concat(q);let j=A[q],M=k(j);return O.concat(M.map(C=>`${q}.${C}`))},[]),w=A=>A.filter(N=>N.type==="Property").reduce((N,O)=>N.concat(O.key.value),[]).join("."),T=(A,N)=>{let O=Math.min(A.length,N.length);for(let q=0;q<O;q++)if(A[q]!==N[q])return q;return O},y=A=>{let N=A.split("."),O="",q=0;for(let j of r.keys()){let M=j.split("."),C=T(M,N);C>q&&(q=C,O=j)}return r.get(O)??o};return{async onCodePathStart(){let N=await(f?e.getDefaultSchemaTranslations:e.getDefaultTranslations)().then(k);N.forEach(Set.prototype.add,t),N.forEach(Set.prototype.add,n)},async Property(A,N){let O=w(N.concat(A));if(r.set(O,A),!!m()&&!g(A)&&p(A.value)&&!v(O)){if(b(O)){n.delete(O);return}e.report({message:`A default translation for '${O}' does not exist`,startIndex:A.loc.start.offset,endIndex:A.loc.end.offset,suggest:[{message:"Delete unneeded translation key",fix(q){q.remove(O)}}]})}},async onCodePathEnd(){n.forEach(A=>{let N=y(A);_(A)||v(A)||e.report({message:`The translation for '${A}' is missing`,startIndex:N.loc.start.offset,endIndex:N.loc.end.offset,fix(O){O.add(A,"TODO")}})})}}}}});var RM=x(Uh=>{"use strict";d();Object.defineProperty(Uh,"__esModule",{value:!0});Uh.MissingAsset=void 0;var MM=K(),d0=In(),gX=Fe();Uh.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:MM.SourceCodeType.LiquidHtml,severity:MM.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidVariable(t){if(t.filters.length===0||t.filters[0].name!=="asset_url"||!(0,gX.isLiquidString)(t.expression))return;let n=t.expression,r=`assets/${n.value}`,i=r,s=await(0,d0.doesFileExist)(e,i);s||i.endsWith(".scss.css")&&(i=i.replace(".scss.css",".scss.liquid"),s=await(0,d0.doesFileExist)(e,i),s)||(i.endsWith(".js")||i.endsWith(".css"))&&(i+=".liquid",s=await(0,d0.doesFileExist)(e,i),s)||e.report({message:`'${r}' does not exist`,startIndex:n.position.start,endIndex:n.position.end})}}}}});var jM=x(Hh=>{"use strict";d();Object.defineProperty(Hh,"__esModule",{value:!0});Hh.MissingContentForArguments=void 0;var DM=K(),p0=ur();Hh.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:DM.SourceCodeType.LiquidHtml,severity:DM.Severity.WARNING,schema:{},targets:[]},create(e){return{async ContentForMarkup(t){let n=(0,p0.getBlockName)(t);if(!n)return;let r=await(0,p0.getLiquidDocParams)(e,`blocks/${n}.liquid`);if(!r)return;let i=new Map(t.args.map(a=>[a.name,a])),s=Array.from(r.values()).filter(a=>a.required&&!i.has(a.name));(0,p0.reportMissingArguments)(e,t,s,n)}}}}});var FM=x(zh=>{"use strict";d();Object.defineProperty(zh,"__esModule",{value:!0});zh.MissingRenderSnippetArguments=void 0;var BM=K(),h0=ur();zh.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:BM.SourceCodeType.LiquidHtml,severity:BM.Severity.WARNING,schema:{},targets:[]},create(e){return{async RenderMarkup(t){let n=(0,h0.getSnippetName)(t);if(!n)return;let r=await(0,h0.getLiquidDocParams)(e,`snippets/${n}.liquid`);if(!r)return;let i=new Map(t.args.map(a=>[a.name,a])),s=Array.from(r.values()).filter(a=>a.required&&!i.has(a.name)&&a.name!==t.alias?.value);(0,h0.reportMissingArguments)(e,t,s,n)}}}}});var VM=x(Gh=>{"use strict";d();Object.defineProperty(Gh,"__esModule",{value:!0});Gh.MissingTemplate=void 0;var m0=ue(),yX=hx(),Wh=K(),_X=In(),vX={ignoreMissing:Wh.SchemaProp.array(Wh.SchemaProp.string(),[])};Gh.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:Wh.SourceCodeType.LiquidHtml,severity:Wh.Severity.ERROR,schema:vX,targets:[]},create(e){let t=i=>typeof i.markup!="string";function n(i){return e.settings.ignoreMissing.some(s=>(0,yX.minimatch)(i,s))}async function r(i,{position:s}){await(0,_X.doesFileExist)(e,i)||n(i)||e.report({message:`'${i}' does not exist`,startIndex:s.start,endIndex:s.end})}return{async RenderMarkup(i){if(i.snippet.type===m0.NodeTypes.VariableLookup||i.snippet.type===m0.NodeTypes.Range)return;let s=i.snippet,a=`snippets/${s.value}.liquid`;await r(a,s)},async LiquidTag(i){if(!t(i)||i.name!==m0.NamedTags.section)return;let s=i.markup.name,a=`sections/${s.value}.liquid`;await r(a,s)}}}}});var UM=x(Jh=>{"use strict";d();Object.defineProperty(Jh,"__esModule",{value:!0});Jh.OrphanedSnippet=void 0;var bX=He(),$M=K();Jh.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:$M.SourceCodeType.LiquidHtml,severity:$M.Severity.WARNING,schema:{},targets:[]},create(e){return{async onCodePathEnd(){let{getReferences:t}=e;if(!t)return;let n=e.file.uri;(0,bX.isSnippet)(n)&&(await t(n)).length===0&&e.report({message:"This snippet is not referenced by any other files",startIndex:0,endIndex:1})}}}}});var WM=x(Yh=>{"use strict";d();Object.defineProperty(Yh,"__esModule",{value:!0});Yh.PaginationSize=void 0;var g0=ue(),Kh=K(),HM=Ce(),zM=Fe(),kX=Ge(),SX={minSize:Kh.SchemaProp.number(1),maxSize:Kh.SchemaProp.number(250)};Yh.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:Kh.SourceCodeType.LiquidHtml,severity:Kh.Severity.WARNING,schema:SX,targets:[]},create(e){let t=e.settings.minSize,n=e.settings.maxSize,r=[],i=[];function s(a,o,c=`Pagination size must be a positive integer between ${t} and ${n}.`){t<=o&&o<=n||e.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 o=a.markup.pageSize;(0,zM.isNodeOfType)(g0.NodeTypes.VariableLookup,o)?i.push(o):(0,zM.isNodeOfType)(g0.NodeTypes.Number,o)&&s(o,Number(o.value))},async LiquidRawTag(a){if(a.name==="schema"){let o=(0,kX.parseJSON)(a.body.value);if((0,HM.isError)(o))return;o.settings&&Array.isArray(o.settings)&&(r=o.settings)}},async onCodePathEnd(){i.forEach(a=>{let o=(0,HM.last)(a.lookups);if(o===void 0||o.type!==g0.NodeTypes.String)return;let c=o.value,l=r.find(f=>f.id===c);if(l!==void 0){if(l.default===void 0){e.report({message:"Default pagination size should be defined in the section settings.",startIndex:a.position.start,endIndex:a.position.end});return}s(a,l.default,`This setting's default value should be between ${t} and ${n} but is currently ${l.default}.`)}})}}}}});var JM=x(tc=>{"use strict";d();Object.defineProperty(tc,"__esModule",{value:!0});tc.scriptTagSuggestion=tc.liquidFilterSuggestion=void 0;var TX=Ce(),GM=e=>`Use an HTML script tag with the ${e} attribute instead`,wX=(e,t,n,r)=>({message:GM(e),fix(i){let a=`{{ ${t.source.slice(n.expression.position.start,(0,TX.last)(n.filters,-1)?.position.end??t.position.start)} }}`;i.replace(r.position.start,r.position.end,`<script src="${a}" ${e}></script>`)}});tc.liquidFilterSuggestion=wX;var xX=(e,t)=>({message:GM(e),fix(n){n.insert(t.blockStartPosition.end-1,` ${e}`)}});tc.scriptTagSuggestion=xX});var QM=x(Xh=>{"use strict";d();Object.defineProperty(Xh,"__esModule",{value:!0});Xh.ParserBlockingScript=void 0;var KM=ue(),YM=K(),y0=Ce(),di=Fe(),Qh=JM();Xh.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:YM.SourceCodeType.LiquidHtml,severity:YM.Severity.ERROR,schema:{},targets:[]},create(e){return{LiquidFilter:async(t,n)=>{if(t.name!=="script_tag")return;let i=t.source.slice(t.position.start,t.position.end).indexOf("script_tag"),s=(0,y0.last)(n),a=(0,y0.last)(n,-1);e.report({message:"The script_tag filter is parser-blocking. Use a <script> tag with async or defer for better performance",startIndex:t.position.start+i,endIndex:t.position.end,suggest:a&&a.type===KM.NodeTypes.LiquidVariableOutput&&s&&s.type===KM.NodeTypes.LiquidVariable&&(0,y0.last)(s.filters)===t?[(0,Qh.liquidFilterSuggestion)("defer",t,s,a),(0,Qh.liquidFilterSuggestion)("async",t,s,a)]:void 0})},HtmlRawNode:async t=>{if(t.name!=="script"||!t.attributes.filter(di.isValuedHtmlAttribute).some(s=>(0,di.isAttr)(s,"src")))return;let r=t.attributes.filter(di.isHtmlAttribute).some(s=>(0,di.isAttr)(s,"async")||(0,di.isAttr)(s,"defer")),i=t.attributes.filter(di.isValuedHtmlAttribute).some(s=>(0,di.isAttr)(s,"type")&&((0,di.hasAttributeValueOf)(s,"module")||(0,di.hasAttributeValueOf)(s,"importmap")));r||i||e.report({message:"Avoid parser blocking scripts by adding `defer` or `async` on this tag",startIndex:t.position.start,endIndex:t.position.end,suggest:[(0,Qh.scriptTagSuggestion)("defer",t),(0,Qh.scriptTagSuggestion)("async",t)]})}}}}});var eR=x(tm=>{"use strict";d();Object.defineProperty(tm,"__esModule",{value:!0});tm.SchemaPresetsBlockOrder=void 0;var Zh=Ge(),EX=He(),XM=K();tm.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:XM.SourceCodeType.LiquidHtml,severity:XM.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.blockStartPosition.end,r=await(0,EX.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let a=i.presets;a&&a.forEach((o,c)=>{"blocks"in o&&o.blocks&&ZM(o,e,n,s,["presets",String(c)])})}}}};function ZM(e,t,n,r,i){if("blocks"in e&&typeof e.blocks=="object"&&e.blocks){let s="block_order"in e?e.block_order:void 0;s||AX(e)&&em(t,n,r,i,"block_order is missing",!1),s?.forEach((a,o)=>{if(!e.blocks||!Array.isArray(e.blocks)&&!e.blocks[a]){let c=i.concat(["block_order"]).concat([String(o)]);em(t,n,r,c,`block '${a}' is missing from 'blocks'`)}});for(let[a,o]of Object.entries(e.blocks)){if(o.static){if(Array.isArray(s)&&s.includes(a)){let c=i.concat(["block_order"]);em(t,n,r,c,`static block '${a}' cannot be in the block_order`)}}else if(Array.isArray(s)&&!s.includes(a)){let c=i.concat(["block_order"]);em(t,n,r,c,`block '${a}' is missing from the block_order`)}o.blocks&&(i.push("blocks",a),ZM(o,t,n,r,i))}}}function AX(e){return"blocks"in e&&typeof e.blocks=="object"&&e.blocks!==null&&!Array.isArray(e.blocks)?Object.entries(e.blocks).some(([t,n])=>n.static!==!0):!1}function em(e,t,n,r,i,s=!0){let a=(0,Zh.nodeAtPath)(n,r),o=s?t+(0,Zh.getLocStart)(a):t+(0,Zh.getLocEnd)(a)-1,c=t+(0,Zh.getLocEnd)(a);e.report({message:i,startIndex:o,endIndex:c})}});var nm=x(_0=>{"use strict";d();Object.defineProperty(_0,"__esModule",{value:!0});_0.isContentForBlock=OX;function OX(e){return typeof e=="string"?!1:e.contentForType.value==="block"}});var nR=x(rm=>{"use strict";d();Object.defineProperty(rm,"__esModule",{value:!0});rm.SchemaPresetsStaticBlocks=void 0;var v0=ue(),nc=Ge(),NX=He(),tR=K(),PX=nm();rm.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:tR.SourceCodeType.LiquidHtml,severity:tR.Severity.ERROR,schema:{},targets:[]},create(e){let t=[],n=[],r=0;function i(){n.forEach(s=>{t.some(a=>a.id===s.id&&a.type===s.type)||e.report({message:`Static block ${s.id} is missing a corresponding content_for "block" tag.`,startIndex:s.startIndex,endIndex:s.endIndex})})}return{async LiquidTag(s){if(s.name!==v0.NamedTags.content_for||!(0,PX.isContentForBlock)(s.markup))return;let a=s.markup.args.find(l=>l.name==="id")?.value,o=s.markup.args.find(l=>l.name==="type")?.value;if(!o||o.type!==v0.NodeTypes.String)return;let c=o.value;a?.type===v0.NodeTypes.String&&t.push({id:a.value,type:c})},async LiquidRawTag(s){if(s.name==="schema"&&s.body.kind==="json"){r=s.blockStartPosition.end;let a=await(0,NX.getSchema)(e),{validSchema:o,ast:c}=a??{};if(!o||o instanceof Error||!c||c instanceof Error)return;let l=o.presets;if(!l)return;l.forEach((f,m)=>{if("blocks"in f&&f.blocks){let p=["presets",m,"blocks"];Array.isArray(f.blocks)?f.blocks.forEach((g,v)=>{if(g.static===!0&&g.id){let b=(0,nc.nodeAtPath)(c,p.concat([v]));n.push({id:g.id,type:g.type,startIndex:r+(0,nc.getLocStart)(b),endIndex:r+(0,nc.getLocEnd)(b)})}}):typeof f.blocks=="object"&&Object.entries(f.blocks).forEach(([g,v])=>{if(v.static===!0){let b=(0,nc.nodeAtPath)(c,p.concat(g));n.push({id:g,type:v.type,startIndex:r+(0,nc.getLocStart)(b),endIndex:r+(0,nc.getLocEnd)(b)})}})}})}},async onCodePathEnd(){i()}}}}});var aR=x(sm=>{"use strict";d();Object.defineProperty(sm,"__esModule",{value:!0});sm.RemoteAsset=void 0;var Zt=K(),rc=Fe(),CX=Ce(),LX=["img","link","source","script"],qX=["fonts.shopifycdn.com","cdn.shopify.com"],IX=["stylesheet_tag","script_tag","image_tag","img_tag"],iR=["product_img_url","article_img_url","collection_img_url","img_url"],sR=["asset_url","image_url","asset_img_url","file_img_url","file_url","global_asset_url","shopify_asset_url","external_video_url","font_url"],MX="canonical_url";function b0(e){return e.type===Zt.LiquidHtmlNodeTypes.LiquidVariableOutput}function k0(e){return typeof e!="string"&&e.type===Zt.LiquidHtmlNodeTypes.LiquidVariable}function RX(e){return e.startsWith("#")}function rR(e){return/^data:/i.test(e)}function il(e){return e.replace(/[“”‘’]/g,"")}function DX(e){let t=e.value[0];if(!t||!b0(t))return!1;let n=t.markup;return k0(n)?n.expression.type===Zt.LiquidHtmlNodeTypes.VariableLookup:!1}function im(e,t=[]){if(/^\/cdn\//.test(e))return!0;try{let n=new URL(e);return[...qX,...t].includes(n.hostname)}catch{return!1}}function jX(e,t=[]){return e.value.some(n=>{if(n.type===Zt.LiquidHtmlNodeTypes.TextNode&&/^(https?:)?\/\//.test(il(n.value))&&!im(il(n.value),t))return!0;if(b0(n)){let r=n.markup;if(k0(r)){let i=r.expression;if(i.type===Zt.LiquidHtmlNodeTypes.String&&/^https?:\/\//.test(i.value)&&!im(i.value,t))return!0}}return!1})}function BX(e){let t=[...iR,...sR],n=[MX];return e.value.some(r=>!b0(r)||!k0(r.markup)?!1:!!(r.markup.filters.some(s=>t.includes(s.name))||(0,rc.isNodeOfType)(Zt.LiquidHtmlNodeTypes.VariableLookup,r.markup.expression)&&r.markup.expression.name&&n.includes(r.markup.expression.name)))}function FX(e){return e.map(t=>{try{return new URL(t).hostname.replace(/^www\./,"")}catch{return}}).filter(t=>t!==void 0)}var VX={allowedDomains:Zt.SchemaProp.array(Zt.SchemaProp.string()).optional()};sm.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:Zt.SourceCodeType.LiquidHtml,severity:Zt.Severity.WARNING,schema:VX,targets:[]},create(e){let t=FX(e.settings.allowedDomains||[]);function n(i){let s=(0,rc.getHtmlNodeName)(i);if(!s||!LX.includes(s))return;let a=i.attributes.filter(rc.isValuedHtmlAttribute).find(m=>(0,rc.isAttr)(m,"src")||(0,rc.isAttr)(m,"href"));if(!a)return;let o=a.value.find(m=>m.type===Zt.LiquidHtmlNodeTypes.TextNode);if(o&&RX(il(o.value))||o&&rR(il(o.value))||DX(a)||a.value.filter(m=>m.type===Zt.LiquidHtmlNodeTypes.TextNode).some(m=>im(il(m.value),t)))return;if(jX(a,t)){e.report({message:"Asset should be served by the Shopify CDN for better performance.",startIndex:a.position.start,endIndex:a.position.end});return}BX(a)||e.report({message:"Use one of the asset_url filters to serve assets for better performance.",startIndex:a.position.start,endIndex:a.position.end})}function r(i,s){let a=i.name;if(!IX.includes(a))return;let o=(0,CX.last)(s);if(!o||!(0,rc.isNodeOfType)(Zt.LiquidHtmlNodeTypes.LiquidVariable,o)||o.filters.some(f=>iR.includes(f.name)||sR.includes(f.name)))return;let l=o.expression;l.type===Zt.LiquidHtmlNodeTypes.String&&rR(l.value)||(l.type===Zt.LiquidHtmlNodeTypes.String&&!im(l.value,t)&&e.report({message:"Asset should be served by the Shopify CDN for better performance.",startIndex:l.position.start,endIndex:l.position.end}),e.report({message:"Use one of the asset_url filters to serve assets for better performance.",startIndex:o.expression.position.start,endIndex:i.position.end}))}return{async HtmlVoidElement(i){n(i)},async HtmlSelfClosingElement(i){n(i)},async HtmlRawNode(i){n(i)},async LiquidFilter(i,s){r(i,s)}}}}});var cR=x(om=>{"use strict";d();Object.defineProperty(om,"__esModule",{value:!0});om.RequiredLayoutThemeObject=void 0;var am=K(),oR=Fe(),$X=/^layout\/[^/]+\.liquid$/i;om.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:am.SourceCodeType.LiquidHtml,severity:am.Severity.ERROR,schema:{},targets:[am.ConfigTarget.All,am.ConfigTarget.Recommended]},create(e){if(!$X.test(e.toRelativePath(e.file.uri)))return{};let t=["content_for_header","content_for_layout"],n=new Set,r,i;function s(a){a.name&&t.includes(a.name)&&n.add(a.name)}return{async VariableLookup(a){s(a)},async HtmlElement(a){(0,oR.isHtmlTag)(a,"head")?r=a:(0,oR.isHtmlTag)(a,"body")&&(i=a)},async onCodePathEnd(){for(let a of t)if(!n.has(a)){let o=`The required object '{{ ${a} }}' is missing in layout/theme.liquid`,c=a==="content_for_header"?r:i,l=c?.blockEndPosition.start;e.report({message:o,startIndex:c?.position.start??0,endIndex:c?.position.end??0,fix:l!==void 0?f=>f.insert(l,`{{ ${a} }}`):void 0})}}}}}});var lR=x(cm=>{"use strict";d();Object.defineProperty(cm,"__esModule",{value:!0});cm.ReservedDocParamNames=void 0;var UX=ue(),uR=K(),HX=new Set(Object.keys(UX.LiquidLiteralValues));cm.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:uR.SourceCodeType.LiquidHtml,severity:uR.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidDocParamNode(t){let n=t.paramName.value;HX.has(n)&&e.report({message:`The parameter name '${n}' is reserved because Liquid parses it as a literal.`,startIndex:t.paramName.position.start,endIndex:t.paramName.position.end})}}}}});var dR=x(lm=>{"use strict";d();Object.defineProperty(lm,"__esModule",{value:!0});lm.StaticStylesheetAndJavascriptTags=void 0;var um=ue(),fR=K();lm.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:fR.SourceCodeType.LiquidHtml,severity:fR.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="stylesheet"&&t.name!=="javascript")return;let n=t.body.nodes.filter(r=>r.type===um.NodeTypes.LiquidVariableOutput||r.type===um.NodeTypes.LiquidTag||r.type===um.NodeTypes.LiquidRawTag);for(let r of n){let i=t.name==="stylesheet"?"CSS":"JavaScript",s=r.type===um.NodeTypes.LiquidVariableOutput?"variable":"tag";e.report({message:`Liquid ${s} found in ${i} block. {% ${t.name} %} tags should only contain static ${i} code.`,startIndex:r.position.start,endIndex:r.position.end})}}}}}});var mR=x(fm=>{"use strict";d();Object.defineProperty(fm,"__esModule",{value:!0});fm.TranslationKeyExists=void 0;var zX=Ge(),pR=K(),WX=Ce();function hR(e,t){for(let n of e.split(".")){if(typeof t!="object"||!t.hasOwnProperty(n))return!1;t=t[n]}return!0}fm.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:pR.SourceCodeType.LiquidHtml,severity:pR.Severity.ERROR,schema:{},targets:[]},create(e){let t=[],n;return{async LiquidVariable(r){r.expression.type==="String"&&r.filters.some(({name:i})=>["t","translate"].includes(i))&&t.push({translationKey:r.expression.value,startIndex:r.expression.position.start,endIndex:r.expression.position.end})},async LiquidRawTag(r){if(r.name!=="schema"||r.body.kind!=="json")return;let i=await e.getDefaultLocale(),s=(0,zX.parseJSON)(r.body.value);(0,WX.isError)(s)&&s instanceof SyntaxError||(n=s.locales?.[i])},async onCodePathEnd(){let r=await e.getDefaultTranslations(),i=await e.getDefaultLocale(),s=await e.themeDocset?.systemTranslations(),a=Object.keys(s??{});!r&&a.length===0||t.forEach(({translationKey:o,startIndex:c,endIndex:l})=>{if(hR(o,r)||hR(o,n)||a.includes(o))return;let f=`'${o}' does not have a matching entry in 'locales/${i}.default.json'`;n&&(f+=` or '${e.toRelativePath(e.file.uri)}'`),e.report({message:f,startIndex:c,endIndex:l})})}}}}});var kR=x(pm=>{"use strict";d();Object.defineProperty(pm,"__esModule",{value:!0});pm.UnclosedHTMLElement=void 0;var et=ue(),gR=K(),S0=Ce(),yR=Fe();pm.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:gR.SourceCodeType.LiquidHtml,severity:gR.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Map;return{async HtmlElement(n,r){if(GX(n))return;let[i,s]=(0,S0.findLastAndIndex)(r,yR.isLiquidBranch);if(!i)return;let a=r[s-1],o=r[s-2];if(!a||!o||a.type!==et.NodeTypes.LiquidTag)return;t.has(o)||t.set(o,{open:new Map,close:new Map,identifiers:new Set});let c=t.get(o),l=_R(i,a);c.identifiers.add(l),c.open.has(l)||c.open.set(l,[]),c.open.get(l).push(n)},async HtmlDanglingMarkerClose(n,r){let[i,s]=(0,S0.findLastAndIndex)(r,yR.isLiquidBranch);if(!i)return;let a=r[s-1],o=r[s-2];if(!a||!o||a.type!==et.NodeTypes.LiquidTag)return;t.has(o)||t.set(o,{open:new Map,close:new Map,identifiers:new Set});let c=t.get(o),l=_R(i,a);c.identifiers.add(l),c.close.has(l)||c.close.set(l,[]),c.close.get(l).push(n)},async onCodePathEnd(){for(let[n,r]of t){let i=new Map;for(let c of r.identifiers){let l=r.open.get(c)??[],f=r.close.get(c)??[],m=[].concat(l,f).sort((p,g)=>p.position.start-g.position.start);i.set(c,bR(m))}let s=[].concat(...i.values()).sort((c,l)=>c.position.start-l.position.start),a=bR(s),o=new Set(a);for(let[c,l]of i)for(let f of l)o.has(f)&&(f.type===et.NodeTypes.HtmlDanglingMarkerClose?e.report({message:`Closing tag does not have a matching opening tag for condition \`${c}\` in ${n.type} '${dm(n)}'`,startIndex:f.position.start,endIndex:f.position.end}):e.report({message:`Opening tag does not have a matching closing tag for condition \`${c}\` in ${n.type} '${dm(n)}'`,startIndex:f.blockStartPosition.start,endIndex:f.blockStartPosition.end}))}}}}};function GX(e){return e.blockEndPosition.start!==e.blockEndPosition.end}function _R(e,t){if(e.name===null)switch(t.name){case et.NamedTags.if:return en(t.markup);case et.NamedTags.unless:return vR(en(t.markup));default:return"??"}switch(e.name){case"else":switch(t.name){case et.NamedTags.if:return vR(en(t.markup));case et.NamedTags.unless:return en(t.markup);case et.NamedTags.case:return`case ${en(t.markup)}`;default:return"??"}case et.NamedTags.elsif:return en(e.markup);case et.NamedTags.when:return t.name!==et.NamedTags.case?"??":`case ${en(t.markup)} == ${JX(e.markup)}`;default:return"??"}}function JX(e){return typeof e=="string"?e:e.map(en).join(" or ")}function en(e){if(typeof e=="string")return e;switch(e.type){case et.NodeTypes.String:return"'"+e.value+"'";case et.NodeTypes.LiquidLiteral:return e.value===null?"null":e.value.toString();case et.NodeTypes.Number:return e.value;case et.NodeTypes.VariableLookup:return`${e.name??""}${e.lookups.map(t=>`[${en(t)}]`)}`;case et.NodeTypes.Range:return`(${en(e.start)}..${en(e.end)})`;case et.NodeTypes.Comparison:return[en(e.left),e.comparator,en(e.right)].join(" ");case et.NodeTypes.LogicalExpression:return[en(e.left),e.relation,en(e.right)].join(" ");default:return(0,S0.assertNever)(e)}}function vR(e){return e.startsWith("-")?e.slice(1):`-${e}`}function bR(e){let t=[];for(let n of e)n.type===et.NodeTypes.HtmlElement?t.push(n):t.length>0&&dm(n)===dm(t.at(-1))&&t.at(-1).type===et.NodeTypes.HtmlElement&&n.type===et.NodeTypes.HtmlDanglingMarkerClose?t.pop():t.push(n);return t}function dm(e){return e.type===et.NodeTypes.HtmlElement||e.type===et.NodeTypes.HtmlDanglingMarkerClose?e.name.length===0?"":e.source.slice(e.name.at(0).position.start,e.name.at(-1).position.end):e.type===et.NodeTypes.LiquidTag?e.name:e.type}});var T0=x(hm=>{"use strict";d();Object.defineProperty(hm,"__esModule",{value:!0});hm.hasLiquidDoc=KX;hm.extractDocDefinition=YX;var TR=ii();function KX(e){let t=!1;return(0,TR.visit)(e,{LiquidRawTag(n){n.name==="doc"&&(t=!0)}}),t}function YX(e,t){let n=!1,r=(0,TR.visit)(t,{LiquidRawTag(o){o.name==="doc"&&(n=!0)},LiquidDocParamNode(o){return{name:o.paramName.value,description:o.paramDescription?.value??null,type:o.paramType?.value??null,required:o.required,nodeType:"param"}},LiquidDocExampleNode(o){return{content:SR(o.content.value.trim()),nodeType:"example"}},LiquidDocDescriptionNode(o){return{content:SR(o.content.value.trim()),nodeType:"description"}}});if(!n)return{uri:e};let{parameters:i,examples:s,description:a}=r.reduce((o,c)=>(c.nodeType==="param"?o.parameters.push(c):c.nodeType==="example"?o.examples.push(c):c.nodeType==="description"&&!o.description&&(o.description=c),o),{parameters:[],examples:[],description:void 0});return{uri:e,liquidDoc:{...i.length&&{parameters:i},...s.length&&{examples:s},...a&&{description:a}}}}function SR(e){let t=e.split(`
|
|
84
|
+
`);if(t.length<=1)return e;let r=t.slice(1).filter(s=>s.trim().length>0).map(s=>{let a=s.match(/^\s*/);return a?a[0].length:0});if(r.length===0)return e;let i=Math.min(...r);return[t[0],...t.slice(1).map(s=>s.trim().length===0?s:s.slice(i))].join(`
|
|
85
|
+
`)}});var NR=x(Ir=>{"use strict";d();var QX=Ir&&Ir.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),XX=Ir&&Ir.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ZX=Ir&&Ir.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&QX(n,t,r[i]);return XX(n,t),n}})();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.UndefinedObject=void 0;var va=ue(),eZ=ai(),tZ=ZX(xr()),nZ=He(),wR=K(),xR=Ce(),rZ=T0(),ER=Fe();Ir.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:wR.SourceCodeType.LiquidHtml,severity:wR.Severity.WARNING,schema:{},targets:[]},create(e){let t=e.toRelativePath(e.file.uri),n=e.file.ast;if((0,xR.isError)(n))return{};if(t.startsWith("snippets/")&&!(0,rZ.hasLiquidDoc)(n))return{};if(!e.themeDocset)return{};let r=e.themeDocset,i=new Map,s=new Set(sZ(t)),a=[];function o(c,l){if(!c)return;let f=i.get(c)??[];i.set(c,f.concat(l))}return{async LiquidDocParamNode(c){let l=c.paramName?.value;l&&s.add(l)},async LiquidTag(c,l){(0,ER.isWithinRawTagThatDoesNotParseItsContents)(l)||(fZ(c)&&o(c.markup.name,{start:c.blockStartPosition.end}),OR(c)&&o(c.markup.name,{start:c.blockEndPosition?.end}),["form","paginate"].includes(c.name)&&o(c.name,{start:c.blockStartPosition.end,end:c.blockEndPosition?.start}),c.name==="layout"&&o("none",{start:c.position.start,end:c.position.end}),(hZ(c)||mZ(c))&&c.markup.name!==null&&o(c.markup.name,{start:c.position.start}),(dZ(c)||pZ(c))&&(o(c.markup.variableName,{start:c.blockStartPosition.end,end:c.blockEndPosition?.start}),o(c.name==="for"?"forloop":"tablerowloop",{start:c.blockStartPosition.end,end:c.blockEndPosition?.start})))},async VariableLookup(c,l){if((0,ER.isWithinRawTagThatDoesNotParseItsContents)(l))return;let f=(0,xR.last)(l);lZ(f)&&OR(f)||a.push(c)},async onCodePathEnd(){(await iZ(r,t,e.mode)).forEach(l=>s.add(l.name)),(await aZ(e)).forEach(l=>s.add(l)),a.forEach(l=>{!l.name||cZ(l.name,l.position,s,i)||e.report({message:`Unknown object '${l.name}' used.`,startIndex:l.position.start,endIndex:l.position.end})})}}}};async function iZ(e,t,n="theme"){let r=await e.objects(),i=oZ(t,n);return r.filter(({access:a,name:o})=>i.includes(o)||!a||a.global===!0||a.template.length>0)}function sZ(e){return e.startsWith("blocks/")?[eZ.BLOCK_CONTENT_PARAMETER]:[]}async function aZ(e){return(0,nZ.isBlock)(e.file.uri)?[...(await e.getBlockParameters(tZ.basename(e.file.uri,".liquid")))?.keys()??[]]:[]}var AR=["app","section","recommendations","block"];function oZ(e,t="theme"){return e.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"]:e.startsWith("sections/")?["section","predictive_search","recommendations","comment"]:e.startsWith("blocks/")?AR:e.startsWith("snippets/")?t==="app"?AR:["app","section","block"]:[]}function cZ(e,t,n,r){if(n.has(e))return!0;let i=r.get(e);return i?i.some(s=>uZ(t,s)):!1}function uZ(e,t){let n=e.start,r=!t.start||n>t.start,i=!t.end||n<t.end;return r&&i}function lZ(e){return e?.type===va.NodeTypes.LiquidTag}function OR(e){return e.name===va.NamedTags.capture}function fZ(e){return e.name===va.NamedTags.assign&&typeof e.markup!="string"}function dZ(e){return e.name===va.NamedTags.for&&typeof e.markup!="string"}function pZ(e){return e.name===va.NamedTags.tablerow&&typeof e.markup!="string"}function hZ(e){return e.name===va.NamedTags.increment&&typeof e.markup!="string"}function mZ(e){return e.name===va.NamedTags.decrement&&typeof e.markup!="string"}});var CR=x(mm=>{"use strict";d();Object.defineProperty(mm,"__esModule",{value:!0});mm.UniqueDocParamNames=void 0;var PR=K();mm.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:PR.SourceCodeType.LiquidHtml,severity:PR.Severity.ERROR,schema:{},targets:[]},create(e){let t=new Set;return{async LiquidDocParamNode(n){let r=n.paramName.value;if(!t.has(r)){t.add(r);return}e.report({message:`The parameter '${r}' is defined more than once.`,startIndex:n.paramName.position.start,endIndex:n.paramName.position.end})}}}}});var gm=x(Gi=>{"use strict";d();Object.defineProperty(Gi,"__esModule",{value:!0});Gi.CLOSEST_ARGUMENT=Gi.REQUIRED_CONTENT_FOR_ARGUMENTS=Gi.RESERVED_CONTENT_FOR_ARGUMENTS=void 0;Gi.RESERVED_CONTENT_FOR_ARGUMENTS=["attributes","block","blocks","class","context","inherit","resource","resources","schema","section","sections","settings","snippet","snippets","src","style","styles","template","templates"];Gi.REQUIRED_CONTENT_FOR_ARGUMENTS=["id","type"];Gi.CLOSEST_ARGUMENT="closest."});var IR=x(ym=>{"use strict";d();Object.defineProperty(ym,"__esModule",{value:!0});ym.UniqueStaticBlockId=void 0;var w0=ue(),LR=K(),qR=gm(),gZ=nm(),yZ=new Set([...qR.REQUIRED_CONTENT_FOR_ARGUMENTS,...qR.RESERVED_CONTENT_FOR_ARGUMENTS]);ym.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:LR.SourceCodeType.LiquidHtml,severity:LR.Severity.ERROR,schema:{},targets:[]},create(e){let t=new Set;return{async LiquidTag(n){if(n.name!==w0.NamedTags.content_for||!(0,gZ.isContentForBlock)(n.markup))return;let r=n.markup.args.find(f=>f.name==="id");if(!r)return;let i=r.value;if(i.type!==w0.NodeTypes.String)return;let s=i.value,a=n.markup.args.filter(f=>!yZ.has(f.name)),o=[];for(let f of a){if(f.value.type!==w0.NodeTypes.String)return;o.push(`${f.name}=${f.value.value}`)}o.sort();let c=o.join(","),l=`${s}::${c}`;t.has(l)?e.report({message:`The id '${s}' is already being used by another static block`,startIndex:i.position.start,endIndex:i.position.end,suggest:[]}):t.add(l)}}}}});var RR=x(_m=>{"use strict";d();Object.defineProperty(_m,"__esModule",{value:!0});_m.UnknownFilter=void 0;var MR=K();_m.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:MR.SourceCodeType.LiquidHtml,severity:MR.Severity.ERROR,schema:{},targets:[]},create(e){return e.themeDocset?{async LiquidFilter(t){(await e.themeDocset.filters()).some(r=>r.name===t.name)||e.report({message:`Unknown filter '${t.name}' used.`,startIndex:t.position.start+1,endIndex:t.position.end})}}:{}}}});var jR=x(vm=>{"use strict";d();Object.defineProperty(vm,"__esModule",{value:!0});vm.UnrecognizedContentForArguments=void 0;var DR=K(),x0=ur(),E0=gm();vm.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:DR.SourceCodeType.LiquidHtml,severity:DR.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Set([...E0.RESERVED_CONTENT_FOR_ARGUMENTS,...E0.REQUIRED_CONTENT_FOR_ARGUMENTS]);return{async ContentForMarkup(n){let r=(0,x0.getBlockName)(n);if(!r)return;let i=await(0,x0.getLiquidDocParams)(e,`blocks/${r}.liquid`);if(!i)return;let s=n.args.filter(a=>!i.has(a.name)).filter(a=>!t.has(a.name)).filter(a=>!a.name.startsWith(E0.CLOSEST_ARGUMENT));(0,x0.reportUnknownArguments)(e,n,s,r)}}}}});var FR=x(bm=>{"use strict";d();Object.defineProperty(bm,"__esModule",{value:!0});bm.UnrecognizedRenderSnippetArguments=void 0;var BR=K(),A0=ur();bm.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:BR.SourceCodeType.LiquidHtml,severity:BR.Severity.WARNING,schema:{},targets:[]},create(e){function t(n,r,i){let s=n.alias,a=n.variable;if(s&&!r.has(s.value)&&a){let o=a.position.start;e.report({message:`Unknown argument '${s.value}' in render tag for snippet '${i}'.`,startIndex:o,endIndex:s.position.end,suggest:[{message:`Remove '${s.value}'`,fix:c=>{if(a)return c.remove(a.position.start-1,s.position.end)}}]})}}return{async RenderMarkup(n){let r=(0,A0.getSnippetName)(n);if(!r)return;let i=await(0,A0.getLiquidDocParams)(e,`snippets/${r}.liquid`);if(!i)return;let s=n.args.filter(a=>!i.has(a.name));t(n,i,r),(0,A0.reportUnknownArguments)(e,n,s,r)}}}}});var N0=x(Rt=>{"use strict";d();Object.defineProperty(Rt,"__esModule",{value:!0});Rt.offsetAdjust=Rt.adjustedSuffix=Rt.adjustedPrefix=Rt.variableExpressionMatcher=void 0;Rt.getVariableLookupsInExpression=bZ;Rt.validateLookup=kZ;Rt.getGlobalSettings=TZ;var O0=ue(),_Z=Ge(),vZ=ii();Rt.variableExpressionMatcher=/{{(.+?)}}/;Rt.adjustedPrefix="{% if ";Rt.adjustedSuffix=" %}{% endif %}";Rt.offsetAdjust=2-Rt.adjustedPrefix.length;function bZ(e){let t=Rt.variableExpressionMatcher.exec(e);if(t==null)return{warning:'Invalid visible_if expression. It should take the form "{{ <expression> }}".'};let n=t[1],r=`${Rt.adjustedPrefix}${n}${Rt.adjustedSuffix}`;try{let i=(0,O0.toLiquidHtmlAST)(r,{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:"Syntax error: cannot parse visible_if expression."};if(a.type===O0.NodeTypes.LiquidLiteral&&["true","false"].includes(a.keyword))return null;let o=(0,vZ.visit)(s,{VariableLookup:c=>c});return o.length===0?{warning:"visible_if expression contains no references to any settings. This is likely an error."}:o}catch(i){return i instanceof SyntaxError?{warning:"Syntax error: cannot parse visible_if expression."}:{warning:String(i)}}}function kZ(e,t){let n=SZ(e),r=[],i=t;for(;n.length>0;){let s=n.shift();r.push(s);let a=i[s];if(!a)return`Invalid variable: "${r.join(".")}" was not found.`;if(typeof a=="boolean")return n.length>0?`Invalid variable: "${r.join(".")}" refers to a variable, but is being used here as a namespace.`:null;i=a}return`Invalid variable: "${r.join(".")}" refers to a namespace, but is being used here as a variable.`}function SZ(e){let t=e.lookups.map(n=>{if(n.type!==O0.NodeTypes.String)throw new Error(`Expected lookups to be String nodes: ${JSON.stringify(n)}`);return n.value});return[e.name,...t]}async function TZ(e){let t=[];try{let n=e.toUri("config/settings_schema.json"),r=await e.fs.readFile(n),i=(0,_Z.parseJSON)(r);if(Array.isArray(i))for(let s of i)"settings"in s&&Array.isArray(s.settings)&&t.push(...s.settings.map(a=>a.id).filter(a=>a))}catch(n){console.error("Error fetching global settings:",n)}return t}});var HR=x(Sm=>{"use strict";d();Object.defineProperty(Sm,"__esModule",{value:!0});Sm.UnusedAssign=void 0;var UR=ue(),VR=K(),wZ=He(),$R=Fe(),xZ=N0();Sm.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:VR.SourceCodeType.LiquidHtml,severity:VR.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Map,n=new Set;function r(i){i.type===UR.NodeTypes.VariableLookup&&n.add(i.name)}return{async LiquidTag(i,s){(0,$R.isWithinRawTagThatDoesNotParseItsContents)(s)||(EZ(i)||km(i)&&i.markup.name)&&t.set(i.markup.name,i)},async VariableLookup(i,s){if((0,$R.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=s.at(-1);a&&km(a)||r(i)},async LiquidRawTag(i){if(i.name!=="schema"||i.body.kind!=="json")return;let a=(await(0,wZ.getSchema)(e))?.validSchema;if(!(!a||a instanceof Error))for(let o of a.settings??[]){if(!("visible_if"in o)||typeof o.visible_if!="string")continue;let c=(0,xZ.getVariableLookupsInExpression)(o.visible_if);if(!(!c||"warning"in c))for(let l of c)l.name&&n.add(l.name)}},async onCodePathEnd(){for(let[i,s]of t.entries())!n.has(i)&&!i.startsWith("_")&&e.report({message:`The variable '${i}' is assigned but not used`,startIndex:km(s)?s.blockStartPosition.start:s.position.start,endIndex:km(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 EZ(e){return e.name==="assign"&&typeof e.markup!="string"}function km(e){return e.type==UR.NodeTypes.LiquidTag&&e.name==="capture"&&typeof e.markup!="string"}});var WR=x(Tm=>{"use strict";d();Object.defineProperty(Tm,"__esModule",{value:!0});Tm.UnsupportedDocTag=void 0;var zR=K(),AZ=$i();Tm.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:zR.SourceCodeType.LiquidHtml,severity:zR.Severity.ERROR,schema:{},targets:[]},create(e){return(0,AZ.filePathSupportsLiquidDoc)(e.file.uri)?{}:{async LiquidRawTag(n){n.name==="doc"&&e.report({message:"The `doc` tag can only be used within a snippet or block.",startIndex:n.position.start,endIndex:n.position.end,suggest:[{message:"Remove unsupported `doc` tag",fix:r=>r.remove(n.position.start,n.position.end)}]})}}}}});var JR=x(wm=>{"use strict";d();Object.defineProperty(wm,"__esModule",{value:!0});wm.UnsupportedFilterArguments=void 0;var P0=ue(),GR=K(),OZ=[P0.NamedTags.render,P0.NamedTags.include,P0.NamedTags.content_for];function NZ(e){let t=null;for(let n=0;n<e.length;n++){let r=e[n];if(t){r===t&&(t=null);continue}if(r==="'"||r==='"'){t=r;continue}if(r==="|")return n}return-1}wm.UnsupportedFilterArguments={meta:{code:"UnsupportedFilterArguments",name:"Unsupported Filter Arguments",docs:{description:"This check warns against using filters on values passed as arguments to a 'render', 'include', or 'content_for' tag. Filters are not applied in that position and the value is passed through unchanged, which silently produces incorrect output.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unsupported-filter-arguments"},type:GR.SourceCodeType.LiquidHtml,severity:GR.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(!OZ.includes(t.name)||typeof t.markup!="string")return;let n=NZ(t.markup);if(n===-1)return;let r=t.source.indexOf(t.markup,t.position.start);if(r===-1)return;let i=r+n,s=r+t.markup.length;e.report({message:`Filters cannot be used on arguments passed to the '${t.name}' tag. Apply the filter beforehand (e.g. with {% assign %}) and pass the result instead.`,startIndex:i,endIndex:s})}}}}});var YR=x(xm=>{"use strict";d();Object.defineProperty(xm,"__esModule",{value:!0});xm.UnusedDocParam=void 0;var PZ=ue(),KR=K(),CZ=Fe();xm.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:KR.SourceCodeType.LiquidHtml,severity:KR.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Map,n=new Set;return{async LiquidDocParamNode(r){t.set(r.paramName.value,r)},async VariableLookup(r,i){r.type===PZ.NodeTypes.VariableLookup&&r.name&&!(0,CZ.isLoopScopedVariable)(r.name,i)&&n.add(r.name)},async onCodePathEnd(){for(let[r,i]of t.entries())n.has(r)||e.report({message:`The parameter '${r}' is defined but not used in this file.`,startIndex:i.position.start,endIndex:i.position.end,suggest:[{message:`Remove unused parameter '${r}'`,fix:s=>s.remove(i.position.start,i.position.end)}]})}}}}});var XR=x(Em=>{"use strict";d();Object.defineProperty(Em,"__esModule",{value:!0});Em.ValidContentForArguments=void 0;var LZ=ue(),QR=K(),C0=gm();Em.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:QR.SourceCodeType.LiquidHtml,severity:QR.Severity.ERROR,schema:{},targets:[]},create(e){let t={blocks:n=>{let r=n.args.filter(i=>!i.name.startsWith(C0.CLOSEST_ARGUMENT));for(let i of r)e.report({message:`{% content_for "blocks" %} only accepts 'closest.*' arguments`,startIndex:i.position.start,endIndex:i.position.end})},block:n=>{for(let i of C0.REQUIRED_CONTENT_FOR_ARGUMENTS){let s=n.args.find(o=>o.name===i);if(!s){e.report({message:`{% content_for "block" %} requires a '${i}' argument`,startIndex:n.position.start,endIndex:n.position.end,suggest:[]});continue}let a=s.value;a.type!==LZ.NodeTypes.String&&e.report({message:`The '${i}' argument should be a string`,startIndex:a.position.start,endIndex:a.position.end,suggest:[]})}let r=n.args.filter(i=>C0.RESERVED_CONTENT_FOR_ARGUMENTS.includes(i.name));for(let i of r)e.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(n){if(n.name!=="content_for"||typeof n.markup=="string")return;let r=n.markup.contentForType.value,i=t[r];i&&i(n.markup)}}}}});var eD=x(Om=>{"use strict";d();Object.defineProperty(Om,"__esModule",{value:!0});Om.ValidContentForArgumentTypes=void 0;var ZR=K(),Am=ur();Om.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:ZR.SourceCodeType.LiquidHtml,severity:ZR.Severity.WARNING,schema:{},targets:[]},create(e){return{async ContentForMarkup(t){let n=(0,Am.getBlockName)(t);if(!n)return;let r=await(0,Am.getLiquidDocParams)(e,`blocks/${n}.liquid`);if(!r)return;let i=(0,Am.findTypeMismatchParams)(r,t.args);(0,Am.reportTypeMismatches)(e,i,r)}}}}});var rD=x(Nm=>{"use strict";d();Object.defineProperty(Nm,"__esModule",{value:!0});Nm.ValidBlockTarget=void 0;var L0=Ge(),qZ=He(),tD=K(),Un=Ce();Nm.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:tD.SourceCodeType.LiquidHtml,severity:tD.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.blockStartPosition.end,r=await(0,qZ.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!s||s instanceof Error||!r)return;let{staticBlockDefs:a}=r,{rootLevelThemeBlocks:o,rootLevelLocalBlocks:c,presetLevelBlocks:l,defaultLevelBlocks:f,hasRootBlocksDeclaration:m}=(0,Un.getBlocks)(i);if(c.length>0)return;let p=!1;if(await Promise.all(o.map(async({node:g,path:v})=>{let b=(0,L0.nodeAtPath)(s,v);await(0,Un.validateBlockFileExistence)(g.type,e)||(p=!0,(0,Un.reportWarning)(q0(g.type),n,b,e))})),!p){for(let[g,v]of Object.entries(l))parseInt(g,10)===0&&await Promise.all(v.map(async({node:_,path:k})=>{let w=(0,L0.nodeAtPath)(s,k),T="id"in _?_.id:k.at(-2),y=!!_.static;if((0,Un.isInvalidPresetBlock)(T,_,o,a,m)){let N=y?`Could not find a static block of type "${_.type}" with id "${T}" in this file.`:nD(_);(0,Un.reportWarning)(N,n,w,e)}await(0,Un.validateBlockFileExistence)(_.type,e)?"blocks"in _&&_.blocks&&await(0,Un.validateNestedBlocks)(e,_,_.blocks,k.slice(0,-1),n,s):(0,Un.reportWarning)(q0(_.type),n,w,e)}));await Promise.all(f.map(async({node:g,path:v})=>{let b=(0,L0.nodeAtPath)(s,v);(0,Un.isInvalidDefaultBlock)(g,o,m)&&(0,Un.reportWarning)(nD(g),n,b,e),await(0,Un.validateBlockFileExistence)(g.type,e)||(0,Un.reportWarning)(q0(g.type),n,b,e)}))}}}}};function nD(e){return e.type.startsWith("_")?`Theme block type "${e.type}" is a private block so it must be explicitly allowed in "blocks" at the root of this schema.`:`Theme block type "${e.type}" must be allowed in "blocks" at the root of this schema.`}function q0(e){return`Theme block 'blocks/${e}.liquid' does not exist.`}});var aD=x(Pm=>{"use strict";d();Object.defineProperty(Pm,"__esModule",{value:!0});Pm.ValidScopedCSSClass=void 0;var iD=K(),IZ=Yp(),sl=ip(),I0=fp();async function sD(e,t,n){let r=new Set;try{let i=t("assets"),a=(await e.readDirectory(i)).filter(([c])=>c.endsWith(".css")).map(([c])=>c),o=await Promise.all(a.map(c=>n(c)));for(let c of o)for(let l of c)r.add(l)}catch{}return r}async function MZ(e,t,n){let r=new Set,i=await sD(e,t,n);for(let s of i)r.add(s);try{let s=t(""),a=await(0,IZ.recursiveReadDirectory)(e,s,([c])=>c.endsWith(".liquid")),o=await Promise.all(a.map(c=>n(c)));for(let c of o)for(let l of c)r.add(l)}catch{}return r}Pm.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:iD.SourceCodeType.LiquidHtml,severity:iD.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Set,n=[];return{async LiquidRawTag(r){if(r.name==="stylesheet")for(let i of(0,sl.extractCSSClassNames)(r.body.value))t.add(i)},async HtmlElement(r){(0,sl.collectUsedClasses)(r.attributes,n)},async HtmlVoidElement(r){(0,sl.collectUsedClasses)(r.attributes,n)},async HtmlSelfClosingElement(r){(0,sl.collectUsedClasses)(r.attributes,n)},async HtmlRawNode(r){r.name==="svg"&&(0,sl.collectUsedClassesFromSvg)(r.attributes,r.body.value,r.body.position.start,n)},async onCodePathEnd(){if(n.length===0)return;let{getReferences:r,getDependencies:i,getCSSClassesForURI:s,fs:a,toUri:o}=e;if(!r||!i||!s)return;let c=new Set(t),l=await sD(a,o,s);for(let k of l)c.add(k);let f=await(0,I0.getAncestorUris)(e.file.uri,r),m=await Promise.all(f.map(k=>s(k)));for(let k of m)for(let w of k)c.add(w);let p=[e.file.uri,...f],g=[];for(let k of p){let w=await(0,I0.getRenderedSnippetUris)(k,i);g.push(...w)}let v=await(0,I0.getAllSnippetDescendantUris)(g,i),b=await Promise.all(v.map(k=>s(k)));for(let k of b)for(let w of k)c.add(w);let _=await MZ(a,o,s);for(let{className:k,startIndex:w,endIndex:T}of n)_.has(k)&&!c.has(k)&&e.report({message:`CSS class '${k}' may be defined outside the scope of this file.`,startIndex:w,endIndex:T})}}}}});var cD=x(Cm=>{"use strict";d();Object.defineProperty(Cm,"__esModule",{value:!0});Cm.ValidHTMLTranslation=void 0;var oD=K(),RZ=ue();Cm.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:oD.SourceCodeType.JSON,severity:oD.Severity.WARNING,schema:{},targets:[]},create(e){return e.toRelativePath(e.file.uri).startsWith("locales/")?{async Literal(n){let r=/<[^>]+>/;if(!(typeof n.value!="string"||!r.test(n.value)))try{(0,RZ.toLiquidHtmlAST)(n.value)}catch(i){let s=n.loc,a={message:`${i}.`,startIndex:s.start.offset,endIndex:s.end.offset};e.report(a)}}}:{}}}});var lD=x(Lm=>{"use strict";d();Object.defineProperty(Lm,"__esModule",{value:!0});Lm.ValidJSON=void 0;var uD=K();Lm.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:uD.SourceCodeType.JSON,severity:uD.Severity.ERROR,schema:{},targets:[]},create(e){if(!e.validateJSON)return{};let t=e.validateJSON;return{async onCodePathStart(n){let r=await t(n.uri,n.source);if(r)for(let i of r)e.report(i)}}}}});var pD=x(qm=>{"use strict";d();Object.defineProperty(qm,"__esModule",{value:!0});qm.ValidDocParamTypes=void 0;var fD=K(),M0=$i();qm.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:fD.SourceCodeType.LiquidHtml,severity:fD.Severity.ERROR,schema:{},targets:[]},create(e){let t=e.themeDocset?.liquidDrops().then(r=>new Set((0,M0.getValidParamTypes)(r).keys()));async function n(r){return DZ(r)?(0,M0.parseStringLiterals)(r)!==void 0:t?(0,M0.parseParamType)(await t,r)!==void 0:!0}return{async LiquidDocParamNode(r){let{paramType:i}=r;!i||await n(i.value)||e.report({message:`The parameter type '${i.value}' is not supported.`,startIndex:i.position.start-1,endIndex:i.position.end+1,suggest:[{message:"Remove invalid parameter type",fix:s=>{let[a,o]=jZ(r.source,i);s.replace(a,o," ")}}]})}}}};function DZ(e){return/['"|]/.test(e)}function jZ(e,t){let n=t.position.start-1,r=t.position.end+1;for(;dD(e.charAt(n-1));)n--;for(;dD(e.charAt(r));)r++;return[n,r]}function dD(e){return e===" "||e===" "}});var mD=x(Im=>{"use strict";d();Object.defineProperty(Im,"__esModule",{value:!0});Im.getBlocks=BZ;Im.reportWarning=FZ;var hD=Ge();function BZ(e){let t=[],n=[],r=[],i=e.blocks,s=e.presets;function a(o,c,l=!1){if(!o)return;let f="static"in o,m="name"in o;f?t.push({node:o,path:c.concat("type")}):m&&!l?n.push({node:o,path:c.concat("type")}):o.type!=="@app"&&r.push({node:o,path:c.concat("type")}),"blocks"in o&&(Array.isArray(o.blocks)?o.blocks.forEach((p,g)=>{a(p,c.concat("blocks",String(g)),l)}):typeof o.blocks=="object"&&o.blocks!==null&&Object.entries(o.blocks).forEach(([p,g])=>{a(g,c.concat("blocks",p),l)}))}return Array.isArray(i)&&i.forEach((o,c)=>{a(o,["blocks",String(c)])}),s&&s.forEach((o,c)=>{"blocks"in o&&o.blocks&&(Array.isArray(o.blocks)?o.blocks.forEach((l,f)=>{a(l,["presets",String(c),"blocks",String(f)],!0)}):typeof o.blocks=="object"&&Object.entries(o.blocks).forEach(([l,f])=>{a(f,["presets",String(c),"blocks",l],!0)}))}),{staticBlockLocations:t,localBlockLocations:n,themeBlockLocations:r,hasRootLevelThemeBlocks:r.some(o=>o.path[0]==="blocks")}}function FZ(e,t,n,r){r.report({message:e,startIndex:t+(0,hD.getLocStart)(n),endIndex:t+(0,hD.getLocEnd)(n)})}});var _D=x(Rm=>{"use strict";d();Object.defineProperty(Rm,"__esModule",{value:!0});Rm.ValidLocalBlocks=void 0;var gD=K(),R0=Ge(),VZ=He(),yD=He(),Mm=mD();Rm.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:gD.SourceCodeType.LiquidHtml,severity:gD.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.blockStartPosition.end,r=await(0,VZ.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!s||s instanceof Error||!r)return;let{staticBlockLocations:a,localBlockLocations:o,themeBlockLocations:c,hasRootLevelThemeBlocks:l}=(0,Mm.getBlocks)(i);(0,yD.isSection)(e.file.uri)&&(a.length>0&&o.length>0&&a.forEach(f=>{let m=(0,R0.nodeAtPath)(s,f.path);(0,Mm.reportWarning)("Sections cannot use static theme blocks together with locally scoped blocks.",n,m,e)}),l&&o.length>0&&c.length>0&&o.forEach(f=>{let m=(0,R0.nodeAtPath)(s,f.path);(0,Mm.reportWarning)("Sections cannot use theme blocks together with locally scoped blocks.",n,m,e)})),(0,yD.isBlock)(e.file.uri)&&o.length>0&&o.forEach(f=>{let m=(0,R0.nodeAtPath)(s,f.path);(0,Mm.reportWarning)("Local scoped blocks are not supported in theme blocks.",n,m,e)})}}}}});var bD=x(jm=>{"use strict";d();Object.defineProperty(jm,"__esModule",{value:!0});jm.ValidRenderSnippetArgumentTypes=void 0;var vD=K(),Dm=$i(),al=ur();jm.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:vD.SourceCodeType.LiquidHtml,severity:vD.Severity.WARNING,schema:{},targets:[]},create(e){let t;async function n(i,s){if(!i.alias||!i.variable?.name)return;let a=s.get(i.alias.value)?.type;if(!a)return;let o=i.variable.name;await r(a,(0,Dm.checkArgumentType)(a,o))&&e.report({message:(0,Dm.getArgumentTypeMismatchMessage)(i.alias.value,a,o),startIndex:o.position.start,endIndex:o.position.end,suggest:(0,al.generateTypeMismatchSuggestions)(a,o.position.start,o.position.end)})}async function r(i,s){switch(s.kind){case"incompatible":return!0;case"named-type":return e.themeDocset?(t??=e.themeDocset.liquidDrops().then(a=>new Set((0,Dm.getValidParamTypes)(a).keys())),(0,Dm.parseParamType)(await t,i)!==void 0):!0;case"compatible":case"unchecked":return!1}}return{async RenderMarkup(i){let s=(0,al.getSnippetName)(i);if(!s)return;let a=await(0,al.getLiquidDocParams)(e,`snippets/${s}.liquid`);if(!a)return;await n(i,a);let o=(0,al.findTypeMismatchParams)(a,i.args);(0,al.reportTypeMismatches)(e,o,a)}}}}});var SD=x(Bm=>{"use strict";d();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.ValidSchema=void 0;var kD=K();Bm.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:kD.SourceCodeType.LiquidHtml,severity:kD.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json"||!e.validateJSON)return;let n=t.source.slice(t.blockStartPosition.end,t.blockEndPosition.start),r=await e.validateJSON(e.file.uri,n);if(r)for(let i of r)e.report({message:i.message,startIndex:t.blockStartPosition.end+i.startIndex,endIndex:t.blockStartPosition.end+i.endIndex})}}}}});var xD=x(Fm=>{"use strict";d();Object.defineProperty(Fm,"__esModule",{value:!0});Fm.ValidSchemaName=void 0;var D0=Ge(),$Z=He(),TD=K(),UZ=Ce(),wD=25;Fm.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:TD.SourceCodeType.LiquidHtml,severity:TD.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.blockStartPosition.end,r=await(0,$Z.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let a=i.name;if(!a)return;let o=(0,D0.nodeAtPath)(s,["name"]),c=n+(0,D0.getLocStart)(o),l=n+(0,D0.getLocEnd)(o);if(a.startsWith("t:")){let f=await e.getDefaultLocale(),m=a.replace("t:",""),p=await e.getDefaultSchemaTranslations(),g=(0,UZ.deepGet)(p,m.split("."));g!==void 0&&g.length>wD&&e.report({message:`Schema name '${g}' from 'locales/${f}.default.schema.json' is too long (max 25 characters)`,startIndex:c,endIndex:l})}else a.length>wD&&e.report({message:`Schema name '${a}' is too long (max 25 characters)`,startIndex:c,endIndex:l})}}}}});var OD=x(Vm=>{"use strict";d();Object.defineProperty(Vm,"__esModule",{value:!0});Vm.ValidSchemaTranslations=void 0;var ED=Ge(),HZ=He(),AD=K(),zZ=Ce();Vm.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:AD.SourceCodeType.LiquidHtml,severity:AD.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.blockStartPosition.end,r=await(0,HZ.getSchema)(e),{ast:i}=r??{};if(!i||i instanceof Error)return;let s=await e.getDefaultLocale(),a=await e.getDefaultSchemaTranslations(),o=j0(i);for(let{value:c,node:l}of o){let f=c.replace("t:","");if((0,zZ.deepGet)(a,f.split("."))===void 0){let p=n+(0,ED.getLocStart)(l),g=n+(0,ED.getLocEnd)(l);e.report({message:`'${c}' does not have a matching entry in 'locales/${s}.default.schema.json'`,startIndex:p,endIndex:g})}}}}}};function j0(e){let t=[];switch(e.type){case"Literal":{typeof e.value=="string"&&e.value.startsWith("t:")&&t.push({value:e.value,node:e});break}case"Object":{for(let n of e.children)t.push(...j0(n.value));break}case"Array":{for(let n of e.children)t.push(...j0(n));break}case"Property":case"Identifier":break}return t}});var qD=x(Hm=>{"use strict";d();Object.defineProperty(Hm,"__esModule",{value:!0});Hm.ValidSettingsKey=void 0;var ND=K(),$m=Ge(),PD=He(),LD=Ce();Hm.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:ND.SourceCodeType.LiquidHtml,severity:ND.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.blockStartPosition.end,r=await(0,PD.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let{rootLevelLocalBlocks:a,presetLevelBlocks:o}=(0,LD.getBlocks)(i);if(i.presets)for(let c=0;c<i.presets.length;c++){let l=(0,$m.nodeAtPath)(s,["presets",c,"settings"]);Um(e,n,l,i.settings)}if((0,PD.isSectionSchema)(r)&&"default"in i&&i.default){let c=(0,$m.nodeAtPath)(s,["default","settings"]);Um(e,n,c,i.settings),await Promise.all((i.default.blocks??[]).map((l,f)=>{let m=(0,$m.nodeAtPath)(s,["default","blocks",f,"settings"]);return CD(e,n,m,a,l)}))}for(let[c,l]of Object.entries(o))await Promise.all(l.map(({node:f,path:m})=>{let p=(0,$m.nodeAtPath)(s,m.slice(0,-1).concat("settings"));return CD(e,n,p,a,f)}))}}}};async function CD(e,t,n,r,i){if(r.length>0){let s=r.find(o=>o.node.type===i.type);if(!s)return;let a=s.node;Um(e,t,n,a.settings)}else{let s=await e.getBlockSchema?.(i.type),{validSchema:a}=s??{};if(!a||a instanceof Error)return;Um(e,t,n,a.settings,i)}}function Um(e,t,n,r,i){if(!(!n||n.type!=="Object")){for(let s of n.children)if(!r?.find(o=>o?.id===s.key.value)){let o=i?`Setting '${s.key.value}' does not exist in 'blocks/${i.type}.liquid'.`:`Setting '${s.key.value}' does not exist in schema.`;(0,LD.reportWarning)(o,t,s.key,e)}}}});var BD=x(zm=>{"use strict";d();Object.defineProperty(zm,"__esModule",{value:!0});zm.ValidStandardEventData=void 0;var ba=ue(),ID=K(),WZ="standard_event_data",MD="context",RD="view",B0={product:["page","search","collection","dialog","recommendation"],cart:["page","dialog"]},GZ=["collection"],JZ=[...new Set(Object.values(B0).flat())];function DD(e,t){return e.type===ba.NodeTypes.VariableLookup?!1:e.type!==ba.NodeTypes.String||!t.includes(e.value)}function jD(e){return e.type===ba.NodeTypes.String?` '${e.value}'`:""}function KZ(e,t){if(t?.type!==ba.NodeTypes.LiquidVariable||t.filters[0]!==e)return;let n=t.expression;if(n.type===ba.NodeTypes.VariableLookup&&!(n.lookups.length>0))return n.name??void 0}zm.ValidStandardEventData={meta:{code:"ValidStandardEventData",name:"Prevent the use of invalid arguments to the standard_event_data filter",docs:{description:"This check is aimed at preventing the use of invalid arguments for the standard_event_data filter.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-standard-event-data",recommended:!0},type:ID.SourceCodeType.LiquidHtml,severity:ID.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidFilter(t,n){if(t.name!==WZ)return;let r=t.args.find(c=>c.type!==ba.NodeTypes.NamedArgument);r&&DD(r,[RD])&&e.report({message:`Unsupported event type${jD(r)}. The only supported event type is '${RD}'.`,startIndex:r.position.start,endIndex:r.position.end});let i=KZ(t,n[n.length-1]);if(i&&GZ.includes(i))return;let a=t.args.find(c=>c.type===ba.NodeTypes.NamedArgument&&c.name===MD)?.value;if(!a)return;let o=i&&B0[i]||JZ;if(DD(a,o)){let c=i&&B0[i]?` for ${i}`:"";e.report({message:`Unsupported context${jD(a)}${c}. Valid values: ${o.join(", ")}. The '${MD}' argument can also be omitted.`,startIndex:a.position.start,endIndex:a.position.end})}}}}}});var VD=x(Wm=>{"use strict";d();Object.defineProperty(Wm,"__esModule",{value:!0});Wm.ValidStaticBlockType=void 0;var YZ=ue(),FD=K(),QZ=In(),XZ=nm();Wm.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:FD.SourceCodeType.LiquidHtml,severity:FD.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name!=="content_for"||!(0,XZ.isContentForBlock)(t.markup))return;let n=t.markup.args.find(o=>o.name==="type");if(!n)return;let r=n.value;if(r.type!==YZ.NodeTypes.String)return;let i=r.value,s=`blocks/${i}.liquid`;await(0,QZ.doesFileExist)(e,s)||e.report({message:`'blocks/${i}.liquid' does not exist`,startIndex:r.position.start,endIndex:r.position.end,suggest:[]})}}}}});var UD=x(sc=>{"use strict";d();Object.defineProperty(sc,"__esModule",{value:!0});sc.ValidVisibleIfSettingsSchema=sc.ValidVisibleIf=void 0;var ZZ=ue(),V0=K(),F0=Ge(),ic=He(),eee=Ce(),Mr=N0(),$D={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:V0.Severity.ERROR,schema:{},targets:[]};sc.ValidVisibleIf={meta:{...$D,type:V0.SourceCodeType.LiquidHtml},create(e){let t={},n;return{async LiquidTag(r){tee(r)&&(t[r.markup.name]=!0)},async LiquidRawTag(r){r.name!=="schema"||r.body.kind!=="json"||(n=r)},async onCodePathEnd(){if(!n)return;let r=await(0,ic.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!i.settings?.some(f=>"visible_if"in f)||!s||s instanceof Error)return;let a=n.blockStartPosition.end,o=Object.fromEntries((await(0,Mr.getGlobalSettings)(e)).map(f=>[f,!0])),c=Object.fromEntries(i.settings.map(f=>[f.id,!0])),l={...t,settings:o};(0,ic.isSectionSchema)(r)?l.section={settings:c}:(0,ic.isBlockSchema)(r)&&(l.block={settings:c});for(let[f,m]of i.settings.entries()){if(!("visible_if"in m)||typeof m.visible_if!="string")continue;let p=(0,F0.nodeAtPath)(s,["settings",f,"visible_if"]),g=(0,Mr.getVariableLookupsInExpression)(m.visible_if);if(g===null)continue;if("warning"in g){(0,eee.reportWarning)(g.warning,a,p,e);continue}let v=(b,_)=>{typeof b=="string"&&e.report({message:b,startIndex:a+(0,F0.getLocStart)(p)+_.position.start+Mr.offsetAdjust+1,endIndex:a+(0,F0.getLocStart)(p)+_.position.end+Mr.offsetAdjust+1})};for(let b of g)b.name==="section"&&(0,ic.isBlockSchema)(r)||(b.name==="section"&&!(0,ic.isSectionSchema)(r)?v(`Invalid visible_if: can't refer to "section" when not in a section or block file.`,b):b.name==="block"&&!(0,ic.isBlockSchema)(r)?v(`Invalid visible_if: can't refer to "block" when not in a block file.`,b):v((0,Mr.validateLookup)(b,l),b))}}}}};function tee(e){return e.type===ZZ.NodeTypes.LiquidTag&&e.name==="assign"&&typeof e.markup!="string"}sc.ValidVisibleIfSettingsSchema={meta:{...$D,type:V0.SourceCodeType.JSON},create(e){return e.toRelativePath(e.file.uri)!=="config/settings_schema.json"?{}:{async Property(n){if(n.key.value!=="visible_if"||n.value.type!=="Literal")return;let r=n.value.value;if(typeof r!="string")return;let i=n.value.loc.start.offset,s=(0,Mr.getVariableLookupsInExpression)(r);if(s===null)return;if("warning"in s){e.report({message:s.warning,startIndex:n.value.loc.start.offset,endIndex:n.value.loc.end.offset});return}let o={settings:Object.fromEntries((await(0,Mr.getGlobalSettings)(e)).map(l=>[l,!0]))},c=(l,f)=>{typeof l=="string"&&e.report({message:l,startIndex:i+f.position.start+Mr.offsetAdjust+1,endIndex:i+f.position.end+Mr.offsetAdjust+1})};for(let l of s)l.name==="section"?c(`Invalid visible_if: can't refer to "section" when not in a section file.`,l):l.name==="block"?c(`Invalid visible_if: can't refer to "block" when not in a block file.`,l):c((0,Mr.validateLookup)(l,o),l)}}}}});var zD=x(Jm=>{"use strict";d();Object.defineProperty(Jm,"__esModule",{value:!0});Jm.VariableName=void 0;var nee=ue(),$0=K(),Gm=yx(),ree=e=>{let t=(0,Gm.camelCase)(e);return t.charAt(0).toUpperCase()+t.slice(1)},iee=e=>e.name==="assign"&&typeof e.markup!="string",see=e=>e.type==nee.NodeTypes.LiquidTag&&e.name==="capture"&&typeof e.markup!="string",aee={camelCase:Gm.camelCase,PascalCase:ree,snake_case:Gm.snakeCase,"kebab-case":Gm.kebabCase},oee={format:$0.SchemaProp.string("snake_case")},HD=e=>e.replace(/[-_]?\d[-_]?/g,"");Jm.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:$0.SourceCodeType.LiquidHtml,severity:$0.Severity.WARNING,schema:oee,targets:[]},create(e){let t=r=>{if(!r.markup.name)return{valid:!1};let i=aee[e.settings.format],s=r.markup.name.startsWith("_")?"_":"",a=r.markup.name.slice(s.length),o=s+i(a);return{valid:a.length>0&&HD(r.markup.name)===HD(o),suggestion:o}},n=r=>e.report({message:`The variable '${r.markup.name}' uses wrong naming format`,startIndex:r.markup.position.start,endIndex:r.markup.position.end,suggest:[{message:`Change variable '${r.markup.name}' to '${t(r).suggestion}'`,fix:i=>{let{position:s,name:a,source:o}=r.markup;return i.replace(s.start,s.end,o.slice(s.start,s.end).replace(a,t(r).suggestion))}}]});return{async LiquidTag(r){(iee(r)||see(r)&&r.markup.name)&&(t(r).valid||n(r))}}}}});var WD=x(Km=>{"use strict";d();Object.defineProperty(Km,"__esModule",{value:!0});Km.AppBlockMissingSchema=void 0;var U0=K();Km.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:U0.Severity.ERROR,type:U0.SourceCodeType.LiquidHtml,schema:{},targets:[U0.ConfigTarget.ThemeAppExtension]},create(e){let t=!1;return e.toRelativePath(e.file.uri).startsWith("blocks/")?{async LiquidRawTag(r){r.name=="schema"&&(t=!0)},async onCodePathEnd(){t||e.report({message:"The schema does not exist",startIndex:0,endIndex:0})}}:{}}}});var GD=x(Ym=>{"use strict";d();Object.defineProperty(Ym,"__esModule",{value:!0});Ym.UniqueSettingIds=void 0;var Ji=K();Ym.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:Ji.SourceCodeType.JSON,severity:Ji.Severity.ERROR,schema:{},targets:[]},create(e){return{async onCodePathEnd(t){if((0,Ji.isArrayNode)(t.ast)){let n=[];for(let s of t.ast.children)if((0,Ji.isObjectNode)(s)&&s.children){let a=s.children.find(o=>o.key.value==="settings");if(a&&a.value&&(0,Ji.isArrayNode)(a.value)){for(let o of a.value.children)if((0,Ji.isObjectNode)(o)&&o.children){let c=o.children.find(l=>l.key.value==="id");(0,Ji.isPropertyNode)(c)&&n.push(c)}}}let r=new Map;for(let s of n)if((0,Ji.isLiteralNode)(s.value)){let a=s.value.value;typeof a=="string"&&(r.has(a)||r.set(a,[]),r.get(a).push(s))}let i=Array.from(r.entries()).filter(([s,a])=>a.length>1);if(i.length>0)for(let[s,a]of i){let o=a[a.length-1];e.report({message:`Duplicate setting id found: "${s}"`,startIndex:o.loc.start.offset,endIndex:o.loc.end.offset})}}}}}}});var KD=x(on=>{"use strict";d();Object.defineProperty(on,"__esModule",{value:!0});on.StylesheetOncePerFile=on.StylesheetTagInWrongFile=on.JavascriptOncePerFile=on.JavascriptTagInWrongFile=on.SchemaOncePerFile=on.SchemaSectionOrBlockOnly=void 0;var H0=He(),Qm=K();function JD(e){return e[0].toUpperCase()+e.slice(1)}function cee({tagName:e,code:t,message:n}){return{meta:{code:t,name:t,docs:{description:n,recommended:!0},type:Qm.SourceCodeType.LiquidHtml,severity:Qm.Severity.ERROR,schema:{},targets:[]},create(r){return{async LiquidRawTag(i){i.name===e&&r.report({message:n,startIndex:i.blockStartPosition.start,endIndex:i.blockStartPosition.end})}}}}}function uee(e,{allowSnippets:t}){let n=t?"section, block, or snippet":"section or block",r=`${JD(e)}${t?"TagInWrongFile":"SectionOrBlockOnly"}`;return cee({tagName:e,code:r,message:`{% ${e} %} is only valid in ${n} files.`})}function z0(e){let t=`${JD(e)}OncePerFile`,n=`{% ${e} %} can only appear once per file.`;return{meta:{code:t,name:t,docs:{description:n,recommended:!0},type:Qm.SourceCodeType.LiquidHtml,severity:Qm.Severity.ERROR,schema:{},targets:[]},create(r){let i=0;return{async LiquidRawTag(s){s.name===e&&(i+=1,i!==1&&r.report({message:n,startIndex:s.blockStartPosition.start,endIndex:s.blockStartPosition.end}))}}}}}function W0(e,{allowSnippets:t}){let n=uee(e,{allowSnippets:t});return{...n,create(r){let i=r.file.uri;return(0,H0.isSection)(i)||(0,H0.isBlock)(i)?{}:t&&(0,H0.isSnippet)(i)?{}:n.create(r)}}}on.SchemaSectionOrBlockOnly=W0("schema",{allowSnippets:!1});on.SchemaOncePerFile=z0("schema");on.JavascriptTagInWrongFile=W0("javascript",{allowSnippets:!0});on.JavascriptOncePerFile=z0("javascript");on.StylesheetTagInWrongFile=W0("stylesheet",{allowSnippets:!0});on.StylesheetOncePerFile=z0("stylesheet")});var QD=x(Xm=>{"use strict";d();Object.defineProperty(Xm,"__esModule",{value:!0});Xm.BlockContentUsage=void 0;var lee=ue(),fee=ai(),dee=He(),YD=K(),pee=Fe(),hee="Use the implicit 'content' parameter directly instead of 'block.content'.";Xm.BlockContentUsage={meta:{code:"BlockContentUsage",name:"Use `content` instead of `block.content`",docs:{description:"Reports 'block.content' in theme block files, where the built-in 'content' parameter is available as the 'content' variable.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/block-content-usage"},type:YD.SourceCodeType.LiquidHtml,severity:YD.Severity.ERROR,schema:{},targets:[]},create(e){return(0,dee.isBlock)(e.file.uri)?{async VariableLookup(t,n){(0,pee.isWithinRawTagThatDoesNotParseItsContents)(n)||mee(t)&&e.report({message:hee,startIndex:t.position.start,endIndex:t.position.end})}}:{}}};function mee(e){let[t]=e.lookups;return e.name==="block"&&t?.type===lee.NodeTypes.String&&t.value===fee.BLOCK_CONTENT_PARAMETER}});var Pe=x(qe=>{"use strict";d();Object.defineProperty(qe,"__esModule",{value:!0});qe.resolveErrorLocation=yee;qe.getOffset=G0;qe.hasBareArrayAccess=pi;qe.argHasBareArrayAccess=XD;qe.variableHasBareArrayAccess=_ee;qe.conditionalHasBareArrayAccess=J0;qe.rawMarkup=vee;qe.hasSkippedCharacters=lr;qe.hasEmptyMarkup=bee;qe.hasSingleIdMarkup=kee;qe.hasSingleStringMarkup=See;qe.hasRubyValidInlineCommentMarkup=Tee;qe.hasRubyAcceptedCycleTrailingComma=wee;qe.hasRubyAcceptedLoopTrailingComma=xee;qe.hasRubyAcceptedPaginateTrailingComma=Eee;qe.hasRubyAcceptedEmptyFirstFilterArgument=Aee;qe.hasRubyAcceptedFilterArgumentTrailingComma=Oee;qe.hasRubyAcceptedEmptyAssignRhs=Cee;qe.hasRubyAcceptedAssignLhsExtraIdentifier=Lee;qe.hasRubyAcceptedIncludeMarkup=qee;qe.hasRubyAcceptedRawTagCloserWithMarkup=Iee;qe.liquidTagBodies=ol;qe.liquidTagMarkup=Zm;qe.hasLiquidTagNamed=Ree;qe.liquidLineTagLocation=Dee;qe.hasSkippedPrefixCharacters=jee;qe.hasRubyAcceptedWhitespaceSeparatedQuotePrefix=Bee;qe.hasUnclosedQuotedString=Fee;var oe=ue(),gee=Ce();function yee(e,t){if("loc"in e&&e.loc){let n=e.loc;return[G0(t,n.start.line,n.start.column),G0(t,n.end.line,n.end.column)]}return[0,t.length]}function G0(e,t,n){let r=1;for(let i=0;i<e.length;i++){if(r===t)return i+(n-1);e[i]===`
|
|
86
|
+
`&&r++}return e.length}function pi(e){return e.type===oe.NodeTypes.VariableLookup&&e.name===null}function XD(e){let t=e.type===oe.NodeTypes.NamedArgument?e.value:e;return pi(t)}function _ee(e){return pi(e.expression)||e.filters.some(t=>t.args.some(XD))}function J0(e){return e.type===oe.NodeTypes.LogicalExpression?J0(e.left)||J0(e.right):e.type===oe.NodeTypes.Comparison?pi(e.left)||pi(e.right):pi(e)}function vee(e){return e.source.slice(e.markupPosition.start,e.markupPosition.end)}function lr(e){return eg(e).length>0}function bee(e){return fr(e).length===0&&!lr(e)}function kee(e,t){if(lr(e))return!1;let n=fr(e);return n.length===1&&n[0].type===oe.MarkupTokenType.Id&&n[0].value===t}function See(e,t){if(lr(e))return!1;let n=fr(e),r=n[0];return n.length!==1||r.type!==oe.MarkupTokenType.String?!1:r.value.slice(1,-1)===t}function Tee(e){let t=Vee(e),n=0,r=0;for(let i=1;i<t.length;i++){let s=t[i].firstEvent;s&&(n++,s.type==="uncovered"&&s.value==="#"&&r++)}return n===0||!t[0].firstEvent&&n===1?!0:n===r}function wee(e){let t=Q0(e);return t!==null&&ZD(t,e)}function xee(e){let t=Q0(e);if(t===null)return!1;let n=cl(t,e);try{if(n.consume(oe.MarkupTokenType.Id),!n.id("in"))return!1;for(n.valueExpression(),n.id("reversed");!n.isAtEnd();)n.consumeOptional(oe.MarkupTokenType.Comma),n.namedArgument()}catch{return!1}return n.isAtEnd()}function Eee(e){let t=Q0(e);if(t===null)return!1;let n=cl(t,e);try{if(n.valueExpression(),!n.id("by"))return!1;n.valueExpression(),n.consumeOptional(oe.MarkupTokenType.Comma)&&n.namedArguments()}catch{return!1}return n.isAtEnd()}function Aee(e){if(lr(e))return!1;let t=fr(e),n=t.slice(-3);if(!(n.length===3&&n[0].type===oe.MarkupTokenType.Pipe&&n[1].type===oe.MarkupTokenType.Id&&n[2].type===oe.MarkupTokenType.Colon))return!1;let r=t.slice(0,-3);return K0(r,e)||Y0(r,e)}function Oee(e){if(lr(e))return!1;let t=Nee(fr(e));return t===null?!1:K0(t,e)||Y0(t,e)||Pee(t,e)}function Nee(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=e[r],s=e[r+1];if(i.type===oe.MarkupTokenType.Comma&&(s===void 0||s.type===oe.MarkupTokenType.Pipe)){if(!n.slice((0,gee.findLastIndex)(n,o=>o.type===oe.MarkupTokenType.Pipe)+1).some(o=>o.type===oe.MarkupTokenType.Colon))return null;let a=n[n.length-1];if(a===void 0||a.type===oe.MarkupTokenType.Comma||a.type===oe.MarkupTokenType.Colon||a.type===oe.MarkupTokenType.Pipe)return null;t=!0;continue}n.push(i)}return t?n:null}function Pee(e,t){let n=e.slice(-3);if(!(n.length===3&&n[0].type===oe.MarkupTokenType.Pipe&&n[1].type===oe.MarkupTokenType.Id&&n[2].type===oe.MarkupTokenType.Colon))return!1;let r=e.slice(0,-3);return K0(r,t)||Y0(r,t)}function K0(e,t){let n=cl(e,t);try{n.liquidVariable()}catch{return!1}return n.isAtEnd()}function Y0(e,t){if(e.length<3||e[0].type!==oe.MarkupTokenType.Id||e[1].type!==oe.MarkupTokenType.Equality||e[1].value!=="=")return!1;let n=cl(e.slice(2),t);try{n.liquidVariable()}catch{return!1}return n.isAtEnd()}function Cee(e){if(lr(e))return!1;let t=fr(e);return t.length===2&&t[0].type===oe.MarkupTokenType.Id&&t[1].type===oe.MarkupTokenType.Equality&&t[1].value==="="}function Lee(e){if(lr(e))return!1;let t=fr(e);return t.length<4||t[0].type!==oe.MarkupTokenType.Id||t[1].type!==oe.MarkupTokenType.Id||t[2].type!==oe.MarkupTokenType.Equality||t[2].value!=="="?!1:ZD(t.slice(3),e)}function qee(e){if(lr(e))return!1;let t=new oe.MarkupParser((0,oe.tokenizeMarkup)(e),e);try{let n=t.valueExpression();if(pi(n))return!1;if(t.id("for")||t.id("with")){let r=t.valueExpression();if(pi(r))return!1}for(t.id("as")&&t.consume(oe.MarkupTokenType.Id),t.consumeOptional(oe.MarkupTokenType.Comma);t.look(oe.MarkupTokenType.Id);){t.consume(oe.MarkupTokenType.Id),t.consume(oe.MarkupTokenType.Colon);let r=t.valueExpression();if(pi(r))return!1;if(!t.consumeOptional(oe.MarkupTokenType.Comma))break}}catch{return!1}return t.isAtEnd()}function Iee(e,t,n=0){for(let r of ol(e,n)){let i=Zm(r.body);if(i?.tagName===`end${t}`&&i.remainingTokens.length>0&&!i.hasSkippedCharacters)return Mee(e,t,r.end)}return!1}function Mee(e,t,n){let r=0;for(let i of ol(e,n)){let s=Zm(i.body);if(!(!s||s.hasSkippedCharacters)){if(s.tagName===t){r++;continue}if(s.tagName===`end${t}`&&(r--,r<0))return!1}}return r===0}function ol(e,t=0){let n=(0,oe.tokenize)(e),r=[];for(let i=0;i<n.length;i++){let s=n[i];if(s.type!==oe.TokenType.LiquidTagOpen||s.start<t)continue;let a=n[i+1],o=a?.type===oe.TokenType.Text?n[i+2]:a;!o||o.type!==oe.TokenType.LiquidTagClose||r.push(Hee(e,s,a?.type===oe.TokenType.Text?a:void 0,o))}return r}function Zm(e){let t=fr(e),n=t[0];if(!(!n||n.type!==oe.MarkupTokenType.Id))return{tagName:n.value,remainingTokens:t.slice(1),hasSkippedCharacters:lr(e)}}function Ree(e,t){for(let n of ol(e)){let r=Zm(n.body);if(r?.tagName===t&&!r.hasSkippedCharacters)return!0}return!1}function Dee(e,t){for(let n of ol(e)){let r=n.body.indexOf(`
|
|
87
|
+
`);if(r===-1)continue;let s=(0,oe.tokenizeMarkup)(n.body.slice(0,r),n.bodyStart).filter(o=>o.type!==oe.MarkupTokenType.EndOfString)[0];if(s?.type!==oe.MarkupTokenType.Id||s.value!=="liquid")continue;let a=n.bodyStart;for(let o of n.body.split(`
|
|
88
|
+
`)){let l=(0,oe.tokenizeMarkup)(o,a).filter(f=>f.type!==oe.MarkupTokenType.EndOfString)[0];if(l?.type===oe.MarkupTokenType.Id&&l.value===t)return[l.start,a+o.length];a+=o.length+1}}return null}function jee(e,t,n){return eg(e.slice(t,n),!0).length>0}function Bee(e){if(fr(e).length>0)return!1;let t=eg(e);if(t.length===0||t.some(({value:r})=>!Z0(r)))return!1;let n=t[t.length-1];for(let r=n.end;r<e.length;r++)if(X0(e[r]))return!0;return!1}function Fee(e){return eg(e).some(({value:t})=>Z0(t))}function eg(e,t=!1){let n=(0,oe.tokenizeMarkup)(e),r=new Set,i=[];for(let s of n)if(s.type!==oe.MarkupTokenType.EndOfString)for(let a=s.start;a<s.end;a++)r.add(a);for(let s=0;s<e.length;s++){let a=e[s];X0(a)||r.has(s)||t&&Z0(a)||i.push({value:a,start:s,end:s+1})}return i}function fr(e){return(0,oe.tokenizeMarkup)(e).filter(t=>t.type!==oe.MarkupTokenType.EndOfString)}function Vee(e){let t=$ee(e),n=[{firstEvent:void 0}],r=n[0];for(let i=0;i<e.length;i++){let s=e[i];if(s===`
|
|
89
|
+
`){r={firstEvent:void 0},n.push(r);continue}if(X0(s)||r.firstEvent)continue;let a=t.get(i);r.firstEvent=a?{type:"token",start:i,end:i+1}:{type:"uncovered",value:s,start:i,end:i+1}}return n}function $ee(e){let t=new Map;for(let n of fr(e))for(let r=n.start;r<n.end;r++)t.set(r,n);return t}function ZD(e,t){let n=cl(e,t);try{n.valueExpression()}catch{return!1}return n.isAtEnd()}function Q0(e){if(lr(e))return null;let t=fr(e),n=t[t.length-1],r=t[t.length-2];return t.length<2||n.type!==oe.MarkupTokenType.Comma||r.type===oe.MarkupTokenType.Comma?null:t.slice(0,-1)}function cl(e,t){return new oe.MarkupParser([...e,Uee(t)],t)}function Uee(e){return{type:oe.MarkupTokenType.EndOfString,value:"",start:e.length,end:e.length}}function X0(e){return e===" "||e===`
|
|
90
|
+
`||e==="\r"||e===" "}function Z0(e){return e==="'"||e==='"'}function Hee(e,t,n,r){return{start:t.start,body:n?e.slice(n.start,n.end):"",bodyStart:n?.start??t.end,end:r.end}}});var Sa=x(ul=>{"use strict";d();Object.defineProperty(ul,"__esModule",{value:!0});ul.checkBlockTag=Qee;ul.blockTagSyntaxError=n2;ul.checkBlockParserError=Xee;var e2=ue(),ac=Pe(),eS="Syntax error in 'block' tag",zee="Bare bracket access is not allowed in strict2 mode",Wee="Liquid syntax error: in 'block' - Use plain named arguments, for example: block 'name', heading: value",Gee="Liquid syntax error: in 'block' - app blocks do not accept arguments",Jee="Liquid syntax error: in 'block' - app blocks do not accept content",t2="Attempting to end parsing before LiquidTag 'block' was closed",Kee="Unclosed block tag 'block' in {% liquid %} block",Yee=new Set([t2,Kee,"Attempting to close LiquidTag 'block' before it was opened without a matching 'block'"]);function Qee(e,t){let n=n2(e);n&&t.report(n)}function n2(e){if(typeof e.markup=="string")return ka(e.position,eS);let t=e.markup;if(Zee(t.name.value)){if(t.args.some(r=>r.name!=="block.name"))return ka(e.position,Gee);if(ete(e))return ka(e.position,Jee)}let n=t.args.find(nte);if(n)return ka(n.position,rte(n.name));if(t.args.some(tte))return ka(e.position,eS);if(t.args.some(r=>r.value.type!=="BlockArrayLiteral"&&(0,ac.hasBareArrayAccess)(r.value)))return ka(e.position,zee);if((0,ac.hasSkippedCharacters)((0,ac.rawMarkup)(e)))return ka(e.position,eS)}function Xee(e,t,n){if(!Yee.has(e.message))return;let[r,i]=e.message.includes("Unclosed block tag 'block' in {% liquid %} block")?(0,ac.liquidLineTagLocation)(n,"block")??(0,ac.resolveErrorLocation)(e,n):(0,ac.resolveErrorLocation)(e,n);t.report({message:e.message===t2?"Liquid syntax error: 'block' tag was never closed":e.message,startIndex:r,endIndex:i})}function ka(e,t){return{message:t,startIndex:e.start,endIndex:e.end}}function Zee(e){return e.startsWith("shopify://apps/")}function ete(e){return(e.children??[]).some(t=>t.type!==e2.NodeTypes.TextNode||t.value.trim()!=="")}function tte(e){return e.name==="block.name"&&e.value.type!==e2.NodeTypes.String}function nte(e){return e.name!=="block.name"&&e.name.includes(".")}function rte(e){let t=ite(e);return t?`Liquid syntax error: in 'block' - Use '${t}:' instead of '${e}:' when calling a block.`:Wee}function ite(e){let[t,n,r,...i]=e.split(".");if(!(t!=="block"||n!=="settings"||i.length>0))return r}});var i2=x(tg=>{"use strict";d();Object.defineProperty(tg,"__esModule",{value:!0});tg.DuplicateBlockArguments=void 0;var ste=ai(),r2=K(),ate=Sa();tg.DuplicateBlockArguments={meta:{code:"DuplicateBlockArguments",name:"Duplicate Block Arguments",docs:{description:"Reports duplicate block arguments and explicit content arguments overridden by inline body content.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-block-arguments"},type:r2.SourceCodeType.LiquidHtml,severity:r2.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name!=="block"||(0,ate.blockTagSyntaxError)(t))return;let n=t.markup,r=new Set,i=!!t.children?.length;for(let s of n.args){let a=r.has(s.name);r.add(s.name),a&&e.report({message:`Duplicate argument '${s.name}' in block tag for '${n.name.value}'.`,startIndex:s.position.start,endIndex:s.position.end}),!(!i||s.name!==ste.BLOCK_CONTENT_PARAMETER)&&e.report({message:"The explicit 'content' argument has no effect because the inline block body takes precedence.",startIndex:s.position.start,endIndex:s.position.end})}}}}}});var s2=x(Ta=>{"use strict";d();Object.defineProperty(Ta,"__esModule",{value:!0});Ta.ExcessiveSettingsCount=Ta.TOLERATED_SETTINGS_COUNT=void 0;var oc=K(),ote=Fu(),cte=ii();Ta.TOLERATED_SETTINGS_COUNT=40;var ute={maxSettings:oc.SchemaProp.number(Ta.TOLERATED_SETTINGS_COUNT)};Ta.ExcessiveSettingsCount={meta:{code:"ExcessiveSettingsCount",name:"ExcessiveSettingsCount",docs:{description:"Reports section or block schemas that declare more top-level settings than the configured maximum.",recommended:!0},type:oc.SourceCodeType.LiquidHtml,severity:oc.Severity.WARNING,schema:ute,targets:[]},create(e){let t=e.settings.maxSettings;return{async onCodePathEnd(){if(e.file.ast instanceof Error)return;let n=(0,cte.visit)(e.file.ast,{LiquidRawTag(a){if(a.name==="schema")return a}})[0];if(!n)return;let r=(0,ote.toJSONAST)(n.body.value);if(r instanceof Error||!(0,oc.isObjectNode)(r))return;let i=r.children.find(a=>a.key.value==="settings");if(!i||!(0,oc.isArrayNode)(i.value))return;let s=i.value.children.filter(a=>(0,oc.isObjectNode)(a)&&a.children.some(o=>o.key.value==="id")).length;s<=t||e.report({message:`This schema declares ${s} settings, which exceeds the maximum of ${t}. Consider splitting this section or block into smaller pieces, or grouping related options with a header.`,startIndex:n.blockStartPosition.start,endIndex:n.blockStartPosition.end})}}}}});var a2=x(wa=>{"use strict";d();Object.defineProperty(wa,"__esModule",{value:!0});wa.LiquidComplexity=wa.TOLERATED_LIQUID_COMPLEXITY=void 0;var tS=K(),ll=ue(),lte=Ce();wa.TOLERATED_LIQUID_COMPLEXITY=120;var fte={maxComplexity:tS.SchemaProp.number(wa.TOLERATED_LIQUID_COMPLEXITY)},dte=new Set(["if","unless","case","for","tablerow","paginate"]),pte=new Set(["elsif","when"]),hte=new Set(["if","unless"]),mte=new Set(["elsif"]);wa.LiquidComplexity={meta:{code:"LiquidComplexity",name:"LiquidComplexity",docs:{description:"Reports Liquid files with high cyclomatic complexity.",recommended:!0},type:tS.SourceCodeType.LiquidHtml,severity:tS.Severity.WARNING,schema:fte,targets:[]},create(e){let t=e.settings.maxComplexity,n={complexity:1},r;function i(c){return"blockStartPosition"in c?{startIndex:c.blockStartPosition.start,endIndex:c.blockStartPosition.end}:{startIndex:c.position.start,endIndex:c.position.end}}function s(c){n.complexity+=1,!r&&n.complexity>t&&(r=i(c))}function a(c){let l=(0,lte.findLastIndex)(c,m=>[ll.NodeTypes.LiquidTag,ll.NodeTypes.LiquidBranch,ll.NodeTypes.LiquidVariableOutput].includes(m.type));if(l===-1)return!1;let f=c[l];return f.type===ll.NodeTypes.LiquidTag?hte.has(f.name):f.type===ll.NodeTypes.LiquidBranch?mte.has(f.name??""):!1}function o(c){return e.file.source.slice(0,c).split(`
|
|
91
|
+
`).length}return{async LiquidTag(c){dte.has(c.name)&&s(c)},async LiquidBranch(c){pte.has(c.name??"")&&s(c)},async LogicalExpression(c,l){a(l)&&s(c)},async onCodePathEnd(){if(n.complexity<=t)return;let c=r??{startIndex:0,endIndex:e.file.source.length},l=o(c.startIndex);e.report({message:`Liquid complexity is ${n.complexity}, which exceeds the maximum of ${t}. The decision at line ${l} pushed it over the limit. Consider simplifying conditional logic, or moving self-contained decision logic into snippets with the render tag.`,startIndex:c.startIndex,endIndex:c.endIndex})}}}}});var c2=x(xa=>{"use strict";d();Object.defineProperty(xa,"__esModule",{value:!0});xa.LiquidNestingDepth=xa.TOLERATED_LIQUID_NESTING_DEPTH=void 0;var nS=K(),gte=ue();xa.TOLERATED_LIQUID_NESTING_DEPTH=10;var yte={maxDepth:nS.SchemaProp.number(xa.TOLERATED_LIQUID_NESTING_DEPTH)},o2=new Set(["if","unless","for","case","tablerow"]);xa.LiquidNestingDepth={meta:{code:"LiquidNestingDepth",name:"LiquidNestingDepth",docs:{description:"Reports Liquid files with deeply nested control-flow structures.",recommended:!0},type:nS.SourceCodeType.LiquidHtml,severity:nS.Severity.WARNING,schema:yte,targets:[]},create(e){let t=e.settings.maxDepth;function n(r){return r.filter(s=>s.type===gte.NodeTypes.LiquidTag&&o2.has(s.name)).length+1}return{async LiquidTag(r,i){if(!o2.has(r.name))return;let s=n(i);s<=t||e.report({message:`This Liquid block is nested ${s} levels deep, which exceeds the maximum allowed depth of ${t}.`,startIndex:r.blockStartPosition.start,endIndex:r.blockStartPosition.end})}}}}});var u2=x(rS=>{"use strict";d();Object.defineProperty(rS,"__esModule",{value:!0});rS.checkAssignTag=_te;var Hn=Pe();function _te(e,t){if(typeof e.markup=="string"){if((0,Hn.hasRubyAcceptedEmptyAssignRhs)(e.markup)||(0,Hn.hasRubyAcceptedEmptyFirstFilterArgument)(e.markup)||(0,Hn.hasRubyAcceptedFilterArgumentTrailingComma)(e.markup)||(0,Hn.hasRubyAcceptedAssignLhsExtraIdentifier)(e.markup))return;t.report({message:"Syntax error in 'assign' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,Hn.variableHasBareArrayAccess)(n.value)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Hn.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){t.report({message:"Syntax error in 'assign' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=(0,Hn.rawMarkup)(e);if((0,Hn.hasRubyAcceptedEmptyAssignRhs)(r)||(0,Hn.hasRubyAcceptedEmptyFirstFilterArgument)(r)||(0,Hn.hasRubyAcceptedFilterArgumentTrailingComma)(r)||(0,Hn.hasRubyAcceptedAssignLhsExtraIdentifier)(r))return;let i=e.source.slice(n.position.start,e.markupPosition.end);(0,Hn.hasSkippedCharacters)(i)&&t.report({message:"Syntax error in 'assign' tag",startIndex:e.position.start,endIndex:e.position.end})}});var p2=x(iS=>{"use strict";d();Object.defineProperty(iS,"__esModule",{value:!0});iS.checkBaseTag=vte;var l2=ue(),ng=new WeakSet;async function vte(e,t){if("reason"in e&&typeof e.reason=="string"){t.report({message:e.reason,startIndex:e.position.start,endIndex:e.position.end});return}if(e.name==="liquid"&&Array.isArray(e.markup)){await bte(e.markup,t);return}let n=await f2(t);ng.has(e)||d2(e,n)&&(ng.add(e),t.report({message:`Unknown tag '${e.name}'`,startIndex:e.position.start,endIndex:e.position.end}))}async function bte(e,t){let n=await f2(t);for(let r of e)r.type===l2.NodeTypes.LiquidTag&&!ng.has(r)&&d2(r,n)&&(ng.add(r),t.report({message:`Unknown tag '${r.name}'`,startIndex:r.position.start,endIndex:r.position.end}))}async function f2(e){let t=e.themeDocset?await e.themeDocset.tags():Object.keys(l2.builtinTags).map(n=>({name:n}));return new Set(["#","else","elsif","when",...t.map(n=>n.name)])}function d2(e,t){return e.source.startsWith("{%",e.position.start)?!1:!t.has(e.name)}});var h2=x(ig=>{"use strict";d();Object.defineProperty(ig,"__esModule",{value:!0});ig.checkBranchTag=Ste;ig.checkMisplacedBranchTag=Tte;var Ea=Pe(),kte="Bare bracket access is not allowed in strict2 mode";function Ste(e,t){if(e.name==="elsif"){xte(e,t);return}e.name==="when"&&wte(e,t)}function Tte(e,t){t.report({message:`Unknown tag '${e.name}'`,startIndex:e.position.start,endIndex:e.position.end})}function wte(e,t){if(typeof e.markup=="string"){sS(e,t);return}let n=e.markup,r=e.source.slice(e.markupPosition.start,e.markupPosition.end);if((0,Ea.hasUnclosedQuotedString)(r)){sS(e,t);return}if(n.some(Ea.hasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}if(n.length===0)return;let i=e.source.slice(n[0].position.start,e.markupPosition.end);(0,Ea.hasSkippedCharacters)(i)&&sS(e,t)}function sS(e,t){t.report({message:"Syntax error in 'when' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}function xte(e,t){if(typeof e.markup=="string"){rg(e,t);return}let n=e.markup,r=e.source.slice(e.markupPosition.start,e.markupPosition.end);if((0,Ea.hasUnclosedQuotedString)(r)){rg(e,t);return}if((0,Ea.conditionalHasBareArrayAccess)(n)){t.report({message:kte,startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}if((0,Ea.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){rg(e,t);return}let i=e.source.slice(n.position.start,e.markupPosition.end);(0,Ea.hasSkippedCharacters)(i)&&rg(e,t)}function rg(e,t){t.report({message:"Syntax error in 'elsif' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var m2=x(oS=>{"use strict";d();Object.defineProperty(oS,"__esModule",{value:!0});oS.checkCaptureTag=Ete;var aS=Pe();function Ete(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'capture' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,aS.hasBareArrayAccess)(e.markup)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}(0,aS.hasSkippedCharacters)((0,aS.rawMarkup)(e))&&t.report({message:"Syntax error in 'capture' tag",startIndex:e.position.start,endIndex:e.position.end})}});var g2=x(cS=>{"use strict";d();Object.defineProperty(cS,"__esModule",{value:!0});cS.checkCaseTag=Ate;var sg=Pe();function Ate(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'case' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,sg.hasUnclosedQuotedString)((0,sg.rawMarkup)(e))){t.report({message:"Syntax error in 'case' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,sg.hasBareArrayAccess)(n)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}(0,sg.hasSkippedCharacters)(e.source.slice(n.position.start,e.markupPosition.end))&&t.report({message:"Syntax error in 'case' tag",startIndex:e.position.start,endIndex:e.position.end})}});var uS=x(pr=>{"use strict";d();Object.defineProperty(pr,"__esModule",{value:!0});pr.UNMATCHED_RAW_CLOSE_PARSER_ERROR=pr.UNMATCHED_COMMENT_CLOSE_PARSER_ERROR=void 0;pr.checkCommentTag=Nte;pr.checkCommentRawTag=Lte;pr.hasRubyAcceptedInertCommentBodyCloser=b2;var dr=ue(),Rr=Pe(),_2="Liquid syntax error: 'comment' tag was never closed";pr.UNMATCHED_COMMENT_CLOSE_PARSER_ERROR="Attempting to close LiquidTag 'comment' before it was opened without a matching 'comment'";pr.UNMATCHED_RAW_CLOSE_PARSER_ERROR="Attempting to close LiquidTag 'raw' before it was opened without a matching 'raw'";var Ote="Attempting to end parsing before LiquidRawTag 'comment' was closed";function Nte(e,t,n){if(!qte(e,n))return;let[r,i]=(0,Rr.resolveErrorLocation)(e,n);if(e.message===Ote&&Cte(Pte(n,r))){t.report({message:_2,startIndex:r,endIndex:i});return}e.message===pr.UNMATCHED_COMMENT_CLOSE_PARSER_ERROR&&b2(n,"comment",r)||t.report({message:e.message,startIndex:r,endIndex:i})}function Pte(e,t){let n=e.indexOf("%}",t);return n===-1?"":e.slice(n+2)}function Cte(e){for(let t of(0,Rr.liquidTagBodies)(e)){let n=(0,Rr.liquidTagMarkup)(t.body);if(n?.tagName==="comment"&&!n.hasSkippedCharacters)return!0}return!1}function Lte(e,t){let n=e.body.value;(Mte(n,e.source,e.blockEndPosition.end)||Rte(n,e.source,e.blockEndPosition.end)||Ite(n))&&t.report({message:_2,startIndex:e.body.position.start,endIndex:e.body.position.end})}function qte(e,t){return!y2(t,"comment")&&!y2(t,"endcomment")?!1:e.message==="Attempting to end parsing before LiquidRawTag 'comment' was closed"||e.message===pr.UNMATCHED_COMMENT_CLOSE_PARSER_ERROR}function Ite(e){let t=(0,dr.tokenize)(e);for(let n=0;n<t.length;n++){let r=t[n],i=t[n+1],s=i?.type===dr.TokenType.Text?t[n+2]:i;if(r.type===dr.TokenType.LiquidTagOpen){if(s?.type!==dr.TokenType.LiquidTagClose)return!0;continue}if(r.type===dr.TokenType.LiquidVariableOutputOpen&&s?.type!==dr.TokenType.LiquidVariableOutputClose)return!0}return!1}function Mte(e,t,n){return v2(e,t,n,"comment")}function Rte(e,t,n){return v2(e,t,n,"raw")}function v2(e,t,n,r){let i=Dte(e,r);if(i===0)return!1;for(let s of(0,Rr.liquidTagBodies)(t,n)){let a=(0,Rr.liquidTagMarkup)(s.body);if(!(!a||a.hasSkippedCharacters)){if(a.tagName===r){i++;continue}if(a.tagName===`end${r}`&&(i--,i===0))return!1}}return!0}function Dte(e,t){let n=0;for(let r of(0,Rr.liquidTagBodies)(e)){let i=(0,Rr.liquidTagMarkup)(r.body);if(!(!i||i.hasSkippedCharacters)){if(i.tagName===t){n++;continue}i.tagName===`end${t}`&&n>0&&n--}}return n}function Aa(e,t,n=0,r=e.length){return(0,Rr.liquidTagBodies)(e,n).filter(i=>{if(i.bodyStart>=r)return!1;let s=(0,Rr.liquidTagMarkup)(i.body);return s?.tagName===t&&!s.hasSkippedCharacters}).length}function b2(e,t,n){let r=`end${t}`,i=jte(e,n);return i?.tagName!==r||i.hasSkippedCharacters?!1:t==="comment"?Aa(e,"comment",0,n)>Aa(e,"endcomment",0,n):Aa(e,"raw",0,n)>Aa(e,"endraw",0,n)&&Aa(e,"comment",0,n)>0&&Aa(e,"endcomment",n)>0}function y2(e,t){return Aa(e,t)>0}function jte(e,t){let n=(0,dr.tokenize)(e);for(let r=0;r<n.length;r++){let i=n[r];if(i.type!==dr.TokenType.LiquidTagOpen||i.start!==t)continue;let s=n[r+1],a=s?.type===dr.TokenType.Text?n[r+2]:s;return!a||a.type!==dr.TokenType.LiquidTagClose?void 0:(0,Rr.liquidTagMarkup)(Bte(e,s?.type===dr.TokenType.Text?s:void 0))}}function Bte(e,t){return t?e.substring(t.start,t.end):""}});var S2=x(dS=>{"use strict";d();Object.defineProperty(dS,"__esModule",{value:!0});dS.checkContentForTag=zte;var ag=ue(),Fte=Pe(),Vte=new Set(["block","blocks"]),$te=new Set(["block","schema"]),fS="closest.",Ute="metaobject.",Hte=new Set(["article","blog","collection","page","product"]);function zte(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'content_for' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup,r=n.contentForType.value;if(!Vte.has(r)){Zte(e,t,r);return}if(Wte(n)){lS(e,t);return}if(r==="block"&&Jte(n)){lS(e,t);return}r==="blocks"&&Qte(n)&&lS(e,t)}function Wte(e){return Gte(e)||e.args.some(Fte.argHasBareArrayAccess)}function Gte(e){let t=new Set;for(let n of e.args){if(t.has(n.name))return!0;t.add(n.name)}return!1}function Jte(e){return Kte(e)||Yte(e)||Xte(e)}function Kte(e){return e.args.some(t=>$te.has(t.name))}function Yte(e){let t=e.args.find(r=>r.name==="type"),n=e.args.find(r=>r.name==="id");return!t||!n||t.value.type!==ag.NodeTypes.String||n.value.type!==ag.NodeTypes.String||t.value.value===""||n.value.value===""}function Qte(e){let t=0;for(let n of e.args)if(!n.name.startsWith(fS)||n.value.type===ag.NodeTypes.String||(t+=1,t>1)||!k2(n.name))return!0;return!1}function Xte(e){let t=0;for(let n of e.args)if(n.name.startsWith(fS)&&(n.value.type===ag.NodeTypes.String||(t+=1,t>1)||!k2(n.name)))return!0;return!1}function k2(e){let t=e.slice(fS.length);return Hte.has(t)||t.startsWith(Ute)}function Zte(e,t,n){t.report({message:`Invalid content_for type "${n}"; expected "block" or "blocks"`,startIndex:e.position.start,endIndex:e.position.end})}function lS(e,t){t.report({message:"Syntax error in 'content_for' tag",startIndex:e.position.start,endIndex:e.position.end})}});var T2=x(pS=>{"use strict";d();Object.defineProperty(pS,"__esModule",{value:!0});pS.checkCycleTag=ene;var fl=Pe();function ene(e,t){if(typeof e.markup=="string"){if((0,fl.hasRubyAcceptedCycleTrailingComma)(e.markup))return;t.report({message:"Syntax error in 'cycle' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if(n.groupName&&(0,fl.hasBareArrayAccess)(n.groupName)||n.args.some(fl.hasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}(0,fl.hasSkippedCharacters)((0,fl.rawMarkup)(e))&&t.report({message:"Syntax error in 'cycle' tag",startIndex:e.position.start,endIndex:e.position.end})}});var w2=x(mS=>{"use strict";d();Object.defineProperty(mS,"__esModule",{value:!0});mS.checkDecrementTag=tne;var hS=Pe();function tne(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'decrement' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,hS.hasBareArrayAccess)(e.markup)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}(0,hS.hasSkippedCharacters)((0,hS.rawMarkup)(e))&&t.report({message:"Syntax error in 'decrement' tag",startIndex:e.position.start,endIndex:e.position.end})}});var A2=x(dl=>{"use strict";d();Object.defineProperty(dl,"__esModule",{value:!0});dl.checkDocTag=rne;dl.checkDocParserError=ine;dl.isDocParserError=E2;var cc=Pe(),gS="Attempting to end parsing before LiquidRawTag 'doc' was closed",nne="Attempting to close LiquidTag 'doc' before it was opened without a matching 'doc'";function rne(e,t){if(e.markup!==""){t.report({message:"Syntax error in 'doc' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}x2(e.body.value)&&t.report({message:"Nested doc tags are not allowed",startIndex:e.body.position.start,endIndex:e.body.position.end})}function x2(e){for(let t of(0,cc.liquidTagBodies)(e)){let n=(0,cc.liquidTagMarkup)(t.body);if(n?.tagName==="enddoc"&&n.remainingTokens.length>0&&!n.hasSkippedCharacters)return!1;if(n?.tagName==="doc"&&!n.hasSkippedCharacters)return!0}return!1}function ine(e,t,n){if(!E2(e,n))return;let[r,i]=(0,cc.resolveErrorLocation)(e,n);if(e.message===gS&&x2(sne(n,r))){t.report({message:"Nested doc tags are not allowed",startIndex:r,endIndex:i});return}e.message===gS&&(0,cc.hasRubyAcceptedRawTagCloserWithMarkup)(n,"doc",r)||t.report({message:e.message,startIndex:r,endIndex:i})}function sne(e,t){let n=e.indexOf("%}",t);return n===-1?"":e.slice(n+2)}function E2(e,t){return!(0,cc.hasLiquidTagNamed)(t,"doc")&&!(0,cc.hasLiquidTagNamed)(t,"enddoc")?!1:e.message===gS||e.message===nne}});var O2=x(yS=>{"use strict";d();Object.defineProperty(yS,"__esModule",{value:!0});yS.checkEchoTag=ane;var hi=Pe();function ane(e,t){if(typeof e.markup=="string"){if((0,hi.hasEmptyMarkup)((0,hi.rawMarkup)(e))||(0,hi.hasRubyAcceptedEmptyFirstFilterArgument)(e.markup)||(0,hi.hasRubyAcceptedFilterArgumentTrailingComma)(e.markup))return;t.report({message:"Syntax error in 'echo' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,hi.variableHasBareArrayAccess)(n)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}let r=(0,hi.rawMarkup)(e);(0,hi.hasRubyAcceptedEmptyFirstFilterArgument)(r)||(0,hi.hasRubyAcceptedFilterArgumentTrailingComma)(r)||(0,hi.hasSkippedCharacters)(r)&&t.report({message:"Syntax error in 'echo' tag",startIndex:e.position.start,endIndex:e.position.end})}});var P2=x(bS=>{"use strict";d();Object.defineProperty(bS,"__esModule",{value:!0});bS.checkFormTag=cne;var N2=ue(),_S=Pe(),vS="Syntax error in 'form' tag",one="Bare bracket access is not allowed in strict2 mode";function cne(e,t){if(typeof e.markup=="string"){og(e,t,vS);return}let n=e.markup;if(n.some(_S.argHasBareArrayAccess)){og(e,t,one);return}if(une(n)){og(e,t,vS);return}(0,_S.hasSkippedCharacters)((0,_S.rawMarkup)(e))&&og(e,t,vS)}function une(e){if(e.length===0||e[0].type===N2.NodeTypes.NamedArgument)return!0;let t=1,n=!1;for(let r of e.slice(1)){if(r.type===N2.NodeTypes.NamedArgument){n=!0;continue}if(t+=1,n||t>2)return!0}return!1}function og(e,t,n){t.report({message:n,startIndex:e.position.start,endIndex:e.position.end})}});var C2=x(SS=>{"use strict";d();Object.defineProperty(SS,"__esModule",{value:!0});SS.checkForTag=lne;var kS=Pe();function lne(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'for' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,kS.hasBareArrayAccess)(n.collection)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}if((0,kS.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){t.report({message:"Syntax error in 'for' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.source.slice(n.position.start,e.markupPosition.end);(0,kS.hasSkippedCharacters)(r)&&t.report({message:"Syntax error in 'for' tag",startIndex:e.position.start,endIndex:e.position.end})}});var L2=x(TS=>{"use strict";d();Object.defineProperty(TS,"__esModule",{value:!0});TS.checkIfTag=fne;var pl=Pe();function fne(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'if' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup,r=(0,pl.rawMarkup)(e);if((0,pl.hasUnclosedQuotedString)(r)){t.report({message:"Syntax error in 'if' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,pl.conditionalHasBareArrayAccess)(n)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}if((0,pl.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){t.report({message:"Syntax error in 'if' tag",startIndex:e.position.start,endIndex:e.position.end});return}let i=e.source.slice(n.position.start,e.markupPosition.end);(0,pl.hasSkippedCharacters)(i)&&t.report({message:"Syntax error in 'if' tag",startIndex:e.position.start,endIndex:e.position.end})}});var q2=x(wS=>{"use strict";d();Object.defineProperty(wS,"__esModule",{value:!0});wS.checkIncludeTag=dne;var uc=Pe();function dne(e,t){if(typeof e.markup=="string"){if((0,uc.hasRubyAcceptedIncludeMarkup)(e.markup))return;t.report({message:"Syntax error in 'include' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,uc.hasBareArrayAccess)(n.snippet)||n.variable&&(0,uc.hasBareArrayAccess)(n.variable.name)||n.args.some(uc.argHasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}(0,uc.hasSkippedCharacters)((0,uc.rawMarkup)(e))&&t.report({message:"Syntax error in 'include' tag",startIndex:e.position.start,endIndex:e.position.end})}});var I2=x(ES=>{"use strict";d();Object.defineProperty(ES,"__esModule",{value:!0});ES.checkIncrementTag=hne;var pne=ue(),xS=Pe();function hne(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'increment' tag",startIndex:e.position.start,endIndex:e.position.end});return}(mne(e)||(0,xS.hasSkippedCharacters)((0,xS.rawMarkup)(e)))&&t.report({message:"Syntax error in 'increment' tag",startIndex:e.position.start,endIndex:e.position.end})}function mne(e){return!e.markup||typeof e.markup!="object"||Array.isArray(e.markup)||!("type"in e.markup)?!1:e.markup.type===pne.NodeTypes.VariableLookup&&(0,xS.hasBareArrayAccess)(e.markup)}});var R2=x(AS=>{"use strict";d();Object.defineProperty(AS,"__esModule",{value:!0});AS.checkInlineCommentTag=gne;var M2=Pe();function gne(e,t){(0,M2.hasRubyValidInlineCommentMarkup)((0,M2.rawMarkup)(e))||t.report({message:"Syntax error in tag '#' - Each line of comments must be prefixed by the '#' character",startIndex:e.position.start,endIndex:e.position.end})}});var B2=x(hl=>{"use strict";d();Object.defineProperty(hl,"__esModule",{value:!0});hl.checkJavascriptTag=kne;hl.checkJavascriptParserError=Sne;hl.hasJavascriptClosingTagAfter=j2;var zn=Pe(),D2="Syntax Error in 'javascript' - Valid syntax: javascript",yne="'javascript' tag was never closed",_ne="Unknown tag 'endjavascript'",vne="Attempting to end parsing before LiquidRawTag 'javascript' was closed",bne="Attempting to close LiquidTag 'javascript' before it was opened without a matching 'javascript'";function kne(e,t){(0,zn.hasEmptyMarkup)((0,zn.rawMarkup)(e))||t.report({message:D2,startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}function Sne(e,t,n){if(!xne(n))return;if(e.message===bne){Tne(e,t,n,_ne);return}if(e.message!==vne)return;let r=wne(n);if(r){t.report({message:D2,startIndex:r.start,endIndex:r.end});return}let[i,s]=(0,zn.resolveErrorLocation)(e,n);j2(n,i)||t.report({message:yne,startIndex:i,endIndex:s})}function Tne(e,t,n,r){let[i,s]=(0,zn.resolveErrorLocation)(e,n);t.report({message:r,startIndex:i,endIndex:s})}function wne(e){for(let t of(0,zn.liquidTagBodies)(e)){let n=(0,zn.liquidTagMarkup)(t.body);if(n?.tagName==="javascript"&&(n.remainingTokens.length>0||n.hasSkippedCharacters))return{start:t.start,end:t.end}}return null}function j2(e,t){for(let n of(0,zn.liquidTagBodies)(e,t))if((0,zn.liquidTagMarkup)(n.body)?.tagName==="endjavascript")return!0;return!1}function xne(e){if((0,zn.hasLiquidTagNamed)(e,"javascript")||(0,zn.hasLiquidTagNamed)(e,"endjavascript"))return!0;for(let t of(0,zn.liquidTagBodies)(e)){let n=(0,zn.liquidTagMarkup)(t.body);if(n?.tagName==="javascript"||n?.tagName==="endjavascript")return!0}return!1}});var F2=x(NS=>{"use strict";d();Object.defineProperty(NS,"__esModule",{value:!0});NS.checkLayoutTag=Ene;var OS=Pe();function Ene(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'layout' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,OS.hasBareArrayAccess)(n)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}(0,OS.hasSkippedCharacters)((0,OS.rawMarkup)(e))&&t.report({message:"Syntax error in 'layout' tag",startIndex:e.position.start,endIndex:e.position.end})}});var V2=x(PS=>{"use strict";d();Object.defineProperty(PS,"__esModule",{value:!0});PS.checkPaginateTag=Ane;var lc=Pe();function Ane(e,t){if(typeof e.markup=="string"){if((0,lc.hasRubyAcceptedPaginateTrailingComma)(e.markup))return;t.report({message:"Syntax error in 'paginate' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}let n=e.markup;if((0,lc.hasBareArrayAccess)(n.collection)||(0,lc.hasBareArrayAccess)(n.pageSize)||n.args.some(lc.argHasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}if((0,lc.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){t.report({message:"Syntax error in 'paginate' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}let r=e.source.slice(n.position.start,e.markupPosition.end);(0,lc.hasSkippedCharacters)(r)&&t.report({message:"Syntax error in 'paginate' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var H2=x(cg=>{"use strict";d();Object.defineProperty(cg,"__esModule",{value:!0});cg.checkPartialTag=Pne;cg.checkPartialParserError=Cne;var ml=Pe(),$2="Syntax error in 'partial' tag",U2="Attempting to end parsing before LiquidTag 'partial' was closed",One="Unclosed block tag 'partial' in {% liquid %} block",Nne=new Set([U2,One,"Attempting to close LiquidTag 'partial' before it was opened without a matching 'partial'"]);function Pne(e,t){if(typeof e.markup=="string"){CS(e,t,$2);return}let n=e.markup;if(Lne(n.value)){CS(e,t,"Liquid syntax error: Error in tag 'partial' - Valid syntax: partial '[name]'");return}(0,ml.hasSkippedCharacters)((0,ml.rawMarkup)(e))&&CS(e,t,$2)}function Cne(e,t,n){if(!Nne.has(e.message))return;let[r,i]=e.message.includes("Unclosed block tag 'partial' in {% liquid %} block")?(0,ml.liquidLineTagLocation)(n,"partial")??(0,ml.resolveErrorLocation)(e,n):(0,ml.resolveErrorLocation)(e,n);t.report({message:e.message===U2?"Liquid syntax error: 'partial' tag was never closed":e.message,startIndex:r,endIndex:i})}function Lne(e){return e===""||e.includes("/")}function CS(e,t,n){t.report({message:n,startIndex:e.position.start,endIndex:e.position.end})}});var W2=x(ug=>{"use strict";d();Object.defineProperty(ug,"__esModule",{value:!0});ug.checkRawTag=Ine;ug.checkRawParserError=Mne;var LS=uS(),gl=Pe(),z2="Attempting to end parsing before LiquidRawTag 'raw' was closed",qne=new Set([z2,LS.UNMATCHED_RAW_CLOSE_PARSER_ERROR,"Unclosed raw tag 'raw' in {% liquid %} block"]);function Ine(e,t){(e.markup!==""||(0,gl.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,e.markupPosition.end)||(0,gl.hasSkippedCharacters)((0,gl.rawMarkup)(e)))&&t.report({message:"Syntax error in 'raw' tag",startIndex:e.markupPosition.start,endIndex:e.markupPosition.end})}function Mne(e,t,n){if(!qne.has(e.message))return;let[r,i]=(0,gl.resolveErrorLocation)(e,n);e.message===z2&&(0,gl.hasRubyAcceptedRawTagCloserWithMarkup)(n,"raw",r)||e.message===LS.UNMATCHED_RAW_CLOSE_PARSER_ERROR&&(0,LS.hasRubyAcceptedInertCommentBodyCloser)(n,"raw",r)||t.report({message:e.message,startIndex:r,endIndex:i})}});var G2=x(qS=>{"use strict";d();Object.defineProperty(qS,"__esModule",{value:!0});qS.checkRenderTag=jne;var Rne=ue(),Oa=Pe(),lg="Syntax error in 'render' tag",Dne="Bare bracket access is not allowed in strict2 mode";function jne(e,t){if(typeof e.markup=="string"){yl(e,t,lg);return}let n=e.markup;if((0,Oa.hasUnclosedQuotedString)((0,Oa.rawMarkup)(e))){yl(e,t,lg);return}if(Bne(n)){yl(e,t,Dne);return}if((0,Oa.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){yl(e,t,lg);return}let r=e.source.slice(n.position.start,e.markupPosition.end);(0,Oa.hasSkippedCharacters)(r)&&yl(e,t,lg)}function Bne(e){return e.snippet.type===Rne.NodeTypes.VariableLookup&&(0,Oa.hasBareArrayAccess)(e.snippet)||e.variable&&(0,Oa.hasBareArrayAccess)(e.variable.name)?!0:e.args.some(t=>(0,Oa.hasBareArrayAccess)(t.value))}function yl(e,t,n){t.report({message:n,startIndex:e.position.start,endIndex:e.position.end})}});var J2=x(IS=>{"use strict";d();Object.defineProperty(IS,"__esModule",{value:!0});IS.checkSchemaTag=Fne;function Fne(e,t){e.markup!==""&&t.report({message:"Syntax error in 'schema' tag",startIndex:e.markupPosition.start,endIndex:e.markupPosition.end})}});var Y2=x(MS=>{"use strict";d();Object.defineProperty(MS,"__esModule",{value:!0});MS.checkSectionsTag=Vne;var K2=Pe();function Vne(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'sections' tag",startIndex:e.position.start,endIndex:e.position.end});return}(0,K2.hasSkippedCharacters)((0,K2.rawMarkup)(e))&&t.report({message:"Syntax error in 'sections' tag",startIndex:e.position.start,endIndex:e.position.end})}});var Q2=x(DS=>{"use strict";d();Object.defineProperty(DS,"__esModule",{value:!0});DS.checkSectionTag=$ne;var RS=Pe();function $ne(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'section' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}if(e.markup.args.some(r=>r.value.type!=="BlockArrayLiteral"&&(0,RS.hasBareArrayAccess)(r.value))){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}(0,RS.hasSkippedCharacters)((0,RS.rawMarkup)(e))&&t.report({message:"Syntax error in 'section' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var Z2=x(jS=>{"use strict";d();Object.defineProperty(jS,"__esModule",{value:!0});jS.checkStyleTag=Une;var X2=Pe();function Une(e,t){let n=(0,X2.rawMarkup)(e);(0,X2.hasEmptyMarkup)(n)||t.report({message:`'style' tag does not accept any arguments in "${n}"`,startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var ej=x(FS=>{"use strict";d();Object.defineProperty(FS,"__esModule",{value:!0});FS.checkStylesheetTag=Hne;var BS=Pe();function Hne(e,t){let n=(0,BS.rawMarkup)(e);(0,BS.hasEmptyMarkup)(n)||(0,BS.hasSingleStringMarkup)(n,"scss")||t.report({message:`'stylesheet' tag can only accept the string argument 'scss' in "${n}"`,startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var tj=x(VS=>{"use strict";d();Object.defineProperty(VS,"__esModule",{value:!0});VS.checkTablerowTag=zne;var _l=Pe();function zne(e,t){if(typeof e.markup=="string"){if((0,_l.hasRubyAcceptedLoopTrailingComma)(e.markup))return;t.report({message:"Syntax error in 'tablerow' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,_l.hasBareArrayAccess)(n.collection)||n.args.some(_l.argHasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}if((0,_l.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){t.report({message:"Syntax error in 'tablerow' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.source.slice(n.position.start,e.markupPosition.end);(0,_l.hasSkippedCharacters)(r)&&t.report({message:"Syntax error in 'tablerow' tag",startIndex:e.position.start,endIndex:e.position.end})}});var nj=x($S=>{"use strict";d();Object.defineProperty($S,"__esModule",{value:!0});$S.checkUnlessTag=Wne;var vl=Pe();function Wne(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'unless' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.source,r=e.markup,i=(0,vl.rawMarkup)(e);if((0,vl.hasUnclosedQuotedString)(i)){t.report({message:"Syntax error in 'unless' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,vl.conditionalHasBareArrayAccess)(r)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}if((0,vl.hasSkippedPrefixCharacters)(n,e.markupPosition.start,r.position.start)){t.report({message:"Syntax error in 'unless' tag",startIndex:e.position.start,endIndex:e.position.end});return}(0,vl.hasSkippedCharacters)(n.slice(r.position.start,e.markupPosition.end))&&t.report({message:"Syntax error in 'unless' tag",startIndex:e.position.start,endIndex:e.position.end})}});var rj=x(US=>{"use strict";d();Object.defineProperty(US,"__esModule",{value:!0});US.checkVariableOutput=Gne;var Ki=Pe();function Gne(e,t){let n=e.source.slice(e.markupPosition.start,e.markupPosition.end);if(typeof e.markup=="string"){if((0,Ki.hasEmptyMarkup)(n)||(0,Ki.hasRubyAcceptedEmptyFirstFilterArgument)(e.markup)||(0,Ki.hasRubyAcceptedFilterArgumentTrailingComma)(e.markup))return;t.report({message:"Syntax error in variable output",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.markup;if(!(0,Ki.hasRubyAcceptedEmptyFirstFilterArgument)(n)&&!(0,Ki.hasRubyAcceptedFilterArgumentTrailingComma)(n)){if((0,Ki.hasUnclosedQuotedString)(n)){t.report({message:"Syntax error in variable output",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Ki.variableHasBareArrayAccess)(r)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}(0,Ki.hasSkippedCharacters)(n)&&t.report({message:"Syntax error in variable output",startIndex:e.position.start,endIndex:e.position.end})}}});var fj=x(dg=>{"use strict";d();Object.defineProperty(dg,"__esModule",{value:!0});dg.LiquidSyntaxError=void 0;var ij=K(),Jne=u2(),Kne=p2(),fg=h2(),sj=Sa(),Yne=m2(),Qne=g2(),aj=uS(),Xne=S2(),Zne=T2(),ere=w2(),oj=A2(),tre=O2(),nre=P2(),rre=C2(),ire=L2(),sre=q2(),are=I2(),ore=R2(),cj=B2(),cre=F2(),ure=V2(),uj=H2(),lj=W2(),lre=G2(),fre=J2(),dre=Y2(),pre=Q2(),hre=Z2(),mre=ej(),gre=tj(),yre=nj(),_re=rj(),HS=(e,t)=>{},vre={"#":ore.checkInlineCommentTag,assign:Jne.checkAssignTag,block:sj.checkBlockTag,break:HS,capture:Yne.checkCaptureTag,case:Qne.checkCaseTag,continue:HS,content_for:Xne.checkContentForTag,cycle:Zne.checkCycleTag,decrement:ere.checkDecrementTag,echo:tre.checkEchoTag,form:nre.checkFormTag,for:rre.checkForTag,tablerow:gre.checkTablerowTag,if:ire.checkIfTag,ifchanged:HS,include:sre.checkIncludeTag,increment:are.checkIncrementTag,layout:cre.checkLayoutTag,paginate:ure.checkPaginateTag,partial:uj.checkPartialTag,render:lre.checkRenderTag,section:pre.checkSectionTag,sections:dre.checkSectionsTag,unless:yre.checkUnlessTag},bre={else:fg.checkMisplacedBranchTag,elsif:fg.checkMisplacedBranchTag,when:fg.checkMisplacedBranchTag},kre={comment:aj.checkCommentRawTag,doc:oj.checkDocTag,javascript:cj.checkJavascriptTag,schema:fre.checkSchemaTag,style:hre.checkStyleTag,stylesheet:mre.checkStylesheetTag,raw:lj.checkRawTag};dg.LiquidSyntaxError={meta:{code:"LiquidSyntaxError",name:"LiquidSyntaxError",docs:{description:"Reports Liquid syntax errors.",recommended:!0},type:ij.SourceCodeType.LiquidHtml,severity:ij.Severity.ERROR,schema:{},targets:[]},create(e){if(e.file.ast instanceof Error){let t=e.file.ast;return{async onCodePathStart(n){(0,aj.checkCommentTag)(t,e,n.source),(0,sj.checkBlockParserError)(t,e,n.source),(0,oj.checkDocParserError)(t,e,n.source),(0,uj.checkPartialParserError)(t,e,n.source),(0,lj.checkRawParserError)(t,e,n.source),(0,cj.checkJavascriptParserError)(t,e,n.source)}}}return{async LiquidRawTag(t){let n=kre[t.name];n&&n(t,e)},async LiquidTag(t){let n=vre[t.name]??bre[t.name];if(n){n(t,e);return}await(0,Kne.checkBaseTag)(t,e)},async LiquidBranch(t){(0,fg.checkBranchTag)(t,e)},async LiquidVariableOutput(t){(0,_re.checkVariableOutput)(t,e)}}}}});var gj=x(Yi=>{"use strict";d();Object.defineProperty(Yi,"__esModule",{value:!0});Yi.MaxFileSizeJSON=Yi.MaxFileSize=void 0;var zS=K(),Wn=1024,bl=1024*Wn,dj="_drafts",hj="full-file-bytes",hr="schemaless-bytes",mj={assets:{bytes:20*bl,measurement:hj},locales:{bytes:1.5*bl,measurement:hr},"config/settings_data.json":{bytes:1.5*bl,measurement:hr},"config/settings_schema.json":{bytes:512*Wn,measurement:hr},"templates/*.json":{bytes:512*Wn,measurement:hr},"sections/*.json":{bytes:512*Wn,measurement:hr},blocks:{bytes:256*Wn,measurement:hr},config:{bytes:256*Wn,measurement:hr},layout:{bytes:256*Wn,measurement:hr},snippets:{bytes:256*Wn,measurement:hr},templates:{bytes:256*Wn,measurement:hr},sections:{bytes:256*Wn,measurement:hr}},Sre=Object.keys(mj),Tre=/{%-?\s*schema\s*-?%}[\s\S]*?{%-?\s*endschema\s*-?%}/g;Yi.MaxFileSize={meta:{code:"MaxFileSize",name:"MaxFileSize",docs:{description:"Reports theme files that exceed Shopify's maximum file size.",recommended:!0},type:zS.SourceCodeType.LiquidHtml,severity:zS.Severity.ERROR,schema:{},targets:[]},create(e){return{async onCodePathStart(){let t=wre(e.toRelativePath(e.file.uri));if(!t)return;let n=Ore(e.file.source,t.measurement);n<=t.bytes||e.report({message:`Theme file is too large. It is ${pj(n)} but the limit is ${pj(t.bytes)}.`,startIndex:0,endIndex:e.file.source.length})}}}};function wre(e){if(e===dj||e.startsWith(`${dj}/`))return;let t=xre(e);if(t)return mj[t]}function xre(e){return Sre.find(t=>{if(t.endsWith("*.json")){let[n,r]=t.split("*");return Are(e,n)&&e.toLowerCase().endsWith(r)}return Ere(e,t)})}function Ere(e,t){return e===t||e.startsWith(`${t}/`)||e.endsWith(`/${t}`)||e.includes(`/${t}/`)}function Are(e,t){return e.startsWith(t)||e.includes(`/${t}`)}function Ore(e,t){if(t===hj)return Buffer.byteLength(e);let n=[...e.matchAll(Tre)].reduce((r,i)=>r+Buffer.byteLength(i[0]),0);return Buffer.byteLength(e)-n}function pj(e){return e%bl===0?`${e/bl} MB`:e%Wn===0?`${e/Wn} KB`:`${e} bytes`}Yi.MaxFileSizeJSON={...Yi.MaxFileSize,meta:{...Yi.MaxFileSize.meta,type:zS.SourceCodeType.JSON}}});var _j=x(pg=>{"use strict";d();Object.defineProperty(pg,"__esModule",{value:!0});pg.MissingBlockArguments=void 0;var Nre=ai(),yj=K(),Pre=Sa();pg.MissingBlockArguments={meta:{code:"MissingBlockArguments",name:"Missing Block Arguments",docs:{description:"Reports required LiquidDoc parameters not provided to a block tag.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-block-arguments"},type:yj.SourceCodeType.LiquidHtml,severity:yj.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name!=="block"||(0,Pre.blockTagSyntaxError)(t))return;let n=t.markup,r=await e.getBlockParameters(n.name.value);if(!r)return;let i=new Set(n.args.map(s=>s.name));t.children?.length&&i.add(Nre.BLOCK_CONTENT_PARAMETER);for(let s of r.values())!s.required||i.has(s.name)||e.report({message:`Missing required argument '${s.name}' in block tag for '${n.name.value}'.`,startIndex:t.blockStartPosition.start,endIndex:t.blockStartPosition.end})}}}}});var bj=x(hg=>{"use strict";d();Object.defineProperty(hg,"__esModule",{value:!0});hg.UnrecognizedBlockArguments=void 0;var vj=K(),Cre=Sa();hg.UnrecognizedBlockArguments={meta:{code:"UnrecognizedBlockArguments",name:"Unrecognized Block Arguments",docs:{description:"Reports arguments in a block tag that are not part of the block's merged schema, LiquidDoc, and content interface.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unrecognized-block-arguments"},type:vj.SourceCodeType.LiquidHtml,severity:vj.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name!=="block"||(0,Cre.blockTagSyntaxError)(t))return;let n=t.markup,r=await e.getBlockParameters(n.name.value);if(r)for(let i of n.args)i.name==="block.name"||r.has(i.name)||e.report({message:`Unknown argument '${i.name}' in block tag for '${n.name.value}'.`,startIndex:i.position.start,endIndex:i.position.end})}}}}});var Tj=x(Dr=>{"use strict";d();var Lre=Dr&&Dr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),qre=Dr&&Dr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ire=Dr&&Dr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Lre(n,t,r[i]);return qre(n,t),n}})();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.ValidBlockArgumentTypes=void 0;var WS=ai(),Mre=ur(),Qi=$i(),Rre=Ire(xr()),Dre=He(),kj=K(),jre=Sa(),Bre=ue();Dr.ValidBlockArgumentTypes={meta:{code:"ValidBlockArgumentTypes",name:"Valid Block Argument Types",docs:{description:"Reports type mismatches in block arguments and declarations from schema, LiquidDoc, and built-in content.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-argument-types"},type:kj.SourceCodeType.LiquidHtml,severity:kj.Severity.WARNING,schema:{},targets:[]},create(e){let t=(0,Dre.isBlock)(e.file.uri)?Rre.basename(e.file.uri,".liquid"):void 0,n;return{async LiquidTag(r){if(r.name!=="block"||(0,jre.blockTagSyntaxError)(r))return;let i=r.markup,s=await e.getBlockParameters(i.name.value);if(s)for(let a of i.args){let o=s.get(a.name)?.type;if(o&&(0,Qi.parseStringLiterals)(o)){Vre(e,a,o);continue}let c=Sj(a.value);!o||!c||Fre(o,c)||e.report({message:`Type mismatch for argument '${a.name}': expected ${o}, got ${c}`,startIndex:a.value.position.start,endIndex:a.value.position.end})}},async LiquidDocParamNode(r){if(!t)return;n??=e.getBlockParameters(t);let i=(await n)?.get(r.paramName.value);i&&$re(e,r,i)}}}};function Sj(e){if(e.type===Bre.NodeTypes.VariableLookup)return;if(e.type!=="BlockArrayLiteral")return(0,Qi.inferArgumentType)(e);let t=new Set(e.elements.map(Sj));if(!(t.size===0||t.has(void 0)))return t.size===1?`${[...t][0]}[]`:"mixed[]"}function Fre(e,t){return e===Qi.BasicParamTypes.Object?!0:t===Qi.BasicParamTypes.Object||t.endsWith("[]")?e===t:(0,Qi.isTypeCompatible)(e,t)}function Vre(e,t,n){if((0,Qi.checkArgumentType)(n,t.value).kind!=="incompatible")return;let{start:r,end:i}=t.value.position;e.report({message:(0,Qi.getArgumentTypeMismatchMessage)(t.name,n,t.value),startIndex:r,endIndex:i,suggest:(0,Mre.generateTypeMismatchSuggestions)(n,r,i)})}function $re(e,t,n){let r=(0,WS.liquidDocType)(t.paramType?.value),i=Hre(n);if(!t.paramType||!r||!i||r===Qi.BasicParamTypes.Object||r===i)return;let s=Ure(n);e.report({message:`The ${s} '${n.name}' has Liquid type '${i}', but LiquidDoc declares '${r}'. The ${s} type is authoritative.`,startIndex:t.paramType.position.start-1,endIndex:t.paramType.position.end+1})}function Ure(e){return e.name===WS.BLOCK_CONTENT_PARAMETER?"built-in parameter":"schema setting"}function Hre(e){if(!(!e.schemaSetting&&e.name!==WS.BLOCK_CONTENT_PARAMETER))return e.type}});var xj=x(jr=>{"use strict";d();var zre=jr&&jr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Wre=jr&&jr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Gre=jr&&jr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&zre(n,t,r[i]);return Wre(n,t),n}})();Object.defineProperty(jr,"__esModule",{value:!0});jr.ValidBlockContentSettingType=void 0;var Jre=ai(),Kre=Ge(),Yre=Gre(xr()),Qre=hp(),Xre=He(),wj=K(),Zre=Ce();jr.ValidBlockContentSettingType={meta:{code:"ValidBlockContentSettingType",name:"Valid Block Content Setting Type",docs:{description:"Reports a theme block schema setting named 'content' whose Liquid type is not the built-in 'content' parameter's 'string' type.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-content-setting-type"},type:wj.SourceCodeType.LiquidHtml,severity:wj.Severity.ERROR,schema:{},targets:[]},create(e){if(!(0,Xre.isBlock)(e.file.uri))return{};let t=Yre.basename(e.file.uri,".liquid");return{async LiquidRawTag(n){n.name!=="schema"||n.body.kind!=="json"||e.getBlockSchema&&eie(e,await e.getBlockSchema(t))}}}};function eie(e,t){if(!t||t.validSchema instanceof Error||t.ast instanceof Error)return;let n=t.validSchema.settings??[],r=n.findIndex(a=>a.id===Jre.BLOCK_CONTENT_PARAMETER);if(r<0)return;let i=(0,Qre.schemaSettingLiquidType)(n[r].type),s=(0,Kre.nodeAtPath)(t.ast,["settings",r,"type"]);!i||i==="string"||!s||(0,Zre.reportWarning)(`Schema setting 'content' has Liquid type '${i}', but the built-in 'content' parameter has type 'string'.`,t.offset,s,e)}});var Aj=x(mg=>{"use strict";d();Object.defineProperty(mg,"__esModule",{value:!0});mg.ValidBlockTagPlacement=void 0;var Ej=K(),tie=Sa(),nie=/^templates\/(?:[^/]+\/)*[^/]+\.liquid$/,rie=/^layout\/[^/]+\.liquid$/,iie="The 'block' tag can only be used in templates/**/*.liquid and layout/*.liquid.";mg.ValidBlockTagPlacement={meta:{code:"ValidBlockTagPlacement",name:"Valid Block Tag Placement",docs:{description:"Reports uses of the 'block' tag outside Liquid templates and layouts.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-tag-placement"},type:Ej.SourceCodeType.LiquidHtml,severity:Ej.Severity.ERROR,schema:{},targets:[]},create(e){let t=e.toRelativePath(e.file.uri),n=nie.test(t)||rie.test(t);return{async LiquidTag(r){r.name!=="block"||(0,tie.blockTagSyntaxError)(r)||n||e.report({message:iie,startIndex:r.position.start,endIndex:r.position.end})}}}}});var Pj=x(Na=>{"use strict";d();Object.defineProperty(Na,"__esModule",{value:!0});Na.recommended=Na.allChecks=void 0;var sie=K(),aie=Lq(),oie=Mq(),cie=Dq(),uie=Bq(),lie=Vq(),fie=Uq(),die=Gq(),pie=Kq(),hie=Xq(),mie=eI(),gie=nI(),yie=uI(),_ie=mI(),vie=_I(),bie=bI(),kie=SI(),Sie=NI(),Tie=LI(),wie=II(),xie=jI(),Eie=FI(),Aie=WI(),Oie=JI(),Nie=YI(),Pie=ZI(),Cie=CM(),Lie=IM(),qie=RM(),Iie=jM(),Mie=FM(),Rie=VM(),Die=UM(),jie=WM(),Bie=QM(),Fie=eR(),Vie=nR(),$ie=aR(),Uie=cR(),Hie=lR(),zie=dR(),Wie=mR(),Gie=kR(),Jie=NR(),Kie=CR(),Yie=IR(),Qie=RR(),Xie=jR(),Zie=FR(),ese=HR(),tse=WR(),nse=JR(),rse=YR(),ise=XR(),sse=eD(),ase=rD(),ose=aD(),cse=cD(),use=lD(),lse=pD(),fse=_D(),dse=bD(),pse=SD(),hse=xD(),mse=OD(),gse=qD(),yse=BD(),_se=VD(),Oj=UD(),vse=zD(),bse=WD(),kse=GD(),fc=KD(),Sse=QD(),Tse=i2(),wse=s2(),xse=a2(),Ese=c2(),Ase=fj(),Nj=gj(),Ose=_j(),Nse=bj(),Pse=Tj(),Cse=xj(),Lse=Aj();Na.allChecks=[aie.AppBlockValidTags,oie.AssetPreload,cie.AssetSizeAppBlockCSS,uie.AssetSizeAppBlockJavaScript,lie.AssetSizeCSS,fie.AssetSizeJavaScript,die.BlockIdUsage,pie.CdnPreconnect,hie.ContentForHeaderModification,mie.DeprecateBgsizes,gie.DeprecateLazysizes,yie.DeprecatedFilter,_ie.DeprecatedFontsOnSectionsAndBlocks,vie.DeprecatedFontsOnSettingsData,bie.DeprecatedFontsOnSettingsSchema,kie.DeprecatedTag,Tie.DuplicateContentForArguments,Sie.DuplicateRenderSnippetArguments,wie.EmptyBlockContent,xie.HardcodedRoutes,Eie.ImgWidthAndHeight,Aie.JSONMissingBlock,Oie.JSONMissingSection,Nie.JSONSyntaxError,Pie.LiquidFreeSettings,Cie.LiquidHTMLSyntaxError,Lie.MatchingTranslations,qie.MissingAsset,Iie.MissingContentForArguments,Mie.MissingRenderSnippetArguments,Rie.MissingTemplate,nse.UnsupportedFilterArguments,bse.AppBlockMissingSchema,Die.OrphanedSnippet,jie.PaginationSize,Bie.ParserBlockingScript,Fie.SchemaPresetsBlockOrder,Vie.SchemaPresetsStaticBlocks,$ie.RemoteAsset,Uie.RequiredLayoutThemeObject,Hie.ReservedDocParamNames,zie.StaticStylesheetAndJavascriptTags,Wie.TranslationKeyExists,Gie.UnclosedHTMLElement,Jie.UndefinedObject,Kie.UniqueDocParamNames,kse.UniqueSettingIds,Yie.UniqueStaticBlockId,Qie.UnknownFilter,Xie.UnrecognizedContentForArguments,Zie.UnrecognizedRenderSnippetArguments,tse.UnsupportedDocTag,ese.UnusedAssign,rse.UnusedDocParam,ase.ValidBlockTarget,cse.ValidHTMLTranslation,ise.ValidContentForArguments,sse.ValidContentForArgumentTypes,ose.ValidScopedCSSClass,use.ValidJSON,lse.ValidDocParamTypes,fse.ValidLocalBlocks,dse.ValidRenderSnippetArgumentTypes,pse.ValidSchema,gse.ValidSettingsKey,yse.ValidStandardEventData,_se.ValidStaticBlockType,Oj.ValidVisibleIf,Oj.ValidVisibleIfSettingsSchema,vse.VariableName,hse.ValidSchemaName,mse.ValidSchemaTranslations,fc.JavascriptOncePerFile,fc.JavascriptTagInWrongFile,fc.SchemaOncePerFile,fc.SchemaSectionOrBlockOnly,fc.StylesheetOncePerFile,fc.StylesheetTagInWrongFile,Sse.BlockContentUsage,Tse.DuplicateBlockArguments,wse.ExcessiveSettingsCount,xse.LiquidComplexity,Ese.LiquidNestingDepth,Ase.LiquidSyntaxError,Nj.MaxFileSize,Nj.MaxFileSizeJSON,Ose.MissingBlockArguments,Nse.UnrecognizedBlockArguments,Pse.ValidBlockArgumentTypes,Cse.ValidBlockContentSettingType,Lse.ValidBlockTagPlacement];Na.recommended=Na.allChecks.filter(e=>{let t=e.meta.docs.recommended,n=!e.meta.targets||!e.meta.targets.length||e.meta.targets.includes(sie.ConfigTarget.Recommended);return t&&n})});var Ij=x(mi=>{"use strict";d();var qse=mi&&mi.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ise=mi&&mi.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mse=mi&&mi.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&qse(n,t,r[i]);return Ise(n,t),n}})();Object.defineProperty(mi,"__esModule",{value:!0});mi.findRoot=qj;var En=Mse(xr());async function Rse(e,t){return Dse(t(En.join(e,"shopify.extension.toml")),t(En.join(e,".theme-check.yml")),Cj(t(En.join(e,".git")),t(En.join(e,"assets")),t(En.join(e,"snippets"))),Cj(t(En.join(e,"assets")),t(En.join(e,"snippets")),Lj(t(En.join(En.dirname(e),".theme-check.yml"))),Lj(t(En.join(En.dirname(En.dirname(e)),".theme-check.yml")))))}async function Cj(...e){return(await Promise.all(e)).reduce((n,r)=>n&&r,!0)}async function Dse(...e){return(await Promise.all(e)).reduce((n,r)=>n||r,!1)}async function Lj(e){return!await e}async function qj(e,t){if(await Rse(e,t))return e;let r=En.dirname(e);return r===e?null:qj(r,t)}});var gg=x(GS=>{"use strict";d();Object.defineProperty(GS,"__esModule",{value:!0});GS.flattenFixes=Mj;function Mj(e){return Array.isArray(e)?e.flatMap(Mj):[e]}});var Dj=x(yg=>{"use strict";d();Object.defineProperty(yg,"__esModule",{value:!0});yg.JSONCorrector=void 0;var Rj=yx();function jse(e,t){switch(t.type){case"add":return(0,Rj.set)(e,t.path,t.value);case"remove":return(0,Rj.unset)(e,t.path),e}}var JS=class{source;patches=[];constructor(t){this.source=t}get fix(){if(this.patches.length===0)return[];let t=this.patches.reduce(jse,JSON.parse(this.source));return{startIndex:0,endIndex:this.source.length,insert:JSON.stringify(t,null,2)}}add(t,n){this.patches.push({type:"add",path:t,value:n})}replace(t,n){this.patches.push({type:"remove",path:t},{type:"add",path:t,value:n})}remove(t){this.patches.push({type:"remove",path:t})}};yg.JSONCorrector=JS});var jj=x(_g=>{"use strict";d();Object.defineProperty(_g,"__esModule",{value:!0});_g.StringCorrector=void 0;var KS=class{source;fix=[];constructor(t){this.source=t}insert(t,n){this.fix.push({startIndex:t,endIndex:t,insert:n})}replace(t,n,r){this.fix.push({startIndex:t,endIndex:n,insert:r})}remove(t,n){this.fix.push({startIndex:t,endIndex:n,insert:""})}};_g.StringCorrector=KS});var YS=x(Pa=>{"use strict";d();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.StringCorrector=Pa.JSONCorrector=void 0;Pa.createCorrector=Bse;var Bj=K(),Fj=Dj();Object.defineProperty(Pa,"JSONCorrector",{enumerable:!0,get:function(){return Fj.JSONCorrector}});var Vj=jj();Object.defineProperty(Pa,"StringCorrector",{enumerable:!0,get:function(){return Vj.StringCorrector}});function Bse(e,t){switch(e){case Bj.SourceCodeType.JSON:return new Fj.JSONCorrector(t);case Bj.SourceCodeType.LiquidHtml:return new Vj.StringCorrector(t);default:return Fse(e)}}function Fse(e){throw new Error(`Case statement not exhausted: ${e}`)}});var $j=x(QS=>{"use strict";d();Object.defineProperty(QS,"__esModule",{value:!0});QS.autofix=Use;var Vse=YS(),$se=gg();async function Use(e,t,n){let r=t.filter(s=>"fix"in s&&!!s.fix),i=[];for(let s of e){let a=r.filter(c=>c.uri===s.uri);if(a.length===0)continue;let o=(0,Vse.createCorrector)(s.type,s.source);for(let c of a)c.fix(o);i.push(n(s,(0,$se.flattenFixes)(o.fix)))}await Promise.all(i)}});var Uj=x(XS=>{"use strict";d();Object.defineProperty(XS,"__esModule",{value:!0});XS.applyFixToString=zse;var Hse=gg();function zse(e,t){let n=e,r=0,i=(0,Hse.flattenFixes)(t).sort((s,a)=>s.startIndex-a.startIndex);for(let s=0;s<i.length-1;s++){let a=i[s],o=i[s+1];if(a.endIndex>o.startIndex)throw new Error("Overlapping ranges are not allowed")}for(let s of i){let a=s.startIndex+r,o=s.endIndex+r;if(a<0||a>n.length||o<a||o>n.length)throw new Error("Fix description is going overboard");n=n.slice(0,a)+s.insert+n.slice(o),r+=s.insert.length-(o-a)}return n}});var Hj=x(cn=>{"use strict";d();Object.defineProperty(cn,"__esModule",{value:!0});cn.applyFixToString=cn.autofix=cn.createCorrector=cn.JSONCorrector=cn.StringCorrector=cn.flattenFixes=void 0;var Wse=gg();Object.defineProperty(cn,"flattenFixes",{enumerable:!0,get:function(){return Wse.flattenFixes}});var ZS=YS();Object.defineProperty(cn,"StringCorrector",{enumerable:!0,get:function(){return ZS.StringCorrector}});Object.defineProperty(cn,"JSONCorrector",{enumerable:!0,get:function(){return ZS.JSONCorrector}});Object.defineProperty(cn,"createCorrector",{enumerable:!0,get:function(){return ZS.createCorrector}});var Gse=$j();Object.defineProperty(cn,"autofix",{enumerable:!0,get:function(){return Gse.autofix}});var Jse=Uj();Object.defineProperty(cn,"applyFixToString",{enumerable:!0,get:function(){return Jse.applyFixToString}})});var tn=x(be=>{"use strict";d();var Qj=be&&be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Kse=be&&be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Xj=be&&be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Qj(n,t,r[i]);return Kse(n,t),n}})(),at=be&&be.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Qj(t,e,n)};Object.defineProperty(be,"__esModule",{value:!0});be.schemaSettingLiquidType=be.getBlockName=be.path=be.resolveBlockParameters=be.makeGetBlockParameters=be.BLOCK_CONTENT_PARAMETER=void 0;be.check=iae;var Yse=Ub(),Qse=ai(),Xse=Ak(),Ca=Yp(),Zse=xq(),zj=qk(),Wj=Xj(xr()),eT=K(),Gj=Ce(),eae=In(),Zj=Cq();at(Ok(),be);at(Ub(),be);var tT=ai();Object.defineProperty(be,"BLOCK_CONTENT_PARAMETER",{enumerable:!0,get:function(){return tT.BLOCK_CONTENT_PARAMETER}});Object.defineProperty(be,"makeGetBlockParameters",{enumerable:!0,get:function(){return tT.makeGetBlockParameters}});Object.defineProperty(be,"resolveBlockParameters",{enumerable:!0,get:function(){return tT.resolveBlockParameters}});at(Pj(),be);at(Yp(),be);at(Ij(),be);at(Hj(),be);at(qk(),be);at(Ge(),be);at(Ak(),be);be.path=Xj(xr());at(He(),be);at(Fu(),be);at(K(),be);at(Ef(),be);at(e_(),be);at(Xy(),be);at(Yy(),be);at(zy(),be);at(ip(),be);at(fp(),be);at(ii(),be);at(T0(),be);var tae=ur();Object.defineProperty(be,"getBlockName",{enumerable:!0,get:function(){return tae.getBlockName}});at($i(),be);var nae=hp();Object.defineProperty(be,"schemaSettingLiquidType",{enumerable:!0,get:function(){return nae.schemaSettingLiquidType}});var rae=e=>{};async function iae(e,t,n){let r=[],i=[],{fs:s}=n,{rootUri:a}=t,o={...n,getBlockParameters:(0,Qse.makeGetBlockParameters)(n),mode:t.context,fileExists:(0,Ca.makeFileExists)(s),fileSize:(0,Ca.makeFileSize)(s),remoteFileSize:n.remoteFileSize??eae.getFileSize,getDefaultLocale:(0,Ca.makeGetDefaultLocale)(s,a),getDefaultTranslations:(0,Ca.makeGetDefaultTranslations)(s,e,a),getDefaultSchemaLocale:(0,Ca.makeGetDefaultSchemaLocale)(s,a),getDefaultSchemaTranslations:(0,Ca.makeGetDefaultSchemaTranslations)(s,e,a),getMetafieldDefinitions:n.getMetafieldDefinitions??(0,Ca.makeGetMetafieldDefinitions)(s)},{DisabledChecksVisitor:c,isDisabled:l}=(0,Zse.createDisabledChecksModule)(),m=(await Xse.JSONValidator.create(o.jsonValidationSet,t))?.validate;o.themeDocset&&!o.themeDocset.isAugmented&&(o.themeDocset=new Yse.AugmentedThemeDocset(o.themeDocset));for(let g of Object.values(eT.SourceCodeType))switch(g){case eT.SourceCodeType.JSON:{let v=Yj(g,e),b=Jj(g,t.checks);for(let _ of v)for(let k of b){if((0,zj.isIgnored)(_.uri,t,k))continue;let w=Kj(k,_,t,i,o,m);r.push(oae(w,_))}break}case eT.SourceCodeType.LiquidHtml:{let v=Yj(g,e),b=[c,...Jj(g,t.checks)];for(let _ of v){let k=[];for(let w of b)(0,zj.isIgnored)(_.uri,t,w)||k.push(Kj(w,_,t,i,o,m));r.push(...cae(k,_))}break}}let p=t.onError||rae;return await Promise.all(r.map(g=>g.catch(p))),i.filter(g=>!l(g))}function sae(e,t,n,r,i,s){let a=r.settings[e.meta.code];return{...i,validateJSON:s,settings:aae(a,e.meta.schema),toUri:o=>Wj.join(r.rootUri,...o.split("/")),toRelativePath:o=>Wj.relative(o,r.rootUri),report(o){n.push({type:e.meta.type,check:e.meta.code,message:o.message,uri:t.uri,severity:a?.severity??e.meta.severity,start:(0,Gj.getPosition)(t.source,o.startIndex),end:(0,Gj.getPosition)(t.source,o.endIndex),fix:o.fix,suggest:o.suggest})},file:t}}function aae(e,t){let n={};for(let[r,i]of Object.entries(t))n[r]=e?.[r]??i.defaultValue();return n}function Jj(e,t){return t.filter(n=>n.meta.type===e)}function Kj(e,t,n,r,i,s){let a=sae(e,t,r,n,i,s);return e.create(a)}function Yj(e,t){return t.filter(n=>n.type===e)}async function oae(e,t){e.onCodePathStart&&await e.onCodePathStart(t),!(t.ast instanceof Error)&&(Object.keys(e).length>0&&await(0,Zj.visitJSON)(t.ast,e),e.onCodePathEnd&&await e.onCodePathEnd(t))}function cae(e,t){if(e.length===0)return[];let n=e.map(()=>[]),r=new Map,i=new Map,s=(a,...o)=>{let c=i.get(a);if(!c){c=[];for(let[l,f]of e.entries())try{f[a]&&c.push(l)}catch(m){r.has(l)||r.set(l,m)}i.set(a,c)}for(let l of c)n[l].push([a,o])};return s("onCodePathStart",t),t.ast instanceof Error||((0,Zj.visitLiquid)(t.ast,s),s("onCodePathEnd",t)),e.map(async(a,o)=>{if(r.has(o))throw r.get(o);for(let[c,l]of n[o])await a[c](...l)})}});var tB=x((vg,eB)=>{d();(function(e,t){typeof vg=="object"&&typeof eB<"u"?t(vg):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.acorn={}))})(vg,(function(e){"use strict";var t=[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],n=[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],r="\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",o={5:a,"5module":a+" export import",6:a+" const class extends export import super"},c=/^in(stanceof)?$/,l=new RegExp("["+i+"]"),f=new RegExp("["+i+r+"]");function m(u,h){for(var S=65536,E=0;E<h.length;E+=2){if(S+=h[E],S>u)return!1;if(S+=h[E+1],S>=u)return!0}return!1}function p(u,h){return u<65?u===36:u<91?!0:u<97?u===95:u<123?!0:u<=65535?u>=170&&l.test(String.fromCharCode(u)):h===!1?!1:m(u,n)}function g(u,h){return u<48?u===36:u<58?!0:u<65?!1:u<91?!0:u<97?u===95:u<123?!0:u<=65535?u>=170&&f.test(String.fromCharCode(u)):h===!1?!1:m(u,n)||m(u,t)}var v=function(h,S){S===void 0&&(S={}),this.label=h,this.keyword=S.keyword,this.beforeExpr=!!S.beforeExpr,this.startsExpr=!!S.startsExpr,this.isLoop=!!S.isLoop,this.isAssign=!!S.isAssign,this.prefix=!!S.prefix,this.postfix=!!S.postfix,this.binop=S.binop||null,this.updateContext=null};function b(u,h){return new v(u,{beforeExpr:!0,binop:h})}var _={beforeExpr:!0},k={startsExpr:!0},w={};function T(u,h){return h===void 0&&(h={}),h.keyword=u,w[u]=new v(u,h)}var y={num:new v("num",k),regexp:new v("regexp",k),string:new v("string",k),name:new v("name",k),privateId:new v("privateId",k),eof:new v("eof"),bracketL:new v("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new v("]"),braceL:new v("{",{beforeExpr:!0,startsExpr:!0}),braceR:new v("}"),parenL:new v("(",{beforeExpr:!0,startsExpr:!0}),parenR:new v(")"),comma:new v(",",_),semi:new v(";",_),colon:new v(":",_),dot:new v("."),question:new v("?",_),questionDot:new v("?."),arrow:new v("=>",_),template:new v("template"),invalidTemplate:new v("invalidTemplate"),ellipsis:new v("...",_),backQuote:new v("`",k),dollarBraceL:new v("${",{beforeExpr:!0,startsExpr:!0}),eq:new v("=",{beforeExpr:!0,isAssign:!0}),assign:new v("_=",{beforeExpr:!0,isAssign:!0}),incDec:new v("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new v("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:b("||",1),logicalAND:b("&&",2),bitwiseOR:b("|",3),bitwiseXOR:b("^",4),bitwiseAND:b("&",5),equality:b("==/!=/===/!==",6),relational:b("</>/<=/>=",7),bitShift:b("<</>>/>>>",8),plusMin:new v("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:b("%",10),star:b("*",10),slash:b("/",10),starstar:new v("**",{beforeExpr:!0}),coalesce:b("??",1),_break:T("break"),_case:T("case",_),_catch:T("catch"),_continue:T("continue"),_debugger:T("debugger"),_default:T("default",_),_do:T("do",{isLoop:!0,beforeExpr:!0}),_else:T("else",_),_finally:T("finally"),_for:T("for",{isLoop:!0}),_function:T("function",k),_if:T("if"),_return:T("return",_),_switch:T("switch"),_throw:T("throw",_),_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",k),_super:T("super",k),_class:T("class",k),_extends:T("extends",_),_export:T("export"),_import:T("import",k),_null:T("null",k),_true:T("true",k),_false:T("false",k),_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})},A=/\r\n?|\n|\u2028|\u2029/,N=new RegExp(A.source,"g");function O(u){return u===10||u===13||u===8232||u===8233}function q(u,h,S){S===void 0&&(S=u.length);for(var E=h;E<S;E++){var P=u.charCodeAt(E);if(O(P))return E<S-1&&P===13&&u.charCodeAt(E+1)===10?E+2:E+1}return-1}var j=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,M=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,C=Object.prototype,L=C.hasOwnProperty,V=C.toString,$=Object.hasOwn||(function(u,h){return L.call(u,h)}),I=Array.isArray||(function(u){return V.call(u)==="[object Array]"}),B=Object.create(null);function U(u){return B[u]||(B[u]=new RegExp("^(?:"+u.replace(/ /g,"|")+")$"))}function J(u){return u<=65535?String.fromCharCode(u):(u-=65536,String.fromCharCode((u>>10)+55296,(u&1023)+56320))}var Q=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Y=function(h,S){this.line=h,this.column=S};Y.prototype.offset=function(h){return new Y(this.line,this.column+h)};var he=function(h,S,E){this.start=S,this.end=E,h.sourceFile!==null&&(this.source=h.sourceFile)};function z(u,h){for(var S=1,E=0;;){var P=q(u,E,h);if(P<0)return new Y(S,h-E);++S,E=P}}var de={ecmaVersion:null,sourceType:"script",strict:!1,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},pe=!1;function dn(u){var h={};for(var S in de)h[S]=u&&$(u,S)?u[S]:de[S];if(h.ecmaVersion==="latest"?h.ecmaVersion=1e8:h.ecmaVersion==null?(!pe&&typeof console=="object"&&console.warn&&(pe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
92
|
+
Defaulting to 2020, but this will stop working in the future.`)),h.ecmaVersion=11):h.ecmaVersion>=2015&&(h.ecmaVersion-=2009),h.allowReserved==null&&(h.allowReserved=h.ecmaVersion<5),(!u||u.allowHashBang==null)&&(h.allowHashBang=h.ecmaVersion>=14),I(h.onToken)){var E=h.onToken;h.onToken=function(P){return E.push(P)}}if(I(h.onComment)&&(h.onComment=Ur(h,h.onComment)),h.sourceType==="commonjs"&&h.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return h}function Ur(u,h){return function(S,E,P,R,F,G){var X={type:S?"Block":"Line",value:E,start:P,end:R};u.locations&&(X.loc=new he(this,F,G)),u.ranges&&(X.range=[P,R]),h.push(X)}}var gt=1,Ft=2,vs=4,Ic=8,pn=16,Hr=32,bs=64,Dw=128,ks=256,Mc=512,jw=1024,gf=gt|Ft|ks;function Ry(u,h){return Ft|(u?vs:0)|(h?Ic:0)}var yf=0,Dy=1,zr=2,Bw=3,Fw=4,Vw=5,st=function(h,S,E){this.options=h=dn(h),this.sourceFile=h.sourceFile,this.keywords=U(o[h.ecmaVersion>=6?6:h.sourceType==="module"?"5module":5]);var P="";h.allowReserved!==!0&&(P=s[h.ecmaVersion>=6?6:h.ecmaVersion===5?5:3],h.sourceType==="module"&&(P+=" await")),this.reservedWords=U(P);var R=(P?P+" ":"")+s.strict;this.reservedWordsStrict=U(R),this.reservedWordsStrictBind=U(R+" "+s.strictBind),this.input=String(S),this.containsEsc=!1,E?(this.pos=E,this.lineStart=this.input.lastIndexOf(`
|
|
93
|
+
`,E-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(A).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=y.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=h.sourceType==="module",this.strict=this.inModule||h.strict===!0||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&&h.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Ft:gt),this.regexpState=null,this.privateNameStack=[]},Pn={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}};st.prototype.parse=function(){var h=this,S=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return h.parseTopLevel(S)})},Pn.inFunction.get=function(){return(this.currentVarScope().flags&Ft)>0},Pn.inGenerator.get=function(){return(this.currentVarScope().flags&Ic)>0},Pn.inAsync.get=function(){return(this.currentVarScope().flags&vs)>0},Pn.canAwait.get=function(){for(var u=this.scopeStack.length-1;u>=0;u--){var h=this.scopeStack[u],S=h.flags;if(S&(ks|Mc))return!1;if(S&Ft)return(S&vs)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Pn.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags>)},Pn.allowSuper.get=function(){var u=this.currentThisScope(),h=u.flags;return(h&bs)>0||this.options.allowSuperOutsideMethod},Pn.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Dw)>0},Pn.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Pn.allowNewDotTarget.get=function(){for(var u=this.scopeStack.length-1;u>=0;u--){var h=this.scopeStack[u],S=h.flags;if(S&(ks|Mc)||S&Ft&&!(S&pn))return!0}return!1},Pn.allowUsing.get=function(){var u=this.currentScope(),h=u.flags;return!(h&jw||!this.inModule&&h>)},Pn.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ks)>0},st.extend=function(){for(var h=[],S=arguments.length;S--;)h[S]=arguments[S];for(var E=this,P=0;P<h.length;P++)E=h[P](E);return E},st.parse=function(h,S){return new this(S,h).parse()},st.parseExpressionAt=function(h,S,E){var P=new this(E,h,S);return P.nextToken(),P.parseExpression()},st.tokenizer=function(h,S){return new this(S,h)},Object.defineProperties(st.prototype,Pn);var Vt=st.prototype,R$=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Vt.strictDirective=function(u){if(this.options.ecmaVersion<5)return!1;for(;;){M.lastIndex=u,u+=M.exec(this.input)[0].length;var h=R$.exec(this.input.slice(u));if(!h)return!1;if((h[1]||h[2])==="use strict"){M.lastIndex=u+h[0].length;var S=M.exec(this.input),E=S.index+S[0].length,P=this.input.charAt(E);return P===";"||P==="}"||A.test(S[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(P)||P==="!"&&this.input.charAt(E+1)==="=")}u+=h[0].length,M.lastIndex=u,u+=M.exec(this.input)[0].length,this.input[u]===";"&&u++}},Vt.eat=function(u){return this.type===u?(this.next(),!0):!1},Vt.isContextual=function(u){return this.type===y.name&&this.value===u&&!this.containsEsc},Vt.eatContextual=function(u){return this.isContextual(u)?(this.next(),!0):!1},Vt.catchStackOverflow=function(u){try{return u()}catch(h){if(h instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(h.message)||/\btoo much recursion\b/i.test(h.message)))this.raise(this.start,"Not enough stack space to parse input");else throw h}},Vt.expectContextual=function(u){this.eatContextual(u)||this.unexpected()},Vt.canInsertSemicolon=function(){return this.type===y.eof||this.type===y.braceR||A.test(this.input.slice(this.lastTokEnd,this.start))},Vt.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Vt.semicolon=function(){!this.eat(y.semi)&&!this.insertSemicolon()&&this.unexpected()},Vt.afterTrailingComma=function(u,h){if(this.type===u)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),h||this.next(),!0},Vt.expect=function(u){this.eat(u)||this.unexpected()},Vt.unexpected=function(u){this.raise(u??this.start,"Unexpected token")};var _f=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Vt.checkPatternErrors=function(u,h){if(u){u.trailingComma>-1&&this.raiseRecoverable(u.trailingComma,"Comma is not permitted after the rest element");var S=h?u.parenthesizedAssign:u.parenthesizedBind;S>-1&&this.raiseRecoverable(S,h?"Assigning to rvalue":"Parenthesized pattern")}},Vt.checkExpressionErrors=function(u,h){if(!u)return!1;var S=u.shorthandAssign,E=u.doubleProto;if(!h)return S>=0||E>=0;S>=0&&this.raise(S,"Shorthand property assignments are valid only in destructuring patterns"),E>=0&&this.raiseRecoverable(E,"Redefinition of __proto__ property")},Vt.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")},Vt.isSimpleAssignTarget=function(u){return u.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(u.expression):u.type==="Identifier"||u.type==="MemberExpression"};var ie=st.prototype;ie.parseTopLevel=function(u){var h=Object.create(null);for(u.body||(u.body=[]);this.type!==y.eof;){var S=this.parseStatement(null,!0,h);u.body.push(S)}if(this.inModule)for(var E=0,P=Object.keys(this.undefinedExports);E<P.length;E+=1){var R=P[E];this.raiseRecoverable(this.undefinedExports[R].start,"Export '"+R+"' is not defined")}return this.adaptDirectivePrologue(u.body),this.next(),u.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(u,"Program")};var jy={kind:"loop"},D$={kind:"switch"};ie.isLet=function(u){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;M.lastIndex=this.pos;var h=M.exec(this.input),S=this.pos+h[0].length,E=this.fullCharCodeAt(S);if(E===91||E===92)return!0;if(u)return!1;if(E===123)return!0;if(p(E)){var P=S;do S+=E<=65535?1:2;while(g(E=this.fullCharCodeAt(S)));if(E===92)return!0;var R=this.input.slice(P,S);if(!c.test(R))return!0}return!1},ie.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;M.lastIndex=this.pos;var u=M.exec(this.input),h=this.pos+u[0].length,S;return!A.test(this.input.slice(this.pos,h))&&this.input.slice(h,h+8)==="function"&&(h+8===this.input.length||!(g(S=this.fullCharCodeAt(h+8))||S===92))},ie.isUsingKeyword=function(u,h){if(this.options.ecmaVersion<17||!this.isContextual(u?"await":"using"))return!1;M.lastIndex=this.pos;var S=M.exec(this.input),E=this.pos+S[0].length;if(A.test(this.input.slice(this.pos,E)))return!1;if(u){var P=E+5,R;if(this.input.slice(E,P)!=="using"||P===this.input.length||g(R=this.fullCharCodeAt(P))||R===92)return!1;M.lastIndex=P;var F=M.exec(this.input);if(E=P+F[0].length,F&&A.test(this.input.slice(P,E)))return!1}var G=this.fullCharCodeAt(E);if(!p(G)&&G!==92)return!1;var X=E;do E+=G<=65535?1:2;while(g(G=this.fullCharCodeAt(E)));if(G===92)return!0;var me=this.input.slice(X,E);if(c.test(me))return!1;if(h&&!u&&me==="of"){M.lastIndex=E;var ke=M.exec(this.input);if(E=E+ke[0].length,this.input.charCodeAt(E)!==61||(G=this.input.charCodeAt(E+1))===61||G===62)return!1}return!0},ie.isAwaitUsing=function(u){return this.isUsingKeyword(!0,u)},ie.isUsing=function(u){return this.isUsingKeyword(!1,u)},ie.parseStatement=function(u,h,S){var E=this.type,P=this.startNode(),R;switch(this.isLet(u)&&(E=y._var,R="let"),E){case y._break:case y._continue:return this.parseBreakContinueStatement(P,E.keyword);case y._debugger:return this.parseDebuggerStatement(P);case y._do:return this.parseDoStatement(P);case y._for:return this.parseForStatement(P);case y._function:return u&&(this.strict||u!=="if"&&u!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(P,!1,!u);case y._class:return u&&this.unexpected(),this.parseClass(P,!0);case y._if:return this.parseIfStatement(P);case y._return:return this.parseReturnStatement(P);case y._switch:return this.parseSwitchStatement(P);case y._throw:return this.parseThrowStatement(P);case y._try:return this.parseTryStatement(P);case y._const:case y._var:return R=R||this.value,u&&R!=="var"&&this.unexpected(),this.parseVarStatement(P,R);case y._while:return this.parseWhileStatement(P);case y._with:return this.parseWithStatement(P);case y.braceL:return this.parseBlock(!0,P);case y.semi:return this.parseEmptyStatement(P);case y._export:case y._import:if(this.options.ecmaVersion>10&&E===y._import){M.lastIndex=this.pos;var F=M.exec(this.input),G=this.pos+F[0].length,X=this.input.charCodeAt(G);if(X===40||X===46)return this.parseExpressionStatement(P,this.parseExpression())}return this.options.allowImportExportEverywhere||(h||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'")),E===y._import?this.parseImport(P):this.parseExport(P,S);default:if(this.isAsyncFunction())return u&&this.unexpected(),this.next(),this.parseFunctionStatement(P,!0,!u);var me=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(me)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"),u&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),me==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(P,!1,me),this.semicolon(),this.finishNode(P,"VariableDeclaration");var ke=this.value,We=this.parseExpression();return E===y.name&&We.type==="Identifier"&&this.eat(y.colon)?this.parseLabeledStatement(P,ke,We,u):this.parseExpressionStatement(P,We)}},ie.parseBreakContinueStatement=function(u,h){var S=h==="break";this.next(),this.eat(y.semi)||this.insertSemicolon()?u.label=null:this.type!==y.name?this.unexpected():(u.label=this.parseIdent(),this.semicolon());for(var E=0;E<this.labels.length;++E){var P=this.labels[E];if((u.label==null||P.name===u.label.name)&&(P.kind!=null&&(S||P.kind==="loop")||u.label&&S))break}return E===this.labels.length&&this.raise(u.start,"Unsyntactic "+h),this.finishNode(u,S?"BreakStatement":"ContinueStatement")},ie.parseDebuggerStatement=function(u){return this.next(),this.semicolon(),this.finishNode(u,"DebuggerStatement")},ie.parseDoStatement=function(u){return this.next(),this.labels.push(jy),u.body=this.parseStatement("do"),this.labels.pop(),this.expect(y._while),u.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(y.semi):this.semicolon(),this.finishNode(u,"DoWhileStatement")},ie.parseForStatement=function(u){this.next();var h=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(jy),this.enterScope(0),this.expect(y.parenL),this.type===y.semi)return h>-1&&this.unexpected(h),this.parseFor(u,null);var S=this.isLet();if(this.type===y._var||this.type===y._const||S){var E=this.startNode(),P=S?"let":this.value;return this.next(),this.parseVar(E,!0,P),this.finishNode(E,"VariableDeclaration"),this.parseForAfterInit(u,E,h)}var R=this.isContextual("let"),F=!1,G=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(G){var X=this.startNode();return this.next(),G==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(X,!0,G),this.finishNode(X,"VariableDeclaration"),this.parseForAfterInit(u,X,h)}var me=this.containsEsc,ke=new _f,We=this.start,$t=h>-1?this.parseExprSubscripts(ke,"await"):this.parseExpression(!0,ke);return this.type===y._in||(F=this.options.ecmaVersion>=6&&this.isContextual("of"))?(h>-1?(this.type===y._in&&this.unexpected(h),u.await=!0):F&&this.options.ecmaVersion>=8&&($t.start===We&&!me&&$t.type==="Identifier"&&$t.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(u.await=!1)),R&&F&&this.raise($t.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable($t,!1,ke),this.checkLValPattern($t),this.parseForIn(u,$t)):(this.checkExpressionErrors(ke,!0),h>-1&&this.unexpected(h),this.parseFor(u,$t))},ie.parseForAfterInit=function(u,h,S){return(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&h.declarations.length===1?(this.type===y._in?((h.kind==="using"||h.kind==="await using")&&!h.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&S>-1&&this.unexpected(S)):this.options.ecmaVersion>=9&&(u.await=S>-1),this.parseForIn(u,h)):(S>-1&&this.unexpected(S),this.parseFor(u,h))},ie.parseFunctionStatement=function(u,h,S){return this.next(),this.parseFunction(u,Rc|(S?0:By),!1,h)},ie.parseIfStatement=function(u){return this.next(),u.test=this.parseParenExpression(),u.consequent=this.parseStatement("if"),u.alternate=this.eat(y._else)?this.parseStatement("if"):null,this.finishNode(u,"IfStatement")},ie.parseReturnStatement=function(u){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(y.semi)||this.insertSemicolon()?u.argument=null:(u.argument=this.parseExpression(),this.semicolon()),this.finishNode(u,"ReturnStatement")},ie.parseSwitchStatement=function(u){this.next(),u.discriminant=this.parseParenExpression(),u.cases=[],this.expect(y.braceL),this.labels.push(D$),this.enterScope(jw);for(var h,S=!1;this.type!==y.braceR;)if(this.type===y._case||this.type===y._default){var E=this.type===y._case;h&&this.finishNode(h,"SwitchCase"),u.cases.push(h=this.startNode()),h.consequent=[],this.next(),E?h.test=this.parseExpression():(S&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),S=!0,h.test=null),this.expect(y.colon)}else h||this.unexpected(),h.consequent.push(this.parseStatement(null));return this.exitScope(),h&&this.finishNode(h,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(u,"SwitchStatement")},ie.parseThrowStatement=function(u){return this.next(),A.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),u.argument=this.parseExpression(),this.semicolon(),this.finishNode(u,"ThrowStatement")};var j$=[];ie.parseCatchClauseParam=function(){var u=this.parseBindingAtom(),h=u.type==="Identifier";return this.enterScope(h?Hr:0),this.checkLValPattern(u,h?Fw:zr),this.expect(y.parenR),u},ie.parseTryStatement=function(u){if(this.next(),u.block=this.parseBlock(),u.handler=null,this.type===y._catch){var h=this.startNode();this.next(),this.eat(y.parenL)?h.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),h.param=null,this.enterScope(0)),h.body=this.parseBlock(!1),this.exitScope(),u.handler=this.finishNode(h,"CatchClause")}return u.finalizer=this.eat(y._finally)?this.parseBlock():null,!u.handler&&!u.finalizer&&this.raise(u.start,"Missing catch or finally clause"),this.finishNode(u,"TryStatement")},ie.parseVarStatement=function(u,h,S){return this.next(),this.parseVar(u,!1,h,S),this.semicolon(),this.finishNode(u,"VariableDeclaration")},ie.parseWhileStatement=function(u){return this.next(),u.test=this.parseParenExpression(),this.labels.push(jy),u.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(u,"WhileStatement")},ie.parseWithStatement=function(u){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),u.object=this.parseParenExpression(),u.body=this.parseStatement("with"),this.finishNode(u,"WithStatement")},ie.parseEmptyStatement=function(u){return this.next(),this.finishNode(u,"EmptyStatement")},ie.parseLabeledStatement=function(u,h,S,E){for(var P=0,R=this.labels;P<R.length;P+=1){var F=R[P];F.name===h&&this.raise(S.start,"Label '"+h+"' is already declared")}for(var G=this.type.isLoop?"loop":this.type===y._switch?"switch":null,X=this.labels.length-1;X>=0;X--){var me=this.labels[X];if(me.statementStart===u.start)me.statementStart=this.start,me.kind=G;else break}return this.labels.push({name:h,kind:G,statementStart:this.start}),u.body=this.parseStatement(E?E.indexOf("label")===-1?E+"label":E:"label"),this.labels.pop(),u.label=S,this.finishNode(u,"LabeledStatement")},ie.parseExpressionStatement=function(u,h){return u.expression=h,this.semicolon(),this.finishNode(u,"ExpressionStatement")},ie.parseBlock=function(u,h,S){for(u===void 0&&(u=!0),h===void 0&&(h=this.startNode()),h.body=[],this.expect(y.braceL),u&&this.enterScope(0);this.type!==y.braceR;){var E=this.parseStatement(null);h.body.push(E)}return S&&(this.strict=!1),this.next(),u&&this.exitScope(),this.finishNode(h,"BlockStatement")},ie.parseFor=function(u,h){return u.init=h,this.expect(y.semi),u.test=this.type===y.semi?null:this.parseExpression(),this.expect(y.semi),u.update=this.type===y.parenR?null:this.parseExpression(),this.expect(y.parenR),u.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(u,"ForStatement")},ie.parseForIn=function(u,h){var S=this.type===y._in;return this.next(),h.type==="VariableDeclaration"&&h.declarations[0].init!=null&&(!S||this.options.ecmaVersion<8||this.strict||h.kind!=="var"||h.declarations[0].id.type!=="Identifier")&&this.raise(h.start,(S?"for-in":"for-of")+" loop variable declaration may not have an initializer"),u.left=h,u.right=S?this.parseExpression():this.parseMaybeAssign(),this.expect(y.parenR),u.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(u,S?"ForInStatement":"ForOfStatement")},ie.parseVar=function(u,h,S,E){for(u.declarations=[],u.kind=S;;){var P=this.startNode();if(this.parseVarId(P,S),this.eat(y.eq)?P.init=this.parseMaybeAssign(h):!E&&S==="const"&&!(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!E&&(S==="using"||S==="await using")&&this.options.ecmaVersion>=17&&this.type!==y._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+S+" declaration"):!E&&P.id.type!=="Identifier"&&!(h&&(this.type===y._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):P.init=null,u.declarations.push(this.finishNode(P,"VariableDeclarator")),!this.eat(y.comma))break}return u},ie.parseVarId=function(u,h){u.id=h==="using"||h==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(u.id,h==="var"?Dy:zr,!1)};var Rc=1,By=2,$w=4;ie.parseFunction=function(u,h,S,E,P){this.initFunction(u),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!E)&&(this.type===y.star&&h&By&&this.unexpected(),u.generator=this.eat(y.star)),this.options.ecmaVersion>=8&&(u.async=!!E),h&Rc&&(u.id=h&$w&&this.type!==y.name?null:this.parseIdent(),u.id&&!(h&By)&&this.checkLValSimple(u.id,this.strict||u.generator||u.async?this.treatFunctionsAsVar?Dy:zr:Bw));var R=this.yieldPos,F=this.awaitPos,G=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ry(u.async,u.generator)),h&Rc||(u.id=this.type===y.name?this.parseIdent():null),this.parseFunctionParams(u),this.parseFunctionBody(u,S,!1,P),this.yieldPos=R,this.awaitPos=F,this.awaitIdentPos=G,this.finishNode(u,h&Rc?"FunctionDeclaration":"FunctionExpression")},ie.parseFunctionParams=function(u){this.expect(y.parenL),u.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},ie.parseClass=function(u,h){this.next();var S=this.strict;this.strict=!0,this.parseClassId(u,h),this.parseClassSuper(u);var E=this.enterClassBody(),P=this.startNode(),R=!1;for(P.body=[],this.expect(y.braceL);this.type!==y.braceR;){var F=this.parseClassElement(u.superClass!==null);F&&(P.body.push(F),F.type==="MethodDefinition"&&F.kind==="constructor"?(R&&this.raiseRecoverable(F.start,"Duplicate constructor in the same class"),R=!0):F.key&&F.key.type==="PrivateIdentifier"&&B$(E,F)&&this.raiseRecoverable(F.key.start,"Identifier '#"+F.key.name+"' has already been declared"))}return this.strict=S,this.next(),u.body=this.finishNode(P,"ClassBody"),this.exitClassBody(),this.finishNode(u,h?"ClassDeclaration":"ClassExpression")},ie.parseClassElement=function(u){if(this.eat(y.semi))return null;var h=this.options.ecmaVersion,S=this.startNode(),E="",P=!1,R=!1,F="method",G=!1;if(this.eatContextual("static")){if(h>=13&&this.eat(y.braceL))return this.parseClassStaticBlock(S),S;this.isClassElementNameStart()||this.type===y.star?G=!0:E="static"}if(S.static=G,!E&&h>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===y.star)&&!this.canInsertSemicolon()?R=!0:E="async"),!E&&(h>=9||!R)&&this.eat(y.star)&&(P=!0),!E&&!R&&!P){var X=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?F=X:E=X)}if(E?(S.computed=!1,S.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),S.key.name=E,this.finishNode(S.key,"Identifier")):this.parseClassElementName(S),h<13||this.type===y.parenL||F!=="method"||P||R){var me=!S.static&&vf(S,"constructor"),ke=me&&u;me&&F!=="method"&&this.raise(S.key.start,"Constructor can't have get/set modifier"),S.kind=me?"constructor":F,this.parseClassMethod(S,P,R,ke)}else this.parseClassField(S);return S},ie.isClassElementNameStart=function(){return this.type===y.name||this.type===y.privateId||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword},ie.parseClassElementName=function(u){this.type===y.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),u.computed=!1,u.key=this.parsePrivateIdent()):this.parsePropertyName(u)},ie.parseClassMethod=function(u,h,S,E){var P=u.key;u.kind==="constructor"?(h&&this.raise(P.start,"Constructor can't be a generator"),S&&this.raise(P.start,"Constructor can't be an async method")):u.static&&vf(u,"prototype")&&this.raise(P.start,"Classes may not have a static property named prototype");var R=u.value=this.parseMethod(h,S,E);return u.kind==="get"&&R.params.length!==0&&this.raiseRecoverable(R.start,"getter should have no params"),u.kind==="set"&&R.params.length!==1&&this.raiseRecoverable(R.start,"setter should have exactly one param"),u.kind==="set"&&R.params[0].type==="RestElement"&&this.raiseRecoverable(R.params[0].start,"Setter cannot use rest params"),this.finishNode(u,"MethodDefinition")},ie.parseClassField=function(u){return vf(u,"constructor")?this.raise(u.key.start,"Classes can't have a field named 'constructor'"):u.static&&vf(u,"prototype")&&this.raise(u.key.start,"Classes can't have a static field named 'prototype'"),this.eat(y.eq)?(this.enterScope(Mc|bs),u.value=this.parseMaybeAssign(),this.exitScope()):u.value=null,this.semicolon(),this.finishNode(u,"PropertyDefinition")},ie.parseClassStaticBlock=function(u){u.body=[];var h=this.labels;for(this.labels=[],this.enterScope(ks|bs);this.type!==y.braceR;){var S=this.parseStatement(null);u.body.push(S)}return this.next(),this.exitScope(),this.labels=h,this.finishNode(u,"StaticBlock")},ie.parseClassId=function(u,h){this.type===y.name?(u.id=this.parseIdent(),h&&this.checkLValSimple(u.id,zr,!1)):(h===!0&&this.unexpected(),u.id=null)},ie.parseClassSuper=function(u){u.superClass=this.eat(y._extends)?this.parseExprSubscripts(null,!1):null},ie.enterClassBody=function(){var u={declared:Object.create(null),used:[]};return this.privateNameStack.push(u),u.declared},ie.exitClassBody=function(){var u=this.privateNameStack.pop(),h=u.declared,S=u.used;if(this.options.checkPrivateFields)for(var E=this.privateNameStack.length,P=E===0?null:this.privateNameStack[E-1],R=0;R<S.length;++R){var F=S[R];$(h,F.name)||(P?P.used.push(F):this.raiseRecoverable(F.start,"Private field '#"+F.name+"' must be declared in an enclosing class"))}};function B$(u,h){var S=h.key.name,E=u[S],P="true";return h.type==="MethodDefinition"&&(h.kind==="get"||h.kind==="set")&&(P=(h.static?"s":"i")+h.kind),E==="iget"&&P==="iset"||E==="iset"&&P==="iget"||E==="sget"&&P==="sset"||E==="sset"&&P==="sget"?(u[S]="true",!1):E?!0:(u[S]=P,!1)}function vf(u,h){var S=u.computed,E=u.key;return!S&&(E.type==="Identifier"&&E.name===h||E.type==="Literal"&&E.value===h)}ie.parseExportAllDeclaration=function(u,h){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(u.exported=this.parseModuleExportName(),this.checkExport(h,u.exported,this.lastTokStart)):u.exported=null),this.expectContextual("from"),this.type!==y.string&&this.unexpected(),u.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(u.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(u,"ExportAllDeclaration")},ie.parseExport=function(u,h){if(this.next(),this.eat(y.star))return this.parseExportAllDeclaration(u,h);if(this.eat(y._default))return this.checkExport(h,"default",this.lastTokStart),u.declaration=this.parseExportDefaultDeclaration(),this.finishNode(u,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())u.declaration=this.parseExportDeclaration(u),u.declaration.type==="VariableDeclaration"?this.checkVariableExport(h,u.declaration.declarations):this.checkExport(h,u.declaration.id,u.declaration.id.start),u.specifiers=[],u.source=null,this.options.ecmaVersion>=16&&(u.attributes=[]);else{if(u.declaration=null,u.specifiers=this.parseExportSpecifiers(h),this.eatContextual("from"))this.type!==y.string&&this.unexpected(),u.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(u.attributes=this.parseWithClause());else{for(var S=0,E=u.specifiers;S<E.length;S+=1){var P=E[S];this.checkUnreserved(P.local),this.checkLocalExport(P.local),P.local.type==="Literal"&&this.raise(P.local.start,"A string literal cannot be used as an exported binding without `from`.")}u.source=null,this.options.ecmaVersion>=16&&(u.attributes=[])}this.semicolon()}return this.finishNode(u,"ExportNamedDeclaration")},ie.parseExportDeclaration=function(u){return this.parseStatement(null)},ie.parseExportDefaultDeclaration=function(){var u;if(this.type===y._function||(u=this.isAsyncFunction())){var h=this.startNode();return this.next(),u&&this.next(),this.parseFunction(h,Rc|$w,!1,u)}else if(this.type===y._class){var S=this.startNode();return this.parseClass(S,"nullableID")}else{var E=this.parseMaybeAssign();return this.semicolon(),E}},ie.checkExport=function(u,h,S){u&&(typeof h!="string"&&(h=h.type==="Identifier"?h.name:h.value),$(u,h)&&this.raiseRecoverable(S,"Duplicate export '"+h+"'"),u[h]=!0)},ie.checkPatternExport=function(u,h){var S=h.type;if(S==="Identifier")this.checkExport(u,h,h.start);else if(S==="ObjectPattern")for(var E=0,P=h.properties;E<P.length;E+=1){var R=P[E];this.checkPatternExport(u,R)}else if(S==="ArrayPattern")for(var F=0,G=h.elements;F<G.length;F+=1){var X=G[F];X&&this.checkPatternExport(u,X)}else S==="Property"?this.checkPatternExport(u,h.value):S==="AssignmentPattern"?this.checkPatternExport(u,h.left):S==="RestElement"&&this.checkPatternExport(u,h.argument)},ie.checkVariableExport=function(u,h){if(u)for(var S=0,E=h;S<E.length;S+=1){var P=E[S];this.checkPatternExport(u,P.id)}},ie.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},ie.parseExportSpecifier=function(u){var h=this.startNode();return h.local=this.parseModuleExportName(),h.exported=this.eatContextual("as")?this.parseModuleExportName():h.local,this.checkExport(u,h.exported,h.exported.start),this.finishNode(h,"ExportSpecifier")},ie.parseExportSpecifiers=function(u){var h=[],S=!0;for(this.expect(y.braceL);!this.eat(y.braceR);){if(S)S=!1;else if(this.expect(y.comma),this.afterTrailingComma(y.braceR))break;h.push(this.parseExportSpecifier(u))}return h},ie.parseImport=function(u){return this.next(),this.type===y.string?(u.specifiers=j$,u.source=this.parseExprAtom()):(u.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),u.source=this.type===y.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(u.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(u,"ImportDeclaration")},ie.parseImportSpecifier=function(){var u=this.startNode();return u.imported=this.parseModuleExportName(),this.eatContextual("as")?u.local=this.parseIdent():(this.checkUnreserved(u.imported),u.local=u.imported),this.checkLValSimple(u.local,zr),this.finishNode(u,"ImportSpecifier")},ie.parseImportDefaultSpecifier=function(){var u=this.startNode();return u.local=this.parseIdent(),this.checkLValSimple(u.local,zr),this.finishNode(u,"ImportDefaultSpecifier")},ie.parseImportNamespaceSpecifier=function(){var u=this.startNode();return this.next(),this.expectContextual("as"),u.local=this.parseIdent(),this.checkLValSimple(u.local,zr),this.finishNode(u,"ImportNamespaceSpecifier")},ie.parseImportSpecifiers=function(){var u=[],h=!0;if(this.type===y.name&&(u.push(this.parseImportDefaultSpecifier()),!this.eat(y.comma)))return u;if(this.type===y.star)return u.push(this.parseImportNamespaceSpecifier()),u;for(this.expect(y.braceL);!this.eat(y.braceR);){if(h)h=!1;else if(this.expect(y.comma),this.afterTrailingComma(y.braceR))break;u.push(this.parseImportSpecifier())}return u},ie.parseWithClause=function(){var u=[];if(!this.eat(y._with))return u;this.expect(y.braceL);for(var h={},S=!0;!this.eat(y.braceR);){if(S)S=!1;else if(this.expect(y.comma),this.afterTrailingComma(y.braceR))break;var E=this.parseImportAttribute(),P=E.key.type==="Identifier"?E.key.name:E.key.value;$(h,P)&&this.raiseRecoverable(E.key.start,"Duplicate attribute key '"+P+"'"),h[P]=!0,u.push(E)}return u},ie.parseImportAttribute=function(){var u=this.startNode();return u.key=this.type===y.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(y.colon),this.type!==y.string&&this.unexpected(),u.value=this.parseExprAtom(),this.finishNode(u,"ImportAttribute")},ie.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===y.string){var u=this.parseLiteral(this.value);return Q.test(u.value)&&this.raise(u.start,"An export name cannot include a lone surrogate."),u}return this.parseIdent(!0)},ie.adaptDirectivePrologue=function(u){for(var h=0;h<u.length&&this.isDirectiveCandidate(u[h]);++h)u[h].directive=u[h].expression.raw.slice(1,-1)},ie.isDirectiveCandidate=function(u){return this.options.ecmaVersion>=5&&u.type==="ExpressionStatement"&&u.expression.type==="Literal"&&typeof u.expression.value=="string"&&(this.input[u.start]==='"'||this.input[u.start]==="'")};var Cn=st.prototype;Cn.toAssignable=function(u,h,S){if(this.options.ecmaVersion>=6&&u)switch(u.type){case"Identifier":this.inAsync&&u.name==="await"&&this.raise(u.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":u.type="ObjectPattern",S&&this.checkPatternErrors(S,!0);for(var E=0,P=u.properties;E<P.length;E+=1){var R=P[E];this.toAssignable(R,h),R.type==="RestElement"&&(R.argument.type==="ArrayPattern"||R.argument.type==="ObjectPattern")&&this.raise(R.argument.start,"Unexpected token")}break;case"Property":u.kind!=="init"&&this.raise(u.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(u.value,h);break;case"ArrayExpression":u.type="ArrayPattern",S&&this.checkPatternErrors(S,!0),this.toAssignableList(u.elements,h);break;case"SpreadElement":u.type="RestElement",this.toAssignable(u.argument,h),u.argument.type==="AssignmentPattern"&&this.raise(u.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":u.operator!=="="&&this.raise(u.left.end,"Only '=' operator can be used for specifying default value."),u.type="AssignmentPattern",delete u.operator,this.toAssignable(u.left,h);break;case"ParenthesizedExpression":this.toAssignable(u.expression,h,S);break;case"ChainExpression":this.raiseRecoverable(u.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!h)break;default:this.raise(u.start,"Assigning to rvalue")}else S&&this.checkPatternErrors(S,!0);return u},Cn.toAssignableList=function(u,h){for(var S=u.length,E=0;E<S;E++){var P=u[E];P&&this.toAssignable(P,h)}if(S){var R=u[S-1];this.options.ecmaVersion===6&&h&&R&&R.type==="RestElement"&&R.argument.type!=="Identifier"&&this.unexpected(R.argument.start)}return u},Cn.parseSpread=function(u){var h=this.startNode();return this.next(),h.argument=this.parseMaybeAssign(!1,u),this.finishNode(h,"SpreadElement")},Cn.parseRestBinding=function(){var u=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==y.name&&this.unexpected(),u.argument=this.parseBindingAtom(),this.finishNode(u,"RestElement")},Cn.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case y.bracketL:var u=this.startNode();return this.next(),u.elements=this.parseBindingList(y.bracketR,!0,!0),this.finishNode(u,"ArrayPattern");case y.braceL:return this.parseObj(!0)}return this.parseIdent()},Cn.parseBindingList=function(u,h,S,E){for(var P=[],R=!0;!this.eat(u);)if(R?R=!1:this.expect(y.comma),h&&this.type===y.comma)P.push(null);else{if(S&&this.afterTrailingComma(u))break;if(this.type===y.ellipsis){var F=this.parseRestBinding();this.parseBindingListItem(F),P.push(F),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(u);break}else P.push(this.parseAssignableListItem(E))}return P},Cn.parseAssignableListItem=function(u){var h=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(h),h},Cn.parseBindingListItem=function(u){return u},Cn.parseMaybeDefault=function(u,h,S){if(S=S||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(y.eq))return S;var E=this.startNodeAt(u,h);return E.left=S,E.right=this.parseMaybeAssign(),this.finishNode(E,"AssignmentPattern")},Cn.checkLValSimple=function(u,h,S){h===void 0&&(h=yf);var E=h!==yf;switch(u.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(u.name)&&this.raiseRecoverable(u.start,(E?"Binding ":"Assigning to ")+u.name+" in strict mode"),E&&(h===zr&&u.name==="let"&&this.raiseRecoverable(u.start,"let is disallowed as a lexically bound name"),S&&($(S,u.name)&&this.raiseRecoverable(u.start,"Argument name clash"),S[u.name]=!0),h!==Vw&&this.declareName(u.name,h,u.start));break;case"ChainExpression":this.raiseRecoverable(u.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":E&&this.raiseRecoverable(u.start,"Binding member expression");break;case"ParenthesizedExpression":return E&&this.raiseRecoverable(u.start,"Binding parenthesized expression"),this.checkLValSimple(u.expression,h,S);default:this.raise(u.start,(E?"Binding":"Assigning to")+" rvalue")}},Cn.checkLValPattern=function(u,h,S){switch(h===void 0&&(h=yf),u.type){case"ObjectPattern":for(var E=0,P=u.properties;E<P.length;E+=1){var R=P[E];this.checkLValInnerPattern(R,h,S)}break;case"ArrayPattern":for(var F=0,G=u.elements;F<G.length;F+=1){var X=G[F];X&&this.checkLValInnerPattern(X,h,S)}break;default:this.checkLValSimple(u,h,S)}},Cn.checkLValInnerPattern=function(u,h,S){switch(h===void 0&&(h=yf),u.type){case"Property":this.checkLValInnerPattern(u.value,h,S);break;case"AssignmentPattern":this.checkLValPattern(u.left,h,S);break;case"RestElement":this.checkLValPattern(u.argument,h,S);break;default:this.checkLValPattern(u,h,S)}};var Ln=function(h,S,E,P,R){this.token=h,this.isExpr=!!S,this.preserveSpace=!!E,this.override=P,this.generator=!!R},ze={b_stat:new Ln("{",!1),b_expr:new Ln("{",!0),b_tmpl:new Ln("${",!1),p_stat:new Ln("(",!1),p_expr:new Ln("(",!0),q_tmpl:new Ln("`",!0,!0,function(u){return u.tryReadTemplateToken()}),f_stat:new Ln("function",!1),f_expr:new Ln("function",!0),f_expr_gen:new Ln("function",!0,!1,null,!0),f_gen:new Ln("function",!1,!1,null,!0)},za=st.prototype;za.initialContext=function(){return[ze.b_stat]},za.curContext=function(){return this.context[this.context.length-1]},za.braceIsBlock=function(u){var h=this.curContext();return h===ze.f_expr||h===ze.f_stat?!0:u===y.colon&&(h===ze.b_stat||h===ze.b_expr)?!h.isExpr:u===y._return||u===y.name&&this.exprAllowed?A.test(this.input.slice(this.lastTokEnd,this.start)):u===y._else||u===y.semi||u===y.eof||u===y.parenR||u===y.arrow?!0:u===y.braceL?h===ze.b_stat:u===y._var||u===y._const||u===y.name?!1:!this.exprAllowed},za.inGeneratorContext=function(){for(var u=this.context.length-1;u>=1;u--){var h=this.context[u];if(h.token==="function")return h.generator}return!1},za.updateContext=function(u){var h,S=this.type;S.keyword&&u===y.dot?this.exprAllowed=!1:(h=S.updateContext)?h.call(this,u):this.exprAllowed=S.beforeExpr},za.overrideContext=function(u){this.curContext()!==u&&(this.context[this.context.length-1]=u)},y.parenR.updateContext=y.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var u=this.context.pop();u===ze.b_stat&&this.curContext().token==="function"&&(u=this.context.pop()),this.exprAllowed=!u.isExpr},y.braceL.updateContext=function(u){this.context.push(this.braceIsBlock(u)?ze.b_stat:ze.b_expr),this.exprAllowed=!0},y.dollarBraceL.updateContext=function(){this.context.push(ze.b_tmpl),this.exprAllowed=!0},y.parenL.updateContext=function(u){var h=u===y._if||u===y._for||u===y._with||u===y._while;this.context.push(h?ze.p_stat:ze.p_expr),this.exprAllowed=!0},y.incDec.updateContext=function(){},y._function.updateContext=y._class.updateContext=function(u){u.beforeExpr&&u!==y._else&&!(u===y.semi&&this.curContext()!==ze.p_stat)&&!(u===y._return&&A.test(this.input.slice(this.lastTokEnd,this.start)))&&!((u===y.colon||u===y.braceL)&&this.curContext()===ze.b_stat)?this.context.push(ze.f_expr):this.context.push(ze.f_stat),this.exprAllowed=!1},y.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},y.backQuote.updateContext=function(){this.curContext()===ze.q_tmpl?this.context.pop():this.context.push(ze.q_tmpl),this.exprAllowed=!1},y.star.updateContext=function(u){if(u===y._function){var h=this.context.length-1;this.context[h]===ze.f_expr?this.context[h]=ze.f_expr_gen:this.context[h]=ze.f_gen}this.exprAllowed=!0},y.name.updateContext=function(u){var h=!1;this.options.ecmaVersion>=6&&u!==y.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(h=!0),this.exprAllowed=h};var _e=st.prototype;_e.checkPropClash=function(u,h,S){if(!(this.options.ecmaVersion>=9&&u.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(u.computed||u.method||u.shorthand))){var E=u.key,P;switch(E.type){case"Identifier":P=E.name;break;case"Literal":P=String(E.value);break;default:return}var R=u.kind;if(this.options.ecmaVersion>=6){P==="__proto__"&&R==="init"&&(h.proto&&(S?S.doubleProto<0&&(S.doubleProto=E.start):this.raiseRecoverable(E.start,"Redefinition of __proto__ property")),h.proto=!0);return}P="$"+P;var F=h[P];if(F){var G;R==="init"?G=this.strict&&F.init||F.get||F.set:G=F.init||F[R],G&&this.raiseRecoverable(E.start,"Redefinition of property")}else F=h[P]={init:!1,get:!1,set:!1};F[R]=!0}},_e.parseExpression=function(u,h){var S=this;return this.catchStackOverflow(function(){var E=S.start,P=S.startLoc,R=S.parseMaybeAssign(u,h);if(S.type===y.comma){var F=S.startNodeAt(E,P);for(F.expressions=[R];S.eat(y.comma);)F.expressions.push(S.parseMaybeAssign(u,h));return S.finishNode(F,"SequenceExpression")}return R})},_e.parseMaybeAssign=function(u,h,S){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(u);this.exprAllowed=!1}var E=!1,P=-1,R=-1,F=-1;h?(P=h.parenthesizedAssign,R=h.trailingComma,F=h.doubleProto,h.parenthesizedAssign=h.trailingComma=-1):(h=new _f,E=!0);var G=this.start,X=this.startLoc;(this.type===y.parenL||this.type===y.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=u==="await");var me=this.parseMaybeConditional(u,h);if(S&&(me=S.call(this,me,G,X)),this.type.isAssign){var ke=this.startNodeAt(G,X);return ke.operator=this.value,this.type===y.eq&&(me=this.toAssignable(me,!1,h)),E||(h.parenthesizedAssign=h.trailingComma=h.doubleProto=-1),h.shorthandAssign>=me.start&&(h.shorthandAssign=-1),this.type===y.eq?this.checkLValPattern(me):this.checkLValSimple(me),ke.left=me,this.next(),ke.right=this.parseMaybeAssign(u),F>-1&&(h.doubleProto=F),this.finishNode(ke,"AssignmentExpression")}else E&&this.checkExpressionErrors(h,!0);return P>-1&&(h.parenthesizedAssign=P),R>-1&&(h.trailingComma=R),me},_e.parseMaybeConditional=function(u,h){var S=this.start,E=this.startLoc,P=this.parseExprOps(u,h);if(this.checkExpressionErrors(h))return P;if(!(P.type==="ArrowFunctionExpression"&&P.start===S)&&this.eat(y.question)){var R=this.startNodeAt(S,E);return R.test=P,R.consequent=this.parseMaybeAssign(),this.expect(y.colon),R.alternate=this.parseMaybeAssign(u),this.finishNode(R,"ConditionalExpression")}return P},_e.parseExprOps=function(u,h){var S=this.start,E=this.startLoc,P=this.parseMaybeUnary(h,!1,!1,u);return this.checkExpressionErrors(h)||P.start===S&&P.type==="ArrowFunctionExpression"?P:this.parseExprOp(P,S,E,-1,u)},_e.parseExprOp=function(u,h,S,E,P){var R=this.type.binop;if(R!=null&&(!P||this.type!==y._in)&&R>E){var F=this.type===y.logicalOR||this.type===y.logicalAND,G=this.type===y.coalesce;G&&(R=y.logicalAND.binop);var X=this.value;this.next();var me=this.start,ke=this.startLoc,We=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,P),me,ke,R,P),$t=this.buildBinary(h,S,u,We,X,F||G);return(F&&this.type===y.coalesce||G&&(this.type===y.logicalOR||this.type===y.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp($t,h,S,E,P)}return u},_e.buildBinary=function(u,h,S,E,P,R){E.type==="PrivateIdentifier"&&this.raise(E.start,"Private identifier can only be left side of binary expression");var F=this.startNodeAt(u,h);return F.left=S,F.operator=P,F.right=E,this.finishNode(F,R?"LogicalExpression":"BinaryExpression")},_e.parseMaybeUnary=function(u,h,S,E){var P=this.start,R=this.startLoc,F;if(this.isContextual("await")&&this.canAwait)F=this.parseAwait(E),h=!0;else if(this.type.prefix){var G=this.startNode(),X=this.type===y.incDec;G.operator=this.value,G.prefix=!0,this.next(),G.argument=this.parseMaybeUnary(null,!0,X,E),this.checkExpressionErrors(u,!0),X?this.checkLValSimple(G.argument):this.strict&&G.operator==="delete"&&Uw(G.argument)?this.raiseRecoverable(G.start,"Deleting local variable in strict mode"):G.operator==="delete"&&Fy(G.argument)?this.raiseRecoverable(G.start,"Private fields can not be deleted"):h=!0,F=this.finishNode(G,X?"UpdateExpression":"UnaryExpression")}else if(!h&&this.type===y.privateId)(E||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),F=this.parsePrivateIdent(),this.type!==y._in&&this.unexpected();else{if(F=this.parseExprSubscripts(u,E),this.checkExpressionErrors(u))return F;for(;this.type.postfix&&!this.canInsertSemicolon();){var me=this.startNodeAt(P,R);me.operator=this.value,me.prefix=!1,me.argument=F,this.checkLValSimple(F),this.next(),F=this.finishNode(me,"UpdateExpression")}}if(!S&&this.eat(y.starstar))if(h)this.unexpected(this.lastTokStart);else return this.buildBinary(P,R,F,this.parseMaybeUnary(null,!1,!1,E),"**",!1);else return F};function Uw(u){return u.type==="Identifier"||u.type==="ParenthesizedExpression"&&Uw(u.expression)}function Fy(u){return u.type==="MemberExpression"&&u.property.type==="PrivateIdentifier"||u.type==="ChainExpression"&&Fy(u.expression)||u.type==="ParenthesizedExpression"&&Fy(u.expression)}_e.parseExprSubscripts=function(u,h){var S=this.start,E=this.startLoc,P=this.parseExprAtom(u,h);if(P.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return P;var R=this.parseSubscripts(P,S,E,!1,h);return u&&R.type==="MemberExpression"&&(u.parenthesizedAssign>=R.start&&(u.parenthesizedAssign=-1),u.parenthesizedBind>=R.start&&(u.parenthesizedBind=-1),u.trailingComma>=R.start&&(u.trailingComma=-1)),R},_e.parseSubscripts=function(u,h,S,E,P){for(var R=this.options.ecmaVersion>=8&&u.type==="Identifier"&&u.name==="async"&&this.lastTokEnd===u.end&&!this.canInsertSemicolon()&&u.end-u.start===5&&this.potentialArrowAt===u.start,F=!1;;){var G=this.parseSubscript(u,h,S,E,R,F,P);if(G.optional&&(F=!0),G===u||G.type==="ArrowFunctionExpression"){if(F){var X=this.startNodeAt(h,S);X.expression=G,G=this.finishNode(X,"ChainExpression")}return G}u=G}},_e.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(y.arrow)},_e.parseSubscriptAsyncArrow=function(u,h,S,E){return this.parseArrowExpression(this.startNodeAt(u,h),S,!0,E)},_e.parseSubscript=function(u,h,S,E,P,R,F){var G=this.options.ecmaVersion>=11,X=G&&this.eat(y.questionDot);E&&X&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var me=this.eat(y.bracketL);if(me||X&&this.type!==y.parenL&&this.type!==y.backQuote||this.eat(y.dot)){var ke=this.startNodeAt(h,S);ke.object=u,me?(ke.property=this.parseExpression(),this.expect(y.bracketR)):this.type===y.privateId&&u.type!=="Super"?ke.property=this.parsePrivateIdent():ke.property=this.parseIdent(this.options.allowReserved!=="never"),ke.computed=!!me,G&&(ke.optional=X),u=this.finishNode(ke,"MemberExpression")}else if(!E&&this.eat(y.parenL)){var We=new _f,$t=this.yieldPos,Bc=this.awaitPos,Wa=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var wf=this.parseExprList(y.parenR,this.options.ecmaVersion>=8,!1,We);if(P&&!X&&this.shouldParseAsyncArrow())return this.checkPatternErrors(We,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=$t,this.awaitPos=Bc,this.awaitIdentPos=Wa,this.parseSubscriptAsyncArrow(h,S,wf,F);this.checkExpressionErrors(We,!0),this.yieldPos=$t||this.yieldPos,this.awaitPos=Bc||this.awaitPos,this.awaitIdentPos=Wa||this.awaitIdentPos;var Ga=this.startNodeAt(h,S);Ga.callee=u,Ga.arguments=wf,G&&(Ga.optional=X),u=this.finishNode(Ga,"CallExpression")}else if(this.type===y.backQuote){(X||R)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Ja=this.startNodeAt(h,S);Ja.tag=u,Ja.quasi=this.parseTemplate({isTagged:!0}),u=this.finishNode(Ja,"TaggedTemplateExpression")}return u},_e.parseExprAtom=function(u,h,S){this.type===y.slash&&this.readRegexp();var E,P=this.potentialArrowAt===this.start;switch(this.type){case y._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),E=this.startNode(),this.next(),this.type===y.parenL&&!this.allowDirectSuper&&this.raise(E.start,"super() call outside constructor of a subclass"),this.type!==y.dot&&this.type!==y.bracketL&&this.type!==y.parenL&&this.unexpected(),this.finishNode(E,"Super");case y._this:return E=this.startNode(),this.next(),this.finishNode(E,"ThisExpression");case y.name:var R=this.start,F=this.startLoc,G=this.containsEsc,X=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!G&&X.name==="async"&&!this.canInsertSemicolon()&&this.eat(y._function))return this.overrideContext(ze.f_expr),this.parseFunction(this.startNodeAt(R,F),0,!1,!0,h);if(P&&!this.canInsertSemicolon()){if(this.eat(y.arrow))return this.parseArrowExpression(this.startNodeAt(R,F),[X],!1,h);if(this.options.ecmaVersion>=8&&X.name==="async"&&this.type===y.name&&!G&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return X=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(y.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(R,F),[X],!0,h)}return X;case y.regexp:var me=this.value;return E=this.parseLiteral(me.value),E.regex={pattern:me.pattern,flags:me.flags},E;case y.num:case y.string:return this.parseLiteral(this.value);case y._null:case y._true:case y._false:return E=this.startNode(),E.value=this.type===y._null?null:this.type===y._true,E.raw=this.type.keyword,this.next(),this.finishNode(E,"Literal");case y.parenL:var ke=this.start,We=this.parseParenAndDistinguishExpression(P,h);return u&&(u.parenthesizedAssign<0&&!this.isSimpleAssignTarget(We)&&(u.parenthesizedAssign=ke),u.parenthesizedBind<0&&(u.parenthesizedBind=ke)),We;case y.bracketL:return E=this.startNode(),this.next(),E.elements=this.parseExprList(y.bracketR,!0,!0,u),this.finishNode(E,"ArrayExpression");case y.braceL:return this.overrideContext(ze.b_expr),this.parseObj(!1,u);case y._function:return E=this.startNode(),this.next(),this.parseFunction(E,0);case y._class:return this.parseClass(this.startNode(),!1);case y._new:return this.parseNew();case y.backQuote:return this.parseTemplate();case y._import:return this.options.ecmaVersion>=11?this.parseExprImport(S):this.unexpected();default:return this.parseExprAtomDefault()}},_e.parseExprAtomDefault=function(){this.unexpected()},_e.parseExprImport=function(u){var h=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===y.parenL&&!u)return this.parseDynamicImport(h);if(this.type===y.dot){var S=this.startNodeAt(h.start,h.loc&&h.loc.start);return S.name="import",h.meta=this.finishNode(S,"Identifier"),this.parseImportMeta(h)}else this.unexpected()},_e.parseDynamicImport=function(u){if(this.next(),u.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(y.parenR)?u.options=null:(this.expect(y.comma),this.afterTrailingComma(y.parenR)?u.options=null:(u.options=this.parseMaybeAssign(),this.eat(y.parenR)||(this.expect(y.comma),this.afterTrailingComma(y.parenR)||this.unexpected())));else if(!this.eat(y.parenR)){var h=this.start;this.eat(y.comma)&&this.eat(y.parenR)?this.raiseRecoverable(h,"Trailing comma is not allowed in import()"):this.unexpected(h)}return this.finishNode(u,"ImportExpression")},_e.parseImportMeta=function(u){this.next();var h=this.containsEsc;return u.property=this.parseIdent(!0),u.property.name!=="meta"&&this.raiseRecoverable(u.property.start,"The only valid meta property for import is 'import.meta'"),h&&this.raiseRecoverable(u.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(u.start,"Cannot use 'import.meta' outside a module"),this.finishNode(u,"MetaProperty")},_e.parseLiteral=function(u){var h=this.startNode();return h.value=u,h.raw=this.input.slice(this.start,this.end),h.raw.charCodeAt(h.raw.length-1)===110&&(h.bigint=h.value!=null?h.value.toString():h.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(h,"Literal")},_e.parseParenExpression=function(){this.expect(y.parenL);var u=this.parseExpression();return this.expect(y.parenR),u},_e.shouldParseArrow=function(u){return!this.canInsertSemicolon()},_e.parseParenAndDistinguishExpression=function(u,h){var S=this.start,E=this.startLoc,P,R=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var F=this.start,G=this.startLoc,X=[],me=!0,ke=!1,We=new _f,$t=this.yieldPos,Bc=this.awaitPos,Wa;for(this.yieldPos=0,this.awaitPos=0;this.type!==y.parenR;)if(me?me=!1:this.expect(y.comma),R&&this.afterTrailingComma(y.parenR,!0)){ke=!0;break}else if(this.type===y.ellipsis){Wa=this.start,X.push(this.parseParenItem(this.parseRestBinding())),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else X.push(this.parseMaybeAssign(!1,We,this.parseParenItem));var wf=this.lastTokEnd,Ga=this.lastTokEndLoc;if(this.expect(y.parenR),u&&this.shouldParseArrow(X)&&this.eat(y.arrow))return this.checkPatternErrors(We,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=$t,this.awaitPos=Bc,this.parseParenArrowList(S,E,X,h);(!X.length||ke)&&this.unexpected(this.lastTokStart),Wa&&this.unexpected(Wa),this.checkExpressionErrors(We,!0),this.yieldPos=$t||this.yieldPos,this.awaitPos=Bc||this.awaitPos,X.length>1?(P=this.startNodeAt(F,G),P.expressions=X,this.finishNodeAt(P,"SequenceExpression",wf,Ga)):P=X[0]}else P=this.parseParenExpression();if(this.options.preserveParens){var Ja=this.startNodeAt(S,E);return Ja.expression=P,this.finishNode(Ja,"ParenthesizedExpression")}else return P},_e.parseParenItem=function(u){return u},_e.parseParenArrowList=function(u,h,S,E){return this.parseArrowExpression(this.startNodeAt(u,h),S,!1,E)};var F$=[];_e.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var u=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===y.dot){var h=this.startNodeAt(u.start,u.loc&&u.loc.start);h.name="new",u.meta=this.finishNode(h,"Identifier"),this.next();var S=this.containsEsc;return u.property=this.parseIdent(!0),u.property.name!=="target"&&this.raiseRecoverable(u.property.start,"The only valid meta property for new is 'new.target'"),S&&this.raiseRecoverable(u.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(u.start,"'new.target' can only be used in functions and class static block"),this.finishNode(u,"MetaProperty")}var E=this.start,P=this.startLoc;return u.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),E,P,!0,!1),u.callee.type==="Super"&&this.raiseRecoverable(E,"Invalid use of 'super'"),this.eat(y.parenL)?u.arguments=this.parseExprList(y.parenR,this.options.ecmaVersion>=8,!1):u.arguments=F$,this.finishNode(u,"NewExpression")},_e.parseTemplateElement=function(u){var h=u.isTagged,S=this.startNode();return this.type===y.invalidTemplate?(h||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),S.value={raw:this.value.replace(/\r\n?/g,`
|
|
94
|
+
`),cooked:null}):S.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
95
|
+
`),cooked:this.value},this.next(),S.tail=this.type===y.backQuote,this.finishNode(S,"TemplateElement")},_e.parseTemplate=function(u){u===void 0&&(u={});var h=u.isTagged;h===void 0&&(h=!1);var S=this.startNode();this.next(),S.expressions=[];var E=this.parseTemplateElement({isTagged:h});for(S.quasis=[E];!E.tail;)this.type===y.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(y.dollarBraceL),S.expressions.push(this.parseExpression()),this.expect(y.braceR),S.quasis.push(E=this.parseTemplateElement({isTagged:h}));return this.next(),this.finishNode(S,"TemplateLiteral")},_e.isAsyncProp=function(u){return!u.computed&&u.key.type==="Identifier"&&u.key.name==="async"&&(this.type===y.name||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===y.star)&&!A.test(this.input.slice(this.lastTokEnd,this.start))},_e.parseObj=function(u,h){var S=this.startNode(),E=!0,P={};for(S.properties=[],this.next();!this.eat(y.braceR);){if(E)E=!1;else if(this.expect(y.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(y.braceR))break;var R=this.parseProperty(u,h);u||this.checkPropClash(R,P,h),S.properties.push(R)}return this.finishNode(S,u?"ObjectPattern":"ObjectExpression")},_e.parseProperty=function(u,h){var S=this.startNode(),E,P,R,F;if(this.options.ecmaVersion>=9&&this.eat(y.ellipsis))return u?(S.argument=this.parseIdent(!1),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(S,"RestElement")):(S.argument=this.parseMaybeAssign(!1,h),this.type===y.comma&&h&&h.trailingComma<0&&(h.trailingComma=this.start),this.finishNode(S,"SpreadElement"));this.options.ecmaVersion>=6&&(S.method=!1,S.shorthand=!1,(u||h)&&(R=this.start,F=this.startLoc),u||(E=this.eat(y.star)));var G=this.containsEsc;return this.parsePropertyName(S),!u&&!G&&this.options.ecmaVersion>=8&&!E&&this.isAsyncProp(S)?(P=!0,E=this.options.ecmaVersion>=9&&this.eat(y.star),this.parsePropertyName(S)):P=!1,this.parsePropertyValue(S,u,E,P,R,F,h,G),this.finishNode(S,"Property")},_e.parseGetterSetter=function(u){var h=u.key.name;this.parsePropertyName(u),u.value=this.parseMethod(!1),u.kind=h;var S=u.kind==="get"?0:1;if(u.value.params.length!==S){var E=u.value.start;u.kind==="get"?this.raiseRecoverable(E,"getter should have no params"):this.raiseRecoverable(E,"setter should have exactly one param")}else u.kind==="set"&&u.value.params[0].type==="RestElement"&&this.raiseRecoverable(u.value.params[0].start,"Setter cannot use rest params")},_e.parsePropertyValue=function(u,h,S,E,P,R,F,G){(S||E)&&this.type===y.colon&&this.unexpected(),this.eat(y.colon)?(u.value=h?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,F),u.kind="init"):this.options.ecmaVersion>=6&&this.type===y.parenL?(h&&this.unexpected(),u.method=!0,u.value=this.parseMethod(S,E),u.kind="init"):!h&&!G&&this.options.ecmaVersion>=5&&!u.computed&&u.key.type==="Identifier"&&(u.key.name==="get"||u.key.name==="set")&&this.type!==y.comma&&this.type!==y.braceR&&this.type!==y.eq?((S||E)&&this.unexpected(),this.parseGetterSetter(u)):this.options.ecmaVersion>=6&&!u.computed&&u.key.type==="Identifier"?((S||E)&&this.unexpected(),this.checkUnreserved(u.key),u.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=P),h?u.value=this.parseMaybeDefault(P,R,this.copyNode(u.key)):this.type===y.eq&&F?(F.shorthandAssign<0&&(F.shorthandAssign=this.start),u.value=this.parseMaybeDefault(P,R,this.copyNode(u.key))):u.value=this.copyNode(u.key),u.kind="init",u.shorthand=!0):this.unexpected()},_e.parsePropertyName=function(u){if(this.options.ecmaVersion>=6){if(this.eat(y.bracketL))return u.computed=!0,u.key=this.parseMaybeAssign(),this.expect(y.bracketR),u.key;u.computed=!1}return u.key=this.type===y.num||this.type===y.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},_e.initFunction=function(u){u.id=null,this.options.ecmaVersion>=6&&(u.generator=u.expression=!1),this.options.ecmaVersion>=8&&(u.async=!1)},_e.parseMethod=function(u,h,S){var E=this.startNode(),P=this.yieldPos,R=this.awaitPos,F=this.awaitIdentPos;return this.initFunction(E),this.options.ecmaVersion>=6&&(E.generator=u),this.options.ecmaVersion>=8&&(E.async=!!h),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ry(h,E.generator)|bs|(S?Dw:0)),this.expect(y.parenL),E.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(E,!1,!0,!1),this.yieldPos=P,this.awaitPos=R,this.awaitIdentPos=F,this.finishNode(E,"FunctionExpression")},_e.parseArrowExpression=function(u,h,S,E){var P=this.yieldPos,R=this.awaitPos,F=this.awaitIdentPos;return this.enterScope(Ry(S,!1)|pn),this.initFunction(u),this.options.ecmaVersion>=8&&(u.async=!!S),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,u.params=this.toAssignableList(h,!0),this.parseFunctionBody(u,!0,!1,E),this.yieldPos=P,this.awaitPos=R,this.awaitIdentPos=F,this.finishNode(u,"ArrowFunctionExpression")},_e.parseFunctionBody=function(u,h,S,E){var P=h&&this.type!==y.braceL,R=this.strict,F=!1;if(P)u.body=this.parseMaybeAssign(E),u.expression=!0,this.checkParams(u,!1);else{var G=this.options.ecmaVersion>=7&&!this.isSimpleParamList(u.params);(!R||G)&&(F=this.strictDirective(this.end),F&&G&&this.raiseRecoverable(u.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var X=this.labels;this.labels=[],F&&(this.strict=!0),this.checkParams(u,!R&&!F&&!h&&!S&&this.isSimpleParamList(u.params)),this.strict&&u.id&&this.checkLValSimple(u.id,Vw),u.body=this.parseBlock(!1,void 0,F&&!R),u.expression=!1,this.adaptDirectivePrologue(u.body.body),this.labels=X}this.exitScope()},_e.isSimpleParamList=function(u){for(var h=0,S=u;h<S.length;h+=1){var E=S[h];if(E.type!=="Identifier")return!1}return!0},_e.checkParams=function(u,h){for(var S=Object.create(null),E=0,P=u.params;E<P.length;E+=1){var R=P[E];this.checkLValInnerPattern(R,Dy,h?null:S)}},_e.parseExprList=function(u,h,S,E){for(var P=[],R=!0;!this.eat(u);){if(R)R=!1;else if(this.expect(y.comma),h&&this.afterTrailingComma(u))break;var F=void 0;S&&this.type===y.comma?F=null:this.type===y.ellipsis?(F=this.parseSpread(E),E&&this.type===y.comma&&E.trailingComma<0&&(E.trailingComma=this.start)):F=this.parseMaybeAssign(!1,E),P.push(F)}return P},_e.checkUnreserved=function(u){var h=u.start,S=u.end,E=u.name;if(this.inGenerator&&E==="yield"&&this.raiseRecoverable(h,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&E==="await"&&this.raiseRecoverable(h,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&gf)&&E==="arguments"&&this.raiseRecoverable(h,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(E==="arguments"||E==="await")&&this.raise(h,"Cannot use "+E+" in class static initialization block"),this.keywords.test(E)&&this.raise(h,"Unexpected keyword '"+E+"'"),!(this.options.ecmaVersion<6&&this.input.slice(h,S).indexOf("\\")!==-1)){var P=this.strict?this.reservedWordsStrict:this.reservedWords;P.test(E)&&(!this.inAsync&&E==="await"&&this.raiseRecoverable(h,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(h,"The keyword '"+E+"' is reserved"))}},_e.parseIdent=function(u){var h=this.parseIdentNode();return this.next(!!u),this.finishNode(h,"Identifier"),u||(this.checkUnreserved(h),h.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=h.start)),h},_e.parseIdentNode=function(){var u=this.startNode();return this.type===y.name?u.name=this.value:this.type.keyword?(u.name=this.type.keyword,(u.name==="class"||u.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=y.name):this.unexpected(),u},_e.parsePrivateIdent=function(){var u=this.startNode();return this.type===y.privateId?u.name=this.value:this.unexpected(),this.next(),this.finishNode(u,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(u.start,"Private field '#"+u.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(u)),u},_e.parseYield=function(u){this.yieldPos||(this.yieldPos=this.start);var h=this.startNode();return this.next(),this.type===y.semi||this.canInsertSemicolon()||this.type!==y.star&&!this.type.startsExpr?(h.delegate=!1,h.argument=null):(h.delegate=this.eat(y.star),h.argument=this.parseMaybeAssign(u)),this.finishNode(h,"YieldExpression")},_e.parseAwait=function(u){this.awaitPos||(this.awaitPos=this.start);var h=this.startNode();return this.next(),h.argument=this.parseMaybeUnary(null,!0,!1,u),this.finishNode(h,"AwaitExpression")};var bf=st.prototype;bf.raise=function(u,h){var S=z(this.input,u);h+=" ("+S.line+":"+S.column+")",this.sourceFile&&(h+=" in "+this.sourceFile);var E=new SyntaxError(h);throw E.pos=u,E.loc=S,E.raisedAt=this.pos,E},bf.raiseRecoverable=bf.raise,bf.curPosition=function(){if(this.options.locations)return new Y(this.curLine,this.pos-this.lineStart)};var bi=st.prototype,V$=function(h){this.flags=h,this.var=[],this.lexical=[],this.functions=[]};bi.enterScope=function(u){this.scopeStack.push(new V$(u))},bi.exitScope=function(){this.scopeStack.pop()},bi.treatFunctionsAsVarInScope=function(u){return u.flags&Ft||!this.inModule&&u.flags>},bi.declareName=function(u,h,S){var E=!1;if(h===zr){var P=this.currentScope();E=P.lexical.indexOf(u)>-1||P.functions.indexOf(u)>-1||P.var.indexOf(u)>-1,P.lexical.push(u),this.inModule&&P.flags>&&delete this.undefinedExports[u]}else if(h===Fw){var R=this.currentScope();R.lexical.push(u)}else if(h===Bw){var F=this.currentScope();this.treatFunctionsAsVar?E=F.lexical.indexOf(u)>-1:E=F.lexical.indexOf(u)>-1||F.var.indexOf(u)>-1,F.functions.push(u)}else for(var G=this.scopeStack.length-1;G>=0;--G){var X=this.scopeStack[G];if(X.lexical.indexOf(u)>-1&&!(X.flags&Hr&&X.lexical[0]===u)||!this.treatFunctionsAsVarInScope(X)&&X.functions.indexOf(u)>-1){E=!0;break}if(X.var.push(u),this.inModule&&X.flags>&&delete this.undefinedExports[u],X.flags&gf)break}E&&this.raiseRecoverable(S,"Identifier '"+u+"' has already been declared")},bi.checkLocalExport=function(u){this.scopeStack[0].lexical.indexOf(u.name)===-1&&this.scopeStack[0].var.indexOf(u.name)===-1&&(this.undefinedExports[u.name]=u)},bi.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},bi.currentVarScope=function(){for(var u=this.scopeStack.length-1;;u--){var h=this.scopeStack[u];if(h.flags&(gf|Mc|ks))return h}},bi.currentThisScope=function(){for(var u=this.scopeStack.length-1;;u--){var h=this.scopeStack[u];if(h.flags&(gf|Mc|ks)&&!(h.flags&pn))return h}};var Dc=function(h,S,E){this.type="",this.start=S,this.end=0,h.options.locations&&(this.loc=new he(h,E)),h.options.directSourceFile&&(this.sourceFile=h.options.directSourceFile),h.options.ranges&&(this.range=[S,0])},jc=st.prototype;jc.startNode=function(){return new Dc(this,this.start,this.startLoc)},jc.startNodeAt=function(u,h){return new Dc(this,u,h)};function Hw(u,h,S,E){return u.type=h,u.end=S,this.options.locations&&(u.loc.end=E),this.options.ranges&&(u.range[1]=S),u}jc.finishNode=function(u,h){return Hw.call(this,u,h,this.lastTokEnd,this.lastTokEndLoc)},jc.finishNodeAt=function(u,h,S,E){return Hw.call(this,u,h,S,E)},jc.copyNode=function(u){var h=new Dc(this,u.start,this.startLoc);for(var S in u)h[S]=u[S];return h};var $$="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",zw="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",Ww=zw+" Extended_Pictographic",Gw=Ww,Jw=Gw+" EBase EComp EMod EPres ExtPict",Kw=Jw,U$=Kw,H$={9:zw,10:Ww,11:Gw,12:Jw,13:Kw,14:U$},z$="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",W$={9:"",10:"",11:"",12:"",13:"",14:z$},Yw="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",Qw="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",Xw=Qw+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Zw=Xw+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",ex=Zw+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",tx=ex+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",G$=tx+" "+$$,J$={9:Qw,10:Xw,11:Zw,12:ex,13:tx,14:G$},nx={};function K$(u){var h=nx[u]={binary:U(H$[u]+" "+Yw),binaryOfStrings:U(W$[u]),nonBinary:{General_Category:U(Yw),Script:U(J$[u])}};h.nonBinary.Script_Extensions=h.nonBinary.Script,h.nonBinary.gc=h.nonBinary.General_Category,h.nonBinary.sc=h.nonBinary.Script,h.nonBinary.scx=h.nonBinary.Script_Extensions}for(var Vy=0,rx=[9,10,11,12,13,14];Vy<rx.length;Vy+=1){var Y$=rx[Vy];K$(Y$)}var re=st.prototype,kf=function(h,S){this.parent=h,this.base=S||this};kf.prototype.separatedFrom=function(h){for(var S=this;S;S=S.parent)for(var E=h;E;E=E.parent)if(S.base===E.base&&S!==E)return!0;return!1},kf.prototype.sibling=function(){return new kf(this.parent,this.base)};var _r=function(h){this.parser=h,this.validFlags="gim"+(h.options.ecmaVersion>=6?"uy":"")+(h.options.ecmaVersion>=9?"s":"")+(h.options.ecmaVersion>=13?"d":"")+(h.options.ecmaVersion>=15?"v":""),this.unicodeProperties=nx[h.options.ecmaVersion>=14?14:h.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};_r.prototype.reset=function(h,S,E){var P=E.indexOf("v")!==-1,R=E.indexOf("u")!==-1;this.start=h|0,this.source=S+"",this.flags=E,P&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=R&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=R&&this.parser.options.ecmaVersion>=9)},_r.prototype.raise=function(h){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+h)},_r.prototype.at=function(h,S){S===void 0&&(S=!1);var E=this.source,P=E.length;if(h>=P)return-1;var R=E.charCodeAt(h);if(!(S||this.switchU)||R<=55295||R>=57344||h+1>=P)return R;var F=E.charCodeAt(h+1);return F>=56320&&F<=57343?(R<<10)+F-56613888:R},_r.prototype.nextIndex=function(h,S){S===void 0&&(S=!1);var E=this.source,P=E.length;if(h>=P)return P;var R=E.charCodeAt(h),F;return!(S||this.switchU)||R<=55295||R>=57344||h+1>=P||(F=E.charCodeAt(h+1))<56320||F>57343?h+1:h+2},_r.prototype.current=function(h){return h===void 0&&(h=!1),this.at(this.pos,h)},_r.prototype.lookahead=function(h){return h===void 0&&(h=!1),this.at(this.nextIndex(this.pos,h),h)},_r.prototype.advance=function(h){h===void 0&&(h=!1),this.pos=this.nextIndex(this.pos,h)},_r.prototype.eat=function(h,S){return S===void 0&&(S=!1),this.current(S)===h?(this.advance(S),!0):!1},_r.prototype.eatChars=function(h,S){S===void 0&&(S=!1);for(var E=this.pos,P=0,R=h;P<R.length;P+=1){var F=R[P],G=this.at(E,S);if(G===-1||G!==F)return!1;E=this.nextIndex(E,S)}return this.pos=E,!0},re.validateRegExpFlags=function(u){for(var h=u.validFlags,S=u.flags,E=!1,P=!1,R=0;R<S.length;R++){var F=S.charAt(R);h.indexOf(F)===-1&&this.raise(u.start,"Invalid regular expression flag"),S.indexOf(F,R+1)>-1&&this.raise(u.start,"Duplicate regular expression flag"),F==="u"&&(E=!0),F==="v"&&(P=!0)}this.options.ecmaVersion>=15&&E&&P&&this.raise(u.start,"Invalid regular expression flag")};function Q$(u){for(var h in u)return!0;return!1}re.validateRegExpPattern=function(u){this.regexp_pattern(u),!u.switchN&&this.options.ecmaVersion>=9&&Q$(u.groupNames)&&(u.switchN=!0,this.regexp_pattern(u))},re.regexp_pattern=function(u){u.pos=0,u.lastIntValue=0,u.lastStringValue="",u.lastAssertionIsQuantifiable=!1,u.numCapturingParens=0,u.maxBackReference=0,u.groupNames=Object.create(null),u.backReferenceNames.length=0,u.branchID=null,this.regexp_disjunction(u),u.pos!==u.source.length&&(u.eat(41)&&u.raise("Unmatched ')'"),(u.eat(93)||u.eat(125))&&u.raise("Lone quantifier brackets")),u.maxBackReference>u.numCapturingParens&&u.raise("Invalid escape");for(var h=0,S=u.backReferenceNames;h<S.length;h+=1){var E=S[h];u.groupNames[E]||u.raise("Invalid named capture referenced")}},re.regexp_disjunction=function(u){var h=this.options.ecmaVersion>=16;for(h&&(u.branchID=new kf(u.branchID,null)),this.regexp_alternative(u);u.eat(124);)h&&(u.branchID=u.branchID.sibling()),this.regexp_alternative(u);h&&(u.branchID=u.branchID.parent),this.regexp_eatQuantifier(u,!0)&&u.raise("Nothing to repeat"),u.eat(123)&&u.raise("Lone quantifier brackets")},re.regexp_alternative=function(u){for(;u.pos<u.source.length&&this.regexp_eatTerm(u););},re.regexp_eatTerm=function(u){return this.regexp_eatAssertion(u)?(u.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(u)&&u.switchU&&u.raise("Invalid quantifier"),!0):(u.switchU?this.regexp_eatAtom(u):this.regexp_eatExtendedAtom(u))?(this.regexp_eatQuantifier(u),!0):!1},re.regexp_eatAssertion=function(u){var h=u.pos;if(u.lastAssertionIsQuantifiable=!1,u.eat(94)||u.eat(36))return!0;if(u.eat(92)){if(u.eat(66)||u.eat(98))return!0;u.pos=h}if(u.eat(40)&&u.eat(63)){var S=!1;if(this.options.ecmaVersion>=9&&(S=u.eat(60)),u.eat(61)||u.eat(33))return this.regexp_disjunction(u),u.eat(41)||u.raise("Unterminated group"),u.lastAssertionIsQuantifiable=!S,!0}return u.pos=h,!1},re.regexp_eatQuantifier=function(u,h){return h===void 0&&(h=!1),this.regexp_eatQuantifierPrefix(u,h)?(u.eat(63),!0):!1},re.regexp_eatQuantifierPrefix=function(u,h){return u.eat(42)||u.eat(43)||u.eat(63)||this.regexp_eatBracedQuantifier(u,h)},re.regexp_eatBracedQuantifier=function(u,h){var S=u.pos;if(u.eat(123)){var E=0,P=-1;if(this.regexp_eatDecimalDigits(u)&&(E=u.lastIntValue,u.eat(44)&&this.regexp_eatDecimalDigits(u)&&(P=u.lastIntValue),u.eat(125)))return P!==-1&&P<E&&!h&&u.raise("numbers out of order in {} quantifier"),!0;u.switchU&&!h&&u.raise("Incomplete quantifier"),u.pos=S}return!1},re.regexp_eatAtom=function(u){return this.regexp_eatPatternCharacters(u)||u.eat(46)||this.regexp_eatReverseSolidusAtomEscape(u)||this.regexp_eatCharacterClass(u)||this.regexp_eatUncapturingGroup(u)||this.regexp_eatCapturingGroup(u)},re.regexp_eatReverseSolidusAtomEscape=function(u){var h=u.pos;if(u.eat(92)){if(this.regexp_eatAtomEscape(u))return!0;u.pos=h}return!1},re.regexp_eatUncapturingGroup=function(u){var h=u.pos;if(u.eat(40)){if(u.eat(63)){if(this.options.ecmaVersion>=16){var S=this.regexp_eatModifiers(u),E=u.eat(45);if(S||E){for(var P=0;P<S.length;P++){var R=S.charAt(P);S.indexOf(R,P+1)>-1&&u.raise("Duplicate regular expression modifiers")}if(E){var F=this.regexp_eatModifiers(u);!S&&!F&&u.current()===58&&u.raise("Invalid regular expression modifiers");for(var G=0;G<F.length;G++){var X=F.charAt(G);(F.indexOf(X,G+1)>-1||S.indexOf(X)>-1)&&u.raise("Duplicate regular expression modifiers")}}}}if(u.eat(58)){if(this.regexp_disjunction(u),u.eat(41))return!0;u.raise("Unterminated group")}}u.pos=h}return!1},re.regexp_eatCapturingGroup=function(u){if(u.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(u):u.current()===63&&u.raise("Invalid group"),this.regexp_disjunction(u),u.eat(41))return u.numCapturingParens+=1,!0;u.raise("Unterminated group")}return!1},re.regexp_eatModifiers=function(u){for(var h="",S=0;(S=u.current())!==-1&&X$(S);)h+=J(S),u.advance();return h};function X$(u){return u===105||u===109||u===115}re.regexp_eatExtendedAtom=function(u){return u.eat(46)||this.regexp_eatReverseSolidusAtomEscape(u)||this.regexp_eatCharacterClass(u)||this.regexp_eatUncapturingGroup(u)||this.regexp_eatCapturingGroup(u)||this.regexp_eatInvalidBracedQuantifier(u)||this.regexp_eatExtendedPatternCharacter(u)},re.regexp_eatInvalidBracedQuantifier=function(u){return this.regexp_eatBracedQuantifier(u,!0)&&u.raise("Nothing to repeat"),!1},re.regexp_eatSyntaxCharacter=function(u){var h=u.current();return ix(h)?(u.lastIntValue=h,u.advance(),!0):!1};function ix(u){return u===36||u>=40&&u<=43||u===46||u===63||u>=91&&u<=94||u>=123&&u<=125}re.regexp_eatPatternCharacters=function(u){for(var h=u.pos,S=0;(S=u.current())!==-1&&!ix(S);)u.advance();return u.pos!==h},re.regexp_eatExtendedPatternCharacter=function(u){var h=u.current();return h!==-1&&h!==36&&!(h>=40&&h<=43)&&h!==46&&h!==63&&h!==91&&h!==94&&h!==124?(u.advance(),!0):!1},re.regexp_groupSpecifier=function(u){if(u.eat(63)){this.regexp_eatGroupName(u)||u.raise("Invalid group");var h=this.options.ecmaVersion>=16,S=u.groupNames[u.lastStringValue];if(S)if(h)for(var E=0,P=S;E<P.length;E+=1){var R=P[E];R.separatedFrom(u.branchID)||u.raise("Duplicate capture group name")}else u.raise("Duplicate capture group name");h?(S||(u.groupNames[u.lastStringValue]=[])).push(u.branchID):u.groupNames[u.lastStringValue]=!0}},re.regexp_eatGroupName=function(u){if(u.lastStringValue="",u.eat(60)){if(this.regexp_eatRegExpIdentifierName(u)&&u.eat(62))return!0;u.raise("Invalid capture group name")}return!1},re.regexp_eatRegExpIdentifierName=function(u){if(u.lastStringValue="",this.regexp_eatRegExpIdentifierStart(u)){for(u.lastStringValue+=J(u.lastIntValue);this.regexp_eatRegExpIdentifierPart(u);)u.lastStringValue+=J(u.lastIntValue);return!0}return!1},re.regexp_eatRegExpIdentifierStart=function(u){var h=u.pos,S=this.options.ecmaVersion>=11,E=u.current(S);return u.advance(S),E===92&&this.regexp_eatRegExpUnicodeEscapeSequence(u,S)&&(E=u.lastIntValue),Z$(E)?(u.lastIntValue=E,!0):(u.pos=h,!1)};function Z$(u){return p(u,!0)||u===36||u===95}re.regexp_eatRegExpIdentifierPart=function(u){var h=u.pos,S=this.options.ecmaVersion>=11,E=u.current(S);return u.advance(S),E===92&&this.regexp_eatRegExpUnicodeEscapeSequence(u,S)&&(E=u.lastIntValue),e3(E)?(u.lastIntValue=E,!0):(u.pos=h,!1)};function e3(u){return g(u,!0)||u===36||u===95||u===8204||u===8205}re.regexp_eatAtomEscape=function(u){return this.regexp_eatBackReference(u)||this.regexp_eatCharacterClassEscape(u)||this.regexp_eatCharacterEscape(u)||u.switchN&&this.regexp_eatKGroupName(u)?!0:(u.switchU&&(u.current()===99&&u.raise("Invalid unicode escape"),u.raise("Invalid escape")),!1)},re.regexp_eatBackReference=function(u){var h=u.pos;if(this.regexp_eatDecimalEscape(u)){var S=u.lastIntValue;if(u.switchU)return S>u.maxBackReference&&(u.maxBackReference=S),!0;if(S<=u.numCapturingParens)return!0;u.pos=h}return!1},re.regexp_eatKGroupName=function(u){if(u.eat(107)){if(this.regexp_eatGroupName(u))return u.backReferenceNames.push(u.lastStringValue),!0;u.raise("Invalid named reference")}return!1},re.regexp_eatCharacterEscape=function(u){return this.regexp_eatControlEscape(u)||this.regexp_eatCControlLetter(u)||this.regexp_eatZero(u)||this.regexp_eatHexEscapeSequence(u)||this.regexp_eatRegExpUnicodeEscapeSequence(u,!1)||!u.switchU&&this.regexp_eatLegacyOctalEscapeSequence(u)||this.regexp_eatIdentityEscape(u)},re.regexp_eatCControlLetter=function(u){var h=u.pos;if(u.eat(99)){if(this.regexp_eatControlLetter(u))return!0;u.pos=h}return!1},re.regexp_eatZero=function(u){return u.current()===48&&!Sf(u.lookahead())?(u.lastIntValue=0,u.advance(),!0):!1},re.regexp_eatControlEscape=function(u){var h=u.current();return h===116?(u.lastIntValue=9,u.advance(),!0):h===110?(u.lastIntValue=10,u.advance(),!0):h===118?(u.lastIntValue=11,u.advance(),!0):h===102?(u.lastIntValue=12,u.advance(),!0):h===114?(u.lastIntValue=13,u.advance(),!0):!1},re.regexp_eatControlLetter=function(u){var h=u.current();return sx(h)?(u.lastIntValue=h%32,u.advance(),!0):!1};function sx(u){return u>=65&&u<=90||u>=97&&u<=122}re.regexp_eatRegExpUnicodeEscapeSequence=function(u,h){h===void 0&&(h=!1);var S=u.pos,E=h||u.switchU;if(u.eat(117)){if(this.regexp_eatFixedHexDigits(u,4)){var P=u.lastIntValue;if(E&&P>=55296&&P<=56319){var R=u.pos;if(u.eat(92)&&u.eat(117)&&this.regexp_eatFixedHexDigits(u,4)){var F=u.lastIntValue;if(F>=56320&&F<=57343)return u.lastIntValue=(P-55296)*1024+(F-56320)+65536,!0}u.pos=R,u.lastIntValue=P}return!0}if(E&&u.eat(123)&&this.regexp_eatHexDigits(u)&&u.eat(125)&&t3(u.lastIntValue))return!0;E&&u.raise("Invalid unicode escape"),u.pos=S}return!1};function t3(u){return u>=0&&u<=1114111}re.regexp_eatIdentityEscape=function(u){if(u.switchU)return this.regexp_eatSyntaxCharacter(u)?!0:u.eat(47)?(u.lastIntValue=47,!0):!1;var h=u.current();return h!==99&&(!u.switchN||h!==107)?(u.lastIntValue=h,u.advance(),!0):!1},re.regexp_eatDecimalEscape=function(u){u.lastIntValue=0;var h=u.current();if(h>=49&&h<=57){do u.lastIntValue=10*u.lastIntValue+(h-48),u.advance();while((h=u.current())>=48&&h<=57);return!0}return!1};var ax=0,Wr=1,qn=2;re.regexp_eatCharacterClassEscape=function(u){var h=u.current();if(n3(h))return u.lastIntValue=-1,u.advance(),Wr;var S=!1;if(u.switchU&&this.options.ecmaVersion>=9&&((S=h===80)||h===112)){u.lastIntValue=-1,u.advance();var E;if(u.eat(123)&&(E=this.regexp_eatUnicodePropertyValueExpression(u))&&u.eat(125))return S&&E===qn&&u.raise("Invalid property name"),E;u.raise("Invalid property name")}return ax};function n3(u){return u===100||u===68||u===115||u===83||u===119||u===87}re.regexp_eatUnicodePropertyValueExpression=function(u){var h=u.pos;if(this.regexp_eatUnicodePropertyName(u)&&u.eat(61)){var S=u.lastStringValue;if(this.regexp_eatUnicodePropertyValue(u)){var E=u.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(u,S,E),Wr}}if(u.pos=h,this.regexp_eatLoneUnicodePropertyNameOrValue(u)){var P=u.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(u,P)}return ax},re.regexp_validateUnicodePropertyNameAndValue=function(u,h,S){$(u.unicodeProperties.nonBinary,h)||u.raise("Invalid property name"),u.unicodeProperties.nonBinary[h].test(S)||u.raise("Invalid property value")},re.regexp_validateUnicodePropertyNameOrValue=function(u,h){if(u.unicodeProperties.binary.test(h))return Wr;if(u.switchV&&u.unicodeProperties.binaryOfStrings.test(h))return qn;u.raise("Invalid property name")},re.regexp_eatUnicodePropertyName=function(u){var h=0;for(u.lastStringValue="";ox(h=u.current());)u.lastStringValue+=J(h),u.advance();return u.lastStringValue!==""};function ox(u){return sx(u)||u===95}re.regexp_eatUnicodePropertyValue=function(u){var h=0;for(u.lastStringValue="";r3(h=u.current());)u.lastStringValue+=J(h),u.advance();return u.lastStringValue!==""};function r3(u){return ox(u)||Sf(u)}re.regexp_eatLoneUnicodePropertyNameOrValue=function(u){return this.regexp_eatUnicodePropertyValue(u)},re.regexp_eatCharacterClass=function(u){if(u.eat(91)){var h=u.eat(94),S=this.regexp_classContents(u);return u.eat(93)||u.raise("Unterminated character class"),h&&S===qn&&u.raise("Negated character class may contain strings"),!0}return!1},re.regexp_classContents=function(u){return u.current()===93?Wr:u.switchV?this.regexp_classSetExpression(u):(this.regexp_nonEmptyClassRanges(u),Wr)},re.regexp_nonEmptyClassRanges=function(u){for(;this.regexp_eatClassAtom(u);){var h=u.lastIntValue;if(u.eat(45)&&this.regexp_eatClassAtom(u)){var S=u.lastIntValue;u.switchU&&(h===-1||S===-1)&&u.raise("Invalid character class"),h!==-1&&S!==-1&&h>S&&u.raise("Range out of order in character class")}}},re.regexp_eatClassAtom=function(u){var h=u.pos;if(u.eat(92)){if(this.regexp_eatClassEscape(u))return!0;if(u.switchU){var S=u.current();(S===99||lx(S))&&u.raise("Invalid class escape"),u.raise("Invalid escape")}u.pos=h}var E=u.current();return E!==93?(u.lastIntValue=E,u.advance(),!0):!1},re.regexp_eatClassEscape=function(u){var h=u.pos;if(u.eat(98))return u.lastIntValue=8,!0;if(u.switchU&&u.eat(45))return u.lastIntValue=45,!0;if(!u.switchU&&u.eat(99)){if(this.regexp_eatClassControlLetter(u))return!0;u.pos=h}return this.regexp_eatCharacterClassEscape(u)||this.regexp_eatCharacterEscape(u)},re.regexp_classSetExpression=function(u){var h=Wr,S;if(!this.regexp_eatClassSetRange(u))if(S=this.regexp_eatClassSetOperand(u)){S===qn&&(h=qn);for(var E=u.pos;u.eatChars([38,38]);){if(u.current()!==38&&(S=this.regexp_eatClassSetOperand(u))){S!==qn&&(h=Wr);continue}u.raise("Invalid character in character class")}if(E!==u.pos)return h;for(;u.eatChars([45,45]);)this.regexp_eatClassSetOperand(u)||u.raise("Invalid character in character class");if(E!==u.pos)return h}else u.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(u)){if(S=this.regexp_eatClassSetOperand(u),!S)return h;S===qn&&(h=qn)}},re.regexp_eatClassSetRange=function(u){var h=u.pos;if(this.regexp_eatClassSetCharacter(u)){var S=u.lastIntValue;if(u.eat(45)&&this.regexp_eatClassSetCharacter(u)){var E=u.lastIntValue;return S!==-1&&E!==-1&&S>E&&u.raise("Range out of order in character class"),!0}u.pos=h}return!1},re.regexp_eatClassSetOperand=function(u){return this.regexp_eatClassSetCharacter(u)?Wr:this.regexp_eatClassStringDisjunction(u)||this.regexp_eatNestedClass(u)},re.regexp_eatNestedClass=function(u){var h=u.pos;if(u.eat(91)){var S=u.eat(94),E=this.regexp_classContents(u);if(u.eat(93))return S&&E===qn&&u.raise("Negated character class may contain strings"),E;u.pos=h}if(u.eat(92)){var P=this.regexp_eatCharacterClassEscape(u);if(P)return P;u.pos=h}return null},re.regexp_eatClassStringDisjunction=function(u){var h=u.pos;if(u.eatChars([92,113])){if(u.eat(123)){var S=this.regexp_classStringDisjunctionContents(u);if(u.eat(125))return S}else u.raise("Invalid escape");u.pos=h}return null},re.regexp_classStringDisjunctionContents=function(u){for(var h=this.regexp_classString(u);u.eat(124);)this.regexp_classString(u)===qn&&(h=qn);return h},re.regexp_classString=function(u){for(var h=0;this.regexp_eatClassSetCharacter(u);)h++;return h===1?Wr:qn},re.regexp_eatClassSetCharacter=function(u){var h=u.pos;if(u.eat(92))return this.regexp_eatCharacterEscape(u)||this.regexp_eatClassSetReservedPunctuator(u)?!0:u.eat(98)?(u.lastIntValue=8,!0):(u.pos=h,!1);var S=u.current();return S<0||S===u.lookahead()&&i3(S)||s3(S)?!1:(u.advance(),u.lastIntValue=S,!0)};function i3(u){return u===33||u>=35&&u<=38||u>=42&&u<=44||u===46||u>=58&&u<=64||u===94||u===96||u===126}function s3(u){return u===40||u===41||u===45||u===47||u>=91&&u<=93||u>=123&&u<=125}re.regexp_eatClassSetReservedPunctuator=function(u){var h=u.current();return a3(h)?(u.lastIntValue=h,u.advance(),!0):!1};function a3(u){return u===33||u===35||u===37||u===38||u===44||u===45||u>=58&&u<=62||u===64||u===96||u===126}re.regexp_eatClassControlLetter=function(u){var h=u.current();return Sf(h)||h===95?(u.lastIntValue=h%32,u.advance(),!0):!1},re.regexp_eatHexEscapeSequence=function(u){var h=u.pos;if(u.eat(120)){if(this.regexp_eatFixedHexDigits(u,2))return!0;u.switchU&&u.raise("Invalid escape"),u.pos=h}return!1},re.regexp_eatDecimalDigits=function(u){var h=u.pos,S=0;for(u.lastIntValue=0;Sf(S=u.current());)u.lastIntValue=10*u.lastIntValue+(S-48),u.advance();return u.pos!==h};function Sf(u){return u>=48&&u<=57}re.regexp_eatHexDigits=function(u){var h=u.pos,S=0;for(u.lastIntValue=0;cx(S=u.current());)u.lastIntValue=16*u.lastIntValue+ux(S),u.advance();return u.pos!==h};function cx(u){return u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102}function ux(u){return u>=65&&u<=70?10+(u-65):u>=97&&u<=102?10+(u-97):u-48}re.regexp_eatLegacyOctalEscapeSequence=function(u){if(this.regexp_eatOctalDigit(u)){var h=u.lastIntValue;if(this.regexp_eatOctalDigit(u)){var S=u.lastIntValue;h<=3&&this.regexp_eatOctalDigit(u)?u.lastIntValue=h*64+S*8+u.lastIntValue:u.lastIntValue=h*8+S}else u.lastIntValue=h;return!0}return!1},re.regexp_eatOctalDigit=function(u){var h=u.current();return lx(h)?(u.lastIntValue=h-48,u.advance(),!0):(u.lastIntValue=0,!1)};function lx(u){return u>=48&&u<=55}re.regexp_eatFixedHexDigits=function(u,h){var S=u.pos;u.lastIntValue=0;for(var E=0;E<h;++E){var P=u.current();if(!cx(P))return u.pos=S,!1;u.lastIntValue=16*u.lastIntValue+ux(P),u.advance()}return!0};var Tf=function(h){this.type=h.type,this.value=h.value,this.start=h.start,this.end=h.end,h.options.locations&&(this.loc=new he(h,h.startLoc,h.endLoc)),h.options.ranges&&(this.range=[h.start,h.end])},Se=st.prototype;Se.next=function(u){!u&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Tf(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Se.getToken=function(){return this.next(),new Tf(this)},typeof Symbol<"u"&&(Se[Symbol.iterator]=function(){var u=this;return{next:function(){var h=u.getToken();return{done:h.type===y.eof,value:h}}}}),Se.nextToken=function(){var u=this.curContext();if((!u||!u.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(y.eof);if(u.override)return u.override(this);this.readToken(this.fullCharCodeAtPos())},Se.readToken=function(u){return p(u,this.options.ecmaVersion>=6)||u===92?this.readWord():this.getTokenFromCode(u)},Se.fullCharCodeAt=function(u){var h=this.input.charCodeAt(u);if(h<=55295||h>=56320)return h;var S=this.input.charCodeAt(u+1);return S<=56319||S>=57344?h:(h<<10)+S-56613888},Se.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},Se.skipBlockComment=function(){var u=this.options.onComment&&this.curPosition(),h=this.pos,S=this.input.indexOf("*/",this.pos+=2);if(S===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=S+2,this.options.locations)for(var E=void 0,P=h;(E=q(this.input,P,this.pos))>-1;)++this.curLine,P=this.lineStart=E;this.options.onComment&&this.options.onComment(!0,this.input.slice(h+2,S),h,this.pos,u,this.curPosition())},Se.skipLineComment=function(u){for(var h=this.pos,S=this.options.onComment&&this.curPosition(),E=this.input.charCodeAt(this.pos+=u);this.pos<this.input.length&&!O(E);)E=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(h+u,this.pos),h,this.pos,S,this.curPosition())},Se.skipSpace=function(){e:for(;this.pos<this.input.length;){var u=this.input.charCodeAt(this.pos);switch(u){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(u>8&&u<14||u>=5760&&j.test(String.fromCharCode(u)))++this.pos;else break e}}},Se.finishToken=function(u,h){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var S=this.type;this.type=u,this.value=h,this.updateContext(S)},Se.readToken_dot=function(){var u=this.input.charCodeAt(this.pos+1);if(u>=48&&u<=57)return this.readNumber(!0);var h=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&u===46&&h===46?(this.pos+=3,this.finishToken(y.ellipsis)):(++this.pos,this.finishToken(y.dot))},Se.readToken_slash=function(){var u=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):u===61?this.finishOp(y.assign,2):this.finishOp(y.slash,1)},Se.readToken_mult_modulo_exp=function(u){var h=this.input.charCodeAt(this.pos+1),S=1,E=u===42?y.star:y.modulo;return this.options.ecmaVersion>=7&&u===42&&h===42&&(++S,E=y.starstar,h=this.input.charCodeAt(this.pos+2)),h===61?this.finishOp(y.assign,S+1):this.finishOp(E,S)},Se.readToken_pipe_amp=function(u){var h=this.input.charCodeAt(this.pos+1);if(h===u){if(this.options.ecmaVersion>=12){var S=this.input.charCodeAt(this.pos+2);if(S===61)return this.finishOp(y.assign,3)}return this.finishOp(u===124?y.logicalOR:y.logicalAND,2)}return h===61?this.finishOp(y.assign,2):this.finishOp(u===124?y.bitwiseOR:y.bitwiseAND,1)},Se.readToken_caret=function(){var u=this.input.charCodeAt(this.pos+1);return u===61?this.finishOp(y.assign,2):this.finishOp(y.bitwiseXOR,1)},Se.readToken_plus_min=function(u){var h=this.input.charCodeAt(this.pos+1);return h===u?h===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||A.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(y.incDec,2):h===61?this.finishOp(y.assign,2):this.finishOp(y.plusMin,1)},Se.readToken_lt_gt=function(u){var h=this.input.charCodeAt(this.pos+1),S=1;return h===u?(S=u===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+S)===61?this.finishOp(y.assign,S+1):this.finishOp(y.bitShift,S)):h===33&&u===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(h===61&&(S=2),this.finishOp(y.relational,S))},Se.readToken_eq_excl=function(u){var h=this.input.charCodeAt(this.pos+1);return h===61?this.finishOp(y.equality,this.input.charCodeAt(this.pos+2)===61?3:2):u===61&&h===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(y.arrow)):this.finishOp(u===61?y.eq:y.prefix,1)},Se.readToken_question=function(){var u=this.options.ecmaVersion;if(u>=11){var h=this.input.charCodeAt(this.pos+1);if(h===46){var S=this.input.charCodeAt(this.pos+2);if(S<48||S>57)return this.finishOp(y.questionDot,2)}if(h===63){if(u>=12){var E=this.input.charCodeAt(this.pos+2);if(E===61)return this.finishOp(y.assign,3)}return this.finishOp(y.coalesce,2)}}return this.finishOp(y.question,1)},Se.readToken_numberSign=function(){var u=this.options.ecmaVersion,h=35;if(u>=13&&(++this.pos,h=this.fullCharCodeAtPos(),p(h,!0)||h===92))return this.finishToken(y.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+J(h)+"'")},Se.getTokenFromCode=function(u){switch(u){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(y.parenL);case 41:return++this.pos,this.finishToken(y.parenR);case 59:return++this.pos,this.finishToken(y.semi);case 44:return++this.pos,this.finishToken(y.comma);case 91:return++this.pos,this.finishToken(y.bracketL);case 93:return++this.pos,this.finishToken(y.bracketR);case 123:return++this.pos,this.finishToken(y.braceL);case 125:return++this.pos,this.finishToken(y.braceR);case 58:return++this.pos,this.finishToken(y.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(y.backQuote);case 48:var h=this.input.charCodeAt(this.pos+1);if(h===120||h===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(h===111||h===79)return this.readRadixNumber(8);if(h===98||h===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(u);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(u);case 124:case 38:return this.readToken_pipe_amp(u);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(u);case 60:case 62:return this.readToken_lt_gt(u);case 61:case 33:return this.readToken_eq_excl(u);case 63:return this.readToken_question();case 126:return this.finishOp(y.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+J(u)+"'")},Se.finishOp=function(u,h){var S=this.input.slice(this.pos,this.pos+h);return this.pos+=h,this.finishToken(u,S)},Se.readRegexp=function(){for(var u,h,S=this.pos;;){this.pos>=this.input.length&&this.raise(S,"Unterminated regular expression");var E=this.input.charAt(this.pos);if(A.test(E)&&this.raise(S,"Unterminated regular expression"),u)u=!1;else{if(E==="[")h=!0;else if(E==="]"&&h)h=!1;else if(E==="/"&&!h)break;u=E==="\\"}++this.pos}var P=this.input.slice(S,this.pos);++this.pos;var R=this.pos,F=this.readWord1();this.containsEsc&&this.unexpected(R);var G=this.regexpState||(this.regexpState=new _r(this));G.reset(S,P,F),this.validateRegExpFlags(G),this.validateRegExpPattern(G);var X=null;try{X=new RegExp(P,F)}catch{}return this.finishToken(y.regexp,{pattern:P,flags:F,value:X})},Se.readInt=function(u,h,S){for(var E=this.options.ecmaVersion>=12&&h===void 0,P=S&&this.input.charCodeAt(this.pos)===48,R=this.pos,F=0,G=0,X=0,me=h??1/0;X<me;++X,++this.pos){var ke=this.input.charCodeAt(this.pos),We=void 0;if(E&&ke===95){P&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),G===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),X===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),G=ke;continue}if(ke>=97?We=ke-97+10:ke>=65?We=ke-65+10:ke>=48&&ke<=57?We=ke-48:We=1/0,We>=u)break;G=ke,F=F*u+We}return E&&G===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===R||h!=null&&this.pos-R!==h?null:F};function o3(u,h){return h?parseInt(u,8):parseFloat(u.replace(/_/g,""))}function fx(u){return typeof BigInt!="function"?null:BigInt(u.replace(/_/g,""))}Se.readRadixNumber=function(u){var h=this.pos;this.pos+=2;var S=this.readInt(u);return S==null&&this.raise(this.start+2,"Expected number in radix "+u),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(S=fx(this.input.slice(h,this.pos)),++this.pos):p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,S)},Se.readNumber=function(u){var h=this.pos;!u&&this.readInt(10,void 0,!0)===null&&this.raise(h,"Invalid number");var S=this.pos-h>=2&&this.input.charCodeAt(h)===48;S&&this.strict&&this.raise(h,"Invalid number");var E=this.input.charCodeAt(this.pos);if(!S&&!u&&this.options.ecmaVersion>=11&&E===110){var P=fx(this.input.slice(h,this.pos));return++this.pos,p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,P)}S&&/[89]/.test(this.input.slice(h,this.pos))&&(S=!1),E===46&&!S&&(++this.pos,this.readInt(10),E=this.input.charCodeAt(this.pos)),(E===69||E===101)&&!S&&(E=this.input.charCodeAt(++this.pos),(E===43||E===45)&&++this.pos,this.readInt(10)===null&&this.raise(h,"Invalid number")),p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var R=o3(this.input.slice(h,this.pos),S);return this.finishToken(y.num,R)},Se.readCodePoint=function(){var u=this.input.charCodeAt(this.pos),h;if(u===123){this.options.ecmaVersion<6&&this.unexpected();var S=++this.pos;h=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,h>1114111&&this.invalidStringToken(S,"Code point out of bounds")}else h=this.readHexChar(4);return h},Se.readString=function(u){for(var h="",S=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var E=this.input.charCodeAt(this.pos);if(E===u)break;E===92?(h+=this.input.slice(S,this.pos),h+=this.readEscapedChar(!1),S=this.pos):E===8232||E===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(O(E)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return h+=this.input.slice(S,this.pos++),this.finishToken(y.string,h)};var dx={};Se.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(u){if(u===dx)this.readInvalidTemplateToken();else throw u}this.inTemplateElement=!1},Se.invalidStringToken=function(u,h){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw dx;this.raise(u,h)},Se.readTmplToken=function(){for(var u="",h=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var S=this.input.charCodeAt(this.pos);if(S===96||S===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===y.template||this.type===y.invalidTemplate)?S===36?(this.pos+=2,this.finishToken(y.dollarBraceL)):(++this.pos,this.finishToken(y.backQuote)):(u+=this.input.slice(h,this.pos),this.finishToken(y.template,u));if(S===92)u+=this.input.slice(h,this.pos),u+=this.readEscapedChar(!0),h=this.pos;else if(O(S)){switch(u+=this.input.slice(h,this.pos),++this.pos,S){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:u+=`
|
|
96
|
+
`;break;default:u+=String.fromCharCode(S);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),h=this.pos}else++this.pos}},Se.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(y.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
|
97
|
+
`&&++this.pos;case`
|
|
98
|
+
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")},Se.readEscapedChar=function(u){var h=this.input.charCodeAt(++this.pos);switch(++this.pos,h){case 110:return`
|
|
99
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return J(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"),u){var S=this.pos-1;this.invalidStringToken(S,"Invalid escape sequence in template string")}default:if(h>=48&&h<=55){var E=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],P=parseInt(E,8);return P>255&&(E=E.slice(0,-1),P=parseInt(E,8)),this.pos+=E.length-1,h=this.input.charCodeAt(this.pos),(E!=="0"||h===56||h===57)&&(this.strict||u)&&this.invalidStringToken(this.pos-1-E.length,u?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(P)}return O(h)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(h)}},Se.readHexChar=function(u){var h=this.pos,S=this.readInt(16,u);return S===null&&this.invalidStringToken(h,"Bad character escape sequence"),S},Se.readWord1=function(){this.containsEsc=!1;for(var u="",h=!0,S=this.pos,E=this.options.ecmaVersion>=6;this.pos<this.input.length;){var P=this.fullCharCodeAtPos();if(g(P,E))this.pos+=P<=65535?1:2;else if(P===92){this.containsEsc=!0,u+=this.input.slice(S,this.pos);var R=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var F=this.readCodePoint();(h?p:g)(F,E)||this.invalidStringToken(R,"Invalid Unicode escape"),u+=J(F),S=this.pos}else break;h=!1}return u+this.input.slice(S,this.pos)},Se.readWord=function(){var u=this.readWord1(),h=y.name;return this.keywords.test(u)&&(h=w[u]),this.finishToken(h,u)};var px="8.17.0";st.acorn={Parser:st,version:px,defaultOptions:de,Position:Y,SourceLocation:he,getLineInfo:z,Node:Dc,TokenType:v,tokTypes:y,keywordTypes:w,TokContext:Ln,tokContexts:ze,isIdentifierChar:g,isIdentifierStart:p,Token:Tf,isNewLine:O,lineBreak:A,lineBreakG:N,nonASCIIwhitespace:j};function c3(u,h){return st.parse(u,h)}function u3(u,h,S){return st.parseExpressionAt(u,h,S)}function l3(u,h){return st.tokenizer(u,h)}e.Node=Dc,e.Parser=st,e.Position=Y,e.SourceLocation=he,e.TokContext=Ln,e.Token=Tf,e.TokenType=v,e.defaultOptions=de,e.getLineInfo=z,e.isIdentifierChar=g,e.isIdentifierStart=p,e.isNewLine=O,e.keywordTypes=w,e.lineBreak=A,e.lineBreakG=N,e.nonASCIIwhitespace=j,e.parse=c3,e.parseExpressionAt=u3,e.tokContexts=ze,e.tokTypes=y,e.tokenizer=l3,e.version=px}))});var kg=x(bg=>{"use strict";d();Object.defineProperty(bg,"__esModule",{value:!0});bg.SUPPORTED_ASSET_IMAGE_EXTENSIONS=void 0;bg.SUPPORTED_ASSET_IMAGE_EXTENSIONS=["jpg","jpeg","png","gif","webp","heic","ico"]});var dc=x(mr=>{"use strict";d();Object.defineProperty(mr,"__esModule",{value:!0});mr.identity=void 0;mr.unique=uae;mr.assertNever=lae;mr.unexpected=fae;mr.isString=pae;mr.extname=hae;mr.exists=mae;mr.acceptsLocalBlocks=gae;function uae(e){return[...new Set(e)]}function lae(e){throw new Error(`Unknown module type ${e}`)}function fae(){return new Error("Unexpected code path encountered")}var dae=e=>e;mr.identity=dae;function pae(e){return typeof e=="string"}function hae(e){return e.split(".").pop()||""}async function mae(e,t){return e.stat(t).then(()=>!0).catch(()=>!1)}async function gae(e,t){let n=await t.getSectionSchema(e).catch(i=>{});if(!n)return new Error("Section does not exist");let r=n.validSchema;return r instanceof Error?r:(r.blocks??[]).some(i=>i.type&&"name"in i&&i.name)}});var rT=x(La=>{"use strict";d();Object.defineProperty(La,"__esModule",{value:!0});La.toCssSourceCode=nT;La.toSvgSourceCode=bae;La.toJsSourceCode=rB;La.parseJs=iB;La.toSourceCode=Sae;var nB=tn(),yae=tB(),_ae=kg(),vae=dc();async function nT(e,t){return{type:"css",uri:e,source:t,ast:new Error("File parsing not implemented yet")}}async function bae(e,t){return{type:"svg",uri:e,source:t,ast:new Error("File parsing not implemented yet")}}async function kae(e,t){return{type:"image",uri:e,source:t,ast:new Error("Image files are not parsed")}}async function rB(e,t){return{type:"javascript",uri:e,source:t,ast:iB(t)}}function iB(e){try{return(0,yae.parse)(e,{ecmaVersion:"latest",sourceType:"module"})}catch(t){return(0,nB.asError)(t)}}async function Sae(e,t){let n=(0,vae.extname)(e);if(n==="json"||n==="liquid")return(0,nB.toSourceCode)(e,t);if(n==="js")return rB(e,t);if(n==="css")return nT(e,t);if(n==="svg")return nT(e,t);if(_ae.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(n))return kae(e,t);throw new Error(`Unknown source code type for ${e}`)}});var sB=x(sT=>{"use strict";d();Object.defineProperty(sT,"__esModule",{value:!0});sT.augmentDependencies=wae;var qa=tn(),Tae=rT(),iT=dc();function wae(e,t){return{fs:t.fs,getBlockSchema:(0,qa.memoize)(t.getBlockSchema,iT.identity),getSectionSchema:(0,qa.memoize)(t.getSectionSchema,iT.identity),getSourceCode:(0,qa.memoize)(t.getSourceCode??async function(r){let i=await t.fs.readFile(r);return(0,Tae.toSourceCode)(r,i)},iT.identity),getWebComponentDefinitionReference:t.getWebComponentDefinitionReference,mode:t.mode??"theme",getThemeBlockNames:(0,qa.memo)(()=>(0,qa.recursiveReadDirectory)(t.fs,qa.path.join(e,"blocks"),([n])=>n.endsWith(".liquid")).then(n=>n.map(r=>qa.path.basename(r,".liquid"))))}}});var oT=x(Br=>{"use strict";d();Object.defineProperty(Br,"__esModule",{value:!0});Br.getModule=Eae;Br.getTemplateModule=oB;Br.getThemeBlockModule=cB;Br.getSectionModule=uB;Br.getSectionGroupModule=lB;Br.getAssetModule=fB;Br.getSnippetModule=dB;Br.getLayoutModule=pB;var An=tn(),xae=kg(),aB=dc(),aT=new WeakMap;function Eae(e,t){let n=hB(e);if(n.has(t))return n.get(t);let r=An.path.relative(t,e.rootUri);switch(!0){case r.startsWith("assets"):return fB(e,An.path.basename(t));case r.startsWith("blocks"):return cB(e,An.path.basename(t,".liquid"));case r.startsWith("layout"):return pB(e,An.path.basename(t,".liquid"));case r.startsWith("sections"):return r.endsWith(".json")?lB(e,An.path.basename(t,".json")):uB(e,An.path.basename(t,".liquid"));case r.startsWith("snippets"):return dB(e,An.path.basename(t,".liquid"));case r.startsWith("templates"):return oB(e,t)}}function oB(e,t){switch((0,aB.extname)(t)){case"json":return Xi(e,{type:"JSON",kind:"template",dependencies:[],references:[],uri:t});case"liquid":return Xi(e,{type:"Liquid",kind:"template",dependencies:[],references:[],uri:t});default:throw new Error(`Unknown template type for ${t}`)}}function cB(e,t){let n=An.path.join(e.rootUri,"blocks",`${t}.liquid`);return Xi(e,{type:"Liquid",kind:"block",dependencies:[],references:[],uri:n})}function uB(e,t){let n=An.path.join(e.rootUri,"sections",`${t}.liquid`);return Xi(e,{type:"Liquid",kind:"section",dependencies:[],references:[],uri:n})}function lB(e,t){let n=An.path.join(e.rootUri,"sections",`${t}.json`);return Xi(e,{type:"JSON",kind:"section-group",dependencies:[],references:[],uri:n})}function fB(e,t){let n=(0,aB.extname)(t),r;if(xae.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(n)?r="Image":n==="js"?r="JavaScript":n==="css"?r="CSS":n==="svg"&&(r="SVG"),!!r)return Xi(e,{type:r,kind:"unused",dependencies:[],references:[],uri:An.path.join(e.rootUri,"assets",t)})}function dB(e,t){let n=An.path.join(e.rootUri,"snippets",`${t}.liquid`);return Xi(e,{type:"Liquid",kind:"snippet",uri:n,dependencies:[],references:[]})}function pB(e,t="theme"){if(t===!1)return;t===void 0&&(t="theme");let n=An.path.join(e.rootUri,"layout",`${t}.liquid`);return Xi(e,{type:"Liquid",kind:"layout",uri:n,dependencies:[],references:[]})}function hB(e){return aT.has(e)||aT.set(e,new Map),aT.get(e)}function Xi(e,t){let n=hB(e);return n.has(t.uri)||n.set(t.uri,t),n.get(t.uri)}});var vB=x(Sg=>{"use strict";d();Object.defineProperty(Sg,"__esModule",{value:!0});Sg.traverseModule=Gn;Sg.bind=Jn;var Zi=ue(),jt=tn(),Fr=dc(),Dt=oT();async function Gn(e,t,n){if(!t.modules[e.uri]&&(t.modules[e.uri]=e,e.exists=await(0,Fr.exists)(n.fs,e.uri),!!e.exists))switch(e.type){case"Liquid":return Aae(e,t,n);case"JSON":return Cae(e,t,n);case"JavaScript":return;case"CSS":case"SVG":case"Image":return;default:return(0,Fr.assertNever)(e)}}async function Aae(e,t,n){let r=await n.getSourceCode(e.uri);if(r.ast instanceof Error)return;let i={LiquidFilter:(c,l)=>{if(["asset_url","asset_img_url","inline_asset_content"].includes(c.name)){let f=l[l.length-1];if(f.type!==Zi.NodeTypes.LiquidVariable||f.expression.type!==Zi.NodeTypes.String||f.filters[0]!==c)return;let m=f.expression.value,p=(0,Dt.getAssetModule)(t,m);return p?{target:p,sourceRange:[f.position.start,f.position.end]}:void 0}},ContentForMarkup:(c,l)=>{let f=l.at(-1);if(c.contentForType.value!=="block")return;let m=c.args.find(v=>v.name==="type");if(!m)return;let p=m.value;if(p.type!==Zi.NodeTypes.String)return;let g=p.value;return{target:(0,Dt.getThemeBlockModule)(t,g),sourceRange:[f.position.start,c.position.end]}},BlockMarkup:(c,l)=>{if(c.name.value.startsWith("shopify://apps/"))return;let f=l.at(-1);return{target:(0,Dt.getThemeBlockModule)(t,c.name.value),sourceRange:[f.position.start,f.position.end]}},HtmlElement:c=>{if(c.name.length!==1||c.name[0].type!==Zi.NodeTypes.TextNode)return;let l=c.name[0],f=l.value;if(!f.includes("-"))return;let m=n.getWebComponentDefinitionReference(f);if(!m)return;let{assetName:p,range:g}=m,v=(0,Dt.getAssetModule)(t,p);if(v)return{target:v,sourceRange:[c.blockStartPosition.start,l.position.end],targetRange:g}},RenderMarkup:(c,l)=>{let f=c.snippet,m=l.at(-1);if(!(0,Fr.isString)(f)&&f.type===Zi.NodeTypes.String)return{target:(0,Dt.getSnippetModule)(t,f.value),sourceRange:[m.position.start,m.position.end]}},LiquidTag:c=>{switch(c.name){case Zi.NamedTags.sections:if(!(0,Fr.isString)(c.markup)){let l=c.markup.value;return{target:(0,Dt.getSectionGroupModule)(t,l),sourceRange:[c.position.start,c.position.end]}}case Zi.NamedTags.section:if(!(0,Fr.isString)(c.markup)&&c.markup.type===Zi.NodeTypes.SectionMarkup){let l=c.markup.name.value;return{target:(0,Dt.getSectionModule)(t,l),sourceRange:[c.position.start,c.position.end]}}}}},s=(0,jt.visit)(r.ast,i);for(let c of s)Jn(e,c.target,{sourceRange:c.sourceRange,targetRange:c.targetRange});let o=(0,Fr.unique)(s.map(c=>c.target)).map(c=>Gn(c,t,n));if(e.kind==="section"){let c=jt.path.basename(e.uri,".liquid"),l=await n.getSectionSchema(c);o.push(mB(l,e,t,n))}else if(e.kind==="block"&&n.mode==="theme"){let c=jt.path.basename(e.uri,".liquid"),l=await n.getBlockSchema(c);o.push(mB(l,e,t,n))}return Promise.all(o)}async function mB(e,t,n,r){if(!e||t.kind==="section"&&await(0,Fr.acceptsLocalBlocks)(jt.path.basename(t.uri,".liquid"),r))return;let{ast:a,validSchema:o}=e;if(o instanceof Error||a instanceof Error)return;let c=[];return o.blocks&&c.push(Oae(e,t,a,o.blocks,n,r)),o.presets&&c.push(Nae(e,t,a,o.presets,n,r)),"default"in o&&o.default&&c.push(Pae(e,t,a,o.default,n,r)),Promise.all(c)}async function Oae(e,t,n,r,i,s){let a=[];for(let[o,c]of Object.entries(r)){let l=["blocks",o],m=(0,jt.nodeAtPath)(n,l).children.find(g=>g.key.value==="type");if(!m)continue;let p=[e.offset+m.loc.start.offset,e.offset+m.loc.end.offset];switch(c.type){case"@theme":{let g=await s.getThemeBlockNames().then(v=>v.filter(b=>!b.startsWith("_")));for(let v of g){let b=(0,Dt.getThemeBlockModule)(i,jt.path.basename(v,".liquid"));Jn(t,b,{sourceRange:p,type:"indirect"}),a.push(Gn(b,i,s))}break}case"@app":break;default:{let g=(0,Dt.getThemeBlockModule)(i,c.type);Jn(t,g,{sourceRange:p}),a.push(Gn(g,i,s))}}}return Promise.all(a)}async function Nae(e,t,n,r,i,s){let a=[];for(let[o,c]of r.entries()){if(!("blocks"in c))continue;let l=Array.isArray(c.blocks)?c.blocks.entries():Object.entries(c.blocks);for(let[f,m]of l){let p=["presets",o,"blocks",f],g=(0,jt.nodeAtPath)(n,p),v=(0,Dt.getThemeBlockModule)(i,m.type);if(!v)continue;let b=g.children.find(k=>k.key.value==="type");if(!b)continue;let _=[e.offset+b.loc.start.offset,e.offset+b.loc.end.offset];Jn(t,v,{sourceRange:_,type:"preset"}),a.push(Gn(v,i,s)),m.blocks&&a.push(yB(e,t,n,m.blocks,p,i,s))}}return Promise.all(a)}async function yB(e,t,n,r,i,s,a){let o=[],c=Array.isArray(r)?r.entries():Object.entries(r);for(let[l,f]of c){let m=[...i,"blocks",l],p=(0,jt.nodeAtPath)(n,m),g=(0,Dt.getThemeBlockModule)(s,f.type);if(!g)continue;let v=p.children.find(_=>_.key.value==="type");if(!v)continue;let b=[e.offset+v.loc.start.offset,e.offset+v.loc.end.offset];Jn(t,g,{sourceRange:b,type:"preset"}),o.push(Gn(g,s,a)),f.blocks&&o.push(yB(e,t,n,f.blocks,m,s,a))}return Promise.all(o)}async function Pae(e,t,n,r,i,s){let a=[];if(!("blocks"in r))return;let o=Array.isArray(r.blocks)?r.blocks.entries():Object.entries(r.blocks);for(let[c,l]of o){let f=["default","blocks",c],m=(0,jt.nodeAtPath)(n,f),p=(0,Dt.getThemeBlockModule)(i,l.type);if(!p)continue;let g=m.children.find(b=>b.key.value==="type");if(!g)continue;let v=[e.offset+g.loc.start.offset,e.offset+g.loc.end.offset];Jn(t,p,{sourceRange:v,type:"preset"}),a.push(Gn(p,i,s))}return Promise.all(a)}async function Cae(e,t,n){let r=await n.getSourceCode(e.uri);if(r.type!==jt.SourceCodeType.JSON)throw(0,Fr.unexpected)();let i=r.ast;if(!(i instanceof Error))switch(e.kind){case"template":{let s=(0,jt.parseJSON)(r.source),a=[];for(let[l,f]of Object.entries(s.sections)){let m=f.type,p=["sections",l],g=(0,jt.nodeAtPath)(i,p),v=(0,Dt.getSectionModule)(t,m),b=g.children.find(T=>T.key.value==="type"),_=b.loc.start.offset,k=b.loc.end.offset;Jn(e,v,{sourceRange:[_,k]}),a.push(Gn(v,t,n),gB(e,i,p,f,t,n))}let o=s.layout,c=(0,Dt.getLayoutModule)(t,s.layout);if(c){let l,f=!0;if(o!==!1&&o!==void 0){let m=["layout"],p=(0,jt.nodeAtPath)(i,m);l=[p.loc.start.offset,p.loc.end.offset],f=!1}Jn(e,c,{sourceRange:l,type:"indirect"}),a.push(Gn(c,t,n))}return Promise.all(a)}case"section-group":{let s=(0,jt.parseJSON)(r.source),a=[];for(let[o,c]of Object.entries(s.sections)){let l=c.type,f=["sections",o],m=(0,jt.nodeAtPath)(i,f),p=(0,Dt.getSectionModule)(t,l),g=m.children.find(k=>k.key.value==="type"),v=g.loc.start.offset,b=g.loc.end.offset;Jn(e,p,{sourceRange:[v,b]}),a.push(Gn(p,t,n),gB(e,i,f,c,t,n))}return Promise.all(a)}default:return(0,Fr.assertNever)(e.kind)}}async function gB(e,t,n=[],r,i,s){if(!r.blocks||await(0,Fr.acceptsLocalBlocks)(r.type,s))return;let o=[];for(let[c,l]of Object.entries(r.blocks)){let f=l.type,m=(0,Dt.getThemeBlockModule)(i,f),p=[...n,"blocks",c],v=(0,jt.nodeAtPath)(t,p).children.find(w=>w.key.value==="type"),b=v.loc.start.offset,_=v.loc.end.offset;Jn(e,m,{sourceRange:[b,_]}),o.push(Gn(m,i,s),_B(e,t,p,l,i,s))}return Promise.all(o)}async function _B(e,t,n=[],r,i,s){if(!r.blocks)return;let a=[];for(let[o,c]of Object.entries(r.blocks)){let l=c.type,f=(0,Dt.getThemeBlockModule)(i,l),m=[...n,"blocks",o],g=(0,jt.nodeAtPath)(t,m).children.find(k=>k.key.value==="type"),v=g.loc.start.offset,b=g.loc.end.offset;Jn(e,f,{sourceRange:[v,b]}),a.push(Gn(f,i,s),_B(e,t,m,c,i,s))}return Promise.all(a)}function Jn(e,t,{sourceRange:n,targetRange:r,type:i="direct"}={}){let s={source:{uri:e.uri,range:n},target:{uri:t.uri,range:r},type:i};e.dependencies.push(s),t.references.push(s)}});var bB=x(cT=>{"use strict";d();Object.defineProperty(cT,"__esModule",{value:!0});cT.buildThemeGraph=Mae;var kl=tn(),Lae=sB(),qae=oT(),Iae=vB();async function Mae(e,t,n){let r=(0,Lae.augmentDependencies)(e,t);n=n??await(0,kl.recursiveReadDirectory)(r.fs,e,([s])=>{let a=s.startsWith(kl.path.join(e,"templates")),o=s.startsWith(kl.path.join(e,"layout"))&&s.endsWith(".liquid"),c=s.startsWith(kl.path.join(e,"sections"))&&s.endsWith(".liquid"),l=r.mode==="app"&&s.startsWith(kl.path.join(e,"blocks"))&&s.endsWith(".liquid");return a||o||c||l});let i={entryPoints:[],modules:{},rootUri:e};return i.entryPoints=n.map(s=>(0,qae.getModule)(i,s)).filter(s=>s!==void 0),await Promise.all(i.entryPoints.map(s=>(0,Iae.traverseModule)(s,i,r))),i}});var kB=x(uT=>{"use strict";d();Object.defineProperty(uT,"__esModule",{value:!0});uT.serializeThemeGraph=Rae;function Rae(e){let t=Object.values(e.modules).map(r=>({uri:r.uri,type:r.type,kind:r.kind,..."exists"in r?{exists:r.exists}:{}})),n=Object.values(e.modules).flatMap(r=>r.dependencies);return{rootUri:e.rootUri,nodes:t,edges:n}}});var TB=x((Tg,SB)=>{d();(function(e,t){typeof Tg=="object"&&typeof SB<"u"?t(Tg):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t((e.acorn=e.acorn||{},e.acorn.walk={})))})(Tg,(function(e){"use strict";function t(k,w,T,y,A){T||(T=_),(function N(O,q,j){var M=j||O.type;b(T,M,O,q,N),w[M]&&w[M](O,q)})(k,y,A)}function n(k,w,T,y,A){var N=[];T||(T=_),(function O(q,j,M){var C=M||q.type,L=q!==N[N.length-1];L&&N.push(q),b(T,C,q,j,O),w[C]&&w[C](q,j||N,N),L&&N.pop()})(k,y,A)}function r(k,w,T,y,A){var N=T?p(T,y||void 0):y;(function O(q,j,M){N[M||q.type](q,j,O)})(k,w,A)}function i(k){return typeof k=="string"?function(w){return w===k}:k||function(){return!0}}var s=function(w,T){this.node=w,this.state=T};function a(k,w,T,y,A){T||(T=_);var N;(function O(q,j,M){var C=M||q.type;b(T,C,q,j,O),N!==q&&(w(q,j,C),N=q)})(k,y,A)}function o(k,w,T,y){T||(T=_);var A=[],N;(function O(q,j,M){var C=M||q.type,L=q!==A[A.length-1];L&&A.push(q),b(T,C,q,j,O),N!==q&&(w(q,j||A,A,C),N=q),L&&A.pop()})(k,y)}function c(k,w,T,y,A,N){A||(A=_),y=i(y);try{(function O(q,j,M){var C=M||q.type;if((w==null||q.start<=w)&&(T==null||q.end>=T)&&b(A,C,q,j,O),(w==null||q.start===w)&&(T==null||q.end===T)&&y(C,q))throw new s(q,j)})(k,N)}catch(O){if(O instanceof s)return O;throw O}}function l(k,w,T,y,A){T=i(T),y||(y=_);try{(function N(O,q,j){var M=j||O.type;if(!(O.start>w||O.end<w)&&(b(y,M,O,q,N),T(M,O)))throw new s(O,q)})(k,A)}catch(N){if(N instanceof s)return N;throw N}}function f(k,w,T,y,A){T=i(T),y||(y=_);try{(function N(O,q,j){if(!(O.end<w)){var M=j||O.type;if(O.start>=w&&T(M,O))throw new s(O,q);b(y,M,O,q,N)}})(k,A)}catch(N){if(N instanceof s)return N;throw N}}function m(k,w,T,y,A){T=i(T),y||(y=_);var N;return(function O(q,j,M){if(!(q.start>w)){var C=M||q.type;q.end<=w&&(!N||N.node.end<q.end)&&T(C,q)&&(N=new s(q,j)),b(y,C,q,j,O)}})(k,A),N}function p(k,w){var T=Object.create(w||_);for(var y in k)T[y]=k[y];return T}function g(k,w,T){T(k,w)}function v(k,w,T){}function b(k,w,T,y,A){if(k[w]==null)throw new Error("No walker function defined for node type "+w);k[w](T,y,A)}var _={};_.Program=_.BlockStatement=_.StaticBlock=function(k,w,T){for(var y=0,A=k.body;y<A.length;y+=1){var N=A[y];T(N,w,"Statement")}},_.Statement=g,_.EmptyStatement=v,_.ExpressionStatement=_.ParenthesizedExpression=_.ChainExpression=function(k,w,T){return T(k.expression,w,"Expression")},_.IfStatement=function(k,w,T){T(k.test,w,"Expression"),T(k.consequent,w,"Statement"),k.alternate&&T(k.alternate,w,"Statement")},_.LabeledStatement=function(k,w,T){return T(k.body,w,"Statement")},_.BreakStatement=_.ContinueStatement=v,_.WithStatement=function(k,w,T){T(k.object,w,"Expression"),T(k.body,w,"Statement")},_.SwitchStatement=function(k,w,T){T(k.discriminant,w,"Expression");for(var y=0,A=k.cases;y<A.length;y+=1){var N=A[y];T(N,w)}},_.SwitchCase=function(k,w,T){k.test&&T(k.test,w,"Expression");for(var y=0,A=k.consequent;y<A.length;y+=1){var N=A[y];T(N,w,"Statement")}},_.ReturnStatement=_.YieldExpression=_.AwaitExpression=function(k,w,T){k.argument&&T(k.argument,w,"Expression")},_.ThrowStatement=_.SpreadElement=function(k,w,T){return T(k.argument,w,"Expression")},_.TryStatement=function(k,w,T){T(k.block,w,"Statement"),k.handler&&T(k.handler,w),k.finalizer&&T(k.finalizer,w,"Statement")},_.CatchClause=function(k,w,T){k.param&&T(k.param,w,"Pattern"),T(k.body,w,"Statement")},_.WhileStatement=_.DoWhileStatement=function(k,w,T){T(k.test,w,"Expression"),T(k.body,w,"Statement")},_.ForStatement=function(k,w,T){k.init&&T(k.init,w,"ForInit"),k.test&&T(k.test,w,"Expression"),k.update&&T(k.update,w,"Expression"),T(k.body,w,"Statement")},_.ForInStatement=_.ForOfStatement=function(k,w,T){T(k.left,w,"ForInit"),T(k.right,w,"Expression"),T(k.body,w,"Statement")},_.ForInit=function(k,w,T){k.type==="VariableDeclaration"?T(k,w):T(k,w,"Expression")},_.DebuggerStatement=v,_.FunctionDeclaration=function(k,w,T){return T(k,w,"Function")},_.VariableDeclaration=function(k,w,T){for(var y=0,A=k.declarations;y<A.length;y+=1){var N=A[y];T(N,w)}},_.VariableDeclarator=function(k,w,T){T(k.id,w,"Pattern"),k.init&&T(k.init,w,"Expression")},_.Function=function(k,w,T){k.id&&T(k.id,w,"Pattern");for(var y=0,A=k.params;y<A.length;y+=1){var N=A[y];T(N,w,"Pattern")}T(k.body,w,k.expression?"Expression":"Statement")},_.Pattern=function(k,w,T){k.type==="Identifier"?T(k,w,"VariablePattern"):k.type==="MemberExpression"?T(k,w,"MemberPattern"):T(k,w)},_.VariablePattern=v,_.MemberPattern=g,_.RestElement=function(k,w,T){return T(k.argument,w,"Pattern")},_.ArrayPattern=function(k,w,T){for(var y=0,A=k.elements;y<A.length;y+=1){var N=A[y];N&&T(N,w,"Pattern")}},_.ObjectPattern=function(k,w,T){for(var y=0,A=k.properties;y<A.length;y+=1){var N=A[y];N.type==="Property"?(N.computed&&T(N.key,w,"Expression"),T(N.value,w,"Pattern")):N.type==="RestElement"&&T(N.argument,w,"Pattern")}},_.Expression=g,_.ThisExpression=_.Super=_.MetaProperty=v,_.ArrayExpression=function(k,w,T){for(var y=0,A=k.elements;y<A.length;y+=1){var N=A[y];N&&T(N,w,"Expression")}},_.ObjectExpression=function(k,w,T){for(var y=0,A=k.properties;y<A.length;y+=1){var N=A[y];T(N,w)}},_.FunctionExpression=_.ArrowFunctionExpression=_.FunctionDeclaration,_.SequenceExpression=function(k,w,T){for(var y=0,A=k.expressions;y<A.length;y+=1){var N=A[y];T(N,w,"Expression")}},_.TemplateLiteral=function(k,w,T){for(var y=0,A=k.quasis;y<A.length;y+=1){var N=A[y];T(N,w)}for(var O=0,q=k.expressions;O<q.length;O+=1){var j=q[O];T(j,w,"Expression")}},_.TemplateElement=v,_.UnaryExpression=_.UpdateExpression=function(k,w,T){T(k.argument,w,"Expression")},_.BinaryExpression=_.LogicalExpression=function(k,w,T){T(k.left,w,"Expression"),T(k.right,w,"Expression")},_.AssignmentExpression=_.AssignmentPattern=function(k,w,T){T(k.left,w,"Pattern"),T(k.right,w,"Expression")},_.ConditionalExpression=function(k,w,T){T(k.test,w,"Expression"),T(k.consequent,w,"Expression"),T(k.alternate,w,"Expression")},_.NewExpression=_.CallExpression=function(k,w,T){if(T(k.callee,w,"Expression"),k.arguments)for(var y=0,A=k.arguments;y<A.length;y+=1){var N=A[y];T(N,w,"Expression")}},_.MemberExpression=function(k,w,T){T(k.object,w,"Expression"),k.computed&&T(k.property,w,"Expression")},_.ExportNamedDeclaration=_.ExportDefaultDeclaration=function(k,w,T){if(k.declaration&&T(k.declaration,w,k.type==="ExportNamedDeclaration"||k.declaration.id?"Statement":"Expression"),k.source&&T(k.source,w,"Expression"),k.attributes)for(var y=0,A=k.attributes;y<A.length;y+=1){var N=A[y];T(N,w)}},_.ExportAllDeclaration=function(k,w,T){if(k.exported&&T(k.exported,w),T(k.source,w,"Expression"),k.attributes)for(var y=0,A=k.attributes;y<A.length;y+=1){var N=A[y];T(N,w)}},_.ImportAttribute=function(k,w,T){T(k.value,w,"Expression")},_.ImportDeclaration=function(k,w,T){for(var y=0,A=k.specifiers;y<A.length;y+=1){var N=A[y];T(N,w)}if(T(k.source,w,"Expression"),k.attributes)for(var O=0,q=k.attributes;O<q.length;O+=1){var j=q[O];T(j,w)}},_.ImportExpression=function(k,w,T){T(k.source,w,"Expression"),k.options&&T(k.options,w,"Expression")},_.ImportSpecifier=_.ImportDefaultSpecifier=_.ImportNamespaceSpecifier=_.Identifier=_.PrivateIdentifier=_.Literal=v,_.TaggedTemplateExpression=function(k,w,T){T(k.tag,w,"Expression"),T(k.quasi,w,"Expression")},_.ClassDeclaration=_.ClassExpression=function(k,w,T){return T(k,w,"Class")},_.Class=function(k,w,T){k.id&&T(k.id,w,"Pattern"),k.superClass&&T(k.superClass,w,"Expression"),T(k.body,w)},_.ClassBody=function(k,w,T){for(var y=0,A=k.body;y<A.length;y+=1){var N=A[y];T(N,w)}},_.MethodDefinition=_.PropertyDefinition=_.Property=function(k,w,T){k.computed&&T(k.key,w,"Expression"),k.value&&T(k.value,w,"Expression")},e.ancestor=n,e.base=_,e.findNodeAfter=f,e.findNodeAround=l,e.findNodeAt=c,e.findNodeBefore=m,e.full=a,e.fullAncestor=o,e.make=p,e.recursive=r,e.simple=t}))});var xB=x(wg=>{"use strict";d();Object.defineProperty(wg,"__esModule",{value:!0});wg.getWebComponentMap=Fae;wg.findWebComponentReferences=wB;var lT=tn(),Dae=TB(),jae=dc(),Bae=/^[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 Fae(e,{fs:t,getSourceCode:n}){let r=new Map,i=lT.path.join(e,"assets");if(!await(0,jae.exists)(t,i))return r;let s=await(0,lT.recursiveReadDirectory)(t,i,([a])=>a.endsWith(".js"));return await Promise.all(s.map(a=>wB(a,i,n,r))),r}async function wB(e,t,n,r){let i=await n(e);if(i.type!=="javascript")return;let s=i.ast;if(!(s instanceof Error))for(let a of s.body)(0,Dae.ancestor)(a,{Literal(o,c,l){if(typeof o.value=="string"&&Bae.test(o.value)){let f=l.at(-2);if(!f||f.type!=="CallExpression")return;let m=f.callee;if(m.type!=="MemberExpression")return;let p=m.property;if(p.type!=="Identifier"||p.name!=="define")return;r.set(o.value,{assetName:lT.path.relative(e,t),range:[p.start,o.end]})}return null}})}});var AB=x(rt=>{"use strict";d();var Vae=rt&&rt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$ae=rt&&rt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Vae(t,e,n)};Object.defineProperty(rt,"__esModule",{value:!0});rt.toSvgSourceCode=rt.toSourceCode=rt.toJsSourceCode=rt.toCssSourceCode=rt.findWebComponentReferences=rt.getWebComponentMap=rt.serializeThemeGraph=rt.buildThemeGraph=void 0;var Uae=bB();Object.defineProperty(rt,"buildThemeGraph",{enumerable:!0,get:function(){return Uae.buildThemeGraph}});var Hae=kB();Object.defineProperty(rt,"serializeThemeGraph",{enumerable:!0,get:function(){return Hae.serializeThemeGraph}});var EB=xB();Object.defineProperty(rt,"getWebComponentMap",{enumerable:!0,get:function(){return EB.getWebComponentMap}});Object.defineProperty(rt,"findWebComponentReferences",{enumerable:!0,get:function(){return EB.findWebComponentReferences}});var xg=rT();Object.defineProperty(rt,"toCssSourceCode",{enumerable:!0,get:function(){return xg.toCssSourceCode}});Object.defineProperty(rt,"toJsSourceCode",{enumerable:!0,get:function(){return xg.toJsSourceCode}});Object.defineProperty(rt,"toSourceCode",{enumerable:!0,get:function(){return xg.toSourceCode}});Object.defineProperty(rt,"toSvgSourceCode",{enumerable:!0,get:function(){return xg.toSvgSourceCode}});$ae(kg(),rt)});var PB=x((hEe,dT)=>{"use strict";d();var it=ce("path"),OB=ce("os"),es=OB.homedir(),fT=OB.tmpdir(),{env:pc}=process,zae=e=>{let t=it.join(es,"Library");return{data:it.join(t,"Application Support",e),config:it.join(t,"Preferences",e),cache:it.join(t,"Caches",e),log:it.join(t,"Logs",e),temp:it.join(fT,e)}},Wae=e=>{let t=pc.APPDATA||it.join(es,"AppData","Roaming"),n=pc.LOCALAPPDATA||it.join(es,"AppData","Local");return{data:it.join(n,e,"Data"),config:it.join(t,e,"Config"),cache:it.join(n,e,"Cache"),log:it.join(n,e,"Log"),temp:it.join(fT,e)}},Gae=e=>{let t=it.basename(es);return{data:it.join(pc.XDG_DATA_HOME||it.join(es,".local","share"),e),config:it.join(pc.XDG_CONFIG_HOME||it.join(es,".config"),e),cache:it.join(pc.XDG_CACHE_HOME||it.join(es,".cache"),e),log:it.join(pc.XDG_STATE_HOME||it.join(es,".local","state"),e),temp:it.join(fT,t,e)}},NB=(e,t)=>{if(typeof e!="string")throw new TypeError(`Expected string, got ${typeof e}`);return t=Object.assign({suffix:"nodejs"},t),t.suffix&&(e+=`-${t.suffix}`),process.platform==="darwin"?zae(e):process.platform==="win32"?Wae(e):Gae(e)};dT.exports=NB;dT.exports.default=NB});var pT=x(Kn=>{"use strict";d();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.memoize=Kn.memo=Kn.tap=Kn.identity=Kn.noop=void 0;var Jae=()=>{};Kn.noop=Jae;var Kae=e=>e;Kn.identity=Kae;var Yae=e=>t=>(e(t),t);Kn.tap=Yae;var CB=tn();Object.defineProperty(Kn,"memo",{enumerable:!0,get:function(){return CB.memo}});Object.defineProperty(Kn,"memoize",{enumerable:!0,get:function(){return CB.memoize}})});var _T=x(Ae=>{"use strict";d();var Og=Ae&&Ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.Manifests=Ae.Resources=Ae.ThemeLiquidDocsSchemaRoot=Ae.ThemeLiquidDocsRoot=Ae.root=void 0;Ae.downloadSchema=LB;Ae.downloadResource=qB;Ae.download=mT;Ae.resourcePath=Eg;Ae.resourceUrl=Ag;Ae.schemaPath=gT;Ae.schemaUrl=yT;Ae.exists=IB;Ae.downloadThemeLiquidDocs=MB;Ae.replaceThemeLiquidDocs=toe;var Qae=Og(PB()),Xae=Og(mx()),gi=Og(ce("node:fs/promises")),hT=Og(ce("node:path")),Sl=pT(),Zae=(0,Qae.default)("theme-liquid-docs");Ae.root=Zae.cache;Ae.ThemeLiquidDocsRoot="https://raw.githubusercontent.com/Shopify/theme-liquid-docs/main";Ae.ThemeLiquidDocsSchemaRoot=`${Ae.ThemeLiquidDocsRoot}/schemas`;Ae.Resources=["filters","objects","tags","shopify_system_translations","manifest_theme","manifest_theme_app_extension"];Ae.Manifests={app:"manifest_theme_app_extension",theme:"manifest_theme"};var eoe={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 LB(e,t=Ae.root,n=Sl.noop){let r=yT(e),i=gT(e,t),s=await mT(r,n);return await gi.default.writeFile(i,s,"utf8"),s}async function qB(e,t=Ae.root,n=Sl.noop){let r=Ag(e),i=Eg(e,t),s=await mT(r,n);return await gi.default.writeFile(i,s,"utf8"),s}async function mT(e,t){if(e.startsWith("file:"))return await gi.default.readFile(e.replace(/^file:/,""),"utf8").then((0,Sl.tap)(()=>t(`Using local file: ${e}`))).catch(n=>{throw t(`Failed to read local file: ${e}`),n});{let n=await(0,Xae.default)(e);if(!n.ok)throw new Error(`${n.status} ${n.statusText}: ${e}`);return n.text()}}function Eg(e,t=Ae.root){return hT.default.join(t,`${e}.json`)}function Ag(e){let t=eoe[e];return`${process.env.SHOPIFY_TLD_ROOT?`file:${process.env.SHOPIFY_TLD_ROOT}`:Ae.ThemeLiquidDocsRoot}/${t}`}function gT(e,t=Ae.root){return hT.default.resolve(t,hT.default.basename(e))}function yT(e){return`${process.env.SHOPIFY_TLD_ROOT?`file:${process.env.SHOPIFY_TLD_ROOT}`:Ae.ThemeLiquidDocsRoot}/schemas/${e}`}async function IB(e){try{return await gi.default.stat(e),!0}catch{return!1}}async function MB(e,t){await IB(e)||await gi.default.mkdir(e);let n=["latest"].concat(Ae.Resources),r=await Promise.all(n.map(a=>qB(a,e,t).then((0,Sl.tap)(()=>t(`Successfully downloaded latest resource:
|
|
100
|
+
${Ag(a)}
|
|
101
|
+
> ${Eg(a,e)}`))).catch(o=>{throw t(`Failed to download latest resource:
|
|
102
|
+
${Ag(a)} to
|
|
103
|
+
${Eg(a,e)}
|
|
104
|
+
${o}`),o}))),s=Object.values(Ae.Manifests).map(a=>n.indexOf(a)).map(a=>r[a]).map(a=>JSON.parse(a)).flatMap(a=>a.schemas.map(o=>o.uri));await Promise.all(noe(s).map(a=>LB(a,e,t).then((0,Sl.tap)(()=>t(`Successfully downloaded schema:
|
|
105
|
+
${yT(a)}
|
|
106
|
+
> ${gT(a,e)}`))).catch(o=>{throw t(`Failed to download schema: ${a}, ${o}`),o})))}async function toe(e,t){let n=`${e}.${process.pid}.${Math.random().toString(36).slice(2)}`,r=`${n}.tmp`,i=`${n}.old`;try{await MB(r,t),await gi.default.rename(e,i).catch(s=>{if(s.code!=="ENOENT")throw s}),await gi.default.rename(r,e)}finally{await gi.default.rm(r,{recursive:!0,force:!0,maxRetries:3}),await gi.default.rm(i,{recursive:!0,force:!0,maxRetries:3})}}function noe(e){return[...new Set(e).values()]}});var jB=x(hc=>{"use strict";d();var RB=hc&&hc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hc,"__esModule",{value:!0});hc.ThemeLiquidDocsManager=void 0;var wl=RB(ce("node:fs/promises")),Ng=RB(ce("node:path")),On=_T(),un=pT(),vT=class{log;constructor(t=un.noop){this.log=t}filters=(0,un.memo)(async()=>ts(this.loaders("filters"),JSON.parse,[],this.log));objects=(0,un.memo)(async()=>ts(this.loaders("objects"),JSON.parse,[],this.log));liquidDrops=(0,un.memo)(async()=>ts(this.loaders("objects"),JSON.parse,[],this.log));tags=(0,un.memo)(async()=>ts(this.loaders("tags"),JSON.parse,[],this.log));systemTranslations=(0,un.memo)(async()=>ts(this.loaders("shopify_system_translations"),JSON.parse,{},this.log));schemas=(0,un.memoize)(t=>ts(this.loaders(On.Manifests[t]),JSON.parse,{schemas:[]},this.log).then(n=>Promise.all(n.schemas.map(async r=>({uri:`${On.ThemeLiquidDocsSchemaRoot}/${r.uri}`,fileMatch:r.fileMatch,schema:await ts(this.schemaLoaders(r.uri),un.identity,"",this.log)})))),un.identity);setup=(0,un.memo)(async()=>{try{await(0,On.exists)(On.root)||await wl.default.mkdir(On.root,{recursive:!0});let t=await this.latestRevision(),n=JSON.parse(await(0,On.download)((0,On.resourceUrl)("latest"),this.log)).revision??"";t!==n&&await(0,On.replaceThemeLiquidDocs)(On.root,this.log)}catch(t){t instanceof Error&&this.log(`Failed to setup with the following error: ${t.message}`);return}});async latestRevision(){return(await ts([Tl(()=>this.load("latest"),"loadLatestRevision")],JSON.parse,{},this.log)).revision??""}async loadResource(t){return await this.setup(),this.load(t).then((0,un.tap)(()=>this.log(`Loaded resource from ${(0,On.resourcePath)(t)}`)))}async load(t){return wl.default.readFile((0,On.resourcePath)(t),"utf8")}async loadSchema(t){return wl.default.readFile((0,On.schemaPath)(t),"utf8").then((0,un.tap)(()=>this.log(`Loaded schema from ${(0,On.schemaPath)(t)}`)))}loaders(t){return[Tl(()=>this.loadResource(t),`loadResource(${t})`),Tl(()=>roe(t,this.log),`fallbackResource(${t})`)]}schemaLoaders(t){return[Tl(()=>this.loadSchema(t),`loadSchema(${t})`),Tl(()=>ioe(t,this.log),`fallbackSchema(${t})`)]}};hc.ThemeLiquidDocsManager=vT;function Tl(e,t){return Object.assign(e,{loaderName:t})}async function ts(e,t,n,r){for(let i of e)try{return t(await i())}catch(s){r(`Failed to load or transform ${i.loaderName} with the following error:
|
|
107
|
+
${s instanceof Error?s.message:s}`);continue}return n}function DB(){return Ng.default.resolve(__dirname,"./data")}async function roe(e,t){let n=Ng.default.resolve(DB(),`${e}.json`);return wl.default.readFile(n,"utf8").then((0,un.tap)(()=>t(`Loaded fallback resource
|
|
108
|
+
${e} from
|
|
109
|
+
${n}`)))}async function ioe(e,t){let n=Ng.default.resolve(DB(),Ng.default.basename(e));return wl.default.readFile(n,"utf8").then((0,un.tap)(()=>t(`Loaded fallback schema
|
|
110
|
+
${e} from
|
|
111
|
+
${n}`)))}});var BB=x(Yn=>{"use strict";d();Object.defineProperty(Yn,"__esModule",{value:!0});Yn.root=Yn.downloadThemeLiquidDocs=Yn.downloadResource=Yn.Resources=Yn.ThemeLiquidDocsManager=void 0;var soe=jB();Object.defineProperty(Yn,"ThemeLiquidDocsManager",{enumerable:!0,get:function(){return soe.ThemeLiquidDocsManager}});var Pg=_T();Object.defineProperty(Yn,"Resources",{enumerable:!0,get:function(){return Pg.Resources}});Object.defineProperty(Yn,"downloadResource",{enumerable:!0,get:function(){return Pg.downloadResource}});Object.defineProperty(Yn,"downloadThemeLiquidDocs",{enumerable:!0,get:function(){return Pg.downloadThemeLiquidDocs}});Object.defineProperty(Yn,"root",{enumerable:!0,get:function(){return Pg.root}})});var FB=x(bT=>{d();var Ia=ce("path"),rs=process.platform==="win32",ns=ce("fs"),aoe=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function ooe(){var e;if(aoe){var t=new Error;e=n}else e=r;return e;function n(i){i&&(t.message=i.message,i=t,r(i))}function r(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 coe(e){return typeof e=="function"?e:ooe()}var wEe=Ia.normalize;rs?yi=/(.*?)(?:[\/\\]+|$)/g:yi=/(.*?)(?:[\/]+|$)/g;var yi;rs?xl=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:xl=/^[\/]*/;var xl;bT.realpathSync=function(t,n){if(t=Ia.resolve(t),n&&Object.prototype.hasOwnProperty.call(n,t))return n[t];var r=t,i={},s={},a,o,c,l;f();function f(){var _=xl.exec(t);a=_[0].length,o=_[0],c=_[0],l="",rs&&!s[c]&&(ns.lstatSync(c),s[c]=!0)}for(;a<t.length;){yi.lastIndex=a;var m=yi.exec(t);if(l=o,o+=m[0],c=l+m[1],a=yi.lastIndex,!(s[c]||n&&n[c]===c)){var p;if(n&&Object.prototype.hasOwnProperty.call(n,c))p=n[c];else{var g=ns.lstatSync(c);if(!g.isSymbolicLink()){s[c]=!0,n&&(n[c]=c);continue}var v=null;if(!rs){var b=g.dev.toString(32)+":"+g.ino.toString(32);i.hasOwnProperty(b)&&(v=i[b])}v===null&&(ns.statSync(c),v=ns.readlinkSync(c)),p=Ia.resolve(l,v),n&&(n[c]=p),rs||(i[b]=v)}t=Ia.resolve(p,t.slice(a)),f()}}return n&&(n[r]=t),t};bT.realpath=function(t,n,r){if(typeof r!="function"&&(r=coe(n),n=null),t=Ia.resolve(t),n&&Object.prototype.hasOwnProperty.call(n,t))return process.nextTick(r.bind(null,null,n[t]));var i=t,s={},a={},o,c,l,f;m();function m(){var _=xl.exec(t);o=_[0].length,c=_[0],l=_[0],f="",rs&&!a[l]?ns.lstat(l,function(k){if(k)return r(k);a[l]=!0,p()}):process.nextTick(p)}function p(){if(o>=t.length)return n&&(n[i]=t),r(null,t);yi.lastIndex=o;var _=yi.exec(t);return f=c,c+=_[0],l=f+_[1],o=yi.lastIndex,a[l]||n&&n[l]===l?process.nextTick(p):n&&Object.prototype.hasOwnProperty.call(n,l)?b(n[l]):ns.lstat(l,g)}function g(_,k){if(_)return r(_);if(!k.isSymbolicLink())return a[l]=!0,n&&(n[l]=l),process.nextTick(p);if(!rs){var w=k.dev.toString(32)+":"+k.ino.toString(32);if(s.hasOwnProperty(w))return v(null,s[w],l)}ns.stat(l,function(T){if(T)return r(T);ns.readlink(l,function(y,A){rs||(s[w]=A),v(y,A)})})}function v(_,k,w){if(_)return r(_);var T=Ia.resolve(f,k);n&&(n[w]=T),b(T)}function b(_){t=Ia.resolve(_,t.slice(o)),m()}}});var wT=x((AEe,HB)=>{d();HB.exports=is;is.realpath=is;is.sync=TT;is.realpathSync=TT;is.monkeypatch=loe;is.unmonkeypatch=foe;var mc=ce("fs"),kT=mc.realpath,ST=mc.realpathSync,uoe=process.version,VB=/^v[0-5]\./.test(uoe),$B=FB();function UB(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function is(e,t,n){if(VB)return kT(e,t,n);typeof t=="function"&&(n=t,t=null),kT(e,t,function(r,i){UB(r)?$B.realpath(e,t,n):n(r,i)})}function TT(e,t){if(VB)return ST(e,t);try{return ST(e,t)}catch(n){if(UB(n))return $B.realpathSync(e,t);throw n}}function loe(){mc.realpath=is,mc.realpathSync=TT}function foe(){mc.realpath=kT,mc.realpathSync=ST}});var WB=x((NEe,zB)=>{d();var doe=typeof process=="object"&&process&&process.platform==="win32";zB.exports=doe?{sep:"\\"}:{sep:"/"}});var Lg=x((LEe,NT)=>{d();var Nn=NT.exports=(e,t,n={})=>(Cg(t),!n.nocomment&&t.charAt(0)==="#"?!1:new gc(t,n).match(e));NT.exports=Nn;var AT=WB();Nn.sep=AT.sep;var nn=Symbol("globstar **");Nn.GLOBSTAR=nn;var poe=f3(),GB={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},OT="[^/]",xT=OT+"*?",hoe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",moe="(?:(?!(?:\\/|^)\\.).)*?",YB=e=>e.split("").reduce((t,n)=>(t[n]=!0,t),{}),JB=YB("().*{}+?[]^$\\!"),goe=YB("[.("),KB=/\/+/;Nn.filter=(e,t={})=>(n,r,i)=>Nn(n,e,t);var ss=(e,t={})=>{let n={};return Object.keys(e).forEach(r=>n[r]=e[r]),Object.keys(t).forEach(r=>n[r]=t[r]),n};Nn.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Nn;let t=Nn,n=(r,i,s)=>t(r,i,ss(e,s));return n.Minimatch=class extends t.Minimatch{constructor(i,s){super(i,ss(e,s))}},n.Minimatch.defaults=r=>t.defaults(ss(e,r)).Minimatch,n.filter=(r,i)=>t.filter(r,ss(e,i)),n.defaults=r=>t.defaults(ss(e,r)),n.makeRe=(r,i)=>t.makeRe(r,ss(e,i)),n.braceExpand=(r,i)=>t.braceExpand(r,ss(e,i)),n.match=(r,i,s)=>t.match(r,i,ss(e,s)),n};Nn.braceExpand=(e,t)=>QB(e,t);var QB=(e,t={})=>(Cg(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:poe(e)),yoe=1024*64,Cg=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>yoe)throw new TypeError("pattern is too long")},ET=Symbol("subparse");Nn.makeRe=(e,t)=>new gc(e,t||{}).makeRe();Nn.match=(e,t,n={})=>{let r=new gc(t,n);return e=e.filter(i=>r.match(i)),r.options.nonull&&!e.length&&e.push(t),e};var _oe=e=>e.replace(/\\(.)/g,"$1"),voe=e=>e.replace(/\\([^-\]])/g,"$1"),boe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),koe=e=>e.replace(/[[\]\\]/g,"\\$&"),gc=class{constructor(t,n){Cg(t),n||(n={}),this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion!==void 0?n.maxGlobstarRecursion:200,this.set=[],this.pattern=t,this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.make()}debug(){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate();let r=this.globSet=this.braceExpand();n.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,r),r=this.globParts=r.map(i=>i.split(KB)),this.debug(this.pattern,r),r=r.map((i,s,a)=>i.map(this.parse,this)),this.debug(this.pattern,r),r=r.filter(i=>i.indexOf(!1)===-1),this.debug(this.pattern,r),this.set=r}parseNegate(){if(this.options.nonegate)return;let t=this.pattern,n=!1,r=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r){return n.indexOf(nn)!==-1?this._matchGlobstar(t,n,r,0,0):this._matchOne(t,n,r,0,0)}_matchGlobstar(t,n,r,i,s){let a=-1;for(let w=s;w<n.length;w++)if(n[w]===nn){a=w;break}let o=-1;for(let w=n.length-1;w>=0;w--)if(n[w]===nn){o=w;break}let c=n.slice(s,a),l=r?n.slice(a+1):n.slice(a+1,o),f=r?[]:n.slice(o+1);if(c.length){let w=t.slice(i,i+c.length);if(!this._matchOne(w,c,r,0,0))return!1;i+=c.length}let m=0;if(f.length){if(f.length+i>t.length)return!1;let w=t.length-f.length;if(this._matchOne(t,f,r,w,0))m=f.length;else{if(t[t.length-1]!==""||i+f.length===t.length||!this._matchOne(t,f,r,w-1,0))return!1;m=f.length+1}}if(!l.length){let w=!!m;for(let T=i;T<t.length-m;T++){let y=String(t[T]);if(w=!0,y==="."||y===".."||!this.options.dot&&y.charAt(0)===".")return!1}return r||w}let p=[[[],0]],g=p[0],v=0,b=[0];for(let w of l)w===nn?(b.push(v),g=[[],0],p.push(g)):(g[0].push(w),v++);let _=p.length-1,k=t.length-m;for(let w of p)w[1]=k-(b[_--]+w[0].length);return!!this._matchGlobStarBodySections(t,p,i,0,r,0,!!m)}_matchGlobStarBodySections(t,n,r,i,s,a,o){let c=n[i];if(!c){for(let m=r;m<t.length;m++){o=!0;let p=t[m];if(p==="."||p===".."||!this.options.dot&&p.charAt(0)===".")return!1}return o}let[l,f]=c;for(;r<=f;){if(this._matchOne(t.slice(0,r+l.length),l,s,r,0)&&a<this.maxGlobstarRecursion){let g=this._matchGlobStarBodySections(t,n,r+l.length,i+1,s,a+1,o);if(g!==!1)return g}let p=t[r];if(p==="."||p===".."||!this.options.dot&&p.charAt(0)===".")return!1;r++}return s||null}_matchOne(t,n,r,i,s){let a,o,c,l;for(a=i,o=s,c=t.length,l=n.length;a<c&&o<l;a++,o++){this.debug("matchOne loop");let f=n[o],m=t[a];if(this.debug(n,f,m),f===!1||f===nn)return!1;let p;if(typeof f=="string"?(p=m===f,this.debug("string match",f,m,p)):(p=m.match(f),this.debug("pattern match",f,m,p)),!p)return!1}if(a===c&&o===l)return!0;if(a===c)return r;if(o===l)return a===c-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return QB(this.pattern,this.options)}parse(t,n){Cg(t);let r=this.options;if(t==="**")if(r.noglobstar)t="*";else return nn;if(t==="")return"";let i="",s=!1,a=!1,o=[],c=[],l,f=!1,m=-1,p=-1,g,v,b,_=t.charAt(0)===".",k=r.dot||_,w=()=>_?"":k?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",T=O=>O.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",y=()=>{if(l){switch(l){case"*":i+=xT,s=!0;break;case"?":i+=OT,s=!0;break;default:i+="\\"+l;break}this.debug("clearStateChar %j %j",l,i),l=!1}};for(let O=0,q;O<t.length&&(q=t.charAt(O));O++){if(this.debug("%s %s %s %j",t,O,i,q),a){if(q==="/")return!1;JB[q]&&(i+="\\"),i+=q,a=!1;continue}switch(q){case"/":return!1;case"\\":if(f&&t.charAt(O+1)==="-"){i+=q;continue}y(),a=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",t,O,i,q),f){this.debug(" in class"),q==="!"&&O===p+1&&(q="^"),i+=q;continue}if(q==="*"&&l==="*")continue;this.debug("call clearStateChar %j",l),y(),l=q,r.noext&&y();continue;case"(":{if(f){i+="(";continue}if(!l){i+="\\(";continue}let j={type:l,start:O-1,reStart:i.length,open:GB[l].open,close:GB[l].close};this.debug(this.pattern," ",j),o.push(j),i+=j.open,j.start===0&&j.type!=="!"&&(_=!0,i+=T(t.slice(O+1))),this.debug("plType %j %j",l,i),l=!1;continue}case")":{let j=o[o.length-1];if(f||!j){i+="\\)";continue}o.pop(),y(),s=!0,v=j,i+=v.close,v.type==="!"&&c.push(Object.assign(v,{reEnd:i.length}));continue}case"|":{let j=o[o.length-1];if(f||!j){i+="\\|";continue}y(),i+="|",j.start===0&&j.type!=="!"&&(_=!0,i+=T(t.slice(O+1)));continue}case"[":if(y(),f){i+="\\"+q;continue}f=!0,p=O,m=i.length,i+=q;continue;case"]":if(O===p+1||!f){i+="\\"+q;continue}g=t.substring(p+1,O);try{RegExp("["+koe(voe(g))+"]"),i+=q}catch{i=i.substring(0,m)+"(?:$.)"}s=!0,f=!1;continue;default:y(),JB[q]&&!(q==="^"&&f)&&(i+="\\"),i+=q;break}}for(f&&(g=t.slice(p+1),b=this.parse(g,ET),i=i.substring(0,m)+"\\["+b[0],s=s||b[1]),v=o.pop();v;v=o.pop()){let O;O=i.slice(v.reStart+v.open.length),this.debug("setting tail",i,v),O=O.replace(/((?:\\{2}){0,64})(\\?)\|/g,(j,M,C)=>(C||(C="\\"),M+M+C+"|")),this.debug(`tail=%j
|
|
112
|
+
%s`,O,O,v,i);let q=v.type==="*"?xT:v.type==="?"?OT:"\\"+v.type;s=!0,i=i.slice(0,v.reStart)+q+"\\("+O}y(),a&&(i+="\\\\");let A=goe[i.charAt(0)];for(let O=c.length-1;O>-1;O--){let q=c[O],j=i.slice(0,q.reStart),M=i.slice(q.reStart,q.reEnd-8),C=i.slice(q.reEnd),L=i.slice(q.reEnd-8,q.reEnd)+C,V=j.split(")").length,$=j.split("(").length-V,I=C;for(let U=0;U<$;U++)I=I.replace(/\)[+*?]?/,"");C=I;let B=C===""&&n!==ET?"(?:$|\\/)":"";i=j+M+C+B+L}if(i!==""&&s&&(i="(?=.)"+i),A&&(i=w()+i),n===ET)return[i,s];if(r.nocase&&!s&&(s=t.toUpperCase()!==t.toLowerCase()),!s)return _oe(t);let N=r.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",N),{_glob:t,_src:i})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?xT:n.dot?hoe:moe,i=n.nocase?"i":"",s=t.map(a=>(a=a.map(o=>typeof o=="string"?boe(o):o===nn?nn:o._src).reduce((o,c)=>(o[o.length-1]===nn&&c===nn||o.push(c),o),[]),a.forEach((o,c)=>{o!==nn||a[c-1]===nn||(c===0?a.length>1?a[c+1]="(?:\\/|"+r+"\\/)?"+a[c+1]:a[c]=r:c===a.length-1?a[c-1]+="(?:\\/|"+r+")?":(a[c-1]+="(?:\\/|\\/"+r+"\\/)"+a[c+1],a[c+1]=nn))}),a.filter(o=>o!==nn).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,i)}catch{this.regexp=!1}return this.regexp}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;AT.sep!=="/"&&(t=t.split(AT.sep).join("/")),t=t.split(KB),this.debug(this.pattern,"split",t);let i=this.set;this.debug(this.pattern,"set",i);let s;for(let a=t.length-1;a>=0&&(s=t[a],!s);a--);for(let a=0;a<i.length;a++){let o=i[a],c=t;if(r.matchBase&&o.length===1&&(c=[s]),this.matchOne(c,o,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return Nn.defaults(t).Minimatch}};Nn.Minimatch=gc});var XB=x((IEe,PT)=>{d();typeof Object.create=="function"?PT.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:PT.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}}});var ZB=x((REe,LT)=>{d();try{if(CT=ce("util"),typeof CT.inherits!="function")throw"";LT.exports=CT.inherits}catch{LT.exports=XB()}var CT});var IT=x(as=>{d();as.setopts=Aoe;as.ownProp=eF;as.makeAbs=El;as.finish=Ooe;as.mark=Noe;as.isIgnored=nF;as.childrenIgnored=Poe;function eF(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Soe=ce("fs"),Ma=ce("path"),Toe=Lg(),tF=ce("path").isAbsolute,qT=Toe.Minimatch;function woe(e,t){return e.localeCompare(t,"en")}function xoe(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]),e.ignore.length&&(e.ignore=e.ignore.map(Eoe))}function Eoe(e){var t=null;if(e.slice(-3)==="/**"){var n=e.replace(/(\/\*\*)+$/,"");t=new qT(n,{dot:!0})}return{matcher:new qT(e,{dot:!0}),gmatcher:t}}function Aoe(e,t,n){if(n||(n={}),n.matchBase&&t.indexOf("/")===-1){if(n.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,e.windowsPathsNoEscape&&(t=t.replace(/\\/g,"/")),e.silent=!!n.silent,e.pattern=t,e.strict=n.strict!==!1,e.realpath=!!n.realpath,e.realpathCache=n.realpathCache||Object.create(null),e.follow=!!n.follow,e.dot=!!n.dot,e.mark=!!n.mark,e.nodir=!!n.nodir,e.nodir&&(e.mark=!0),e.sync=!!n.sync,e.nounique=!!n.nounique,e.nonull=!!n.nonull,e.nosort=!!n.nosort,e.nocase=!!n.nocase,e.stat=!!n.stat,e.noprocess=!!n.noprocess,e.absolute=!!n.absolute,e.fs=n.fs||Soe,e.maxLength=n.maxLength||1/0,e.cache=n.cache||Object.create(null),e.statCache=n.statCache||Object.create(null),e.symlinks=n.symlinks||Object.create(null),xoe(e,n),e.changedCwd=!1;var r=process.cwd();eF(n,"cwd")?(e.cwd=Ma.resolve(n.cwd),e.changedCwd=e.cwd!==r):e.cwd=Ma.resolve(r),e.root=n.root||Ma.resolve(e.cwd,"/"),e.root=Ma.resolve(e.root),e.cwdAbs=tF(e.cwd)?e.cwd:El(e,e.cwd),e.nomount=!!n.nomount,process.platform==="win32"&&(e.root=e.root.replace(/\\/g,"/"),e.cwd=e.cwd.replace(/\\/g,"/"),e.cwdAbs=e.cwdAbs.replace(/\\/g,"/")),n.nonegate=!0,n.nocomment=!0,e.minimatch=new qT(t,n),e.options=e.minimatch.options}function Ooe(e){for(var t=e.nounique,n=t?[]:Object.create(null),r=0,i=e.matches.length;r<i;r++){var s=e.matches[r];if(!s||Object.keys(s).length===0){if(e.nonull){var a=e.minimatch.globSet[r];t?n.push(a):n[a]=!0}}else{var o=Object.keys(s);t?n.push.apply(n,o):o.forEach(function(c){n[c]=!0})}}if(t||(n=Object.keys(n)),e.nosort||(n=n.sort(woe)),e.mark){for(var r=0;r<n.length;r++)n[r]=e._mark(n[r]);e.nodir&&(n=n.filter(function(c){var l=!/\/$/.test(c),f=e.cache[c]||e.cache[El(e,c)];return l&&f&&(l=f!=="DIR"&&!Array.isArray(f)),l}))}e.ignore.length&&(n=n.filter(function(c){return!nF(e,c)})),e.found=n}function Noe(e,t){var n=El(e,t),r=e.cache[n],i=t;if(r){var s=r==="DIR"||Array.isArray(r),a=t.slice(-1)==="/";if(s&&!a?i+="/":!s&&a&&(i=i.slice(0,-1)),i!==t){var o=El(e,i);e.statCache[o]=e.statCache[n],e.cache[o]=e.cache[n]}}return i}function El(e,t){var n=t;return t.charAt(0)==="/"?n=Ma.join(e.root,t):tF(t)||t===""?n=t:e.changedCwd?n=Ma.resolve(e.cwd,t):n=Ma.resolve(t),process.platform==="win32"&&(n=n.replace(/\\/g,"/")),n}function nF(e,t){return e.ignore.length?e.ignore.some(function(n){return n.matcher.match(t)||!!(n.gmatcher&&n.gmatcher.match(t))}):!1}function Poe(e,t){return e.ignore.length?e.ignore.some(function(n){return!!(n.gmatcher&&n.gmatcher.match(t))}):!1}});var oF=x((UEe,aF)=>{d();aF.exports=sF;sF.GlobSync=_t;var Coe=wT(),rF=Lg(),FEe=rF.Minimatch,VEe=Ig().Glob,$Ee=ce("util"),MT=ce("path"),iF=ce("assert"),qg=ce("path").isAbsolute,Ra=IT(),Loe=Ra.setopts,RT=Ra.ownProp,qoe=Ra.childrenIgnored,Ioe=Ra.isIgnored;function sF(e,t){if(typeof t=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
|
|
113
|
+
See: https://github.com/isaacs/node-glob/issues/167`);return new _t(e,t).found}function _t(e,t){if(!e)throw new Error("must provide pattern");if(typeof t=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
|
|
114
|
+
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof _t))return new _t(e,t);if(Loe(this,e,t),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var r=0;r<n;r++)this._process(this.minimatch.set[r],r,!1);this._finish()}_t.prototype._finish=function(){if(iF.ok(this instanceof _t),this.realpath){var e=this;this.matches.forEach(function(t,n){var r=e.matches[n]=Object.create(null);for(var i in t)try{i=e._makeAbs(i);var s=Coe.realpathSync(i,e.realpathCache);r[s]=!0}catch(a){if(a.syscall==="stat")r[e._makeAbs(i)]=!0;else throw a}})}Ra.finish(this)};_t.prototype._process=function(e,t,n){iF.ok(this instanceof _t);for(var r=0;typeof e[r]=="string";)r++;var i;switch(r){case e.length:this._processSimple(e.join("/"),t);return;case 0:i=null;break;default:i=e.slice(0,r).join("/");break}var s=e.slice(r),a;i===null?a=".":((qg(i)||qg(e.map(function(l){return typeof l=="string"?l:"[*]"}).join("/")))&&(!i||!qg(i))&&(i="/"+i),a=i);var o=this._makeAbs(a);if(!qoe(this,a)){var c=s[0]===rF.GLOBSTAR;c?this._processGlobStar(i,a,o,s,t,n):this._processReaddir(i,a,o,s,t,n)}};_t.prototype._processReaddir=function(e,t,n,r,i,s){var a=this._readdir(n,s);if(a){for(var o=r[0],c=!!this.minimatch.negate,l=o._glob,f=this.dot||l.charAt(0)===".",m=[],p=0;p<a.length;p++){var g=a[p];if(g.charAt(0)!=="."||f){var v;c&&!e?v=!g.match(o):v=g.match(o),v&&m.push(g)}}var b=m.length;if(b!==0){if(r.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var p=0;p<b;p++){var g=m[p];e&&(e.slice(-1)!=="/"?g=e+"/"+g:g=e+g),g.charAt(0)==="/"&&!this.nomount&&(g=MT.join(this.root,g)),this._emitMatch(i,g)}return}r.shift();for(var p=0;p<b;p++){var g=m[p],_;e?_=[e,g]:_=[g],this._process(_.concat(r),i,s)}}}};_t.prototype._emitMatch=function(e,t){if(!Ioe(this,t)){var n=this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=n),!this.matches[e][t]){if(this.nodir){var r=this.cache[n];if(r==="DIR"||Array.isArray(r))return}this.matches[e][t]=!0,this.stat&&this._stat(t)}}};_t.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var t,n,r;try{n=this.fs.lstatSync(e)}catch(s){if(s.code==="ENOENT")return null}var i=n&&n.isSymbolicLink();return this.symlinks[e]=i,!i&&n&&!n.isDirectory()?this.cache[e]="FILE":t=this._readdir(e,!1),t};_t.prototype._readdir=function(e,t){var n;if(t&&!RT(this.symlinks,e))return this._readdirInGlobStar(e);if(RT(this.cache,e)){var r=this.cache[e];if(!r||r==="FILE")return null;if(Array.isArray(r))return r}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(i){return this._readdirError(e,i),null}};_t.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat)for(var n=0;n<t.length;n++){var r=t[n];e==="/"?r=e+r:r=e+"/"+r,this.cache[r]=!0}return this.cache[e]=t,t};_t.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);if(this.cache[n]="FILE",n===this.cwdAbs){var r=new Error(t.code+" invalid cwd "+this.cwd);throw r.path=this.cwd,r.code=t.code,r}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw t;this.silent||console.error("glob error",t);break}};_t.prototype._processGlobStar=function(e,t,n,r,i,s){var a=this._readdir(n,s);if(a){var o=r.slice(1),c=e?[e]:[],l=c.concat(o);this._process(l,i,!1);var f=a.length,m=this.symlinks[n];if(!(m&&s))for(var p=0;p<f;p++){var g=a[p];if(!(g.charAt(0)==="."&&!this.dot)){var v=c.concat(a[p],o);this._process(v,i,!0);var b=c.concat(a[p],r);this._process(b,i,!0)}}}};_t.prototype._processSimple=function(e,t){var n=this._stat(e);if(this.matches[t]||(this.matches[t]=Object.create(null)),!!n){if(e&&qg(e)&&!this.nomount){var r=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=MT.join(this.root,e):(e=MT.resolve(this.root,e),r&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e)}};_t.prototype._stat=function(e){var t=this._makeAbs(e),n=e.slice(-1)==="/";if(e.length>this.maxLength)return!1;if(!this.stat&&RT(this.cache,t)){var a=this.cache[t];if(Array.isArray(a)&&(a="DIR"),!n||a==="DIR")return a;if(n&&a==="FILE")return!1}var r,i=this.statCache[t];if(!i){var s;try{s=this.fs.lstatSync(t)}catch(o){if(o&&(o.code==="ENOENT"||o.code==="ENOTDIR"))return this.statCache[t]=!1,!1}if(s&&s.isSymbolicLink())try{i=this.fs.statSync(t)}catch{i=s}else i=s}this.statCache[t]=i;var a=!0;return i&&(a=i.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||a,n&&a==="FILE"?!1:a};_t.prototype._mark=function(e){return Ra.mark(this,e)};_t.prototype._makeAbs=function(e){return Ra.makeAbs(this,e)}});var uF=x((zEe,cF)=>{d();var Moe=d3(),Al=Object.create(null),Roe=gx();cF.exports=Moe(Doe);function Doe(e,t){return Al[e]?(Al[e].push(t),null):(Al[e]=[t],joe(e))}function joe(e){return Roe(function t(){var n=Al[e],r=n.length,i=Boe(arguments);try{for(var s=0;s<r;s++)n[s].apply(null,i)}finally{n.length>r?(n.splice(0,r),process.nextTick(function(){t.apply(null,i)})):delete Al[e]}})}function Boe(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r]=e[r];return n}});var Ig=x((KEe,fF)=>{d();fF.exports=Da;var Foe=wT(),lF=Lg(),GEe=lF.Minimatch,Voe=ZB(),$oe=ce("events").EventEmitter,DT=ce("path"),jT=ce("assert"),Ol=ce("path").isAbsolute,FT=oF(),ja=IT(),Uoe=ja.setopts,BT=ja.ownProp,VT=uF(),JEe=ce("util"),Hoe=ja.childrenIgnored,zoe=ja.isIgnored,Woe=gx();function Da(e,t,n){if(typeof t=="function"&&(n=t,t={}),t||(t={}),t.sync){if(n)throw new TypeError("callback provided to sync glob");return FT(e,t)}return new Ie(e,t,n)}Da.sync=FT;var Goe=Da.GlobSync=FT.GlobSync;Da.glob=Da;function Joe(e,t){if(t===null||typeof t!="object")return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}Da.hasMagic=function(e,t){var n=Joe({},t);n.noprocess=!0;var r=new Ie(e,n),i=r.minimatch.set;if(!e)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};Da.Glob=Ie;Voe(Ie,$oe);function Ie(e,t,n){if(typeof t=="function"&&(n=t,t=null),t&&t.sync){if(n)throw new TypeError("callback provided to sync glob");return new Goe(e,t)}if(!(this instanceof Ie))return new Ie(e,t,n);Uoe(this,e,t),this._didRealPath=!1;var r=this.minimatch.set.length;this.matches=new Array(r),typeof n=="function"&&(n=Woe(n),this.on("error",n),this.on("end",function(c){n(null,c)}));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(r===0)return o();for(var s=!0,a=0;a<r;a++)this._process(this.minimatch.set[a],a,!1,o);s=!1;function o(){--i._processing,i._processing<=0&&(s?process.nextTick(function(){i._finish()}):i._finish())}}Ie.prototype._finish=function(){if(jT(this instanceof Ie),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();ja.finish(this),this.emit("end",this.found)}};Ie.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var e=this.matches.length;if(e===0)return this._finish();for(var t=this,n=0;n<this.matches.length;n++)this._realpathSet(n,r);function r(){--e===0&&t._finish()}};Ie.prototype._realpathSet=function(e,t){var n=this.matches[e];if(!n)return t();var r=Object.keys(n),i=this,s=r.length;if(s===0)return t();var a=this.matches[e]=Object.create(null);r.forEach(function(o,c){o=i._makeAbs(o),Foe.realpath(o,i.realpathCache,function(l,f){l?l.syscall==="stat"?a[o]=!0:i.emit("error",l):a[f]=!0,--s===0&&(i.matches[e]=a,t())})})};Ie.prototype._mark=function(e){return ja.mark(this,e)};Ie.prototype._makeAbs=function(e){return ja.makeAbs(this,e)};Ie.prototype.abort=function(){this.aborted=!0,this.emit("abort")};Ie.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};Ie.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var n=e[t];this._emitMatch(n[0],n[1])}}if(this._processQueue.length){var r=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<r.length;t++){var i=r[t];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}};Ie.prototype._process=function(e,t,n,r){if(jT(this instanceof Ie),jT(typeof r=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([e,t,n,r]);return}for(var i=0;typeof e[i]=="string";)i++;var s;switch(i){case e.length:this._processSimple(e.join("/"),t,r);return;case 0:s=null;break;default:s=e.slice(0,i).join("/");break}var a=e.slice(i),o;s===null?o=".":((Ol(s)||Ol(e.map(function(f){return typeof f=="string"?f:"[*]"}).join("/")))&&(!s||!Ol(s))&&(s="/"+s),o=s);var c=this._makeAbs(o);if(Hoe(this,o))return r();var l=a[0]===lF.GLOBSTAR;l?this._processGlobStar(s,o,c,a,t,n,r):this._processReaddir(s,o,c,a,t,n,r)}};Ie.prototype._processReaddir=function(e,t,n,r,i,s,a){var o=this;this._readdir(n,s,function(c,l){return o._processReaddir2(e,t,n,r,i,s,l,a)})};Ie.prototype._processReaddir2=function(e,t,n,r,i,s,a,o){if(!a)return o();for(var c=r[0],l=!!this.minimatch.negate,f=c._glob,m=this.dot||f.charAt(0)===".",p=[],g=0;g<a.length;g++){var v=a[g];if(v.charAt(0)!=="."||m){var b;l&&!e?b=!v.match(c):b=v.match(c),b&&p.push(v)}}var _=p.length;if(_===0)return o();if(r.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var g=0;g<_;g++){var v=p[g];e&&(e!=="/"?v=e+"/"+v:v=e+v),v.charAt(0)==="/"&&!this.nomount&&(v=DT.join(this.root,v)),this._emitMatch(i,v)}return o()}r.shift();for(var g=0;g<_;g++){var v=p[g],k;e&&(e!=="/"?v=e+"/"+v:v=e+v),this._process([v].concat(r),i,s,o)}o()};Ie.prototype._emitMatch=function(e,t){if(!this.aborted&&!zoe(this,t)){if(this.paused){this._emitQueue.push([e,t]);return}var n=Ol(t)?t:this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=n),!this.matches[e][t]){if(this.nodir){var r=this.cache[n];if(r==="DIR"||Array.isArray(r))return}this.matches[e][t]=!0;var i=this.statCache[n];i&&this.emit("stat",t,i),this.emit("match",t)}}};Ie.prototype._readdirInGlobStar=function(e,t){if(this.aborted)return;if(this.follow)return this._readdir(e,!1,t);var n="lstat\0"+e,r=this,i=VT(n,s);i&&r.fs.lstat(e,i);function s(a,o){if(a&&a.code==="ENOENT")return t();var c=o&&o.isSymbolicLink();r.symlinks[e]=c,!c&&o&&!o.isDirectory()?(r.cache[e]="FILE",t()):r._readdir(e,!1,t)}};Ie.prototype._readdir=function(e,t,n){if(!this.aborted&&(n=VT("readdir\0"+e+"\0"+t,n),!!n)){if(t&&!BT(this.symlinks,e))return this._readdirInGlobStar(e,n);if(BT(this.cache,e)){var r=this.cache[e];if(!r||r==="FILE")return n();if(Array.isArray(r))return n(null,r)}var i=this;i.fs.readdir(e,Koe(this,e,n))}};function Koe(e,t,n){return function(r,i){r?e._readdirError(t,r,n):e._readdirEntries(t,i,n)}}Ie.prototype._readdirEntries=function(e,t,n){if(!this.aborted){if(!this.mark&&!this.stat)for(var r=0;r<t.length;r++){var i=t[r];e==="/"?i=e+i:i=e+"/"+i,this.cache[i]=!0}return this.cache[e]=t,n(null,t)}};Ie.prototype._readdirError=function(e,t,n){if(!this.aborted){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);if(this.cache[r]="FILE",r===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=t.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",t),this.abort()),this.silent||console.error("glob error",t);break}return n()}};Ie.prototype._processGlobStar=function(e,t,n,r,i,s,a){var o=this;this._readdir(n,s,function(c,l){o._processGlobStar2(e,t,n,r,i,s,l,a)})};Ie.prototype._processGlobStar2=function(e,t,n,r,i,s,a,o){if(!a)return o();var c=r.slice(1),l=e?[e]:[],f=l.concat(c);this._process(f,i,!1,o);var m=this.symlinks[n],p=a.length;if(m&&s)return o();for(var g=0;g<p;g++){var v=a[g];if(!(v.charAt(0)==="."&&!this.dot)){var b=l.concat(a[g],c);this._process(b,i,!0,o);var _=l.concat(a[g],r);this._process(_,i,!0,o)}}o()};Ie.prototype._processSimple=function(e,t,n){var r=this;this._stat(e,function(i,s){r._processSimple2(e,t,i,s,n)})};Ie.prototype._processSimple2=function(e,t,n,r,i){if(this.matches[t]||(this.matches[t]=Object.create(null)),!r)return i();if(e&&Ol(e)&&!this.nomount){var s=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=DT.join(this.root,e):(e=DT.resolve(this.root,e),s&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e),i()};Ie.prototype._stat=function(e,t){var n=this._makeAbs(e),r=e.slice(-1)==="/";if(e.length>this.maxLength)return t();if(!this.stat&&BT(this.cache,n)){var i=this.cache[n];if(Array.isArray(i)&&(i="DIR"),!r||i==="DIR")return t(null,i);if(r&&i==="FILE")return t()}var s,a=this.statCache[n];if(a!==void 0){if(a===!1)return t(null,a);var o=a.isDirectory()?"DIR":"FILE";return r&&o==="FILE"?t():t(null,o,a)}var c=this,l=VT("stat\0"+n,f);l&&c.fs.lstat(n,l);function f(m,p){if(p&&p.isSymbolicLink())return c.fs.stat(n,function(g,v){g?c._stat2(e,n,null,p,t):c._stat2(e,n,g,v,t)});c._stat2(e,n,m,p,t)}};Ie.prototype._stat2=function(e,t,n,r,i){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return this.statCache[t]=!1,i();var s=e.slice(-1)==="/";if(this.statCache[t]=r,t.slice(-1)==="/"&&r&&!r.isDirectory())return i(null,!1,r);var a=!0;return r&&(a=r.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||a,s&&a==="FILE"?i():i(null,a,r)}});var dF=x(yc=>{"use strict";d();Object.defineProperty(yc,"__esModule",{value:!0});yc.saveToDiskFixApplicator=void 0;yc.autofix=Xoe;var Yoe=ce("fs/promises"),$T=tn(),Qoe=async(e,t)=>{let n=(0,$T.applyFixToString)(e.source,t);await(0,Yoe.writeFile)($T.path.fsPath(e.uri),n,"utf8")};yc.saveToDiskFixApplicator=Qoe;async function Xoe(e,t){await(0,$T.autofix)(e,t,yc.saveToDiskFixApplicator)}});var UT=x(Nl=>{"use strict";d();var Zoe=Nl&&Nl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nl,"__esModule",{value:!0});Nl.fileExists=tce;var ece=Zoe(ce("node:fs/promises"));async function tce(e){try{return await ece.default.stat(e),!0}catch{return!1}}});var hF=x(_c=>{"use strict";d();var pF=_c&&_c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_c,"__esModule",{value:!0});_c.thisNodeModuleRoot=void 0;var tAe=pF(ce("node:path")),nce=pF(ce("node:os")),rce=()=>nce.default.tmpdir();_c.thisNodeModuleRoot=rce});var yF=x(vc=>{"use strict";d();var ice=vc&&vc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vc,"__esModule",{value:!0});vc.loadThirdPartyChecks=cce;vc.findThirdPartyChecks=uce;var sce=ice(Ig()),ace=ce("node:util"),oce=(0,ace.promisify)(sce.default);function cce(e=[]){let t=new Set;for(let n of e)try{let i=ce(n).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)lce(s)?t.add(s):console.error(`Expected ${s} to be a CheckDefinition, but it looks like it isn't`)}catch(r){console.error(`Error loading ${n}, ignoring it.
|
|
115
|
+
${r}`)}return[...t]}async function uce(e){let t=[mF(e.replace(/\\/g,"/"),"/node_modules/theme-check-*/"),mF(e.replace(/\\/g,"/"),"/node_modules/@*/theme-check-*/")];return(await Promise.all(t.map(r=>oce(r)))).flat().filter(r=>!/\@shopify\/theme-check-(node|common|browser|docs-updater)/.test(r)&&!/theme-check-vscode/.test(r))}function mF(...e){return e.flatMap(t=>t.replace(/\\/g,"/").replace(/\/+$/,"")).join("/")}function gF(e){return e!==null&&typeof e=="object"}function lce(e){return gF(e)&&"meta"in e&&"create"in e&&gF(e.meta)&&"code"in e.meta}});var vF=x(Cl=>{"use strict";d();var fce=Cl&&Cl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cl,"__esModule",{value:!0});Cl.loadConfigDescription=mce;var zT=tn(),Pl=fce(ce("node:path")),_F=UT(),dce=hF(),HT=yF(),pce=ju(),hce=e=>e.flat();async function mce(e,t,n={}){let r=await Sce(t),i=await Promise.all([(0,HT.findThirdPartyChecks)((0,dce.thisNodeModuleRoot)()),(0,HT.findThirdPartyChecks)(r)]).then(hce),s=[...e.require.map(m=>({source:"require",path:m})),...i.map(m=>({source:"discovery",path:m}))].filter((m,p,g)=>g.findIndex(({path:v})=>v===m.path)===p),a=s.length>0&&await n.authorizeCustomChecks?.({root:t,candidates:s})===!0;if(s.length>0&&!a){let m={code:"custom-checks-disabled",level:"warning",message:"Custom Theme Checks are disabled. Explicit authorization is required to execute custom check JavaScript.",root:t,candidates:s};n.onDiagnostic?n.onDiagnostic(m):console.error(m.message)}let o=a?(0,HT.loadThirdPartyChecks)(s.map(({path:m})=>m)):[],c=zT.allChecks.concat(o),l=c.filter(yce(e)),f=pce.URI.file(t);return{settings:vce(e.checkSettings,c),context:e.context??"theme",checks:l,ignore:e.ignore,rootUri:gce(f,e.root)}}function gce(e,t){if(t===void 0)return zT.path.normalize(e);if(Pl.default.isAbsolute(t))throw new Error('the "root" property can only be relative');return zT.path.resolve(e,t)}var yce=e=>t=>{let n=e.checkSettings[t.meta.code]??_ce(e,t);return n?n.enabled:!1};function _ce(e,t){if(!t.meta.aliases)return;let n=t.meta.aliases.find(r=>e.checkSettings[r]);if(n)return e.checkSettings[n]}function vce(e,t){return Object.fromEntries(Object.entries(e).flatMap(([n,r])=>{let i=bce(n,t);return i===void 0?[]:[[i,r]]}))}function bce(e,t){return t.find(r=>r.meta.code===e||r.meta.aliases?.find(i=>i===e))?.meta.code}async function kce(e){if(Pl.default.dirname(e)===e)return!0;let[t,n]=await Promise.all([(0,_F.fileExists)(Pl.default.join(e,"node_modules")),(0,_F.fileExists)(Pl.default.join(e,".git"))]);return t||n}async function Sce(e){let t=e;for(;!await kce(t);)t=Pl.default.dirname(t);return t}});var Ee=x(Bt=>{"use strict";d();var WT=Symbol.for("yaml.alias"),bF=Symbol.for("yaml.document"),Mg=Symbol.for("yaml.map"),kF=Symbol.for("yaml.pair"),GT=Symbol.for("yaml.scalar"),Rg=Symbol.for("yaml.seq"),_i=Symbol.for("yaml.node.type"),Tce=e=>!!e&&typeof e=="object"&&e[_i]===WT,wce=e=>!!e&&typeof e=="object"&&e[_i]===bF,xce=e=>!!e&&typeof e=="object"&&e[_i]===Mg,Ece=e=>!!e&&typeof e=="object"&&e[_i]===kF,SF=e=>!!e&&typeof e=="object"&&e[_i]===GT,Ace=e=>!!e&&typeof e=="object"&&e[_i]===Rg;function TF(e){if(e&&typeof e=="object")switch(e[_i]){case Mg:case Rg:return!0}return!1}function Oce(e){if(e&&typeof e=="object")switch(e[_i]){case WT:case Mg:case GT:case Rg:return!0}return!1}var Nce=e=>(SF(e)||TF(e))&&!!e.anchor;Bt.ALIAS=WT;Bt.DOC=bF;Bt.MAP=Mg;Bt.NODE_TYPE=_i;Bt.PAIR=kF;Bt.SCALAR=GT;Bt.SEQ=Rg;Bt.hasAnchor=Nce;Bt.isAlias=Tce;Bt.isCollection=TF;Bt.isDocument=wce;Bt.isMap=xce;Bt.isNode=Oce;Bt.isPair=Ece;Bt.isScalar=SF;Bt.isSeq=Ace});var Ll=x(JT=>{"use strict";d();var vt=Ee(),ln=Symbol("break visit"),wF=Symbol("skip children"),Vr=Symbol("remove node");function Dg(e,t){let n=xF(t);vt.isDocument(e)?bc(null,e.contents,n,Object.freeze([e]))===Vr&&(e.contents=null):bc(null,e,n,Object.freeze([]))}Dg.BREAK=ln;Dg.SKIP=wF;Dg.REMOVE=Vr;function bc(e,t,n,r){let i=EF(e,t,n,r);if(vt.isNode(i)||vt.isPair(i))return AF(e,r,i),bc(e,i,n,r);if(typeof i!="symbol"){if(vt.isCollection(t)){r=Object.freeze(r.concat(t));for(let s=0;s<t.items.length;++s){let a=bc(s,t.items[s],n,r);if(typeof a=="number")s=a-1;else{if(a===ln)return ln;a===Vr&&(t.items.splice(s,1),s-=1)}}}else if(vt.isPair(t)){r=Object.freeze(r.concat(t));let s=bc("key",t.key,n,r);if(s===ln)return ln;s===Vr&&(t.key=null);let a=bc("value",t.value,n,r);if(a===ln)return ln;a===Vr&&(t.value=null)}}return i}async function jg(e,t){let n=xF(t);vt.isDocument(e)?await kc(null,e.contents,n,Object.freeze([e]))===Vr&&(e.contents=null):await kc(null,e,n,Object.freeze([]))}jg.BREAK=ln;jg.SKIP=wF;jg.REMOVE=Vr;async function kc(e,t,n,r){let i=await EF(e,t,n,r);if(vt.isNode(i)||vt.isPair(i))return AF(e,r,i),kc(e,i,n,r);if(typeof i!="symbol"){if(vt.isCollection(t)){r=Object.freeze(r.concat(t));for(let s=0;s<t.items.length;++s){let a=await kc(s,t.items[s],n,r);if(typeof a=="number")s=a-1;else{if(a===ln)return ln;a===Vr&&(t.items.splice(s,1),s-=1)}}}else if(vt.isPair(t)){r=Object.freeze(r.concat(t));let s=await kc("key",t.key,n,r);if(s===ln)return ln;s===Vr&&(t.key=null);let a=await kc("value",t.value,n,r);if(a===ln)return ln;a===Vr&&(t.value=null)}}return i}function xF(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function EF(e,t,n,r){if(typeof n=="function")return n(e,t,r);if(vt.isMap(t))return n.Map?.(e,t,r);if(vt.isSeq(t))return n.Seq?.(e,t,r);if(vt.isPair(t))return n.Pair?.(e,t,r);if(vt.isScalar(t))return n.Scalar?.(e,t,r);if(vt.isAlias(t))return n.Alias?.(e,t,r)}function AF(e,t,n){let r=t[t.length-1];if(vt.isCollection(r))r.items[e]=n;else if(vt.isPair(r))e==="key"?r.key=n:r.value=n;else if(vt.isDocument(r))r.contents=n;else{let i=vt.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}JT.visit=Dg;JT.visitAsync=jg});var KT=x(NF=>{"use strict";d();var OF=Ee(),Pce=Ll(),Cce={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Lce=e=>e.replace(/[!,[\]{}]/g,t=>Cce[t]),ql=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[s,a]=r;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let a=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,a),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let a=t.slice(2,-1);return a==="!"||a==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),a)}let[,r,i]=t.match(/^(.*!)([^!]*)$/s);i||n(`The ${t} tag has no suffix`);let s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(a){return n(String(a)),null}return r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+Lce(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),i;if(t&&r.length>0&&OF.isNode(t.contents)){let s={};Pce.visit(t.contents,(a,o)=>{OF.isNode(o)&&o.tag&&(s[o.tag]=!0)}),i=Object.keys(s)}else i=[];for(let[s,a]of r)s==="!!"&&a==="tag:yaml.org,2002:"||(!t||i.some(o=>o.startsWith(a)))&&n.push(`%TAG ${s} ${a}`);return n.join(`
|
|
116
|
+
`)}};ql.defaultYaml={explicit:!1,version:"1.2"};ql.defaultTags={"!!":"tag:yaml.org,2002:"};NF.Directives=ql});var Bg=x(Il=>{"use strict";d();var PF=Ee(),qce=Ll();function Ice(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function CF(e){let t=new Set;return qce.visit(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function LF(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function Mce(e,t){let n=[],r=new Map,i=null;return{onAnchor:s=>{n.push(s),i??(i=CF(e));let a=LF(t,i);return i.add(a),a},setAnchors:()=>{for(let s of n){let a=r.get(s);if(typeof a=="object"&&a.anchor&&(PF.isScalar(a.node)||PF.isCollection(a.node)))a.node.anchor=a.anchor;else{let o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=s,o}}},sourceObjects:r}}Il.anchorIsValid=Ice;Il.anchorNames=CF;Il.createNodeAnchors=Mce;Il.findNewAnchor=LF});var YT=x(qF=>{"use strict";d();function Ml(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){let a=r[i],o=Ml(e,r,String(i),a);o===void 0?delete r[i]:o!==a&&(r[i]=o)}else if(r instanceof Map)for(let i of Array.from(r.keys())){let s=r.get(i),a=Ml(e,r,i,s);a===void 0?r.delete(i):a!==s&&r.set(i,a)}else if(r instanceof Set)for(let i of Array.from(r)){let s=Ml(e,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(let[i,s]of Object.entries(r)){let a=Ml(e,r,i,s);a===void 0?delete r[i]:a!==s&&(r[i]=a)}return e.call(t,n,r)}qF.applyReviver=Ml});var os=x(MF=>{"use strict";d();var Rce=Ee();function IF(e,t,n){if(Array.isArray(e))return e.map((r,i)=>IF(r,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!Rce.hasAnchor(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=s=>{r.res=s,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!n?.keep?Number(e):e}MF.toJS=IF});var Fg=x(DF=>{"use strict";d();var Dce=YT(),RF=Ee(),jce=os(),QT=class{constructor(t){Object.defineProperty(this,RF.NODE_TYPE,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!RF.isDocument(t))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=jce.toJS(this,"",a);if(typeof i=="function")for(let{count:c,res:l}of a.anchors.values())i(l,c);return typeof s=="function"?Dce.applyReviver(s,{"":o},"",o):o}};DF.NodeBase=QT});var Rl=x(jF=>{"use strict";d();var Bce=Bg(),Fce=Ll(),Sc=Ee(),Vce=Fg(),$ce=os(),XT=class extends Vce.NodeBase{constructor(t){super(Sc.ALIAS),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],Fce.visit(t,{Node:(s,a)=>{(Sc.isAlias(a)||Sc.hasAnchor(a))&&r.push(a)}}),n&&(n.aliasResolveCache=r));let i;for(let s of r){if(s===this)break;s.anchor===this.source&&(i=s)}return i}toJSON(t,n){if(!n)return{source:this.source};let{anchors:r,doc:i,maxAliasCount:s}=n,a=this.resolve(i,n);if(!a){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let o=r.get(a);if(o||($ce.toJS(a,null,n),o=r.get(a)),o?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=Vg(i,a,r)),o.count*o.aliasCount>s)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return o.res}toString(t,n,r){let i=`*${this.source}`;if(t){if(Bce.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${i} `}return i}};function Vg(e,t,n){if(Sc.isAlias(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Sc.isCollection(t)){let r=0;for(let i of t.items){let s=Vg(e,i,n);s>r&&(r=s)}return r}else if(Sc.isPair(t)){let r=Vg(e,t.key,n),i=Vg(e,t.value,n);return Math.max(r,i)}return 1}jF.Alias=XT});var ht=x(ZT=>{"use strict";d();var Uce=Ee(),Hce=Fg(),zce=os(),Wce=e=>!e||typeof e!="function"&&typeof e!="object",cs=class extends Hce.NodeBase{constructor(t){super(Uce.SCALAR),this.value=t}toJSON(t,n){return n?.keep?this.value:zce.toJS(this.value,t,n)}toString(){return String(this.value)}};cs.BLOCK_FOLDED="BLOCK_FOLDED";cs.BLOCK_LITERAL="BLOCK_LITERAL";cs.PLAIN="PLAIN";cs.QUOTE_DOUBLE="QUOTE_DOUBLE";cs.QUOTE_SINGLE="QUOTE_SINGLE";ZT.Scalar=cs;ZT.isScalarValue=Wce});var Dl=x(FF=>{"use strict";d();var Gce=Rl(),Ba=Ee(),BF=ht(),Jce="tag:yaml.org,2002:";function Kce(e,t,n){if(t){let r=n.filter(s=>s.tag===t),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>r.identify?.(e)&&!r.format)}function Yce(e,t,n){if(Ba.isDocument(e)&&(e=e.contents),Ba.isNode(e))return e;if(Ba.isPair(e)){let m=n.schema[Ba.MAP].createNode?.(n.schema,null,n);return m.items.push(e),m}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:a,sourceObjects:o}=n,c;if(r&&e&&typeof e=="object"){if(c=o.get(e),c)return c.anchor??(c.anchor=i(e)),new Gce.Alias(c.anchor);c={anchor:null,node:null},o.set(e,c)}t?.startsWith("!!")&&(t=Jce+t.slice(2));let l=Kce(e,t,a.tags);if(!l){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let m=new BF.Scalar(e);return c&&(c.node=m),m}l=e instanceof Map?a[Ba.MAP]:Symbol.iterator in Object(e)?a[Ba.SEQ]:a[Ba.MAP]}s&&(s(l),delete n.onTagObj);let f=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(n.schema,e,n):new BF.Scalar(e);return t?f.tag=t:l.default||(f.tag=l.tag),c&&(c.node=f),f}FF.createNode=Yce});var Ug=x($g=>{"use strict";d();var Qce=Dl(),$r=Ee(),Xce=Fg();function e1(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){let s=t[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let a=[];a[s]=r,r=a}else r=new Map([[s,r]])}return Qce.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var VF=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,t1=class extends Xce.NodeBase{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>$r.isNode(r)||$r.isPair(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(VF(t))this.add(n);else{let[r,...i]=t,s=this.get(r,!0);if($r.isCollection(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,e1(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(t){let[n,...r]=t;if(r.length===0)return this.delete(n);let i=this.get(n,!0);if($r.isCollection(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){let[r,...i]=t,s=this.get(r,!0);return i.length===0?!n&&$r.isScalar(s)?s.value:s:$r.isCollection(s)?s.getIn(i,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!$r.isPair(n))return!1;let r=n.value;return r==null||t&&$r.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){let[n,...r]=t;if(r.length===0)return this.has(n);let i=this.get(n,!0);return $r.isCollection(i)?i.hasIn(r):!1}setIn(t,n){let[r,...i]=t;if(i.length===0)this.set(r,n);else{let s=this.get(r,!0);if($r.isCollection(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,e1(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}};$g.Collection=t1;$g.collectionFromPath=e1;$g.isEmptyPath=VF});var jl=x(Hg=>{"use strict";d();var Zce=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function n1(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var eue=(e,t,n)=>e.endsWith(`
|
|
117
|
+
`)?n1(n,t):n.includes(`
|
|
118
|
+
`)?`
|
|
119
|
+
`+n1(n,t):(e.endsWith(" ")?"":" ")+n;Hg.indentComment=n1;Hg.lineComment=eue;Hg.stringifyComment=Zce});var UF=x(Bl=>{"use strict";d();var tue="flow",r1="block",zg="quoted";function nue(e,t,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:o}={}){if(!i||i<0)return e;i<s&&(s=0);let c=Math.max(1+s,1+i-t.length);if(e.length<=c)return e;let l=[],f={},m=i-t.length;typeof r=="number"&&(r>i-Math.max(2,s)?l.push(0):m=i-r);let p,g,v=!1,b=-1,_=-1,k=-1;n===r1&&(b=$F(e,b,t.length),b!==-1&&(m=b+c));for(let T;T=e[b+=1];){if(n===zg&&T==="\\"){switch(_=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}k=b}if(T===`
|
|
120
|
+
`)n===r1&&(b=$F(e,b,t.length)),m=b+t.length+c,p=void 0;else{if(T===" "&&g&&g!==" "&&g!==`
|
|
121
|
+
`&&g!==" "){let y=e[b+1];y&&y!==" "&&y!==`
|
|
122
|
+
`&&y!==" "&&(p=b)}if(b>=m)if(p)l.push(p),m=p+c,p=void 0;else if(n===zg){for(;g===" "||g===" ";)g=T,T=e[b+=1],v=!0;let y=b>k+1?b-2:_-1;if(f[y])return e;l.push(y),f[y]=!0,m=y+c,p=void 0}else v=!0}g=T}if(v&&o&&o(),l.length===0)return e;a&&a();let w=e.slice(0,l[0]);for(let T=0;T<l.length;++T){let y=l[T],A=l[T+1]||e.length;y===0?w=`
|
|
123
|
+
${t}${e.slice(0,A)}`:(n===zg&&f[y]&&(w+=`${e[y]}\\`),w+=`
|
|
124
|
+
${t}${e.slice(y+1,A)}`)}return w}function $F(e,t,n){let r=t,i=t+1,s=e[i];for(;s===" "||s===" ";)if(t<i+n)s=e[++t];else{do s=e[++t];while(s&&s!==`
|
|
125
|
+
`);r=t,i=t+1,s=e[i]}return r}Bl.FOLD_BLOCK=r1;Bl.FOLD_FLOW=tue;Bl.FOLD_QUOTED=zg;Bl.foldFlowLines=nue});var Vl=x(HF=>{"use strict";d();var gr=ht(),us=UF(),Gg=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Jg=e=>/^(%|---|\.\.\.)/m.test(e);function rue(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let s=0,a=0;s<i;++s)if(e[s]===`
|
|
126
|
+
`){if(s-a>r)return!0;if(a=s+1,i-a<=r)return!1}return!0}function Fl(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(Jg(e)?" ":""),a="",o=0;for(let c=0,l=n[c];l;l=n[++c])if(l===" "&&n[c+1]==="\\"&&n[c+2]==="n"&&(a+=n.slice(o,c)+"\\ ",c+=1,o=c,l="\\"),l==="\\")switch(n[c+1]){case"u":{a+=n.slice(o,c);let f=n.substr(c+2,4);switch(f){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:f.substr(0,2)==="00"?a+="\\x"+f.substr(2):a+=n.substr(c,6)}c+=5,o=c+1}break;case"n":if(r||n[c+2]==='"'||n.length<i)c+=1;else{for(a+=n.slice(o,c)+`
|
|
127
|
+
|
|
128
|
+
`;n[c+2]==="\\"&&n[c+3]==="n"&&n[c+4]!=='"';)a+=`
|
|
129
|
+
`,c+=2;a+=s,n[c+2]===" "&&(a+="\\"),c+=1,o=c+1}break;default:c+=1}return a=o?a+n.slice(o):n,r?a:us.foldFlowLines(a,s,us.FOLD_QUOTED,Gg(t,!1))}function i1(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
130
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return Fl(e,t);let n=t.indent||(Jg(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
131
|
+
${n}`)+"'";return t.implicitKey?r:us.foldFlowLines(r,n,us.FOLD_FLOW,Gg(t,!1))}function Tc(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=Fl;else{let i=e.includes('"'),s=e.includes("'");i&&!s?r=i1:s&&!i?r=Fl:r=n?i1:Fl}return r(e,t)}var s1;try{s1=new RegExp(`(^|(?<!
|
|
132
|
+
))
|
|
133
|
+
+(?!
|
|
134
|
+
|$)`,"g")}catch{s1=/\n+(?!\n|$)/g}function Wg({comment:e,type:t,value:n},r,i,s){let{blockQuote:a,commentString:o,lineWidth:c}=r.options;if(!a||/\n[\t ]+$/.test(n))return Tc(n,r);let l=r.indent||(r.forceBlockIndent||Jg(n)?" ":""),f=a==="literal"?!0:a==="folded"||t===gr.Scalar.BLOCK_FOLDED?!1:t===gr.Scalar.BLOCK_LITERAL?!0:!rue(n,c,l.length);if(!n)return f?`|
|
|
135
|
+
`:`>
|
|
136
|
+
`;let m,p;for(p=n.length;p>0;--p){let A=n[p-1];if(A!==`
|
|
137
|
+
`&&A!==" "&&A!==" ")break}let g=n.substring(p),v=g.indexOf(`
|
|
138
|
+
`);v===-1?m="-":n===g||v!==g.length-1?(m="+",s&&s()):m="",g&&(n=n.slice(0,-g.length),g[g.length-1]===`
|
|
139
|
+
`&&(g=g.slice(0,-1)),g=g.replace(s1,`$&${l}`));let b=!1,_,k=-1;for(_=0;_<n.length;++_){let A=n[_];if(A===" ")b=!0;else if(A===`
|
|
140
|
+
`)k=_;else break}let w=n.substring(0,k<_?k+1:_);w&&(n=n.substring(w.length),w=w.replace(/\n+/g,`$&${l}`));let y=(b?l?"2":"1":"")+m;if(e&&(y+=" "+o(e.replace(/ ?[\r\n]+/g," ")),i&&i()),!f){let A=n.replace(/\n+/g,`
|
|
141
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),N=!1,O=Gg(r,!0);a!=="folded"&&t!==gr.Scalar.BLOCK_FOLDED&&(O.onOverflow=()=>{N=!0});let q=us.foldFlowLines(`${w}${A}${g}`,l,us.FOLD_BLOCK,O);if(!N)return`>${y}
|
|
142
|
+
${l}${q}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}
|
|
143
|
+
${l}${w}${n}${g}`}function iue(e,t,n,r){let{type:i,value:s}=e,{actualString:a,implicitKey:o,indent:c,indentStep:l,inFlow:f}=t;if(o&&s.includes(`
|
|
144
|
+
`)||f&&/[[\]{},]/.test(s))return Tc(s,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return o||f||!s.includes(`
|
|
145
|
+
`)?Tc(s,t):Wg(e,t,n,r);if(!o&&!f&&i!==gr.Scalar.PLAIN&&s.includes(`
|
|
146
|
+
`))return Wg(e,t,n,r);if(Jg(s)){if(c==="")return t.forceBlockIndent=!0,Wg(e,t,n,r);if(o&&c===l)return Tc(s,t)}let m=s.replace(/\n+/g,`$&
|
|
147
|
+
${c}`);if(a){let p=b=>b.default&&b.tag!=="tag:yaml.org,2002:str"&&b.test?.test(m),{compat:g,tags:v}=t.doc.schema;if(v.some(p)||g?.some(p))return Tc(s,t)}return o?m:us.foldFlowLines(m,c,us.FOLD_FLOW,Gg(t,!1))}function sue(e,t,n,r){let{implicitKey:i,inFlow:s}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:o}=e;o!==gr.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=gr.Scalar.QUOTE_DOUBLE);let c=f=>{switch(f){case gr.Scalar.BLOCK_FOLDED:case gr.Scalar.BLOCK_LITERAL:return i||s?Tc(a.value,t):Wg(a,t,n,r);case gr.Scalar.QUOTE_DOUBLE:return Fl(a.value,t);case gr.Scalar.QUOTE_SINGLE:return i1(a.value,t);case gr.Scalar.PLAIN:return iue(a,t,n,r);default:return null}},l=c(o);if(l===null){let{defaultKeyType:f,defaultStringType:m}=t.options,p=i&&f||m;if(l=c(p),l===null)throw new Error(`Unsupported default string type ${p}`)}return l}HF.stringifyString=sue});var $l=x(a1=>{"use strict";d();var aue=Bg(),ls=Ee(),oue=jl(),cue=Vl();function uue(e,t){let n=Object.assign({blockQuote:!0,commentString:oue.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},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function lue(e,t){if(t.tag){let i=e.filter(s=>s.tag===t.tag);if(i.length>0)return i.find(s=>s.format===t.format)??i[0]}let n,r;if(ls.isScalar(t)){r=t.value;let i=e.filter(s=>s.identify?.(r));if(i.length>1){let s=i.filter(a=>a.test);s.length>0&&(i=s)}n=i.find(s=>s.format===t.format)??i.find(s=>!s.format)}else r=t,n=e.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){let i=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${i} value`)}return n}function fue(e,t,{anchors:n,doc:r}){if(!r.directives)return"";let i=[],s=(ls.isScalar(e)||ls.isCollection(e))&&e.anchor;s&&aue.anchorIsValid(s)&&(n.add(s),i.push(`&${s}`));let a=e.tag??(t.default?null:t.tag);return a&&i.push(r.directives.tagString(a)),i.join(" ")}function due(e,t,n,r){if(ls.isPair(e))return e.toString(t,n,r);if(ls.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,s=ls.isNode(e)?e:t.doc.createNode(e,{onTagObj:c=>i=c});i??(i=lue(t.doc.schema.tags,s));let a=fue(s,i,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);let o=typeof i.stringify=="function"?i.stringify(s,t,n,r):ls.isScalar(s)?cue.stringifyString(s,t,n,r):s.toString(t,n,r);return a?ls.isScalar(s)||o[0]==="{"||o[0]==="["?`${a} ${o}`:`${a}
|
|
148
|
+
${t.indent}${o}`:o}a1.createStringifyContext=uue;a1.stringify=due});var JF=x(GF=>{"use strict";d();var vi=Ee(),zF=ht(),WF=$l(),Ul=jl();function pue({key:e,value:t},n,r,i){let{allNullValues:s,doc:a,indent:o,indentStep:c,options:{commentString:l,indentSeq:f,simpleKeys:m}}=n,p=vi.isNode(e)&&e.comment||null;if(m){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(vi.isCollection(e)||!vi.isNode(e)&&typeof e=="object"){let O="With simple keys, collection cannot be used as a key value";throw new Error(O)}}let g=!m&&(!e||p&&t==null&&!n.inFlow||vi.isCollection(e)||(vi.isScalar(e)?e.type===zF.Scalar.BLOCK_FOLDED||e.type===zF.Scalar.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!g&&(m||!s),indent:o+c});let v=!1,b=!1,_=WF.stringify(e,n,()=>v=!0,()=>b=!0);if(!g&&!n.inFlow&&_.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(n.inFlow){if(s||t==null)return v&&r&&r(),_===""?"?":g?`? ${_}`:_}else if(s&&!m||t==null&&g)return _=`? ${_}`,p&&!v?_+=Ul.lineComment(_,n.indent,l(p)):b&&i&&i(),_;v&&(p=null),g?(p&&(_+=Ul.lineComment(_,n.indent,l(p))),_=`? ${_}
|
|
149
|
+
${o}:`):(_=`${_}:`,p&&(_+=Ul.lineComment(_,n.indent,l(p))));let k,w,T;vi.isNode(t)?(k=!!t.spaceBefore,w=t.commentBefore,T=t.comment):(k=!1,w=null,T=null,t&&typeof t=="object"&&(t=a.createNode(t))),n.implicitKey=!1,!g&&!p&&vi.isScalar(t)&&(n.indentAtStart=_.length+1),b=!1,!f&&c.length>=2&&!n.inFlow&&!g&&vi.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let y=!1,A=WF.stringify(t,n,()=>y=!0,()=>b=!0),N=" ";if(p||k||w){if(N=k?`
|
|
150
|
+
`:"",w){let O=l(w);N+=`
|
|
151
|
+
${Ul.indentComment(O,n.indent)}`}A===""&&!n.inFlow?N===`
|
|
152
|
+
`&&T&&(N=`
|
|
153
|
+
|
|
154
|
+
`):N+=`
|
|
155
|
+
${n.indent}`}else if(!g&&vi.isCollection(t)){let O=A[0],q=A.indexOf(`
|
|
156
|
+
`),j=q!==-1,M=n.inFlow??t.flow??t.items.length===0;if(j||!M){let C=!1;if(j&&(O==="&"||O==="!")){let L=A.indexOf(" ");O==="&"&&L!==-1&&L<q&&A[L+1]==="!"&&(L=A.indexOf(" ",L+1)),(L===-1||q<L)&&(C=!0)}C||(N=`
|
|
157
|
+
${n.indent}`)}}else(A===""||A[0]===`
|
|
158
|
+
`)&&(N="");return _+=N+A,n.inFlow?y&&r&&r():T&&!y?_+=Ul.lineComment(_,n.indent,l(T)):b&&i&&i(),_}GF.stringifyPair=pue});var c1=x(o1=>{"use strict";d();var KF=ce("process");function hue(e,...t){e==="debug"&&console.log(...t)}function mue(e,t){(e==="debug"||e==="warn")&&(typeof KF.emitWarning=="function"?KF.emitWarning(t):console.warn(t))}o1.debug=hue;o1.warn=mue});var Zg=x(Xg=>{"use strict";d();var Qg=Ee(),YF=ht(),Kg="<<",Yg={identify:e=>e===Kg||typeof e=="symbol"&&e.description===Kg,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new YF.Scalar(Symbol(Kg)),{addToJSMap:QF}),stringify:()=>Kg},gue=(e,t)=>(Yg.identify(t)||Qg.isScalar(t)&&(!t.type||t.type===YF.Scalar.PLAIN)&&Yg.identify(t.value))&&e?.doc.schema.tags.some(n=>n.tag===Yg.tag&&n.default);function QF(e,t,n){let r=XF(e,n);if(Qg.isSeq(r))for(let i of r.items)u1(e,t,i);else if(Array.isArray(r))for(let i of r)u1(e,t,i);else u1(e,t,r)}function u1(e,t,n){let r=XF(e,n);if(!Qg.isMap(r))throw new Error("Merge sources must be maps or map aliases");let i=r.toJSON(null,e,Map);for(let[s,a]of i)t instanceof Map?t.has(s)||t.set(s,a):t instanceof Set?t.add(s):Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function XF(e,t){return e&&Qg.isAlias(t)?t.resolve(e.doc,e):t}Xg.addMergeToJSMap=QF;Xg.isMergeKey=gue;Xg.merge=Yg});var f1=x(tV=>{"use strict";d();var yue=c1(),ZF=Zg(),_ue=$l(),eV=Ee(),l1=os();function vue(e,t,{key:n,value:r}){if(eV.isNode(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(ZF.isMergeKey(e,n))ZF.addMergeToJSMap(e,t,r);else{let i=l1.toJS(n,"",e);if(t instanceof Map)t.set(i,l1.toJS(r,i,e));else if(t instanceof Set)t.add(i);else{let s=bue(n,i,e),a=l1.toJS(r,s,e);s in t?Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[s]=a}}return t}function bue(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(eV.isNode(e)&&n?.doc){let r=_ue.createStringifyContext(n.doc,{});r.anchors=new Set;for(let s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;let i=e.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),yue.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(t)}tV.addPairToJSMap=vue});var fs=x(d1=>{"use strict";d();var nV=Dl(),kue=JF(),Sue=f1(),ey=Ee();function Tue(e,t,n){let r=nV.createNode(e,void 0,n),i=nV.createNode(t,void 0,n);return new ty(r,i)}var ty=class e{constructor(t,n=null){Object.defineProperty(this,ey.NODE_TYPE,{value:ey.PAIR}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return ey.isNode(n)&&(n=n.clone(t)),ey.isNode(r)&&(r=r.clone(t)),new e(n,r)}toJSON(t,n){let r=n?.mapAsMap?new Map:{};return Sue.addPairToJSMap(n,r,this)}toString(t,n,r){return t?.doc?kue.stringifyPair(this,t,n,r):JSON.stringify(this)}};d1.Pair=ty;d1.createPair=Tue});var p1=x(iV=>{"use strict";d();var Fa=Ee(),rV=$l(),ny=jl();function wue(e,t,n){return(t.inFlow??e.flow?Eue:xue)(e,t,n)}function xue({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:a,onComment:o}){let{indent:c,options:{commentString:l}}=n,f=Object.assign({},n,{indent:s,type:null}),m=!1,p=[];for(let v=0;v<t.length;++v){let b=t[v],_=null;if(Fa.isNode(b))!m&&b.spaceBefore&&p.push(""),ry(n,p,b.commentBefore,m),b.comment&&(_=b.comment);else if(Fa.isPair(b)){let w=Fa.isNode(b.key)?b.key:null;w&&(!m&&w.spaceBefore&&p.push(""),ry(n,p,w.commentBefore,m))}m=!1;let k=rV.stringify(b,f,()=>_=null,()=>m=!0);_&&(k+=ny.lineComment(k,s,l(_))),m&&_&&(m=!1),p.push(r+k)}let g;if(p.length===0)g=i.start+i.end;else{g=p[0];for(let v=1;v<p.length;++v){let b=p[v];g+=b?`
|
|
159
|
+
${c}${b}`:`
|
|
160
|
+
`}}return e?(g+=`
|
|
161
|
+
`+ny.indentComment(l(e),c),o&&o()):m&&a&&a(),g}function Eue({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:s,flowCollectionPadding:a,options:{commentString:o}}=t;r+=s;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,f=0,m=[];for(let v=0;v<e.length;++v){let b=e[v],_=null;if(Fa.isNode(b))b.spaceBefore&&m.push(""),ry(t,m,b.commentBefore,!1),b.comment&&(_=b.comment);else if(Fa.isPair(b)){let w=Fa.isNode(b.key)?b.key:null;w&&(w.spaceBefore&&m.push(""),ry(t,m,w.commentBefore,!1),w.comment&&(l=!0));let T=Fa.isNode(b.value)?b.value:null;T?(T.comment&&(_=T.comment),T.commentBefore&&(l=!0)):b.value==null&&w?.comment&&(_=w.comment)}_&&(l=!0);let k=rV.stringify(b,c,()=>_=null);l||(l=m.length>f||k.includes(`
|
|
162
|
+
`)),v<e.length-1?k+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(l||(l=m.reduce((w,T)=>w+T.length+2,2)+(k.length+2)>t.options.lineWidth)),l&&(k+=",")),_&&(k+=ny.lineComment(k,r,o(_))),m.push(k),f=m.length}let{start:p,end:g}=n;if(m.length===0)return p+g;if(!l){let v=m.reduce((b,_)=>b+_.length+2,2);l=t.options.lineWidth>0&&v>t.options.lineWidth}if(l){let v=p;for(let b of m)v+=b?`
|
|
163
|
+
${s}${i}${b}`:`
|
|
164
|
+
`;return`${v}
|
|
165
|
+
${i}${g}`}else return`${p}${a}${m.join(" ")}${a}${g}`}function ry({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){let s=ny.indentComment(t(r),e);n.push(s.trimStart())}}iV.stringifyCollection=wue});var ps=x(m1=>{"use strict";d();var Aue=p1(),Oue=f1(),Nue=Ug(),ds=Ee(),iy=fs(),Pue=ht();function Hl(e,t){let n=ds.isScalar(t)?t.value:t;for(let r of e)if(ds.isPair(r)&&(r.key===t||r.key===n||ds.isScalar(r.key)&&r.key.value===n))return r}var h1=class extends Nue.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(ds.MAP,t),this.items=[]}static from(t,n,r){let{keepUndefined:i,replacer:s}=r,a=new this(t),o=(c,l)=>{if(typeof s=="function")l=s.call(n,c,l);else if(Array.isArray(s)&&!s.includes(c))return;(l!==void 0||i)&&a.items.push(iy.createPair(c,l,r))};if(n instanceof Map)for(let[c,l]of n)o(c,l);else if(n&&typeof n=="object")for(let c of Object.keys(n))o(c,n[c]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,n){let r;ds.isPair(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new iy.Pair(t,t?.value):r=new iy.Pair(t.key,t.value);let i=Hl(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);ds.isScalar(i.value)&&Pue.isScalarValue(r.value)?i.value.value=r.value:i.value=r.value}else if(s){let a=this.items.findIndex(o=>s(r,o)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(t){let n=Hl(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){let i=Hl(this.items,t)?.value;return(!n&&ds.isScalar(i)?i.value:i)??void 0}has(t){return!!Hl(this.items,t)}set(t,n){this.add(new iy.Pair(t,n),!0)}toJSON(t,n,r){let i=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(let s of this.items)Oue.addPairToJSMap(n,i,s);return i}toString(t,n,r){if(!t)return JSON.stringify(this);for(let i of this.items)if(!ds.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),Aue.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}};m1.YAMLMap=h1;m1.findPair=Hl});var wc=x(aV=>{"use strict";d();var Cue=Ee(),sV=ps(),Lue={collection:"map",default:!0,nodeClass:sV.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){return Cue.isMap(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>sV.YAMLMap.from(e,t,n)};aV.map=Lue});var hs=x(oV=>{"use strict";d();var que=Dl(),Iue=p1(),Mue=Ug(),ay=Ee(),Rue=ht(),Due=os(),g1=class extends Mue.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(ay.SEQ,t),this.items=[]}add(t){this.items.push(t)}delete(t){let n=sy(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){let r=sy(t);if(typeof r!="number")return;let i=this.items[r];return!n&&ay.isScalar(i)?i.value:i}has(t){let n=sy(t);return typeof n=="number"&&n<this.items.length}set(t,n){let r=sy(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);let i=this.items[r];ay.isScalar(i)&&Rue.isScalarValue(n)?i.value=n:this.items[r]=n}toJSON(t,n){let r=[];n?.onCreate&&n.onCreate(r);let i=0;for(let s of this.items)r.push(Due.toJS(s,String(i++),n));return r}toString(t,n,r){return t?Iue.stringifyCollection(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){let{replacer:i}=r,s=new this(t);if(n&&Symbol.iterator in Object(n)){let a=0;for(let o of n){if(typeof i=="function"){let c=n instanceof Set?o:String(a++);o=i.call(n,c,o)}s.items.push(que.createNode(o,void 0,r))}}return s}};function sy(e){let t=ay.isScalar(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}oV.YAMLSeq=g1});var xc=x(uV=>{"use strict";d();var jue=Ee(),cV=hs(),Bue={collection:"seq",default:!0,nodeClass:cV.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){return jue.isSeq(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>cV.YAMLSeq.from(e,t,n)};uV.seq=Bue});var zl=x(lV=>{"use strict";d();var Fue=Vl(),Vue={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),Fue.stringifyString(e,t,n,r)}};lV.string=Vue});var oy=x(pV=>{"use strict";d();var fV=ht(),dV={identify:e=>e==null,createNode:()=>new fV.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new fV.Scalar(null),stringify:({source:e},t)=>typeof e=="string"&&dV.test.test(e)?e:t.options.nullStr};pV.nullTag=dV});var y1=x(mV=>{"use strict";d();var $ue=ht(),hV={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new $ue.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&hV.test.test(e)){let r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};mV.boolTag=hV});var Ec=x(gV=>{"use strict";d();function Uue({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r=="bigint")return String(r);let i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let o=t-(s.length-a-1);for(;o-- >0;)s+="0"}return s}gV.stringifyNumber=Uue});var v1=x(cy=>{"use strict";d();var Hue=ht(),_1=Ec(),zue={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:_1.stringifyNumber},Wue={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():_1.stringifyNumber(e)}},Gue={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new Hue.Scalar(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:_1.stringifyNumber};cy.float=Gue;cy.floatExp=Wue;cy.floatNaN=zue});var k1=x(ly=>{"use strict";d();var yV=Ec(),uy=e=>typeof e=="bigint"||Number.isInteger(e),b1=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function _V(e,t,n){let{value:r}=e;return uy(r)&&r>=0?n+r.toString(t):yV.stringifyNumber(e)}var Jue={identify:e=>uy(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>b1(e,2,8,n),stringify:e=>_V(e,8,"0o")},Kue={identify:uy,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>b1(e,0,10,n),stringify:yV.stringifyNumber},Yue={identify:e=>uy(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>b1(e,2,16,n),stringify:e=>_V(e,16,"0x")};ly.int=Kue;ly.intHex=Yue;ly.intOct=Jue});var bV=x(vV=>{"use strict";d();var Que=wc(),Xue=oy(),Zue=xc(),ele=zl(),tle=y1(),S1=v1(),T1=k1(),nle=[Que.map,Zue.seq,ele.string,Xue.nullTag,tle.boolTag,T1.intOct,T1.int,T1.intHex,S1.floatNaN,S1.floatExp,S1.float];vV.schema=nle});var TV=x(SV=>{"use strict";d();var rle=ht(),ile=wc(),sle=xc();function kV(e){return typeof e=="bigint"||Number.isInteger(e)}var fy=({value:e})=>JSON.stringify(e),ale=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:fy},{identify:e=>e==null,createNode:()=>new rle.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:fy},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:fy},{identify:kV,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>kV(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:fy}],ole={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},cle=[ile.map,sle.seq].concat(ale,ole);SV.schema=cle});var x1=x(wV=>{"use strict";d();var Wl=ce("buffer"),w1=ht(),ule=Vl(),lle={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Wl.Buffer=="function")return Wl.Buffer.from(e,"base64");if(typeof atob=="function"){let n=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},r,i,s){if(!n)return"";let a=n,o;if(typeof Wl.Buffer=="function")o=a instanceof Wl.Buffer?a.toString("base64"):Wl.Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let l=0;l<a.length;++l)c+=String.fromCharCode(a[l]);o=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=w1.Scalar.BLOCK_LITERAL),t!==w1.Scalar.QUOTE_DOUBLE){let c=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),l=Math.ceil(o.length/c),f=new Array(l);for(let m=0,p=0;m<l;++m,p+=c)f[m]=o.substr(p,c);o=f.join(t===w1.Scalar.BLOCK_LITERAL?`
|
|
166
|
+
`:" ")}return ule.stringifyString({comment:e,type:t,value:o},r,i,s)}};wV.binary=lle});var hy=x(py=>{"use strict";d();var dy=Ee(),E1=fs(),fle=ht(),dle=hs();function xV(e,t){if(dy.isSeq(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!dy.isPair(r)){if(dy.isMap(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");let i=r.items[0]||new E1.Pair(new fle.Scalar(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore}
|
|
167
|
+
${i.key.commentBefore}`:r.commentBefore),r.comment){let s=i.value??i.key;s.comment=s.comment?`${r.comment}
|
|
168
|
+
${s.comment}`:r.comment}r=i}e.items[n]=dy.isPair(r)?r:new E1.Pair(r)}}else t("Expected a sequence for this tag");return e}function EV(e,t,n){let{replacer:r}=n,i=new dle.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof r=="function"&&(a=r.call(t,String(s++),a));let o,c;if(Array.isArray(a))if(a.length===2)o=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let l=Object.keys(a);if(l.length===1)o=l[0],c=a[o];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else o=a;i.items.push(E1.createPair(o,c,n))}return i}var ple={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:xV,createNode:EV};py.createPairs=EV;py.pairs=ple;py.resolvePairs=xV});var N1=x(O1=>{"use strict";d();var AV=Ee(),A1=os(),Gl=ps(),hle=hs(),OV=hy(),Va=class e extends hle.YAMLSeq{constructor(){super(),this.add=Gl.YAMLMap.prototype.add.bind(this),this.delete=Gl.YAMLMap.prototype.delete.bind(this),this.get=Gl.YAMLMap.prototype.get.bind(this),this.has=Gl.YAMLMap.prototype.has.bind(this),this.set=Gl.YAMLMap.prototype.set.bind(this),this.tag=e.tag}toJSON(t,n){if(!n)return super.toJSON(t);let r=new Map;n?.onCreate&&n.onCreate(r);for(let i of this.items){let s,a;if(AV.isPair(i)?(s=A1.toJS(i.key,"",n),a=A1.toJS(i.value,s,n)):s=A1.toJS(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,a)}return r}static from(t,n,r){let i=OV.createPairs(t,n,r),s=new this;return s.items=i.items,s}};Va.tag="tag:yaml.org,2002:omap";var mle={collection:"seq",identify:e=>e instanceof Map,nodeClass:Va,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let n=OV.resolvePairs(e,t),r=[];for(let{key:i}of n.items)AV.isScalar(i)&&(r.includes(i.value)?t(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new Va,n)},createNode:(e,t,n)=>Va.from(e,t,n)};O1.YAMLOMap=Va;O1.omap=mle});var qV=x(P1=>{"use strict";d();var NV=ht();function PV({value:e,source:t},n){return t&&(e?CV:LV).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var CV={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new NV.Scalar(!0),stringify:PV},LV={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new NV.Scalar(!1),stringify:PV};P1.falseTag=LV;P1.trueTag=CV});var IV=x(my=>{"use strict";d();var gle=ht(),C1=Ec(),yle={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:C1.stringifyNumber},_le={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():C1.stringifyNumber(e)}},vle={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new gle.Scalar(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){let r=e.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:C1.stringifyNumber};my.float=vle;my.floatExp=_le;my.floatNaN=yle});var RV=x(Kl=>{"use strict";d();var MV=Ec(),Jl=e=>typeof e=="bigint"||Number.isInteger(e);function gy(e,t,n,{intAsBigInt:r}){let i=e[0];if((i==="-"||i==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let a=BigInt(e);return i==="-"?BigInt(-1)*a:a}let s=parseInt(e,n);return i==="-"?-1*s:s}function L1(e,t,n){let{value:r}=e;if(Jl(r)){let i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return MV.stringifyNumber(e)}var ble={identify:Jl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>gy(e,2,2,n),stringify:e=>L1(e,2,"0b")},kle={identify:Jl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>gy(e,1,8,n),stringify:e=>L1(e,8,"0")},Sle={identify:Jl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>gy(e,0,10,n),stringify:MV.stringifyNumber},Tle={identify:Jl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>gy(e,2,16,n),stringify:e=>L1(e,16,"0x")};Kl.int=Sle;Kl.intBin=ble;Kl.intHex=Tle;Kl.intOct=kle});var I1=x(q1=>{"use strict";d();var vy=Ee(),yy=fs(),_y=ps(),$a=class e extends _y.YAMLMap{constructor(t){super(t),this.tag=e.tag}add(t){let n;vy.isPair(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new yy.Pair(t.key,null):n=new yy.Pair(t,null),_y.findPair(this.items,n.key)||this.items.push(n)}get(t,n){let r=_y.findPair(this.items,t);return!n&&vy.isPair(r)?vy.isScalar(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=_y.findPair(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new yy.Pair(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){let{replacer:i}=r,s=new this(t);if(n&&Symbol.iterator in Object(n))for(let a of n)typeof i=="function"&&(a=i.call(n,a,a)),s.items.push(yy.createPair(a,null,r));return s}};$a.tag="tag:yaml.org,2002:set";var wle={collection:"map",identify:e=>e instanceof Set,nodeClass:$a,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>$a.from(e,t,n),resolve(e,t){if(vy.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new $a,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};q1.YAMLSet=$a;q1.set=wle});var R1=x(by=>{"use strict";d();var xle=Ec();function M1(e,t){let n=e[0],r=n==="-"||n==="+"?e.substring(1):e,i=a=>t?BigInt(a):Number(a),s=r.replace(/_/g,"").split(":").reduce((a,o)=>a*i(60)+i(o),i(0));return n==="-"?i(-1)*s:s}function DV(e){let{value:t}=e,n=a=>a;if(typeof t=="bigint")n=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return xle.stringifyNumber(e);let r="";t<0&&(r="-",t*=n(-1));let i=n(60),s=[t%i];return t<60?s.unshift(0):(t=(t-s[0])/i,s.unshift(t%i),t>=60&&(t=(t-s[0])/i,s.unshift(t))),r+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Ele={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>M1(e,n),stringify:DV},Ale={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>M1(e,!1),stringify:DV},jV={identify:e=>e 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(e){let t=e.match(jV.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,r,i,s,a,o]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0,l=Date.UTC(n,r-1,i,s||0,a||0,o||0,c),f=t[8];if(f&&f!=="Z"){let m=M1(f,!1);Math.abs(m)<30&&(m*=60),l-=6e4*m}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};by.floatTime=Ale;by.intTime=Ele;by.timestamp=jV});var VV=x(FV=>{"use strict";d();var Ole=wc(),Nle=oy(),Ple=xc(),Cle=zl(),Lle=x1(),BV=qV(),D1=IV(),ky=RV(),qle=Zg(),Ile=N1(),Mle=hy(),Rle=I1(),j1=R1(),Dle=[Ole.map,Ple.seq,Cle.string,Nle.nullTag,BV.trueTag,BV.falseTag,ky.intBin,ky.intOct,ky.int,ky.intHex,D1.floatNaN,D1.floatExp,D1.float,Lle.binary,qle.merge,Ile.omap,Mle.pairs,Rle.set,j1.intTime,j1.floatTime,j1.timestamp];FV.schema=Dle});var QV=x(V1=>{"use strict";d();var zV=wc(),jle=oy(),WV=xc(),Ble=zl(),Fle=y1(),B1=v1(),F1=k1(),Vle=bV(),$le=TV(),GV=x1(),Yl=Zg(),JV=N1(),KV=hy(),$V=VV(),YV=I1(),Sy=R1(),UV=new Map([["core",Vle.schema],["failsafe",[zV.map,WV.seq,Ble.string]],["json",$le.schema],["yaml11",$V.schema],["yaml-1.1",$V.schema]]),HV={binary:GV.binary,bool:Fle.boolTag,float:B1.float,floatExp:B1.floatExp,floatNaN:B1.floatNaN,floatTime:Sy.floatTime,int:F1.int,intHex:F1.intHex,intOct:F1.intOct,intTime:Sy.intTime,map:zV.map,merge:Yl.merge,null:jle.nullTag,omap:JV.omap,pairs:KV.pairs,seq:WV.seq,set:YV.set,timestamp:Sy.timestamp},Ule={"tag:yaml.org,2002:binary":GV.binary,"tag:yaml.org,2002:merge":Yl.merge,"tag:yaml.org,2002:omap":JV.omap,"tag:yaml.org,2002:pairs":KV.pairs,"tag:yaml.org,2002:set":YV.set,"tag:yaml.org,2002:timestamp":Sy.timestamp};function Hle(e,t,n){let r=UV.get(t);if(r&&!e)return n&&!r.includes(Yl.merge)?r.concat(Yl.merge):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let s=Array.from(UV.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${s} or define customTags array`)}if(Array.isArray(e))for(let s of e)i=i.concat(s);else typeof e=="function"&&(i=e(i.slice()));return n&&(i=i.concat(Yl.merge)),i.reduce((s,a)=>{let o=typeof a=="string"?HV[a]:a;if(!o){let c=JSON.stringify(a),l=Object.keys(HV).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return s.includes(o)||s.push(o),s},[])}V1.coreKnownTags=Ule;V1.getTags=Hle});var H1=x(XV=>{"use strict";d();var $1=Ee(),zle=wc(),Wle=xc(),Gle=zl(),Ty=QV(),Jle=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0,U1=class e{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(t)?Ty.getTags(t,"compat"):t?Ty.getTags(null,t):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?Ty.coreKnownTags:{},this.tags=Ty.getTags(n,this.name,r),this.toStringOptions=o??null,Object.defineProperty(this,$1.MAP,{value:zle.map}),Object.defineProperty(this,$1.SCALAR,{value:Gle.string}),Object.defineProperty(this,$1.SEQ,{value:Wle.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?Jle:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};XV.Schema=U1});var e4=x(ZV=>{"use strict";d();var Kle=Ee(),z1=$l(),Ql=jl();function Yle(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let c=e.directives.toString(e);c?(n.push(c),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");let i=z1.createStringifyContext(e,t),{commentString:s}=i.options;if(e.commentBefore){n.length!==1&&n.unshift("");let c=s(e.commentBefore);n.unshift(Ql.indentComment(c,""))}let a=!1,o=null;if(e.contents){if(Kle.isNode(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){let f=s(e.contents.commentBefore);n.push(Ql.indentComment(f,""))}i.forceBlockIndent=!!e.comment,o=e.contents.comment}let c=o?void 0:()=>a=!0,l=z1.stringify(e.contents,i,()=>o=null,c);o&&(l+=Ql.lineComment(l,"",s(o))),(l[0]==="|"||l[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${l}`:n.push(l)}else n.push(z1.stringify(e.contents,i));if(e.directives?.docEnd)if(e.comment){let c=s(e.comment);c.includes(`
|
|
169
|
+
`)?(n.push("..."),n.push(Ql.indentComment(c,""))):n.push(`... ${c}`)}else n.push("...");else{let c=e.comment;c&&a&&(c=c.replace(/^\n+/,"")),c&&((!a||o)&&n[n.length-1]!==""&&n.push(""),n.push(Ql.indentComment(s(c),"")))}return n.join(`
|
|
170
|
+
`)+`
|
|
171
|
+
`}ZV.stringifyDocument=Yle});var Xl=x(t4=>{"use strict";d();var Qle=Rl(),Ac=Ug(),Qn=Ee(),Xle=fs(),Zle=os(),efe=H1(),tfe=e4(),W1=Bg(),nfe=YT(),rfe=Dl(),G1=KT(),J1=class e{constructor(t,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Qn.NODE_TYPE,{value:Qn.DOC});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:a}=s;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new G1.Directives({version:a}),this.setSchema(a,r),this.contents=t===void 0?null:this.createNode(t,i,r)}clone(){let t=Object.create(e.prototype,{[Qn.NODE_TYPE]:{value:Qn.DOC}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Qn.isNode(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Oc(this.contents)&&this.contents.add(t)}addIn(t,n){Oc(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){let r=W1.anchorNames(this);t.anchor=!n||r.has(n)?W1.findNewAnchor(n||"a",r):n}return new Qle.Alias(t.anchor)}createNode(t,n,r){let i;if(typeof n=="function")t=n.call({"":t},"",t),i=n;else if(Array.isArray(n)){let _=w=>typeof w=="number"||w instanceof String||w instanceof Number,k=n.filter(_).map(String);k.length>0&&(n=n.concat(k)),i=n}else r===void 0&&n&&(r=n,n=void 0);let{aliasDuplicateObjects:s,anchorPrefix:a,flow:o,keepUndefined:c,onTagObj:l,tag:f}=r??{},{onAnchor:m,setAnchors:p,sourceObjects:g}=W1.createNodeAnchors(this,a||"a"),v={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:m,onTagObj:l,replacer:i,schema:this.schema,sourceObjects:g},b=rfe.createNode(t,f,v);return o&&Qn.isCollection(b)&&(b.flow=!0),p(),b}createPair(t,n,r={}){let i=this.createNode(t,null,r),s=this.createNode(n,null,r);return new Xle.Pair(i,s)}delete(t){return Oc(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Ac.isEmptyPath(t)?this.contents==null?!1:(this.contents=null,!0):Oc(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Qn.isCollection(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Ac.isEmptyPath(t)?!n&&Qn.isScalar(this.contents)?this.contents.value:this.contents:Qn.isCollection(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Qn.isCollection(this.contents)?this.contents.has(t):!1}hasIn(t){return Ac.isEmptyPath(t)?this.contents!==void 0:Qn.isCollection(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Ac.collectionFromPath(this.schema,[t],n):Oc(this.contents)&&this.contents.set(t,n)}setIn(t,n){Ac.isEmptyPath(t)?this.contents=n:this.contents==null?this.contents=Ac.collectionFromPath(this.schema,Array.from(t),n):Oc(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new G1.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new G1.Directives({version:t}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let i=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new efe.Schema(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=Zle.toJS(this.contents,n??"",o);if(typeof s=="function")for(let{count:l,res:f}of o.anchors.values())s(f,l);return typeof a=="function"?nfe.applyReviver(a,{"":c},"",c):c}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return tfe.stringifyDocument(this,t)}};function Oc(e){if(Qn.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}t4.Document=J1});var tf=x(ef=>{"use strict";d();var Zl=class extends Error{constructor(t,n,r,i){super(),this.name=t,this.code=r,this.message=i,this.pos=n}},K1=class extends Zl{constructor(t,n,r){super("YAMLParseError",t,n,r)}},Y1=class extends Zl{constructor(t,n,r){super("YAMLWarning",t,n,r)}},ife=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(o=>t.linePos(o));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,a=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){let o=Math.min(s-39,a.length-79);a="\u2026"+a.substring(o),s-=o-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(a.substring(0,s))){let o=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
|
|
172
|
+
`),a=o+a}if(/[^ ]/.test(a)){let o=1,c=n.linePos[1];c?.line===r&&c.col>i&&(o=Math.max(1,Math.min(c.col-i,80-s)));let l=" ".repeat(s)+"^".repeat(o);n.message+=`:
|
|
173
|
+
|
|
174
|
+
${a}
|
|
175
|
+
${l}
|
|
176
|
+
`}};ef.YAMLError=Zl;ef.YAMLParseError=K1;ef.YAMLWarning=Y1;ef.prettifyError=ife});var nf=x(n4=>{"use strict";d();function sfe(e,{flow:t,indicator:n,next:r,offset:i,onError:s,parentIndent:a,startOnNewline:o}){let c=!1,l=o,f=o,m="",p="",g=!1,v=!1,b=null,_=null,k=null,w=null,T=null,y=null,A=null;for(let q of e)switch(v&&(q.type!=="space"&&q.type!=="newline"&&q.type!=="comma"&&s(q.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),v=!1),b&&(l&&q.type!=="comment"&&q.type!=="newline"&&s(b,"TAB_AS_INDENT","Tabs are not allowed as indentation"),b=null),q.type){case"space":!t&&(n!=="doc-start"||r?.type!=="flow-collection")&&q.source.includes(" ")&&(b=q),f=!0;break;case"comment":{f||s(q,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let j=q.source.substring(1)||" ";m?m+=p+j:m=j,p="",l=!1;break}case"newline":l?m?m+=q.source:(!y||n!=="seq-item-ind")&&(c=!0):p+=q.source,l=!0,g=!0,(_||k)&&(w=q),f=!0;break;case"anchor":_&&s(q,"MULTIPLE_ANCHORS","A node can have at most one anchor"),q.source.endsWith(":")&&s(q.offset+q.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),_=q,A??(A=q.offset),l=!1,f=!1,v=!0;break;case"tag":{k&&s(q,"MULTIPLE_TAGS","A node can have at most one tag"),k=q,A??(A=q.offset),l=!1,f=!1,v=!0;break}case n:(_||k)&&s(q,"BAD_PROP_ORDER",`Anchors and tags must be after the ${q.source} indicator`),y&&s(q,"UNEXPECTED_TOKEN",`Unexpected ${q.source} in ${t??"collection"}`),y=q,l=n==="seq-item-ind"||n==="explicit-key-ind",f=!1;break;case"comma":if(t){T&&s(q,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),T=q,l=!1,f=!1;break}default:s(q,"UNEXPECTED_TOKEN",`Unexpected ${q.type} token`),l=!1,f=!1}let N=e[e.length-1],O=N?N.offset+N.source.length:i;return v&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b&&(l&&b.indent<=a||r?.type==="block-map"||r?.type==="block-seq")&&s(b,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:T,found:y,spaceBefore:c,comment:m,hasNewline:g,anchor:_,tag:k,newlineAfterProp:w,end:O,start:A??O}}n4.resolveProps=sfe});var wy=x(r4=>{"use strict";d();function Q1(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
177
|
+
`))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let n of t.start)if(n.type==="newline")return!0;if(t.sep){for(let n of t.sep)if(n.type==="newline")return!0}if(Q1(t.key)||Q1(t.value))return!0}return!1;default:return!0}}r4.containsNewline=Q1});var X1=x(i4=>{"use strict";d();var afe=wy();function ofe(e,t,n){if(t?.type==="flow-collection"){let r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&afe.containsNewline(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}i4.flowIndentCheck=ofe});var Z1=x(a4=>{"use strict";d();var s4=Ee();function cfe(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r=="function"?r:(s,a)=>s===a||s4.isScalar(s)&&s4.isScalar(a)&&s.value===a.value;return t.some(s=>i(s.key,n))}a4.mapIncludes=cfe});var d4=x(f4=>{"use strict";d();var o4=fs(),ufe=ps(),c4=nf(),lfe=wy(),u4=X1(),ffe=Z1(),l4="All mapping items must start at the same column";function dfe({composeNode:e,composeEmptyNode:t},n,r,i,s){let a=s?.nodeClass??ufe.YAMLMap,o=new a(n.schema);n.atRoot&&(n.atRoot=!1);let c=r.offset,l=null;for(let f of r.items){let{start:m,key:p,sep:g,value:v}=f,b=c4.resolveProps(m,{indicator:"explicit-key-ind",next:p??g?.[0],offset:c,onError:i,parentIndent:r.indent,startOnNewline:!0}),_=!b.found;if(_){if(p&&(p.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==r.indent&&i(c,"BAD_INDENT",l4)),!b.anchor&&!b.tag&&!g){l=b.end,b.comment&&(o.comment?o.comment+=`
|
|
178
|
+
`+b.comment:o.comment=b.comment);continue}(b.newlineAfterProp||lfe.containsNewline(p))&&i(p??m[m.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else b.found?.indent!==r.indent&&i(c,"BAD_INDENT",l4);n.atKey=!0;let k=b.end,w=p?e(n,p,b,i):t(n,k,m,null,b,i);n.schema.compat&&u4.flowIndentCheck(r.indent,p,i),n.atKey=!1,ffe.mapIncludes(n,o.items,w)&&i(k,"DUPLICATE_KEY","Map keys must be unique");let T=c4.resolveProps(g??[],{indicator:"map-value-ind",next:v,offset:w.range[2],onError:i,parentIndent:r.indent,startOnNewline:!p||p.type==="block-scalar"});if(c=T.end,T.found){_&&(v?.type==="block-map"&&!T.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&b.start<T.found.offset-1024&&i(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let y=v?e(n,v,T,i):t(n,c,g,null,T,i);n.schema.compat&&u4.flowIndentCheck(r.indent,v,i),c=y.range[2];let A=new o4.Pair(w,y);n.options.keepSourceTokens&&(A.srcToken=f),o.items.push(A)}else{_&&i(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),T.comment&&(w.comment?w.comment+=`
|
|
179
|
+
`+T.comment:w.comment=T.comment);let y=new o4.Pair(w);n.options.keepSourceTokens&&(y.srcToken=f),o.items.push(y)}}return l&&l<c&&i(l,"IMPOSSIBLE","Map comment with trailing content"),o.range=[r.offset,c,l??c],o}f4.resolveBlockMap=dfe});var h4=x(p4=>{"use strict";d();var pfe=hs(),hfe=nf(),mfe=X1();function gfe({composeNode:e,composeEmptyNode:t},n,r,i,s){let a=s?.nodeClass??pfe.YAMLSeq,o=new a(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let c=r.offset,l=null;for(let{start:f,value:m}of r.items){let p=hfe.resolveProps(f,{indicator:"seq-item-ind",next:m,offset:c,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||m)m?.type==="block-seq"?i(p.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{l=p.end,p.comment&&(o.comment=p.comment);continue}let g=m?e(n,m,p,i):t(n,p.end,f,null,p,i);n.schema.compat&&mfe.flowIndentCheck(r.indent,m,i),c=g.range[2],o.items.push(g)}return o.range=[r.offset,c,l??c],o}p4.resolveBlockSeq=gfe});var Nc=x(m4=>{"use strict";d();function yfe(e,t,n,r){let i="";if(e){let s=!1,a="";for(let o of e){let{source:c,type:l}=o;switch(l){case"space":s=!0;break;case"comment":{n&&!s&&r(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let f=c.substring(1)||" ";i?i+=a+f:i=f,a="";break}case"newline":i&&(a+=c),s=!0;break;default:r(o,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=c.length}}return{comment:i,offset:t}}m4.resolveEnd=yfe});var v4=x(_4=>{"use strict";d();var _fe=Ee(),vfe=fs(),g4=ps(),bfe=hs(),kfe=Nc(),y4=nf(),Sfe=wy(),Tfe=Z1(),ew="Block collections are not allowed within flow collections",tw=e=>e&&(e.type==="block-map"||e.type==="block-seq");function wfe({composeNode:e,composeEmptyNode:t},n,r,i,s){let a=r.start.source==="{",o=a?"flow map":"flow sequence",c=s?.nodeClass??(a?g4.YAMLMap:bfe.YAMLSeq),l=new c(n.schema);l.flow=!0;let f=n.atRoot;f&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let m=r.offset+r.start.source.length;for(let _=0;_<r.items.length;++_){let k=r.items[_],{start:w,key:T,sep:y,value:A}=k,N=y4.resolveProps(w,{flow:o,indicator:"explicit-key-ind",next:T??y?.[0],offset:m,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!N.found){if(!N.anchor&&!N.tag&&!y&&!A){_===0&&N.comma?i(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):_<r.items.length-1&&i(N.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),N.comment&&(l.comment?l.comment+=`
|
|
180
|
+
`+N.comment:l.comment=N.comment),m=N.end;continue}!a&&n.options.strict&&Sfe.containsNewline(T)&&i(T,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)N.comma&&i(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(N.comma||i(N.start,"MISSING_CHAR",`Missing , between ${o} items`),N.comment){let O="";e:for(let q of w)switch(q.type){case"comma":case"space":break;case"comment":O=q.source.substring(1);break e;default:break e}if(O){let q=l.items[l.items.length-1];_fe.isPair(q)&&(q=q.value??q.key),q.comment?q.comment+=`
|
|
181
|
+
`+O:q.comment=O,N.comment=N.comment.substring(O.length+1)}}if(!a&&!y&&!N.found){let O=A?e(n,A,N,i):t(n,N.end,y,null,N,i);l.items.push(O),m=O.range[2],tw(A)&&i(O.range,"BLOCK_IN_FLOW",ew)}else{n.atKey=!0;let O=N.end,q=T?e(n,T,N,i):t(n,O,w,null,N,i);tw(T)&&i(q.range,"BLOCK_IN_FLOW",ew),n.atKey=!1;let j=y4.resolveProps(y??[],{flow:o,indicator:"map-value-ind",next:A,offset:q.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(j.found){if(!a&&!N.found&&n.options.strict){if(y)for(let L of y){if(L===j.found)break;if(L.type==="newline"){i(L,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}N.start<j.found.offset-1024&&i(j.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else A&&("source"in A&&A.source?.[0]===":"?i(A,"MISSING_CHAR",`Missing space after : in ${o}`):i(j.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let M=A?e(n,A,j,i):j.found?t(n,j.end,y,null,j,i):null;M?tw(A)&&i(M.range,"BLOCK_IN_FLOW",ew):j.comment&&(q.comment?q.comment+=`
|
|
182
|
+
`+j.comment:q.comment=j.comment);let C=new vfe.Pair(q,M);if(n.options.keepSourceTokens&&(C.srcToken=k),a){let L=l;Tfe.mapIncludes(n,L.items,q)&&i(O,"DUPLICATE_KEY","Map keys must be unique"),L.items.push(C)}else{let L=new g4.YAMLMap(n.schema);L.flow=!0,L.items.push(C);let V=(M??q).range;L.range=[q.range[0],V[1],V[2]],l.items.push(L)}m=M?M.range[2]:j.end}}let p=a?"}":"]",[g,...v]=r.end,b=m;if(g?.source===p)b=g.offset+g.source.length;else{let _=o[0].toUpperCase()+o.substring(1),k=f?`${_} must end with a ${p}`:`${_} in block collection must be sufficiently indented and end with a ${p}`;i(m,f?"MISSING_CHAR":"BAD_INDENT",k),g&&g.source.length!==1&&v.unshift(g)}if(v.length>0){let _=kfe.resolveEnd(v,b,n.options.strict,i);_.comment&&(l.comment?l.comment+=`
|
|
183
|
+
`+_.comment:l.comment=_.comment),l.range=[r.offset,b,_.offset]}else l.range=[r.offset,b,b];return l}_4.resolveFlowCollection=wfe});var k4=x(b4=>{"use strict";d();var xfe=Ee(),Efe=ht(),Afe=ps(),Ofe=hs(),Nfe=d4(),Pfe=h4(),Cfe=v4();function nw(e,t,n,r,i,s){let a=n.type==="block-map"?Nfe.resolveBlockMap(e,t,n,r,s):n.type==="block-seq"?Pfe.resolveBlockSeq(e,t,n,r,s):Cfe.resolveFlowCollection(e,t,n,r,s),o=a.constructor;return i==="!"||i===o.tagName?(a.tag=o.tagName,a):(i&&(a.tag=i),a)}function Lfe(e,t,n,r,i){let s=r.tag,a=s?t.directives.tagName(s.source,p=>i(s,"TAG_RESOLVE_FAILED",p)):null;if(n.type==="block-seq"){let{anchor:p,newlineAfterProp:g}=r,v=p&&s?p.offset>s.offset?p:s:p??s;v&&(!g||g.offset<v.offset)&&i(v,"MISSING_CHAR","Missing newline after block sequence props")}let o=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!s||!a||a==="!"||a===Afe.YAMLMap.tagName&&o==="map"||a===Ofe.YAMLSeq.tagName&&o==="seq")return nw(e,t,n,i,a);let c=t.schema.tags.find(p=>p.tag===a&&p.collection===o);if(!c){let p=t.schema.knownTags[a];if(p?.collection===o)t.schema.tags.push(Object.assign({},p,{default:!1})),c=p;else return p?i(s,"BAD_COLLECTION_TYPE",`${p.tag} used for ${o} collection, but expects ${p.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),nw(e,t,n,i,a)}let l=nw(e,t,n,i,a,c),f=c.resolve?.(l,p=>i(s,"TAG_RESOLVE_FAILED",p),t.options)??l,m=xfe.isNode(f)?f:new Efe.Scalar(f);return m.range=l.range,m.tag=a,c?.format&&(m.format=c.format),m}b4.composeCollection=Lfe});var iw=x(S4=>{"use strict";d();var rw=ht();function qfe(e,t,n){let r=t.offset,i=Ife(t,e.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};let s=i.mode===">"?rw.Scalar.BLOCK_FOLDED:rw.Scalar.BLOCK_LITERAL,a=t.source?Mfe(t.source):[],o=a.length;for(let b=a.length-1;b>=0;--b){let _=a[b][1];if(_===""||_==="\r")o=b;else break}if(o===0){let b=i.chomp==="+"&&a.length>0?`
|
|
184
|
+
`.repeat(Math.max(1,a.length-1)):"",_=r+i.length;return t.source&&(_+=t.source.length),{value:b,type:s,comment:i.comment,range:[r,_,_]}}let c=t.indent+i.indent,l=t.offset+i.length,f=0;for(let b=0;b<o;++b){let[_,k]=a[b];if(k===""||k==="\r")i.indent===0&&_.length>c&&(c=_.length);else{_.length<c&&n(l+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(c=_.length),f=b,c===0&&!e.atRoot&&n(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=_.length+k.length+1}for(let b=a.length-1;b>=o;--b)a[b][0].length>c&&(o=b+1);let m="",p="",g=!1;for(let b=0;b<f;++b)m+=a[b][0].slice(c)+`
|
|
185
|
+
`;for(let b=f;b<o;++b){let[_,k]=a[b];l+=_.length+k.length+1;let w=k[k.length-1]==="\r";if(w&&(k=k.slice(0,-1)),k&&_.length<c){let y=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;n(l-k.length-(w?2:1),"BAD_INDENT",y),_=""}s===rw.Scalar.BLOCK_LITERAL?(m+=p+_.slice(c)+k,p=`
|
|
186
|
+
`):_.length>c||k[0]===" "?(p===" "?p=`
|
|
187
|
+
`:!g&&p===`
|
|
188
|
+
`&&(p=`
|
|
189
|
+
|
|
190
|
+
`),m+=p+_.slice(c)+k,p=`
|
|
191
|
+
`,g=!0):k===""?p===`
|
|
192
|
+
`?m+=`
|
|
193
|
+
`:p=`
|
|
194
|
+
`:(m+=p+k,p=" ",g=!1)}switch(i.chomp){case"-":break;case"+":for(let b=o;b<a.length;++b)m+=`
|
|
195
|
+
`+a[b][0].slice(c);m[m.length-1]!==`
|
|
196
|
+
`&&(m+=`
|
|
197
|
+
`);break;default:m+=`
|
|
198
|
+
`}let v=r+i.length+t.source.length;return{value:m,type:s,comment:i.comment,range:[r,v,v]}}function Ife({offset:e,props:t},n,r){if(t[0].type!=="block-scalar-header")return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],s=i[0],a=0,o="",c=-1;for(let p=1;p<i.length;++p){let g=i[p];if(!o&&(g==="-"||g==="+"))o=g;else{let v=Number(g);!a&&v?a=v:c===-1&&(c=e+p)}}c!==-1&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let l=!1,f="",m=i.length;for(let p=1;p<t.length;++p){let g=t[p];switch(g.type){case"space":l=!0;case"newline":m+=g.source.length;break;case"comment":n&&!l&&r(g,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),m+=g.source.length,f=g.source.substring(1);break;case"error":r(g,"UNEXPECTED_TOKEN",g.message),m+=g.source.length;break;default:{let v=`Unexpected token in block scalar header: ${g.type}`;r(g,"UNEXPECTED_TOKEN",v);let b=g.source;b&&typeof b=="string"&&(m+=b.length)}}}return{mode:s,indent:a,chomp:o,comment:f,length:m}}function Mfe(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let a=1;a<t.length;a+=2)s.push([t[a],t[a+1]]);return s}S4.resolveBlockScalar=qfe});var aw=x(w4=>{"use strict";d();var sw=ht(),Rfe=Nc();function Dfe(e,t,n){let{offset:r,type:i,source:s,end:a}=e,o,c,l=(p,g,v)=>n(r+p,g,v);switch(i){case"scalar":o=sw.Scalar.PLAIN,c=jfe(s,l);break;case"single-quoted-scalar":o=sw.Scalar.QUOTE_SINGLE,c=Bfe(s,l);break;case"double-quoted-scalar":o=sw.Scalar.QUOTE_DOUBLE,c=Ffe(s,l);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}let f=r+s.length,m=Rfe.resolveEnd(a,f,t,n);return{value:c,type:o,comment:m.comment,range:[r,f,m.offset]}}function jfe(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),T4(e)}function Bfe(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),T4(e.slice(1,-1)).replace(/''/g,"'")}function T4(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
199
|
+
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
200
|
+
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],s=" ",a=t.lastIndex;for(n.lastIndex=a;r=n.exec(e);)r[1]===""?s===`
|
|
201
|
+
`?i+=s:s=`
|
|
202
|
+
`:(i+=s+r[1],s=" "),a=n.lastIndex;let o=/[ \t]*(.*)/sy;return o.lastIndex=a,r=o.exec(e),i+s+(r?.[1]??"")}function Ffe(e,t){let n="";for(let r=1;r<e.length-1;++r){let i=e[r];if(!(i==="\r"&&e[r+1]===`
|
|
203
|
+
`))if(i===`
|
|
204
|
+
`){let{fold:s,offset:a}=Vfe(e,r);n+=s,r=a}else if(i==="\\"){let s=e[++r],a=$fe[s];if(a)n+=a;else if(s===`
|
|
205
|
+
`)for(s=e[r+1];s===" "||s===" ";)s=e[++r+1];else if(s==="\r"&&e[r+1]===`
|
|
206
|
+
`)for(s=e[++r+1];s===" "||s===" ";)s=e[++r+1];else if(s==="x"||s==="u"||s==="U"){let o=s==="x"?2:s==="u"?4:8;n+=Ufe(e,r+1,o,t),r+=o}else{let o=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),n+=o}}else if(i===" "||i===" "){let s=r,a=e[r+1];for(;a===" "||a===" ";)a=e[++r+1];a!==`
|
|
207
|
+
`&&!(a==="\r"&&e[r+2]===`
|
|
208
|
+
`)&&(n+=r>s?e.slice(s,r+1):i)}else n+=i}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function Vfe(e,t){let n="",r=e[t+1];for(;(r===" "||r===" "||r===`
|
|
209
|
+
`||r==="\r")&&!(r==="\r"&&e[t+2]!==`
|
|
210
|
+
`);)r===`
|
|
211
|
+
`&&(n+=`
|
|
212
|
+
`),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}var $fe={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
213
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Ufe(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let o=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}}w4.resolveFlowScalar=Dfe});var A4=x(E4=>{"use strict";d();var Ua=Ee(),x4=ht(),Hfe=iw(),zfe=aw();function Wfe(e,t,n,r){let{value:i,type:s,comment:a,range:o}=t.type==="block-scalar"?Hfe.resolveBlockScalar(e,t,r):zfe.resolveFlowScalar(t,e.options.strict,r),c=n?e.directives.tagName(n.source,m=>r(n,"TAG_RESOLVE_FAILED",m)):null,l;e.options.stringKeys&&e.atKey?l=e.schema[Ua.SCALAR]:c?l=Gfe(e.schema,i,c,n,r):t.type==="scalar"?l=Jfe(e,i,t,r):l=e.schema[Ua.SCALAR];let f;try{let m=l.resolve(i,p=>r(n??t,"TAG_RESOLVE_FAILED",p),e.options);f=Ua.isScalar(m)?m:new x4.Scalar(m)}catch(m){let p=m instanceof Error?m.message:String(m);r(n??t,"TAG_RESOLVE_FAILED",p),f=new x4.Scalar(i)}return f.range=o,f.source=i,s&&(f.type=s),c&&(f.tag=c),l.format&&(f.format=l.format),a&&(f.comment=a),f}function Gfe(e,t,n,r,i){if(n==="!")return e[Ua.SCALAR];let s=[];for(let o of e.tags)if(!o.collection&&o.tag===n)if(o.default&&o.test)s.push(o);else return o;for(let o of s)if(o.test?.test(t))return o;let a=e.knownTags[n];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Ua.SCALAR])}function Jfe({atKey:e,directives:t,schema:n},r,i,s){let a=n.tags.find(o=>(o.default===!0||e&&o.default==="key")&&o.test?.test(r))||n[Ua.SCALAR];if(n.compat){let o=n.compat.find(c=>c.default&&c.test?.test(r))??n[Ua.SCALAR];if(a.tag!==o.tag){let c=t.tagString(a.tag),l=t.tagString(o.tag),f=`Value may be parsed as either ${c} or ${l}`;s(i,"TAG_RESOLVE_FAILED",f,!0)}}return a}E4.composeScalar=Wfe});var N4=x(O4=>{"use strict";d();function Kfe(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let i=t[r];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}for(i=t[++r];i?.type==="space";)e+=i.source.length,i=t[++r];break}}return e}O4.emptyScalarPosition=Kfe});var L4=x(cw=>{"use strict";d();var Yfe=Rl(),Qfe=Ee(),Xfe=k4(),P4=A4(),Zfe=Nc(),ede=N4(),tde={composeNode:C4,composeEmptyNode:ow};function C4(e,t,n,r){let i=e.atKey,{spaceBefore:s,comment:a,anchor:o,tag:c}=n,l,f=!0;switch(t.type){case"alias":l=nde(e,t,r),(o||c)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=P4.composeScalar(e,t,c,r),o&&(l.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=Xfe.composeCollection(tde,e,t,n,r),o&&(l.anchor=o.source.substring(1))}catch(m){let p=m instanceof Error?m.message:String(m);r(t,"RESOURCE_EXHAUSTION",p)}break;default:{let m=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",m),f=!1}}return l??(l=ow(e,t.offset,void 0,null,n,r)),o&&l.anchor===""&&r(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&e.options.stringKeys&&(!Qfe.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&r(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(l.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?l.comment=a:l.commentBefore=a),e.options.keepSourceTokens&&f&&(l.srcToken=t),l}function ow(e,t,n,r,{spaceBefore:i,comment:s,anchor:a,tag:o,end:c},l){let f={type:"scalar",offset:ede.emptyScalarPosition(t,n,r),indent:-1,source:""},m=P4.composeScalar(e,f,o,l);return a&&(m.anchor=a.source.substring(1),m.anchor===""&&l(a,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(m.spaceBefore=!0),s&&(m.comment=s,m.range[2]=c),m}function nde({options:e},{offset:t,source:n,end:r},i){let s=new Yfe.Alias(n.substring(1));s.source===""&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=t+n.length,o=Zfe.resolveEnd(r,a,e.strict,i);return s.range=[t,a,o.offset],o.comment&&(s.comment=o.comment),s}cw.composeEmptyNode=ow;cw.composeNode=C4});var M4=x(I4=>{"use strict";d();var rde=Xl(),q4=L4(),ide=Nc(),sde=nf();function ade(e,t,{offset:n,start:r,value:i,end:s},a){let o=Object.assign({_directives:t},e),c=new rde.Document(void 0,o),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},f=sde.resolveProps(r,{indicator:"doc-start",next:i??s?.[0],offset:n,onError:a,parentIndent:0,startOnNewline:!0});f.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!f.hasNewline&&a(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?q4.composeNode(l,i,f,a):q4.composeEmptyNode(l,f.end,r,null,f,a);let m=c.contents.range[2],p=ide.resolveEnd(s,m,!1,a);return p.comment&&(c.comment=p.comment),c.range=[n,m,p.offset],c}I4.composeDoc=ade});var lw=x(j4=>{"use strict";d();var ode=ce("process"),cde=KT(),ude=Xl(),rf=tf(),R4=Ee(),lde=M4(),fde=Nc();function sf(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function D4(e){let t="",n=!1,r=!1;for(let i=0;i<e.length;++i){let s=e[i];switch(s[0]){case"#":t+=(t===""?"":r?`
|
|
214
|
+
|
|
215
|
+
`:`
|
|
216
|
+
`)+(s.substring(1)||" "),n=!0,r=!1;break;case"%":e[i+1]?.[0]!=="#"&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var uw=class{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,i,s)=>{let a=sf(n);s?this.warnings.push(new rf.YAMLWarning(a,r,i)):this.errors.push(new rf.YAMLParseError(a,r,i))},this.directives=new cde.Directives({version:t.version||"1.2"}),this.options=t}decorate(t,n){let{comment:r,afterEmptyLine:i}=D4(this.prelude);if(r){let s=t.contents;if(n)t.comment=t.comment?`${t.comment}
|
|
217
|
+
${r}`:r;else if(i||t.directives.docStart||!s)t.commentBefore=r;else if(R4.isCollection(s)&&!s.flow&&s.items.length>0){let a=s.items[0];R4.isPair(a)&&(a=a.key);let o=a.commentBefore;a.commentBefore=o?`${r}
|
|
218
|
+
${o}`:r}else{let a=s.commentBefore;s.commentBefore=a?`${r}
|
|
219
|
+
${a}`:r}}if(n){for(let s=0;s<this.errors.length;++s)t.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)t.warnings.push(this.warnings[s])}else t.errors=this.errors,t.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:D4(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,r=-1){for(let i of t)yield*this.next(i);yield*this.end(n,r)}*next(t){switch(ode.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(n,r,i)=>{let s=sf(t);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{let n=lde.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{let n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new rf.YAMLParseError(sf(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new rf.YAMLParseError(sf(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let n=fde.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
|
|
220
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new rf.YAMLParseError(sf(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){let r=Object.assign({_directives:this.directives},this.options),i=new ude.Document(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}};j4.Composer=uw});var V4=x(xy=>{"use strict";d();var dde=iw(),pde=aw(),hde=tf(),B4=Vl();function mde(e,t=!0,n){if(e){let r=(i,s,a)=>{let o=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(o,s,a);else throw new hde.YAMLParseError([o,o+1],s,a)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return pde.resolveFlowScalar(e,t,r);case"block-scalar":return dde.resolveBlockScalar({options:{strict:t}},e,r)}}return null}function gde(e,t){let{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:s=-1,type:a="PLAIN"}=t,o=B4.stringifyString({type:a,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=t.end??[{type:"newline",offset:-1,indent:r,source:`
|
|
221
|
+
`}];switch(o[0]){case"|":case">":{let l=o.indexOf(`
|
|
222
|
+
`),f=o.substring(0,l),m=o.substring(l+1)+`
|
|
223
|
+
`,p=[{type:"block-scalar-header",offset:s,indent:r,source:f}];return F4(p,c)||p.push({type:"newline",offset:-1,indent:r,source:`
|
|
224
|
+
`}),{type:"block-scalar",offset:s,indent:r,props:p,source:m}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:o,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:o,end:c};default:return{type:"scalar",offset:s,indent:r,source:o,end:c}}}function yde(e,t,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:a}=n,o="indent"in e?e.indent:null;if(r&&typeof o=="number"&&(o+=2),!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let l=e.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let c=B4.stringifyString({type:a,value:t},{implicitKey:i||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":_de(e,c);break;case'"':fw(e,c,"double-quoted-scalar");break;case"'":fw(e,c,"single-quoted-scalar");break;default:fw(e,c,"scalar")}}function _de(e,t){let n=t.indexOf(`
|
|
225
|
+
`),r=t.substring(0,n),i=t.substring(n+1)+`
|
|
226
|
+
`;if(e.type==="block-scalar"){let s=e.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,e.source=i}else{let{offset:s}=e,a="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:s,indent:a,source:r}];F4(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:a,source:`
|
|
227
|
+
`});for(let c of Object.keys(e))c!=="type"&&c!=="offset"&&delete e[c];Object.assign(e,{type:"block-scalar",indent:a,props:o,source:i})}}function F4(e,t){if(t)for(let n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function fw(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{let r=e.props.slice(1),i=t.length;e.props[0].type==="block-scalar-header"&&(i-=e.props[0].source.length);for(let s of r)s.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{let i={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
|
|
228
|
+
`};delete e.items,Object.assign(e,{type:n,source:t,end:[i]});break}default:{let r="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(e))s!=="type"&&s!=="offset"&&delete e[s];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}xy.createScalarToken=gde;xy.resolveAsScalar=mde;xy.setScalarValue=yde});var U4=x($4=>{"use strict";d();var vde=e=>"type"in e?Ay(e):Ey(e);function Ay(e){switch(e.type){case"block-scalar":{let t="";for(let n of e.props)t+=Ay(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(let n of e.items)t+=Ey(n);return t}case"flow-collection":{let t=e.start.source;for(let n of e.items)t+=Ey(n);for(let n of e.end)t+=n.source;return t}case"document":{let t=Ey(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function Ey({start:e,key:t,sep:n,value:r}){let i="";for(let s of e)i+=s.source;if(t&&(i+=Ay(t)),n)for(let s of n)i+=s.source;return r&&(i+=Ay(r)),i}$4.stringify=vde});var G4=x(W4=>{"use strict";d();var dw=Symbol("break visit"),bde=Symbol("skip children"),H4=Symbol("remove item");function Ha(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),z4(Object.freeze([]),e,t)}Ha.BREAK=dw;Ha.SKIP=bde;Ha.REMOVE=H4;Ha.itemAtPath=(e,t)=>{let n=e;for(let[r,i]of t){let s=n?.[r];if(s&&"items"in s)n=s.items[i];else return}return n};Ha.parentCollection=(e,t)=>{let n=Ha.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function z4(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(let i of["key","value"]){let s=t[i];if(s&&"items"in s){for(let a=0;a<s.items.length;++a){let o=z4(Object.freeze(e.concat([[i,a]])),s.items[a],n);if(typeof o=="number")a=o-1;else{if(o===dw)return dw;o===H4&&(s.items.splice(a,1),a-=1)}}typeof r=="function"&&i==="key"&&(r=r(t,e))}}return typeof r=="function"?r(t,e):r}W4.visit=Ha});var Oy=x(fn=>{"use strict";d();var pw=V4(),kde=U4(),Sde=G4(),hw="\uFEFF",mw="",gw="",yw="",Tde=e=>!!e&&"items"in e,wde=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function xde(e){switch(e){case hw:return"<BOM>";case mw:return"<DOC>";case gw:return"<FLOW_END>";case yw:return"<SCALAR>";default:return JSON.stringify(e)}}function Ede(e){switch(e){case hw:return"byte-order-mark";case mw:return"doc-mode";case gw:return"flow-error-end";case yw:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
229
|
+
`:case`\r
|
|
230
|
+
`: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(e[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}fn.createScalarToken=pw.createScalarToken;fn.resolveAsScalar=pw.resolveAsScalar;fn.setScalarValue=pw.setScalarValue;fn.stringify=kde.stringify;fn.visit=Sde.visit;fn.BOM=hw;fn.DOCUMENT=mw;fn.FLOW_END=gw;fn.SCALAR=yw;fn.isCollection=Tde;fn.isScalar=wde;fn.prettyToken=xde;fn.tokenType=Ede});var bw=x(K4=>{"use strict";d();var af=Oy();function yr(e){switch(e){case void 0:case" ":case`
|
|
231
|
+
`:case"\r":case" ":return!0;default:return!1}}var J4=new Set("0123456789ABCDEFabcdef"),Ade=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ny=new Set(",[]{}"),Ode=new Set(` ,[]{}
|
|
232
|
+
\r `),_w=e=>!e||Ode.has(e),vw=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(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
|
|
233
|
+
`?!0:n==="\r"?this.buffer[t+1]===`
|
|
234
|
+
`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+t];if(n==="\r"){let i=this.buffer[r+t+1];if(i===`
|
|
235
|
+
`||!i&&!this.atEnd)return t+r+1}return n===`
|
|
236
|
+
`||r>=this.indentNext||!n&&!this.atEnd?t+r:-1}if(n==="-"||n==="."){let r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&yr(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
|
|
237
|
+
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){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 t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===af.BOM&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,r=t.indexOf("#");for(;r!==-1;){let s=t[r-1];if(s===" "||s===" "){n=r-1;break}else r=t.indexOf("#",r+1)}for(;;){let s=t[n-1];if(s===" "||s===" ")n-=1;else break}let i=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield af.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&yr(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!yr(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&yr(n)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);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(_w),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,r=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&i[0]!=="#"||r===0&&(i.startsWith("---")||i.startsWith("..."))&&yr(i[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield af.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(_w),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||yr(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 t=this.charAt(0),n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let s=0;for(;this.buffer[n-1-s]==="\\";)s+=1;if(s%2===0)break;n=this.buffer.indexOf('"',n+1)}let r=this.buffer.substring(0,n),i=r.indexOf(`
|
|
238
|
+
`,this.pos);if(i!==-1){for(;i!==-1;){let s=this.continueScalar(i+1);if(s===-1)break;i=r.indexOf(`
|
|
239
|
+
`,s)}i!==-1&&(n=i-(r[i-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){let n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>yr(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":n+=1;break;case`
|
|
240
|
+
`:t=s,n=0;break;case"\r":{let a=this.buffer[s+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
|
|
241
|
+
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(t+1);if(s===-1)break;t=this.buffer.indexOf(`
|
|
242
|
+
`,s)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let i=t+1;for(r=this.buffer[i];r===" ";)r=this.buffer[++i];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
243
|
+
`;)r=this.buffer[++i];t=i-1}else if(!this.blockScalarKeep)do{let s=t-1,a=this.buffer[s];a==="\r"&&(a=this.buffer[--s]);let o=s;for(;a===" ";)a=this.buffer[--s];if(a===`
|
|
244
|
+
`&&s>=this.pos&&s+1+n>o)t=s;else break}while(!0);return yield af.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let t=this.flowLevel>0,n=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){let s=this.buffer[r+1];if(yr(s)||t&&Ny.has(s))break;n=r}else if(yr(i)){let s=this.buffer[r+1];if(i==="\r"&&(s===`
|
|
245
|
+
`?(r+=1,i=`
|
|
246
|
+
`,s=this.buffer[r+1]):n=r),s==="#"||t&&Ny.has(s))break;if(i===`
|
|
247
|
+
`){let a=this.continueScalar(r+1);if(a===-1)break;r=Math.max(r,a-2)}}else{if(t&&Ny.has(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield af.SCALAR,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){let r=this.buffer.slice(this.pos,t);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(_w),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let n=this.flowLevel>0,r=this.charAt(1);if(yr(r)||n&&Ny.has(r)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!yr(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(Ade.has(n))n=this.buffer[++t];else if(n==="%"&&J4.has(this.buffer[t+1])&&J4.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){let t=this.buffer[this.pos];return t===`
|
|
248
|
+
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
249
|
+
`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||t&&r===" ");let i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(t){let n=this.pos,r=this.buffer[n];for(;!t(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};K4.Lexer=vw});var Sw=x(Y4=>{"use strict";d();var kw=class{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,r=this.lineStarts.length;for(;n<r;){let s=n+r>>1;this.lineStarts[s]<t?n=s+1:r=s}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};let i=this.lineStarts[n-1];return{line:n,col:t-i+1}}}};Y4.LineCounter=kw});var ww=x(t$=>{"use strict";d();var Nde=ce("process"),Q4=Oy(),Pde=bw();function ms(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function X4(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function e$(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Py(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Pc(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function Cy(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function Z4(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!ms(t.start,"explicit-key-ind")&&!ms(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,e$(t.value)?t.value.end?Cy(t.value.end,t.sep):t.value.end=t.sep:Cy(t.start,t.sep),delete t.sep)}var Tw=class{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Pde.Lexer,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(t,n))yield*this.next(r);n||(yield*this.end())}*next(t){if(this.source=t,Nde.env.LOG_TOKENS&&console.log("|",Q4.prettyToken(t)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}let n=Q4.tokenType(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{let r=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:t}),this.offset+=t.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 t=this.peek(1);if(this.type==="doc-end"&&t?.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(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){let n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Z4(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{let i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:n}):i.value=n;break}case"flow-collection":{let i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&X4(i.start)===-1&&(n.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<n.indent))&&(r.type==="document"?r.end=i.start:r.items.push({start:i.start}),n.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 t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{X4(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}let n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){let n=Py(this.peek(2)),r=Pc(n),i;t.end?(i=t.end,i.push(this.sourceToken),delete t.end):i=[this.sourceToken];let s={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:r,key:t,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
250
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
251
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){let i=t.items[t.items.length-2]?.value?.end;if(Array.isArray(i)){Cy(i,n.start),i.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){let r=!this.onKeyLine&&this.indent===t.indent,i=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",s=[];if(i&&n.sep&&!n.value){let a=[];for(let o=0;o<n.sep.length;++o){let c=n.sep[o];switch(c.type){case"newline":a.push(o);break;case"space":break;case"comment":c.indent>t.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(s=n.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(s.push(this.sourceToken),t.items.push({start:s}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):i||n.value?(s.push(this.sourceToken),t.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(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ms(n.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(e$(n.key)&&!ms(n.sep,"newline")){let a=Pc(n.start),o=n.key,c=n.sep;c.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:o,sep:c}]})}else s.length>0?n.sep=n.sep.concat(s,this.sourceToken):n.sep.push(this.sourceToken);else if(ms(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let a=Pc(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?t.items.push({start:s,key:null,sep:[this.sourceToken]}):ms(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{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||n.value?(t.items.push({start:s,key:a,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(a):(Object.assign(n,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(t);if(a){if(a.type==="block-seq"){if(!n.explicitKey&&n.sep&&!ms(n.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 r&&t.items.push({start:s});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){let i=t.items[t.items.length-2]?.value?.end;if(Array.isArray(i)){Cy(i,n.start),i.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||ms(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){let r=this.startBlockValue(t);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let i=Py(r),s=Pc(i);Z4(t);let a=t.end.splice(1,t.end.length);a.push(this.sourceToken);let o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:s,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
|
|
252
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
253
|
+
`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){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 n=Py(t),r=Pc(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=Py(t),r=Pc(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){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:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};t$.Parser=Tw});var a$=x(cf=>{"use strict";d();var n$=lw(),Cde=Xl(),of=tf(),Lde=c1(),qde=Ee(),Ide=Sw(),r$=ww();function i$(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Ide.LineCounter||null,prettyErrors:t}}function Mde(e,t={}){let{lineCounter:n,prettyErrors:r}=i$(t),i=new r$.Parser(n?.addNewLine),s=new n$.Composer(t),a=Array.from(s.compose(i.parse(e)));if(r&&n)for(let o of a)o.errors.forEach(of.prettifyError(e,n)),o.warnings.forEach(of.prettifyError(e,n));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}function s$(e,t={}){let{lineCounter:n,prettyErrors:r}=i$(t),i=new r$.Parser(n?.addNewLine),s=new n$.Composer(t),a=null;for(let o of s.compose(i.parse(e),!0,e.length))if(!a)a=o;else if(a.options.logLevel!=="silent"){a.errors.push(new of.YAMLParseError(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(a.errors.forEach(of.prettifyError(e,n)),a.warnings.forEach(of.prettifyError(e,n))),a}function Rde(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let i=s$(e,n);if(!i)return null;if(i.warnings.forEach(s=>Lde.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:r},n))}function Dde(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){let i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){let{keepUndefined:i}=n??t??{};if(!i)return}return qde.isDocument(e)&&!r?e.toString(n):new Cde.Document(e,r,n).toString(n)}cf.parse=Rde;cf.parseAllDocuments=Mde;cf.parseDocument=s$;cf.stringify=Dde});var c$=x(Me=>{"use strict";d();var jde=lw(),Bde=Xl(),Fde=H1(),xw=tf(),Vde=Rl(),gs=Ee(),$de=fs(),Ude=ht(),Hde=ps(),zde=hs(),Wde=Oy(),Gde=bw(),Jde=Sw(),Kde=ww(),Ly=a$(),o$=Ll();Me.Composer=jde.Composer;Me.Document=Bde.Document;Me.Schema=Fde.Schema;Me.YAMLError=xw.YAMLError;Me.YAMLParseError=xw.YAMLParseError;Me.YAMLWarning=xw.YAMLWarning;Me.Alias=Vde.Alias;Me.isAlias=gs.isAlias;Me.isCollection=gs.isCollection;Me.isDocument=gs.isDocument;Me.isMap=gs.isMap;Me.isNode=gs.isNode;Me.isPair=gs.isPair;Me.isScalar=gs.isScalar;Me.isSeq=gs.isSeq;Me.Pair=$de.Pair;Me.Scalar=Ude.Scalar;Me.YAMLMap=Hde.YAMLMap;Me.YAMLSeq=zde.YAMLSeq;Me.CST=Wde;Me.Lexer=Gde.Lexer;Me.LineCounter=Jde.LineCounter;Me.Parser=Kde.Parser;Me.parse=Ly.parse;Me.parseAllDocuments=Ly.parseAllDocuments;Me.parseDocument=Ly.parseDocument;Me.stringify=Ly.stringify;Me.visit=o$.visit;Me.visitAsync=o$.visitAsync});var qy=x(ys=>{"use strict";d();Object.defineProperty(ys,"__esModule",{value:!0});ys.ConvenienceSeverities=ys.LegacyIdentifiers=ys.ModernIdentifiers=void 0;var uf=tn();ys.ModernIdentifiers=["theme-check:nothing","theme-check:recommended","theme-check:theme-app-extension","theme-check:all"];ys.LegacyIdentifiers=new Map(Object.entries({default:"theme-check:recommended",recommended:"theme-check:recommended",all:"theme-check:all",nothing:"theme-check:nothing",theme_app_extension:"theme-check:theme-app-extension",theme_app_extensions:"theme-check:theme-app-extension","theme-app-extension":"theme-check:theme-app-extension","theme-app-extensions":"theme-check:theme-app-extension"}));ys.ConvenienceSeverities={suggestion:uf.Severity.WARNING,style:uf.Severity.INFO,error:uf.Severity.ERROR,warning:uf.Severity.WARNING,info:uf.Severity.INFO}});var h$=x(ff=>{"use strict";d();var l$=ff&&ff.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ff,"__esModule",{value:!0});ff.readYamlConfigDescription=tpe;var f$=tn(),Yde=ce("node:fs"),Qde=l$(ce("node:fs/promises")),Xde=ce("node:module"),Iy=l$(ce("node:path")),Zde=c$(),lf=qy(),Aw=class extends Error{constructor(t,n){super(t),this.name="UnresolvedAliasError",this.message=`YAML parsing error: Unresolved alias *${n}.
|
|
254
|
+
Did you forget to wrap your ignore statement in quotes? '*${n}'
|
|
255
|
+
${t}`}};function epe(e,t){try{let n=t.trim()===""?{}:(0,Zde.parse)(t);if(!p$(n))throw new Error(`Expecting parsed contents of config file at path '${e}' to be a plain object`);return n}catch(n){if(n instanceof Error&&n.name==="ReferenceError"&&n.message.includes("Unresolved alias")&&/: .*$/m.test(n.message)){let r=/: .*$/m.exec(n.message)[0].slice(2);throw new Aw(n.message,r)}else throw n}}async function tpe(e,t=!1){let n=Iy.default.dirname(e),r=await Qde.default.readFile(e,"utf8"),i=epe(e,r),s={checkSettings:{},ignore:[],extends:[],require:[]};i.root&&(s.root=i.root,delete i.root),i.ignore&&(s.ignore=Ew(i.ignore),delete i.ignore),i.require&&(s.require=Ew(i.require).map(a=>d$(n,a)).filter(Ow),delete i.require),i.extends?(s.extends=Ew(i.extends).map(a=>u$(n,a)).filter(Ow),delete i.extends):t&&(s.extends=[u$(n,"theme-check:recommended")]),i.context&&(f$.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,o]of Object.entries(i)){if(!p$(o))throw new Error(`Expected a plain object value for ${a} but got ${typeof o}`);s.checkSettings[a]=npe(o)}return s}function u$(e,t){return t.startsWith(":")||lf.LegacyIdentifiers.has(t)?lf.LegacyIdentifiers.get(t.replace(/^:/,"")):t.startsWith("theme-check:")?t:d$(e,t)}function d$(e,t){if(Iy.default.isAbsolute(t))return t;if(t.startsWith("."))return Iy.default.resolve(e,t);let n=(0,Xde.createRequire)(Iy.default.join(e,"__placeholder"));return(0,Yde.realpathSync)(n.resolve(t))}function npe(e){let t={enabled:e.enabled||!0};for(let[n,r]of Object.entries(e))t[ape(n)]=r;return e.ignore!==void 0&&Array.isArray(e.ignore)&&e.ignore.every(Ow)&&(t.ignore=e.ignore),e.severity!==void 0&&(t.severity=rpe(e.severity)),t}function rpe(e){if(ipe(e))return lf.ConvenienceSeverities[e];if(spe(e))return e;throw new Error(`Unsupported severity: ${e}. Try one of ${Object.keys(lf.ConvenienceSeverities)}`)}function ipe(e){return typeof e=="string"&&e in lf.ConvenienceSeverities}function spe(e){return typeof e=="number"&&e in f$.Severity}function ape(e){return e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase())}function p$(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ow(e){return typeof e=="string"}function Ew(e){return Array.isArray(e)?e:[e]}});var _$=x(Nw=>{"use strict";d();Object.defineProperty(Nw,"__esModule",{value:!0});Nw.mergeFragments=ope;function ope(e,t){return{root:m$(e.map(n=>n.root),t.root),extends:[],ignore:e.flatMap(n=>n.ignore).concat(t.ignore),require:e.flatMap(n=>n.require).concat(t.require),checkSettings:e.map(n=>n.checkSettings).concat(t.checkSettings).reduce(y$),context:m$(e.map(n=>n.context),t.context)??"theme"}}function m$(e,t){return e.concat(t).filter(Boolean).pop()}function y$(e,t){let n={...e};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(g$(e[r])&&g$(t[r])?n[r]=y$(e[r],t[r]):n[r]=t[r]);return n}function g$(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}});var b$=x(df=>{"use strict";d();var cpe=df&&df.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(df,"__esModule",{value:!0});df.resolveConfig=Pw;var v$=cpe(ce("node:path")),upe=h$(),lpe=_$(),fpe=qy(),dpe=()=>v$.default.resolve(__dirname,"./configs");async function Pw(e,t=!1,n=[]){if(ppe(e)){let a=v$.default.join(dpe(),e.replace(/^theme-check:/,"")+".yml");return Pw(a,!1,n)}let r=[...n,e];if(n.includes(e))throw new Error(`Cyclic extends in theme-check config: ${r.join(" -> ")}`);let i=await(0,upe.readYamlConfigDescription)(e,t),s=await Promise.all(i.extends.map(a=>Pw(a,!1,r)));return(0,lpe.mergeFragments)(s,i)}function ppe(e){return fpe.ModernIdentifiers.includes(e)}});var k$=x(My=>{"use strict";d();Object.defineProperty(My,"__esModule",{value:!0});My.resolveConfig=void 0;var hpe=b$();Object.defineProperty(My,"resolveConfig",{enumerable:!0,get:function(){return hpe.resolveConfig}})});var T$=x(Iw=>{"use strict";d();Object.defineProperty(Iw,"__esModule",{value:!0});Iw.validateConfig=mpe;var qw=ce("node:assert");function mpe(e){for(let t of e.checks){let n=e.settings[t.meta.code];(0,qw.strict)(n,`Unexpected missing settings for ${t.meta.code} in validateConfig call`),gpe(t.meta.code,t.meta.schema,n,!0)}}function gpe(e,t,n,r){for(let i in t){let s=t[i],a=n[i];Cw(i,a,s)}r&&ype(n),_pe(e,t,n)}function ype(e){let{severity:t,enabled:n,ignore:r}=e;t===void 0||Lw("severity","number",typeof t),Lw("enabled","boolean",typeof n),r===void 0||S$("ignore",r)}function _pe(e,t,n){let r=["enabled","severity","ignore"];for(let i in n)!(i in t)&&!r.includes(i)&&console.error(`Unexpected setting: ${i} for check ${e} found in configuration`)}function Cw(e,t,n){let{type:r,optional:i,defaultValue:s,properties:a,itemType:o}=n.options;if(t===void 0){if(i!==!0&&s===void 0)throw new Error(`Missing required setting: ${e}`);return}if(!(s!==void 0&&t===s))switch(r){case"string":case"number":case"boolean":{Lw(e,r,typeof t);break}case"object":{if(typeof t!="object"||t===null||Array.isArray(t))throw new Error(`Invalid type for setting ${e}: expected object, got ${typeof t}`);for(let c in a)Cw(c,t[c],a[c]);break}case"array":{if(S$(e,t),o)for(let c of t)Cw(e,c,o);break}default:throw new Error(`Unexpected setting type: ${r}`)}}function Lw(e,t,n){qw.strict.strictEqual(n,t,`Invalid type for setting ${e}: expected ${t}, got ${n}`)}function S$(e,t){qw.strict.ok(Array.isArray(t),`Invalid type for setting ${e}: expected array, got ${typeof t}`)}});var w$=x(pf=>{"use strict";d();var vpe=pf&&pf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pf,"__esModule",{value:!0});pf.loadConfig=wpe;var bpe=vF(),kpe=k$(),Spe=T$(),Tpe=vpe(ce("fs/promises"));async function wpe(e,t,n={}){if(!t)throw new Error("loadConfig cannot be called without a root argument");let r="theme-check:recommended";e||(await Tpe.default.readdir(t)).some(o=>o.endsWith(".extension.toml")||o.endsWith(".app.toml"))&&(r="theme-check:theme-app-extension");let i=await(0,kpe.resolveConfig)(e??r,!0),s=await(0,bpe.loadConfigDescription)(i,t,n);return(0,Spe.validateConfig)(s),s}});var x$=x(hf=>{"use strict";d();var xpe=hf&&hf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hf,"__esModule",{value:!0});hf.findConfigPath=Npe;var Epe=xpe(ce("node:path")),Ape=UT(),Ope=[".theme-check.yml"];function Npe(e){let t=Ope.map(n=>Epe.default.join(e,n));return Ppe(t,Ape.fileExists)}async function Ppe(e,t){for(let n of e)if(await t(n))return n}});var E$=x(Cc=>{"use strict";d();Object.defineProperty(Cc,"__esModule",{value:!0});Cc.findConfigPath=Cc.loadConfig=void 0;var Cpe=w$();Object.defineProperty(Cc,"loadConfig",{enumerable:!0,get:function(){return Cpe.loadConfig}});var Lpe=x$();Object.defineProperty(Cc,"findConfigPath",{enumerable:!0,get:function(){return Lpe.findConfigPath}})});var A$=x(Lc=>{"use strict";d();var qpe=Lc&&Lc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lc,"__esModule",{value:!0});Lc.NodeFileSystem=void 0;var _s=tn(),Mw=qpe(ce("node:fs/promises"));Lc.NodeFileSystem={async readFile(e){return Mw.default.readFile(_s.path.fsPath(e),"utf8")},async readDirectory(e){return(await Mw.default.readdir(_s.path.fsPath(e),{withFileTypes:!0})).map(n=>[_s.path.join(e,n.name),n.isDirectory()?_s.FileType.Directory:_s.FileType.File])},async stat(e){try{let t=await Mw.default.stat(_s.path.fsPath(e));return{type:t.isDirectory()?_s.FileType.Directory:_s.FileType.File,size:t.size}}catch(t){throw new Error(`Failed to get file stat: ${t}`)}}}});var Gpe=x(ot=>{"use strict";d();var Ipe=ot&&ot.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),N$=ot&&ot.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Ipe(t,e,n)},P$=ot&&ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ot,"__esModule",{value:!0});ot.loadConfig=ot.NodeFileSystem=void 0;ot.toSourceCode=L$;ot.check=zpe;ot.checkAndAutofix=Wpe;ot.themeCheckRun=Rw;ot.getThemeAndConfig=q$;ot.getTheme=I$;ot.getThemeFilesPathPattern=M$;var mt=tn(),Mpe=AB(),Rpe=BB(),Dpe=ue(),jpe=P$(ce("node:fs/promises")),mf=P$(ce("node:path")),Bpe=ce("node:util"),C$=ju(),Fpe=Ig(),Vpe=dF(),O$=E$(),qc=A$();Object.defineProperty(ot,"NodeFileSystem",{enumerable:!0,get:function(){return qc.NodeFileSystem}});var $pe=ce("node:url"),Upe=(0,Bpe.promisify)(Fpe);N$(tn(),ot);N$(qy(),ot);var Hpe=async(e,t,n={})=>(e??=await(0,O$.findConfigPath)(t),(0,O$.loadConfig)(e,t,n));ot.loadConfig=Hpe;async function L$(e){try{let t=await jpe.default.readFile(e,"utf8");return(0,mt.toSourceCode)(mt.path.normalize(C$.URI.file(e)),t)}catch{return}}async function zpe(e,t,n={}){return(await Rw(e,t,void 0,n)).offenses}async function Wpe(e,t,n={}){let{theme:r,offenses:i}=await Rw(e,t,void 0,n);await(0,Vpe.autofix)(r,i)}async function Rw(e,t,n=()=>{},r={}){let{theme:i,config:s}=await q$(e,t,r),a=new Rpe.ThemeLiquidDocsManager(n),c=(await mt.JSONValidator.create(a,s))?.isValid,l=i.map(w=>(0,mt.toSchema)(s.context,w.uri,w,c)),f=new Map(i.filter(w=>(0,mt.isBlock)(w.uri)).map(w=>[mf.default.basename(w.uri,".liquid"),(0,mt.memo)(async()=>(0,mt.toSchema)(s.context,w.uri,w,c))])),m=new Map(i.filter(w=>(0,mt.isSection)(w.uri)).map(w=>[mf.default.basename(w.uri,".liquid"),(0,mt.memo)(async()=>(0,mt.toSchema)(s.context,w.uri,w,c))])),p=new Map(i.map(w=>[mf.default.relative(C$.URI.file(e).toString(),w.uri),(0,mt.memo)(async()=>{let T=w.ast;if((0,Dpe.isLiquidHtmlNode)(T)&&(0,mt.filePathSupportsLiquidDoc)(w.uri))return(0,mt.extractDocDefinition)(w.uri,T)})])),g=new Map(i.filter(w=>w.uri.endsWith(".liquid")).map(w=>[w.uri,(0,mt.memo)(async()=>(0,mt.extractCSSClassesFromLiquidUri)(w.uri,qc.NodeFileSystem))]));try{let w=mt.path.join(s.rootUri,"assets"),T=await qc.NodeFileSystem.readDirectory(w);for(let[y]of T.filter(([A])=>A.endsWith(".css")))g.set(y,(0,mt.memo)(async()=>(0,mt.extractCSSClassesFromAssetUri)(y,qc.NodeFileSystem)))}catch{}let v=async w=>m.get(w)?.(),b=async w=>f.get(w)?.(),_;try{_=await(0,Mpe.buildThemeGraph)(s.rootUri,{fs:qc.NodeFileSystem,getSectionSchema:v,getBlockSchema:b,getWebComponentDefinitionReference:()=>{},mode:s.context})}catch{}let k=await(0,mt.check)(i,s,{fs:qc.NodeFileSystem,themeDocset:a,jsonValidationSet:a,getSectionSchema:v,getBlockSchema:b,getAppBlockSchema:async w=>f.get(w)?.(),getDocDefinition:async w=>p.get(w)?.(),getCSSClassesForURI:async w=>g.get(w)?.()??new Set,async getReferences(w){return _?_.modules[w]?.references??[]:[]},async getDependencies(w){return _?_.modules[w]?.dependencies??[]:[]}});return{theme:i,config:s,offenses:k}}async function q$(e,t,n={}){let r=await(0,ot.loadConfig)(t,e,n);return{theme:await I$(r),config:r}}async function I$(e){let t=M$(e.rootUri),n=await Upe(t,{absolute:!0}).then(i=>i.filter(s=>!(0,mt.isIgnored)(s,e)));return(await Promise.all(n.map(L$))).filter(i=>i!==void 0)}function M$(e){return mf.default.normalize(mf.default.join((0,$pe.fileURLToPath)(e),"**/*.{liquid,json}")).replace(/\\/g,"/")}});export{Gy as a,ue as b,NP as c,ju as d,gp as e,Ve as f,fe as g,oi as h,Wu as i,_p as j,vp as k,Hi as l,bp as m,qt as n,Sn as o,zi as p,Jt as q,Gu as r,Ju as s,kp as t,Nr as u,da as v,It as w,nt as x,Sp as y,Fo as z,Tp as A,Vo as B,wp as C,xp as D,Ep as E,Tn as F,Ap as G,Op as H,Np as I,Cp as J,Lp as K,qp as L,pa as M,ak as N,an as O,pK as P,bL as Q,$o as R,Obe as S,uk as T,ha as U,uq as V,lq as W,tn as X,AB as Y,BB as Z,wT as _,Lg as $,ZB as aa,uF as ba,c$ as ca,Gpe as da};
|
|
256
|
+
/*! Bundled license information:
|
|
257
|
+
|
|
258
|
+
isobject/index.js:
|
|
259
|
+
(*!
|
|
260
|
+
* isobject <https://github.com/jonschlinkert/isobject>
|
|
261
|
+
*
|
|
262
|
+
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
263
|
+
* Licensed under the MIT License.
|
|
264
|
+
*)
|
|
265
|
+
|
|
266
|
+
line-column/lib/line-column.js:
|
|
267
|
+
(**
|
|
268
|
+
* line-column - Convert efficiently index to/from line-column in a string
|
|
269
|
+
* @module lineColumn
|
|
270
|
+
* @license MIT
|
|
271
|
+
*)
|
|
272
|
+
|
|
273
|
+
cssesc/cssesc.js:
|
|
274
|
+
(*! https://mths.be/cssesc v3.0.0 by @mathias *)
|
|
275
|
+
*/
|