@shopify/cli 4.8.0 → 4.8.1
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-32PK45SE.js +1 -0
- package/dist/{analytics-OOT5AB52.js → analytics-TQHJN5PY.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-GRSF7456.js → chunk-22JJHQVU.js} +1 -1
- package/dist/{chunk-T4AA6TSF.js → chunk-2BHYBR2F.js} +1 -1
- package/dist/{chunk-DASVZTAX.js → chunk-2R6KOKWG.js} +1 -1
- package/dist/{chunk-A6BMJISP.js → chunk-32IIURQB.js} +1 -1
- package/dist/{chunk-G5XIGN5D.js → chunk-33PLVLCE.js} +1 -1
- package/dist/{chunk-YESGYUEL.js → chunk-36OXWMXZ.js} +1 -1
- package/dist/{chunk-TEY4LRY7.js → chunk-3A2HLI4D.js} +1 -1
- package/dist/{chunk-ZH44BDUR.js → chunk-3ACZB27E.js} +1 -1
- package/dist/{chunk-XUYVJEZG.js → chunk-3FTP36HH.js} +1 -1
- package/dist/{chunk-QERQARMC.js → chunk-3GAN6KS6.js} +1 -1
- package/dist/{chunk-OV6SRRXR.js → chunk-3LBHSZSR.js} +1 -1
- package/dist/chunk-3NVQXPTU.js +1 -0
- package/dist/{chunk-T7PJDT5O.js → chunk-3NYK63U4.js} +1 -1
- package/dist/{chunk-FUYDGK33.js → chunk-3R7OHZ4C.js} +1 -1
- package/dist/{chunk-T4QWK5GG.js → chunk-4ARQFW35.js} +1 -1
- package/dist/{chunk-OVV5YGKN.js → chunk-4ASQQTCD.js} +1 -1
- package/dist/chunk-4IG7WG6V.js +1 -0
- package/dist/{chunk-FJ6F4XRV.js → chunk-4QAM7ROJ.js} +1 -1
- package/dist/{chunk-O7DZXO3O.js → chunk-4QXDDAMD.js} +2 -2
- package/dist/{chunk-NW6NUGN7.js → chunk-562EV2EJ.js} +1 -1
- package/dist/{chunk-UAETNFN4.js → chunk-565SON6A.js} +1 -1
- package/dist/{chunk-E6N4PZZR.js → chunk-5AMPXLKT.js} +1 -1
- package/dist/{chunk-VD4XJ6BX.js → chunk-5CC4QYN4.js} +1 -1
- package/dist/{chunk-P57P7UAN.js → chunk-5G2W7QKA.js} +1 -1
- package/dist/{chunk-OZL5FTT7.js → chunk-5PWJTOWK.js} +1 -1
- package/dist/{chunk-IKUSLRGD.js → chunk-5THZTE44.js} +1 -1
- package/dist/{chunk-6RQOEPEC.js → chunk-5U4UTFA4.js} +1 -1
- package/dist/{chunk-7ISJRIPT.js → chunk-6633X2JU.js} +1 -1
- package/dist/{chunk-MYQUYU4U.js → chunk-6HMTAB2V.js} +1 -1
- package/dist/{chunk-2AK44UYM.js → chunk-6JC2PM43.js} +1 -1
- package/dist/{chunk-BZ73NV3L.js → chunk-6T5AZZUI.js} +1 -1
- package/dist/{chunk-CIWKN4HF.js → chunk-6U4BOZ73.js} +1 -1
- package/dist/{chunk-YSAFHVV6.js → chunk-6USL7BKQ.js} +1 -1
- package/dist/{chunk-YD2VQEN5.js → chunk-7CPYFKFK.js} +1 -1
- package/dist/{chunk-72ZY3KTF.js → chunk-7DGVNVW3.js} +1 -1
- package/dist/{chunk-GNBRCK7L.js → chunk-7DJNASBC.js} +1 -1
- package/dist/{chunk-YNDIZCD2.js → chunk-7DLMETRR.js} +1 -1
- package/dist/{chunk-CULTZLC4.js → chunk-7JG3CKDE.js} +1 -1
- package/dist/{chunk-SYLHT42O.js → chunk-7USNGNVI.js} +1 -1
- package/dist/{chunk-HP64ZTEJ.js → chunk-AICVQH4V.js} +1 -1
- package/dist/{chunk-3JXPOOFV.js → chunk-AINDVTMY.js} +3 -3
- package/dist/{chunk-NNZXKFOS.js → chunk-AVX7CIDJ.js} +1 -1
- package/dist/{chunk-CEYIZC3M.js → chunk-AXLLN6DZ.js} +1 -1
- package/dist/{chunk-PATTG7YZ.js → chunk-AXMSJ46T.js} +1 -1
- package/dist/{chunk-Q5KVMLBK.js → chunk-B3I7OMRN.js} +1 -1
- package/dist/{chunk-7HFHL5SO.js → chunk-BHDFVO2R.js} +1 -1
- package/dist/{chunk-2CIZE537.js → chunk-BKYTBTQ5.js} +1 -1
- package/dist/{chunk-7LWUHQIF.js → chunk-BMDCOBUR.js} +1 -1
- package/dist/{chunk-VSDRNYA5.js → chunk-CKZOLGWI.js} +1 -1
- package/dist/{chunk-S2TLBBSS.js → chunk-CSAVYME2.js} +1 -1
- package/dist/{chunk-XUUAKGEX.js → chunk-D2R7HPCT.js} +1 -1
- package/dist/{chunk-QOV43E26.js → chunk-DQVNW6EQ.js} +1 -1
- package/dist/{chunk-VXEYO3ZP.js → chunk-DS7OKDQN.js} +1 -1
- package/dist/chunk-E3FZRPNL.js +1 -0
- package/dist/{chunk-AWUX36VG.js → chunk-E7I5YT53.js} +1 -1
- package/dist/{chunk-HFSCXTJQ.js → chunk-EDHR546O.js} +1 -1
- package/dist/{chunk-IBI5UCJO.js → chunk-EIBQRJTQ.js} +1 -1
- package/dist/{chunk-Q6ADIMJM.js → chunk-F2DO3R6R.js} +1 -1
- package/dist/{chunk-WYBTC356.js → chunk-F5BTQI5W.js} +1 -1
- package/dist/{chunk-7T6M7FAC.js → chunk-FH36PGZH.js} +12 -12
- package/dist/{chunk-MNOQAXJW.js → chunk-FM6VJLE7.js} +1 -1
- package/dist/{chunk-HB347DXT.js → chunk-FZUPL5YO.js} +1 -1
- package/dist/{chunk-YKL3BLWC.js → chunk-GCTCRKET.js} +1 -1
- package/dist/{chunk-WBYAGS6B.js → chunk-GTIBT4V6.js} +1 -1
- package/dist/{chunk-K42WBNJQ.js → chunk-GVEJO3WM.js} +1 -1
- package/dist/{chunk-VFM2KQRM.js → chunk-GYFRTLML.js} +4 -4
- package/dist/{chunk-Z5WPP6ME.js → chunk-GZEPWYMP.js} +1 -1
- package/dist/{chunk-JX7FYWPO.js → chunk-H6HILX7D.js} +1 -1
- package/dist/{chunk-Z65E4UAP.js → chunk-H7IQZNKR.js} +1 -1
- package/dist/{chunk-TFBRVLDN.js → chunk-HEIZ3RSD.js} +1 -1
- package/dist/{chunk-2XDUJQQN.js → chunk-HEWKCSY7.js} +3 -3
- package/dist/{chunk-5N6HNQQ5.js → chunk-HFRWZQOF.js} +1 -1
- package/dist/{chunk-N65F7ET2.js → chunk-HKSRCMQ7.js} +1 -1
- package/dist/{chunk-Q5JX23QU.js → chunk-HZDEDEAS.js} +1 -1
- package/dist/{chunk-OEG3N5PG.js → chunk-ILHEVBNU.js} +1 -1
- package/dist/{chunk-6BDAJ6UD.js → chunk-IMSPA67L.js} +1 -1
- package/dist/{chunk-OMHR423H.js → chunk-IPSY5EEL.js} +1 -1
- package/dist/{chunk-NGLMZYS7.js → chunk-J3PS4JF2.js} +2 -2
- package/dist/{chunk-OGBZTY2G.js → chunk-JDEOBIXA.js} +1 -1
- package/dist/{chunk-Y5PRPHLQ.js → chunk-JLR6X5NA.js} +1 -1
- package/dist/{chunk-KWVOJWO7.js → chunk-JVXKDM2E.js} +1 -1
- package/dist/{chunk-KDU7VW3L.js → chunk-KAAC4VIW.js} +1 -1
- package/dist/{chunk-36ROOKQB.js → chunk-KEUMU5TQ.js} +1 -1
- package/dist/{chunk-ULRJDKWQ.js → chunk-KPJRLS53.js} +1 -1
- package/dist/{chunk-VYDSOAV4.js → chunk-L6OBJDYK.js} +1 -1
- package/dist/{chunk-PG5YNPJB.js → chunk-LC2BDU4B.js} +1 -1
- package/dist/{chunk-LANUJ7LX.js → chunk-LEPENRGG.js} +1 -1
- package/dist/{chunk-TUVDJ3PG.js → chunk-LH7KQZDD.js} +1 -1
- package/dist/{chunk-YFINLODF.js → chunk-LIH7CQO7.js} +1 -1
- package/dist/{chunk-EX5GVHGE.js → chunk-LJO22Z6S.js} +1 -1
- package/dist/{chunk-FOREMLFZ.js → chunk-LQGF3RKX.js} +1 -1
- package/dist/{chunk-NILETICC.js → chunk-LTRJWOI6.js} +1 -1
- package/dist/chunk-MA6QRENS.js +1 -0
- package/dist/{chunk-N75VOJHO.js → chunk-MNTJZ6JO.js} +1 -1
- package/dist/{chunk-F3NYCSXT.js → chunk-NQRSFMS7.js} +1 -1
- package/dist/{chunk-4ZNV5YSL.js → chunk-NV4SPMQS.js} +1 -1
- package/dist/{chunk-2EAFYCCS.js → chunk-O2X6EVXQ.js} +1 -1
- package/dist/{chunk-HHN6KZXX.js → chunk-OBRMBYTG.js} +1 -1
- package/dist/{chunk-6MWWJZFN.js → chunk-ODFOSJU3.js} +1 -1
- package/dist/{chunk-GAYKYEIM.js → chunk-OJE7S6D4.js} +1 -1
- package/dist/{chunk-742XXXGL.js → chunk-OTVZU5AQ.js} +1 -1
- package/dist/{chunk-EB574SY6.js → chunk-OYFNB5RY.js} +1 -1
- package/dist/{chunk-QTFUYKMF.js → chunk-PCL4UWAE.js} +1 -1
- package/dist/{chunk-OZMQ2EJB.js → chunk-PGBXHL2G.js} +1 -1
- package/dist/{chunk-F6X6OXXB.js → chunk-PJTRZSH4.js} +1 -1
- package/dist/{chunk-FDBHQLFK.js → chunk-PPC3RJDZ.js} +1 -1
- package/dist/{chunk-XH5YGJQR.js → chunk-PROWADZL.js} +1 -1
- package/dist/{chunk-S5FOQY35.js → chunk-PSH4QKUX.js} +1 -1
- package/dist/{chunk-BWJIZYAG.js → chunk-PSUNX2YX.js} +1 -1
- package/dist/{chunk-RXQJCJDV.js → chunk-PSYQTFPK.js} +1 -1
- package/dist/{chunk-XF2KTEID.js → chunk-PVZE65R7.js} +1 -1
- package/dist/{chunk-OBYQSIYU.js → chunk-QH7QOLZK.js} +1 -1
- package/dist/{chunk-UAFEFKAQ.js → chunk-QMYCJ2TM.js} +1 -1
- package/dist/{chunk-H6XEESUN.js → chunk-QPT6DUMC.js} +1 -1
- package/dist/{chunk-E55KS3GZ.js → chunk-R4YJM7KY.js} +1 -1
- package/dist/{chunk-2KGPH7YG.js → chunk-RAOMLN5A.js} +1 -1
- package/dist/{chunk-NROVZETL.js → chunk-RHJLAYNK.js} +1 -1
- package/dist/{chunk-3DCN3N23.js → chunk-RNFZJQVV.js} +1 -1
- package/dist/{chunk-FX3L344E.js → chunk-RRQYOGEA.js} +1 -1
- package/dist/{chunk-LUKQ5HLC.js → chunk-S5FGFQHD.js} +1 -1
- package/dist/{chunk-5L63PRJL.js → chunk-SAKMJGXL.js} +1 -1
- package/dist/{chunk-ZYX7UHCQ.js → chunk-SEGZQCXZ.js} +1 -1
- package/dist/{chunk-NQK2VCDA.js → chunk-SIVRBIKH.js} +1 -1
- package/dist/{chunk-H2TQ4ODI.js → chunk-T24RA3WI.js} +1 -1
- package/dist/{chunk-U2DWBZK2.js → chunk-T74ECTO7.js} +1 -1
- package/dist/{chunk-NE3ZFSMS.js → chunk-TBEG57SV.js} +1 -1
- package/dist/{chunk-IT4HYLTY.js → chunk-TCP4OG3D.js} +1 -1
- package/dist/{chunk-J4T73EAS.js → chunk-TQNGFSCI.js} +1 -1
- package/dist/{chunk-CX75OKZK.js → chunk-TVQVZHNP.js} +1 -1
- package/dist/{chunk-6CXG3XLP.js → chunk-U42P3F7Y.js} +1 -1
- package/dist/{chunk-YLXPYXQP.js → chunk-U63A4OUA.js} +1 -1
- package/dist/{chunk-GCY7LPEF.js → chunk-U7ELUEH2.js} +1 -1
- package/dist/{chunk-R7T3LYJL.js → chunk-UBJYXNCN.js} +1 -1
- package/dist/{chunk-YPWHD3NL.js → chunk-UBX3HUMH.js} +1 -1
- package/dist/{chunk-QTJCCOAG.js → chunk-UCJ3NHJH.js} +1 -1
- package/dist/{chunk-FEDVVYK2.js → chunk-UMZG254H.js} +1 -1
- package/dist/{chunk-2O224ZPO.js → chunk-UPTF2HK6.js} +1 -1
- package/dist/{chunk-GRPKF5ZB.js → chunk-UXL2A5UK.js} +1 -1
- package/dist/chunk-V6UCVTJT.js +7 -0
- package/dist/{chunk-R6ICQT2D.js → chunk-VFQW2QL2.js} +1 -1
- package/dist/{chunk-DX3JLOUA.js → chunk-VM6EBNGR.js} +1 -1
- package/dist/{chunk-67Z34HN5.js → chunk-VPRDI4TT.js} +1 -1
- package/dist/{chunk-NHAUJWEG.js → chunk-VRO6QBVN.js} +1 -1
- package/dist/{chunk-Q5LIJGT7.js → chunk-WIBPVYPN.js} +1 -1
- package/dist/{chunk-YEVGLC5X.js → chunk-WJEVB67Y.js} +1 -1
- package/dist/{chunk-XHKWITLA.js → chunk-WLGEAJBU.js} +1 -1
- package/dist/{chunk-PP4L2JJ6.js → chunk-WSJ5PUK6.js} +1 -1
- package/dist/{chunk-XOCB4KNX.js → chunk-WT2KJHUO.js} +1 -1
- package/dist/{chunk-ZDRIQC7O.js → chunk-WVQZOLZJ.js} +1 -1
- package/dist/{chunk-JWRK5KLD.js → chunk-X3KYRBGE.js} +1 -1
- package/dist/{chunk-FDYW3UQC.js → chunk-X4JCATEE.js} +1 -1
- package/dist/{chunk-C4YLE3NS.js → chunk-XH66VYZA.js} +1 -1
- package/dist/{chunk-M2XHIN57.js → chunk-XNKAPGJD.js} +1 -1
- package/dist/{chunk-C3RUVXG2.js → chunk-XNP7PMGC.js} +1 -1
- package/dist/{chunk-E5FXOLQO.js → chunk-XRVMKP53.js} +3 -3
- package/dist/{chunk-IARCMH7G.js → chunk-XSUX2XAW.js} +1 -1
- package/dist/{chunk-VVZSYHDG.js → chunk-XZUL2HVC.js} +1 -1
- package/dist/{chunk-YZMY2CTU.js → chunk-Y6DYQWQK.js} +1 -1
- package/dist/{chunk-ZZRFG6ME.js → chunk-YAA7OGRM.js} +1 -1
- package/dist/{chunk-NBFMP5XQ.js → chunk-YMS6RVE5.js} +1 -1
- package/dist/{chunk-Z4AFEO36.js → chunk-YUNINHOR.js} +1 -1
- package/dist/{chunk-ZL5LU4U2.js → chunk-YY2JHCIG.js} +1 -1
- package/dist/{chunk-Y47C3LSX.js → chunk-YZKBG7UZ.js} +1 -1
- package/dist/{chunk-U53OLUOE.js → chunk-ZJ6DWT36.js} +1 -1
- package/dist/{chunk-JIYSCWCG.js → chunk-ZLMXR2XV.js} +1 -1
- package/dist/{chunk-5SEEDOQ5.js → chunk-ZYEGQSF5.js} +1 -1
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- 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/doctor/instructions.js +1 -1
- package/dist/cli/commands/app/doctor.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-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.js +1 -1
- package/dist/cli/commands/app/release.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.js +1 -1
- 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.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- 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.js +1 -1
- 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.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.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.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-ASDCTDQ4.js → conf-store-K65PEQF6.js} +1 -1
- package/dist/{deprecations-VBQV7Q4O.js → deprecations-2SG4PB2W.js} +1 -1
- package/dist/dist-L4A3SGNF.js +1 -0
- package/dist/dist-XXCZFNRC.js +1 -0
- package/dist/{environments-HSTNEQRG.js → environments-B4OWPMPR.js} +1 -1
- package/dist/{error-2LZYKRMA.js → error-5YQYW3V2.js} +1 -1
- package/dist/error-handler-3PBXTHYY.js +1 -0
- package/dist/{fs-BJHNJDDK.js → fs-FM6YDE2U.js} +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- 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/index.js +1 -1
- package/dist/{is-global-6SCOAJVG.js → is-global-3FFDTC2G.js} +1 -1
- package/dist/{local-PZWPRFU7.js → local-W73VIWHZ.js} +1 -1
- package/dist/{metadata-VVBHB3HL.js → metadata-OGQEI47Y.js} +1 -1
- package/dist/{node-package-manager-ETYQN7OM.js → node-package-manager-GSHLPD5X.js} +1 -1
- package/dist/notifications-system-HQNQUKLF.js +1 -0
- package/dist/os-6HP4QG7V.js +1 -0
- package/dist/{output-74VDGYJD.js → output-MG7RJ37P.js} +1 -1
- package/dist/{system-P5QIJALL.js → system-3HTWCGQH.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-H5I5YVKV.js → ui-T22J7MQF.js} +1 -1
- package/dist/upgrade-FZ35KTBW.js +1 -0
- package/dist/{version-J2PYO6M5.js → version-KWF3XRSN.js} +1 -1
- package/dist/version-LJOGYA5H.js +1 -0
- package/dist/{workerd-X4TGHEG3.js → workerd-RB5ZS43X.js} +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/dist/analytics-3IIUBZ3B.js +0 -1
- package/dist/chunk-JG4HH54Q.js +0 -1
- package/dist/chunk-N6RBRPGW.js +0 -7
- package/dist/chunk-UZARYOLN.js +0 -1
- package/dist/chunk-VASGXHYA.js +0 -1
- package/dist/chunk-WGAFCKGD.js +0 -1
- package/dist/dist-FZLOAKU7.js +0 -1
- package/dist/dist-HTY6UHG5.js +0 -1
- package/dist/error-handler-PIGEJ7BT.js +0 -1
- package/dist/notifications-system-652OG5KL.js +0 -1
- package/dist/os-7D6NT4O3.js +0 -1
- package/dist/upgrade-34HSYBXI.js +0 -1
- package/dist/version-EKXEAF6Q.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as se}from"./chunk-H2TQ4ODI.js";import{a as ne,b as re,h as oe}from"./chunk-HFSCXTJQ.js";import{a as q,d as X}from"./chunk-3JXPOOFV.js";import{E as ee,_ as ie}from"./chunk-YFINLODF.js";import{h as A,j as te}from"./chunk-BWJIZYAG.js";import{Ta as Z,ma as Y}from"./chunk-VFM2KQRM.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();d();var ve=/^gid:\/\/shopify\/Shop\/(\d+)$/,De=/^\d+$/,ae=250,Re=new Set(ne),Be=new Set(re);function ue(i,e){let o=[],t=[],n=new Map;for(let s of e){let f=Ae(s.shopId),l=!0;if(f){let L=n.get(f);L===void 0?n.set(f,s.sourceRow):(o.push({row:s.sourceRow,field:"shop_id",message:`Duplicate shop ID; first seen on row ${L}`}),l=!1)}else o.push({row:s.sourceRow,field:"shop_id",message:"Shop ID must be a positive numeric ID or gid://shopify/Shop/<id>"}),l=!1;if(i==="unschedule"){l&&f&&t.push({action:i,shopId:f});continue}let h=s.targetPlanHandle?.trim(),w=s.priceBehavior?.trim(),S=s.notification?.trim(),O=S?.length?S:"WHEN_REQUIRED";h||(o.push({row:s.sourceRow,field:"target_plan_handle",message:"Target plan handle is required"}),l=!1),fe(w)||(o.push({row:s.sourceRow,field:"price_behavior",message:"Price behavior must be HONOR_BILLING_PRICE or PLAN_PRICE"}),l=!1),le(O)||(o.push({row:s.sourceRow,field:"notification",message:"Notification must be OPT_OUT or WHEN_REQUIRED"}),l=!1),l&&f&&h&&fe(w)&&le(O)&&t.push({action:i,shopId:f,targetPlanHandle:h,priceBehavior:w,notification:O})}if(o.length>0)return{ok:!1,errors:o};let r=[...t].sort((s,f)=>s.shopId<f.shopId?-1:s.shopId>f.shopId?1:0),a=ce(i,r);return{ok:!0,plan:{action:i,rows:r,batches:Le(i,r),canonicalInput:a,inputDigest:de(a)}}}function Ae(i){let e=i?.trim();if(!e)return;let o=De.test(e)?e:ve.exec(e)?.[1];if(o===void 0)return;let t=BigInt(o);return t>0?`gid://shopify/Shop/${t}`:void 0}function fe(i){return i!==void 0&&Re.has(i)}function le(i){return Be.has(i)}function ce(i,e){return JSON.stringify({version:1,action:i,rows:e})}function Le(i,e){let o=[];for(let t=0;t<e.length;t+=ae){let n=e.slice(t,t+ae),r=ce(i,n);o.push({index:o.length,rows:n,canonicalPayload:r,payloadDigest:de(r)})}return o}function de(i){return q(i).toString("hex")}d();d();d();d();d();var c=class i extends Error{constructor(e,o,t,...n){Array.isArray(o)&&(o=o.join(" ").trim()),super(o),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,i),this.code=e;for(let r of n)for(let a in r){let s=r[a];this[a]=Buffer.isBuffer(s)?s.toString(t.encoding):s==null?s:JSON.parse(JSON.stringify(s))}}};d();var M=function(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)};var z=function(i){let e=[];for(let o=0,t=i.length;o<t;o++){let n=i[o];if(n==null||n===!1)e[o]={disabled:!0};else if(typeof n=="string"||typeof n=="number")e[o]={name:`${n}`};else if(M(n)){if(typeof n.name!="string")throw new c("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${o}`,"when column is an object literal"]);e[o]=n}else throw new c("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(n)} at position ${o}`])}return e};d();d();var Q=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let o=this.length+e.length;if(o>=this.size&&(this.resize(),o>=this.size))throw Error("INVALID_BUFFER_STATE");let t=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),t.copy(this.buf,e.length),this.length+=e.length}else{let o=this.length++;o===this.size&&this.resize();let t=this.clone();this.buf[0]=e,t.copy(this.buf,1,0,o)}}append(e){let o=this.length++;o===this.size&&this.resize(),this.buf[o]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let o=Buffer.allocUnsafe(this.size);this.buf.copy(o,0,0,e),this.buf=o}toString(e){return e?this.buf.toString(e,0,this.length):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},H=Q;var _e=function(i){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((t,n)=>{let r=Buffer.from(String.fromCharCode(n),i.encoding);return n!==63&&r.length===1&&r[0]===63||t.push(r),t},[]),o=new Uint8Array(256);for(let t of e)o[t[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:i.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:i.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(i.escape)&&Buffer.isBuffer(i.quote)&&Buffer.compare(i.escape,i.quote)===0,expectedRecordLength:Array.isArray(i.columns)?i.columns.length:void 0,field:new H(20),firstLineToHeaders:i.cast_first_line_to_header,needMoreDataSize:Math.max(i.comment!==null?i.comment.length:0,...i.delimiter?i.delimiter.map(t=>t.length):[],i.delimiter_auto?1:0,i.quote!==null?i.quote.length:0,...e.map(t=>t.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new H(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:i.record_delimiter.length===0?0:Math.max(...i.record_delimiter.map(t=>t.length)),trimChars:[Buffer.from(" ",i.encoding)[0],Buffer.from(" ",i.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:e,timcharFirstBytes:o}};d();d();var me=function(i){return i.replace(/([A-Z])/g,function(e,o){return"_"+o.toLowerCase()})};var T=function(i){let e={};for(let t in i)e[me(t)]=i[t];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new c("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new c("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new c("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(t){let n=Date.parse(t);return isNaN(n)?t:new Date(n)};else if(typeof e.cast_date!="function")throw new c("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=void 0,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=z(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new c("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);if(e.delimiter_auto===void 0||e.delimiter_auto===null||e.delimiter_auto===!1)e.delimiter_auto=!1;else if(e.delimiter_auto===!0)e.delimiter_auto={};else if(!M(e.delimiter_auto))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","delimiter_auto must be a boolean or a configuration object,",`got ${JSON.stringify(e.delimiter_auto)}`],e);if(e.delimiter_auto){if(e.delimiter_auto.preferred===void 0)e.delimiter_auto.preferred={44:1.8,9:1.8,59:1.6,32:1.6,58:1.5,46:1.4,47:1.4};else if(!M(e.delimiter_auto.preferred))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","preferred must be an object,",`got ${JSON.stringify(e.delimiter_auto.preferred)}`],e);if(e.delimiter_auto.score===void 0)e.delimiter_auto.score=(t,n)=>(t.total-t.std)*(n.preferred[t.char_code]||1);else if(typeof e.delimiter_auto.score!="function")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","score must be a function,",`got ${JSON.stringify(e.delimiter_auto.score)}`],e);if(e.delimiter_auto.size===void 0)e.delimiter_auto.size=2048;else if(typeof e.delimiter_auto.size!="number")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","size must be a number,",`got ${JSON.stringify(e.delimiter_auto.size)}`],e)}let o=JSON.stringify(e.delimiter);if(e.delimiter_auto!==!1&&(e.delimiter=[]),Array.isArray(e.delimiter)||((e.delimiter===void 0||e.delimiter===null||e.delimiter===!1)&&(e.delimiter=Buffer.from(",",e.encoding)),e.delimiter=[e.delimiter]),e.delimiter=e.delimiter.map(function(t){if(typeof t=="string"&&(t=Buffer.from(t,e.encoding)),!Buffer.isBuffer(t)||t.length===0)throw new c("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${o}`],e);return t}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(i.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(i.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(i.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new c("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new c("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new c("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(t,n){if(typeof t!="string"&&!Buffer.isBuffer(t))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);if(t.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);return typeof t=="string"&&(t=Buffer.from(t,e.encoding)),t}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&i.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&i.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(i.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(i.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(i.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(i.to_line)}`);return e};d();var he=function(i,e){e||({delimiter_auto:e}=T({delimiter_auto:!0})),typeof i=="string"&&(i=Buffer.from(i)),Buffer.isBuffer(i)&&(i=(n=>{let r=[],a=j({delimiter:[]}),s=h=>r.push(h),f=()=>{},l=a.parse(n,!0,s,f);if(l!==void 0)throw l;return r})(i));let o=Array(127).fill().map(()=>({lines:[]}));i.map(([n],r)=>{for(let a=0,s=n.length;a<s;a++){let f=n.charCodeAt(a);o[f].lines[r]===void 0&&(o[f].lines[r]=0),o[f].lines[r]++}}),o.map((n,r)=>{n.char_code=r,n.std=Te(n.lines),n.total=n.lines.reduce((a,s)=>a+s,0),n.preferred=!!e.preferred[r],n.score=e.score(n,e)});let t=o.reduce((n,r)=>n.score>r.score?n:r,{});return String.fromCharCode(t.char_code)},Te=function(i){let e=i.length;if(e===0)return 0;let o=i.reduce((t,n)=>t+n)/e;return Math.sqrt(i.map(t=>Math.pow(t-o,2)).reduce((t,n)=>t+n)/e)};var pe=function(i){return i.every(e=>e==null||e.toString&&e.toString().trim()==="")},$e=13,Me=10,$={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},j=function(i={}){let e={bytes:0,bytes_records:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},o=T(i);return{info:e,original_options:i,options:o,state:_e(o),__needMoreData:function(t,n,r){if(r)return!1;let{encoding:a,escape:s,quote:f}=this.options,{quoting:l,needMoreDataSize:h,recordDelimiterMaxLength:w}=this.state,S=n-t-1,O=Math.max(h,w===0?Buffer.from(`\r
|
|
1
|
+
import{b as se}from"./chunk-T24RA3WI.js";import{a as ne,b as re,h as oe}from"./chunk-EDHR546O.js";import{a as q,d as X}from"./chunk-AINDVTMY.js";import{E as ee,_ as ie}from"./chunk-LIH7CQO7.js";import{h as A,j as te}from"./chunk-PSUNX2YX.js";import{Ta as Z,ma as Y}from"./chunk-GYFRTLML.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();d();var ve=/^gid:\/\/shopify\/Shop\/(\d+)$/,De=/^\d+$/,ae=250,Re=new Set(ne),Be=new Set(re);function ue(i,e){let o=[],t=[],n=new Map;for(let s of e){let f=Ae(s.shopId),l=!0;if(f){let L=n.get(f);L===void 0?n.set(f,s.sourceRow):(o.push({row:s.sourceRow,field:"shop_id",message:`Duplicate shop ID; first seen on row ${L}`}),l=!1)}else o.push({row:s.sourceRow,field:"shop_id",message:"Shop ID must be a positive numeric ID or gid://shopify/Shop/<id>"}),l=!1;if(i==="unschedule"){l&&f&&t.push({action:i,shopId:f});continue}let h=s.targetPlanHandle?.trim(),w=s.priceBehavior?.trim(),S=s.notification?.trim(),O=S?.length?S:"WHEN_REQUIRED";h||(o.push({row:s.sourceRow,field:"target_plan_handle",message:"Target plan handle is required"}),l=!1),fe(w)||(o.push({row:s.sourceRow,field:"price_behavior",message:"Price behavior must be HONOR_BILLING_PRICE or PLAN_PRICE"}),l=!1),le(O)||(o.push({row:s.sourceRow,field:"notification",message:"Notification must be OPT_OUT or WHEN_REQUIRED"}),l=!1),l&&f&&h&&fe(w)&&le(O)&&t.push({action:i,shopId:f,targetPlanHandle:h,priceBehavior:w,notification:O})}if(o.length>0)return{ok:!1,errors:o};let r=[...t].sort((s,f)=>s.shopId<f.shopId?-1:s.shopId>f.shopId?1:0),a=ce(i,r);return{ok:!0,plan:{action:i,rows:r,batches:Le(i,r),canonicalInput:a,inputDigest:de(a)}}}function Ae(i){let e=i?.trim();if(!e)return;let o=De.test(e)?e:ve.exec(e)?.[1];if(o===void 0)return;let t=BigInt(o);return t>0?`gid://shopify/Shop/${t}`:void 0}function fe(i){return i!==void 0&&Re.has(i)}function le(i){return Be.has(i)}function ce(i,e){return JSON.stringify({version:1,action:i,rows:e})}function Le(i,e){let o=[];for(let t=0;t<e.length;t+=ae){let n=e.slice(t,t+ae),r=ce(i,n);o.push({index:o.length,rows:n,canonicalPayload:r,payloadDigest:de(r)})}return o}function de(i){return q(i).toString("hex")}d();d();d();d();d();var c=class i extends Error{constructor(e,o,t,...n){Array.isArray(o)&&(o=o.join(" ").trim()),super(o),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,i),this.code=e;for(let r of n)for(let a in r){let s=r[a];this[a]=Buffer.isBuffer(s)?s.toString(t.encoding):s==null?s:JSON.parse(JSON.stringify(s))}}};d();var M=function(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)};var z=function(i){let e=[];for(let o=0,t=i.length;o<t;o++){let n=i[o];if(n==null||n===!1)e[o]={disabled:!0};else if(typeof n=="string"||typeof n=="number")e[o]={name:`${n}`};else if(M(n)){if(typeof n.name!="string")throw new c("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${o}`,"when column is an object literal"]);e[o]=n}else throw new c("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(n)} at position ${o}`])}return e};d();d();var Q=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let o=this.length+e.length;if(o>=this.size&&(this.resize(),o>=this.size))throw Error("INVALID_BUFFER_STATE");let t=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),t.copy(this.buf,e.length),this.length+=e.length}else{let o=this.length++;o===this.size&&this.resize();let t=this.clone();this.buf[0]=e,t.copy(this.buf,1,0,o)}}append(e){let o=this.length++;o===this.size&&this.resize(),this.buf[o]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let o=Buffer.allocUnsafe(this.size);this.buf.copy(o,0,0,e),this.buf=o}toString(e){return e?this.buf.toString(e,0,this.length):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},H=Q;var _e=function(i){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((t,n)=>{let r=Buffer.from(String.fromCharCode(n),i.encoding);return n!==63&&r.length===1&&r[0]===63||t.push(r),t},[]),o=new Uint8Array(256);for(let t of e)o[t[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:i.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:i.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(i.escape)&&Buffer.isBuffer(i.quote)&&Buffer.compare(i.escape,i.quote)===0,expectedRecordLength:Array.isArray(i.columns)?i.columns.length:void 0,field:new H(20),firstLineToHeaders:i.cast_first_line_to_header,needMoreDataSize:Math.max(i.comment!==null?i.comment.length:0,...i.delimiter?i.delimiter.map(t=>t.length):[],i.delimiter_auto?1:0,i.quote!==null?i.quote.length:0,...e.map(t=>t.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new H(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:i.record_delimiter.length===0?0:Math.max(...i.record_delimiter.map(t=>t.length)),trimChars:[Buffer.from(" ",i.encoding)[0],Buffer.from(" ",i.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:e,timcharFirstBytes:o}};d();d();var me=function(i){return i.replace(/([A-Z])/g,function(e,o){return"_"+o.toLowerCase()})};var T=function(i){let e={};for(let t in i)e[me(t)]=i[t];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new c("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new c("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new c("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(t){let n=Date.parse(t);return isNaN(n)?t:new Date(n)};else if(typeof e.cast_date!="function")throw new c("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=void 0,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=z(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new c("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);if(e.delimiter_auto===void 0||e.delimiter_auto===null||e.delimiter_auto===!1)e.delimiter_auto=!1;else if(e.delimiter_auto===!0)e.delimiter_auto={};else if(!M(e.delimiter_auto))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","delimiter_auto must be a boolean or a configuration object,",`got ${JSON.stringify(e.delimiter_auto)}`],e);if(e.delimiter_auto){if(e.delimiter_auto.preferred===void 0)e.delimiter_auto.preferred={44:1.8,9:1.8,59:1.6,32:1.6,58:1.5,46:1.4,47:1.4};else if(!M(e.delimiter_auto.preferred))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","preferred must be an object,",`got ${JSON.stringify(e.delimiter_auto.preferred)}`],e);if(e.delimiter_auto.score===void 0)e.delimiter_auto.score=(t,n)=>(t.total-t.std)*(n.preferred[t.char_code]||1);else if(typeof e.delimiter_auto.score!="function")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","score must be a function,",`got ${JSON.stringify(e.delimiter_auto.score)}`],e);if(e.delimiter_auto.size===void 0)e.delimiter_auto.size=2048;else if(typeof e.delimiter_auto.size!="number")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","size must be a number,",`got ${JSON.stringify(e.delimiter_auto.size)}`],e)}let o=JSON.stringify(e.delimiter);if(e.delimiter_auto!==!1&&(e.delimiter=[]),Array.isArray(e.delimiter)||((e.delimiter===void 0||e.delimiter===null||e.delimiter===!1)&&(e.delimiter=Buffer.from(",",e.encoding)),e.delimiter=[e.delimiter]),e.delimiter=e.delimiter.map(function(t){if(typeof t=="string"&&(t=Buffer.from(t,e.encoding)),!Buffer.isBuffer(t)||t.length===0)throw new c("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${o}`],e);return t}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(i.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(i.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(i.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new c("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new c("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new c("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(t,n){if(typeof t!="string"&&!Buffer.isBuffer(t))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);if(t.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);return typeof t=="string"&&(t=Buffer.from(t,e.encoding)),t}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&i.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&i.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(i.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(i.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(i.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(i.to_line)}`);return e};d();var he=function(i,e){e||({delimiter_auto:e}=T({delimiter_auto:!0})),typeof i=="string"&&(i=Buffer.from(i)),Buffer.isBuffer(i)&&(i=(n=>{let r=[],a=j({delimiter:[]}),s=h=>r.push(h),f=()=>{},l=a.parse(n,!0,s,f);if(l!==void 0)throw l;return r})(i));let o=Array(127).fill().map(()=>({lines:[]}));i.map(([n],r)=>{for(let a=0,s=n.length;a<s;a++){let f=n.charCodeAt(a);o[f].lines[r]===void 0&&(o[f].lines[r]=0),o[f].lines[r]++}}),o.map((n,r)=>{n.char_code=r,n.std=Te(n.lines),n.total=n.lines.reduce((a,s)=>a+s,0),n.preferred=!!e.preferred[r],n.score=e.score(n,e)});let t=o.reduce((n,r)=>n.score>r.score?n:r,{});return String.fromCharCode(t.char_code)},Te=function(i){let e=i.length;if(e===0)return 0;let o=i.reduce((t,n)=>t+n)/e;return Math.sqrt(i.map(t=>Math.pow(t-o,2)).reduce((t,n)=>t+n)/e)};var pe=function(i){return i.every(e=>e==null||e.toString&&e.toString().trim()==="")},$e=13,Me=10,$={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},j=function(i={}){let e={bytes:0,bytes_records:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},o=T(i);return{info:e,original_options:i,options:o,state:_e(o),__needMoreData:function(t,n,r){if(r)return!1;let{encoding:a,escape:s,quote:f}=this.options,{quoting:l,needMoreDataSize:h,recordDelimiterMaxLength:w}=this.state,S=n-t-1,O=Math.max(h,w===0?Buffer.from(`\r
|
|
2
2
|
`,a).length:w,l?(s===null?0:s.length)+f.length:0,l?f.length+w:0);return S<O},parse:function(t,n,r,a){let{bom:s,comment_no_infix:f,delimiter_auto:l,encoding:h,from_line:w,ltrim:S,max_record_size:O,raw:L,relax_quotes:I,rtrim:E,skip_empty_lines:y,to:g,to_line:p}=this.options,{comment:x,escape:C,quote:N,record_delimiter:F}=this.options,{bomSkipped:Ne,delimiterDiscovered:Ee,delimiterBufPrevious:V,rawBuffer:xe,escapeIsQuote:Ce}=this.state;if(!Ee&&l){let m;if(V===void 0?m=t:V!==void 0&&t===void 0?m=V:m=Buffer.concat([V,t]),t=void 0,n||m.length>l.size)this.options.delimiter=[Buffer.from(he(m,this.options.delimiter_auto))],this.state.previousBuf=m,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=m;return}}let{previousBuf:P}=this.state,_;if(P===void 0)if(t===void 0){a();return}else _=t;else P!==void 0&&t===void 0?_=P:_=Buffer.concat([P,t]);if(Ne===!1)if(s===!1)this.state.bomSkipped=!0;else if(_.length<3){if(n===!1){this.state.previousBuf=_;return}}else{for(let m in $)if($[m].compare(_,0,$[m].length)===0){let D=$[m].length;this.state.bufBytesStart+=D,_=_.slice(D);let k=T({...this.original_options,encoding:m});for(let b in k)this.options[b]=k[b];({comment:x,escape:C,quote:N}=this.options);break}this.state.bomSkipped=!0}let U=_.length,u;for(u=0;u<U&&!this.__needMoreData(u,U,n);u++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),p!==-1&&this.info.lines>p){this.state.stop=!0,a();return}this.state.quoting===!1&&F.length===0&&this.__autoDiscoverRecordDelimiter(_,u)&&(F=this.options.record_delimiter);let m=_[u];if(L===!0&&xe.append(m),(m===$e||m===Me)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(C!==null&&this.state.quoting===!0&&this.__isEscape(_,u,m)&&u+C.length<U)if(Ce){if(this.__isQuote(_,u+C.length)){this.state.escaping=!0,u+=C.length-1;continue}}else{this.state.escaping=!0,u+=C.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(_,u))if(this.state.quoting===!0){let b=_[u+N.length],R=E&&this.__isCharTrimable(_,u+N.length),v=x!==null&&this.__compareBytes(x,_,u+N.length,b),B=this.__isDelimiter(_,u+N.length,b),J=F.length===0?this.__autoDiscoverRecordDelimiter(_,u+N.length):this.__isRecordDelimiter(b,_,u+N.length);if(C!==null&&this.__isEscape(_,u,m)&&this.__isQuote(_,u+C.length))u+=C.length-1;else if(!b||B||J||v||R){this.state.quoting=!1,this.state.wasQuoting=!0,u+=N.length-1;continue}else if(I===!1){let W=this.__error(new c("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(b)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(W!==void 0)return W}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(N),u+=N.length-1}else if(this.state.field.length!==0){if(I===!1){let b=this.__infoField(),R=Object.keys($).map(B=>$[B].equals(this.state.field.toString())?B:!1).filter(Boolean)[0],v=this.__error(new c("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(b.column)} at line ${b.lines}, value is ${JSON.stringify(this.state.field.toString(h))}`,R?`(${R} bom)`:void 0],this.options,b,{field:this.state.field}));if(v!==void 0)return v}}else{this.state.quoting=!0,u+=N.length-1;continue}if(this.state.quoting===!1){let b=this.__isRecordDelimiter(m,_,u);if(b!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=w){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),u+=b-1;continue}if(y===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,u+=b-1;continue}this.info.bytes=this.state.bufBytesStart+u;let B=this.__onField();if(B!==void 0)return B;this.info.bytes=this.state.bufBytesStart+u+b;let J=this.__onRecord(r);if(J!==void 0)return J;if(g!==-1&&this.info.records>=g){this.state.stop=!0,a();return}}this.state.commenting=!1,u+=b-1;continue}if(this.state.commenting)continue;if(x!==null&&(f===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(x,_,u,m)!==0){this.state.commenting=!0;continue}let R=this.__isDelimiter(_,u,m);if(R!==0){this.info.bytes=this.state.bufBytesStart+u;let v=this.__onField();if(v!==void 0)return v;u+=R-1;continue}}}if(this.state.commenting===!1&&O!==0&&this.state.record_length+this.state.field.length>O)return this.__error(new c("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${O}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let D=S===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(_,u),k=E===!1||this.state.wasQuoting===!1;if(D===!0&&k===!0)this.state.field.append(m);else{if(E===!0&&!this.__isCharTrimable(_,u))return this.__error(new c("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));D===!1&&(u+=this.__isCharTrimable(_,u)-1);continue}}if(n===!0)if(this.state.quoting===!0){let m=this.__error(new c("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(m!==void 0)return m}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+u;let m=this.__onField();if(m!==void 0)return m;let D=this.__onRecord(r);if(D!==void 0)return D}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=u,this.state.previousBuf=_.slice(u);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(t){let{columns:n,group_columns_by_name:r,encoding:a,info:s,from:f,relax_column_count:l,relax_column_count_less:h,relax_column_count_more:w,raw:S,skip_records_with_empty_values:O}=this.options,{enabled:L,record:I}=this.state;if(L===!1)return this.__resetRecord();let E=I.length;if(n===!0){if(O===!0&&pe(I)){this.__resetRecord();return}return this.__firstLineToColumns(I)}if(n===!1&&this.info.records===0&&(this.state.expectedRecordLength=E),E!==this.state.expectedRecordLength){let y=n===!1?new c("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${E} on line ${this.info.lines}`],this.options,this.__infoField(),{record:I}):new c("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${n.length},`,`got ${E} on line ${this.info.lines}`],this.options,this.__infoField(),{record:I});if(l===!0||h===!0&&E<this.state.expectedRecordLength||w===!0&&E>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=y;else{let g=this.__error(y);if(g)return g}}if(O===!0&&pe(I)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,f===1||this.info.records>=f){let{objname:y}=this.options;if(n!==!1){let g={};for(let p=0,x=I.length;p<x;p++)n[p]===void 0||n[p].disabled||(r===!0&&Object.hasOwn(g,n[p].name)?Array.isArray(g[n[p].name])?g[n[p].name]=g[n[p].name].concat(I[p]):g[n[p].name]=[g[n[p].name],I[p]]:Object.defineProperty(g,n[p].name,{value:I[p],enumerable:!0,writable:!0,configurable:!0}));if(S===!0||s===!0){let p=Object.assign({record:g},S===!0?{raw:this.state.rawBuffer.toString(a)}:{},s===!0?{info:this.__infoRecord()}:{}),x=this.__push(y===void 0?p:[g[y],p],t);if(x)return x}else{let p=this.__push(y===void 0?g:[g[y],g],t);if(p)return p}}else if(S===!0||s===!0){let g=Object.assign({record:I},S===!0?{raw:this.state.rawBuffer.toString(a)}:{},s===!0?{info:this.__infoRecord()}:{}),p=this.__push(y===void 0?g:[I[y],g],t);if(p)return p}else{let g=this.__push(y===void 0?I:[I[y],I],t);if(g)return g}}this.__resetRecord()},__firstLineToColumns:function(t){let{firstLineToHeaders:n}=this.state;try{let r=n===void 0?t:n.call(null,t);if(!Array.isArray(r))return this.__error(new c("CSV_INVALID_COLUMN_MAPPING",["Invalid Column Mapping:","expect an array from column function,",`got ${JSON.stringify(r)}`],this.options,this.__infoField(),{headers:r}));let a=z(r);this.state.expectedRecordLength=a.length,this.options.columns=a,this.__resetRecord();return}catch(r){return r}},__resetRecord:function(){this.options.raw===!0&&this.state.rawBuffer.reset(),this.state.error=void 0,this.state.record=[],this.state.record_length=0},__onField:function(){let{cast:t,encoding:n,rtrim:r,max_record_size:a}=this.options,{enabled:s,wasQuoting:f}=this.state;if(s===!1)return this.__resetField();let l=this.state.field.toString(n);if(r===!0&&f===!1&&(l=l.trimRight()),t===!0){let[h,w]=this.__cast(l);if(h!==void 0)return h;l=w}this.state.record.push(l),a!==0&&typeof l=="string"&&(this.state.record_length+=l.length),this.__resetField()},__resetField:function(){this.state.field.reset(),this.state.wasQuoting=!1},__push:function(t,n){let{on_record:r}=this.options;if(r!==void 0){let a=this.__infoRecord();try{t=r.call(null,t,a)}catch(s){return s}if(t==null)return}this.info.bytes_records+=this.info.bytes,n(t)},__cast:function(t){let{columns:n,relax_column_count:r}=this.options;if(Array.isArray(n)===!0&&r&&this.options.columns.length<=this.state.record.length)return[void 0,void 0];if(this.state.castField!==null)try{let s=this.__infoField();return[void 0,this.state.castField.call(null,t,s)]}catch(s){return[s]}if(this.__isFloat(t))return[void 0,parseFloat(t)];if(this.options.cast_date!==!1){let s=this.__infoField();return[void 0,this.options.cast_date.call(null,t,s)]}return[void 0,t]},__compareBytes:function(t,n,r,a){if(t[0]!==a)return 0;let s=t.length;for(let f=1;f<s;f++)if(t[f]!==n[r+f])return 0;return s},__isCharTrimable:function(t,n){let{timchars:r,timcharFirstBytes:a}=this.state,s=t[n];if(s===void 0||a[s]===0)return 0;e:for(let f=0;f<r.length;f++){let l=r[f];for(let h=0;h<l.length;h++)if(l[h]!==t[n+h])continue e;return l.length}return 0},__isDelimiter:function(t,n,r){let{delimiter:a,ignore_last_delimiters:s}=this.options;if(s===!0&&this.state.record.length===this.options.columns.length-1)return 0;if(s!==!1&&typeof s=="number"&&this.state.record.length===s-1)return 0;e:for(let f=0;f<a.length;f++){let l=a[f];if(l[0]===r){for(let h=1;h<l.length;h++)if(l[h]!==t[n+h])continue e;return l.length}}return 0},__isEscape:function(t,n,r){let{escape:a}=this.options;if(a===null)return!1;let s=a.length;if(a[0]===r){for(let f=0;f<s;f++)if(a[f]!==t[n+f])return!1;return!0}return!1},__isFloat:function(t){return t-parseFloat(t)+1>=0},__isQuote:function(t,n){let{quote:r}=this.options;if(r===null)return!1;let a=r.length;for(let s=0;s<a;s++)if(r[s]!==t[n+s])return!1;return!0},__isRecordDelimiter:function(t,n,r){let{record_delimiter:a}=this.options,s=a.length;e:for(let f=0;f<s;f++){let l=a[f],h=l.length;if(l[0]===t){for(let w=1;w<h;w++)if(l[w]!==n[r+w])continue e;return l.length}}return 0},__autoDiscoverRecordDelimiter:function(t,n){let{encoding:r}=this.options,a=[Buffer.from(`\r
|
|
3
3
|
`,r),Buffer.from(`
|
|
4
4
|
`,r),Buffer.from("\r",r)];e:for(let s=0;s<a.length;s++){let f=a[s].length;for(let l=0;l<f;l++)if(a[s][l]!==t[n+l])continue e;return this.options.record_delimiter.push(a[s]),this.state.recordDelimiterMaxLength=a[s].length,a[s].length}return 0},__error:function(t){let{encoding:n,raw:r,skip_records_with_error:a}=this.options,s=typeof t=="string"?new Error(t):t;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(s,r?this.state.rawBuffer.toString(n):void 0)}catch(f){return f}return}else return s},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:t,raw:n,encoding:r}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:t===!0,index:this.state.record.length,raw:n?this.state.rawBuffer.toString(r):void 0}},__infoField:function(){let{columns:t}=this.options,n=Array.isArray(t),r=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:r,column:n===!0?t.length>this.state.record.length?t[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var ge=function(i,e={}){typeof i=="string"&&(i=Buffer.from(i));let o=e&&e.objname?Object.create(null):[],t=j(e),n=s=>{t.options.objname===void 0?o.push(s):o[s[0]]=s[1]},r=()=>{},a=t.parse(i,!0,n,r);if(a!==void 0)throw a;return o};var Ve=["shop_id","target_plan_handle","price_behavior","notification"],Pe={schedule:["shop_id","target_plan_handle","price_behavior"],unschedule:["shop_id"]};function be(i,e){if(i.trim()==="")return{ok:!1,errors:[{message:"The CSV is empty"}]};let o=[],t;try{t=ge(i,{bom:!0,columns:r=>(o=r,r),info:!0,skip_empty_lines:!0,trim:!0})}catch(r){if(!(r instanceof c))throw r;return{ok:!1,errors:[{message:`Invalid CSV: ${r.message}`}]}}let n=ke(o,e);return n.length>0?{ok:!1,errors:n}:t.length===0?{ok:!1,errors:[{message:"The CSV must contain at least one data row"}]}:{ok:!0,rows:t.map(({record:r,info:a})=>Je(r,a.lines,e))}}function ke(i,e){let o=[],t=new Set(Ve),n=new Set;for(let r of i)n.has(r)?o.push({field:r,message:`Duplicate CSV header: ${r}`}):n.add(r),t.has(r)||o.push({field:r,message:`Unknown CSV header: ${r}`});for(let r of Pe[e])i.includes(r)||o.push({field:r,message:`Missing required CSV header: ${r}`});return o}function Je(i,e,o){return o==="unschedule"?{sourceRow:e,shopId:i.shop_id}:{sourceRow:e,shopId:i.shop_id,...i.target_plan_handle===void 0?{}:{targetPlanHandle:i.target_plan_handle},...i.price_behavior===void 0?{}:{priceBehavior:i.price_behavior},...i.notification===void 0?{}:{notification:i.notification}}}d();var we={fileExists:Z,readFile:Y,readStdin:ie};async function G(i,e=we){let o={...we,...e};if(i!=="-"){if(!await o.fileExists(i))throw new A(`CSV file not found: ${i}`);try{return await o.readFile(i)}catch(n){if(n instanceof A)throw n;let r=n instanceof Error?n.message:String(n);throw new A(`Couldn't read CSV file ${i}: ${r}`)}}let t=await o.readStdin();if(t===void 0||t==="")throw new A("Provide --input <path> or pipe CSV data to stdin.");return t}async function Ie(i,e,o){let t=o?await G(e,o):await G(e),n=be(t,i);return n.ok?ue(i,n.rows):n}d();d();var qe="shopify-subscription-migration:v1";function ye(){return X()}function Oe({appIdentifier:i,action:e,invocationId:o,canonicalBatchPayload:t}){let n=JSON.stringify({namespace:qe,appIdentifier:i,action:e,invocationId:o,canonicalBatchPayload:t});return q(n).toString("hex")}var K=class extends Error{batchIndex;constructor(e){super(`Migration submission batch ${e} returned neither an operation nor user errors`),this.name="MigrationSubmissionProtocolError",this.batchIndex=e}};async function Se({clientId:i,plan:e,invocationId:o=ye(),createOperation:t=oe}){let n={clientId:i,action:e.action,inputDigest:e.inputDigest,total:e.rows.length,operations:[]};for(let r of e.batches){let a=Oe({appIdentifier:i,action:e.action,invocationId:o,canonicalBatchPayload:r.canonicalPayload}),s=await t({clientId:i,idempotencyKey:a,migrations:r.rows.map(ze)});if(s.operation&&n.operations.push({batchIndex:r.index,batchPayloadDigest:r.payloadDigest,operation:s.operation}),s.userErrors.length>0)return{status:"failed",submission:n,failure:{type:"submission",batchIndex:r.index,userErrors:s.userErrors}};if(!s.operation)throw new K(r.index)}return{status:"success",submission:n}}function ze(i){return i.action==="unschedule"?{shopId:i.shopId,action:{cancelMigration:!0}}:{shopId:i.shopId,action:{scheduleMigration:je(i)}}}function je({targetPlanHandle:i,priceBehavior:e,notification:o}){return{targetPlanHandle:i,priceBehavior:e,notification:o}}async function ni(i){let e=await Ie(i.action,i.input);if(!e.ok)throw new A(Ue(e.errors));if(!i.skipConfirmation&&!await ee({message:`${i.action==="schedule"?"Schedule":"Unschedule"} ${e.plan.rows.length} subscriptions?`}))throw new te;let o=await Se({clientId:i.clientId,plan:e.plan});if(o.status==="failed"||!i.watch)return o;i.onSubmissionAccepted?.(o.submission);let t=await se({clientId:i.clientId,operationIds:o.submission.operations.map(({operation:a})=>a.id)}),n=Fe(o.submission,t),r=n.operations.filter(({operation:a})=>a.status==="FAILED").map(({operation:a})=>a.id);return r.length===0?{status:"success",submission:n}:{status:"failed",submission:n,failure:{type:"operations",operationIds:r}}}function Fe(i,e){let o=new Map(e.map(t=>[t.id,t]));return{...i,operations:i.operations.map(t=>({...t,operation:o.get(t.operation.id)??t.operation}))}}function Ue(i){return i.map(e=>{let o=[e.row===void 0?void 0:`row ${e.row}`,e.field].filter(t=>t!==void 0).join(", ");return o?`${o}: ${e.message}`:e.message}).join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as b}from"./chunk-
|
|
1
|
+
import{f as b}from"./chunk-VFQW2QL2.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();import{performance as u}from"node:perf_hooks";function w(){return b()?"bubble":"mute-and-report"}function h(g={}){let i={sensitive:{},public:{...g}},p=t=>{Object.assign(i.public,t)},M=t=>{Object.assign(i.sensitive,t)},l=async(t,e,n)=>{let r=n==="auto"?w():n,s=async()=>{let c=await e();t(c)};if(r==="bubble")await s();else try{await s()}catch(c){let{sendErrorToBugsnag:o}=await import("./error-handler-3PBXTHYY.js");await o(c,"unexpected_error")}},a=[];return{getAllPublicMetadata:()=>({...i.public}),getAllSensitiveMetadata:()=>({...i.sensitive}),addPublicMetadata:async(t,e="auto")=>l(p,t,e),addSensitiveMetadata:async(t,e="auto")=>l(M,t,e),runWithTimer:t=>async e=>{a.push(0);let n=u.now();try{return await e()}finally{let r=u.now();r=Math.max(n,r);let s=Math.max(r-n,0),c=a.pop(),o=Math.max(s-c,0);a.length>0&&(a[a.length-1]=(a[a.length-1]??0)+s),u.measure(`${t}#measurable`,{start:n,duration:o}),u.measure(`${t}#wall`,{start:n,end:r});let d=i.public[t]||0;d+=o,i.public[t]=d}}}}var y=h({cmd_all_timing_network_ms:0,cmd_all_timing_prompts_ms:0}),{getAllPublicMetadata:S,getAllSensitiveMetadata:f,addPublicMetadata:x,addSensitiveMetadata:A,runWithTimer:P}=y;export{h as a,S as b,f as c,x as d,A as e,P as f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ju,b as Nn,c as ee}from"./chunk-F3TMLDLC.js";import{Ea as Zu}from"./chunk-
|
|
1
|
+
import{a as Ju,b as Nn,c as ee}from"./chunk-F3TMLDLC.js";import{Ea as Zu}from"./chunk-AINDVTMY.js";import{a as $,c as A,g as v}from"./chunk-VKWPEFWQ.js";var eo=A((ir,In)=>{v();(function(e,t){typeof ir=="object"&&typeof In<"u"?t(ir):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.async={}))})(ir,(function(e){"use strict";function t(f,...n){return(...u)=>f(...n,...u)}function r(f){return function(...n){var u=n.pop();return f.call(this,n,u)}}var i=typeof queueMicrotask=="function"&&queueMicrotask,a=typeof setImmediate=="function"&&setImmediate,o=typeof process=="object"&&typeof process.nextTick=="function";function l(f){setTimeout(f,0)}function y(f){return(n,...u)=>f(()=>n(...u))}var _;i?_=queueMicrotask:a?_=setImmediate:o?_=process.nextTick:_=l;var T=y(_);function x(f){return O(f)?function(...n){let u=n.pop(),s=f.apply(this,n);return M(s,u)}:r(function(n,u){var s;try{s=f.apply(this,n)}catch(h){return u(h)}if(s&&typeof s.then=="function")return M(s,u);u(null,s)})}function M(f,n){return f.then(u=>{L(n,null,u)},u=>{L(n,u&&(u instanceof Error||u.message)?u:new Error(u))})}function L(f,n,u){try{f(n,u)}catch(s){T(h=>{throw h},s)}}function O(f){return f[Symbol.toStringTag]==="AsyncFunction"}function H(f){return f[Symbol.toStringTag]==="AsyncGenerator"}function Q(f){return typeof f[Symbol.asyncIterator]=="function"}function b(f){if(typeof f!="function")throw new Error("expected a function");return O(f)?x(f):f}function S(f,n){if(n||(n=f.length),!n)throw new Error("arity is undefined");function u(...s){return typeof s[n-1]=="function"?f.apply(this,s):new Promise((h,c)=>{s[n-1]=(d,...p)=>{if(d)return c(d);h(p.length>1?p:p[0])},f.apply(this,s)})}return u}function ye(f){return function(u,...s){return S(function(c){var d=this;return f(u,(p,g)=>{b(p).apply(d,s.concat(g))},c)})}}function Br(f,n,u,s){n=n||[];var h=[],c=0,d=b(u);return f(n,(p,g,m)=>{var C=c++;d(p,(B,P)=>{h[C]=P,m(B)})},p=>{s(p,h)})}function xt(f){return f&&typeof f.length=="number"&&f.length>=0&&f.length%1===0}let Ct={};function ve(f){function n(...u){if(f!==null){var s=f;f=null,s.apply(this,u)}}return Object.assign(n,f),n}function Kf(f){return f[Symbol.iterator]&&f[Symbol.iterator]()}function Yf(f){var n=-1,u=f.length;return function(){return++n<u?{value:f[n],key:n}:null}}function Qf(f){var n=-1;return function(){var s=f.next();return s.done?null:(n++,{value:s.value,key:n})}}function Xf(f){var n=f?Object.keys(f):[],u=-1,s=n.length;return function h(){var c=n[++u];return c==="__proto__"?h():u<s?{value:f[c],key:c}:null}}function Zf(f){if(xt(f))return Yf(f);var n=Kf(f);return n?Qf(n):Xf(f)}function _e(f){return function(...n){if(f===null)throw new Error("Callback was already called.");var u=f;f=null,u.apply(this,n)}}function Vi(f,n,u,s){let h=!1,c=!1,d=!1,p=0,g=0;function m(){p>=n||d||h||(d=!0,f.next().then(({value:P,done:Z})=>{if(!(c||h)){if(d=!1,Z){h=!0,p<=0&&s(null);return}p++,u(P,g,C),g++,m()}}).catch(B))}function C(P,Z){if(p-=1,!c){if(P)return B(P);if(P===!1){h=!0,c=!0;return}if(Z===Ct||h&&p<=0)return h=!0,s(null);m()}}function B(P){c||(d=!1,h=!0,s(P))}m()}var ie=f=>(n,u,s)=>{if(s=ve(s),f<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!n)return s(null);if(H(n))return Vi(n,f,u,s);if(Q(n))return Vi(n[Symbol.asyncIterator](),f,u,s);var h=Zf(n),c=!1,d=!1,p=0,g=!1;function m(B,P){if(!d)if(p-=1,B)c=!0,s(B);else if(B===!1)c=!0,d=!0;else{if(P===Ct||c&&p<=0)return c=!0,s(null);g||C()}}function C(){for(g=!0;p<f&&!c;){var B=h();if(B===null){c=!0,p<=0&&s(null);return}p+=1,u(B.value,B.key,_e(m))}g=!1}C()};function Jf(f,n,u,s){return ie(n)(f,b(u),s)}var Be=S(Jf,4);function eu(f,n,u){u=ve(u);var s=0,h=0,{length:c}=f,d=!1;c===0&&u(null);function p(g,m){g===!1&&(d=!0),d!==!0&&(g?u(g):(++h===c||m===Ct)&&u(null))}for(;s<c;s++)n(f[s],s,_e(p))}function tu(f,n,u){return Be(f,1/0,n,u)}function ru(f,n,u){var s=xt(f)?eu:tu;return s(f,b(n),u)}var X=S(ru,3);function iu(f,n,u){return Br(X,f,n,u)}var Pt=S(iu,3),Ki=ye(Pt);function nu(f,n,u){return Be(f,1,n,u)}var ne=S(nu,3);function au(f,n,u){return Br(ne,f,n,u)}var Nr=S(au,3),Yi=ye(Nr);let Ne=Symbol("promiseCallback");function Ie(){let f,n;function u(s,...h){if(s)return n(s);f(h.length>1?h:h[0])}return u[Ne]=new Promise((s,h)=>{f=s,n=h}),u}function Ir(f,n,u){typeof n!="number"&&(u=n,n=null),u=ve(u||Ie());var s=Object.keys(f).length;if(!s)return u(null);n||(n=s);var h={},c=0,d=!1,p=!1,g=Object.create(null),m=[],C=[],B={};Object.keys(f).forEach(w=>{var R=f[w];if(!Array.isArray(R)){P(w,[R]),C.push(w);return}var D=R.slice(0,R.length-1),U=D.length;if(U===0){P(w,R),C.push(w);return}B[w]=U,D.forEach(z=>{if(!f[z])throw new Error("async.auto task `"+w+"` has a non-existent dependency `"+z+"` in "+D.join(", "));We(z,()=>{U--,U===0&&P(w,R)})})}),N(),Z();function P(w,R){m.push(()=>ut(w,R))}function Z(){if(!d){if(m.length===0&&c===0)return u(null,h);for(;m.length&&c<n;){var w=m.shift();w()}}}function We(w,R){var D=g[w];D||(D=g[w]=[]),D.push(R)}function Oe(w){var R=g[w]||[];R.forEach(D=>D()),Z()}function ut(w,R){if(!p){var D=_e((z,...J)=>{if(c--,z===!1){d=!0;return}if(J.length<2&&([J]=J),z){var Ue={};if(Object.keys(h).forEach(Me=>{Ue[Me]=h[Me]}),Ue[w]=J,p=!0,g=Object.create(null),d)return;u(z,Ue)}else h[w]=J,Oe(w)});c++;var U=b(R[R.length-1]);R.length>1?U(h,D):U(D)}}function N(){for(var w,R=0;C.length;)w=C.pop(),R++,E(w).forEach(D=>{--B[D]===0&&C.push(D)});if(R!==s)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function E(w){var R=[];return Object.keys(f).forEach(D=>{let U=f[D];Array.isArray(U)&&U.indexOf(w)>=0&&R.push(D)}),R}return u[Ne]}var fu=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,uu=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,ou=/,/,su=/(=.+)?(\s*)$/;function lu(f){let n="",u=0,s=f.indexOf("*/");for(;u<f.length;)if(f[u]==="/"&&f[u+1]==="/"){let h=f.indexOf(`
|
|
2
2
|
`,u);u=h===-1?f.length:h}else if(s!==-1&&f[u]==="/"&&f[u+1]==="*"){let h=f.indexOf("*/",u);h!==-1?(u=h+2,s=f.indexOf("*/",u)):(n+=f[u],u++)}else n+=f[u],u++;return n}function hu(f){let n=lu(f.toString()),u=n.match(fu);if(u||(u=n.match(uu)),!u)throw new Error(`could not parse args in autoInject
|
|
3
3
|
Source:
|
|
4
4
|
`+n);let[,s]=u;return s.replace(/\s/g,"").split(ou).map(h=>h.replace(su,"").trim())}function Qi(f,n){var u={};return Object.keys(f).forEach(s=>{var h=f[s],c,d=O(h),p=!d&&h.length===1||d&&h.length===0;if(Array.isArray(h))c=[...h],h=c.pop(),u[s]=c.concat(c.length>0?g:h);else if(p)u[s]=h;else{if(c=hu(h),h.length===0&&!d&&c.length===0)throw new Error("autoInject task functions require explicit parameters.");d||c.pop(),u[s]=c.concat(g)}function g(m,C){var B=c.map(P=>m[P]);B.push(C),b(h)(...B)}}),Ir(u,n)}class cu{constructor(){this.head=this.tail=null,this.length=0}removeLink(n){return n.prev?n.prev.next=n.next:this.head=n.next,n.next?n.next.prev=n.prev:this.tail=n.prev,n.prev=n.next=null,this.length-=1,n}empty(){for(;this.head;)this.shift();return this}insertAfter(n,u){u.prev=n,u.next=n.next,n.next?n.next.prev=u:this.tail=u,n.next=u,this.length+=1}insertBefore(n,u){u.prev=n.prev,u.next=n,n.prev?n.prev.next=u:this.head=u,n.prev=u,this.length+=1}unshift(n){this.head?this.insertBefore(this.head,n):Xi(this,n)}push(n){this.tail?this.insertAfter(this.tail,n):Xi(this,n)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var n=this.head;n;)yield n.data,n=n.next}remove(n){for(var u=this.head;u;){var{next:s}=u;n(u)&&this.removeLink(u),u=s}return this}}function Xi(f,n){f.length=1,f.head=f.tail=n}function kr(f,n,u){if(n==null)n=1;else if(n===0)throw new RangeError("Concurrency must not be zero");var s=b(f),h=0,c=[];let d={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function p(E,w){d[E].push(w)}function g(E,w){let R=(...D)=>{m(E,R),w(...D)};d[E].push(R)}function m(E,w){if(!E)return Object.keys(d).forEach(R=>d[R]=[]);if(!w)return d[E]=[];d[E]=d[E].filter(R=>R!==w)}function C(E,...w){d[E].forEach(R=>R(...w))}var B=!1;function P(E,w,R,D){if(D!=null&&typeof D!="function")throw new Error("task callback must be a function");N.started=!0;var U,z;function J(Me,...ot){if(Me)return R?z(Me):U();if(ot.length<=1)return U(ot[0]);U(ot)}var Ue=N._createTaskItem(E,R?J:D||J);if(w?N._tasks.unshift(Ue):N._tasks.push(Ue),B||(B=!0,T(()=>{B=!1,N.process()})),R||!D)return new Promise((Me,ot)=>{U=Me,z=ot})}function Z(E){return function(w,...R){h-=1;for(var D=0,U=E.length;D<U;D++){var z=E[D],J=c.indexOf(z);J===0?c.shift():J>0&&c.splice(J,1),z.callback(w,...R),w!=null&&C("error",w,z.data)}h<=N.concurrency-N.buffer&&C("unsaturated"),N.idle()&&C("drain"),N.process()}}function We(E){return E.length===0&&N.idle()?(T(()=>C("drain")),!0):!1}let Oe=E=>w=>{if(!w)return new Promise((R,D)=>{g(E,(U,z)=>{if(U)return D(U);R(z)})});m(E),p(E,w)};var ut=!1,N={_tasks:new cu,_createTaskItem(E,w){return{data:E,callback:w}},*[Symbol.iterator](){yield*N._tasks[Symbol.iterator]()},concurrency:n,payload:u,buffer:n/4,started:!1,paused:!1,push(E,w){return Array.isArray(E)?We(E)?void 0:E.map(R=>P(R,!1,!1,w)):P(E,!1,!1,w)},pushAsync(E,w){return Array.isArray(E)?We(E)?void 0:E.map(R=>P(R,!1,!0,w)):P(E,!1,!0,w)},kill(){m(),N._tasks.empty()},unshift(E,w){return Array.isArray(E)?We(E)?void 0:E.map(R=>P(R,!0,!1,w)):P(E,!0,!1,w)},unshiftAsync(E,w){return Array.isArray(E)?We(E)?void 0:E.map(R=>P(R,!0,!0,w)):P(E,!0,!0,w)},remove(E){N._tasks.remove(E)},process(){if(!ut){for(ut=!0;!N.paused&&h<N.concurrency&&N._tasks.length;){var E=[],w=[],R=N._tasks.length;N.payload&&(R=Math.min(R,N.payload));for(var D=0;D<R;D++){var U=N._tasks.shift();E.push(U),c.push(U),w.push(U.data)}h+=1,N._tasks.length===0&&C("empty"),h===N.concurrency&&C("saturated");var z=_e(Z(E));s(w,z)}ut=!1}},length(){return N._tasks.length},running(){return h},workersList(){return c},idle(){return N._tasks.length+h===0},pause(){N.paused=!0},resume(){N.paused!==!1&&(N.paused=!1,T(N.process))}};return Object.defineProperties(N,{saturated:{writable:!1,value:Oe("saturated")},unsaturated:{writable:!1,value:Oe("unsaturated")},empty:{writable:!1,value:Oe("empty")},drain:{writable:!1,value:Oe("drain")},error:{writable:!1,value:Oe("error")}}),N}function Zi(f,n){return kr(f,1,n)}function Ji(f,n,u){return kr(f,n,u)}function du(f,n,u,s){s=ve(s);var h=b(u);return ne(f,(c,d,p)=>{h(n,c,(g,m)=>{n=m,p(g)})},c=>s(c,n))}var we=S(du,4);function Wr(...f){var n=f.map(b);return function(...u){var s=this,h=u[u.length-1];return typeof h=="function"?u.pop():h=Ie(),we(n,u,(c,d,p)=>{d.apply(s,c.concat((g,...m)=>{p(g,m)}))},(c,d)=>h(c,...d)),h[Ne]}}function en(...f){return Wr(...f.reverse())}function pu(f,n,u,s){return Br(ie(n),f,u,s)}var rt=S(pu,4);function gu(f,n,u,s){var h=b(u);return rt(f,n,(c,d)=>{h(c,(p,...g)=>p?d(p):d(p,g))},(c,d)=>{for(var p=[],g=0;g<d.length;g++)d[g]&&(p=p.concat(...d[g]));return s(c,p)})}var ke=S(gu,4);function yu(f,n,u){return ke(f,1/0,n,u)}var Dt=S(yu,3);function vu(f,n,u){return ke(f,1,n,u)}var jt=S(vu,3);function tn(...f){return function(...n){var u=n.pop();return u(null,...f)}}function le(f,n){return(u,s,h,c)=>{var d=!1,p;let g=b(h);u(s,(m,C,B)=>{g(m,(P,Z)=>{if(P||P===!1)return B(P);if(f(Z)&&!p)return d=!0,p=n(!0,m),B(null,Ct);B()})},m=>{if(m)return c(m);c(null,d?p:n(!1))})}}function _u(f,n,u){return le(s=>s,(s,h)=>h)(X,f,n,u)}var Bt=S(_u,3);function wu(f,n,u,s){return le(h=>h,(h,c)=>c)(ie(n),f,u,s)}var Nt=S(wu,4);function mu(f,n,u){return le(s=>s,(s,h)=>h)(ie(1),f,n,u)}var It=S(mu,3);function rn(f){return(n,...u)=>b(n)(...u,(s,...h)=>{typeof console=="object"&&(s?console.error&&console.error(s):console[f]&&h.forEach(c=>console[f](c)))})}var nn=rn("dir");function bu(f,n,u){u=_e(u);var s=b(f),h=b(n),c;function d(g,...m){if(g)return u(g);g!==!1&&(c=m,h(...m,p))}function p(g,m){if(g)return u(g);if(g!==!1){if(!m)return u(null,...c);s(d)}}return p(null,!0)}var it=S(bu,3);function an(f,n,u){let s=b(n);return it(f,(...h)=>{let c=h.pop();s(...h,(d,p)=>c(d,!p))},u)}function fn(f){return(n,u,s)=>f(n,s)}function Su(f,n,u){return X(f,fn(b(n)),u)}var kt=S(Su,3);function Eu(f,n,u,s){return ie(n)(f,fn(b(u)),s)}var nt=S(Eu,4);function Ru(f,n,u){return nt(f,1,n,u)}var at=S(Ru,3);function Ur(f){return O(f)?f:function(...n){var u=n.pop(),s=!0;n.push((...h)=>{s?T(()=>u(...h)):u(...h)}),f.apply(this,n),s=!1}}function Tu(f,n,u){return le(s=>!s,s=>!s)(X,f,n,u)}var Wt=S(Tu,3);function Lu(f,n,u,s){return le(h=>!h,h=>!h)(ie(n),f,u,s)}var Ut=S(Lu,4);function Ou(f,n,u){return le(s=>!s,s=>!s)(ne,f,n,u)}var Ft=S(Ou,3);function Mu(f,n,u,s){var h=new Array(n.length);f(n,(c,d,p)=>{u(c,(g,m)=>{h[d]=!!m,p(g)})},c=>{if(c)return s(c);for(var d=[],p=0;p<n.length;p++)h[p]&&d.push(n[p]);s(null,d)})}function Au(f,n,u,s){var h=[];f(n,(c,d,p)=>{u(c,(g,m)=>{if(g)return p(g);m&&h.push({index:d,value:c}),p(g)})},c=>{if(c)return s(c);s(null,h.sort((d,p)=>d.index-p.index).map(d=>d.value))})}function $t(f,n,u,s){var h=xt(n)?Mu:Au;return h(f,n,b(u),s)}function qu(f,n,u){return $t(X,f,n,u)}var Ht=S(qu,3);function xu(f,n,u,s){return $t(ie(n),f,u,s)}var Gt=S(xu,4);function Cu(f,n,u){return $t(ne,f,n,u)}var zt=S(Cu,3);function Pu(f,n){var u=_e(n),s=b(Ur(f));function h(c){if(c)return u(c);c!==!1&&s(h)}return h()}var un=S(Pu,2);function Du(f,n,u,s){var h=b(u);return rt(f,n,(c,d)=>{h(c,(p,g)=>p?d(p):d(p,{key:g,val:c}))},(c,d)=>{for(var p={},{hasOwnProperty:g}=Object.prototype,m=0;m<d.length;m++)if(d[m]){var{key:C}=d[m],{val:B}=d[m];g.call(p,C)?p[C].push(B):p[C]=[B]}return s(c,p)})}var Vt=S(Du,4);function on(f,n,u){return Vt(f,1/0,n,u)}function sn(f,n,u){return Vt(f,1,n,u)}var ln=rn("log");function ju(f,n,u,s){s=ve(s);var h={},c=b(u);return ie(n)(f,(d,p,g)=>{c(d,p,(m,C)=>{if(m)return g(m);h[p]=C,g(m)})},d=>s(d,h))}var Kt=S(ju,4);function hn(f,n,u){return Kt(f,1/0,n,u)}function cn(f,n,u){return Kt(f,1,n,u)}function dn(f,n=u=>u){var u=Object.create(null),s=Object.create(null),h=b(f),c=r((d,p)=>{var g=n(...d);g in u?T(()=>p(null,...u[g])):g in s?s[g].push(p):(s[g]=[p],h(...d,(m,...C)=>{m||(u[g]=C);var B=s[g];delete s[g];for(var P=0,Z=B.length;P<Z;P++)B[P](m,...C)}))});return c.memo=u,c.unmemoized=f,c}var Yt;o?Yt=process.nextTick:a?Yt=setImmediate:Yt=l;var pn=y(Yt),Fr=S((f,n,u)=>{var s=xt(n)?[]:{};f(n,(h,c,d)=>{b(h)((p,...g)=>{g.length<2&&([g]=g),s[c]=g,d(p)})},h=>u(h,s))},3);function gn(f,n){return Fr(X,f,n)}function yn(f,n,u){return Fr(ie(n),f,u)}function $r(f,n){var u=b(f);return kr((s,h)=>{u(s[0],h)},n,1)}class Bu{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(n){let u;for(;n>0&&Hr(this.heap[n],this.heap[u=vn(n)]);){let s=this.heap[n];this.heap[n]=this.heap[u],this.heap[u]=s,n=u}}percDown(n){let u;for(;(u=Nu(n))<this.heap.length&&(u+1<this.heap.length&&Hr(this.heap[u+1],this.heap[u])&&(u=u+1),!Hr(this.heap[n],this.heap[u]));){let s=this.heap[n];this.heap[n]=this.heap[u],this.heap[u]=s,n=u}}push(n){n.pushCount=++this.pushCount,this.heap.push(n),this.percUp(this.heap.length-1)}unshift(n){return this.heap.push(n)}shift(){let[n]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),n}toArray(){return[...this]}*[Symbol.iterator](){for(let n=0;n<this.heap.length;n++)yield this.heap[n].data}remove(n){let u=0;for(let s=0;s<this.heap.length;s++)n(this.heap[s])||(this.heap[u]=this.heap[s],u++);this.heap.splice(u);for(let s=vn(this.heap.length-1);s>=0;s--)this.percDown(s);return this}}function Nu(f){return(f<<1)+1}function vn(f){return(f+1>>1)-1}function Hr(f,n){return f.priority!==n.priority?f.priority<n.priority:f.pushCount<n.pushCount}function _n(f,n){var u=$r(f,n),{push:s,pushAsync:h}=u;u._tasks=new Bu,u._createTaskItem=({data:d,priority:p},g)=>({data:d,priority:p,callback:g});function c(d,p){return Array.isArray(d)?d.map(g=>({data:g,priority:p})):{data:d,priority:p}}return u.push=function(d,p=0,g){return s(c(d,p),g)},u.pushAsync=function(d,p=0,g){return h(c(d,p),g)},delete u.unshift,delete u.unshiftAsync,u}function Iu(f,n){if(n=ve(n),!Array.isArray(f))return n(new TypeError("First argument to race must be an array of functions"));if(!f.length)return n();for(var u=0,s=f.length;u<s;u++)b(f[u])(n)}var wn=S(Iu,2);function Qt(f,n,u,s){var h=[...f].reverse();return we(h,n,u,s)}function Xt(f){var n=b(f);return r(function(s,h){return s.push((c,...d)=>{let p={};if(c&&(p.error=c),d.length>0){var g=d;d.length<=1&&([g]=d),p.value=g}h(null,p)}),n.apply(this,s)})}function mn(f){var n;return Array.isArray(f)?n=f.map(Xt):(n={},Object.keys(f).forEach(u=>{n[u]=Xt.call(this,f[u])})),n}function Gr(f,n,u,s){let h=b(u);return $t(f,n,(c,d)=>{h(c,(p,g)=>{d(p,!g)})},s)}function ku(f,n,u){return Gr(X,f,n,u)}var bn=S(ku,3);function Wu(f,n,u,s){return Gr(ie(n),f,u,s)}var Sn=S(Wu,4);function Uu(f,n,u){return Gr(ne,f,n,u)}var En=S(Uu,3);function Rn(f){return function(){return f}}let zr=5,Tn=0;function Zt(f,n,u){var s={times:zr,intervalFunc:Rn(Tn)};if(arguments.length<3&&typeof f=="function"?(u=n||Ie(),n=f):(Fu(s,f),u=u||Ie()),typeof n!="function")throw new Error("Invalid arguments for async.retry");var h=b(n),c=1;function d(){h((p,...g)=>{p!==!1&&(p&&c++<s.times&&(typeof s.errorFilter!="function"||s.errorFilter(p))?setTimeout(d,s.intervalFunc(c-1)):u(p,...g))})}return d(),u[Ne]}function Fu(f,n){if(typeof n=="object")f.times=+n.times||zr,f.intervalFunc=typeof n.interval=="function"?n.interval:Rn(+n.interval||Tn),f.errorFilter=n.errorFilter;else if(typeof n=="number"||typeof n=="string")f.times=+n||zr;else throw new Error("Invalid arguments for async.retry")}function Ln(f,n){n||(n=f,f=null);let u=f&&f.arity||n.length;O(n)&&(u+=1);var s=b(n);return r((h,c)=>{(h.length<u-1||c==null)&&(h.push(c),c=Ie());function d(p){s(...h,p)}return f?Zt(f,d,c):Zt(d,c),c[Ne]})}function On(f,n){return Fr(ne,f,n)}function $u(f,n,u){return le(Boolean,s=>s)(X,f,n,u)}var Jt=S($u,3);function Hu(f,n,u,s){return le(Boolean,h=>h)(ie(n),f,u,s)}var er=S(Hu,4);function Gu(f,n,u){return le(Boolean,s=>s)(ne,f,n,u)}var tr=S(Gu,3);function zu(f,n,u){var s=b(n);return Pt(f,(c,d)=>{s(c,(p,g)=>{if(p)return d(p);d(p,{value:c,criteria:g})})},(c,d)=>{if(c)return u(c);u(null,d.sort(h).map(p=>p.value))});function h(c,d){var p=c.criteria,g=d.criteria;return p<g?-1:p>g?1:0}}var Mn=S(zu,3);function An(f,n,u){var s=b(f);return r((h,c)=>{var d=!1,p;function g(){var m=f.name||"anonymous",C=new Error('Callback function "'+m+'" timed out.');C.code="ETIMEDOUT",u&&(C.info=u),d=!0,c(C)}h.push((...m)=>{d||(c(...m),clearTimeout(p))}),p=setTimeout(g,n),s(...h)})}function Vu(f){for(var n=Array(f);f--;)n[f]=f;return n}function rr(f,n,u,s){var h=b(u);return rt(Vu(f),n,h,s)}function qn(f,n,u){return rr(f,1/0,n,u)}function xn(f,n,u){return rr(f,1,n,u)}function Cn(f,n,u,s){arguments.length<=3&&typeof n=="function"&&(s=u,u=n,n=Array.isArray(f)?[]:{}),s=ve(s||Ie());var h=b(u);return X(f,(c,d,p)=>{h(n,c,d,p)},c=>s(c,n)),s[Ne]}function Ku(f,n){var u=null,s;return at(f,(h,c)=>{b(h)((d,...p)=>{if(d===!1)return c(d);p.length<2?[s]=p:s=p,u=d,c(d?null:{})})},()=>n(u,s))}var Pn=S(Ku);function Dn(f){return(...n)=>(f.unmemoized||f)(...n)}function Yu(f,n,u){u=_e(u);var s=b(n),h=b(f),c=[];function d(g,...m){if(g)return u(g);c=m,g!==!1&&h(p)}function p(g,m){if(g)return u(g);if(g!==!1){if(!m)return u(null,...c);s(d)}}return h(p)}var ft=S(Yu,3);function jn(f,n,u){let s=b(f);return ft(h=>s((c,d)=>h(c,!d)),n,u)}function Qu(f,n){if(n=ve(n),!Array.isArray(f))return n(new Error("First argument to waterfall must be an array of functions"));if(!f.length)return n();var u=0;function s(c){var d=b(f[u++]);d(...c,_e(h))}function h(c,...d){if(c!==!1){if(c||u===f.length)return n(c,...d);s(d)}}s([])}var Bn=S(Qu),Xu={apply:t,applyEach:Ki,applyEachSeries:Yi,asyncify:x,auto:Ir,autoInject:Qi,cargo:Zi,cargoQueue:Ji,compose:en,concat:Dt,concatLimit:ke,concatSeries:jt,constant:tn,detect:Bt,detectLimit:Nt,detectSeries:It,dir:nn,doUntil:an,doWhilst:it,each:kt,eachLimit:nt,eachOf:X,eachOfLimit:Be,eachOfSeries:ne,eachSeries:at,ensureAsync:Ur,every:Wt,everyLimit:Ut,everySeries:Ft,filter:Ht,filterLimit:Gt,filterSeries:zt,forever:un,groupBy:on,groupByLimit:Vt,groupBySeries:sn,log:ln,map:Pt,mapLimit:rt,mapSeries:Nr,mapValues:hn,mapValuesLimit:Kt,mapValuesSeries:cn,memoize:dn,nextTick:pn,parallel:gn,parallelLimit:yn,priorityQueue:_n,queue:$r,race:wn,reduce:we,reduceRight:Qt,reflect:Xt,reflectAll:mn,reject:bn,rejectLimit:Sn,rejectSeries:En,retry:Zt,retryable:Ln,seq:Wr,series:On,setImmediate:T,some:Jt,someLimit:er,someSeries:tr,sortBy:Mn,timeout:An,times:qn,timesLimit:rr,timesSeries:xn,transform:Cn,tryEach:Pn,unmemoize:Dn,until:jn,waterfall:Bn,whilst:ft,all:Wt,allLimit:Ut,allSeries:Ft,any:Jt,anyLimit:er,anySeries:tr,find:Bt,findLimit:Nt,findSeries:It,flatMap:Dt,flatMapLimit:ke,flatMapSeries:jt,forEach:kt,forEachSeries:at,forEachLimit:nt,forEachOf:X,forEachOfSeries:ne,forEachOfLimit:Be,inject:we,foldl:we,foldr:Qt,select:Ht,selectLimit:Gt,selectSeries:zt,wrapSync:x,during:ft,doDuring:it};e.all=Wt,e.allLimit=Ut,e.allSeries=Ft,e.any=Jt,e.anyLimit=er,e.anySeries=tr,e.apply=t,e.applyEach=Ki,e.applyEachSeries=Yi,e.asyncify=x,e.auto=Ir,e.autoInject=Qi,e.cargo=Zi,e.cargoQueue=Ji,e.compose=en,e.concat=Dt,e.concatLimit=ke,e.concatSeries=jt,e.constant=tn,e.default=Xu,e.detect=Bt,e.detectLimit=Nt,e.detectSeries=It,e.dir=nn,e.doDuring=it,e.doUntil=an,e.doWhilst=it,e.during=ft,e.each=kt,e.eachLimit=nt,e.eachOf=X,e.eachOfLimit=Be,e.eachOfSeries=ne,e.eachSeries=at,e.ensureAsync=Ur,e.every=Wt,e.everyLimit=Ut,e.everySeries=Ft,e.filter=Ht,e.filterLimit=Gt,e.filterSeries=zt,e.find=Bt,e.findLimit=Nt,e.findSeries=It,e.flatMap=Dt,e.flatMapLimit=ke,e.flatMapSeries=jt,e.foldl=we,e.foldr=Qt,e.forEach=kt,e.forEachLimit=nt,e.forEachOf=X,e.forEachOfLimit=Be,e.forEachOfSeries=ne,e.forEachSeries=at,e.forever=un,e.groupBy=on,e.groupByLimit=Vt,e.groupBySeries=sn,e.inject=we,e.log=ln,e.map=Pt,e.mapLimit=rt,e.mapSeries=Nr,e.mapValues=hn,e.mapValuesLimit=Kt,e.mapValuesSeries=cn,e.memoize=dn,e.nextTick=pn,e.parallel=gn,e.parallelLimit=yn,e.priorityQueue=_n,e.queue=$r,e.race=wn,e.reduce=we,e.reduceRight=Qt,e.reflect=Xt,e.reflectAll=mn,e.reject=bn,e.rejectLimit=Sn,e.rejectSeries=En,e.retry=Zt,e.retryable=Ln,e.select=Ht,e.selectLimit=Gt,e.selectSeries=zt,e.seq=Wr,e.series=On,e.setImmediate=T,e.some=Jt,e.someLimit=er,e.someSeries=tr,e.sortBy=Mn,e.timeout=An,e.times=qn,e.timesLimit=rr,e.timesSeries=xn,e.transform=Cn,e.tryEach=Pn,e.unmemoize=Dn,e.until=jn,e.waterfall=Bn,e.whilst=ft,e.wrapSync=x,Object.defineProperty(e,"__esModule",{value:!0})}))});var Vr=A((Qh,kn)=>{v();kn.exports=$("stream")});var Gn=A((Zh,Hn)=>{"use strict";v();function Wn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function Un(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wn(Object(r),!0).forEach(function(i){to(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wn(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function to(e,t,r){return t=$n(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ro(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fn(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,$n(i.key),i)}}function io(e,t,r){return t&&Fn(e.prototype,t),r&&Fn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $n(e){var t=no(e,"string");return typeof t=="symbol"?t:String(t)}function no(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ao=$("buffer"),nr=ao.Buffer,fo=$("util"),Kr=fo.inspect,uo=Kr&&Kr.custom||"inspect";function oo(e,t,r){nr.prototype.copy.call(e,t,r)}Hn.exports=(function(){function e(){ro(this,e),this.head=null,this.tail=null,this.length=0}return io(e,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,a=""+i.data;i=i.next;)a+=r+i.data;return a}},{key:"concat",value:function(r){if(this.length===0)return nr.alloc(0);for(var i=nr.allocUnsafe(r>>>0),a=this.head,o=0;a;)oo(a.data,i,o),o+=a.data.length,a=a.next;return i}},{key:"consume",value:function(r,i){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=i?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,a=1,o=i.data;for(r-=o.length;i=i.next;){var l=i.data,y=r>l.length?l.length:r;if(y===l.length?o+=l:o+=l.slice(0,r),r-=y,r===0){y===l.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=l.slice(y));break}++a}return this.length-=a,o}},{key:"_getBuffer",value:function(r){var i=nr.allocUnsafe(r),a=this.head,o=1;for(a.data.copy(i),r-=a.data.length;a=a.next;){var l=a.data,y=r>l.length?l.length:r;if(l.copy(i,i.length-r,0,y),r-=y,r===0){y===l.length?(++o,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=l.slice(y));break}++o}return this.length-=o,i}},{key:uo,value:function(r,i){return Kr(this,Un(Un({},i),{},{depth:0,customInspect:!1}))}}]),e})()});var Qr=A((ec,Vn)=>{"use strict";v();function so(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Yr,this,e)):process.nextTick(Yr,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(ar,r):(r._writableState.errorEmitted=!0,process.nextTick(zn,r,o)):process.nextTick(zn,r,o):t?(process.nextTick(ar,r),t(o)):process.nextTick(ar,r)}),this)}function zn(e,t){Yr(e,t),ar(e)}function ar(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function lo(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Yr(e,t){e.emit("error",t)}function ho(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}Vn.exports={destroy:so,undestroy:lo,errorOrDestroy:ho}});var me=A((rc,Qn)=>{"use strict";v();var Yn={};function te(e,t,r){r||(r=Error);function i(o,l,y){return typeof t=="string"?t:t(o,l,y)}class a extends r{constructor(l,y,_){super(i(l,y,_))}}a.prototype.name=r.name,a.prototype.code=e,Yn[e]=a}function Kn(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(i=>String(i)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function co(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function po(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function go(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}te("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);te("ERR_INVALID_ARG_TYPE",function(e,t,r){let i;typeof t=="string"&&co(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";let a;if(po(e," argument"))a=`The ${e} ${i} ${Kn(t,"type")}`;else{let o=go(e,".")?"property":"argument";a=`The "${e}" ${o} ${i} ${Kn(t,"type")}`}return a+=`. Received type ${typeof r}`,a},TypeError);te("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");te("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});te("ERR_STREAM_PREMATURE_CLOSE","Premature close");te("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});te("ERR_MULTIPLE_CALLBACK","Callback called multiple times");te("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");te("ERR_STREAM_WRITE_AFTER_END","write after end");te("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);te("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);te("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Qn.exports.codes=Yn});var Xr=A((nc,Xn)=>{"use strict";v();var yo=me().codes.ERR_INVALID_OPT_VALUE;function vo(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function _o(e,t,r,i){var a=vo(t,i,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var o=i?r:"highWaterMark";throw new yo(o,a)}return Math.floor(a)}return e.objectMode?16:16*1024}Xn.exports={getHighWaterMark:_o}});var ei=A((fc,ia)=>{"use strict";v();ia.exports=F;function Jn(e){var t=this;this.next=null,this.entry=null,this.finish=function(){Go(t,e)}}var Fe;F.WritableState=lt;var wo={deprecate:Nn()},ea=Vr(),ur=$("buffer").Buffer,mo=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function bo(e){return ur.from(e)}function So(e){return ur.isBuffer(e)||e instanceof mo}var Jr=Qr(),Eo=Xr(),Ro=Eo.getHighWaterMark,be=me().codes,To=be.ERR_INVALID_ARG_TYPE,Lo=be.ERR_METHOD_NOT_IMPLEMENTED,Oo=be.ERR_MULTIPLE_CALLBACK,Mo=be.ERR_STREAM_CANNOT_PIPE,Ao=be.ERR_STREAM_DESTROYED,qo=be.ERR_STREAM_NULL_VALUES,xo=be.ERR_STREAM_WRITE_AFTER_END,Co=be.ERR_UNKNOWN_ENCODING,$e=Jr.errorOrDestroy;ee()(F,ea);function Po(){}function lt(e,t,r){Fe=Fe||Ae(),e=e||{},typeof r!="boolean"&&(r=t instanceof Fe),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=Ro(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){Wo(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Jn(this)}lt.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(lt.prototype,"buffer",{get:wo.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var fr;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(fr=Function.prototype[Symbol.hasInstance],Object.defineProperty(F,Symbol.hasInstance,{value:function(t){return fr.call(this,t)?!0:this!==F?!1:t&&t._writableState instanceof lt}})):fr=function(t){return t instanceof this};function F(e){Fe=Fe||Ae();var t=this instanceof Fe;if(!t&&!fr.call(F,this))return new F(e);this._writableState=new lt(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),ea.call(this)}F.prototype.pipe=function(){$e(this,new Mo)};function Do(e,t){var r=new xo;$e(e,r),process.nextTick(t,r)}function jo(e,t,r,i){var a;return r===null?a=new qo:typeof r!="string"&&!t.objectMode&&(a=new To("chunk",["string","Buffer"],r)),a?($e(e,a),process.nextTick(i,a),!1):!0}F.prototype.write=function(e,t,r){var i=this._writableState,a=!1,o=!i.objectMode&&So(e);return o&&!ur.isBuffer(e)&&(e=bo(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Po),i.ending?Do(this,r):(o||jo(this,i,e,r))&&(i.pendingcb++,a=No(this,i,o,e,t,r)),a};F.prototype.cork=function(){this._writableState.corked++};F.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&ta(this,e))};F.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new Co(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(F.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Bo(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=ur.from(t,r)),t}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function No(e,t,r,i,a,o){if(!r){var l=Bo(t,i,a);i!==l&&(r=!0,a="buffer",i=l)}var y=t.objectMode?1:i.length;t.length+=y;var _=t.length<t.highWaterMark;if(_||(t.needDrain=!0),t.writing||t.corked){var T=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:a,isBuf:r,callback:o,next:null},T?T.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Zr(e,t,!1,y,i,a,o);return _}function Zr(e,t,r,i,a,o,l){t.writelen=i,t.writecb=l,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new Ao("write")):r?e._writev(a,t.onwrite):e._write(a,o,t.onwrite),t.sync=!1}function Io(e,t,r,i,a){--t.pendingcb,r?(process.nextTick(a,i),process.nextTick(st,e,t),e._writableState.errorEmitted=!0,$e(e,i)):(a(i),e._writableState.errorEmitted=!0,$e(e,i),st(e,t))}function ko(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Wo(e,t){var r=e._writableState,i=r.sync,a=r.writecb;if(typeof a!="function")throw new Oo;if(ko(r),t)Io(e,r,i,t,a);else{var o=ra(r)||e.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&ta(e,r),i?process.nextTick(Zn,e,r,o,a):Zn(e,r,o,a)}}function Zn(e,t,r,i){r||Uo(e,t),t.pendingcb--,i(),st(e,t)}function Uo(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function ta(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,a=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var l=0,y=!0;r;)a[l]=r,r.isBuf||(y=!1),r=r.next,l+=1;a.allBuffers=y,Zr(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Jn(t),t.bufferedRequestCount=0}else{for(;r;){var _=r.chunk,T=r.encoding,x=r.callback,M=t.objectMode?1:_.length;if(Zr(e,t,!1,M,_,T,x),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}F.prototype._write=function(e,t,r){r(new Lo("_write()"))};F.prototype._writev=null;F.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||Ho(this,i,r),this};Object.defineProperty(F.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ra(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Fo(e,t){e._final(function(r){t.pendingcb--,r&&$e(e,r),t.prefinished=!0,e.emit("prefinish"),st(e,t)})}function $o(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(Fo,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function st(e,t){var r=ra(t);if(r&&($o(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}function Ho(e,t,r){t.ending=!0,st(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function Go(e,t,r){var i=e.entry;for(e.entry=null;i;){var a=i.callback;t.pendingcb--,a(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(F.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});F.prototype.destroy=Jr.destroy;F.prototype._undestroy=Jr.undestroy;F.prototype._destroy=function(e,t){t(e)}});var Ae=A((oc,aa)=>{"use strict";v();var zo=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};aa.exports=fe;var na=ii(),ri=ei();ee()(fe,na);for(ti=zo(ri.prototype),or=0;or<ti.length;or++)sr=ti[or],fe.prototype[sr]||(fe.prototype[sr]=ri.prototype[sr]);var ti,sr,or;function fe(e){if(!(this instanceof fe))return new fe(e);na.call(this,e),ri.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Vo)))}Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(fe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(fe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Vo(){this._writableState.ended||process.nextTick(Ko,this)}function Ko(e){e.end()}Object.defineProperty(fe.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var oa=A((ni,ua)=>{v();var lr=$("buffer"),ue=lr.Buffer;function fa(e,t){for(var r in e)t[r]=e[r]}ue.from&&ue.alloc&&ue.allocUnsafe&&ue.allocUnsafeSlow?ua.exports=lr:(fa(lr,ni),ni.Buffer=qe);function qe(e,t,r){return ue(e,t,r)}qe.prototype=Object.create(ue.prototype);fa(ue,qe);qe.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ue(e,t,r)};qe.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ue(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};qe.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ue(e)};qe.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return lr.SlowBuffer(e)}});var ui=A(la=>{"use strict";v();var fi=oa().Buffer,sa=fi.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Yo(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function Qo(e){var t=Yo(e);if(typeof t!="string"&&(fi.isEncoding===sa||!sa(e)))throw new Error("Unknown encoding: "+e);return t||e}la.StringDecoder=ht;function ht(e){this.encoding=Qo(e);var t;switch(this.encoding){case"utf16le":this.text=rs,this.end=is,t=4;break;case"utf8":this.fillLast=Jo,t=4;break;case"base64":this.text=ns,this.end=as,t=3;break;default:this.write=fs,this.end=us;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fi.allocUnsafe(t)}ht.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};ht.prototype.end=ts;ht.prototype.text=es;ht.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function ai(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Xo(e,t,r){var i=t.length-1;if(i<r)return 0;var a=ai(t[i]);return a>=0?(a>0&&(e.lastNeed=a-1),a):--i<r||a===-2?0:(a=ai(t[i]),a>=0?(a>0&&(e.lastNeed=a-2),a):--i<r||a===-2?0:(a=ai(t[i]),a>=0?(a>0&&(a===2?a=0:e.lastNeed=a-3),a):0))}function Zo(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function Jo(e){var t=this.lastTotal-this.lastNeed,r=Zo(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function es(e,t){var r=Xo(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function ts(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function rs(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function is(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function ns(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function as(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function fs(e){return e.toString(this.encoding)}function us(e){return e&&e.length?this.write(e):""}});var hr=A((dc,da)=>{"use strict";v();var ha=me().codes.ERR_STREAM_PREMATURE_CLOSE;function os(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];e.apply(this,i)}}}function ss(){}function ls(e){return e.setHeader&&typeof e.abort=="function"}function ca(e,t,r){if(typeof t=="function")return ca(e,null,t);t||(t={}),r=os(r||ss);var i=t.readable||t.readable!==!1&&e.readable,a=t.writable||t.writable!==!1&&e.writable,o=function(){e.writable||y()},l=e._writableState&&e._writableState.finished,y=function(){a=!1,l=!0,i||r.call(e)},_=e._readableState&&e._readableState.endEmitted,T=function(){i=!1,_=!0,a||r.call(e)},x=function(H){r.call(e,H)},M=function(){var H;if(i&&!_)return(!e._readableState||!e._readableState.ended)&&(H=new ha),r.call(e,H);if(a&&!l)return(!e._writableState||!e._writableState.ended)&&(H=new ha),r.call(e,H)},L=function(){e.req.on("finish",y)};return ls(e)?(e.on("complete",y),e.on("abort",M),e.req?L():e.on("request",L)):a&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",T),e.on("finish",y),t.error!==!1&&e.on("error",x),e.on("close",M),function(){e.removeListener("complete",y),e.removeListener("abort",M),e.removeListener("request",L),e.req&&e.req.removeListener("finish",y),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",y),e.removeListener("end",T),e.removeListener("error",x),e.removeListener("close",M)}}da.exports=ca});var ga=A((gc,pa)=>{"use strict";v();var cr;function Se(e,t,r){return t=hs(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hs(e){var t=cs(e,"string");return typeof t=="symbol"?t:String(t)}function cs(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ds=hr(),Ee=Symbol("lastResolve"),xe=Symbol("lastReject"),ct=Symbol("error"),dr=Symbol("ended"),Ce=Symbol("lastPromise"),oi=Symbol("handlePromise"),Pe=Symbol("stream");function Re(e,t){return{value:e,done:t}}function ps(e){var t=e[Ee];if(t!==null){var r=e[Pe].read();r!==null&&(e[Ce]=null,e[Ee]=null,e[xe]=null,t(Re(r,!1)))}}function gs(e){process.nextTick(ps,e)}function ys(e,t){return function(r,i){e.then(function(){if(t[dr]){r(Re(void 0,!0));return}t[oi](r,i)},i)}}var vs=Object.getPrototypeOf(function(){}),_s=Object.setPrototypeOf((cr={get stream(){return this[Pe]},next:function(){var t=this,r=this[ct];if(r!==null)return Promise.reject(r);if(this[dr])return Promise.resolve(Re(void 0,!0));if(this[Pe].destroyed)return new Promise(function(l,y){process.nextTick(function(){t[ct]?y(t[ct]):l(Re(void 0,!0))})});var i=this[Ce],a;if(i)a=new Promise(ys(i,this));else{var o=this[Pe].read();if(o!==null)return Promise.resolve(Re(o,!1));a=new Promise(this[oi])}return this[Ce]=a,a}},Se(cr,Symbol.asyncIterator,function(){return this}),Se(cr,"return",function(){var t=this;return new Promise(function(r,i){t[Pe].destroy(null,function(a){if(a){i(a);return}r(Re(void 0,!0))})})}),cr),vs),ws=function(t){var r,i=Object.create(_s,(r={},Se(r,Pe,{value:t,writable:!0}),Se(r,Ee,{value:null,writable:!0}),Se(r,xe,{value:null,writable:!0}),Se(r,ct,{value:null,writable:!0}),Se(r,dr,{value:t._readableState.endEmitted,writable:!0}),Se(r,oi,{value:function(o,l){var y=i[Pe].read();y?(i[Ce]=null,i[Ee]=null,i[xe]=null,o(Re(y,!1))):(i[Ee]=o,i[xe]=l)},writable:!0}),r));return i[Ce]=null,ds(t,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=i[xe];o!==null&&(i[Ce]=null,i[Ee]=null,i[xe]=null,o(a)),i[ct]=a;return}var l=i[Ee];l!==null&&(i[Ce]=null,i[Ee]=null,i[xe]=null,l(Re(void 0,!0))),i[dr]=!0}),t.on("readable",gs.bind(null,i)),i};pa.exports=ws});var wa=A((vc,_a)=>{"use strict";v();function ya(e,t,r,i,a,o,l){try{var y=e[o](l),_=y.value}catch(T){r(T);return}y.done?t(_):Promise.resolve(_).then(i,a)}function ms(e){return function(){var t=this,r=arguments;return new Promise(function(i,a){var o=e.apply(t,r);function l(_){ya(o,i,a,l,y,"next",_)}function y(_){ya(o,i,a,l,y,"throw",_)}l(void 0)})}}function va(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function bs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?va(Object(r),!0).forEach(function(i){Ss(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):va(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Ss(e,t,r){return t=Es(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Es(e){var t=Rs(e,"string");return typeof t=="symbol"?t:String(t)}function Rs(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ts=me().codes.ERR_INVALID_ARG_TYPE;function Ls(e,t,r){var i;if(t&&typeof t.next=="function")i=t;else if(t&&t[Symbol.asyncIterator])i=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])i=t[Symbol.iterator]();else throw new Ts("iterable",["Iterable"],t);var a=new e(bs({objectMode:!0},r)),o=!1;a._read=function(){o||(o=!0,l())};function l(){return y.apply(this,arguments)}function y(){return y=ms(function*(){try{var _=yield i.next(),T=_.value,x=_.done;x?a.push(null):a.push(yield T)?l():o=!1}catch(M){a.destroy(M)}}),y.apply(this,arguments)}return a}_a.exports=Ls});var ii=A((mc,Aa)=>{"use strict";v();Aa.exports=j;var He;j.ReadableState=Ea;var wc=$("events").EventEmitter,Sa=function(t,r){return t.listeners(r).length},pt=Vr(),pr=$("buffer").Buffer,Os=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Ms(e){return pr.from(e)}function As(e){return pr.isBuffer(e)||e instanceof Os}var si=$("util"),q;si&&si.debuglog?q=si.debuglog("stream"):q=function(){};var qs=Gn(),yi=Qr(),xs=Xr(),Cs=xs.getHighWaterMark,gr=me().codes,Ps=gr.ERR_INVALID_ARG_TYPE,Ds=gr.ERR_STREAM_PUSH_AFTER_EOF,js=gr.ERR_METHOD_NOT_IMPLEMENTED,Bs=gr.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ge,li,hi;ee()(j,pt);var dt=yi.errorOrDestroy,ci=["error","close","destroy","pause","resume"];function Ns(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function Ea(e,t,r){He=He||Ae(),e=e||{},typeof r!="boolean"&&(r=t instanceof He),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Cs(this,e,"readableHighWaterMark",r),this.buffer=new qs,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Ge||(Ge=ui().StringDecoder),this.decoder=new Ge(e.encoding),this.encoding=e.encoding)}function j(e){if(He=He||Ae(),!(this instanceof j))return new j(e);var t=this instanceof He;this._readableState=new Ea(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),pt.call(this)}Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});j.prototype.destroy=yi.destroy;j.prototype._undestroy=yi.undestroy;j.prototype._destroy=function(e,t){t(e)};j.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=pr.from(e,t),t=""),i=!0),Ra(this,e,t,!1,i)};j.prototype.unshift=function(e){return Ra(this,e,null,!0,!1)};function Ra(e,t,r,i,a){q("readableAddChunk",t);var o=e._readableState;if(t===null)o.reading=!1,Ws(e,o);else{var l;if(a||(l=Is(o,t)),l)dt(e,l);else if(o.objectMode||t&&t.length>0)if(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==pr.prototype&&(t=Ms(t)),i)o.endEmitted?dt(e,new Bs):di(e,o,t,!0);else if(o.ended)dt(e,new Ds);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?di(e,o,t,!1):gi(e,o)):di(e,o,t,!1)}else i||(o.reading=!1,gi(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function di(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&yr(e)),gi(e,t)}function Is(e,t){var r;return!As(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new Ps("chunk",["string","Buffer","Uint8Array"],t)),r}j.prototype.isPaused=function(){return this._readableState.flowing===!1};j.prototype.setEncoding=function(e){Ge||(Ge=ui().StringDecoder);var t=new Ge(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var ma=1073741824;function ks(e){return e>=ma?e=ma:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function ba(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=ks(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}j.prototype.read=function(e){q("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return q("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?pi(this):yr(this),null;if(e=ba(e,t),e===0&&t.ended)return t.length===0&&pi(this),null;var i=t.needReadable;q("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,q("length less than watermark",i)),t.ended||t.reading?(i=!1,q("reading or ended",i)):i&&(q("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=ba(r,t)));var a;return e>0?a=Oa(e,t):a=null,a===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&pi(this)),a!==null&&this.emit("data",a),a};function Ws(e,t){if(q("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?yr(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,Ta(e)))}}function yr(e){var t=e._readableState;q("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(q("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(Ta,e))}function Ta(e){var t=e._readableState;q("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,vi(e)}function gi(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(Us,e,t))}function Us(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(q("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}j.prototype._read=function(e){dt(this,new js("_read()"))};j.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,q("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,o=a?y:Q;i.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",l);function l(b,S){q("onunpipe"),b===r&&S&&S.hasUnpiped===!1&&(S.hasUnpiped=!0,x())}function y(){q("onend"),e.end()}var _=Fs(r);e.on("drain",_);var T=!1;function x(){q("cleanup"),e.removeListener("close",O),e.removeListener("finish",H),e.removeListener("drain",_),e.removeListener("error",L),e.removeListener("unpipe",l),r.removeListener("end",y),r.removeListener("end",Q),r.removeListener("data",M),T=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&_()}r.on("data",M);function M(b){q("ondata");var S=e.write(b);q("dest.write",S),S===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&Ma(i.pipes,e)!==-1)&&!T&&(q("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function L(b){q("onerror",b),Q(),e.removeListener("error",L),Sa(e,"error")===0&&dt(e,b)}Ns(e,"error",L);function O(){e.removeListener("finish",H),Q()}e.once("close",O);function H(){q("onfinish"),e.removeListener("close",O),Q()}e.once("finish",H);function Q(){q("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(q("pipe resume"),r.resume()),e};function Fs(e){return function(){var r=e._readableState;q("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Sa(e,"data")&&(r.flowing=!0,vi(e))}}j.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<a;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var l=Ma(t.pipes,e);return l===-1?this:(t.pipes.splice(l,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};j.prototype.on=function(e,t){var r=pt.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,q("on readable",i.length,i.reading),i.length?yr(this):i.reading||process.nextTick($s,this)),r};j.prototype.addListener=j.prototype.on;j.prototype.removeListener=function(e,t){var r=pt.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(La,this),r};j.prototype.removeAllListeners=function(e){var t=pt.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(La,this),t};function La(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function $s(e){q("readable nexttick read 0"),e.read(0)}j.prototype.resume=function(){var e=this._readableState;return e.flowing||(q("resume"),e.flowing=!e.readableListening,Hs(this,e)),e.paused=!1,this};function Hs(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(Gs,e,t))}function Gs(e,t){q("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),vi(e),t.flowing&&!t.reading&&e.read(0)}j.prototype.pause=function(){return q("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(q("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function vi(e){var t=e._readableState;for(q("flow",t.flowing);t.flowing&&e.read()!==null;);}j.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(q("wrapped end"),r.decoder&&!r.ended){var l=r.decoder.end();l&&l.length&&t.push(l)}t.push(null)}),e.on("data",function(l){if(q("wrapped data"),r.decoder&&(l=r.decoder.write(l)),!(r.objectMode&&l==null)&&!(!r.objectMode&&(!l||!l.length))){var y=t.push(l);y||(i=!0,e.pause())}});for(var a in e)this[a]===void 0&&typeof e[a]=="function"&&(this[a]=(function(y){return function(){return e[y].apply(e,arguments)}})(a));for(var o=0;o<ci.length;o++)e.on(ci[o],this.emit.bind(this,ci[o]));return this._read=function(l){q("wrapped _read",l),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(j.prototype[Symbol.asyncIterator]=function(){return li===void 0&&(li=ga()),li(this)});Object.defineProperty(j.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(j.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(j.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});j._fromList=Oa;Object.defineProperty(j.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Oa(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function pi(e){var t=e._readableState;q("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(zs,t,e))}function zs(e,t){if(q("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(j.from=function(e,t){return hi===void 0&&(hi=wa()),hi(j,e,t)});function Ma(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var _i=A((Sc,xa)=>{"use strict";v();xa.exports=he;var vr=me().codes,Vs=vr.ERR_METHOD_NOT_IMPLEMENTED,Ks=vr.ERR_MULTIPLE_CALLBACK,Ys=vr.ERR_TRANSFORM_ALREADY_TRANSFORMING,Qs=vr.ERR_TRANSFORM_WITH_LENGTH_0,_r=Ae();ee()(he,_r);function Xs(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Ks);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function he(e){if(!(this instanceof he))return new he(e);_r.call(this,e),this._transformState={afterTransform:Xs.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Zs)}function Zs(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){qa(e,t,r)}):qa(this,null,null)}he.prototype.push=function(e,t){return this._transformState.needTransform=!1,_r.prototype.push.call(this,e,t)};he.prototype._transform=function(e,t,r){r(new Vs("_transform()"))};he.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var a=this._readableState;(i.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};he.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};he.prototype._destroy=function(e,t){_r.prototype._destroy.call(this,e,function(r){t(r)})};function qa(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Qs;if(e._transformState.transforming)throw new Ys;return e.push(null)}});var Da=A((Rc,Pa)=>{"use strict";v();Pa.exports=gt;var Ca=_i();ee()(gt,Ca);function gt(e){if(!(this instanceof gt))return new gt(e);Ca.call(this,e)}gt.prototype._transform=function(e,t,r){r(null,e)}});var ka=A((Lc,Ia)=>{"use strict";v();var wi;function Js(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var Na=me().codes,el=Na.ERR_MISSING_ARGS,tl=Na.ERR_STREAM_DESTROYED;function ja(e){if(e)throw e}function rl(e){return e.setHeader&&typeof e.abort=="function"}function il(e,t,r,i){i=Js(i);var a=!1;e.on("close",function(){a=!0}),wi===void 0&&(wi=hr()),wi(e,{readable:t,writable:r},function(l){if(l)return i(l);a=!0,i()});var o=!1;return function(l){if(!a&&!o){if(o=!0,rl(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(l||new tl("pipe"))}}}function Ba(e){e()}function nl(e,t){return e.pipe(t)}function al(e){return!e.length||typeof e[e.length-1]!="function"?ja:e.pop()}function fl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=al(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new el("streams");var a,o=t.map(function(l,y){var _=y<t.length-1,T=y>0;return il(l,_,T,function(x){a||(a=x),x&&o.forEach(Ba),!_&&(o.forEach(Ba),i(a))})});return t.reduce(nl)}Ia.exports=fl});var ze=A((re,vt)=>{v();var yt=$("stream");process.env.READABLE_STREAM==="disable"&&yt?(vt.exports=yt.Readable,Object.assign(vt.exports,yt),vt.exports.Stream=yt):(re=vt.exports=ii(),re.Stream=yt||re,re.Readable=re,re.Writable=ei(),re.Duplex=Ae(),re.Transform=_i(),re.PassThrough=Da(),re.finished=hr(),re.pipeline=ka())});var Fa=A((Ac,Ua)=>{"use strict";v();var{Buffer:ae}=$("buffer"),Wa=Symbol.for("BufferList");function k(e){if(!(this instanceof k))return new k(e);k._init.call(this,e)}k._init=function(t){Object.defineProperty(this,Wa,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)};k.prototype._new=function(t){return new k(t)};k.prototype._offset=function(t){if(t===0)return[0,0];let r=0;for(let i=0;i<this._bufs.length;i++){let a=r+this._bufs[i].length;if(t<a||i===this._bufs.length-1)return[i,t-r];r=a}};k.prototype._reverseOffset=function(e){let t=e[0],r=e[1];for(let i=0;i<t;i++)r+=this._bufs[i].length;return r};k.prototype.get=function(t){if(t>this.length||t<0)return;let r=this._offset(t);return this._bufs[r[0]][r[1]]};k.prototype.slice=function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)};k.prototype.copy=function(t,r,i,a){if((typeof i!="number"||i<0)&&(i=0),(typeof a!="number"||a>this.length)&&(a=this.length),i>=this.length||a<=0)return t||ae.alloc(0);let o=!!t,l=this._offset(i),y=a-i,_=y,T=o&&r||0,x=l[1];if(i===0&&a===this.length){if(!o)return this._bufs.length===1?this._bufs[0]:ae.concat(this._bufs,this.length);for(let M=0;M<this._bufs.length;M++)this._bufs[M].copy(t,T),T+=this._bufs[M].length;return t}if(_<=this._bufs[l[0]].length-x)return o?this._bufs[l[0]].copy(t,r,x,x+_):this._bufs[l[0]].slice(x,x+_);o||(t=ae.allocUnsafe(y));for(let M=l[0];M<this._bufs.length;M++){let L=this._bufs[M].length-x;if(_>L)this._bufs[M].copy(t,T,x),T+=L;else{this._bufs[M].copy(t,T,x,x+_),T+=L;break}_-=L,x&&(x=0)}return t.length>T?t.slice(0,T):t};k.prototype.shallowSlice=function(t,r){if(t=t||0,r=typeof r!="number"?this.length:r,t<0&&(t+=this.length),r<0&&(r+=this.length),t===r)return this._new();let i=this._offset(t),a=this._offset(r),o=this._bufs.slice(i[0],a[0]+1);return a[1]===0?o.pop():o[o.length-1]=o[o.length-1].slice(0,a[1]),i[1]!==0&&(o[0]=o[0].slice(i[1])),this._new(o)};k.prototype.toString=function(t,r,i){return this.slice(r,i).toString(t)};k.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};k.prototype.duplicate=function(){let t=this._new();for(let r=0;r<this._bufs.length;r++)t.append(this._bufs[r]);return t};k.prototype.append=function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(ae.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let r=0;r<t.length;r++)this.append(t[r]);else if(this._isBufferList(t))for(let r=0;r<t._bufs.length;r++)this.append(t._bufs[r]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(ae.from(t));return this};k.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};k.prototype.indexOf=function(e,t,r){if(r===void 0&&typeof t=="string"&&(r=t,t=void 0),typeof e=="function"||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof e=="number"?e=ae.from([e]):typeof e=="string"?e=ae.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=ae.from(e.buffer,e.byteOffset,e.byteLength):ae.isBuffer(e)||(e=ae.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),e.length===0)return t>this.length?this.length:t;let i=this._offset(t),a=i[0],o=i[1];for(;a<this._bufs.length;a++){let l=this._bufs[a];for(;o<l.length;)if(l.length-o>=e.length){let _=l.indexOf(e,o);if(_!==-1)return this._reverseOffset([a,_]);o=l.length-e.length+1}else{let _=this._reverseOffset([a,o]);if(this._match(_,e))return _;o++}o=0}return-1};k.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0};(function(){let e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let t in e)(function(r){e[r]===null?k.prototype[r]=function(i,a){return this.slice(i,i+a)[r](0,a)}:k.prototype[r]=function(i=0){return this.slice(i,i+e[r])[r](0)}})(t)})();k.prototype._isBufferList=function(t){return t instanceof k||k.isBufferList(t)};k.isBufferList=function(t){return t!=null&&t[Wa]};Ua.exports=k});var $a=A((xc,wr)=>{"use strict";v();var mi=ze().Duplex,ul=ee(),_t=Fa();function K(e){if(!(this instanceof K))return new K(e);if(typeof e=="function"){this._callback=e;let t=function(i){this._callback&&(this._callback(i),this._callback=null)}.bind(this);this.on("pipe",function(i){i.on("error",t)}),this.on("unpipe",function(i){i.removeListener("error",t)}),e=null}_t._init.call(this,e),mi.call(this)}ul(K,mi);Object.assign(K.prototype,_t.prototype);K.prototype._new=function(t){return new K(t)};K.prototype._write=function(t,r,i){this._appendBuffer(t),typeof i=="function"&&i()};K.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)};K.prototype.end=function(t){mi.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)};K.prototype._destroy=function(t,r){this._bufs.length=0,this.length=0,r(t)};K.prototype._isBufferList=function(t){return t instanceof K||t instanceof _t||K.isBufferList(t)};K.isBufferList=_t.isBufferList;wr.exports=K;wr.exports.BufferListStream=K;wr.exports.BufferList=_t});var Ei=A(Ke=>{v();var ol=Buffer.alloc,sl="0000000000000000000",ll="7777777777777777777",Ha=48,Ga=Buffer.from("ustar\0","binary"),hl=Buffer.from("00","binary"),cl=Buffer.from("ustar ","binary"),dl=Buffer.from(" \0","binary"),pl=parseInt("7777",8),wt=257,Si=263,gl=function(e,t,r){return typeof e!="number"?r:(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0)},yl=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},vl=function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},za=function(e,t,r,i){for(;r<i;r++)if(e[r]===t)return r;return i},Va=function(e){for(var t=256,r=0;r<148;r++)t+=e[r];for(var i=156;i<512;i++)t+=e[i];return t},Te=function(e,t){return e=e.toString(8),e.length>t?ll.slice(0,t)+" ":sl.slice(0,t-e.length)+e+" "};function _l(e){var t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;for(var r=[],i=e.length-1;i>0;i--){var a=e[i];t?r.push(a):r.push(255-a)}var o=0,l=r.length;for(i=0;i<l;i++)o+=r[i]*Math.pow(256,i);return t?o:-1*o}var Le=function(e,t,r){if(e=e.slice(t,t+r),t=0,e[t]&128)return _l(e);for(;t<e.length&&e[t]===32;)t++;for(var i=gl(za(e,32,t,e.length),e.length,e.length);t<i&&e[t]===0;)t++;return i===t?0:parseInt(e.slice(t,i).toString(),8)},Ve=function(e,t,r,i){return e.slice(t,za(e,0,t,t+r)).toString(i)},bi=function(e){var t=Buffer.byteLength(e),r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e};Ke.decodeLongPath=function(e,t){return Ve(e,0,e.length,t)};Ke.encodePax=function(e){var t="";e.name&&(t+=bi(" path="+e.name+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as I}from"./chunk-CTNBSUVU.js";import{b as l}from"./chunk-DPNZWBT5.js";import{a as c}from"./chunk-JD5P5RAJ.js";import{e as h,g as s}from"./chunk-VKWPEFWQ.js";s();s();import{fileURLToPath as L}from"node:url";async function m(e){let{isDevelopment:o}=await import("./local-
|
|
1
|
+
import{a as I}from"./chunk-CTNBSUVU.js";import{b as l}from"./chunk-DPNZWBT5.js";import{a as c}from"./chunk-JD5P5RAJ.js";import{e as h,g as s}from"./chunk-VKWPEFWQ.js";s();s();import{fileURLToPath as L}from"node:url";async function m(e){let{isDevelopment:o}=await import("./local-W73VIWHZ.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-BWAMUFQ4.js"),t=await import("./lib-2BR2WN7L.js"),{run:i,flush:p,Errors:d,settings:f}=t.default??t;o()&&(f.debug=!0);try{let r=new n({root:L(e.moduleURL)});await r.load(),e.lazyCommandLoader&&r.setLazyCommandLoader(e.lazyCommandLoader),await i(e.argv,r),await p()}catch(r){let{errorHandler:u}=await import("./error-handler-3PBXTHYY.js");return await u(r),d.handle(r)}}var a=h(I());async function C(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<22){let{renderError:i}=await import("./ui-T22J7MQF.js");i({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function y(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function b(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||c(o.NO_COLOR)||c(o.SHOPIFY_FLAG_NO_COLOR)||c(o[l.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function F(e,o=m,n=process.argv,t=process.env,i=process.versions){return y(e,n,t),e.runInCreateMode&&await g(e,n),b(n,t),await C(i),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function g(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-GSHLPD5X.js"),{moduleDirectory:t}=await import("./path-MBXP7ZIC.js"),d=(await n(t(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(r=>r.includes("init"))===-1){let r=o.findIndex(u=>u.match(new RegExp(`bin(\\/|\\\\)+(create-${d}|dev|run)`)))+1;o.splice(r,0,"init")}}var R={"no-color":a.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:a.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output. May include sensitive data.",env:"SHOPIFY_FLAG_VERBOSE"})},S={json:a.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:l.json})},E={"auth-alias":a.Flags.string({description:"Alias of the Shopify account to use for authentication.",env:"SHOPIFY_FLAG_AUTH_ALIAS"})},A=(e={})=>{let o=[e.description,"Must be between 1 and 65535."].filter(Boolean).join(" ");return a.Flags.integer({min:1,max:65535,...e,description:o})};function j(e){let o=e.description?.trimEnd(),t=[o&&!o.endsWith(".")?`${o}.`:o,"Required if non interactive."].filter(Boolean).join(" ");return{...e,description:t,requiredIfNonInteractive:!0}}async function U(){let{cacheClear:e}=await import("./conf-store-K65PEQF6.js");e()}export{F as a,R as b,S as c,E as d,A as e,j as f,U as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as It,G as Rt,H as Ct}from"./chunk-XOCB4KNX.js";import{aa as as}from"./chunk-F3NYCSXT.js";import{a as fe}from"./chunk-4QBJ5JBX.js";import{a as B,v as A}from"./chunk-3JXPOOFV.js";import{P as he,z as At}from"./chunk-YFINLODF.js";import{a as _t}from"./chunk-VASGXHYA.js";import{h as R}from"./chunk-BWJIZYAG.js";import{a as xt}from"./chunk-2KGPH7YG.js";import{Ga as kt,Ha as St,Ua as Et,Xa as P,ma as vt,na as bt,ua as wt,wb as Tt}from"./chunk-VFM2KQRM.js";import{d as w,f as N,g as T,h as V,i as M,j as ne,k as se,q as Ne}from"./chunk-773TIA5M.js";import{e as os,g as m}from"./chunk-VKWPEFWQ.js";m();m();m();m();m();import{lstatSync as Nt}from"node:fs";var L=class extends Error{constructor(t){super(t),this.name="AppRootDiscoveryError"}};function ie(e){let t=N(e??Ne());if(e&&!Et(t))throw new L(`App path does not exist: ${e}`);let n=t;if(e&&Nt(t).isFile()){if(!t.endsWith(".toml"))throw new L(`App path is not a directory or TOML file: ${e}`);return M(t)}if(!Nt(n).isDirectory())throw new L(`App path is not a directory: ${e??n}`);for(;;){if(P("shopify.app*.toml",{cwd:n,deep:1,dot:!1,onlyFiles:!1,followSymbolicLinks:!1}).length>0)return n;let i=M(n);if(i===n)break;n=i}throw new L(`Could not find a shopify.app*.toml from: ${e??Ne()}`)}function Pt(e){return P("shopify.app*.toml",{cwd:e,deep:1,dot:!1,onlyFiles:!1,followSymbolicLinks:!1}).flatMap(n=>{let s=w(e,n),i=ge(e,s);if(i===void 0)return[];try{let r=fe(i);return[qt(r,s,i,e)]}catch{return K(e,s,{ok:!1,reason:"unreadable",detail:"TOML could not be parsed"}),[]}})}function Lt(e,t=M(e)){let n=ge(t,e);if(n===void 0)return null;try{let s=fe(n);return qt(s,e,n,t)}catch{return K(t,e,{ok:!1,reason:"unreadable",detail:"TOML could not be parsed"}),null}}var cs=A.object({api_version:A.string().optional(),privacy_compliance:A.object({customer_deletion_url:A.string().optional(),customer_data_request_url:A.string().optional(),shop_deletion_url:A.string().optional()}).optional(),subscriptions:A.array(A.unknown()).optional()}),ds=A.object({uri:A.string(),topics:A.array(A.string()).optional(),compliance_topics:A.array(A.string()).optional()});function qt(e,t,n,s){let i=ps(e.access_scopes,t,s),r=us(e.auth,t,s),o=ls(e.webhooks,t,s);return{raw:e,path:t,content:n,scopes:i,apiVersion:o.apiVersion,redirectUrls:r,webhooks:o.subscriptions}}function ps(e,t,n){if(e===void 0)return;let s=Rt.safeParse(e);if(!s.success){Le(n,t,"access_scopes section could not be parsed");return}let i=s.data.scopes?.split(/[\s,]+/).filter(Boolean)??[],r=[...new Set([...i,...s.data.required_scopes??[]])];return r.length>0?r.join(","):void 0}function us(e,t,n){if(e===void 0)return[];let s=Ct.safeParse(e);if(s.success)return s.data.redirect_urls;let i=A.object({redirect_urls:A.array(A.string())}).safeParse(e);return i.success?i.data.redirect_urls:(Le(n,t,"auth section could not be parsed"),[])}function ls(e,t,n){if(e===void 0)return{subscriptions:[]};let s=cs.safeParse(e);if(!s.success)return Le(n,t,"webhooks section could not be parsed"),{subscriptions:[]};let i=(s.data.subscriptions??[]).flatMap(hs),r=s.data.privacy_compliance,o=[{topic:"customers/redact",uri:r?.customer_deletion_url},{topic:"customers/data_request",uri:r?.customer_data_request_url},{topic:"shop/redact",uri:r?.shop_deletion_url}].flatMap(({topic:a,uri:c})=>c?[{topics:[a],uri:c}]:[]);return{apiVersion:s.data.api_version,subscriptions:[...i,...o]}}function hs(e){let t=It.safeParse(e);if(t.success)return[{topics:[...t.data.topics??[],...t.data.compliance_topics??[]],uri:t.data.uri}];let n=ds.safeParse(e);return n.success?[{topics:[...n.data.topics??[],...n.data.compliance_topics??[]],uri:n.data.uri}]:[]}function Le(e,t,n){e&&K(e,t,{ok:!1,reason:"unreadable",detail:n})}var Ot=["**/node_modules/**","**/vendor/**","**/.git/**","**/.next/**","**/coverage/**","**/dist/**","**/build/**","**/.shopify/app-doctor/**","**/test/**","**/tests/**","**/spec/**","**/specs/**","**/__tests__/**","**/fixtures/**","**/*-fixtures/**","**/__fixtures__/**","**/*.test.*","**/*.spec.*"];function Dt(e){return e.replace(/\\/g,"/").replace(/\/+$/,"")}function fs(e){return[...new Set(P("**/shopify.app*.toml",{followSymbolicLinks:!1,cwd:e,ignore:Ot,absolute:!1,dot:!1,onlyFiles:!1}).map(t=>Dt(M(t))).filter(t=>t!=="."&&t.length>0))].sort()}function re(e,t){let n=fs(t).flatMap(s=>{let i=Dt(T(e,w(t,s)));return i===".."||i.startsWith("../")?[]:[`${i}/**`]});return[...Ot,...n]}function Mt(e){return P("**/shopify.extension.toml",{followSymbolicLinks:!1,cwd:e,ignore:re(e,e),absolute:!1,dot:!1,onlyFiles:!1}).flatMap(n=>{let s=w(e,n),i=ge(e,s);if(i===void 0)return[];try{let o=fe(i).type,a=w(e,n,".."),c=Ht(a,e);return[{path:n,type:o,content:i,files:c}]}catch{return K(e,s,{ok:!1,reason:"unreadable",detail:"TOML could not be parsed"}),[]}})}var ms=5e5,qe=[],Pe=new Map;function Ft(){qe=[],Pe.clear()}function Oe(){return[...qe]}function K(e,t,n){let s=T(e,t).replace(/\\/g,"/");qe.push({path:s.length>0?s:t,reason:n.reason,...n.sizeBytes===void 0?{}:{size_bytes:n.sizeBytes},...n.detail?{detail:n.detail}:{}})}function gs(e){try{let t=St(e);return t>ms?{ok:!1,reason:"too_large",sizeBytes:t}:{ok:!0,content:bt(e)}}catch(t){let n=t.code;return{ok:!1,reason:"unreadable",detail:t instanceof Error?t.message:String(t),...n&&/^[A-Z0-9_]+$/.test(n)?{errorCode:n}:{}}}}function $t(e,t,n){let s=N(t),i=Pe.get(s);if(i)return i;let r=gs(s);return Pe.set(s,r),!r.ok&&(n||r.errorCode!=="ENOENT")&&K(e,t,r),r}function De(e,t){return $t(e,t,!0)}function ge(e,t){let n=De(e,t);return n.ok?n.content.toString():void 0}function ye(e,t){return $t(e,t,!1)}var me={".js":{name:"javascript",supported:!0},".jsx":{name:"javascript",supported:!0},".mjs":{name:"javascript",supported:!0},".cjs":{name:"javascript",supported:!0},".ts":{name:"typescript",supported:!0},".tsx":{name:"typescript",supported:!0},".mts":{name:"typescript",supported:!0},".cts":{name:"typescript",supported:!0},".prisma":{name:"prisma",supported:!0},".liquid":{name:"liquid",supported:!0},".html":{name:"html",supported:!0},".rb":{name:"ruby",supported:!1},".php":{name:"php",supported:!1},".py":{name:"python",supported:!1},".java":{name:"java",supported:!1},".kt":{name:"kotlin",supported:!1},".kts":{name:"kotlin",supported:!1},".go":{name:"go",supported:!1},".rs":{name:"rust",supported:!1},".cs":{name:"csharp",supported:!1},".swift":{name:"swift",supported:!1},".scala":{name:"scala",supported:!1},".ex":{name:"elixir",supported:!1},".exs":{name:"elixir",supported:!1},".vue":{name:"vue",supported:!1},".svelte":{name:"svelte",supported:!1}};function jt(e,t=e){return P(Object.keys(me).map(s=>`**/*${s}`),{cwd:e,ignore:re(e,t),absolute:!1,dot:!1,followSymbolicLinks:!1,onlyFiles:!1}).map(s=>{let i=se(s),r=me[i];return{path:T(t,w(e,s)).replace(/\\/g,"/"),extension:i,language:r.name,supported:r.supported}}).sort((s,i)=>s.path.localeCompare(i.path))}function Ht(e,t=e){let n=Object.entries(me).filter(([,i])=>i.supported).map(([i])=>`**/*${i}`);return P(n,{cwd:e,ignore:re(e,t),absolute:!1,dot:!1,followSymbolicLinks:!1,onlyFiles:!1}).map(i=>{let r=w(e,i),o=T(t,r).replace(/\\/g,"/"),a=se(i),c=De(t,r);return{path:o,absolutePath:r,ext:a,content:c.ok?c.content.toString():void 0}})}function Ut(e){return Ht(e)}var ys=new Set(["package-lock.json","pnpm-lock.yaml","yarn.lock"]),_s=[...Object.keys(me),".md",".mdx",".markdown",".yaml",".yml",".json",".jsonc",".toml",".sh",".bash",".zsh",".fish",".properties",".ini",".cfg",".conf",".xml",".graphql",".gql",".sql",".txt",".pem"];function vs(e){let t=e.subarray(0,Math.min(e.length,8e3));if(t.includes(0))return!0;let n=0;for(let s of t)(s<8||s>13&&s<32)&&n++;return t.length>0&&n/t.length>.1}function Wt(e){let t=[..._s.map(s=>`**/*${s}`),"**/.env","**/.env.*","**/Dockerfile","**/Dockerfile.*","**/Containerfile","**/Containerfile.*","**/Gemfile","**/Rakefile","**/Procfile","**/Makefile"];return[...new Set(P(t,{cwd:e,ignore:re(e,e),absolute:!1,dot:!1,followSymbolicLinks:!1,onlyFiles:!1}))].filter(s=>!ys.has(s)).sort().flatMap(s=>{let i=w(e,s),r=De(e,i);return r.ok?vs(r.content)?[]:[{path:s,absolutePath:i,ext:se(s),content:r.content.toString()}]:[{path:s,absolutePath:i,ext:se(s),content:void 0}]})}function Me(e){let t=P(["**/package.json"],{followSymbolicLinks:!1,cwd:e,ignore:re(e,e),absolute:!1,dot:!1,onlyFiles:!1});return[...new Set(t)].sort()}function Gt(e,t=Me(e)){let n=[],s=t.filter(i=>i.endsWith("package.json"));for(let i of s){let r=w(e,i),o=ge(e,r);if(o!==void 0)try{let a=JSON.parse(o);n.push({path:i,absolutePath:r,type:"npm",content:o,dependencies:a.dependencies??{},devDependencies:a.devDependencies??{},packageManager:typeof a.packageManager=="string"?a.packageManager:void 0})}catch{n.push({path:i,absolutePath:r,type:"npm",content:o,dependencies:{},devDependencies:{}}),K(e,r,{ok:!1,reason:"unreadable",detail:"manifest could not be parsed"})}}return n}m();function zt(e,t,n){let s=t.some(c=>c.type==="theme"),i=t.some(c=>c.type==="theme"&&bs(c)),r=n.some(c=>c.content?/script[_-]?tags?|ScriptTag/i.test(c.content):!1),o=n.some(c=>c.content?/metafields?Set|metafields?\/.*(?:POST|PUT|create|update)|write.*metafield|metafield.*write/i.test(c.content):!1),a=n.some(ws);return{theme_app_extension:s,app_embed:i,script_tags:r,webhooks:!!e?.webhooks.length,app_proxy:!!e?.raw?.app_proxy,storefront_metafield_writes:o,has_backend:a,declared_ip_allowlist:!1,checkout_extension:t.some(c=>c.type==="checkout_ui"||c.type==="checkout_ui_extension")}}function Vt(e,t,n){let s=new Set(e.flatMap(v=>[...Object.keys(v.dependencies),...Object.keys(v.devDependencies??{})])),i=new Set(n.map(v=>v.path)),r=s.has("@shopify/shopify-app-react-router"),o=[...i].some(v=>v.startsWith("app/routes/"))&&[...i].some(v=>/^app\/shopify\.server\.[cm]?[jt]sx?$/.test(v)),a=r&&o,c=t.filter(v=>v.type==="theme"),p=c.length>0,u=new Set(c.flatMap(v=>v.files.map(k=>k.path))),h=n.length>0,d;a&&p?d="mixed":a?d="react_router":p&&n.some(v=>!u.has(v.path))?d="mixed":p?d="theme_app_extension":h?d="unknown":d="config_only";let f;a?f="react_router":d==="config_only"||d==="theme_app_extension"?f="none":d==="mixed"?f="mixed":f="unknown";let _=new Map;for(let v of n){let k=_.get(v.language)??{supported:v.supported,files:[]};k.supported&&=v.supported,k.files.push(v.path),_.set(v.language,k)}let I=[..._.entries()].map(([v,k])=>({name:v,support:k.supported?"supported":"unsupported",files:k.files.sort()})).sort((v,k)=>v.name.localeCompare(k.name));return{framework:f,surface:d,languages:I}}function bs(e){return e.files.some(t=>t.ext===".liquid"&&t.content?.includes('"target"')&&t.content?.includes("body"))}function ws(e){let t=e.content;return t?!!(/\b(?:app|router)\.(get|post|put|delete|patch)\s*\(/.test(t)||/export\s+(?:async\s+)?(?:function|const)\s+(?:loader|action)\b/.test(t)):!1}m();m();m();var Fe=[2],_e="shopify-app-doctor";m();m();var Bt=[`---
|
|
1
|
+
import{F as It,G as Rt,H as Ct}from"./chunk-WT2KJHUO.js";import{aa as as}from"./chunk-NQRSFMS7.js";import{a as fe}from"./chunk-4QBJ5JBX.js";import{a as B,v as A}from"./chunk-AINDVTMY.js";import{P as he,z as At}from"./chunk-LIH7CQO7.js";import{a as _t}from"./chunk-4IG7WG6V.js";import{h as R}from"./chunk-PSUNX2YX.js";import{a as xt}from"./chunk-RAOMLN5A.js";import{Ga as kt,Ha as St,Ua as Et,Xa as P,ma as vt,na as bt,ua as wt,wb as Tt}from"./chunk-GYFRTLML.js";import{d as w,f as N,g as T,h as V,i as M,j as ne,k as se,q as Ne}from"./chunk-773TIA5M.js";import{e as os,g as m}from"./chunk-VKWPEFWQ.js";m();m();m();m();m();import{lstatSync as Nt}from"node:fs";var L=class extends Error{constructor(t){super(t),this.name="AppRootDiscoveryError"}};function ie(e){let t=N(e??Ne());if(e&&!Et(t))throw new L(`App path does not exist: ${e}`);let n=t;if(e&&Nt(t).isFile()){if(!t.endsWith(".toml"))throw new L(`App path is not a directory or TOML file: ${e}`);return M(t)}if(!Nt(n).isDirectory())throw new L(`App path is not a directory: ${e??n}`);for(;;){if(P("shopify.app*.toml",{cwd:n,deep:1,dot:!1,onlyFiles:!1,followSymbolicLinks:!1}).length>0)return n;let i=M(n);if(i===n)break;n=i}throw new L(`Could not find a shopify.app*.toml from: ${e??Ne()}`)}function Pt(e){return P("shopify.app*.toml",{cwd:e,deep:1,dot:!1,onlyFiles:!1,followSymbolicLinks:!1}).flatMap(n=>{let s=w(e,n),i=ge(e,s);if(i===void 0)return[];try{let r=fe(i);return[qt(r,s,i,e)]}catch{return K(e,s,{ok:!1,reason:"unreadable",detail:"TOML could not be parsed"}),[]}})}function Lt(e,t=M(e)){let n=ge(t,e);if(n===void 0)return null;try{let s=fe(n);return qt(s,e,n,t)}catch{return K(t,e,{ok:!1,reason:"unreadable",detail:"TOML could not be parsed"}),null}}var cs=A.object({api_version:A.string().optional(),privacy_compliance:A.object({customer_deletion_url:A.string().optional(),customer_data_request_url:A.string().optional(),shop_deletion_url:A.string().optional()}).optional(),subscriptions:A.array(A.unknown()).optional()}),ds=A.object({uri:A.string(),topics:A.array(A.string()).optional(),compliance_topics:A.array(A.string()).optional()});function qt(e,t,n,s){let i=ps(e.access_scopes,t,s),r=us(e.auth,t,s),o=ls(e.webhooks,t,s);return{raw:e,path:t,content:n,scopes:i,apiVersion:o.apiVersion,redirectUrls:r,webhooks:o.subscriptions}}function ps(e,t,n){if(e===void 0)return;let s=Rt.safeParse(e);if(!s.success){Le(n,t,"access_scopes section could not be parsed");return}let i=s.data.scopes?.split(/[\s,]+/).filter(Boolean)??[],r=[...new Set([...i,...s.data.required_scopes??[]])];return r.length>0?r.join(","):void 0}function us(e,t,n){if(e===void 0)return[];let s=Ct.safeParse(e);if(s.success)return s.data.redirect_urls;let i=A.object({redirect_urls:A.array(A.string())}).safeParse(e);return i.success?i.data.redirect_urls:(Le(n,t,"auth section could not be parsed"),[])}function ls(e,t,n){if(e===void 0)return{subscriptions:[]};let s=cs.safeParse(e);if(!s.success)return Le(n,t,"webhooks section could not be parsed"),{subscriptions:[]};let i=(s.data.subscriptions??[]).flatMap(hs),r=s.data.privacy_compliance,o=[{topic:"customers/redact",uri:r?.customer_deletion_url},{topic:"customers/data_request",uri:r?.customer_data_request_url},{topic:"shop/redact",uri:r?.shop_deletion_url}].flatMap(({topic:a,uri:c})=>c?[{topics:[a],uri:c}]:[]);return{apiVersion:s.data.api_version,subscriptions:[...i,...o]}}function hs(e){let t=It.safeParse(e);if(t.success)return[{topics:[...t.data.topics??[],...t.data.compliance_topics??[]],uri:t.data.uri}];let n=ds.safeParse(e);return n.success?[{topics:[...n.data.topics??[],...n.data.compliance_topics??[]],uri:n.data.uri}]:[]}function Le(e,t,n){e&&K(e,t,{ok:!1,reason:"unreadable",detail:n})}var Ot=["**/node_modules/**","**/vendor/**","**/.git/**","**/.next/**","**/coverage/**","**/dist/**","**/build/**","**/.shopify/app-doctor/**","**/test/**","**/tests/**","**/spec/**","**/specs/**","**/__tests__/**","**/fixtures/**","**/*-fixtures/**","**/__fixtures__/**","**/*.test.*","**/*.spec.*"];function Dt(e){return e.replace(/\\/g,"/").replace(/\/+$/,"")}function fs(e){return[...new Set(P("**/shopify.app*.toml",{followSymbolicLinks:!1,cwd:e,ignore:Ot,absolute:!1,dot:!1,onlyFiles:!1}).map(t=>Dt(M(t))).filter(t=>t!=="."&&t.length>0))].sort()}function re(e,t){let n=fs(t).flatMap(s=>{let i=Dt(T(e,w(t,s)));return i===".."||i.startsWith("../")?[]:[`${i}/**`]});return[...Ot,...n]}function Mt(e){return P("**/shopify.extension.toml",{followSymbolicLinks:!1,cwd:e,ignore:re(e,e),absolute:!1,dot:!1,onlyFiles:!1}).flatMap(n=>{let s=w(e,n),i=ge(e,s);if(i===void 0)return[];try{let o=fe(i).type,a=w(e,n,".."),c=Ht(a,e);return[{path:n,type:o,content:i,files:c}]}catch{return K(e,s,{ok:!1,reason:"unreadable",detail:"TOML could not be parsed"}),[]}})}var ms=5e5,qe=[],Pe=new Map;function Ft(){qe=[],Pe.clear()}function Oe(){return[...qe]}function K(e,t,n){let s=T(e,t).replace(/\\/g,"/");qe.push({path:s.length>0?s:t,reason:n.reason,...n.sizeBytes===void 0?{}:{size_bytes:n.sizeBytes},...n.detail?{detail:n.detail}:{}})}function gs(e){try{let t=St(e);return t>ms?{ok:!1,reason:"too_large",sizeBytes:t}:{ok:!0,content:bt(e)}}catch(t){let n=t.code;return{ok:!1,reason:"unreadable",detail:t instanceof Error?t.message:String(t),...n&&/^[A-Z0-9_]+$/.test(n)?{errorCode:n}:{}}}}function $t(e,t,n){let s=N(t),i=Pe.get(s);if(i)return i;let r=gs(s);return Pe.set(s,r),!r.ok&&(n||r.errorCode!=="ENOENT")&&K(e,t,r),r}function De(e,t){return $t(e,t,!0)}function ge(e,t){let n=De(e,t);return n.ok?n.content.toString():void 0}function ye(e,t){return $t(e,t,!1)}var me={".js":{name:"javascript",supported:!0},".jsx":{name:"javascript",supported:!0},".mjs":{name:"javascript",supported:!0},".cjs":{name:"javascript",supported:!0},".ts":{name:"typescript",supported:!0},".tsx":{name:"typescript",supported:!0},".mts":{name:"typescript",supported:!0},".cts":{name:"typescript",supported:!0},".prisma":{name:"prisma",supported:!0},".liquid":{name:"liquid",supported:!0},".html":{name:"html",supported:!0},".rb":{name:"ruby",supported:!1},".php":{name:"php",supported:!1},".py":{name:"python",supported:!1},".java":{name:"java",supported:!1},".kt":{name:"kotlin",supported:!1},".kts":{name:"kotlin",supported:!1},".go":{name:"go",supported:!1},".rs":{name:"rust",supported:!1},".cs":{name:"csharp",supported:!1},".swift":{name:"swift",supported:!1},".scala":{name:"scala",supported:!1},".ex":{name:"elixir",supported:!1},".exs":{name:"elixir",supported:!1},".vue":{name:"vue",supported:!1},".svelte":{name:"svelte",supported:!1}};function jt(e,t=e){return P(Object.keys(me).map(s=>`**/*${s}`),{cwd:e,ignore:re(e,t),absolute:!1,dot:!1,followSymbolicLinks:!1,onlyFiles:!1}).map(s=>{let i=se(s),r=me[i];return{path:T(t,w(e,s)).replace(/\\/g,"/"),extension:i,language:r.name,supported:r.supported}}).sort((s,i)=>s.path.localeCompare(i.path))}function Ht(e,t=e){let n=Object.entries(me).filter(([,i])=>i.supported).map(([i])=>`**/*${i}`);return P(n,{cwd:e,ignore:re(e,t),absolute:!1,dot:!1,followSymbolicLinks:!1,onlyFiles:!1}).map(i=>{let r=w(e,i),o=T(t,r).replace(/\\/g,"/"),a=se(i),c=De(t,r);return{path:o,absolutePath:r,ext:a,content:c.ok?c.content.toString():void 0}})}function Ut(e){return Ht(e)}var ys=new Set(["package-lock.json","pnpm-lock.yaml","yarn.lock"]),_s=[...Object.keys(me),".md",".mdx",".markdown",".yaml",".yml",".json",".jsonc",".toml",".sh",".bash",".zsh",".fish",".properties",".ini",".cfg",".conf",".xml",".graphql",".gql",".sql",".txt",".pem"];function vs(e){let t=e.subarray(0,Math.min(e.length,8e3));if(t.includes(0))return!0;let n=0;for(let s of t)(s<8||s>13&&s<32)&&n++;return t.length>0&&n/t.length>.1}function Wt(e){let t=[..._s.map(s=>`**/*${s}`),"**/.env","**/.env.*","**/Dockerfile","**/Dockerfile.*","**/Containerfile","**/Containerfile.*","**/Gemfile","**/Rakefile","**/Procfile","**/Makefile"];return[...new Set(P(t,{cwd:e,ignore:re(e,e),absolute:!1,dot:!1,followSymbolicLinks:!1,onlyFiles:!1}))].filter(s=>!ys.has(s)).sort().flatMap(s=>{let i=w(e,s),r=De(e,i);return r.ok?vs(r.content)?[]:[{path:s,absolutePath:i,ext:se(s),content:r.content.toString()}]:[{path:s,absolutePath:i,ext:se(s),content:void 0}]})}function Me(e){let t=P(["**/package.json"],{followSymbolicLinks:!1,cwd:e,ignore:re(e,e),absolute:!1,dot:!1,onlyFiles:!1});return[...new Set(t)].sort()}function Gt(e,t=Me(e)){let n=[],s=t.filter(i=>i.endsWith("package.json"));for(let i of s){let r=w(e,i),o=ge(e,r);if(o!==void 0)try{let a=JSON.parse(o);n.push({path:i,absolutePath:r,type:"npm",content:o,dependencies:a.dependencies??{},devDependencies:a.devDependencies??{},packageManager:typeof a.packageManager=="string"?a.packageManager:void 0})}catch{n.push({path:i,absolutePath:r,type:"npm",content:o,dependencies:{},devDependencies:{}}),K(e,r,{ok:!1,reason:"unreadable",detail:"manifest could not be parsed"})}}return n}m();function zt(e,t,n){let s=t.some(c=>c.type==="theme"),i=t.some(c=>c.type==="theme"&&bs(c)),r=n.some(c=>c.content?/script[_-]?tags?|ScriptTag/i.test(c.content):!1),o=n.some(c=>c.content?/metafields?Set|metafields?\/.*(?:POST|PUT|create|update)|write.*metafield|metafield.*write/i.test(c.content):!1),a=n.some(ws);return{theme_app_extension:s,app_embed:i,script_tags:r,webhooks:!!e?.webhooks.length,app_proxy:!!e?.raw?.app_proxy,storefront_metafield_writes:o,has_backend:a,declared_ip_allowlist:!1,checkout_extension:t.some(c=>c.type==="checkout_ui"||c.type==="checkout_ui_extension")}}function Vt(e,t,n){let s=new Set(e.flatMap(v=>[...Object.keys(v.dependencies),...Object.keys(v.devDependencies??{})])),i=new Set(n.map(v=>v.path)),r=s.has("@shopify/shopify-app-react-router"),o=[...i].some(v=>v.startsWith("app/routes/"))&&[...i].some(v=>/^app\/shopify\.server\.[cm]?[jt]sx?$/.test(v)),a=r&&o,c=t.filter(v=>v.type==="theme"),p=c.length>0,u=new Set(c.flatMap(v=>v.files.map(k=>k.path))),h=n.length>0,d;a&&p?d="mixed":a?d="react_router":p&&n.some(v=>!u.has(v.path))?d="mixed":p?d="theme_app_extension":h?d="unknown":d="config_only";let f;a?f="react_router":d==="config_only"||d==="theme_app_extension"?f="none":d==="mixed"?f="mixed":f="unknown";let _=new Map;for(let v of n){let k=_.get(v.language)??{supported:v.supported,files:[]};k.supported&&=v.supported,k.files.push(v.path),_.set(v.language,k)}let I=[..._.entries()].map(([v,k])=>({name:v,support:k.supported?"supported":"unsupported",files:k.files.sort()})).sort((v,k)=>v.name.localeCompare(k.name));return{framework:f,surface:d,languages:I}}function bs(e){return e.files.some(t=>t.ext===".liquid"&&t.content?.includes('"target"')&&t.content?.includes("body"))}function ws(e){let t=e.content;return t?!!(/\b(?:app|router)\.(get|post|put|delete|patch)\s*\(/.test(t)||/export\s+(?:async\s+)?(?:function|const)\s+(?:loader|action)\b/.test(t)):!1}m();m();m();var Fe=[2],_e="shopify-app-doctor";m();m();var Bt=[`---
|
|
2
2
|
id: APP_PROXY_LIQUID_INJECTION
|
|
3
3
|
version: 1
|
|
4
4
|
severity: high
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as g,g as h}from"./chunk-
|
|
1
|
+
import{c as g,g as h}from"./chunk-EDHR546O.js";import{a as m}from"./chunk-3NVQXPTU.js";import{wa as d}from"./chunk-YAA7OGRM.js";import{h as f}from"./chunk-PSUNX2YX.js";import{wb as s}from"./chunk-GYFRTLML.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();var v=250,c=class extends Error{constructor(){super("Migratable subscriptions were not found"),this.name="MigratableSubscriptionsNotFoundError"}},l=class extends Error{constructor(t){super(t),this.name="MigrationListProtocolError"}};async function*b({clientId:i,status:t,getPage:n=h}){let e=new Set,a;for(;;){let p=await n({clientId:i,first:v,after:a,status:t});if(p===null)throw new c;if(yield p.subscriptions,!p.pageInfo.hasNextPage)return;let{endCursor:o}=p.pageInfo;if(o===null||o.trim()==="")throw new l("Migratable subscription page has no cursor for its next page");if(e.has(o))throw new l(`Migratable subscription pagination repeated cursor: ${o}`);e.add(o),a=o}}r();var w="shop_id,status,manual_subscription_name,manual_subscription_price_amount,manual_subscription_price_currency_code,manual_subscription_interval,target_plan_handle,notification_kind,notification_opt_out_deadline,notification_sent_at,price_behavior,effective_date,last_failure_reason";function y(i){return JSON.stringify({schemaVersion:1,subscriptions:i},null,2)}async function _({pages:i,json:t}){t?s(y(await S(i))):await C(i)}async function S(i){let t=[];for await(let n of i)t.push(...n);return t}async function C(i){let t=!1;for await(let n of i){let e=x(n);t?e.length>0&&s(e.join(`
|
|
2
2
|
`)):(s([w,...e].join(`
|
|
3
3
|
`)),t=!0)}t||s(w)}function x(i){return i.map(t=>[t.shopId,t.status,t.manualSubscriptionName,t.manualSubscriptionPrice?.amount,t.manualSubscriptionPrice?.currencyCode,t.manualSubscriptionInterval,t.targetPlanHandle,t.notification?.kind,t.notification?.optOutDeadline,t.notification?.sentAt,t.priceBehavior,t.effectiveDate,t.lastFailureReason].map(E).join(","))}function E(i){let t=i??"";return/[",\r\n]/.test(t)?`"${t.replaceAll('"','""')}"`:t}var u=class i extends m{static hidden=!0;static summary="Lists app subscriptions eligible for migration.";static descriptionWithMarkdown="Lists every app subscription eligible for migration.\n\nBy default, the command writes CSV to stdout, streaming each page of results as it arrives. If a later page fails, the rows already written remain valid CSV. Use `--json` to fetch all pages first and then write a single versioned JSON envelope to stdout. Use shell redirection to save either format, for example `shopify app subscription-migrations list > subscriptions.csv` or `shopify app subscription-migrations list --json > subscriptions.json`.\n\nUse `--status` to filter subscriptions by migration status. Supported values are `UNSCHEDULED`, `SCHEDULED`, and `MIGRATED`.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %>","<%= config.bin %> <%= command.id %> --status SCHEDULED > scheduled-subscriptions.csv","<%= config.bin %> <%= command.id %> --json","<%= config.bin %> <%= command.id %> --json > subscriptions.json","<%= config.bin %> <%= command.id %> --client-id <client-id> > subscriptions.csv"];static flags={...g};async run(){let{flags:t}=await this.parse(i),{app:n,remoteApp:e}=await d({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});try{let a=b({clientId:e.apiKey,status:t.status});await _({pages:a,json:t.json})}catch(a){throw a instanceof c?new f("App not found"):a}return{app:n}}};export{u as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ga as y,ha as S,v as e}from"./chunk-
|
|
1
|
+
import{ga as y,ha as S,v as e}from"./chunk-AINDVTMY.js";import{h as l,k as x}from"./chunk-PSUNX2YX.js";import{T as h,Wa as b,fa as _}from"./chunk-GYFRTLML.js";import{d as g,j as u}from"./chunk-773TIA5M.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();function v(t,{httpsOnly:n=!1,message:o="Invalid URL"}={}){return t.refine(a=>A(a,n),{message:o}).refine(a=>!a.includes(`
|
|
2
2
|
`),{message:o})}function _e(t,{message:n="URL must be HTTPS URL or start with /"}={}){return t.refine(o=>o.startsWith("/")||A(o,!0),{message:n})}function A(t,n){try{let o=new URL(t);return n?o.protocol==="https:":["http:","https:"].includes(o.protocol)}catch{return!1}}function be(t){return typeof t=="string"&&!t.startsWith("/")?`/${t}`:t}var H=30;function ye(t){return t.length<=H}r();var ve={skipEsbuildReactDedeuplication:"SHOPIFY_CLI_SKIP_ESBUILD_REACT_DEDUPLICATION",disableGraphiQLExplorer:"SHOPIFY_CLI_DISABLE_GRAPHIQL",useDynamicConfigSpecifications:"SHOPIFY_CLI_DYNAMIC_CONFIG",enableAppLogPolling:"SHOPIFY_CLI_ENABLE_APP_LOG_POLLING",templatesJsonPath:"SHOPIFY_CLI_APP_TEMPLATES_JSON_PATH",mkcertBinaryPath:"SHOPIFY_CLI_MKCERT_BINARY",disableMinificationOnDev:"SHOPIFY_CLI_DISABLE_MINIFICATION_ON_DEV"},O={app:"shopify.app.toml",web:"shopify.web.toml",appEnvironments:"shopify.environments.toml",lockFile:".shopify.lock",hiddenConfig:"project.json",hiddenFolder:".shopify"},Ae={production:".env"},Le={reactTypes:"17.0.30"},L={extensions:{directoryName:"extensions",defaultRegistrationLimit:1},web:{directoryName:"web",configurationName:O.web}},Ce={graphiql:3457,localhost:3458},Ie=/^([a-zA-Z_$])([a-zA-Z0-9_$])*$/;r();var C=50,I=250,V=e.object({namespace:e.string(),key:e.string()}),$=e.object({sms_marketing:e.boolean().optional(),customer_privacy:e.boolean().optional()}),z=e.object({sources:e.array(e.string()).optional()}),B=e.object({network_access:e.boolean().optional(),block_progress:e.boolean().optional(),api_access:e.boolean().optional(),collect_buyer_consent:$.optional(),iframe:z.optional(),bundle_size_exception:e.boolean().optional()}),q=e.object({runs_offline:e.boolean().optional()}),Ue=e.object({type:e.string().optional(),extensions:e.array(e.any()).optional()}),Y=e.object({event:e.string(),blocking:e.boolean().default(!1),applies_to:e.array(e.string()).optional()}),G=e.object({allow_direct_linking:e.boolean().optional(),intercepts:e.array(Y).optional()}),Z=e.object({module:e.string()}),X=e.object({target:e.string(),module:e.string(),should_render:Z.optional(),tools:e.string().optional(),instructions:e.string().optional(),intents:e.array(e.object({type:e.string(),action:e.string(),schema:e.string(),name:e.string().optional(),description:e.string().optional()})).optional(),metafields:e.array(V).optional(),default_placement:e.string().optional(),urls:e.object({edit:e.string().optional()}).optional(),capabilities:G.optional(),preloads:e.object({chat:e.string().optional()}).optional(),assets:e.string().optional()}),Te=e.array(X),R=e.string(),J=e.object({key:e.string().optional(),name:e.string().optional(),description:e.string().optional(),required:e.boolean().optional(),default_value:e.any().optional(),type:e.string(),validations:e.array(e.any()).optional(),marketingActivityCreateUrl:e.string().optional(),marketingActivityDeleteUrl:e.string().optional()}),j=e.object({fields:e.array(J).optional()}),w=e.string().trim().nonempty("Handle can't be empty").max(C,`Handle can't exceed ${C} characters`).regex(/^[a-zA-Z0-9-]*$/,"Handle can only contain alphanumeric characters and hyphens").refine(t=>!t.startsWith("-")&&!t.endsWith("-"),"Handle can't start or end with a hyphen"),K=e.string().trim().nonempty("UID can't be empty").max(I,`UID can't exceed ${I} characters`).regex(/^[a-zA-Z0-9-${}.()_`]*$/,"UID can only contain alphanumeric characters and hyphens").refine(t=>!t.startsWith("-")&&!t.endsWith("-"),"UID can't start or end with a hyphen"),d=e.object({name:e.string().optional(),type:e.string().optional(),handle:w.optional(),uid:K.optional(),description:e.string().optional(),api_version:R.optional(),extension_points:e.any().optional(),capabilities:B.optional(),supported_features:q.optional(),settings:j.optional()}),Ee=d.extend({handle:w}),U=d.omit({handle:!0}),Pe=e.object({api_version:R.optional(),description:e.string().optional(),extensions:e.array(e.any()),settings:j.optional()});r();r();import{isUtf8 as Q}from"node:buffer";import T from"fs";async function E(t,n){let o=await b(g(t,"locales/*.json"));if(!o||o.length===0)return{};let a=ee(o);if(a.length===0)throw new l(`Missing default language in ${n} configuration`,"Make sure to have a {locale}.default.json file in your locales directory");if(a.length>1)throw new l(`Error loading ${n}`,'There must be one (and only one) locale identified as the default locale: e.g. "en.default.json"');for(let i of o)if(T.statSync(i).size===0)throw new l(`Error loading ${n}`,`Locale file ${i} can't be empty`);return{default_locale:a[0],translations:te(o,n)}}function ee(t){return t.filter(o=>u(o).endsWith(".default.json")).map(o=>u(o).split(".")[0])}function te(t,n){let o={};for(let a of t){let i=oe(u(a).split(".")[0],"Locale code is unset"),s=T.readFileSync(a);if(!Q(s))throw new l(`Error loading ${n}`,`Locale file ${a} contains invalid UTF-8 byte sequences. Re-save the file using UTF-8 encoding.`);o[i]=s.toString("base64")}return o}function oe(t,n){if(t===void 0)throw new x(n);return t}function ne(t){return t.experience==="configuration"}var P;(function(t){t.ShouldRender="should_render",t.Main="main",t.Tools="tools",t.Instructions="instructions",t.Intents="intents"})(P||(P={}));function D(t){let o={...{externalIdentifier:`${t.identifier}_external`,additionalIdentifiers:[],externalName:h(t.identifier.replace(/_/g," ")),surface:"test-surface",partnersWebIdentifier:t.identifier,schema:d,registrationLimit:L.extensions.defaultRegistrationLimit,transform:t.transformLocalToRemote,reverseTransform:t.transformRemoteToLocal,experience:t.experience??"extension",uidStrategy:t.uidStrategy??(t.experience==="configuration"?"single":"uuid"),getDevSessionUpdateMessages:t.getDevSessionUpdateMessages,clientSteps:t.clientSteps},...t};return{...o,contributeToAppConfigurationSchema:a=>{let i=ne(o),s=o.schema._def.shape!==void 0,c=o.uidStrategy==="single";return i&&s&&c?a.merge(o.schema):a},parseConfigurationObject:a=>{let i=o.schema.safeParse(a);return i.success?{state:"ok",data:i.data,errors:void 0}:{state:"error",data:void 0,errors:i.error.errors}}}}function N(t){let n=t.appModuleFeatures??(()=>[]);return D({identifier:t.identifier,schema:t.schema,appModuleFeatures:n,transformLocalToRemote:ae(t.transformConfig),transformRemoteToLocal:ie(t.schema,t.transformConfig),experience:"configuration",uidStrategy:t.uidStrategy??"single",clientSteps:t.clientSteps,getDevSessionUpdateMessages:t.getDevSessionUpdateMessages,patchWithAppDevURLs:t.patchWithAppDevURLs})}function Ze(t){return D({identifier:t.identifier,schema:e.any({}),appModuleFeatures:t.appModuleFeatures,experience:t.experience,clientSteps:t.clientSteps,uidStrategy:t.uidStrategy,transformRemoteToLocal:t.transformRemoteToLocal,devSessionWatchConfig:t.devSessionWatchConfig,deployConfig:async(n,o)=>{let a=re(n);if(t.appModuleFeatures().includes("localization")){let i=await E(o,t.identifier);a={...a,localization:i}}return a}})}function ae(t){return Object.keys(t).includes("forward")?t.forward:n=>F(n,t)}function ie(t,n){return n?Object.keys(n).includes("reverse")?n.reverse:o=>F(o,n,!0):o=>k(t,o)}function F(t,n,o=!1){let a={};for(let[i,s]of Object.entries(n)){let c=o?i:s,f=o?s:i,m=y(t,c);m!==void 0&&S(a,f,m)}return a}function k(t,n){return Object.keys(t._def.shape()).reduce((o,a)=>{let i=t._def.shape()[a];return i instanceof e.ZodOptional&&(i=i._def.innerType),i instanceof e.ZodObject?o[a]=k(i,n):(n[a]!==void 0&&(o[a]=n[a]),delete n[a]),o},{})}function re(t){let{type:n,handle:o,uid:a,path:i,extensions:s,...c}=t;return c}r();var se=/^(https:\/\/)/,ce=/^pubsub:\/\/(?<gcp_project_id>[^:]+):(?<gcp_topic>.+)$/,le=/^arn:aws:events:(?<aws_region>[a-z]{2}-[a-z]+-[0-9]+)::event-source\/aws\.partner\/shopify\.com(\.test)?\/(?<api_client_id>\d+)\/(?<event_source_name>.+)$/,pe=/^kafka:\/\/(?<kafka_topic>[a-zA-Z0-9_.-]+)$/;function M(t){return typeof t=="string"&&t.endsWith("/")?t.replace(/\/+$/,""):t}var W=e.string({invalid_type_error:"Value must be string"}).refine(t=>t.startsWith("/")?!0:se.test(t)||ce.test(t)||le.test(t)||pe.test(t),{message:"URI format isn't correct. Valid formats include: relative path starting with a slash, HTTPS URL, pubsub://{project-id}:{topic-id}, kafka://{topic-id} or Eventbridge ARN"});r();var p;(function(t){t.CustomersRedact="customers/redact",t.CustomersDataRequest="customers/data_request",t.ShopRedact="shop/redact"})(p||(p={}));var nt=e.object({topics:e.array(e.string({invalid_type_error:"Values within array must be a string"}),{invalid_type_error:"Value must be string[]"}).optional(),actions:e.array(e.string({invalid_type_error:"Value must be a string"})).optional(),uri:e.preprocess(t=>M(t),W,{required_error:"Missing value at"}),include_fields:e.array(e.string({invalid_type_error:"Value must be a string"})).optional(),filter:e.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:e.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:e.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional(),compliance_topics:e.array(e.enum([p.CustomersRedact,p.CustomersDataRequest,p.ShopRedact]),{invalid_type_error:"Value must be an array containing values: customers/redact, customers/data_request or shop/redact"}).optional()});r();var ue=e.object({scopes:e.string().transform(t=>_(t)??"").optional(),required_scopes:e.array(e.string()).optional(),optional_scopes:e.array(e.string()).optional(),use_legacy_install_flow:e.boolean().optional()}),de=e.object({redirect_urls:e.array(v(e.string()))}),fe=U.extend({access:e.object({admin:e.object({direct_api_mode:e.union([e.literal("online"),e.literal("offline")]).optional(),embedded_app_direct_api_access:e.boolean().optional()}).optional()}).optional(),access_scopes:ue.optional(),auth:de}),me="app_access",ge={access:"access",scopes:"access_scopes.scopes",required_scopes:"access_scopes.required_scopes",optional_scopes:"access_scopes.optional_scopes",use_legacy_install_flow:"access_scopes.use_legacy_install_flow",redirect_url_allowlist:"auth.redirect_urls"},he=N({identifier:me,schema:fe,transformConfig:ge,getDevSessionUpdateMessages:async t=>{let n=t.access_scopes!==void 0,o=t.access_scopes?.use_legacy_install_flow===!0,a=t.access_scopes?.scopes==null&&t.access_scopes?.required_scopes==null;if(o||n&&a)return["Using legacy install flow - access scopes are not auto-granted"];let i=t.access_scopes?.scopes?t.access_scopes.scopes.split(",").map(s=>s.trim()).join(", "):t.access_scopes?.required_scopes?.join(", ");return i?[`Access scopes auto-granted: ${i}`]:["App has been installed"]},patchWithAppDevURLs:(t,n)=>{n.redirectUrlWhitelist&&(t.auth={redirect_urls:n.redirectUrlWhitelist})}}),ut=he;export{ve as a,O as b,Ae as c,Le as d,L as e,Ce as f,Ie as g,v as h,_e as i,be as j,H as k,ye as l,C as m,I as n,V as o,Ue as p,Te as q,J as r,d as s,Ee as t,U as u,Pe as v,E as w,ne as x,P as y,D as z,N as A,Ze as B,M as C,W as D,p as E,nt as F,ue as G,de as H,me as I,ut as J};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
1
|
+
import{b as n}from"./chunk-PVZE65R7.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends Error{type;constructor(e,p){super(p),this.type=e}},i=r=>async()=>r,s=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var d="cloudflare",v=i({name:d});export{o as a,s as b,d as c,v as d};
|