hyperframes 0.8.209 → 0.8.211
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/{add-VZKUIZEH.js → add-WERDY37C.js} +27 -24
- package/dist/{agentPromptGenerator-4NJ252MR.js → agentPromptGenerator-SEAPWYY5.js} +30 -1
- package/dist/{animatedGifPrep-PN4G4YPJ.js → animatedGifPrep-LC43PROA.js} +11 -10
- package/dist/api.js +29 -25
- package/dist/{appHistory-OHYU5ZBQ.js → appHistory-BCWH6XYH.js} +3 -3
- package/dist/{asset-I4PHGE57.js → asset-IVDQNYHP.js} +10 -5
- package/dist/{assetCataloger-LRAUXQ46.js → assetCataloger-PPE7M2WM.js} +13 -12
- package/dist/{audio-T7SAVYED.js → audio-IJ22GXO6.js} +34 -31
- package/dist/{auth-GP6HTQT3.js → auth-FZMDHX2H.js} +11 -6
- package/dist/{autoUpdate-Z6GFPZAG.js → autoUpdate-EO6SFALF.js} +11 -6
- package/dist/{backgroundChecks-ZJ7JV52S.js → backgroundChecks-YW5VIAYF.js} +9 -6
- package/dist/backgroundChecksWorker.js +10 -6
- package/dist/{batchRender-J3ETE23Y.js → batchRender-OOXYNZOT.js} +12 -8
- package/dist/{beats-WF4FJCM5.js → beats-X7GRQA4J.js} +22 -19
- package/dist/{benchmark-B7UPP4PQ.js → benchmark-JGGBMRZO.js} +25 -22
- package/dist/{browser-SIUYD43U.js → browser-FQ5JPTME.js} +23 -20
- package/dist/{bundleWithLocalizedFonts-RRGFY3XV.js → bundleWithLocalizedFonts-XA73ZJ4S.js} +8 -4
- package/dist/{capture-VYS4PCCJ.js → capture-GUVCA5JQ.js} +35 -32
- package/dist/{capture-J3GLHUKI.js → capture-KKVB3MKM.js} +12 -10
- package/dist/{captureCompositionFrame-SVLMPQYC.js → captureCompositionFrame-LNKWWCXE.js} +24 -20
- package/dist/{catalog-DVBNR422.js → catalog-LKJEMEOC.js} +40 -37
- package/dist/{catch-up-OBPMV7KG.js → catch-up-FA6KWX4S.js} +20 -17
- package/dist/{check-MEALXNZK.js → check-6GIDKL6S.js} +59 -56
- package/dist/{checkAudio-RZ7WQYVN.js → checkAudio-H3AUFC4M.js} +19 -15
- package/dist/{checkBrowser-2LEQ2LSX.js → checkBrowser-YWWF63S6.js} +51 -48
- package/dist/{chunk-R52YM6ZK.js → chunk-22OGII5H.js} +5 -5
- package/dist/{chunk-J7A73K2B.js → chunk-24F7TOW2.js} +99 -44
- package/dist/{chunk-ZTZA4UWZ.js → chunk-2GICKZ3I.js} +4 -1
- package/dist/{chunk-U7CZBDMV.js → chunk-2P5DTXUN.js} +1 -1
- package/dist/{chunk-EVYDKSML.js → chunk-2QAR7ZNY.js} +3 -3
- package/dist/{chunk-DROFHVQD.js → chunk-2RQZQJHV.js} +4 -4
- package/dist/{chunk-UIOZIIB7.js → chunk-32NEJ553.js} +1 -73
- package/dist/{chunk-VYRJAQGC.js → chunk-3JYKWNFR.js} +1 -1
- package/dist/{chunk-KGBFHYHX.js → chunk-3LACB6HG.js} +5 -5
- package/dist/{chunk-66PNSZ7K.js → chunk-3NIESDKN.js} +1 -1
- package/dist/{chunk-EA5FUMJN.js → chunk-3R5MYOJN.js} +4 -4
- package/dist/{chunk-IJPFVMIE.js → chunk-3WL7WU6K.js} +28 -20
- package/dist/{chunk-MI4V4HPE.js → chunk-472C35EW.js} +4 -2
- package/dist/{chunk-OML6HQQN.js → chunk-4D46TX6Q.js} +5 -5
- package/dist/{chunk-Z67J3TTU.js → chunk-4EO7DNRJ.js} +3 -3
- package/dist/{chunk-CBM4ZUVN.js → chunk-4JWKC3GH.js} +6 -6
- package/dist/chunk-5766TK7Q.js +145 -0
- package/dist/{chunk-PYVYF64E.js → chunk-5AKWJHRJ.js} +1 -1
- package/dist/{chunk-Y2EVJBR6.js → chunk-5KOZRJR7.js} +2 -2
- package/dist/{chunk-H7B526GH.js → chunk-5LITFBMY.js} +178 -72
- package/dist/{chunk-4BXEPVSA.js → chunk-5MCR5DA5.js} +15 -5
- package/dist/{chunk-MNNK7RV5.js → chunk-5SWWIT7K.js} +2 -1
- package/dist/{chunk-KCLBO65Y.js → chunk-5YPMCCCA.js} +1 -1
- package/dist/{chunk-DVIX7UPH.js → chunk-66KMYUNO.js} +2 -2
- package/dist/{chunk-RVG2JNDU.js → chunk-67JTGRNM.js} +2 -2
- package/dist/{chunk-AQTODJWP.js → chunk-6EN2LWOM.js} +1 -1
- package/dist/{chunk-3A4SB326.js → chunk-6J2G57BB.js} +11 -16
- package/dist/chunk-6LDHXB4Z.js +36 -0
- package/dist/{chunk-GDZA4ALG.js → chunk-77KGX4A3.js} +7 -4
- package/dist/{chunk-MOEGCMKI.js → chunk-7J6LQ3SQ.js} +20 -0
- package/dist/chunk-7KDQAD2W.js +81 -0
- package/dist/{chunk-NQ2INEHX.js → chunk-A4ZTSQLW.js} +1 -1
- package/dist/{chunk-P3OKYRGA.js → chunk-ABBVDJMG.js} +5 -5
- package/dist/{chunk-RJO4X3AA.js → chunk-AIY2Y5UY.js} +3 -3
- package/dist/{chunk-L5XVBFUM.js → chunk-AQMGYRX6.js} +2 -2
- package/dist/{chunk-5T4DP25D.js → chunk-B2B4MN3R.js} +3 -3
- package/dist/{chunk-SOXQXX2M.js → chunk-B4KGJHTE.js} +3 -3
- package/dist/{chunk-NJZRXELC.js → chunk-BGC5S3OZ.js} +41 -29
- package/dist/{chunk-AF3L5JJX.js → chunk-CCLBOLYU.js} +1 -1
- package/dist/{chunk-YCGLT5B4.js → chunk-CGAUUUDL.js} +4 -4
- package/dist/{chunk-DGECWPTL.js → chunk-CJ5QZRY7.js} +2 -2
- package/dist/{chunk-CA3PXWN4.js → chunk-CNU65QE2.js} +4 -4
- package/dist/{chunk-VQB7G5BM.js → chunk-CTZJSMGU.js} +1 -1
- package/dist/{chunk-W32DVMX3.js → chunk-CZCRSS3U.js} +2 -2
- package/dist/{chunk-OK3QLJSF.js → chunk-DAXKGMJL.js} +21 -4
- package/dist/{chunk-RAONLDN5.js → chunk-DDRCX7P2.js} +2 -2
- package/dist/{chunk-SE6S4SGZ.js → chunk-DJ3H6EW3.js} +17 -17
- package/dist/chunk-DL4OD7IA.js +21 -0
- package/dist/{chunk-3RATCY3W.js → chunk-DMIFCIG6.js} +1 -1
- package/dist/{chunk-U5IZUWBW.js → chunk-DPYI2HRJ.js} +91 -17
- package/dist/{chunk-6CSYCFQV.js → chunk-DW35FX4I.js} +1 -1
- package/dist/{chunk-P2FSCR5B.js → chunk-DWIMUPFK.js} +4 -4
- package/dist/{chunk-EU7MVORF.js → chunk-E63BDV4Z.js} +10 -1
- package/dist/{chunk-M4QZFUMW.js → chunk-FBN5AQJL.js} +3 -3
- package/dist/{chunk-LJ7H2A2C.js → chunk-FI7SSV73.js} +1 -1
- package/dist/{chunk-SNLXWCET.js → chunk-FIC3E7IM.js} +21 -15
- package/dist/{chunk-2R5ZKWSV.js → chunk-FLXZ4GZI.js} +1 -1
- package/dist/{chunk-CIDCNE2D.js → chunk-FVY2XRX4.js} +3 -3
- package/dist/chunk-FWKZ3O52.js +4870 -0
- package/dist/{chunk-QSFWGZG6.js → chunk-G7VEYUZ2.js} +16 -132
- package/dist/{chunk-A7GDBL6D.js → chunk-GSXA4YLV.js} +1 -1
- package/dist/{chunk-TSM67ADU.js → chunk-IEVU4FXB.js} +3 -3
- package/dist/{chunk-K2FLNJVB.js → chunk-J2JG4XGP.js} +1 -1
- package/dist/{chunk-WERLJGIC.js → chunk-J3RXEDR2.js} +17 -2
- package/dist/{chunk-JLCAHJUO.js → chunk-JMD5HDPB.js} +2 -2
- package/dist/{chunk-MKALOCDV.js → chunk-JZVUSRZ5.js} +1 -1
- package/dist/{chunk-ZPILPVYU.js → chunk-K3LLHG6I.js} +2 -2
- package/dist/{chunk-HTZJNQYI.js → chunk-K43XLAQV.js} +3 -3
- package/dist/{chunk-V4VXWOIF.js → chunk-KDDO3UYI.js} +9 -9
- package/dist/{chunk-FB5BXGGF.js → chunk-KF6I5WA7.js} +10 -10
- package/dist/chunk-KSNIYQRB.js +1105 -0
- package/dist/{chunk-3PTZ2TD4.js → chunk-KUXOAS4Z.js} +1 -1
- package/dist/{chunk-I3ICHLHV.js → chunk-KZBBY72Q.js} +2 -2
- package/dist/{chunk-JVBRJMOP.js → chunk-LALLQUSK.js} +6 -2
- package/dist/{chunk-F4O4G4ZW.js → chunk-LAR5VTCN.js} +7 -7
- package/dist/{chunk-66LREXGS.js → chunk-NEQIJUV2.js} +1 -1
- package/dist/{chunk-QIDN4ML5.js → chunk-NO6F7CLR.js} +1 -1
- package/dist/{chunk-NXNDHV26.js → chunk-OE5EHGDG.js} +1 -1
- package/dist/{chunk-BYPDKF36.js → chunk-OOA6C4AG.js} +8 -4
- package/dist/{chunk-RIJHDTM5.js → chunk-ORXLO64X.js} +1 -1
- package/dist/{chunk-JJRMN2RV.js → chunk-PICG2XRD.js} +6 -8
- package/dist/{chunk-SWHCYFEF.js → chunk-PKWZG642.js} +3 -3
- package/dist/{chunk-D2CE2J2A.js → chunk-PV4XID2A.js} +1 -1
- package/dist/{chunk-ZMIRSWN6.js → chunk-Q52ISCT4.js} +1 -1
- package/dist/{chunk-3PUXUIWB.js → chunk-QVHC77IF.js} +1 -1
- package/dist/{chunk-SPMKVI6H.js → chunk-RQNFW6YC.js} +9 -4
- package/dist/{chunk-ZA5TNF4R.js → chunk-SJK64HHG.js} +1 -1
- package/dist/{chunk-L7MGVFR4.js → chunk-SXJJTFV4.js} +4 -4
- package/dist/{chunk-MVNTJGDX.js → chunk-T2L2GJ4C.js} +5 -5
- package/dist/{chunk-GMECXFAN.js → chunk-T2WJO4XM.js} +5 -2
- package/dist/{chunk-P327BIJR.js → chunk-U46JEU26.js} +1 -1
- package/dist/{chunk-IQNS7O4W.js → chunk-UI7X4L4M.js} +220 -38
- package/dist/{chunk-JC6BAQOG.js → chunk-VBC3DQFS.js} +3 -3
- package/dist/{chunk-D6T5BNSK.js → chunk-VGKQFZCC.js} +25 -22
- package/dist/{chunk-56ANHX5U.js → chunk-VUEWZXZG.js} +1 -1
- package/dist/{chunk-ERUQ3S6D.js → chunk-WE42NVH7.js} +6 -1
- package/dist/{chunk-TF7YE7J5.js → chunk-WNDTMINP.js} +5 -5
- package/dist/{chunk-SE2MXV2N.js → chunk-X4SBDDLS.js} +2 -1
- package/dist/{chunk-Q43YUROE.js → chunk-X6JUUQCM.js} +1 -1
- package/dist/{chunk-YIFEK3UD.js → chunk-XQ26I3PL.js} +1 -1
- package/dist/{chunk-EXAX37XR.js → chunk-Y65ZU7XY.js} +18 -13
- package/dist/{chunk-GQZHLF5P.js → chunk-YPNBEBQ6.js} +22 -22
- package/dist/{chunk-DR47DSOY.js → chunk-YWPCMOX4.js} +21 -13
- package/dist/{chunk-XCIHCPJK.js → chunk-YWRUQ7XZ.js} +3 -2
- package/dist/{chunk-WLVHSGVL.js → chunk-Z2UZAY2Q.js} +2 -2
- package/dist/{chunk-NEASABW6.js → chunk-ZCHULPJZ.js} +4 -4
- package/dist/{chunk-KTWGVEN6.js → chunk-ZE57TSS6.js} +4 -4
- package/dist/{chunk-6PWQH77E.js → chunk-ZFVNYA3M.js} +1 -1
- package/dist/{chunk-QIKZ2HZJ.js → chunk-ZNSKOXFW.js} +3 -3
- package/dist/{chunk-LV4NWCJS.js → chunk-ZPXXWUQ3.js} +2 -2
- package/dist/{clean-VWCYLOVI.js → clean-SVEOBRPM.js} +38 -35
- package/dist/cli.js +82 -67
- package/dist/{cloud-HU3RXCVE.js → cloud-ADFJGIEH.js} +11 -6
- package/dist/{cloudrun-OST6QBYD.js → cloudrun-BNY7Q5RK.js} +25 -19
- package/dist/{colors-HKWSZCGK.js → colors-HRL7QSVG.js} +5 -1
- package/dist/commands/layout-audit.browser.js +94 -5
- package/dist/commands/motion-signature.browser.js +11 -2
- package/dist/{compare-U2MJWZAH.js → compare-QC3T22KV.js} +51 -48
- package/dist/{compiler-DSP4MVEC.js → compiler-4ITKK4XI.js} +4 -4
- package/dist/{component-EC5XU6KR.js → component-CNZCB3RY.js} +12 -7
- package/dist/{compositions-AKYCTF4G.js → compositions-UO32IP6Z.js} +26 -23
- package/dist/{contactSheet-RYAE7Y5D.js → contactSheet-WG4HT5XP.js} +2 -2
- package/dist/{delete-Z5MOEZM2.js → delete-RWTOSI24.js} +24 -18
- package/dist/{deploy-Y4LFVYXT.js → deploy-OKWS53NP.js} +9 -5
- package/dist/{destroy-CGAZIL2C.js → destroy-4RL5VOXQ.js} +7 -3
- package/dist/{dist-JJL4QUDL.js → dist-AEE3QTRB.js} +5 -3
- package/dist/{dist-73YTUT3W.js → dist-NCI6JOJZ.js} +2 -2
- package/dist/{docs-UEWLIP6D.js → docs-UMIA66EZ.js} +8 -3
- package/dist/{doctor-7234U557.js → doctor-SIF72ESZ.js} +30 -23
- package/dist/{events-SII53QYO.js → events-34PIVLZQ.js} +13 -11
- package/dist/{events-RUIZNTG3.js → events-S3VUTFEG.js} +13 -10
- package/dist/{feedback-6CCDDQ36.js → feedback-VS4LRXHW.js} +34 -29
- package/dist/{ffmpeg-C4VWK4M2.js → ffmpeg-YVQOKNV6.js} +14 -13
- package/dist/{figma-GAN63U5U.js → figma-AF4JKDBA.js} +10 -5
- package/dist/fontLocalizeCli.js +15 -13
- package/dist/{get-RZGUHZB4.js → get-UQGCS6Q4.js} +20 -16
- package/dist/{gpuPolicy-BGJRCLP4.js → gpuPolicy-Q4B3D6PW.js} +11 -10
- package/dist/{grade-compare-XOBN52WV.js → grade-compare-G34673XC.js} +52 -49
- package/dist/hangReport.js +1 -0
- package/dist/{heifImagePrep-DCHSYGW7.js → heifImagePrep-XD4DGOUS.js} +12 -11
- package/dist/{help-O2IV6PUC.js → help-3QSD26IC.js} +7 -3
- package/dist/{history-GPTEM4UX.js → history-6DC24UCF.js} +22 -19
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +64 -64
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-7Y3JPN7C.js → info-6JUHWWJK.js} +21 -18
- package/dist/{init-L6W5WG5K.js → init-2DPX6U3J.js} +67 -60
- package/dist/{inspect-MQZANGQY.js → inspect-Z55YUSXC.js} +49 -46
- package/dist/{installer-DCIMLYB6.js → installer-XVKYJU7S.js} +7 -6
- package/dist/{keyframes-WNJIKL4G.js → keyframes-YHF4AQIL.js} +19 -16
- package/dist/{lambda-FEA4SSFK.js → lambda-JITTS37E.js} +37 -31
- package/dist/{layout-AUQAYDJU.js → layout-V5NYJXIX.js} +49 -46
- package/dist/{lint-A33IHYID.js → lint-V4WMO7YL.js} +22 -19
- package/dist/{lintProject-KCN7MRBN.js → lintProject-EM7Y2ZRB.js} +2 -2
- package/dist/{list-56JHCET6.js → list-W7UCIYKA.js} +21 -17
- package/dist/localPage-BLQFFIDF.js +56 -0
- package/dist/{login-HUOM4GNP.js → login-IX3MOREU.js} +16 -12
- package/dist/{logout-3IID4KXD.js → logout-46NLNY2K.js} +11 -6
- package/dist/{manager-Z7W4GQGF.js → manager-IZIK7BHN.js} +9 -7
- package/dist/{manager-SDRJOMPR.js → manager-WJOWZNHM.js} +15 -14
- package/dist/{media-treatment-5TGZOD67.js → media-treatment-XBO6EXL4.js} +31 -28
- package/dist/{media-use-JBN57JE3.js → media-use-3RFKY7XJ.js} +3 -2
- package/dist/{models-ABDX6TXI.js → models-P3NSHDQS.js} +29 -24
- package/dist/{motionShot-AV2WRH2C.js → motionShot-D4QMLTQP.js} +31 -27
- package/dist/{normalize-audio-M7T25DST.js → normalize-audio-Q4VUR3QJ.js} +23 -20
- package/dist/{open-IRNZY5XN.js → open-LGKX534P.js} +30 -27
- package/dist/{parakeetRunner-2EJUIMOJ.js → parakeetRunner-FAOQMPS6.js} +23 -22
- package/dist/{pipeline-QGKOJKXS.js → pipeline-2YONKZYC.js} +19 -15
- package/dist/{play-2SQLHM5B.js → play-PJOUIY55.js} +44 -41
- package/dist/{policies-PKLD4UW5.js → policies-UPNRQ7IW.js} +11 -6
- package/dist/{preflight-ZHXMG2SM.js → preflight-3PPM7QBU.js} +18 -16
- package/dist/{present-RERVL6R7.js → present-323D6OE2.js} +38 -35
- package/dist/{preview-S6RQOMHE.js → preview-E42QP2KX.js} +52 -49
- package/dist/{producer-DBRGH2FI.js → producer-MTMNLJSC.js} +1 -1
- package/dist/{progress-PX3PVAIM.js → progress-LMQ2DXM4.js} +7 -3
- package/dist/{projectConfig-TUMDULTL.js → projectConfig-5QRVB5KY.js} +11 -11
- package/dist/prompts-P3IT5H36.js +40 -0
- package/dist/{publication-7VGXIFVZ.js → publication-AUZLFOG5.js} +5 -4
- package/dist/{publish-KJB2AGHL.js → publish-H5P7UHRV.js} +40 -29
- package/dist/{refresh-3IRHJEQA.js → refresh-4XRQS3N6.js} +11 -6
- package/dist/{remove-background-EFWXPLS4.js → remove-background-T2RV476S.js} +34 -27
- package/dist/{render-5O5ARP6C.js → render-3FRGIWES.js} +44 -40
- package/dist/{render-7S6UBLOE.js → render-4XEB3XWI.js} +82 -59
- package/dist/{render-HV6AA22W.js → render-GJH7446R.js} +15 -10
- package/dist/{render-batch-7UEOULJJ.js → render-batch-77X5453X.js} +16 -11
- package/dist/renderSetupWorker.js +13 -10
- package/dist/{resolver-HFTEER5V.js → resolver-DIUNK525.js} +7 -6
- package/dist/{screenshotCapture-HOW4VSV6.js → screenshotCapture-HDRHY4NN.js} +2 -2
- package/dist/{sherpa-HSSM76FL.js → sherpa-SUS3YSEP.js} +22 -21
- package/dist/sherpaWorker.js +1 -0
- package/dist/{sites-Q2S3DZY4.js → sites-V42IFVTK.js} +7 -3
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +2 -2
- package/dist/{skills-RQO5K6WL.js → skills-YCGSIOCE.js} +18 -15
- package/dist/{skillsUpdateCheck-S5WL2YLZ.js → skillsUpdateCheck-VCQIZGOL.js} +9 -6
- package/dist/{snapshot-4RGI235E.js → snapshot-H6R5PWNS.js} +85 -72
- package/dist/{src-D75YYW2M.js → src-ED5VCIRC.js} +13 -12
- package/dist/{src-ALOV4D57.js → src-HHDLJV4L.js} +24 -9
- package/dist/{state-JPNCCXAV.js → state-D5SYQFCB.js} +2 -2
- package/dist/{staticProjectServer-DIHWPJ6B.js → staticProjectServer-VY7QG5XH.js} +30 -23
- package/dist/{status-DTP6ZYDU.js → status-GEZNVPII.js} +12 -8
- package/dist/studio/assets/{hyperframes-player-CMH8OeX2.js → hyperframes-player-CzrqgMUX.js} +1 -1
- package/dist/studio/assets/{index-DjHzuJGR.js → index-B3SPHPi1.js} +1 -1
- package/dist/studio/assets/{index-CYbvOVp-.css → index-RUPGNyct.css} +1 -1
- package/dist/studio/assets/{index-DQam8zzE.js → index-k4nVfS2D.js} +123 -123
- package/dist/studio/index.html +2 -2
- package/dist/{studio-api-A2VSWTVF.js → studio-api-TR5RPX57.js} +16 -14
- package/dist/{studioServer-PECYWZHS.js → studioServer-4SZLLQOV.js} +79 -76
- package/dist/{synthesize-RVE7IUOJ.js → synthesize-QALK5SQR.js} +3 -3
- package/dist/{system-YD4AW5ZX.js → system-MVRF5UM2.js} +5 -3
- package/dist/{telemetry-YDGXGOLH.js → telemetry-7HUKOQ6X.js} +13 -11
- package/dist/{telemetry-6BPSGY5W.js → telemetry-KGY7G3UR.js} +10 -6
- package/dist/templates/blank/index.html +1 -1
- package/dist/{timeline-5WUEEKZ3.js → timeline-CGIKWCQI.js} +38 -35
- package/dist/{tokens-XVFZPIUZ.js → tokens-AZALDJEK.js} +11 -6
- package/dist/{transcribe-QWDUIJWK.js → transcribe-CTF5EIXJ.js} +38 -35
- package/dist/{transcribe-TTJ6CDQT.js → transcribe-V6K5547L.js} +18 -17
- package/dist/{tts-AGMCPQXE.js → tts-C2HBLFKK.js} +14 -9
- package/dist/{updateCheck-P7STSJ6Q.js → updateCheck-5I563YLB.js} +8 -5
- package/dist/{upgrade-NEIZ3KVL.js → upgrade-GRPVQE7Z.js} +26 -13
- package/dist/{urlDownloader-ZZFNGZNG.js → urlDownloader-EP6Q4WES.js} +10 -9
- package/dist/{usage-HG4WMM7A.js → usage-772JV45U.js} +2 -1
- package/dist/{validate-T2SLBOXG.js → validate-TVCDSQS3.js} +41 -38
- package/dist/{video-7OHSBSRT.js → video-CFEIRKAE.js} +18 -14
- package/dist/warmCheck.js +60 -56
- package/dist/warmCheckClient.js +1 -0
- package/package.json +1 -1
- package/dist/chunk-WMQNIQDJ.js +0 -2057
- package/dist/chunk-ZXTSUXSL.js +0 -4870
- package/dist/dist-EWXJGN63.js +0 -129
- package/dist/localPage-V3HBGM3Z.js +0 -27
package/dist/chunk-WMQNIQDJ.js
DELETED
|
@@ -1,2057 +0,0 @@
|
|
|
1
|
-
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
-
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
-
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
-
var require = __hf_createRequire(import.meta.url);
|
|
5
|
-
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = __hf_dirname(__filename);
|
|
7
|
-
import {
|
|
8
|
-
__commonJS,
|
|
9
|
-
__toESM
|
|
10
|
-
} from "./chunk-M2WBOQ2Q.js";
|
|
11
|
-
|
|
12
|
-
// ../../node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
13
|
-
var require_src = __commonJS({
|
|
14
|
-
"../../node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
|
|
15
|
-
"use strict";
|
|
16
|
-
var ESC2 = "\x1B";
|
|
17
|
-
var CSI2 = `${ESC2}[`;
|
|
18
|
-
var beep = "\x07";
|
|
19
|
-
var cursor = {
|
|
20
|
-
to(x2, y) {
|
|
21
|
-
if (!y) return `${CSI2}${x2 + 1}G`;
|
|
22
|
-
return `${CSI2}${y + 1};${x2 + 1}H`;
|
|
23
|
-
},
|
|
24
|
-
move(x2, y) {
|
|
25
|
-
let ret = "";
|
|
26
|
-
if (x2 < 0) ret += `${CSI2}${-x2}D`;
|
|
27
|
-
else if (x2 > 0) ret += `${CSI2}${x2}C`;
|
|
28
|
-
if (y < 0) ret += `${CSI2}${-y}A`;
|
|
29
|
-
else if (y > 0) ret += `${CSI2}${y}B`;
|
|
30
|
-
return ret;
|
|
31
|
-
},
|
|
32
|
-
up: (count = 1) => `${CSI2}${count}A`,
|
|
33
|
-
down: (count = 1) => `${CSI2}${count}B`,
|
|
34
|
-
forward: (count = 1) => `${CSI2}${count}C`,
|
|
35
|
-
backward: (count = 1) => `${CSI2}${count}D`,
|
|
36
|
-
nextLine: (count = 1) => `${CSI2}E`.repeat(count),
|
|
37
|
-
prevLine: (count = 1) => `${CSI2}F`.repeat(count),
|
|
38
|
-
left: `${CSI2}G`,
|
|
39
|
-
hide: `${CSI2}?25l`,
|
|
40
|
-
show: `${CSI2}?25h`,
|
|
41
|
-
save: `${ESC2}7`,
|
|
42
|
-
restore: `${ESC2}8`
|
|
43
|
-
};
|
|
44
|
-
var scroll = {
|
|
45
|
-
up: (count = 1) => `${CSI2}S`.repeat(count),
|
|
46
|
-
down: (count = 1) => `${CSI2}T`.repeat(count)
|
|
47
|
-
};
|
|
48
|
-
var erase = {
|
|
49
|
-
screen: `${CSI2}2J`,
|
|
50
|
-
up: (count = 1) => `${CSI2}1J`.repeat(count),
|
|
51
|
-
down: (count = 1) => `${CSI2}J`.repeat(count),
|
|
52
|
-
line: `${CSI2}2K`,
|
|
53
|
-
lineEnd: `${CSI2}K`,
|
|
54
|
-
lineStart: `${CSI2}1K`,
|
|
55
|
-
lines(count) {
|
|
56
|
-
let clear = "";
|
|
57
|
-
for (let i = 0; i < count; i++)
|
|
58
|
-
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
59
|
-
if (count)
|
|
60
|
-
clear += cursor.left;
|
|
61
|
-
return clear;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
module.exports = { cursor, scroll, erase, beep };
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// ../../node_modules/.bun/@clack+core@1.3.0/node_modules/@clack/core/dist/index.mjs
|
|
69
|
-
import { styleText as v } from "util";
|
|
70
|
-
import { stdout as S, stdin as D } from "process";
|
|
71
|
-
import * as b from "readline";
|
|
72
|
-
import E from "readline";
|
|
73
|
-
|
|
74
|
-
// ../../node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
|
|
75
|
-
var getCodePointsLength = /* @__PURE__ */ (() => {
|
|
76
|
-
const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
77
|
-
return (input) => {
|
|
78
|
-
let surrogatePairsNr = 0;
|
|
79
|
-
SURROGATE_PAIR_RE.lastIndex = 0;
|
|
80
|
-
while (SURROGATE_PAIR_RE.test(input)) {
|
|
81
|
-
surrogatePairsNr += 1;
|
|
82
|
-
}
|
|
83
|
-
return input.length - surrogatePairsNr;
|
|
84
|
-
};
|
|
85
|
-
})();
|
|
86
|
-
var isFullWidth = (x2) => {
|
|
87
|
-
return x2 === 12288 || x2 >= 65281 && x2 <= 65376 || x2 >= 65504 && x2 <= 65510;
|
|
88
|
-
};
|
|
89
|
-
var isWideNotCJKTNotEmoji = (x2) => {
|
|
90
|
-
return x2 === 8987 || x2 === 9001 || x2 >= 12272 && x2 <= 12287 || x2 >= 12289 && x2 <= 12350 || x2 >= 12441 && x2 <= 12543 || x2 >= 12549 && x2 <= 12591 || x2 >= 12593 && x2 <= 12686 || x2 >= 12688 && x2 <= 12771 || x2 >= 12783 && x2 <= 12830 || x2 >= 12832 && x2 <= 12871 || x2 >= 12880 && x2 <= 19903 || x2 >= 65040 && x2 <= 65049 || x2 >= 65072 && x2 <= 65106 || x2 >= 65108 && x2 <= 65126 || x2 >= 65128 && x2 <= 65131 || x2 >= 127488 && x2 <= 127490 || x2 >= 127504 && x2 <= 127547 || x2 >= 127552 && x2 <= 127560 || x2 >= 131072 && x2 <= 196605 || x2 >= 196608 && x2 <= 262141;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
// ../../node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
|
|
94
|
-
var ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
|
|
95
|
-
var CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
96
|
-
var CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
|
|
97
|
-
var TAB_RE = /\t{1,1000}/y;
|
|
98
|
-
var EMOJI_RE = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
|
|
99
|
-
var LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
|
|
100
|
-
var MODIFIER_RE = new RegExp("\\p{M}+", "gu");
|
|
101
|
-
var NO_TRUNCATION = { limit: Infinity, ellipsis: "" };
|
|
102
|
-
var getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
|
|
103
|
-
const LIMIT = truncationOptions.limit ?? Infinity;
|
|
104
|
-
const ELLIPSIS = truncationOptions.ellipsis ?? "";
|
|
105
|
-
const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
|
|
106
|
-
const ANSI_WIDTH = 0;
|
|
107
|
-
const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
|
|
108
|
-
const TAB_WIDTH = widthOptions.tabWidth ?? 8;
|
|
109
|
-
const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
|
|
110
|
-
const FULL_WIDTH_WIDTH = 2;
|
|
111
|
-
const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
|
|
112
|
-
const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
|
|
113
|
-
const PARSE_BLOCKS = [
|
|
114
|
-
[LATIN_RE, REGULAR_WIDTH],
|
|
115
|
-
[ANSI_RE, ANSI_WIDTH],
|
|
116
|
-
[CONTROL_RE, CONTROL_WIDTH],
|
|
117
|
-
[TAB_RE, TAB_WIDTH],
|
|
118
|
-
[EMOJI_RE, EMOJI_WIDTH],
|
|
119
|
-
[CJKT_WIDE_RE, WIDE_WIDTH]
|
|
120
|
-
];
|
|
121
|
-
let indexPrev = 0;
|
|
122
|
-
let index = 0;
|
|
123
|
-
let length = input.length;
|
|
124
|
-
let lengthExtra = 0;
|
|
125
|
-
let truncationEnabled = false;
|
|
126
|
-
let truncationIndex = length;
|
|
127
|
-
let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);
|
|
128
|
-
let unmatchedStart = 0;
|
|
129
|
-
let unmatchedEnd = 0;
|
|
130
|
-
let width = 0;
|
|
131
|
-
let widthExtra = 0;
|
|
132
|
-
outer: while (true) {
|
|
133
|
-
if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
|
|
134
|
-
const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
|
|
135
|
-
lengthExtra = 0;
|
|
136
|
-
for (const char of unmatched.replaceAll(MODIFIER_RE, "")) {
|
|
137
|
-
const codePoint = char.codePointAt(0) || 0;
|
|
138
|
-
if (isFullWidth(codePoint)) {
|
|
139
|
-
widthExtra = FULL_WIDTH_WIDTH;
|
|
140
|
-
} else if (isWideNotCJKTNotEmoji(codePoint)) {
|
|
141
|
-
widthExtra = WIDE_WIDTH;
|
|
142
|
-
} else {
|
|
143
|
-
widthExtra = REGULAR_WIDTH;
|
|
144
|
-
}
|
|
145
|
-
if (width + widthExtra > truncationLimit) {
|
|
146
|
-
truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
|
|
147
|
-
}
|
|
148
|
-
if (width + widthExtra > LIMIT) {
|
|
149
|
-
truncationEnabled = true;
|
|
150
|
-
break outer;
|
|
151
|
-
}
|
|
152
|
-
lengthExtra += char.length;
|
|
153
|
-
width += widthExtra;
|
|
154
|
-
}
|
|
155
|
-
unmatchedStart = unmatchedEnd = 0;
|
|
156
|
-
}
|
|
157
|
-
if (index >= length) {
|
|
158
|
-
break outer;
|
|
159
|
-
}
|
|
160
|
-
for (let i = 0, l = PARSE_BLOCKS.length; i < l; i++) {
|
|
161
|
-
const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];
|
|
162
|
-
BLOCK_RE.lastIndex = index;
|
|
163
|
-
if (BLOCK_RE.test(input)) {
|
|
164
|
-
lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
|
|
165
|
-
widthExtra = lengthExtra * BLOCK_WIDTH;
|
|
166
|
-
if (width + widthExtra > truncationLimit) {
|
|
167
|
-
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
|
|
168
|
-
}
|
|
169
|
-
if (width + widthExtra > LIMIT) {
|
|
170
|
-
truncationEnabled = true;
|
|
171
|
-
break outer;
|
|
172
|
-
}
|
|
173
|
-
width += widthExtra;
|
|
174
|
-
unmatchedStart = indexPrev;
|
|
175
|
-
unmatchedEnd = index;
|
|
176
|
-
index = indexPrev = BLOCK_RE.lastIndex;
|
|
177
|
-
continue outer;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
index += 1;
|
|
181
|
-
}
|
|
182
|
-
return {
|
|
183
|
-
width: truncationEnabled ? truncationLimit : width,
|
|
184
|
-
index: truncationEnabled ? truncationIndex : length,
|
|
185
|
-
truncated: truncationEnabled,
|
|
186
|
-
ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
var dist_default = getStringTruncatedWidth;
|
|
190
|
-
|
|
191
|
-
// ../../node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
|
|
192
|
-
var NO_TRUNCATION2 = {
|
|
193
|
-
limit: Infinity,
|
|
194
|
-
ellipsis: "",
|
|
195
|
-
ellipsisWidth: 0
|
|
196
|
-
};
|
|
197
|
-
var fastStringWidth = (input, options = {}) => {
|
|
198
|
-
return dist_default(input, NO_TRUNCATION2, options).width;
|
|
199
|
-
};
|
|
200
|
-
var dist_default2 = fastStringWidth;
|
|
201
|
-
|
|
202
|
-
// ../../node_modules/.bun/fast-wrap-ansi@0.2.0/node_modules/fast-wrap-ansi/lib/main.js
|
|
203
|
-
var ESC = "\x1B";
|
|
204
|
-
var CSI = "\x9B";
|
|
205
|
-
var END_CODE = 39;
|
|
206
|
-
var ANSI_ESCAPE_BELL = "\x07";
|
|
207
|
-
var ANSI_CSI = "[";
|
|
208
|
-
var ANSI_OSC = "]";
|
|
209
|
-
var ANSI_SGR_TERMINATOR = "m";
|
|
210
|
-
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
211
|
-
var GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
|
|
212
|
-
var getClosingCode = (openingCode) => {
|
|
213
|
-
if (openingCode >= 30 && openingCode <= 37)
|
|
214
|
-
return 39;
|
|
215
|
-
if (openingCode >= 90 && openingCode <= 97)
|
|
216
|
-
return 39;
|
|
217
|
-
if (openingCode >= 40 && openingCode <= 47)
|
|
218
|
-
return 49;
|
|
219
|
-
if (openingCode >= 100 && openingCode <= 107)
|
|
220
|
-
return 49;
|
|
221
|
-
if (openingCode === 1 || openingCode === 2)
|
|
222
|
-
return 22;
|
|
223
|
-
if (openingCode === 3)
|
|
224
|
-
return 23;
|
|
225
|
-
if (openingCode === 4)
|
|
226
|
-
return 24;
|
|
227
|
-
if (openingCode === 7)
|
|
228
|
-
return 27;
|
|
229
|
-
if (openingCode === 8)
|
|
230
|
-
return 28;
|
|
231
|
-
if (openingCode === 9)
|
|
232
|
-
return 29;
|
|
233
|
-
if (openingCode === 0)
|
|
234
|
-
return 0;
|
|
235
|
-
return void 0;
|
|
236
|
-
};
|
|
237
|
-
var wrapAnsiCode = (code) => `${ESC}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
238
|
-
var wrapAnsiHyperlink = (url) => `${ESC}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
|
|
239
|
-
var wrapWord = (rows, word, columns) => {
|
|
240
|
-
const characters = word[Symbol.iterator]();
|
|
241
|
-
let isInsideEscape = false;
|
|
242
|
-
let isInsideLinkEscape = false;
|
|
243
|
-
let lastRow = rows.at(-1);
|
|
244
|
-
let visible = lastRow === void 0 ? 0 : dist_default2(lastRow);
|
|
245
|
-
let currentCharacter = characters.next();
|
|
246
|
-
let nextCharacter = characters.next();
|
|
247
|
-
let rawCharacterIndex = 0;
|
|
248
|
-
while (!currentCharacter.done) {
|
|
249
|
-
const character = currentCharacter.value;
|
|
250
|
-
const characterLength = dist_default2(character);
|
|
251
|
-
if (visible + characterLength <= columns) {
|
|
252
|
-
rows[rows.length - 1] += character;
|
|
253
|
-
} else {
|
|
254
|
-
rows.push(character);
|
|
255
|
-
visible = 0;
|
|
256
|
-
}
|
|
257
|
-
if (character === ESC || character === CSI) {
|
|
258
|
-
isInsideEscape = true;
|
|
259
|
-
isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);
|
|
260
|
-
}
|
|
261
|
-
if (isInsideEscape) {
|
|
262
|
-
if (isInsideLinkEscape) {
|
|
263
|
-
if (character === ANSI_ESCAPE_BELL) {
|
|
264
|
-
isInsideEscape = false;
|
|
265
|
-
isInsideLinkEscape = false;
|
|
266
|
-
}
|
|
267
|
-
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
268
|
-
isInsideEscape = false;
|
|
269
|
-
}
|
|
270
|
-
} else {
|
|
271
|
-
visible += characterLength;
|
|
272
|
-
if (visible === columns && !nextCharacter.done) {
|
|
273
|
-
rows.push("");
|
|
274
|
-
visible = 0;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
currentCharacter = nextCharacter;
|
|
278
|
-
nextCharacter = characters.next();
|
|
279
|
-
rawCharacterIndex += character.length;
|
|
280
|
-
}
|
|
281
|
-
lastRow = rows.at(-1);
|
|
282
|
-
if (!visible && lastRow !== void 0 && lastRow.length && rows.length > 1) {
|
|
283
|
-
rows[rows.length - 2] += rows.pop();
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
var stringVisibleTrimSpacesRight = (string) => {
|
|
287
|
-
const words = string.split(" ");
|
|
288
|
-
let last = words.length;
|
|
289
|
-
while (last) {
|
|
290
|
-
if (dist_default2(words[last - 1])) {
|
|
291
|
-
break;
|
|
292
|
-
}
|
|
293
|
-
last--;
|
|
294
|
-
}
|
|
295
|
-
if (last === words.length) {
|
|
296
|
-
return string;
|
|
297
|
-
}
|
|
298
|
-
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
299
|
-
};
|
|
300
|
-
var exec = (string, columns, options = {}) => {
|
|
301
|
-
if (options.trim !== false && string.trim() === "") {
|
|
302
|
-
return "";
|
|
303
|
-
}
|
|
304
|
-
let returnValue = "";
|
|
305
|
-
let escapeCode;
|
|
306
|
-
let escapeUrl;
|
|
307
|
-
const words = string.split(" ");
|
|
308
|
-
let rows = [""];
|
|
309
|
-
let rowLength = 0;
|
|
310
|
-
for (let index = 0; index < words.length; index++) {
|
|
311
|
-
const word = words[index];
|
|
312
|
-
if (options.trim !== false) {
|
|
313
|
-
const row = rows.at(-1) ?? "";
|
|
314
|
-
const trimmed = row.trimStart();
|
|
315
|
-
if (row.length !== trimmed.length) {
|
|
316
|
-
rows[rows.length - 1] = trimmed;
|
|
317
|
-
rowLength = dist_default2(trimmed);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
if (index !== 0) {
|
|
321
|
-
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
322
|
-
rows.push("");
|
|
323
|
-
rowLength = 0;
|
|
324
|
-
}
|
|
325
|
-
if (rowLength || options.trim === false) {
|
|
326
|
-
rows[rows.length - 1] += " ";
|
|
327
|
-
rowLength++;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
const wordLength = dist_default2(word);
|
|
331
|
-
if (options.hard && wordLength > columns) {
|
|
332
|
-
const remainingColumns = columns - rowLength;
|
|
333
|
-
const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
|
|
334
|
-
const breaksStartingNextLine = Math.floor((wordLength - 1) / columns);
|
|
335
|
-
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
336
|
-
rows.push("");
|
|
337
|
-
}
|
|
338
|
-
wrapWord(rows, word, columns);
|
|
339
|
-
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
340
|
-
continue;
|
|
341
|
-
}
|
|
342
|
-
if (rowLength + wordLength > columns && rowLength && wordLength) {
|
|
343
|
-
if (options.wordWrap === false && rowLength < columns) {
|
|
344
|
-
wrapWord(rows, word, columns);
|
|
345
|
-
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
346
|
-
continue;
|
|
347
|
-
}
|
|
348
|
-
rows.push("");
|
|
349
|
-
rowLength = 0;
|
|
350
|
-
}
|
|
351
|
-
if (rowLength + wordLength > columns && options.wordWrap === false) {
|
|
352
|
-
wrapWord(rows, word, columns);
|
|
353
|
-
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
354
|
-
continue;
|
|
355
|
-
}
|
|
356
|
-
rows[rows.length - 1] += word;
|
|
357
|
-
rowLength += wordLength;
|
|
358
|
-
}
|
|
359
|
-
if (options.trim !== false) {
|
|
360
|
-
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
361
|
-
}
|
|
362
|
-
const preString = rows.join("\n");
|
|
363
|
-
let inSurrogate = false;
|
|
364
|
-
for (let i = 0; i < preString.length; i++) {
|
|
365
|
-
const character = preString[i];
|
|
366
|
-
returnValue += character;
|
|
367
|
-
if (!inSurrogate) {
|
|
368
|
-
inSurrogate = character >= "\uD800" && character <= "\uDBFF";
|
|
369
|
-
if (inSurrogate) {
|
|
370
|
-
continue;
|
|
371
|
-
}
|
|
372
|
-
} else {
|
|
373
|
-
inSurrogate = false;
|
|
374
|
-
}
|
|
375
|
-
if (character === ESC || character === CSI) {
|
|
376
|
-
GROUP_REGEX.lastIndex = i + 1;
|
|
377
|
-
const groupsResult = GROUP_REGEX.exec(preString);
|
|
378
|
-
const groups = groupsResult?.groups;
|
|
379
|
-
if (groups?.code !== void 0) {
|
|
380
|
-
const code = Number.parseFloat(groups.code);
|
|
381
|
-
escapeCode = code === END_CODE ? void 0 : code;
|
|
382
|
-
} else if (groups?.uri !== void 0) {
|
|
383
|
-
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
if (preString[i + 1] === "\n") {
|
|
387
|
-
if (escapeUrl) {
|
|
388
|
-
returnValue += wrapAnsiHyperlink("");
|
|
389
|
-
}
|
|
390
|
-
const closingCode = escapeCode ? getClosingCode(escapeCode) : void 0;
|
|
391
|
-
if (escapeCode && closingCode) {
|
|
392
|
-
returnValue += wrapAnsiCode(closingCode);
|
|
393
|
-
}
|
|
394
|
-
} else if (character === "\n") {
|
|
395
|
-
if (escapeCode && getClosingCode(escapeCode)) {
|
|
396
|
-
returnValue += wrapAnsiCode(escapeCode);
|
|
397
|
-
}
|
|
398
|
-
if (escapeUrl) {
|
|
399
|
-
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
return returnValue;
|
|
404
|
-
};
|
|
405
|
-
var CRLF_OR_LF = /\r?\n/;
|
|
406
|
-
function wrapAnsi(string, columns, options) {
|
|
407
|
-
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
// ../../node_modules/.bun/@clack+core@1.3.0/node_modules/@clack/core/dist/index.mjs
|
|
411
|
-
var import_sisteransi = __toESM(require_src(), 1);
|
|
412
|
-
import { ReadStream as O } from "tty";
|
|
413
|
-
function d(r, t, s) {
|
|
414
|
-
if (!s.some((o) => !o.disabled)) return r;
|
|
415
|
-
const e2 = r + t, i = Math.max(s.length - 1, 0), n = e2 < 0 ? i : e2 > i ? 0 : e2;
|
|
416
|
-
return s[n].disabled ? d(n, t < 0 ? -1 : 1, s) : n;
|
|
417
|
-
}
|
|
418
|
-
function I(r, t, s, e2) {
|
|
419
|
-
const i = e2.split(`
|
|
420
|
-
`);
|
|
421
|
-
let n = 0, o = r;
|
|
422
|
-
for (const a of i) {
|
|
423
|
-
if (o <= a.length) break;
|
|
424
|
-
o -= a.length + 1, n++;
|
|
425
|
-
}
|
|
426
|
-
for (n = Math.max(0, Math.min(i.length - 1, n + s)), o = Math.min(o, i[n].length) + t; o < 0 && n > 0; ) n--, o += i[n].length + 1;
|
|
427
|
-
for (; o > i[n].length && n < i.length - 1; ) o -= i[n].length + 1, n++;
|
|
428
|
-
o = Math.max(0, Math.min(i[n].length, o));
|
|
429
|
-
let u = 0;
|
|
430
|
-
for (let a = 0; a < n; a++) u += i[a].length + 1;
|
|
431
|
-
return u + o;
|
|
432
|
-
}
|
|
433
|
-
var G = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
434
|
-
var K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
435
|
-
var h = { actions: new Set(G), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...K], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t) => `There are only ${r} days in ${t}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
|
|
436
|
-
function j(r) {
|
|
437
|
-
if (r.aliases !== void 0) {
|
|
438
|
-
const t = r.aliases;
|
|
439
|
-
for (const s in t) {
|
|
440
|
-
if (!Object.hasOwn(t, s)) continue;
|
|
441
|
-
const e2 = t[s];
|
|
442
|
-
h.actions.has(e2) && (h.aliases.has(s) || h.aliases.set(s, e2));
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
if (r.messages !== void 0) {
|
|
446
|
-
const t = r.messages;
|
|
447
|
-
t.cancel !== void 0 && (h.messages.cancel = t.cancel), t.error !== void 0 && (h.messages.error = t.error);
|
|
448
|
-
}
|
|
449
|
-
if (r.withGuide !== void 0 && (h.withGuide = r.withGuide !== false), r.date !== void 0) {
|
|
450
|
-
const t = r.date;
|
|
451
|
-
t.monthNames !== void 0 && (h.date.monthNames = [...t.monthNames]), t.messages !== void 0 && (t.messages.required !== void 0 && (h.date.messages.required = t.messages.required), t.messages.invalidMonth !== void 0 && (h.date.messages.invalidMonth = t.messages.invalidMonth), t.messages.invalidDay !== void 0 && (h.date.messages.invalidDay = t.messages.invalidDay), t.messages.afterMin !== void 0 && (h.date.messages.afterMin = t.messages.afterMin), t.messages.beforeMax !== void 0 && (h.date.messages.beforeMax = t.messages.beforeMax));
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
function C(r, t) {
|
|
455
|
-
if (typeof r == "string") return h.aliases.get(r) === t;
|
|
456
|
-
for (const s of r) if (s !== void 0 && C(s, t)) return true;
|
|
457
|
-
return false;
|
|
458
|
-
}
|
|
459
|
-
function z(r, t) {
|
|
460
|
-
if (r === t) return;
|
|
461
|
-
const s = r.split(`
|
|
462
|
-
`), e2 = t.split(`
|
|
463
|
-
`), i = Math.max(s.length, e2.length), n = [];
|
|
464
|
-
for (let o = 0; o < i; o++) s[o] !== e2[o] && n.push(o);
|
|
465
|
-
return { lines: n, numLinesBefore: s.length, numLinesAfter: e2.length, numLines: i };
|
|
466
|
-
}
|
|
467
|
-
var Y = globalThis.process.platform.startsWith("win");
|
|
468
|
-
var k = /* @__PURE__ */ Symbol("clack:cancel");
|
|
469
|
-
function q(r) {
|
|
470
|
-
return r === k;
|
|
471
|
-
}
|
|
472
|
-
function w(r, t) {
|
|
473
|
-
const s = r;
|
|
474
|
-
s.isTTY && s.setRawMode(t);
|
|
475
|
-
}
|
|
476
|
-
function R({ input: r = D, output: t = S, overwrite: s = true, hideCursor: e2 = true } = {}) {
|
|
477
|
-
const i = b.createInterface({ input: r, output: t, prompt: "", tabSize: 1 });
|
|
478
|
-
b.emitKeypressEvents(r, i), r instanceof O && r.isTTY && r.setRawMode(true);
|
|
479
|
-
const n = (o, { name: u, sequence: a }) => {
|
|
480
|
-
const l = String(o);
|
|
481
|
-
if (C([l, u, a], "cancel")) {
|
|
482
|
-
e2 && t.write(import_sisteransi.cursor.show), process.exit(0);
|
|
483
|
-
return;
|
|
484
|
-
}
|
|
485
|
-
if (!s) return;
|
|
486
|
-
const f = u === "return" ? 0 : -1, y = u === "return" ? -1 : 0;
|
|
487
|
-
b.moveCursor(t, f, y, () => {
|
|
488
|
-
b.clearLine(t, 1, () => {
|
|
489
|
-
r.once("keypress", n);
|
|
490
|
-
});
|
|
491
|
-
});
|
|
492
|
-
};
|
|
493
|
-
return e2 && t.write(import_sisteransi.cursor.hide), r.once("keypress", n), () => {
|
|
494
|
-
r.off("keypress", n), e2 && t.write(import_sisteransi.cursor.show), r instanceof O && r.isTTY && !Y && r.setRawMode(false), i.terminal = false, i.close();
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
var A = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
|
|
498
|
-
var L = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
|
|
499
|
-
function W(r, t, s, e2 = s, i) {
|
|
500
|
-
const n = A(r ?? S);
|
|
501
|
-
return wrapAnsi(t, n - s.length, { hard: true, trim: false }).split(`
|
|
502
|
-
`).map((o, u) => {
|
|
503
|
-
const a = i ? i(o, u) : o;
|
|
504
|
-
return `${u === 0 ? e2 : s}${a}`;
|
|
505
|
-
}).join(`
|
|
506
|
-
`);
|
|
507
|
-
}
|
|
508
|
-
var p = class {
|
|
509
|
-
input;
|
|
510
|
-
output;
|
|
511
|
-
_abortSignal;
|
|
512
|
-
rl;
|
|
513
|
-
opts;
|
|
514
|
-
_render;
|
|
515
|
-
_track = false;
|
|
516
|
-
_prevFrame = "";
|
|
517
|
-
_subscribers = /* @__PURE__ */ new Map();
|
|
518
|
-
_cursor = 0;
|
|
519
|
-
state = "initial";
|
|
520
|
-
error = "";
|
|
521
|
-
value;
|
|
522
|
-
userInput = "";
|
|
523
|
-
constructor(t, s = true) {
|
|
524
|
-
const { input: e2 = D, output: i = S, render: n, signal: o, ...u } = t;
|
|
525
|
-
this.opts = u, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = s, this._abortSignal = o, this.input = e2, this.output = i;
|
|
526
|
-
}
|
|
527
|
-
unsubscribe() {
|
|
528
|
-
this._subscribers.clear();
|
|
529
|
-
}
|
|
530
|
-
setSubscriber(t, s) {
|
|
531
|
-
const e2 = this._subscribers.get(t) ?? [];
|
|
532
|
-
e2.push(s), this._subscribers.set(t, e2);
|
|
533
|
-
}
|
|
534
|
-
on(t, s) {
|
|
535
|
-
this.setSubscriber(t, { cb: s });
|
|
536
|
-
}
|
|
537
|
-
once(t, s) {
|
|
538
|
-
this.setSubscriber(t, { cb: s, once: true });
|
|
539
|
-
}
|
|
540
|
-
emit(t, ...s) {
|
|
541
|
-
const e2 = this._subscribers.get(t) ?? [], i = [];
|
|
542
|
-
for (const n of e2) n.cb(...s), n.once && i.push(() => e2.splice(e2.indexOf(n), 1));
|
|
543
|
-
for (const n of i) n();
|
|
544
|
-
}
|
|
545
|
-
prompt() {
|
|
546
|
-
return new Promise((t) => {
|
|
547
|
-
if (this._abortSignal) {
|
|
548
|
-
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t(k);
|
|
549
|
-
this._abortSignal.addEventListener("abort", () => {
|
|
550
|
-
this.state = "cancel", this.close();
|
|
551
|
-
}, { once: true });
|
|
552
|
-
}
|
|
553
|
-
this.rl = E.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), w(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
554
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t(this.value);
|
|
555
|
-
}), this.once("cancel", () => {
|
|
556
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t(k);
|
|
557
|
-
});
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
_isActionKey(t, s) {
|
|
561
|
-
return t === " ";
|
|
562
|
-
}
|
|
563
|
-
_shouldSubmit(t, s) {
|
|
564
|
-
return true;
|
|
565
|
-
}
|
|
566
|
-
_setValue(t) {
|
|
567
|
-
this.value = t, this.emit("value", this.value);
|
|
568
|
-
}
|
|
569
|
-
_setUserInput(t, s) {
|
|
570
|
-
this.userInput = t ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
|
|
571
|
-
}
|
|
572
|
-
_clearUserInput() {
|
|
573
|
-
this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
|
|
574
|
-
}
|
|
575
|
-
onKeypress(t, s) {
|
|
576
|
-
if (this._track && s.name !== "return" && (s.name && this._isActionKey(t, s) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), s?.name && (!this._track && h.aliases.has(s.name) && this.emit("cursor", h.aliases.get(s.name)), h.actions.has(s.name) && this.emit("cursor", s.name)), t && (t.toLowerCase() === "y" || t.toLowerCase() === "n") && this.emit("confirm", t.toLowerCase() === "y"), this.emit("key", t?.toLowerCase(), s), s?.name === "return" && this._shouldSubmit(t, s)) {
|
|
577
|
-
if (this.opts.validate) {
|
|
578
|
-
const e2 = this.opts.validate(this.value);
|
|
579
|
-
e2 && (this.error = e2 instanceof Error ? e2.message : e2, this.state = "error", this.rl?.write(this.userInput));
|
|
580
|
-
}
|
|
581
|
-
this.state !== "error" && (this.state = "submit");
|
|
582
|
-
}
|
|
583
|
-
C([t, s?.name, s?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
584
|
-
}
|
|
585
|
-
close() {
|
|
586
|
-
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
587
|
-
`), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
588
|
-
}
|
|
589
|
-
restoreCursor() {
|
|
590
|
-
const t = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
|
|
591
|
-
`).length - 1;
|
|
592
|
-
this.output.write(import_sisteransi.cursor.move(-999, t * -1));
|
|
593
|
-
}
|
|
594
|
-
render() {
|
|
595
|
-
const t = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
|
|
596
|
-
if (t !== this._prevFrame) {
|
|
597
|
-
if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
|
|
598
|
-
else {
|
|
599
|
-
const s = z(this._prevFrame, t), e2 = L(this.output);
|
|
600
|
-
if (this.restoreCursor(), s) {
|
|
601
|
-
const i = Math.max(0, s.numLinesAfter - e2), n = Math.max(0, s.numLinesBefore - e2);
|
|
602
|
-
let o = s.lines.find((u) => u >= i);
|
|
603
|
-
if (o === void 0) {
|
|
604
|
-
this._prevFrame = t;
|
|
605
|
-
return;
|
|
606
|
-
}
|
|
607
|
-
if (s.lines.length === 1) {
|
|
608
|
-
this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
|
|
609
|
-
const u = t.split(`
|
|
610
|
-
`);
|
|
611
|
-
this.output.write(u[o]), this._prevFrame = t, this.output.write(import_sisteransi.cursor.move(0, u.length - o - 1));
|
|
612
|
-
return;
|
|
613
|
-
} else if (s.lines.length > 1) {
|
|
614
|
-
if (i < n) o = i;
|
|
615
|
-
else {
|
|
616
|
-
const a = o - n;
|
|
617
|
-
a > 0 && this.output.write(import_sisteransi.cursor.move(0, a));
|
|
618
|
-
}
|
|
619
|
-
this.output.write(import_sisteransi.erase.down());
|
|
620
|
-
const u = t.split(`
|
|
621
|
-
`).slice(o);
|
|
622
|
-
this.output.write(u.join(`
|
|
623
|
-
`)), this._prevFrame = t;
|
|
624
|
-
return;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
this.output.write(import_sisteransi.erase.down());
|
|
628
|
-
}
|
|
629
|
-
this.output.write(t), this.state === "initial" && (this.state = "active"), this._prevFrame = t;
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
};
|
|
633
|
-
function B(r, t) {
|
|
634
|
-
if (r === void 0 || t.length === 0) return 0;
|
|
635
|
-
const s = t.findIndex((e2) => e2.value === r);
|
|
636
|
-
return s !== -1 ? s : 0;
|
|
637
|
-
}
|
|
638
|
-
function J(r, t) {
|
|
639
|
-
return (t.label ?? String(t.value)).toLowerCase().includes(r.toLowerCase());
|
|
640
|
-
}
|
|
641
|
-
function H(r, t) {
|
|
642
|
-
if (t) return r ? t : t[0];
|
|
643
|
-
}
|
|
644
|
-
var Q = class extends p {
|
|
645
|
-
filteredOptions;
|
|
646
|
-
multiple;
|
|
647
|
-
isNavigating = false;
|
|
648
|
-
selectedValues = [];
|
|
649
|
-
focusedValue;
|
|
650
|
-
#s = 0;
|
|
651
|
-
#r = "";
|
|
652
|
-
#t;
|
|
653
|
-
#n;
|
|
654
|
-
#u;
|
|
655
|
-
get cursor() {
|
|
656
|
-
return this.#s;
|
|
657
|
-
}
|
|
658
|
-
get userInputWithCursor() {
|
|
659
|
-
if (!this.userInput) return v(["inverse", "hidden"], "_");
|
|
660
|
-
if (this._cursor >= this.userInput.length) return `${this.userInput}\u2588`;
|
|
661
|
-
const t = this.userInput.slice(0, this._cursor), [s, ...e2] = this.userInput.slice(this._cursor);
|
|
662
|
-
return `${t}${v("inverse", s)}${e2.join("")}`;
|
|
663
|
-
}
|
|
664
|
-
get options() {
|
|
665
|
-
return typeof this.#n == "function" ? this.#n() : this.#n;
|
|
666
|
-
}
|
|
667
|
-
constructor(t) {
|
|
668
|
-
super(t), this.#n = t.options, this.#u = t.placeholder;
|
|
669
|
-
const s = this.options;
|
|
670
|
-
this.filteredOptions = [...s], this.multiple = t.multiple === true, this.#t = typeof t.options == "function" ? t.filter : t.filter ?? J;
|
|
671
|
-
let e2;
|
|
672
|
-
if (t.initialValue && Array.isArray(t.initialValue) ? this.multiple ? e2 = t.initialValue : e2 = t.initialValue.slice(0, 1) : !this.multiple && this.options.length > 0 && (e2 = [this.options[0].value]), e2) for (const i of e2) {
|
|
673
|
-
const n = s.findIndex((o) => o.value === i);
|
|
674
|
-
n !== -1 && (this.toggleSelected(i), this.#s = n);
|
|
675
|
-
}
|
|
676
|
-
this.focusedValue = this.options[this.#s]?.value, this.on("key", (i, n) => this.#e(i, n)), this.on("userInput", (i) => this.#i(i));
|
|
677
|
-
}
|
|
678
|
-
_isActionKey(t, s) {
|
|
679
|
-
return t === " " || this.multiple && this.isNavigating && s.name === "space" && t !== void 0 && t !== "";
|
|
680
|
-
}
|
|
681
|
-
#e(t, s) {
|
|
682
|
-
const e2 = s.name === "up", i = s.name === "down", n = s.name === "return", o = this.userInput === "" || this.userInput === " ", u = this.#u, a = this.options, l = u !== void 0 && u !== "" && a.some((f) => !f.disabled && (this.#t ? this.#t(u, f) : true));
|
|
683
|
-
if (s.name === "tab" && o && l) {
|
|
684
|
-
this.userInput === " " && this._clearUserInput(), this._setUserInput(u, true), this.isNavigating = false;
|
|
685
|
-
return;
|
|
686
|
-
}
|
|
687
|
-
e2 || i ? (this.#s = d(this.#s, e2 ? -1 : 1, this.filteredOptions), this.focusedValue = this.filteredOptions[this.#s]?.value, this.multiple || (this.selectedValues = [this.focusedValue]), this.isNavigating = true) : n ? this.value = H(this.multiple, this.selectedValues) : this.multiple ? this.focusedValue !== void 0 && (s.name === "tab" || this.isNavigating && s.name === "space") ? this.toggleSelected(this.focusedValue) : this.isNavigating = false : (this.focusedValue && (this.selectedValues = [this.focusedValue]), this.isNavigating = false);
|
|
688
|
-
}
|
|
689
|
-
deselectAll() {
|
|
690
|
-
this.selectedValues = [];
|
|
691
|
-
}
|
|
692
|
-
toggleSelected(t) {
|
|
693
|
-
this.filteredOptions.length !== 0 && (this.multiple ? this.selectedValues.includes(t) ? this.selectedValues = this.selectedValues.filter((s) => s !== t) : this.selectedValues = [...this.selectedValues, t] : this.selectedValues = [t]);
|
|
694
|
-
}
|
|
695
|
-
#i(t) {
|
|
696
|
-
if (t !== this.#r) {
|
|
697
|
-
this.#r = t;
|
|
698
|
-
const s = this.options;
|
|
699
|
-
t && this.#t ? this.filteredOptions = s.filter((n) => this.#t?.(t, n)) : this.filteredOptions = [...s];
|
|
700
|
-
const e2 = B(this.focusedValue, this.filteredOptions);
|
|
701
|
-
this.#s = d(e2, 0, this.filteredOptions);
|
|
702
|
-
const i = this.filteredOptions[this.#s];
|
|
703
|
-
i && !i.disabled ? this.focusedValue = i.value : this.focusedValue = void 0, this.multiple || (this.focusedValue !== void 0 ? this.toggleSelected(this.focusedValue) : this.deselectAll());
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
};
|
|
707
|
-
var X = class extends p {
|
|
708
|
-
get cursor() {
|
|
709
|
-
return this.value ? 0 : 1;
|
|
710
|
-
}
|
|
711
|
-
get _value() {
|
|
712
|
-
return this.cursor === 0;
|
|
713
|
-
}
|
|
714
|
-
constructor(t) {
|
|
715
|
-
super(t, false), this.value = !!t.initialValue, this.on("userInput", () => {
|
|
716
|
-
this.value = this._value;
|
|
717
|
-
}), this.on("confirm", (s) => {
|
|
718
|
-
this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = s, this.state = "submit", this.close();
|
|
719
|
-
}), this.on("cursor", () => {
|
|
720
|
-
this.value = !this.value;
|
|
721
|
-
});
|
|
722
|
-
}
|
|
723
|
-
};
|
|
724
|
-
var Z = { Y: { type: "year", len: 4 }, M: { type: "month", len: 2 }, D: { type: "day", len: 2 } };
|
|
725
|
-
function P(r) {
|
|
726
|
-
return [...r].map((t) => Z[t]);
|
|
727
|
-
}
|
|
728
|
-
function tt(r) {
|
|
729
|
-
const t = new Intl.DateTimeFormat(r, { year: "numeric", month: "2-digit", day: "2-digit" }).formatToParts(new Date(2e3, 0, 15)), s = [];
|
|
730
|
-
let e2 = "/";
|
|
731
|
-
for (const i of t) i.type === "literal" ? e2 = i.value.trim() || i.value : (i.type === "year" || i.type === "month" || i.type === "day") && s.push({ type: i.type, len: i.type === "year" ? 4 : 2 });
|
|
732
|
-
return { segments: s, separator: e2 };
|
|
733
|
-
}
|
|
734
|
-
function U(r) {
|
|
735
|
-
return Number.parseInt((r || "0").replace(/_/g, "0"), 10) || 0;
|
|
736
|
-
}
|
|
737
|
-
function x(r) {
|
|
738
|
-
return { year: U(r.year), month: U(r.month), day: U(r.day) };
|
|
739
|
-
}
|
|
740
|
-
function $(r, t) {
|
|
741
|
-
return new Date(r || 2001, t || 1, 0).getDate();
|
|
742
|
-
}
|
|
743
|
-
function F(r) {
|
|
744
|
-
const { year: t, month: s, day: e2 } = x(r);
|
|
745
|
-
if (!t || t < 0 || t > 9999 || !s || s < 1 || s > 12 || !e2 || e2 < 1) return;
|
|
746
|
-
const i = new Date(Date.UTC(t, s - 1, e2));
|
|
747
|
-
if (!(i.getUTCFullYear() !== t || i.getUTCMonth() !== s - 1 || i.getUTCDate() !== e2)) return { year: t, month: s, day: e2 };
|
|
748
|
-
}
|
|
749
|
-
function N(r) {
|
|
750
|
-
const t = F(r);
|
|
751
|
-
return t ? new Date(Date.UTC(t.year, t.month - 1, t.day)) : void 0;
|
|
752
|
-
}
|
|
753
|
-
function st(r, t, s, e2) {
|
|
754
|
-
const i = s ? { year: s.getUTCFullYear(), month: s.getUTCMonth() + 1, day: s.getUTCDate() } : null, n = e2 ? { year: e2.getUTCFullYear(), month: e2.getUTCMonth() + 1, day: e2.getUTCDate() } : null;
|
|
755
|
-
return r === "year" ? { min: i?.year ?? 1, max: n?.year ?? 9999 } : r === "month" ? { min: i && t.year === i.year ? i.month : 1, max: n && t.year === n.year ? n.month : 12 } : { min: i && t.year === i.year && t.month === i.month ? i.day : 1, max: n && t.year === n.year && t.month === n.month ? n.day : $(t.year, t.month) };
|
|
756
|
-
}
|
|
757
|
-
var et = class extends p {
|
|
758
|
-
#s;
|
|
759
|
-
#r;
|
|
760
|
-
#t;
|
|
761
|
-
#n;
|
|
762
|
-
#u;
|
|
763
|
-
#e = { segmentIndex: 0, positionInSegment: 0 };
|
|
764
|
-
#i = true;
|
|
765
|
-
#o = null;
|
|
766
|
-
inlineError = "";
|
|
767
|
-
get segmentCursor() {
|
|
768
|
-
return { ...this.#e };
|
|
769
|
-
}
|
|
770
|
-
get segmentValues() {
|
|
771
|
-
return { ...this.#t };
|
|
772
|
-
}
|
|
773
|
-
get segments() {
|
|
774
|
-
return this.#s;
|
|
775
|
-
}
|
|
776
|
-
get separator() {
|
|
777
|
-
return this.#r;
|
|
778
|
-
}
|
|
779
|
-
get formattedValue() {
|
|
780
|
-
return this.#c(this.#t);
|
|
781
|
-
}
|
|
782
|
-
#c(t) {
|
|
783
|
-
return this.#s.map((s) => t[s.type]).join(this.#r);
|
|
784
|
-
}
|
|
785
|
-
#a() {
|
|
786
|
-
this._setUserInput(this.#c(this.#t)), this._setValue(N(this.#t) ?? void 0);
|
|
787
|
-
}
|
|
788
|
-
constructor(t) {
|
|
789
|
-
const s = t.format ? { segments: P(t.format), separator: t.separator ?? "/" } : tt(t.locale), e2 = t.separator ?? s.separator, i = t.format ? P(t.format) : s.segments, n = t.initialValue ?? t.defaultValue, o = n ? { year: String(n.getUTCFullYear()).padStart(4, "0"), month: String(n.getUTCMonth() + 1).padStart(2, "0"), day: String(n.getUTCDate()).padStart(2, "0") } : { year: "____", month: "__", day: "__" }, u = i.map((a) => o[a.type]).join(e2);
|
|
790
|
-
super({ ...t, initialUserInput: u }, false), this.#s = i, this.#r = e2, this.#t = o, this.#n = t.minDate, this.#u = t.maxDate, this.#a(), this.on("cursor", (a) => this.#d(a)), this.on("key", (a, l) => this.#f(a, l)), this.on("finalize", () => this.#g(t));
|
|
791
|
-
}
|
|
792
|
-
#h() {
|
|
793
|
-
const t = Math.max(0, Math.min(this.#e.segmentIndex, this.#s.length - 1)), s = this.#s[t];
|
|
794
|
-
if (s) return this.#e.positionInSegment = Math.max(0, Math.min(this.#e.positionInSegment, s.len - 1)), { segment: s, index: t };
|
|
795
|
-
}
|
|
796
|
-
#l(t) {
|
|
797
|
-
this.inlineError = "", this.#o = null;
|
|
798
|
-
const s = this.#h();
|
|
799
|
-
s && (this.#e.segmentIndex = Math.max(0, Math.min(this.#s.length - 1, s.index + t)), this.#e.positionInSegment = 0, this.#i = true);
|
|
800
|
-
}
|
|
801
|
-
#p(t) {
|
|
802
|
-
const s = this.#h();
|
|
803
|
-
if (!s) return;
|
|
804
|
-
const { segment: e2 } = s, i = this.#t[e2.type], n = !i || i.replace(/_/g, "") === "", o = Number.parseInt((i || "0").replace(/_/g, "0"), 10) || 0, u = st(e2.type, x(this.#t), this.#n, this.#u);
|
|
805
|
-
let a;
|
|
806
|
-
n ? a = t === 1 ? u.min : u.max : a = Math.max(Math.min(u.max, o + t), u.min), this.#t = { ...this.#t, [e2.type]: a.toString().padStart(e2.len, "0") }, this.#i = true, this.#o = null, this.#a();
|
|
807
|
-
}
|
|
808
|
-
#d(t) {
|
|
809
|
-
if (t) switch (t) {
|
|
810
|
-
case "right":
|
|
811
|
-
return this.#l(1);
|
|
812
|
-
case "left":
|
|
813
|
-
return this.#l(-1);
|
|
814
|
-
case "up":
|
|
815
|
-
return this.#p(1);
|
|
816
|
-
case "down":
|
|
817
|
-
return this.#p(-1);
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
#f(t, s) {
|
|
821
|
-
if (s?.name === "backspace" || s?.sequence === "\x7F" || s?.sequence === "\b" || t === "\x7F" || t === "\b") {
|
|
822
|
-
this.inlineError = "";
|
|
823
|
-
const e2 = this.#h();
|
|
824
|
-
if (!e2) return;
|
|
825
|
-
if (!this.#t[e2.segment.type].replace(/_/g, "")) {
|
|
826
|
-
this.#l(-1);
|
|
827
|
-
return;
|
|
828
|
-
}
|
|
829
|
-
this.#t[e2.segment.type] = "_".repeat(e2.segment.len), this.#i = true, this.#e.positionInSegment = 0, this.#a();
|
|
830
|
-
return;
|
|
831
|
-
}
|
|
832
|
-
if (s?.name === "tab") {
|
|
833
|
-
this.inlineError = "";
|
|
834
|
-
const e2 = this.#h();
|
|
835
|
-
if (!e2) return;
|
|
836
|
-
const i = s.shift ? -1 : 1, n = e2.index + i;
|
|
837
|
-
n >= 0 && n < this.#s.length && (this.#e.segmentIndex = n, this.#e.positionInSegment = 0, this.#i = true);
|
|
838
|
-
return;
|
|
839
|
-
}
|
|
840
|
-
if (t && /^[0-9]$/.test(t)) {
|
|
841
|
-
const e2 = this.#h();
|
|
842
|
-
if (!e2) return;
|
|
843
|
-
const { segment: i } = e2, n = !this.#t[i.type].replace(/_/g, "");
|
|
844
|
-
if (this.#i && this.#o !== null && !n) {
|
|
845
|
-
const m = this.#o + t, g = { ...this.#t, [i.type]: m }, _ = this.#m(g, i);
|
|
846
|
-
if (_) {
|
|
847
|
-
this.inlineError = _, this.#o = null, this.#i = false;
|
|
848
|
-
return;
|
|
849
|
-
}
|
|
850
|
-
this.inlineError = "", this.#t[i.type] = m, this.#o = null, this.#i = false, this.#a(), e2.index < this.#s.length - 1 && (this.#e.segmentIndex = e2.index + 1, this.#e.positionInSegment = 0, this.#i = true);
|
|
851
|
-
return;
|
|
852
|
-
}
|
|
853
|
-
this.#i && !n && (this.#t[i.type] = "_".repeat(i.len), this.#e.positionInSegment = 0), this.#i = false, this.#o = null;
|
|
854
|
-
const o = this.#t[i.type], u = o.indexOf("_"), a = u >= 0 ? u : Math.min(this.#e.positionInSegment, i.len - 1);
|
|
855
|
-
if (a < 0 || a >= i.len) return;
|
|
856
|
-
let l = o.slice(0, a) + t + o.slice(a + 1), f = false;
|
|
857
|
-
if (a === 0 && o === "__" && (i.type === "month" || i.type === "day")) {
|
|
858
|
-
const m = Number.parseInt(t, 10);
|
|
859
|
-
l = `0${t}`, f = m <= (i.type === "month" ? 1 : 2);
|
|
860
|
-
}
|
|
861
|
-
if (i.type === "year" && (l = (o.replace(/_/g, "") + t).padStart(i.len, "_")), !l.includes("_")) {
|
|
862
|
-
const m = { ...this.#t, [i.type]: l }, g = this.#m(m, i);
|
|
863
|
-
if (g) {
|
|
864
|
-
this.inlineError = g;
|
|
865
|
-
return;
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
this.inlineError = "", this.#t[i.type] = l;
|
|
869
|
-
const y = l.includes("_") ? void 0 : F(this.#t);
|
|
870
|
-
if (y) {
|
|
871
|
-
const { year: m, month: g } = y, _ = $(m, g);
|
|
872
|
-
this.#t = { year: String(Math.max(0, Math.min(9999, m))).padStart(4, "0"), month: String(Math.max(1, Math.min(12, g))).padStart(2, "0"), day: String(Math.max(1, Math.min(_, y.day))).padStart(2, "0") };
|
|
873
|
-
}
|
|
874
|
-
this.#a();
|
|
875
|
-
const T = l.indexOf("_");
|
|
876
|
-
f ? (this.#i = true, this.#o = t) : T >= 0 ? this.#e.positionInSegment = T : u >= 0 && e2.index < this.#s.length - 1 ? (this.#e.segmentIndex = e2.index + 1, this.#e.positionInSegment = 0, this.#i = true) : this.#e.positionInSegment = Math.min(a + 1, i.len - 1);
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
#m(t, s) {
|
|
880
|
-
const { month: e2, day: i } = x(t);
|
|
881
|
-
if (s.type === "month" && (e2 < 0 || e2 > 12)) return h.date.messages.invalidMonth;
|
|
882
|
-
if (s.type === "day" && (i < 0 || i > 31)) return h.date.messages.invalidDay(31, "any month");
|
|
883
|
-
}
|
|
884
|
-
#g(t) {
|
|
885
|
-
const { year: s, month: e2, day: i } = x(this.#t);
|
|
886
|
-
if (s && e2 && i) {
|
|
887
|
-
const n = $(s, e2);
|
|
888
|
-
this.#t = { ...this.#t, day: String(Math.min(i, n)).padStart(2, "0") };
|
|
889
|
-
}
|
|
890
|
-
this.value = N(this.#t) ?? t.defaultValue ?? void 0;
|
|
891
|
-
}
|
|
892
|
-
};
|
|
893
|
-
var it = class extends p {
|
|
894
|
-
options;
|
|
895
|
-
cursor = 0;
|
|
896
|
-
#s;
|
|
897
|
-
getGroupItems(t) {
|
|
898
|
-
return this.options.filter((s) => s.group === t);
|
|
899
|
-
}
|
|
900
|
-
isGroupSelected(t) {
|
|
901
|
-
const s = this.getGroupItems(t), e2 = this.value;
|
|
902
|
-
return e2 === void 0 ? false : s.every((i) => e2.includes(i.value));
|
|
903
|
-
}
|
|
904
|
-
toggleValue() {
|
|
905
|
-
const t = this.options[this.cursor];
|
|
906
|
-
if (this.value === void 0 && (this.value = []), t.group === true) {
|
|
907
|
-
const s = t.value, e2 = this.getGroupItems(s);
|
|
908
|
-
this.isGroupSelected(s) ? this.value = this.value.filter((i) => e2.findIndex((n) => n.value === i) === -1) : this.value = [...this.value, ...e2.map((i) => i.value)], this.value = Array.from(new Set(this.value));
|
|
909
|
-
} else {
|
|
910
|
-
const s = this.value.includes(t.value);
|
|
911
|
-
this.value = s ? this.value.filter((e2) => e2 !== t.value) : [...this.value, t.value];
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
constructor(t) {
|
|
915
|
-
super(t, false);
|
|
916
|
-
const { options: s } = t;
|
|
917
|
-
this.#s = t.selectableGroups !== false, this.options = Object.entries(s).flatMap(([e2, i]) => [{ value: e2, group: true, label: e2 }, ...i.map((n) => ({ ...n, group: e2 }))]), this.value = [...t.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: e2 }) => e2 === t.cursorAt), this.#s ? 0 : 1), this.on("cursor", (e2) => {
|
|
918
|
-
switch (e2) {
|
|
919
|
-
case "left":
|
|
920
|
-
case "up": {
|
|
921
|
-
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
922
|
-
const i = this.options[this.cursor]?.group === true;
|
|
923
|
-
!this.#s && i && (this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1);
|
|
924
|
-
break;
|
|
925
|
-
}
|
|
926
|
-
case "down":
|
|
927
|
-
case "right": {
|
|
928
|
-
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
929
|
-
const i = this.options[this.cursor]?.group === true;
|
|
930
|
-
!this.#s && i && (this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1);
|
|
931
|
-
break;
|
|
932
|
-
}
|
|
933
|
-
case "space":
|
|
934
|
-
this.toggleValue();
|
|
935
|
-
break;
|
|
936
|
-
}
|
|
937
|
-
});
|
|
938
|
-
}
|
|
939
|
-
};
|
|
940
|
-
var rt = class extends p {
|
|
941
|
-
#s = false;
|
|
942
|
-
#r;
|
|
943
|
-
focused = "editor";
|
|
944
|
-
get userInputWithCursor() {
|
|
945
|
-
if (this.state === "submit") return this.userInput;
|
|
946
|
-
const t = this.userInput;
|
|
947
|
-
if (this.cursor >= t.length) return `${t}\u2588`;
|
|
948
|
-
const s = t.slice(0, this.cursor), e2 = t[this.cursor], i = t.slice(this.cursor + 1);
|
|
949
|
-
return e2 === `
|
|
950
|
-
` ? `${s}\u2588
|
|
951
|
-
${i}` : `${s}${v("inverse", e2)}${i}`;
|
|
952
|
-
}
|
|
953
|
-
get cursor() {
|
|
954
|
-
return this._cursor;
|
|
955
|
-
}
|
|
956
|
-
#t(t) {
|
|
957
|
-
if (this.userInput.length === 0) {
|
|
958
|
-
this._setUserInput(t);
|
|
959
|
-
return;
|
|
960
|
-
}
|
|
961
|
-
this._setUserInput(this.userInput.slice(0, this.cursor) + t + this.userInput.slice(this.cursor));
|
|
962
|
-
}
|
|
963
|
-
#n(t) {
|
|
964
|
-
const s = this.value ?? "";
|
|
965
|
-
switch (t) {
|
|
966
|
-
case "up":
|
|
967
|
-
this._cursor = I(this._cursor, 0, -1, s);
|
|
968
|
-
return;
|
|
969
|
-
case "down":
|
|
970
|
-
this._cursor = I(this._cursor, 0, 1, s);
|
|
971
|
-
return;
|
|
972
|
-
case "left":
|
|
973
|
-
this._cursor = I(this._cursor, -1, 0, s);
|
|
974
|
-
return;
|
|
975
|
-
case "right":
|
|
976
|
-
this._cursor = I(this._cursor, 1, 0, s);
|
|
977
|
-
return;
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
_shouldSubmit(t, s) {
|
|
981
|
-
if (this.#r) return this.focused === "submit" ? true : (this.#t(`
|
|
982
|
-
`), this._cursor++, false);
|
|
983
|
-
const e2 = this.#s;
|
|
984
|
-
return this.#s = true, e2 ? (this.userInput[this.cursor - 1] === `
|
|
985
|
-
` && (this._setUserInput(this.userInput.slice(0, this.cursor - 1) + this.userInput.slice(this.cursor)), this._cursor--), true) : (this.#t(`
|
|
986
|
-
`), this._cursor++, false);
|
|
987
|
-
}
|
|
988
|
-
constructor(t) {
|
|
989
|
-
super(t, false), this.#r = t.showSubmit ?? false, this.on("key", (s, e2) => {
|
|
990
|
-
if (e2?.name && h.actions.has(e2.name)) {
|
|
991
|
-
this.#n(e2.name);
|
|
992
|
-
return;
|
|
993
|
-
}
|
|
994
|
-
if (s === " " && this.#r) {
|
|
995
|
-
this.focused = this.focused === "editor" ? "submit" : "editor";
|
|
996
|
-
return;
|
|
997
|
-
}
|
|
998
|
-
if (e2?.name !== "return") {
|
|
999
|
-
if (this.#s = false, e2?.name === "backspace" && this.cursor > 0) {
|
|
1000
|
-
this._setUserInput(this.userInput.slice(0, this.cursor - 1) + this.userInput.slice(this.cursor)), this._cursor--;
|
|
1001
|
-
return;
|
|
1002
|
-
}
|
|
1003
|
-
if (e2?.name === "delete" && this.cursor < this.userInput.length) {
|
|
1004
|
-
this._setUserInput(this.userInput.slice(0, this.cursor) + this.userInput.slice(this.cursor + 1));
|
|
1005
|
-
return;
|
|
1006
|
-
}
|
|
1007
|
-
s && (this.#r && this.focused === "submit" && (this.focused = "editor"), this.#t(s ?? ""), this._cursor++);
|
|
1008
|
-
}
|
|
1009
|
-
}), this.on("userInput", (s) => {
|
|
1010
|
-
this._setValue(s);
|
|
1011
|
-
}), this.on("finalize", () => {
|
|
1012
|
-
this.value || (this.value = t.defaultValue), this.value === void 0 && (this.value = "");
|
|
1013
|
-
});
|
|
1014
|
-
}
|
|
1015
|
-
};
|
|
1016
|
-
var nt = class extends p {
|
|
1017
|
-
options;
|
|
1018
|
-
cursor = 0;
|
|
1019
|
-
get _value() {
|
|
1020
|
-
return this.options[this.cursor].value;
|
|
1021
|
-
}
|
|
1022
|
-
get _enabledOptions() {
|
|
1023
|
-
return this.options.filter((t) => t.disabled !== true);
|
|
1024
|
-
}
|
|
1025
|
-
toggleAll() {
|
|
1026
|
-
const t = this._enabledOptions, s = this.value !== void 0 && this.value.length === t.length;
|
|
1027
|
-
this.value = s ? [] : t.map((e2) => e2.value);
|
|
1028
|
-
}
|
|
1029
|
-
toggleInvert() {
|
|
1030
|
-
const t = this.value;
|
|
1031
|
-
if (!t) return;
|
|
1032
|
-
const s = this._enabledOptions.filter((e2) => !t.includes(e2.value));
|
|
1033
|
-
this.value = s.map((e2) => e2.value);
|
|
1034
|
-
}
|
|
1035
|
-
toggleValue() {
|
|
1036
|
-
this.value === void 0 && (this.value = []);
|
|
1037
|
-
const t = this.value.includes(this._value);
|
|
1038
|
-
this.value = t ? this.value.filter((s) => s !== this._value) : [...this.value, this._value];
|
|
1039
|
-
}
|
|
1040
|
-
constructor(t) {
|
|
1041
|
-
super(t, false), this.options = t.options, this.value = [...t.initialValues ?? []];
|
|
1042
|
-
const s = Math.max(this.options.findIndex(({ value: e2 }) => e2 === t.cursorAt), 0);
|
|
1043
|
-
this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.on("key", (e2) => {
|
|
1044
|
-
e2 === "a" && this.toggleAll(), e2 === "i" && this.toggleInvert();
|
|
1045
|
-
}), this.on("cursor", (e2) => {
|
|
1046
|
-
switch (e2) {
|
|
1047
|
-
case "left":
|
|
1048
|
-
case "up":
|
|
1049
|
-
this.cursor = d(this.cursor, -1, this.options);
|
|
1050
|
-
break;
|
|
1051
|
-
case "down":
|
|
1052
|
-
case "right":
|
|
1053
|
-
this.cursor = d(this.cursor, 1, this.options);
|
|
1054
|
-
break;
|
|
1055
|
-
case "space":
|
|
1056
|
-
this.toggleValue();
|
|
1057
|
-
break;
|
|
1058
|
-
}
|
|
1059
|
-
});
|
|
1060
|
-
}
|
|
1061
|
-
};
|
|
1062
|
-
var ot = class extends p {
|
|
1063
|
-
_mask = "\u2022";
|
|
1064
|
-
get cursor() {
|
|
1065
|
-
return this._cursor;
|
|
1066
|
-
}
|
|
1067
|
-
get masked() {
|
|
1068
|
-
return this.userInput.replaceAll(/./g, this._mask);
|
|
1069
|
-
}
|
|
1070
|
-
get userInputWithCursor() {
|
|
1071
|
-
if (this.state === "submit" || this.state === "cancel") return this.masked;
|
|
1072
|
-
const t = this.userInput;
|
|
1073
|
-
if (this.cursor >= t.length) return `${this.masked}${v(["inverse", "hidden"], "_")}`;
|
|
1074
|
-
const s = this.masked, e2 = s.slice(0, this.cursor), i = s.slice(this.cursor);
|
|
1075
|
-
return `${e2}${v("inverse", i[0])}${i.slice(1)}`;
|
|
1076
|
-
}
|
|
1077
|
-
clear() {
|
|
1078
|
-
this._clearUserInput();
|
|
1079
|
-
}
|
|
1080
|
-
constructor({ mask: t, ...s }) {
|
|
1081
|
-
super(s), this._mask = t ?? "\u2022", this.on("userInput", (e2) => {
|
|
1082
|
-
this._setValue(e2);
|
|
1083
|
-
});
|
|
1084
|
-
}
|
|
1085
|
-
};
|
|
1086
|
-
var ut = class extends p {
|
|
1087
|
-
options;
|
|
1088
|
-
cursor = 0;
|
|
1089
|
-
get _selectedValue() {
|
|
1090
|
-
return this.options[this.cursor];
|
|
1091
|
-
}
|
|
1092
|
-
changeValue() {
|
|
1093
|
-
this.value = this._selectedValue.value;
|
|
1094
|
-
}
|
|
1095
|
-
constructor(t) {
|
|
1096
|
-
super(t, false), this.options = t.options;
|
|
1097
|
-
const s = this.options.findIndex(({ value: i }) => i === t.initialValue), e2 = s === -1 ? 0 : s;
|
|
1098
|
-
this.cursor = this.options[e2].disabled ? d(e2, 1, this.options) : e2, this.changeValue(), this.on("cursor", (i) => {
|
|
1099
|
-
switch (i) {
|
|
1100
|
-
case "left":
|
|
1101
|
-
case "up":
|
|
1102
|
-
this.cursor = d(this.cursor, -1, this.options);
|
|
1103
|
-
break;
|
|
1104
|
-
case "down":
|
|
1105
|
-
case "right":
|
|
1106
|
-
this.cursor = d(this.cursor, 1, this.options);
|
|
1107
|
-
break;
|
|
1108
|
-
}
|
|
1109
|
-
this.changeValue();
|
|
1110
|
-
});
|
|
1111
|
-
}
|
|
1112
|
-
};
|
|
1113
|
-
var at = class extends p {
|
|
1114
|
-
options;
|
|
1115
|
-
cursor = 0;
|
|
1116
|
-
constructor(t) {
|
|
1117
|
-
super(t, false), this.options = t.options;
|
|
1118
|
-
const s = t.caseSensitive === true, e2 = this.options.map(({ value: [i] }) => s ? i : i?.toLowerCase());
|
|
1119
|
-
this.cursor = Math.max(e2.indexOf(t.initialValue), 0), this.on("key", (i, n) => {
|
|
1120
|
-
if (!i) return;
|
|
1121
|
-
const o = s && n.shift ? i.toUpperCase() : i;
|
|
1122
|
-
if (!e2.includes(o)) return;
|
|
1123
|
-
const u = this.options.find(({ value: [a] }) => s ? a === o : a?.toLowerCase() === i);
|
|
1124
|
-
u && (this.value = u.value, this.state = "submit", this.emit("submit"));
|
|
1125
|
-
});
|
|
1126
|
-
}
|
|
1127
|
-
};
|
|
1128
|
-
var ht = class extends p {
|
|
1129
|
-
get userInputWithCursor() {
|
|
1130
|
-
if (this.state === "submit") return this.userInput;
|
|
1131
|
-
const t = this.userInput;
|
|
1132
|
-
if (this.cursor >= t.length) return `${this.userInput}\u2588`;
|
|
1133
|
-
const s = t.slice(0, this.cursor), [e2, ...i] = t.slice(this.cursor);
|
|
1134
|
-
return `${s}${v("inverse", e2)}${i.join("")}`;
|
|
1135
|
-
}
|
|
1136
|
-
get cursor() {
|
|
1137
|
-
return this._cursor;
|
|
1138
|
-
}
|
|
1139
|
-
constructor(t) {
|
|
1140
|
-
super({ ...t, initialUserInput: t.initialUserInput ?? t.initialValue }), this.on("userInput", (s) => {
|
|
1141
|
-
this._setValue(s);
|
|
1142
|
-
}), this.on("finalize", () => {
|
|
1143
|
-
this.value || (this.value = t.defaultValue), this.value === void 0 && (this.value = "");
|
|
1144
|
-
});
|
|
1145
|
-
}
|
|
1146
|
-
};
|
|
1147
|
-
|
|
1148
|
-
// ../../node_modules/.bun/@clack+prompts@1.3.0/node_modules/@clack/prompts/dist/index.mjs
|
|
1149
|
-
import { styleText as e, stripVTControlCharacters as nt2 } from "util";
|
|
1150
|
-
import j2 from "process";
|
|
1151
|
-
var import_sisteransi2 = __toESM(require_src(), 1);
|
|
1152
|
-
import { existsSync as zt, lstatSync as wt, readdirSync as Qt } from "fs";
|
|
1153
|
-
import { dirname as bt, join as Zt } from "path";
|
|
1154
|
-
function te() {
|
|
1155
|
-
return j2.platform !== "win32" ? j2.env.TERM !== "linux" : !!j2.env.CI || !!j2.env.WT_SESSION || !!j2.env.TERMINUS_SUBLIME || j2.env.ConEmuTask === "{cmd::Cmder}" || j2.env.TERM_PROGRAM === "Terminus-Sublime" || j2.env.TERM_PROGRAM === "vscode" || j2.env.TERM === "xterm-256color" || j2.env.TERM === "alacritty" || j2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
1156
|
-
}
|
|
1157
|
-
var tt2 = te();
|
|
1158
|
-
var at2 = () => process.env.CI === "true";
|
|
1159
|
-
var Tt = (t) => t.isTTY === true;
|
|
1160
|
-
var w2 = (t, r) => tt2 ? t : r;
|
|
1161
|
-
var _t = w2("\u25C6", "*");
|
|
1162
|
-
var ot2 = w2("\u25A0", "x");
|
|
1163
|
-
var ut2 = w2("\u25B2", "x");
|
|
1164
|
-
var F2 = w2("\u25C7", "o");
|
|
1165
|
-
var lt = w2("\u250C", "T");
|
|
1166
|
-
var $2 = w2("\u2502", "|");
|
|
1167
|
-
var E2 = w2("\u2514", "\u2014");
|
|
1168
|
-
var It = w2("\u2510", "T");
|
|
1169
|
-
var Et = w2("\u2518", "\u2014");
|
|
1170
|
-
var z2 = w2("\u25CF", ">");
|
|
1171
|
-
var H2 = w2("\u25CB", " ");
|
|
1172
|
-
var et2 = w2("\u25FB", "[\u2022]");
|
|
1173
|
-
var U2 = w2("\u25FC", "[+]");
|
|
1174
|
-
var J2 = w2("\u25FB", "[ ]");
|
|
1175
|
-
var Gt = w2("\u25AA", "\u2022");
|
|
1176
|
-
var st2 = w2("\u2500", "-");
|
|
1177
|
-
var ct = w2("\u256E", "+");
|
|
1178
|
-
var xt = w2("\u251C", "+");
|
|
1179
|
-
var $t = w2("\u256F", "+");
|
|
1180
|
-
var dt = w2("\u2570", "+");
|
|
1181
|
-
var Ot = w2("\u256D", "+");
|
|
1182
|
-
var ht2 = w2("\u25CF", "\u2022");
|
|
1183
|
-
var pt = w2("\u25C6", "*");
|
|
1184
|
-
var mt = w2("\u25B2", "!");
|
|
1185
|
-
var gt = w2("\u25A0", "x");
|
|
1186
|
-
var M = (t) => {
|
|
1187
|
-
switch (t) {
|
|
1188
|
-
case "initial":
|
|
1189
|
-
case "active":
|
|
1190
|
-
return e("cyan", _t);
|
|
1191
|
-
case "cancel":
|
|
1192
|
-
return e("red", ot2);
|
|
1193
|
-
case "error":
|
|
1194
|
-
return e("yellow", ut2);
|
|
1195
|
-
case "submit":
|
|
1196
|
-
return e("green", F2);
|
|
1197
|
-
}
|
|
1198
|
-
};
|
|
1199
|
-
var yt = (t) => {
|
|
1200
|
-
switch (t) {
|
|
1201
|
-
case "initial":
|
|
1202
|
-
case "active":
|
|
1203
|
-
return e("cyan", $2);
|
|
1204
|
-
case "cancel":
|
|
1205
|
-
return e("red", $2);
|
|
1206
|
-
case "error":
|
|
1207
|
-
return e("yellow", $2);
|
|
1208
|
-
case "submit":
|
|
1209
|
-
return e("green", $2);
|
|
1210
|
-
}
|
|
1211
|
-
};
|
|
1212
|
-
var ee = (t, r, s, i, u) => {
|
|
1213
|
-
let n = r, o = 0;
|
|
1214
|
-
for (let c2 = s; c2 < i; c2++) {
|
|
1215
|
-
const a = t[c2];
|
|
1216
|
-
if (n = n - a.length, o++, n <= u) break;
|
|
1217
|
-
}
|
|
1218
|
-
return { lineCount: n, removals: o };
|
|
1219
|
-
};
|
|
1220
|
-
var Y2 = ({ cursor: t, options: r, style: s, output: i = process.stdout, maxItems: u = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
|
|
1221
|
-
const c2 = A(i) - n, a = L(i), l = e("dim", "..."), d2 = Math.max(a - o, 0), y = Math.max(Math.min(u, d2), 5);
|
|
1222
|
-
let p2 = 0;
|
|
1223
|
-
t >= y - 3 && (p2 = Math.max(Math.min(t - y + 3, r.length - y), 0));
|
|
1224
|
-
let m = y < r.length && p2 > 0, g = y < r.length && p2 + y < r.length;
|
|
1225
|
-
const S2 = Math.min(p2 + y, r.length), h2 = [];
|
|
1226
|
-
let f = 0;
|
|
1227
|
-
m && f++, g && f++;
|
|
1228
|
-
const v2 = p2 + (m ? 1 : 0), T = S2 - (g ? 1 : 0);
|
|
1229
|
-
for (let b2 = v2; b2 < T; b2++) {
|
|
1230
|
-
const G2 = wrapAnsi(s(r[b2], b2 === t), c2, { hard: true, trim: false }).split(`
|
|
1231
|
-
`);
|
|
1232
|
-
h2.push(G2), f += G2.length;
|
|
1233
|
-
}
|
|
1234
|
-
if (f > d2) {
|
|
1235
|
-
let b2 = 0, G2 = 0, x2 = f;
|
|
1236
|
-
const A2 = t - v2, P2 = (N2, D2) => ee(h2, x2, N2, D2, d2);
|
|
1237
|
-
m ? ({ lineCount: x2, removals: b2 } = P2(0, A2), x2 > d2 && ({ lineCount: x2, removals: G2 } = P2(A2 + 1, h2.length))) : ({ lineCount: x2, removals: G2 } = P2(A2 + 1, h2.length), x2 > d2 && ({ lineCount: x2, removals: b2 } = P2(0, A2))), b2 > 0 && (m = true, h2.splice(0, b2)), G2 > 0 && (g = true, h2.splice(h2.length - G2, G2));
|
|
1238
|
-
}
|
|
1239
|
-
const C2 = [];
|
|
1240
|
-
m && C2.push(l);
|
|
1241
|
-
for (const b2 of h2) for (const G2 of b2) C2.push(G2);
|
|
1242
|
-
return g && C2.push(l), C2;
|
|
1243
|
-
};
|
|
1244
|
-
function Mt(t) {
|
|
1245
|
-
return t.label ?? String(t.value ?? "");
|
|
1246
|
-
}
|
|
1247
|
-
function Rt(t, r) {
|
|
1248
|
-
if (!t) return true;
|
|
1249
|
-
const s = (r.label ?? String(r.value ?? "")).toLowerCase(), i = (r.hint ?? "").toLowerCase(), u = String(r.value).toLowerCase(), n = t.toLowerCase();
|
|
1250
|
-
return s.includes(n) || i.includes(n) || u.includes(n);
|
|
1251
|
-
}
|
|
1252
|
-
function se(t, r) {
|
|
1253
|
-
const s = [];
|
|
1254
|
-
for (const i of r) t.includes(i.value) && s.push(i);
|
|
1255
|
-
return s;
|
|
1256
|
-
}
|
|
1257
|
-
var At = (t) => new Q({ options: t.options, initialValue: t.initialValue ? [t.initialValue] : void 0, initialUserInput: t.initialUserInput, placeholder: t.placeholder, filter: t.filter ?? ((r, s) => Rt(r, s)), signal: t.signal, input: t.input, output: t.output, validate: t.validate, render() {
|
|
1258
|
-
const r = t.withGuide ?? h.withGuide, s = r ? [`${e("gray", $2)}`, `${M(this.state)} ${t.message}`] : [`${M(this.state)} ${t.message}`], i = this.userInput, u = this.options, n = t.placeholder, o = i === "" && n !== void 0, c2 = (a, l) => {
|
|
1259
|
-
const d2 = Mt(a), y = a.hint && a.value === this.focusedValue ? e("dim", ` (${a.hint})`) : "";
|
|
1260
|
-
switch (l) {
|
|
1261
|
-
case "active":
|
|
1262
|
-
return `${e("green", z2)} ${d2}${y}`;
|
|
1263
|
-
case "inactive":
|
|
1264
|
-
return `${e("dim", H2)} ${e("dim", d2)}`;
|
|
1265
|
-
case "disabled":
|
|
1266
|
-
return `${e("gray", H2)} ${e(["strikethrough", "gray"], d2)}`;
|
|
1267
|
-
}
|
|
1268
|
-
};
|
|
1269
|
-
switch (this.state) {
|
|
1270
|
-
case "submit": {
|
|
1271
|
-
const a = se(this.selectedValues, u), l = a.length > 0 ? ` ${e("dim", a.map(Mt).join(", "))}` : "", d2 = r ? e("gray", $2) : "";
|
|
1272
|
-
return `${s.join(`
|
|
1273
|
-
`)}
|
|
1274
|
-
${d2}${l}`;
|
|
1275
|
-
}
|
|
1276
|
-
case "cancel": {
|
|
1277
|
-
const a = i ? ` ${e(["strikethrough", "dim"], i)}` : "", l = r ? e("gray", $2) : "";
|
|
1278
|
-
return `${s.join(`
|
|
1279
|
-
`)}
|
|
1280
|
-
${l}${a}`;
|
|
1281
|
-
}
|
|
1282
|
-
default: {
|
|
1283
|
-
const a = this.state === "error" ? "yellow" : "cyan", l = r ? `${e(a, $2)} ` : "", d2 = r ? e(a, E2) : "";
|
|
1284
|
-
let y = "";
|
|
1285
|
-
if (this.isNavigating || o) {
|
|
1286
|
-
const v2 = o ? n : i;
|
|
1287
|
-
y = v2 !== "" ? ` ${e("dim", v2)}` : "";
|
|
1288
|
-
} else y = ` ${this.userInputWithCursor}`;
|
|
1289
|
-
const p2 = this.filteredOptions.length !== u.length ? e("dim", ` (${this.filteredOptions.length} match${this.filteredOptions.length === 1 ? "" : "es"})`) : "", m = this.filteredOptions.length === 0 && i ? [`${l}${e("yellow", "No matches found")}`] : [], g = this.state === "error" ? [`${l}${e("yellow", this.error)}`] : [];
|
|
1290
|
-
r && s.push(`${l.trimEnd()}`), s.push(`${l}${e("dim", "Search:")}${y}${p2}`, ...m, ...g);
|
|
1291
|
-
const S2 = [`${e("dim", "\u2191/\u2193")} to select`, `${e("dim", "Enter:")} confirm`, `${e("dim", "Type:")} to search`], h2 = [`${l}${S2.join(" \u2022 ")}`, d2], f = this.filteredOptions.length === 0 ? [] : Y2({ cursor: this.cursor, options: this.filteredOptions, columnPadding: r ? 3 : 0, rowPadding: s.length + h2.length, style: (v2, T) => c2(v2, v2.disabled ? "disabled" : T ? "active" : "inactive"), maxItems: t.maxItems, output: t.output });
|
|
1292
|
-
return [...s, ...f.map((v2) => `${l}${v2}`), ...h2].join(`
|
|
1293
|
-
`);
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
} }).prompt();
|
|
1297
|
-
var ie = (t) => {
|
|
1298
|
-
const r = (i, u, n, o) => {
|
|
1299
|
-
const c2 = n.includes(i.value), a = i.label ?? String(i.value ?? ""), l = i.hint && o !== void 0 && i.value === o ? e("dim", ` (${i.hint})`) : "", d2 = c2 ? e("green", U2) : e("dim", J2);
|
|
1300
|
-
return i.disabled ? `${e("gray", J2)} ${e(["strikethrough", "gray"], a)}` : u ? `${d2} ${a}${l}` : `${d2} ${e("dim", a)}`;
|
|
1301
|
-
}, s = new Q({ options: t.options, multiple: true, placeholder: t.placeholder, filter: t.filter ?? ((i, u) => Rt(i, u)), validate: () => {
|
|
1302
|
-
if (t.required && s.selectedValues.length === 0) return "Please select at least one item";
|
|
1303
|
-
}, initialValue: t.initialValues, signal: t.signal, input: t.input, output: t.output, render() {
|
|
1304
|
-
const i = t.withGuide ?? h.withGuide, u = `${i ? `${e("gray", $2)}
|
|
1305
|
-
` : ""}${M(this.state)} ${t.message}
|
|
1306
|
-
`, n = this.userInput, o = t.placeholder, c2 = n === "" && o !== void 0, a = this.isNavigating || c2 ? e("dim", c2 ? o : n) : this.userInputWithCursor, l = this.options, d2 = this.filteredOptions.length !== l.length ? e("dim", ` (${this.filteredOptions.length} match${this.filteredOptions.length === 1 ? "" : "es"})`) : "";
|
|
1307
|
-
switch (this.state) {
|
|
1308
|
-
case "submit":
|
|
1309
|
-
return `${u}${i ? `${e("gray", $2)} ` : ""}${e("dim", `${this.selectedValues.length} items selected`)}`;
|
|
1310
|
-
case "cancel":
|
|
1311
|
-
return `${u}${i ? `${e("gray", $2)} ` : ""}${e(["strikethrough", "dim"], n)}`;
|
|
1312
|
-
default: {
|
|
1313
|
-
const y = this.state === "error" ? "yellow" : "cyan", p2 = i ? `${e(y, $2)} ` : "", m = i ? e(y, E2) : "", g = [`${e("dim", "\u2191/\u2193")} to navigate`, `${e("dim", this.isNavigating ? "Space/Tab:" : "Tab:")} select`, `${e("dim", "Enter:")} confirm`, `${e("dim", "Type:")} to search`], S2 = this.filteredOptions.length === 0 && n ? [`${p2}${e("yellow", "No matches found")}`] : [], h2 = this.state === "error" ? [`${p2}${e("yellow", this.error)}`] : [], f = [...`${u}${i ? e(y, $2) : ""}`.split(`
|
|
1314
|
-
`), `${p2}${e("dim", "Search:")} ${a}${d2}`, ...S2, ...h2], v2 = [`${p2}${g.join(" \u2022 ")}`, m], T = Y2({ cursor: this.cursor, options: this.filteredOptions, style: (C2, b2) => r(C2, b2, this.selectedValues, this.focusedValue), maxItems: t.maxItems, output: t.output, rowPadding: f.length + v2.length });
|
|
1315
|
-
return [...f, ...T.map((C2) => `${p2}${C2}`), ...v2].join(`
|
|
1316
|
-
`);
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
} });
|
|
1320
|
-
return s.prompt();
|
|
1321
|
-
};
|
|
1322
|
-
var re = [Ot, ct, dt, $t];
|
|
1323
|
-
var ne = [lt, It, E2, Et];
|
|
1324
|
-
function Pt(t, r, s, i) {
|
|
1325
|
-
let u = s, n = s;
|
|
1326
|
-
return i === "center" ? u = Math.floor((r - t) / 2) : i === "right" && (u = r - t - s), n = r - u - t, [u, n];
|
|
1327
|
-
}
|
|
1328
|
-
var ae = (t) => t;
|
|
1329
|
-
var oe = (t = "", r = "", s) => {
|
|
1330
|
-
const i = s?.output ?? process.stdout, u = A(i), n = 2, o = s?.titlePadding ?? 1, c2 = s?.contentPadding ?? 2, a = s?.width === void 0 || s.width === "auto" ? 1 : Math.min(1, s.width), l = s?.withGuide ?? h.withGuide ? `${$2} ` : "", d2 = s?.formatBorder ?? ae, y = (s?.rounded ? re : ne).map(d2), p2 = d2(st2), m = d2($2), g = dist_default2(l), S2 = dist_default2(r), h2 = u - g;
|
|
1331
|
-
let f = Math.floor(u * a) - g;
|
|
1332
|
-
if (s?.width === "auto") {
|
|
1333
|
-
const P2 = t.split(`
|
|
1334
|
-
`);
|
|
1335
|
-
let N2 = S2 + o * 2;
|
|
1336
|
-
for (const rt2 of P2) {
|
|
1337
|
-
const W2 = dist_default2(rt2) + c2 * 2;
|
|
1338
|
-
W2 > N2 && (N2 = W2);
|
|
1339
|
-
}
|
|
1340
|
-
const D2 = N2 + n;
|
|
1341
|
-
D2 < f && (f = D2);
|
|
1342
|
-
}
|
|
1343
|
-
f % 2 !== 0 && (f < h2 ? f++ : f--);
|
|
1344
|
-
const v2 = f - n, T = v2 - o * 2, C2 = S2 > T ? `${r.slice(0, T - 3)}...` : r, [b2, G2] = Pt(dist_default2(C2), v2, o, s?.titleAlign), x2 = wrapAnsi(t, v2 - c2 * 2, { hard: true, trim: false });
|
|
1345
|
-
i.write(`${l}${y[0]}${p2.repeat(b2)}${C2}${p2.repeat(G2)}${y[1]}
|
|
1346
|
-
`);
|
|
1347
|
-
const A2 = x2.split(`
|
|
1348
|
-
`);
|
|
1349
|
-
for (const P2 of A2) {
|
|
1350
|
-
const [N2, D2] = Pt(dist_default2(P2), v2, c2, s?.contentAlign);
|
|
1351
|
-
i.write(`${l}${m}${" ".repeat(N2)}${P2}${" ".repeat(D2)}${m}
|
|
1352
|
-
`);
|
|
1353
|
-
}
|
|
1354
|
-
i.write(`${l}${y[2]}${p2.repeat(v2)}${y[3]}
|
|
1355
|
-
`);
|
|
1356
|
-
};
|
|
1357
|
-
var ue = (t) => {
|
|
1358
|
-
const r = t.active ?? "Yes", s = t.inactive ?? "No";
|
|
1359
|
-
return new X({ active: r, inactive: s, signal: t.signal, input: t.input, output: t.output, initialValue: t.initialValue ?? true, render() {
|
|
1360
|
-
const i = t.withGuide ?? h.withGuide, u = `${M(this.state)} `, n = i ? `${e("gray", $2)} ` : "", o = W(t.output, t.message, n, u), c2 = `${i ? `${e("gray", $2)}
|
|
1361
|
-
` : ""}${o}
|
|
1362
|
-
`, a = this.value ? r : s;
|
|
1363
|
-
switch (this.state) {
|
|
1364
|
-
case "submit": {
|
|
1365
|
-
const l = i ? `${e("gray", $2)} ` : "";
|
|
1366
|
-
return `${c2}${l}${e("dim", a)}`;
|
|
1367
|
-
}
|
|
1368
|
-
case "cancel": {
|
|
1369
|
-
const l = i ? `${e("gray", $2)} ` : "";
|
|
1370
|
-
return `${c2}${l}${e(["strikethrough", "dim"], a)}${i ? `
|
|
1371
|
-
${e("gray", $2)}` : ""}`;
|
|
1372
|
-
}
|
|
1373
|
-
default: {
|
|
1374
|
-
const l = i ? `${e("cyan", $2)} ` : "", d2 = i ? e("cyan", E2) : "";
|
|
1375
|
-
return `${c2}${l}${this.value ? `${e("green", z2)} ${r}` : `${e("dim", H2)} ${e("dim", r)}`}${t.vertical ? i ? `
|
|
1376
|
-
${e("cyan", $2)} ` : `
|
|
1377
|
-
` : ` ${e("dim", "/")} `}${this.value ? `${e("dim", H2)} ${e("dim", s)}` : `${e("green", z2)} ${s}`}
|
|
1378
|
-
${d2}
|
|
1379
|
-
`;
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
} }).prompt();
|
|
1383
|
-
};
|
|
1384
|
-
var le = (t) => {
|
|
1385
|
-
const r = t.validate;
|
|
1386
|
-
return new et({ ...t, validate(s) {
|
|
1387
|
-
if (s === void 0) return t.defaultValue !== void 0 ? void 0 : r ? r(s) : h.date.messages.required;
|
|
1388
|
-
const i = (u) => u.toISOString().slice(0, 10);
|
|
1389
|
-
if (t.minDate && i(s) < i(t.minDate)) return h.date.messages.afterMin(t.minDate);
|
|
1390
|
-
if (t.maxDate && i(s) > i(t.maxDate)) return h.date.messages.beforeMax(t.maxDate);
|
|
1391
|
-
if (r) return r(s);
|
|
1392
|
-
}, render() {
|
|
1393
|
-
const s = (t?.withGuide ?? h.withGuide) !== false, i = `${`${s ? `${e("gray", $2)}
|
|
1394
|
-
` : ""}${M(this.state)} `}${t.message}
|
|
1395
|
-
`, u = this.state !== "initial" ? this.state : "active", n = ce(this, u), o = this.value instanceof Date ? this.formattedValue : "";
|
|
1396
|
-
switch (this.state) {
|
|
1397
|
-
case "error": {
|
|
1398
|
-
const c2 = this.error ? ` ${e("yellow", this.error)}` : "", a = s ? `${e("yellow", $2)} ` : "", l = s ? e("yellow", E2) : "";
|
|
1399
|
-
return `${i.trim()}
|
|
1400
|
-
${a}${n}
|
|
1401
|
-
${l}${c2}
|
|
1402
|
-
`;
|
|
1403
|
-
}
|
|
1404
|
-
case "submit": {
|
|
1405
|
-
const c2 = o ? ` ${e("dim", o)}` : "", a = s ? e("gray", $2) : "";
|
|
1406
|
-
return `${i}${a}${c2}`;
|
|
1407
|
-
}
|
|
1408
|
-
case "cancel": {
|
|
1409
|
-
const c2 = o ? ` ${e(["strikethrough", "dim"], o)}` : "", a = s ? e("gray", $2) : "";
|
|
1410
|
-
return `${i}${a}${c2}${o.trim() ? `
|
|
1411
|
-
${a}` : ""}`;
|
|
1412
|
-
}
|
|
1413
|
-
default: {
|
|
1414
|
-
const c2 = s ? `${e("cyan", $2)} ` : "", a = s ? e("cyan", E2) : "", l = s ? `${e("cyan", $2)} ` : "", d2 = this.inlineError ? `
|
|
1415
|
-
${l}${e("yellow", this.inlineError)}` : "";
|
|
1416
|
-
return `${i}${c2}${n}${d2}
|
|
1417
|
-
${a}
|
|
1418
|
-
`;
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
} }).prompt();
|
|
1422
|
-
};
|
|
1423
|
-
function ce(t, r) {
|
|
1424
|
-
const s = t.segmentValues, i = t.segmentCursor;
|
|
1425
|
-
if (r === "submit" || r === "cancel") return t.formattedValue;
|
|
1426
|
-
const u = e("gray", t.separator);
|
|
1427
|
-
return t.segments.map((n, o) => {
|
|
1428
|
-
const c2 = o === i.segmentIndex && !["submit", "cancel"].includes(r), a = de[n.type];
|
|
1429
|
-
return $e(s[n.type], { isActive: c2, label: a });
|
|
1430
|
-
}).join(u);
|
|
1431
|
-
}
|
|
1432
|
-
function $e(t, r) {
|
|
1433
|
-
const s = !t || t.replace(/_/g, "") === "";
|
|
1434
|
-
return r.isActive ? e("inverse", s ? r.label : t.replace(/_/g, " ")) : s ? e("dim", r.label) : t.replace(/_/g, e("dim", " "));
|
|
1435
|
-
}
|
|
1436
|
-
var de = { year: "yyyy", month: "mm", day: "dd" };
|
|
1437
|
-
var he = async (t, r) => {
|
|
1438
|
-
const s = {}, i = Object.keys(t);
|
|
1439
|
-
for (const u of i) {
|
|
1440
|
-
const n = t[u], o = await n({ results: s })?.catch((c2) => {
|
|
1441
|
-
throw c2;
|
|
1442
|
-
});
|
|
1443
|
-
if (typeof r?.onCancel == "function" && q(o)) {
|
|
1444
|
-
s[u] = "canceled", r.onCancel({ results: s });
|
|
1445
|
-
continue;
|
|
1446
|
-
}
|
|
1447
|
-
s[u] = o;
|
|
1448
|
-
}
|
|
1449
|
-
return s;
|
|
1450
|
-
};
|
|
1451
|
-
var pe = (t) => {
|
|
1452
|
-
const { selectableGroups: r = true, groupSpacing: s = 0 } = t, i = (n, o, c2 = []) => {
|
|
1453
|
-
const a = n.label ?? String(n.value), l = typeof n.group == "string", d2 = l && (c2[c2.indexOf(n) + 1] ?? { group: true }), y = l && d2 && d2.group === true, p2 = l ? r ? `${y ? E2 : $2} ` : " " : "";
|
|
1454
|
-
let m = "";
|
|
1455
|
-
if (s > 0 && !l) {
|
|
1456
|
-
const S2 = `
|
|
1457
|
-
${e("cyan", $2)}`;
|
|
1458
|
-
m = `${S2.repeat(s - 1)}${S2} `;
|
|
1459
|
-
}
|
|
1460
|
-
if (o === "active") return `${m}${e("dim", p2)}${e("cyan", et2)} ${a}${n.hint ? ` ${e("dim", `(${n.hint})`)}` : ""}`;
|
|
1461
|
-
if (o === "group-active") return `${m}${p2}${e("cyan", et2)} ${e("dim", a)}`;
|
|
1462
|
-
if (o === "group-active-selected") return `${m}${p2}${e("green", U2)} ${e("dim", a)}`;
|
|
1463
|
-
if (o === "selected") {
|
|
1464
|
-
const S2 = l || r ? e("green", U2) : "";
|
|
1465
|
-
return `${m}${e("dim", p2)}${S2} ${e("dim", a)}${n.hint ? ` ${e("dim", `(${n.hint})`)}` : ""}`;
|
|
1466
|
-
}
|
|
1467
|
-
if (o === "cancelled") return `${e(["strikethrough", "dim"], a)}`;
|
|
1468
|
-
if (o === "active-selected") return `${m}${e("dim", p2)}${e("green", U2)} ${a}${n.hint ? ` ${e("dim", `(${n.hint})`)}` : ""}`;
|
|
1469
|
-
if (o === "submitted") return `${e("dim", a)}`;
|
|
1470
|
-
const g = l || r ? e("dim", J2) : "";
|
|
1471
|
-
return `${m}${e("dim", p2)}${g} ${e("dim", a)}`;
|
|
1472
|
-
}, u = t.required ?? true;
|
|
1473
|
-
return new it({ options: t.options, signal: t.signal, input: t.input, output: t.output, initialValues: t.initialValues, required: u, cursorAt: t.cursorAt, selectableGroups: r, validate(n) {
|
|
1474
|
-
if (u && (n === void 0 || n.length === 0)) return `Please select at least one option.
|
|
1475
|
-
${e("reset", e("dim", `Press ${e(["gray", "bgWhite", "inverse"], " space ")} to select, ${e("gray", e(["bgWhite", "inverse"], " enter "))} to submit`))}`;
|
|
1476
|
-
}, render() {
|
|
1477
|
-
const n = t.withGuide ?? h.withGuide, o = `${n ? `${e("gray", $2)}
|
|
1478
|
-
` : ""}${M(this.state)} ${t.message}
|
|
1479
|
-
`, c2 = this.value ?? [];
|
|
1480
|
-
switch (this.state) {
|
|
1481
|
-
case "submit": {
|
|
1482
|
-
const a = this.options.filter(({ value: d2 }) => c2.includes(d2)).map((d2) => i(d2, "submitted")), l = a.length === 0 ? "" : ` ${a.join(e("dim", ", "))}`;
|
|
1483
|
-
return `${o}${n ? e("gray", $2) : ""}${l}`;
|
|
1484
|
-
}
|
|
1485
|
-
case "cancel": {
|
|
1486
|
-
const a = this.options.filter(({ value: l }) => c2.includes(l)).map((l) => i(l, "cancelled")).join(e("dim", ", "));
|
|
1487
|
-
return `${o}${n ? `${e("gray", $2)} ` : ""}${a.trim() ? `${a}${n ? `
|
|
1488
|
-
${e("gray", $2)}` : ""}` : ""}`;
|
|
1489
|
-
}
|
|
1490
|
-
case "error": {
|
|
1491
|
-
const a = this.error.split(`
|
|
1492
|
-
`).map((l, d2) => d2 === 0 ? `${n ? `${e("yellow", E2)} ` : ""}${e("yellow", l)}` : ` ${l}`).join(`
|
|
1493
|
-
`);
|
|
1494
|
-
return `${o}${n ? `${e("yellow", $2)} ` : ""}${this.options.map((l, d2, y) => {
|
|
1495
|
-
const p2 = c2.includes(l.value) || l.group === true && this.isGroupSelected(`${l.value}`), m = d2 === this.cursor;
|
|
1496
|
-
return !m && typeof l.group == "string" && this.options[this.cursor].value === l.group ? i(l, p2 ? "group-active-selected" : "group-active", y) : m && p2 ? i(l, "active-selected", y) : p2 ? i(l, "selected", y) : i(l, m ? "active" : "inactive", y);
|
|
1497
|
-
}).join(`
|
|
1498
|
-
${n ? `${e("yellow", $2)} ` : ""}`)}
|
|
1499
|
-
${a}
|
|
1500
|
-
`;
|
|
1501
|
-
}
|
|
1502
|
-
default: {
|
|
1503
|
-
const a = this.options.map((d2, y, p2) => {
|
|
1504
|
-
const m = c2.includes(d2.value) || d2.group === true && this.isGroupSelected(`${d2.value}`), g = y === this.cursor, S2 = !g && typeof d2.group == "string" && this.options[this.cursor].value === d2.group;
|
|
1505
|
-
let h2 = "";
|
|
1506
|
-
return S2 ? h2 = i(d2, m ? "group-active-selected" : "group-active", p2) : g && m ? h2 = i(d2, "active-selected", p2) : m ? h2 = i(d2, "selected", p2) : h2 = i(d2, g ? "active" : "inactive", p2), `${y !== 0 && !h2.startsWith(`
|
|
1507
|
-
`) ? " " : ""}${h2}`;
|
|
1508
|
-
}).join(`
|
|
1509
|
-
${n ? e("cyan", $2) : ""}`), l = a.startsWith(`
|
|
1510
|
-
`) ? "" : " ";
|
|
1511
|
-
return `${o}${n ? e("cyan", $2) : ""}${l}${a}
|
|
1512
|
-
${n ? e("cyan", E2) : ""}
|
|
1513
|
-
`;
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
|
-
} }).prompt();
|
|
1517
|
-
};
|
|
1518
|
-
var R2 = { message: (t = [], { symbol: r = e("gray", $2), secondarySymbol: s = e("gray", $2), output: i = process.stdout, spacing: u = 1, withGuide: n } = {}) => {
|
|
1519
|
-
const o = [], c2 = n ?? h.withGuide, a = c2 ? s : "", l = c2 ? `${r} ` : "", d2 = c2 ? `${s} ` : "";
|
|
1520
|
-
for (let p2 = 0; p2 < u; p2++) o.push(a);
|
|
1521
|
-
const y = Array.isArray(t) ? t : t.split(`
|
|
1522
|
-
`);
|
|
1523
|
-
if (y.length > 0) {
|
|
1524
|
-
const [p2, ...m] = y;
|
|
1525
|
-
p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? r : "");
|
|
1526
|
-
for (const g of m) g.length > 0 ? o.push(`${d2}${g}`) : o.push(c2 ? s : "");
|
|
1527
|
-
}
|
|
1528
|
-
i.write(`${o.join(`
|
|
1529
|
-
`)}
|
|
1530
|
-
`);
|
|
1531
|
-
}, info: (t, r) => {
|
|
1532
|
-
R2.message(t, { ...r, symbol: e("blue", ht2) });
|
|
1533
|
-
}, success: (t, r) => {
|
|
1534
|
-
R2.message(t, { ...r, symbol: e("green", pt) });
|
|
1535
|
-
}, step: (t, r) => {
|
|
1536
|
-
R2.message(t, { ...r, symbol: e("green", F2) });
|
|
1537
|
-
}, warn: (t, r) => {
|
|
1538
|
-
R2.message(t, { ...r, symbol: e("yellow", mt) });
|
|
1539
|
-
}, warning: (t, r) => {
|
|
1540
|
-
R2.warn(t, r);
|
|
1541
|
-
}, error: (t, r) => {
|
|
1542
|
-
R2.message(t, { ...r, symbol: e("red", gt) });
|
|
1543
|
-
} };
|
|
1544
|
-
var me = (t = "", r) => {
|
|
1545
|
-
const s = r?.output ?? process.stdout, i = r?.withGuide ?? h.withGuide ? `${e("gray", E2)} ` : "";
|
|
1546
|
-
s.write(`${i}${e("red", t)}
|
|
1547
|
-
|
|
1548
|
-
`);
|
|
1549
|
-
};
|
|
1550
|
-
var ge = (t = "", r) => {
|
|
1551
|
-
const s = r?.output ?? process.stdout, i = r?.withGuide ?? h.withGuide ? `${e("gray", lt)} ` : "";
|
|
1552
|
-
s.write(`${i}${t}
|
|
1553
|
-
`);
|
|
1554
|
-
};
|
|
1555
|
-
var ye = (t = "", r) => {
|
|
1556
|
-
const s = r?.output ?? process.stdout, i = r?.withGuide ?? h.withGuide ? `${e("gray", $2)}
|
|
1557
|
-
${e("gray", E2)} ` : "";
|
|
1558
|
-
s.write(`${i}${t}
|
|
1559
|
-
|
|
1560
|
-
`);
|
|
1561
|
-
};
|
|
1562
|
-
var fe = (t) => new rt({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, showSubmit: t.showSubmit, output: t.output, signal: t.signal, input: t.input, render() {
|
|
1563
|
-
const r = t?.withGuide ?? h.withGuide, s = `${`${r ? `${e("gray", $2)}
|
|
1564
|
-
` : ""}${M(this.state)} `}${t.message}
|
|
1565
|
-
`, i = t.placeholder ? e("inverse", t.placeholder[0]) + e("dim", t.placeholder.slice(1)) : e(["inverse", "hidden"], "_"), u = this.userInput ? this.userInputWithCursor : i, n = this.value ?? "", o = t.showSubmit ? `
|
|
1566
|
-
${e(this.focused === "submit" ? "cyan" : "dim", "[ submit ]")}` : "";
|
|
1567
|
-
switch (this.state) {
|
|
1568
|
-
case "error": {
|
|
1569
|
-
const c2 = `${e("yellow", $2)} `, a = r ? W(t.output, u, c2, void 0) : u, l = e("yellow", E2);
|
|
1570
|
-
return `${s}${a}
|
|
1571
|
-
${l} ${e("yellow", this.error)}${o}
|
|
1572
|
-
`;
|
|
1573
|
-
}
|
|
1574
|
-
case "submit": {
|
|
1575
|
-
const c2 = `${e("gray", $2)} `, a = r ? W(t.output, n, c2, void 0, (l) => e("dim", l)) : n ? e("dim", n) : "";
|
|
1576
|
-
return `${s}${a}`;
|
|
1577
|
-
}
|
|
1578
|
-
case "cancel": {
|
|
1579
|
-
const c2 = `${e("gray", $2)} `, a = r ? W(t.output, n, c2, void 0, (l) => e(["strikethrough", "dim"], l)) : n ? e(["strikethrough", "dim"], n) : "";
|
|
1580
|
-
return `${s}${a}`;
|
|
1581
|
-
}
|
|
1582
|
-
default: {
|
|
1583
|
-
const c2 = r ? `${e("cyan", $2)} ` : "", a = r ? e("cyan", E2) : "", l = r ? W(t.output, u, c2) : u;
|
|
1584
|
-
return `${s}${l}
|
|
1585
|
-
${a}${o}
|
|
1586
|
-
`;
|
|
1587
|
-
}
|
|
1588
|
-
}
|
|
1589
|
-
} }).prompt();
|
|
1590
|
-
var Q2 = (t, r) => t.split(`
|
|
1591
|
-
`).map((s) => r(s)).join(`
|
|
1592
|
-
`);
|
|
1593
|
-
var ve = (t) => {
|
|
1594
|
-
const r = (i, u) => {
|
|
1595
|
-
const n = i.label ?? String(i.value);
|
|
1596
|
-
return u === "disabled" ? `${e("gray", J2)} ${Q2(n, (o) => e(["strikethrough", "gray"], o))}${i.hint ? ` ${e("dim", `(${i.hint ?? "disabled"})`)}` : ""}` : u === "active" ? `${e("cyan", et2)} ${n}${i.hint ? ` ${e("dim", `(${i.hint})`)}` : ""}` : u === "selected" ? `${e("green", U2)} ${Q2(n, (o) => e("dim", o))}${i.hint ? ` ${e("dim", `(${i.hint})`)}` : ""}` : u === "cancelled" ? `${Q2(n, (o) => e(["strikethrough", "dim"], o))}` : u === "active-selected" ? `${e("green", U2)} ${n}${i.hint ? ` ${e("dim", `(${i.hint})`)}` : ""}` : u === "submitted" ? `${Q2(n, (o) => e("dim", o))}` : `${e("dim", J2)} ${Q2(n, (o) => e("dim", o))}`;
|
|
1597
|
-
}, s = t.required ?? true;
|
|
1598
|
-
return new nt({ options: t.options, signal: t.signal, input: t.input, output: t.output, initialValues: t.initialValues, required: s, cursorAt: t.cursorAt, validate(i) {
|
|
1599
|
-
if (s && (i === void 0 || i.length === 0)) return `Please select at least one option.
|
|
1600
|
-
${e("reset", e("dim", `Press ${e(["gray", "bgWhite", "inverse"], " space ")} to select, ${e("gray", e("bgWhite", e("inverse", " enter ")))} to submit`))}`;
|
|
1601
|
-
}, render() {
|
|
1602
|
-
const i = t.withGuide ?? h.withGuide, u = W(t.output, t.message, i ? `${yt(this.state)} ` : "", `${M(this.state)} `), n = `${i ? `${e("gray", $2)}
|
|
1603
|
-
` : ""}${u}
|
|
1604
|
-
`, o = this.value ?? [], c2 = (a, l) => {
|
|
1605
|
-
if (a.disabled) return r(a, "disabled");
|
|
1606
|
-
const d2 = o.includes(a.value);
|
|
1607
|
-
return l && d2 ? r(a, "active-selected") : d2 ? r(a, "selected") : r(a, l ? "active" : "inactive");
|
|
1608
|
-
};
|
|
1609
|
-
switch (this.state) {
|
|
1610
|
-
case "submit": {
|
|
1611
|
-
const a = this.options.filter(({ value: d2 }) => o.includes(d2)).map((d2) => r(d2, "submitted")).join(e("dim", ", ")) || e("dim", "none"), l = W(t.output, a, i ? `${e("gray", $2)} ` : "");
|
|
1612
|
-
return `${n}${l}`;
|
|
1613
|
-
}
|
|
1614
|
-
case "cancel": {
|
|
1615
|
-
const a = this.options.filter(({ value: d2 }) => o.includes(d2)).map((d2) => r(d2, "cancelled")).join(e("dim", ", "));
|
|
1616
|
-
if (a.trim() === "") return `${n}${e("gray", $2)}`;
|
|
1617
|
-
const l = W(t.output, a, i ? `${e("gray", $2)} ` : "");
|
|
1618
|
-
return `${n}${l}${i ? `
|
|
1619
|
-
${e("gray", $2)}` : ""}`;
|
|
1620
|
-
}
|
|
1621
|
-
case "error": {
|
|
1622
|
-
const a = i ? `${e("yellow", $2)} ` : "", l = this.error.split(`
|
|
1623
|
-
`).map((p2, m) => m === 0 ? `${i ? `${e("yellow", E2)} ` : ""}${e("yellow", p2)}` : ` ${p2}`).join(`
|
|
1624
|
-
`), d2 = n.split(`
|
|
1625
|
-
`).length, y = l.split(`
|
|
1626
|
-
`).length + 1;
|
|
1627
|
-
return `${n}${a}${Y2({ output: t.output, options: this.options, cursor: this.cursor, maxItems: t.maxItems, columnPadding: a.length, rowPadding: d2 + y, style: c2 }).join(`
|
|
1628
|
-
${a}`)}
|
|
1629
|
-
${l}
|
|
1630
|
-
`;
|
|
1631
|
-
}
|
|
1632
|
-
default: {
|
|
1633
|
-
const a = i ? `${e("cyan", $2)} ` : "", l = n.split(`
|
|
1634
|
-
`).length, d2 = i ? 2 : 1;
|
|
1635
|
-
return `${n}${a}${Y2({ output: t.output, options: this.options, cursor: this.cursor, maxItems: t.maxItems, columnPadding: a.length, rowPadding: l + d2, style: c2 }).join(`
|
|
1636
|
-
${a}`)}
|
|
1637
|
-
${i ? e("cyan", E2) : ""}
|
|
1638
|
-
`;
|
|
1639
|
-
}
|
|
1640
|
-
}
|
|
1641
|
-
} }).prompt();
|
|
1642
|
-
};
|
|
1643
|
-
var we = (t) => e("dim", t);
|
|
1644
|
-
var be = (t, r, s) => {
|
|
1645
|
-
const i = { hard: true, trim: false }, u = wrapAnsi(t, r, i).split(`
|
|
1646
|
-
`), n = u.reduce((a, l) => Math.max(dist_default2(l), a), 0), o = u.map(s).reduce((a, l) => Math.max(dist_default2(l), a), 0), c2 = r - (o - n);
|
|
1647
|
-
return wrapAnsi(t, c2, i);
|
|
1648
|
-
};
|
|
1649
|
-
var Se = (t = "", r = "", s) => {
|
|
1650
|
-
const i = s?.output ?? j2.stdout, u = s?.withGuide ?? h.withGuide, n = s?.format ?? we, o = ["", ...be(t, A(i) - 6, n).split(`
|
|
1651
|
-
`).map(n), ""], c2 = dist_default2(r), a = Math.max(o.reduce((p2, m) => {
|
|
1652
|
-
const g = dist_default2(m);
|
|
1653
|
-
return g > p2 ? g : p2;
|
|
1654
|
-
}, 0), c2) + 2, l = o.map((p2) => `${e("gray", $2)} ${p2}${" ".repeat(a - dist_default2(p2))}${e("gray", $2)}`).join(`
|
|
1655
|
-
`), d2 = u ? `${e("gray", $2)}
|
|
1656
|
-
` : "", y = u ? xt : dt;
|
|
1657
|
-
i.write(`${d2}${e("green", F2)} ${e("reset", r)} ${e("gray", st2.repeat(Math.max(a - c2 - 1, 1)) + ct)}
|
|
1658
|
-
${l}
|
|
1659
|
-
${e("gray", y + st2.repeat(a + 2) + $t)}
|
|
1660
|
-
`);
|
|
1661
|
-
};
|
|
1662
|
-
var Ce = (t) => new ot({ validate: t.validate, mask: t.mask ?? Gt, signal: t.signal, input: t.input, output: t.output, render() {
|
|
1663
|
-
const r = t.withGuide ?? h.withGuide, s = `${r ? `${e("gray", $2)}
|
|
1664
|
-
` : ""}${M(this.state)} ${t.message}
|
|
1665
|
-
`, i = this.userInputWithCursor, u = this.masked;
|
|
1666
|
-
switch (this.state) {
|
|
1667
|
-
case "error": {
|
|
1668
|
-
const n = r ? `${e("yellow", $2)} ` : "", o = r ? `${e("yellow", E2)} ` : "", c2 = u ?? "";
|
|
1669
|
-
return t.clearOnError && this.clear(), `${s.trim()}
|
|
1670
|
-
${n}${c2}
|
|
1671
|
-
${o}${e("yellow", this.error)}
|
|
1672
|
-
`;
|
|
1673
|
-
}
|
|
1674
|
-
case "submit": {
|
|
1675
|
-
const n = r ? `${e("gray", $2)} ` : "", o = u ? e("dim", u) : "";
|
|
1676
|
-
return `${s}${n}${o}`;
|
|
1677
|
-
}
|
|
1678
|
-
case "cancel": {
|
|
1679
|
-
const n = r ? `${e("gray", $2)} ` : "", o = u ? e(["strikethrough", "dim"], u) : "";
|
|
1680
|
-
return `${s}${n}${o}${u && r ? `
|
|
1681
|
-
${e("gray", $2)}` : ""}`;
|
|
1682
|
-
}
|
|
1683
|
-
default: {
|
|
1684
|
-
const n = r ? `${e("cyan", $2)} ` : "", o = r ? e("cyan", E2) : "";
|
|
1685
|
-
return `${s}${n}${i}
|
|
1686
|
-
${o}
|
|
1687
|
-
`;
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1690
|
-
} }).prompt();
|
|
1691
|
-
var Te = (t) => {
|
|
1692
|
-
const r = t.validate;
|
|
1693
|
-
return At({ ...t, initialUserInput: t.initialValue ?? t.root ?? process.cwd(), maxItems: 5, validate(s) {
|
|
1694
|
-
if (!Array.isArray(s)) {
|
|
1695
|
-
if (!s) return "Please select a path";
|
|
1696
|
-
if (r) return r(s);
|
|
1697
|
-
}
|
|
1698
|
-
}, options() {
|
|
1699
|
-
const s = this.userInput;
|
|
1700
|
-
if (s === "") return [];
|
|
1701
|
-
try {
|
|
1702
|
-
let i;
|
|
1703
|
-
zt(s) ? wt(s).isDirectory() && (!t.directory || s.endsWith("/")) ? i = s : i = bt(s) : i = bt(s);
|
|
1704
|
-
const u = s.length > 1 && s.endsWith("/") ? s.slice(0, -1) : s;
|
|
1705
|
-
return Qt(i).map((n) => {
|
|
1706
|
-
const o = Zt(i, n), c2 = wt(o);
|
|
1707
|
-
return { name: n, path: o, isDirectory: c2.isDirectory() };
|
|
1708
|
-
}).filter(({ path: n, isDirectory: o }) => n.startsWith(u) && (o || !t.directory)).map((n) => ({ value: n.path }));
|
|
1709
|
-
} catch {
|
|
1710
|
-
return [];
|
|
1711
|
-
}
|
|
1712
|
-
} });
|
|
1713
|
-
};
|
|
1714
|
-
var _e = (t) => e("magenta", t);
|
|
1715
|
-
var ft = ({ indicator: t = "dots", onCancel: r, output: s = process.stdout, cancelMessage: i, errorMessage: u, frames: n = tt2 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: o = tt2 ? 80 : 120, signal: c2, ...a } = {}) => {
|
|
1716
|
-
const l = at2();
|
|
1717
|
-
let d2, y, p2 = false, m = false, g = "", S2, h2 = performance.now();
|
|
1718
|
-
const f = A(s), v2 = a?.styleFrame ?? _e, T = (I2) => {
|
|
1719
|
-
const V2 = I2 > 1 ? u ?? h.messages.error : i ?? h.messages.cancel;
|
|
1720
|
-
m = I2 === 1, p2 && (W2(V2, I2), m && typeof r == "function" && r());
|
|
1721
|
-
}, C2 = () => T(2), b2 = () => T(1), G2 = () => {
|
|
1722
|
-
process.on("uncaughtExceptionMonitor", C2), process.on("unhandledRejection", C2), process.on("SIGINT", b2), process.on("SIGTERM", b2), process.on("exit", T), c2 && c2.addEventListener("abort", b2);
|
|
1723
|
-
}, x2 = () => {
|
|
1724
|
-
process.removeListener("uncaughtExceptionMonitor", C2), process.removeListener("unhandledRejection", C2), process.removeListener("SIGINT", b2), process.removeListener("SIGTERM", b2), process.removeListener("exit", T), c2 && c2.removeEventListener("abort", b2);
|
|
1725
|
-
}, A2 = () => {
|
|
1726
|
-
if (S2 === void 0) return;
|
|
1727
|
-
l && s.write(`
|
|
1728
|
-
`);
|
|
1729
|
-
const I2 = wrapAnsi(S2, f, { hard: true, trim: false }).split(`
|
|
1730
|
-
`);
|
|
1731
|
-
I2.length > 1 && s.write(import_sisteransi2.cursor.up(I2.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
|
|
1732
|
-
}, P2 = (I2) => I2.replace(/\.+$/, ""), N2 = (I2) => {
|
|
1733
|
-
const V2 = (performance.now() - I2) / 1e3, B2 = Math.floor(V2 / 60), L2 = Math.floor(V2 % 60);
|
|
1734
|
-
return B2 > 0 ? `[${B2}m ${L2}s]` : `[${L2}s]`;
|
|
1735
|
-
}, D2 = a.withGuide ?? h.withGuide, rt2 = (I2 = "") => {
|
|
1736
|
-
p2 = true, d2 = R({ output: s }), g = P2(I2), h2 = performance.now(), D2 && s.write(`${e("gray", $2)}
|
|
1737
|
-
`);
|
|
1738
|
-
let V2 = 0, B2 = 0;
|
|
1739
|
-
G2(), y = setInterval(() => {
|
|
1740
|
-
if (l && g === S2) return;
|
|
1741
|
-
A2(), S2 = g;
|
|
1742
|
-
const L2 = v2(n[V2]);
|
|
1743
|
-
let Z2;
|
|
1744
|
-
if (l) Z2 = `${L2} ${g}...`;
|
|
1745
|
-
else if (t === "timer") Z2 = `${L2} ${g} ${N2(h2)}`;
|
|
1746
|
-
else {
|
|
1747
|
-
const kt = ".".repeat(Math.floor(B2)).slice(0, 3);
|
|
1748
|
-
Z2 = `${L2} ${g}${kt}`;
|
|
1749
|
-
}
|
|
1750
|
-
const Nt = wrapAnsi(Z2, f, { hard: true, trim: false });
|
|
1751
|
-
s.write(Nt), V2 = V2 + 1 < n.length ? V2 + 1 : 0, B2 = B2 < 4 ? B2 + 0.125 : 0;
|
|
1752
|
-
}, o);
|
|
1753
|
-
}, W2 = (I2 = "", V2 = 0, B2 = false) => {
|
|
1754
|
-
if (!p2) return;
|
|
1755
|
-
p2 = false, clearInterval(y), A2();
|
|
1756
|
-
const L2 = V2 === 0 ? e("green", F2) : V2 === 1 ? e("red", ot2) : e("red", ut2);
|
|
1757
|
-
g = I2 ?? g, B2 || (t === "timer" ? s.write(`${L2} ${g} ${N2(h2)}
|
|
1758
|
-
`) : s.write(`${L2} ${g}
|
|
1759
|
-
`)), x2(), d2();
|
|
1760
|
-
};
|
|
1761
|
-
return { start: rt2, stop: (I2 = "") => W2(I2, 0), message: (I2 = "") => {
|
|
1762
|
-
g = P2(I2 ?? g);
|
|
1763
|
-
}, cancel: (I2 = "") => W2(I2, 1), error: (I2 = "") => W2(I2, 2), clear: () => W2("", 0, true), get isCancelled() {
|
|
1764
|
-
return m;
|
|
1765
|
-
} };
|
|
1766
|
-
};
|
|
1767
|
-
var Vt = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
|
|
1768
|
-
function Ie({ style: t = "heavy", max: r = 100, size: s = 40, ...i } = {}) {
|
|
1769
|
-
const u = ft(i);
|
|
1770
|
-
let n = 0, o = "";
|
|
1771
|
-
const c2 = Math.max(1, r), a = Math.max(1, s), l = (m) => {
|
|
1772
|
-
switch (m) {
|
|
1773
|
-
case "initial":
|
|
1774
|
-
case "active":
|
|
1775
|
-
return (g) => e("magenta", g);
|
|
1776
|
-
case "error":
|
|
1777
|
-
case "cancel":
|
|
1778
|
-
return (g) => e("red", g);
|
|
1779
|
-
case "submit":
|
|
1780
|
-
return (g) => e("green", g);
|
|
1781
|
-
default:
|
|
1782
|
-
return (g) => e("magenta", g);
|
|
1783
|
-
}
|
|
1784
|
-
}, d2 = (m, g) => {
|
|
1785
|
-
const S2 = Math.floor(n / c2 * a);
|
|
1786
|
-
return `${l(m)(Vt[t].repeat(S2))}${e("dim", Vt[t].repeat(a - S2))} ${g}`;
|
|
1787
|
-
}, y = (m = "") => {
|
|
1788
|
-
o = m, u.start(d2("initial", m));
|
|
1789
|
-
}, p2 = (m = 1, g) => {
|
|
1790
|
-
n = Math.min(c2, m + n), u.message(d2("active", g ?? o)), o = g ?? o;
|
|
1791
|
-
};
|
|
1792
|
-
return { start: y, stop: u.stop, cancel: u.cancel, error: u.error, clear: u.clear, advance: p2, isCancelled: u.isCancelled, message: (m) => p2(0, m) };
|
|
1793
|
-
}
|
|
1794
|
-
var it2 = (t, r) => t.includes(`
|
|
1795
|
-
`) ? t.split(`
|
|
1796
|
-
`).map((s) => r(s)).join(`
|
|
1797
|
-
`) : r(t);
|
|
1798
|
-
var Ee = (t) => {
|
|
1799
|
-
const r = (s, i) => {
|
|
1800
|
-
const u = s.label ?? String(s.value);
|
|
1801
|
-
switch (i) {
|
|
1802
|
-
case "disabled":
|
|
1803
|
-
return `${e("gray", H2)} ${it2(u, (n) => e("gray", n))}${s.hint ? ` ${e("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
|
|
1804
|
-
case "selected":
|
|
1805
|
-
return `${it2(u, (n) => e("dim", n))}`;
|
|
1806
|
-
case "active":
|
|
1807
|
-
return `${e("green", z2)} ${u}${s.hint ? ` ${e("dim", `(${s.hint})`)}` : ""}`;
|
|
1808
|
-
case "cancelled":
|
|
1809
|
-
return `${it2(u, (n) => e(["strikethrough", "dim"], n))}`;
|
|
1810
|
-
default:
|
|
1811
|
-
return `${e("dim", H2)} ${it2(u, (n) => e("dim", n))}`;
|
|
1812
|
-
}
|
|
1813
|
-
};
|
|
1814
|
-
return new ut({ options: t.options, signal: t.signal, input: t.input, output: t.output, initialValue: t.initialValue, render() {
|
|
1815
|
-
const s = t.withGuide ?? h.withGuide, i = `${M(this.state)} `, u = `${yt(this.state)} `, n = W(t.output, t.message, u, i), o = `${s ? `${e("gray", $2)}
|
|
1816
|
-
` : ""}${n}
|
|
1817
|
-
`;
|
|
1818
|
-
switch (this.state) {
|
|
1819
|
-
case "submit": {
|
|
1820
|
-
const c2 = s ? `${e("gray", $2)} ` : "", a = W(t.output, r(this.options[this.cursor], "selected"), c2);
|
|
1821
|
-
return `${o}${a}`;
|
|
1822
|
-
}
|
|
1823
|
-
case "cancel": {
|
|
1824
|
-
const c2 = s ? `${e("gray", $2)} ` : "", a = W(t.output, r(this.options[this.cursor], "cancelled"), c2);
|
|
1825
|
-
return `${o}${a}${s ? `
|
|
1826
|
-
${e("gray", $2)}` : ""}`;
|
|
1827
|
-
}
|
|
1828
|
-
default: {
|
|
1829
|
-
const c2 = s ? `${e("cyan", $2)} ` : "", a = s ? e("cyan", E2) : "", l = o.split(`
|
|
1830
|
-
`).length, d2 = s ? 2 : 1;
|
|
1831
|
-
return `${o}${c2}${Y2({ output: t.output, cursor: this.cursor, options: this.options, maxItems: t.maxItems, columnPadding: c2.length, rowPadding: l + d2, style: (y, p2) => r(y, y.disabled ? "disabled" : p2 ? "active" : "inactive") }).join(`
|
|
1832
|
-
${c2}`)}
|
|
1833
|
-
${a}
|
|
1834
|
-
`;
|
|
1835
|
-
}
|
|
1836
|
-
}
|
|
1837
|
-
} }).prompt();
|
|
1838
|
-
};
|
|
1839
|
-
var Ge = (t) => {
|
|
1840
|
-
const r = (s, i = "inactive") => {
|
|
1841
|
-
const u = s.label ?? String(s.value);
|
|
1842
|
-
return i === "selected" ? `${e("dim", u)}` : i === "cancelled" ? `${e(["strikethrough", "dim"], u)}` : i === "active" ? `${e(["bgCyan", "gray"], ` ${s.value} `)} ${u}${s.hint ? ` ${e("dim", `(${s.hint})`)}` : ""}` : `${e(["gray", "bgWhite", "inverse"], ` ${s.value} `)} ${u}${s.hint ? ` ${e("dim", `(${s.hint})`)}` : ""}`;
|
|
1843
|
-
};
|
|
1844
|
-
return new at({ options: t.options, signal: t.signal, input: t.input, output: t.output, initialValue: t.initialValue, caseSensitive: t.caseSensitive, render() {
|
|
1845
|
-
const s = t.withGuide ?? h.withGuide, i = `${s ? `${e("gray", $2)}
|
|
1846
|
-
` : ""}${M(this.state)} ${t.message}
|
|
1847
|
-
`;
|
|
1848
|
-
switch (this.state) {
|
|
1849
|
-
case "submit": {
|
|
1850
|
-
const u = s ? `${e("gray", $2)} ` : "", n = this.options.find((c2) => c2.value === this.value) ?? t.options[0], o = W(t.output, r(n, "selected"), u);
|
|
1851
|
-
return `${i}${o}`;
|
|
1852
|
-
}
|
|
1853
|
-
case "cancel": {
|
|
1854
|
-
const u = s ? `${e("gray", $2)} ` : "", n = W(t.output, r(this.options[0], "cancelled"), u);
|
|
1855
|
-
return `${i}${n}${s ? `
|
|
1856
|
-
${e("gray", $2)}` : ""}`;
|
|
1857
|
-
}
|
|
1858
|
-
default: {
|
|
1859
|
-
const u = s ? `${e("cyan", $2)} ` : "", n = s ? e("cyan", E2) : "", o = this.options.map((c2, a) => W(t.output, r(c2, a === this.cursor ? "active" : "inactive"), u)).join(`
|
|
1860
|
-
`);
|
|
1861
|
-
return `${i}${o}
|
|
1862
|
-
${n}
|
|
1863
|
-
`;
|
|
1864
|
-
}
|
|
1865
|
-
}
|
|
1866
|
-
} }).prompt();
|
|
1867
|
-
};
|
|
1868
|
-
var jt = `${e("gray", $2)} `;
|
|
1869
|
-
var K2 = { message: async (t, { symbol: r = e("gray", $2) } = {}) => {
|
|
1870
|
-
process.stdout.write(`${e("gray", $2)}
|
|
1871
|
-
${r} `);
|
|
1872
|
-
let s = 3;
|
|
1873
|
-
for await (let i of t) {
|
|
1874
|
-
i = i.replace(/\n/g, `
|
|
1875
|
-
${jt}`), i.includes(`
|
|
1876
|
-
`) && (s = 3 + nt2(i.slice(i.lastIndexOf(`
|
|
1877
|
-
`))).length);
|
|
1878
|
-
const u = nt2(i).length;
|
|
1879
|
-
s + u < process.stdout.columns ? (s += u, process.stdout.write(i)) : (process.stdout.write(`
|
|
1880
|
-
${jt}${i.trimStart()}`), s = 3 + nt2(i.trimStart()).length);
|
|
1881
|
-
}
|
|
1882
|
-
process.stdout.write(`
|
|
1883
|
-
`);
|
|
1884
|
-
}, info: (t) => K2.message(t, { symbol: e("blue", ht2) }), success: (t) => K2.message(t, { symbol: e("green", pt) }), step: (t) => K2.message(t, { symbol: e("green", F2) }), warn: (t) => K2.message(t, { symbol: e("yellow", mt) }), warning: (t) => K2.warn(t), error: (t) => K2.message(t, { symbol: e("red", gt) }) };
|
|
1885
|
-
var xe = async (t, r) => {
|
|
1886
|
-
for (const s of t) {
|
|
1887
|
-
if (s.enabled === false) continue;
|
|
1888
|
-
const i = ft(r);
|
|
1889
|
-
i.start(s.title);
|
|
1890
|
-
const u = await s.task(i.message);
|
|
1891
|
-
i.stop(u || s.title);
|
|
1892
|
-
}
|
|
1893
|
-
};
|
|
1894
|
-
var Oe = (t) => t.replace(/\x1b\[(?:\d+;)*\d*[ABCDEFGHfJKSTsu]|\x1b\[(s|u)/g, "");
|
|
1895
|
-
var Me = (t) => {
|
|
1896
|
-
const r = t.output ?? process.stdout, s = A(r), i = e("gray", $2), u = t.spacing ?? 1, n = 3, o = t.retainLog === true, c2 = !at2() && Tt(r);
|
|
1897
|
-
r.write(`${i}
|
|
1898
|
-
`), r.write(`${e("green", F2)} ${t.title}
|
|
1899
|
-
`);
|
|
1900
|
-
for (let h2 = 0; h2 < u; h2++) r.write(`${i}
|
|
1901
|
-
`);
|
|
1902
|
-
const a = [{ value: "", full: "" }];
|
|
1903
|
-
let l = false;
|
|
1904
|
-
const d2 = (h2) => {
|
|
1905
|
-
if (a.length === 0) return;
|
|
1906
|
-
let f = 0;
|
|
1907
|
-
h2 && (f += u + 2);
|
|
1908
|
-
for (const v2 of a) {
|
|
1909
|
-
const { value: T, result: C2 } = v2;
|
|
1910
|
-
let b2 = C2?.message ?? T;
|
|
1911
|
-
if (b2.length === 0) continue;
|
|
1912
|
-
C2 === void 0 && v2.header !== void 0 && v2.header !== "" && (b2 += `
|
|
1913
|
-
${v2.header}`);
|
|
1914
|
-
const G2 = b2.split(`
|
|
1915
|
-
`).reduce((x2, A2) => A2 === "" ? x2 + 1 : x2 + Math.ceil((A2.length + n) / s), 0);
|
|
1916
|
-
f += G2;
|
|
1917
|
-
}
|
|
1918
|
-
f > 0 && (f += 1, r.write(import_sisteransi2.erase.lines(f)));
|
|
1919
|
-
}, y = (h2, f, v2) => {
|
|
1920
|
-
const T = v2 ? `${h2.full}
|
|
1921
|
-
${h2.value}` : h2.value;
|
|
1922
|
-
h2.header !== void 0 && h2.header !== "" && R2.message(h2.header.split(`
|
|
1923
|
-
`).map((C2) => e("bold", C2)), { output: r, secondarySymbol: i, symbol: i, spacing: 0 }), R2.message(T.split(`
|
|
1924
|
-
`).map((C2) => e("dim", C2)), { output: r, secondarySymbol: i, symbol: i, spacing: f ?? u });
|
|
1925
|
-
}, p2 = () => {
|
|
1926
|
-
for (const h2 of a) {
|
|
1927
|
-
const { header: f, value: v2, full: T } = h2;
|
|
1928
|
-
(f === void 0 || f.length === 0) && v2.length === 0 || y(h2, void 0, o === true && T.length > 0);
|
|
1929
|
-
}
|
|
1930
|
-
}, m = (h2, f, v2) => {
|
|
1931
|
-
if (d2(false), (v2?.raw !== true || !l) && h2.value !== "" && (h2.value += `
|
|
1932
|
-
`), h2.value += Oe(f), l = v2?.raw === true, t.limit !== void 0) {
|
|
1933
|
-
const T = h2.value.split(`
|
|
1934
|
-
`), C2 = T.length - t.limit;
|
|
1935
|
-
if (C2 > 0) {
|
|
1936
|
-
const b2 = T.splice(0, C2);
|
|
1937
|
-
o && (h2.full += (h2.full === "" ? "" : `
|
|
1938
|
-
`) + b2.join(`
|
|
1939
|
-
`));
|
|
1940
|
-
}
|
|
1941
|
-
h2.value = T.join(`
|
|
1942
|
-
`);
|
|
1943
|
-
}
|
|
1944
|
-
c2 && g();
|
|
1945
|
-
}, g = () => {
|
|
1946
|
-
for (const h2 of a) h2.result ? h2.result.status === "error" ? R2.error(h2.result.message, { output: r, secondarySymbol: i, spacing: 0 }) : R2.success(h2.result.message, { output: r, secondarySymbol: i, spacing: 0 }) : h2.value !== "" && y(h2, 0);
|
|
1947
|
-
}, S2 = (h2, f) => {
|
|
1948
|
-
d2(false), h2.result = f, c2 && g();
|
|
1949
|
-
};
|
|
1950
|
-
return { message(h2, f) {
|
|
1951
|
-
m(a[0], h2, f);
|
|
1952
|
-
}, group(h2) {
|
|
1953
|
-
const f = { header: h2, value: "", full: "" };
|
|
1954
|
-
return a.push(f), { message(v2, T) {
|
|
1955
|
-
m(f, v2, T);
|
|
1956
|
-
}, error(v2) {
|
|
1957
|
-
S2(f, { status: "error", message: v2 });
|
|
1958
|
-
}, success(v2) {
|
|
1959
|
-
S2(f, { status: "success", message: v2 });
|
|
1960
|
-
} };
|
|
1961
|
-
}, error(h2, f) {
|
|
1962
|
-
d2(true), R2.error(h2, { output: r, secondarySymbol: i, spacing: 1 }), f?.showLog !== false && p2(), a.splice(1, a.length - 1), a[0].value = "", a[0].full = "";
|
|
1963
|
-
}, success(h2, f) {
|
|
1964
|
-
d2(true), R2.success(h2, { output: r, secondarySymbol: i, spacing: 1 }), f?.showLog === true && p2(), a.splice(1, a.length - 1), a[0].value = "", a[0].full = "";
|
|
1965
|
-
} };
|
|
1966
|
-
};
|
|
1967
|
-
var Re = (t) => new ht({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, output: t.output, signal: t.signal, input: t.input, render() {
|
|
1968
|
-
const r = t?.withGuide ?? h.withGuide, s = `${`${r ? `${e("gray", $2)}
|
|
1969
|
-
` : ""}${M(this.state)} `}${t.message}
|
|
1970
|
-
`, i = t.placeholder ? e("inverse", t.placeholder[0]) + e("dim", t.placeholder.slice(1)) : e(["inverse", "hidden"], "_"), u = this.userInput ? this.userInputWithCursor : i, n = this.value ?? "";
|
|
1971
|
-
switch (this.state) {
|
|
1972
|
-
case "error": {
|
|
1973
|
-
const o = this.error ? ` ${e("yellow", this.error)}` : "", c2 = r ? `${e("yellow", $2)} ` : "", a = r ? e("yellow", E2) : "";
|
|
1974
|
-
return `${s.trim()}
|
|
1975
|
-
${c2}${u}
|
|
1976
|
-
${a}${o}
|
|
1977
|
-
`;
|
|
1978
|
-
}
|
|
1979
|
-
case "submit": {
|
|
1980
|
-
const o = n ? ` ${e("dim", n)}` : "", c2 = r ? e("gray", $2) : "";
|
|
1981
|
-
return `${s}${c2}${o}`;
|
|
1982
|
-
}
|
|
1983
|
-
case "cancel": {
|
|
1984
|
-
const o = n ? ` ${e(["strikethrough", "dim"], n)}` : "", c2 = r ? e("gray", $2) : "";
|
|
1985
|
-
return `${s}${c2}${o}${n.trim() ? `
|
|
1986
|
-
${c2}` : ""}`;
|
|
1987
|
-
}
|
|
1988
|
-
default: {
|
|
1989
|
-
const o = r ? `${e("cyan", $2)} ` : "", c2 = r ? e("cyan", E2) : "";
|
|
1990
|
-
return `${s}${o}${u}
|
|
1991
|
-
${c2}
|
|
1992
|
-
`;
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
} }).prompt();
|
|
1996
|
-
|
|
1997
|
-
export {
|
|
1998
|
-
h,
|
|
1999
|
-
j,
|
|
2000
|
-
q,
|
|
2001
|
-
tt2 as tt,
|
|
2002
|
-
at2 as at,
|
|
2003
|
-
Tt,
|
|
2004
|
-
w2 as w,
|
|
2005
|
-
_t,
|
|
2006
|
-
ot2 as ot,
|
|
2007
|
-
ut2 as ut,
|
|
2008
|
-
F2 as F,
|
|
2009
|
-
lt,
|
|
2010
|
-
$2 as $,
|
|
2011
|
-
E2 as E,
|
|
2012
|
-
It,
|
|
2013
|
-
Et,
|
|
2014
|
-
z2 as z,
|
|
2015
|
-
H2 as H,
|
|
2016
|
-
et2 as et,
|
|
2017
|
-
U2 as U,
|
|
2018
|
-
J2 as J,
|
|
2019
|
-
Gt,
|
|
2020
|
-
st2 as st,
|
|
2021
|
-
ct,
|
|
2022
|
-
xt,
|
|
2023
|
-
$t,
|
|
2024
|
-
dt,
|
|
2025
|
-
Ot,
|
|
2026
|
-
ht2 as ht,
|
|
2027
|
-
pt,
|
|
2028
|
-
mt,
|
|
2029
|
-
gt,
|
|
2030
|
-
M,
|
|
2031
|
-
yt,
|
|
2032
|
-
Y2 as Y,
|
|
2033
|
-
At,
|
|
2034
|
-
ie,
|
|
2035
|
-
oe,
|
|
2036
|
-
ue,
|
|
2037
|
-
le,
|
|
2038
|
-
he,
|
|
2039
|
-
pe,
|
|
2040
|
-
R2 as R,
|
|
2041
|
-
me,
|
|
2042
|
-
ge,
|
|
2043
|
-
ye,
|
|
2044
|
-
fe,
|
|
2045
|
-
ve,
|
|
2046
|
-
Se,
|
|
2047
|
-
Ce,
|
|
2048
|
-
Te,
|
|
2049
|
-
ft,
|
|
2050
|
-
Ie,
|
|
2051
|
-
Ee,
|
|
2052
|
-
Ge,
|
|
2053
|
-
K2 as K,
|
|
2054
|
-
xe,
|
|
2055
|
-
Me,
|
|
2056
|
-
Re
|
|
2057
|
-
};
|