@claudiolabs/claudio 0.1.14 → 0.1.15
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/chunks/AgentTool-0.1.15-aene6e12.mjs +1 -0
- package/dist/chunks/App-0.1.15-skbrajfh.mjs +1 -0
- package/dist/chunks/ApproveApiKey-0.1.15-zkd425a9.mjs +1 -0
- package/dist/chunks/{AssistantSessionChooser-0.1.14-tf848k8v.mjs → AssistantSessionChooser-0.1.15-3wyrkte5.mjs} +1 -1
- package/dist/chunks/AutoModeOptInDialog-0.1.15-xemnqw1q.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-0.1.15-51n3nd6r.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.15-g407nd3p.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-0.1.15-80g71gdg.mjs +1 -0
- package/dist/chunks/{DiffDialog-0.1.14-wtx2wmbs.mjs → DiffDialog-0.1.15-86m0j64m.mjs} +1 -1
- package/dist/chunks/Doctor-0.1.15-9x07ccn6.mjs +1 -0
- package/dist/chunks/Grove-0.1.15-jdcp80ev.mjs +1 -0
- package/dist/chunks/{ITermBackend-0.1.14-xtdr5bmp.mjs → ITermBackend-0.1.15-ejm7gc8d.mjs} +1 -1
- package/dist/chunks/{InProcessTransport-0.1.14-wdqgcpb4.mjs → InProcessTransport-0.1.15-p32k8qva.mjs} +1 -1
- package/dist/chunks/InvalidConfigDialog-0.1.15-rctrbcsm.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-0.1.15-bjsk3qxm.mjs +1 -0
- package/dist/chunks/MigrationDialog-0.1.15-6x3bjqw1.mjs +1 -0
- package/dist/chunks/{Onboarding-0.1.14-1rddgg2b.mjs → Onboarding-0.1.15-pqx4v1wq.mjs} +1 -1
- package/dist/chunks/ProviderManager-0.1.15-t8sezf1q.mjs +1 -0
- package/dist/chunks/REPL-0.1.15-6e0xrr9y.mjs +1 -0
- package/dist/chunks/{ResumeConversation-0.1.14-79hg5s2w.mjs → ResumeConversation-0.1.15-fm1gvj49.mjs} +1 -1
- package/dist/chunks/{SnapshotUpdateDialog-0.1.14-sbjnsz3c.mjs → SnapshotUpdateDialog-0.1.15-t3evkrvq.mjs} +1 -1
- package/dist/chunks/TeleportProgress-0.1.15-gad6kpfq.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-0.1.15-00rkfxqs.mjs +1 -0
- package/dist/chunks/{TeleportResumeWrapper-0.1.14-8wfa8twy.mjs → TeleportResumeWrapper-0.1.15-bwv0syaw.mjs} +1 -1
- package/dist/chunks/{TmuxBackend-0.1.14-175xkeyy.mjs → TmuxBackend-0.1.15-0d8n5p59.mjs} +1 -1
- package/dist/chunks/ToolSearchTool-0.1.15-1cemq4m9.mjs +1 -0
- package/dist/chunks/{TrustDialog-0.1.14-zvmfmtg5.mjs → TrustDialog-0.1.15-srz2xcqx.mjs} +1 -1
- package/dist/chunks/activeProvider-0.1.15-1fp1bec5.mjs +1 -0
- package/dist/chunks/add-dir-0.1.15-qj517xx8.mjs +1 -0
- package/dist/chunks/agents-0.1.15-vkekdkan.mjs +3 -0
- package/dist/chunks/agents-0.1.15-x18jhwwk.mjs +111 -0
- package/dist/chunks/api-0.1.15-jq17qdd8.mjs +1 -0
- package/dist/chunks/{asciicast-0.1.14-kgp9j4z6.mjs → asciicast-0.1.15-4t4tanfk.mjs} +1 -1
- package/dist/chunks/assistant-0.1.15-9fhfbk14.mjs +1 -0
- package/dist/chunks/auth-0.1.15-ddyv63ax.mjs +1 -0
- package/dist/chunks/{auth-0.1.14-vj6095mm.mjs → auth-0.1.15-x6bxj6d1.mjs} +1 -1
- package/dist/chunks/{autoMode-0.1.14-jxse6h16.mjs → autoMode-0.1.15-p9r45wxy.mjs} +1 -1
- package/dist/chunks/backgroundHousekeeping-0.1.15-sbv1p8kj.mjs +1 -0
- package/dist/chunks/{branch-0.1.14-r5tt7cec.mjs → branch-0.1.15-cqq1x0cj.mjs} +1 -1
- package/dist/chunks/{bridgePointer-0.1.14-2w1wvxgt.mjs → bridgePointer-0.1.15-p6kq1zz7.mjs} +1 -1
- package/dist/chunks/{btw-0.1.14-j1cexrtn.mjs → btw-0.1.15-q693ppfr.mjs} +1 -1
- package/dist/chunks/{buddy-0.1.14-r4nmfbke.mjs → buddy-0.1.15-vcca6k2p.mjs} +1 -1
- package/dist/chunks/{cacache-0.1.14-3vw5qkqs.mjs → cacache-0.1.15-tj6nes3h.mjs} +1 -1
- package/dist/chunks/{cache-probe-0.1.14-zfb6aw4f.mjs → cache-probe-0.1.15-dfdjj53r.mjs} +1 -1
- package/dist/chunks/{cacheStats-0.1.14-15eahew3.mjs → cacheStats-0.1.15-v9v9y02q.mjs} +1 -1
- package/dist/chunks/caches-0.1.15-tynjvd5a.mjs +1 -0
- package/dist/chunks/{claudeDesktop-0.1.14-0df0z4v6.mjs → claudeDesktop-0.1.15-rxtx8hbf.mjs} +1 -1
- package/dist/chunks/claudemd-0.1.15-s942v7vd.mjs +1 -0
- package/dist/chunks/clear-0.1.15-2tqn4fj6.mjs +1 -0
- package/dist/chunks/clearTerminal-0.1.15-qycj6c0p.mjs +1 -0
- package/dist/chunks/{cli-0.1.14-39y8qfj7.mjs → cli-0.1.15-0a38j3t8.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-ktz3cgwa.mjs → cli-0.1.15-0g0abv7y.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-mgcmwvcn.mjs → cli-0.1.15-11sdbfxy.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-r46jh9af.mjs → cli-0.1.15-12azgmva.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-as9nq99n.mjs → cli-0.1.15-1hxkpjgs.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-sn1rf71y.mjs → cli-0.1.15-1kmf57b0.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-eq0gbnpg.mjs → cli-0.1.15-1nkkhw5c.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-heevc19y.mjs → cli-0.1.15-20tvdt2s.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-edjtfw4q.mjs → cli-0.1.15-216kns0c.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-sb7dm65b.mjs → cli-0.1.15-229xqnrp.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-hvfg45y0.mjs → cli-0.1.15-23cavaaa.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-j5sbzwhy.mjs → cli-0.1.15-26hkdean.mjs} +709 -707
- package/dist/chunks/{cli-0.1.14-244fknyr.mjs → cli-0.1.15-2ccapgj1.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-fdpfr31f.mjs → cli-0.1.15-2h647znt.mjs} +1 -1
- package/dist/chunks/cli-0.1.15-2te4sfkh.mjs +2 -0
- package/dist/chunks/{cli-0.1.14-0kzzfe41.mjs → cli-0.1.15-2vwx57re.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-y2wxptpk.mjs → cli-0.1.15-30tz5ck8.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-9gem156t.mjs → cli-0.1.15-36pxgzf6.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-ch9c9c38.mjs → cli-0.1.15-3jz926ax.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-tqexnkmz.mjs → cli-0.1.15-3qwnw3ca.mjs} +1 -1
- package/dist/chunks/cli-0.1.15-3rcdvk7c.mjs +2 -0
- package/dist/chunks/{cli-0.1.14-c4v2kfdn.mjs → cli-0.1.15-3z0tzzs8.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-2f7s5xbd.mjs → cli-0.1.15-4892kydg.mjs} +3 -3
- package/dist/chunks/{cli-0.1.14-ta3w93yb.mjs → cli-0.1.15-4fc5wnse.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-jnfs73kb.mjs → cli-0.1.15-4hnhxg2w.mjs} +1 -1
- package/dist/chunks/cli-0.1.15-4hzd3m6p.mjs +2 -0
- package/dist/chunks/{cli-0.1.14-rtstk94r.mjs → cli-0.1.15-4y7051f2.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-rc5yd94n.mjs → cli-0.1.15-5denzf1p.mjs} +2 -2
- package/dist/chunks/{cli-0.1.14-bgqm4vsk.mjs → cli-0.1.15-5g0zxgxn.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-9kxzs20h.mjs → cli-0.1.15-5qx5p8cd.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-9b8kspnd.mjs → cli-0.1.15-5tz7z79g.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-seq2fm2d.mjs → cli-0.1.15-68f0jtkh.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-k8nwm06m.mjs → cli-0.1.15-69kq5chw.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-9vc52dnj.mjs → cli-0.1.15-6mad0r56.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-jpe9sxch.mjs → cli-0.1.15-6nwbd09n.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-71sp86jb.mjs → cli-0.1.15-6r12ayea.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-wwehdfwx.mjs → cli-0.1.15-6r630k68.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-vp1kn532.mjs → cli-0.1.15-77346q11.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-90zkq8jm.mjs → cli-0.1.15-7myqm617.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-4wdh3k7y.mjs → cli-0.1.15-7rr53z40.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-yxce1bdc.mjs → cli-0.1.15-82r3zgmq.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-qe5zyvfh.mjs → cli-0.1.15-8k69z9kk.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-hxvzvfr2.mjs → cli-0.1.15-8sgewact.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-w6nzk5dc.mjs → cli-0.1.15-8v8bskr0.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-28exj8zm.mjs → cli-0.1.15-90ye3yqx.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-5rp4y3q2.mjs → cli-0.1.15-99wmm9j7.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-c0bv9eha.mjs → cli-0.1.15-9m2znwvb.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-s9m1y93w.mjs → cli-0.1.15-9pe3dbgs.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-w3rwfr1d.mjs → cli-0.1.15-9w140hjt.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-3w7fbjhy.mjs → cli-0.1.15-a10ekh15.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-ntq8w1ss.mjs → cli-0.1.15-a8kgfrkd.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-8fr10t94.mjs → cli-0.1.15-acdm8b28.mjs} +2 -2
- package/dist/chunks/{cli-0.1.14-dqads3y3.mjs → cli-0.1.15-ajg1d1bh.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-d4zkffre.mjs → cli-0.1.15-asts8hm3.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-dt11hwkv.mjs → cli-0.1.15-b1t6c81s.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-kcrsww4s.mjs → cli-0.1.15-b21k5hzy.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-wz5yr49j.mjs → cli-0.1.15-b6gdqjbg.mjs} +1 -1
- package/dist/chunks/cli-0.1.15-b7f6hacc.mjs +2 -0
- package/dist/chunks/{cli-0.1.14-k9jcmxtd.mjs → cli-0.1.15-b7p48xfw.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-zjqt3r89.mjs → cli-0.1.15-be4mz6ka.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-e40hm9sd.mjs → cli-0.1.15-behp1dag.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-kt6sq4nr.mjs → cli-0.1.15-bfd337b0.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-fmmxw3gj.mjs → cli-0.1.15-bpcmpy8b.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-yagh75p5.mjs → cli-0.1.15-bz57rf9t.mjs} +1 -1
- package/dist/chunks/cli-0.1.15-cbseyggr.mjs +2 -0
- package/dist/chunks/{cli-0.1.14-7zz7abpc.mjs → cli-0.1.15-cenwnwnx.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-71m91842.mjs → cli-0.1.15-cf4s92e9.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-7zjhrz42.mjs → cli-0.1.15-cqzrzsh5.mjs} +2 -2
- package/dist/chunks/{cli-0.1.14-wgatq2fj.mjs → cli-0.1.15-cr7qy3wd.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-3zj4s594.mjs → cli-0.1.15-cyq0gbzk.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-nxphqjb4.mjs → cli-0.1.15-d9nfa2yf.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-5brvxst8.mjs → cli-0.1.15-dcabmk2v.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-adz0gnzy.mjs → cli-0.1.15-dcxa8b6s.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-nprcbhwn.mjs → cli-0.1.15-dp2e8j4f.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-442a367x.mjs → cli-0.1.15-dq954y1q.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-9evp0ewn.mjs → cli-0.1.15-dqkhbs67.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-ftjxb57b.mjs → cli-0.1.15-e2e7hn7p.mjs} +3 -3
- package/dist/chunks/{cli-0.1.14-zrmretjp.mjs → cli-0.1.15-e494j2sj.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-y56629hj.mjs → cli-0.1.15-e64w5wan.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-xp6rc33g.mjs → cli-0.1.15-e70ktyft.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-zs4vmj7z.mjs → cli-0.1.15-em40knm7.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-4tmbgg29.mjs → cli-0.1.15-en9ppdbd.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-5te1nbdc.mjs → cli-0.1.15-f838g4vw.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-jf8019sb.mjs → cli-0.1.15-f8abjagh.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-08ambmnj.mjs → cli-0.1.15-fe92jeft.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-jbn4ywda.mjs → cli-0.1.15-fmnyh9j9.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-x88ypr2r.mjs → cli-0.1.15-fr83vs1y.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-khtq9cgy.mjs → cli-0.1.15-ft6xtjsa.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-d483gd53.mjs → cli-0.1.15-g5wt8d3g.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-dw74ppax.mjs → cli-0.1.15-ghvjjc4g.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-0nhaxy76.mjs → cli-0.1.15-gkzany0s.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-kmsvd61a.mjs → cli-0.1.15-gmdv5ny8.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-zq66y0mv.mjs → cli-0.1.15-gn4wnxx3.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-16jrehc2.mjs → cli-0.1.15-gqf82qvm.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-ab0rxxvk.mjs → cli-0.1.15-gqp8kzp0.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-r5qyt63x.mjs → cli-0.1.15-gtn9gx9w.mjs} +1 -1
- package/dist/chunks/cli-0.1.15-gwbebdj7.mjs +2 -0
- package/dist/chunks/{cli-0.1.14-hjktwgtk.mjs → cli-0.1.15-gxgy4enj.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-77ha4n58.mjs → cli-0.1.15-h3a2cbdb.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-aky5tegx.mjs → cli-0.1.15-h4erh2cn.mjs} +1 -1
- package/dist/chunks/cli-0.1.15-h7cb0pw7.mjs +2 -0
- package/dist/chunks/{cli-0.1.14-canpypsb.mjs → cli-0.1.15-htms4w3h.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-a15xdexp.mjs → cli-0.1.15-hyydz4kc.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-cp2pada5.mjs → cli-0.1.15-j5m3s9r5.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-we6s7jfg.mjs → cli-0.1.15-jy7cjb23.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-m7xchegb.mjs → cli-0.1.15-k0bn0cze.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-mngn74ga.mjs → cli-0.1.15-knpxv22b.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-fmgz6tx2.mjs → cli-0.1.15-ks9rz9tk.mjs} +2 -2
- package/dist/chunks/{cli-0.1.14-w8efvbh6.mjs → cli-0.1.15-kw7che8m.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-yfc7weqn.mjs → cli-0.1.15-m0v1d1kt.mjs} +11 -11
- package/dist/chunks/{cli-0.1.14-0x3m90bk.mjs → cli-0.1.15-m7gtc61y.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-3scecgzx.mjs → cli-0.1.15-my0y22r7.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-r00mjm41.mjs → cli-0.1.15-n97y4hq4.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-d1edbjh4.mjs → cli-0.1.15-ncammv2n.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-svqkx41a.mjs → cli-0.1.15-nejf7yqz.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-m75ce5ve.mjs → cli-0.1.15-njg0k6ga.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-2mzb5ath.mjs → cli-0.1.15-nk50qhet.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-wymtdw5f.mjs → cli-0.1.15-nkn6jfmb.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-mx9yse7m.mjs → cli-0.1.15-nts79xbr.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-5e5kkjam.mjs → cli-0.1.15-nw94frpp.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-4mde8z7h.mjs → cli-0.1.15-nx5v1cvm.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-nzsj259d.mjs → cli-0.1.15-p159ga3t.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-yxq1tr3a.mjs → cli-0.1.15-p47rrzrn.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-akz49g5v.mjs → cli-0.1.15-p5ty029c.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-dq7jkw1n.mjs → cli-0.1.15-pcqjreq6.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-ckjcet41.mjs → cli-0.1.15-pxf97j8y.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-fspxpmh7.mjs → cli-0.1.15-pya8tbx3.mjs} +1 -1
- package/dist/chunks/cli-0.1.15-q021qg07.mjs +2 -0
- package/dist/chunks/{cli-0.1.14-a6kwmqhz.mjs → cli-0.1.15-q35rzjnz.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-25ta9abj.mjs → cli-0.1.15-qhz07at6.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-dntkrp1j.mjs → cli-0.1.15-qns6xv34.mjs} +5 -5
- package/dist/chunks/{cli-0.1.14-1g5jq0j8.mjs → cli-0.1.15-r626437v.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-3yj4dkmn.mjs → cli-0.1.15-r8qzzahw.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-nmmtd1d6.mjs → cli-0.1.15-r9nrfwrq.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-3xj419mp.mjs → cli-0.1.15-rbx47sc3.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-yphht6rx.mjs → cli-0.1.15-rq9n4js4.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-cdby401e.mjs → cli-0.1.15-rr65b3dk.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-68wbwy40.mjs → cli-0.1.15-rs5swvy0.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-473sgexj.mjs → cli-0.1.15-rv6zpjh8.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-6cjjzttb.mjs → cli-0.1.15-rvtve9kq.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-893g12wf.mjs → cli-0.1.15-rwx8446j.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-v9q1cxjy.mjs → cli-0.1.15-s7trme0x.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-0ctjta81.mjs → cli-0.1.15-sct02cw6.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-kpsh76mj.mjs → cli-0.1.15-sd5jysf2.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-dcgxqsyp.mjs → cli-0.1.15-sg3n1v0w.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-qyx55m6c.mjs → cli-0.1.15-svhrqvzp.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-whe4bxfr.mjs → cli-0.1.15-tj4kzvth.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-nnr43nyg.mjs → cli-0.1.15-tn4214gj.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-harz1d9d.mjs → cli-0.1.15-tp614m5f.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-a9ytrehs.mjs → cli-0.1.15-twq0mjmr.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-3m63hy2a.mjs → cli-0.1.15-v07ep52w.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-y55hrwdp.mjs → cli-0.1.15-v8zwx5j6.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-ba919tmj.mjs → cli-0.1.15-vwb8h4r1.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-z0ckw2hb.mjs → cli-0.1.15-vzk22hwe.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-kv650aha.mjs → cli-0.1.15-w8q8f37x.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-z8j2n955.mjs → cli-0.1.15-wfn10357.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-gdm27acz.mjs → cli-0.1.15-wmwtv0tz.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-m7khgn2k.mjs → cli-0.1.15-wn40n534.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-42sm5vzr.mjs → cli-0.1.15-x3yhaxm9.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-stv1d0q3.mjs → cli-0.1.15-x69hfzmj.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-nkza93de.mjs → cli-0.1.15-xaw2s45s.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-qzcceap6.mjs → cli-0.1.15-xe4dq144.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-g5q2xqp3.mjs → cli-0.1.15-xery8c8c.mjs} +1 -1
- package/dist/chunks/cli-0.1.15-y2pbhx6p.mjs +2 -0
- package/dist/chunks/{cli-0.1.14-1xkst5wv.mjs → cli-0.1.15-y6fkcbes.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-tyv29sz9.mjs → cli-0.1.15-y7xkk5ds.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-hkaqyhx1.mjs → cli-0.1.15-yghcqf7h.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-fhfj87ej.mjs → cli-0.1.15-yjxhk7qj.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-tkb5t0xv.mjs → cli-0.1.15-ywed2hpz.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-kn1f2x94.mjs → cli-0.1.15-yxm6wwfz.mjs} +1 -1
- package/dist/chunks/cli-0.1.15-yym7bka2.mjs +2 -0
- package/dist/chunks/{cli-0.1.14-v2acyy7r.mjs → cli-0.1.15-z2yexprk.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-59axynr8.mjs → cli-0.1.15-z35x5bfj.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-as1s0b0t.mjs → cli-0.1.15-zap1wk9j.mjs} +1 -1
- package/dist/chunks/{cli-0.1.14-0a8ckx07.mjs → cli-0.1.15-zf1s8y92.mjs} +1 -1
- package/dist/chunks/cli-0.1.15-ztxn2vjm.mjs +2 -0
- package/dist/chunks/client-0.1.15-pbb4218v.mjs +1 -0
- package/dist/chunks/color-0.1.15-w9tvjt51.mjs +1 -0
- package/dist/chunks/{compact-0.1.14-mx9ng433.mjs → compact-0.1.15-2a2eywaz.mjs} +1 -1
- package/dist/chunks/{config-0.1.14-76vavy7t.mjs → config-0.1.15-m4gwmfb1.mjs} +1 -1
- package/dist/chunks/config-0.1.15-r15yk3zr.mjs +1 -0
- package/dist/chunks/{context-0.1.14-hyykwj83.mjs → context-0.1.15-ghkedaaw.mjs} +1 -1
- package/dist/chunks/context-noninteractive-0.1.15-wwa3qz84.mjs +1 -0
- package/dist/chunks/conversation-0.1.15-n1bn5vmb.mjs +1 -0
- package/dist/chunks/{copy-0.1.14-kp76nh7r.mjs → copy-0.1.15-53q3e2fk.mjs} +1 -1
- package/dist/chunks/cost-0.1.15-garxyfxy.mjs +1 -0
- package/dist/chunks/createSession-0.1.15-krz8fv09.mjs +1 -0
- package/dist/chunks/desktop-0.1.15-j0znhh3a.mjs +1 -0
- package/dist/chunks/detectRepository-0.1.15-f34tbbq5.mjs +1 -0
- package/dist/chunks/detection-0.1.15-qfkk58tf.mjs +1 -0
- package/dist/chunks/diff-0.1.15-gc5686z3.mjs +1 -0
- package/dist/chunks/doctor-0.1.15-hhtv9s33.mjs +1 -0
- package/dist/chunks/{earlyInput-0.1.14-997vtdw4.mjs → earlyInput-0.1.15-ftgt9y2w.mjs} +1 -1
- package/dist/chunks/{effort-0.1.14-d9xmff2t.mjs → effort-0.1.15-5za6yh63.mjs} +1 -1
- package/dist/chunks/environmentSelection-0.1.15-59904m5c.mjs +1 -0
- package/dist/chunks/environments-0.1.15-fn4ybjrt.mjs +1 -0
- package/dist/chunks/exit-0.1.15-qxj6czd5.mjs +1 -0
- package/dist/chunks/{export-0.1.14-qpt72paa.mjs → export-0.1.15-h5n9s624.mjs} +1 -1
- package/dist/chunks/extra-usage-0.1.15-4a6e6rsa.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-0.1.15-rgqd9ef7.mjs +1 -0
- package/dist/chunks/fast-0.1.15-98jhvjxk.mjs +1 -0
- package/dist/chunks/{feedback-0.1.14-qhk5ek0b.mjs → feedback-0.1.15-pqe68x4v.mjs} +1 -1
- package/dist/chunks/{firstPartyEventLogger-0.1.14-78y09nr6.mjs → firstPartyEventLogger-0.1.15-pss0293k.mjs} +1 -1
- package/dist/chunks/{git-0.1.14-zvsa13gk.mjs → git-0.1.15-002t17pq.mjs} +1 -1
- package/dist/chunks/githubModelsCredentials-0.1.15-2a6dqqse.mjs +1 -0
- package/dist/chunks/{growthbook-0.1.14-dcdeqgyq.mjs → growthbook-0.1.15-m7gdvgqa.mjs} +1 -1
- package/dist/chunks/{heapdump-0.1.14-tj7w79dt.mjs → heapdump-0.1.15-s8h9rwpe.mjs} +1 -1
- package/dist/chunks/{help-0.1.14-gk9s0stg.mjs → help-0.1.15-y48dg88b.mjs} +1 -1
- package/dist/chunks/{hookChains-0.1.14-wng6tzfd.mjs → hookChains-0.1.15-z46c2xkf.mjs} +2 -2
- package/dist/chunks/{hooks-0.1.14-jy9bt7s6.mjs → hooks-0.1.15-f81kq7m2.mjs} +1 -1
- package/dist/chunks/hooks-0.1.15-vanat6cg.mjs +1 -0
- package/dist/chunks/{ide-0.1.14-0ar60k4r.mjs → ide-0.1.15-xepj09gj.mjs} +1 -1
- package/dist/chunks/{plist-0.1.14-ssqtjjq9.mjs → image-processor-napi-0.1.15-5w5sybn1.mjs} +1 -1
- package/dist/chunks/index-0.1.15-0z186jwx.mjs +1 -0
- package/dist/chunks/index-0.1.15-136649ke.mjs +1 -0
- package/dist/chunks/{index-0.1.14-8v5xwttx.mjs → index-0.1.15-15ftbc8a.mjs} +2 -2
- package/dist/chunks/index-0.1.15-1r19582s.mjs +1 -0
- package/dist/chunks/{index-0.1.14-2v6wa4p4.mjs → index-0.1.15-3jxezstk.mjs} +1 -1
- package/dist/chunks/index-0.1.15-52zxtxf2.mjs +1 -0
- package/dist/chunks/{index-0.1.14-ac13h1t1.mjs → index-0.1.15-628tag5v.mjs} +1 -1
- package/dist/chunks/{index-0.1.14-y3aj57xa.mjs → index-0.1.15-77j1wp6f.mjs} +1 -1
- package/dist/chunks/index-0.1.15-7cp4n6z6.mjs +1 -0
- package/dist/chunks/{index-0.1.14-mzhk0gvs.mjs → index-0.1.15-832xm57n.mjs} +1 -1
- package/dist/chunks/{index-0.1.14-272zxs9n.mjs → index-0.1.15-abzge0fa.mjs} +1 -1
- package/dist/chunks/{index-0.1.14-qrykb444.mjs → index-0.1.15-b9sdtjj4.mjs} +2 -2
- package/dist/chunks/{index-0.1.14-4hv4f8g9.mjs → index-0.1.15-bvr8e4dt.mjs} +1 -1
- package/dist/chunks/{index-0.1.14-ksa4vdak.mjs → index-0.1.15-d4ea93sj.mjs} +1 -1
- package/dist/chunks/{index-0.1.14-hqphn8m5.mjs → index-0.1.15-f1y1067a.mjs} +1 -1
- package/dist/chunks/{index-0.1.14-2x59va64.mjs → index-0.1.15-n2q4dkvc.mjs} +1 -1
- package/dist/chunks/{index-0.1.14-g5kkm9ng.mjs → index-0.1.15-nzmg6zng.mjs} +1 -1
- package/dist/chunks/{index-0.1.14-071xy8v4.mjs → index-0.1.15-r9ck21mp.mjs} +1 -1
- package/dist/chunks/index-0.1.15-rb4nqzzk.mjs +1 -0
- package/dist/chunks/{index-0.1.14-dmbjzapt.mjs → index-0.1.15-tf5b20vy.mjs} +1 -1
- package/dist/chunks/{index-0.1.14-1mttyja2.mjs → index-0.1.15-x8ghxne4.mjs} +1 -1
- package/dist/chunks/index-0.1.15-z3k5tm3n.mjs +1 -0
- package/dist/chunks/{initReplBridge-0.1.14-qe820gff.mjs → initReplBridge-0.1.15-g7q1qemf.mjs} +1 -1
- package/dist/chunks/{ink-0.1.14-kxs7ygns.mjs → ink-0.1.15-rd56fvsx.mjs} +1 -1
- package/dist/chunks/{insights-0.1.14-9n58d9t8.mjs → insights-0.1.15-2zt9898j.mjs} +1 -1
- package/dist/chunks/{install-0.1.14-1zyjez10.mjs → install-0.1.15-z6a6aa3t.mjs} +1 -1
- package/dist/chunks/{install-github-app-0.1.14-kmetkgdq.mjs → install-github-app-0.1.15-h746hza3.mjs} +1 -1
- package/dist/chunks/install-slack-app-0.1.15-2yhy3kwz.mjs +1 -0
- package/dist/chunks/{instrumentation-0.1.14-fsgk97cp.mjs → instrumentation-0.1.15-bwm4tb1y.mjs} +1 -1
- package/dist/chunks/interactiveHelpers-0.1.15-z5nx1rw2.mjs +1 -0
- package/dist/chunks/keybindings-0.1.15-cxmw2kd4.mjs +2 -0
- package/dist/chunks/{knowledge-0.1.14-f7w4damb.mjs → knowledge-0.1.15-2bnycc4a.mjs} +1 -1
- package/dist/chunks/loadAgentsDir-0.1.15-e4ms71xe.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.1.15-rcg3267j.mjs +1 -0
- package/dist/chunks/{lsp-0.1.14-cks4jevz.mjs → lsp-0.1.15-veqrp99h.mjs} +1 -1
- package/dist/chunks/main-0.1.15-bfvfcwwj.mjs +1 -0
- package/dist/chunks/managedEnv-0.1.15-1mxydytg.mjs +1 -0
- package/dist/chunks/{mcp-0.1.14-3tzc0agq.mjs → mcp-0.1.15-rfy9pyrt.mjs} +1 -1
- package/dist/chunks/{mcp-0.1.14-dmtc9tjr.mjs → mcp-0.1.15-tw9s435t.mjs} +3 -3
- package/dist/chunks/{mcp-0.1.14-tepbr987.mjs → mcp-0.1.15-zc7h2fyj.mjs} +1 -1
- package/dist/chunks/mcpServer-0.1.15-t7dsptwh.mjs +1 -0
- package/dist/chunks/{image-processor-napi-0.1.14-p1r3vkb0.mjs → mcpb-0.1.15-5mam984d.mjs} +1 -1
- package/dist/chunks/{memory-0.1.14-cgx518q9.mjs → memory-0.1.15-b6zkcs44.mjs} +1 -1
- package/dist/chunks/{mobile-0.1.14-bwjnmpy0.mjs → mobile-0.1.15-sm8kbft4.mjs} +1 -1
- package/dist/chunks/{model-0.1.14-zg566cz0.mjs → model-0.1.15-843f7654.mjs} +1 -1
- package/dist/chunks/{model-0.1.14-rq2dkze7.mjs → model-0.1.15-e62wxf7h.mjs} +1 -1
- package/dist/chunks/{oauth-0.1.14-gftadks2.mjs → oauth-0.1.15-gxgmqwwx.mjs} +1 -1
- package/dist/chunks/{openaiShim-0.1.14-jv6416m8.mjs → openaiShim-0.1.15-0yryhq9r.mjs} +1 -1
- package/dist/chunks/{output-style-0.1.14-v41ce6t5.mjs → output-style-0.1.15-d20e4vc3.mjs} +1 -1
- package/dist/chunks/package-WSP46L7M-0.1.15-jsqef57n.mjs +1 -0
- package/dist/chunks/parser-0.1.15-wbja947p.mjs +1 -0
- package/dist/chunks/{passes-0.1.14-0jjh5wg5.mjs → passes-0.1.15-726y1cyq.mjs} +1 -1
- package/dist/chunks/{permissions-0.1.14-hh0d709r.mjs → permissions-0.1.15-4pqgyt4h.mjs} +1 -1
- package/dist/chunks/plan-0.1.15-p06bpb7x.mjs +1 -0
- package/dist/chunks/{mcpb-0.1.14-ffa57420.mjs → plist-0.1.15-fseac2c0.mjs} +1 -1
- package/dist/chunks/{plugin-0.1.14-01jhhdd3.mjs → plugin-0.1.15-yeqq1san.mjs} +1 -1
- package/dist/chunks/pluginStartupCheck-0.1.15-s9v7kq6q.mjs +1 -0
- package/dist/chunks/{plugins-0.1.14-4tggkexv.mjs → plugins-0.1.15-3rpwr86v.mjs} +2 -2
- package/dist/chunks/{print-0.1.14-m719w2yp.mjs → print-0.1.15-64y2p7wj.mjs} +4 -4
- package/dist/chunks/privacy-settings-0.1.15-rq35tcyk.mjs +1 -0
- package/dist/chunks/{process-0.1.14-vgdgd7sq.mjs → process-0.1.15-g6km3z8k.mjs} +1 -1
- package/dist/chunks/processBashCommand-0.1.15-57ga0c30.mjs +1 -0
- package/dist/chunks/{processSlashCommand-0.1.14-7w1v93bg.mjs → processSlashCommand-0.1.15-mee2mbyy.mjs} +1 -1
- package/dist/chunks/prompt-0.1.15-gm20yk5m.mjs +1 -0
- package/dist/chunks/prompt-0.1.15-gxjy2vnc.mjs +1 -0
- package/dist/chunks/prompts-0.1.15-v7p366n5.mjs +1 -0
- package/dist/chunks/{provider-0.1.14-xs34vy3w.mjs → provider-0.1.15-gz0fhpp7.mjs} +1 -1
- package/dist/chunks/providerProfiles-0.1.15-v7p3m9kf.mjs +1 -0
- package/dist/chunks/rate-limit-options-0.1.15-3vs25v7e.mjs +1 -0
- package/dist/chunks/registry-0.1.15-3h7bxrc2.mjs +1 -0
- package/dist/chunks/release-notes-0.1.15-1g908440.mjs +5 -0
- package/dist/chunks/reload-plugins-0.1.15-5r2acf43.mjs +2 -0
- package/dist/chunks/{remote-env-0.1.14-jyc0gkhb.mjs → remote-env-0.1.15-fd5z1adp.mjs} +1 -1
- package/dist/chunks/{remoteBridgeCore-0.1.14-8kt4ffzy.mjs → remoteBridgeCore-0.1.15-kbthngek.mjs} +1 -1
- package/dist/chunks/remoteSession-0.1.15-yrg8c3z1.mjs +1 -0
- package/dist/chunks/rename-0.1.15-8079z5ff.mjs +1 -0
- package/dist/chunks/replBridgeHandle-0.1.15-cz1pf5m3.mjs +1 -0
- package/dist/chunks/{resume-0.1.14-7sda36n0.mjs → resume-0.1.15-s4hv4t9y.mjs} +1 -1
- package/dist/chunks/{rewind-0.1.14-zba66at0.mjs → rewind-0.1.15-fevxgefp.mjs} +1 -1
- package/dist/chunks/sandbox-adapter-0.1.15-yra7frkv.mjs +1 -0
- package/dist/chunks/{sandbox-toggle-0.1.14-jz6x02qp.mjs → sandbox-toggle-0.1.15-fn86ac4p.mjs} +1 -1
- package/dist/chunks/session-0.1.15-crg226x4.mjs +2 -0
- package/dist/chunks/sessionFileAccessHooks-0.1.15-f3kpf3s7.mjs +1 -0
- package/dist/chunks/{sessionStorage-0.1.14-sz2medpp.mjs → sessionStorage-0.1.15-x0gw4hbz.mjs} +1 -1
- package/dist/chunks/{setup-0.1.14-f13rnmdg.mjs → setup-0.1.15-6znmc2q6.mjs} +2 -2
- package/dist/chunks/sinks-0.1.15-npqf68gv.mjs +1 -0
- package/dist/chunks/{skills-0.1.14-1vvr60ph.mjs → skills-0.1.15-sybv0v2p.mjs} +1 -1
- package/dist/chunks/startupProfiler-0.1.15-nwkwwtx6.mjs +1 -0
- package/dist/chunks/{state-0.1.14-rj00ry6n.mjs → state-0.1.15-rr5k0vbf.mjs} +1 -1
- package/dist/chunks/{stats-0.1.14-rr3tpwqw.mjs → stats-0.1.15-3c4f5zp4.mjs} +1 -1
- package/dist/chunks/status-0.1.15-cvscafrs.mjs +1 -0
- package/dist/chunks/stickers-0.1.15-ee8ptkd4.mjs +1 -0
- package/dist/chunks/subprocessEnv-0.1.15-330g0p7g.mjs +1 -0
- package/dist/chunks/tasks-0.1.15-a4y42df2.mjs +1 -0
- package/dist/chunks/{teamHelpers-0.1.14-zv908fgk.mjs → teamHelpers-0.1.15-gw6hwmyj.mjs} +1 -1
- package/dist/chunks/teammateModeSnapshot-0.1.15-t2czx776.mjs +1 -0
- package/dist/chunks/teleport-0.1.15-bg434zjk.mjs +1 -0
- package/dist/chunks/terminalSetup-0.1.15-ged9eavp.mjs +1 -0
- package/dist/chunks/theme-0.1.15-zq998m8x.mjs +1 -0
- package/dist/chunks/thinkback-0.1.15-g09k62ck.mjs +1 -0
- package/dist/chunks/thinkback-play-0.1.15-mn7j6mm2.mjs +1 -0
- package/dist/chunks/toolPool-0.1.15-wej7eaff.mjs +1 -0
- package/dist/chunks/toolSearch-0.1.15-v6zmdk1y.mjs +1 -0
- package/dist/chunks/trustedDevice-0.1.15-t9sax8yq.mjs +1 -0
- package/dist/chunks/{turndown.cjs-0.1.14-nw2rtcyd.mjs → turndown.cjs-0.1.15-pmxpe7z8.mjs} +1 -1
- package/dist/chunks/{ultrareviewCommand-0.1.14-9twnt5bp.mjs → ultrareviewCommand-0.1.15-3gjgaeyn.mjs} +1 -1
- package/dist/chunks/{update-0.1.14-9dhep94r.mjs → update-0.1.15-jtd1h3e7.mjs} +11 -11
- package/dist/chunks/upgrade-0.1.15-07pcdyyq.mjs +1 -0
- package/dist/chunks/{upstreamproxy-0.1.14-sc0x4n7b.mjs → upstreamproxy-0.1.15-wtbs40ct.mjs} +1 -1
- package/dist/chunks/usage-0.1.15-ayne7pw6.mjs +1 -0
- package/dist/chunks/util-0.1.15-vs1eanbw.mjs +1 -0
- package/dist/chunks/utils-0.1.15-aq7vgwy1.mjs +1 -0
- package/dist/chunks/vim-0.1.15-syferjfa.mjs +1 -0
- package/dist/chunks/watcher-0.1.15-bh7ych8a.mjs +1 -0
- package/dist/chunks/{wiki-0.1.14-s3exyf45.mjs → wiki-0.1.15-pp951r9h.mjs} +1 -1
- package/dist/chunks/worktree-0.1.15-twyfdw3p.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-0.1.15-afv7sbw1.mjs +1 -0
- package/dist/chunks/{wrapper-0.1.14-a4mesaeh.mjs → wrapper-0.1.15-dw3awx2b.mjs} +1 -1
- package/dist/claudio-vscode.vsix +0 -0
- package/dist/cli.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunks/AgentTool-0.1.14-cdr5h1g4.mjs +0 -1
- package/dist/chunks/App-0.1.14-pg2tqqjz.mjs +0 -1
- package/dist/chunks/ApproveApiKey-0.1.14-e86h3nff.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-0.1.14-ftdkaf8h.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-0.1.14-d45z21x5.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.14-dzhpgrhm.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-0.1.14-y2v8vg76.mjs +0 -1
- package/dist/chunks/Doctor-0.1.14-rhryp3qj.mjs +0 -1
- package/dist/chunks/Grove-0.1.14-4pt83x25.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-0.1.14-rx2djmka.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-0.1.14-nhkj2max.mjs +0 -1
- package/dist/chunks/MigrationDialog-0.1.14-f6hf3ymp.mjs +0 -1
- package/dist/chunks/ProviderManager-0.1.14-2d77t0cr.mjs +0 -1
- package/dist/chunks/REPL-0.1.14-rz1jsayd.mjs +0 -1
- package/dist/chunks/TeleportProgress-0.1.14-411m3y24.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-0.1.14-v6ytg24w.mjs +0 -1
- package/dist/chunks/ToolSearchTool-0.1.14-rpbvvb5j.mjs +0 -1
- package/dist/chunks/activeProvider-0.1.14-5cpywex1.mjs +0 -1
- package/dist/chunks/add-dir-0.1.14-q700x1tp.mjs +0 -1
- package/dist/chunks/agents-0.1.14-nm4k11re.mjs +0 -3
- package/dist/chunks/agents-0.1.14-pjr42t23.mjs +0 -111
- package/dist/chunks/api-0.1.14-v09922m9.mjs +0 -1
- package/dist/chunks/assistant-0.1.14-yt6v1sjy.mjs +0 -1
- package/dist/chunks/auth-0.1.14-vg6ez70v.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-0.1.14-bh13ez8a.mjs +0 -1
- package/dist/chunks/caches-0.1.14-et2zg3m5.mjs +0 -1
- package/dist/chunks/claudemd-0.1.14-exzt8psa.mjs +0 -1
- package/dist/chunks/clear-0.1.14-62gnxkg3.mjs +0 -1
- package/dist/chunks/clearTerminal-0.1.14-5p1j5sbv.mjs +0 -1
- package/dist/chunks/cli-0.1.14-1shkmy81.mjs +0 -2
- package/dist/chunks/cli-0.1.14-2e2jfccr.mjs +0 -2
- package/dist/chunks/cli-0.1.14-373staaj.mjs +0 -2
- package/dist/chunks/cli-0.1.14-86gckvrm.mjs +0 -2
- package/dist/chunks/cli-0.1.14-bat0c779.mjs +0 -2
- package/dist/chunks/cli-0.1.14-dz2jvye2.mjs +0 -2
- package/dist/chunks/cli-0.1.14-efhhkgkx.mjs +0 -2
- package/dist/chunks/cli-0.1.14-ja2ctrem.mjs +0 -2
- package/dist/chunks/cli-0.1.14-ka0xhrv6.mjs +0 -2
- package/dist/chunks/cli-0.1.14-t3fga5je.mjs +0 -2
- package/dist/chunks/cli-0.1.14-ydm3fwx1.mjs +0 -2
- package/dist/chunks/client-0.1.14-3t6sfwha.mjs +0 -1
- package/dist/chunks/color-0.1.14-65rf0ap9.mjs +0 -1
- package/dist/chunks/config-0.1.14-1v5v86ax.mjs +0 -1
- package/dist/chunks/context-noninteractive-0.1.14-24qfm7b9.mjs +0 -1
- package/dist/chunks/conversation-0.1.14-mkc1cd5a.mjs +0 -1
- package/dist/chunks/cost-0.1.14-3d4g5gqm.mjs +0 -1
- package/dist/chunks/createSession-0.1.14-8599rbgg.mjs +0 -1
- package/dist/chunks/desktop-0.1.14-bx4eky6b.mjs +0 -1
- package/dist/chunks/detectRepository-0.1.14-8yam7kv4.mjs +0 -1
- package/dist/chunks/detection-0.1.14-vz5bqsc0.mjs +0 -1
- package/dist/chunks/diff-0.1.14-e4pm39ee.mjs +0 -1
- package/dist/chunks/doctor-0.1.14-22fc2q8y.mjs +0 -1
- package/dist/chunks/environmentSelection-0.1.14-fn5p85z5.mjs +0 -1
- package/dist/chunks/environments-0.1.14-7napbg6g.mjs +0 -1
- package/dist/chunks/exit-0.1.14-v8j7rsfw.mjs +0 -1
- package/dist/chunks/extra-usage-0.1.14-tmwgn4dh.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-0.1.14-b2pdph8q.mjs +0 -1
- package/dist/chunks/fast-0.1.14-q1tyk3k8.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-0.1.14-r30t00rx.mjs +0 -1
- package/dist/chunks/hooks-0.1.14-ybdbkdfh.mjs +0 -1
- package/dist/chunks/index-0.1.14-3m7vrt91.mjs +0 -1
- package/dist/chunks/index-0.1.14-h8gc6ph5.mjs +0 -1
- package/dist/chunks/index-0.1.14-qvap58wt.mjs +0 -1
- package/dist/chunks/index-0.1.14-vygpnv88.mjs +0 -1
- package/dist/chunks/index-0.1.14-wjc5jkvz.mjs +0 -1
- package/dist/chunks/index-0.1.14-yjw9017n.mjs +0 -1
- package/dist/chunks/index-0.1.14-zgwbnfqh.mjs +0 -1
- package/dist/chunks/install-slack-app-0.1.14-64534gsm.mjs +0 -1
- package/dist/chunks/interactiveHelpers-0.1.14-ca4bp7gy.mjs +0 -1
- package/dist/chunks/keybindings-0.1.14-zk3nyh0h.mjs +0 -2
- package/dist/chunks/loadAgentsDir-0.1.14-md40mt17.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.1.14-d998c7wf.mjs +0 -1
- package/dist/chunks/main-0.1.14-94wst05h.mjs +0 -1
- package/dist/chunks/managedEnv-0.1.14-tvr9zhbp.mjs +0 -1
- package/dist/chunks/mcpServer-0.1.14-0mvs3bcw.mjs +0 -1
- package/dist/chunks/package-WSP46L7M-0.1.14-xy3ej2c4.mjs +0 -1
- package/dist/chunks/parser-0.1.14-jr4b3as9.mjs +0 -1
- package/dist/chunks/plan-0.1.14-kxb7xax2.mjs +0 -1
- package/dist/chunks/pluginStartupCheck-0.1.14-zjwy126p.mjs +0 -1
- package/dist/chunks/privacy-settings-0.1.14-2gv7gdy1.mjs +0 -1
- package/dist/chunks/processBashCommand-0.1.14-d3xsyk5f.mjs +0 -1
- package/dist/chunks/prompt-0.1.14-30e7kfkx.mjs +0 -1
- package/dist/chunks/prompt-0.1.14-brtd9j19.mjs +0 -1
- package/dist/chunks/prompts-0.1.14-bv9qxc0a.mjs +0 -1
- package/dist/chunks/providerProfiles-0.1.14-068kvwwx.mjs +0 -1
- package/dist/chunks/rate-limit-options-0.1.14-2ftxh15k.mjs +0 -1
- package/dist/chunks/registry-0.1.14-ad3na7g6.mjs +0 -1
- package/dist/chunks/release-notes-0.1.14-b7e554an.mjs +0 -5
- package/dist/chunks/reload-plugins-0.1.14-3w9v6nw6.mjs +0 -2
- package/dist/chunks/remoteSession-0.1.14-ppejxt7n.mjs +0 -1
- package/dist/chunks/rename-0.1.14-tx9dpgk1.mjs +0 -1
- package/dist/chunks/replBridgeHandle-0.1.14-gsqgzdev.mjs +0 -1
- package/dist/chunks/sandbox-adapter-0.1.14-k97fyzcg.mjs +0 -1
- package/dist/chunks/session-0.1.14-5qsfxmey.mjs +0 -2
- package/dist/chunks/sessionFileAccessHooks-0.1.14-mgx78eqm.mjs +0 -1
- package/dist/chunks/sinks-0.1.14-bkyqa9eq.mjs +0 -1
- package/dist/chunks/startupProfiler-0.1.14-sabjns03.mjs +0 -1
- package/dist/chunks/status-0.1.14-d4fcn5sn.mjs +0 -1
- package/dist/chunks/stickers-0.1.14-s9x2bdhp.mjs +0 -1
- package/dist/chunks/subprocessEnv-0.1.14-spqyrvd7.mjs +0 -1
- package/dist/chunks/tasks-0.1.14-yje1cmy8.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-0.1.14-natmxyx5.mjs +0 -1
- package/dist/chunks/teleport-0.1.14-np0wrxrm.mjs +0 -1
- package/dist/chunks/terminalSetup-0.1.14-dzsstmk7.mjs +0 -1
- package/dist/chunks/theme-0.1.14-202es8wd.mjs +0 -1
- package/dist/chunks/thinkback-0.1.14-k4krnzrn.mjs +0 -1
- package/dist/chunks/thinkback-play-0.1.14-nn1v84ja.mjs +0 -1
- package/dist/chunks/toolPool-0.1.14-4etecef4.mjs +0 -1
- package/dist/chunks/toolSearch-0.1.14-q506jg4k.mjs +0 -1
- package/dist/chunks/trustedDevice-0.1.14-qq8dmccd.mjs +0 -1
- package/dist/chunks/upgrade-0.1.14-4nr1rdba.mjs +0 -1
- package/dist/chunks/usage-0.1.14-sbaqxx8h.mjs +0 -1
- package/dist/chunks/util-0.1.14-vfg50acy.mjs +0 -1
- package/dist/chunks/utils-0.1.14-heqqycdx.mjs +0 -1
- package/dist/chunks/vim-0.1.14-z71303w7.mjs +0 -1
- package/dist/chunks/watcher-0.1.14-h1wk07kt.mjs +0 -1
- package/dist/chunks/worktree-0.1.14-5486fw5t.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-0.1.14-xn1mf8hc.mjs +0 -1
- /package/dist/chunks/{cli-0.1.14-nbvvdkk2.mjs → cli-0.1.15-618hqv9f.mjs} +0 -0
- /package/dist/chunks/{cli-0.1.14-tsth8deg.mjs → cli-0.1.15-7mfwj2xs.mjs} +0 -0
- /package/dist/chunks/{cli-0.1.14-et8yewbf.mjs → cli-0.1.15-7ve9h395.mjs} +0 -0
- /package/dist/chunks/{cli-0.1.14-qn4ftczz.mjs → cli-0.1.15-mhbfhhf6.mjs} +0 -0
- /package/dist/chunks/{cli-0.1.14-cahvg3jq.mjs → cli-0.1.15-p6bypqrv.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./cli-0.1.14-ydm3fwx1.mjs";import{Ag as C7,zg as Z5}from"./cli-0.1.14-tqexnkmz.mjs";import{BV as N5,CV as O7}from"./cli-0.1.14-3scecgzx.mjs";import{a5 as X6,b5 as T4,c5 as p6,e5 as n6}from"./cli-0.1.14-heevc19y.mjs";import"./cli-0.1.14-kv650aha.mjs";import{Zla as I2,ama as L6,bma as F,cma as U7}from"./cli-0.1.14-qn4ftczz.mjs";function f0($,Y){return function(){return $.apply(Y,arguments)}}var I1=()=>{};function h0($){return $!==null&&!w0($)&&$.constructor!==null&&!w0($.constructor)&&n($.constructor.isBuffer)&&$.constructor.isBuffer($)}function P5($){let Y;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)Y=ArrayBuffer.isView($);else Y=$&&$.buffer&&P2($.buffer);return Y}function w5(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;return{}}function g0($,Y,{allOwnKeys:G=!1}={}){if($===null||typeof $>"u")return;let Q,X;if(typeof $!=="object")$=[$];if(E0($))for(Q=0,X=$.length;Q<X;Q++)Y.call(null,$[Q],Q,$);else{if(h0($))return;let W=G?Object.getOwnPropertyNames($):Object.keys($),N=W.length,Z;for(Q=0;Q<N;Q++)Z=W[Q],Y.call(null,$[Z],Z,$)}}function O2($,Y){if(h0($))return null;Y=Y.toLowerCase();let G=Object.keys($),Q=G.length,X;while(Q-- >0)if(X=G[Q],Y===X.toLowerCase())return X;return null}function R1(){let{caseless:$,skipUndefined:Y}=C2(this)&&this||{},G={},Q=(X,W)=>{if(W==="__proto__"||W==="constructor"||W==="prototype")return;let N=$&&O2(G,W)||W;if($1(G[N])&&$1(X))G[N]=R1(G[N],X);else if($1(X))G[N]=R1({},X);else if(E0(X))G[N]=X.slice();else if(!Y||!w0(X))G[N]=X};for(let X=0,W=arguments.length;X<W;X++)arguments[X]&&g0(arguments[X],Q);return G}function e5($){return!!($&&n($.append)&&$[H2]==="FormData"&&$[G1])}var H5,Y1,G1,H2,Q1,$0=($)=>{return $=$.toLowerCase(),(Y)=>Q1(Y)===$},X1=($)=>(Y)=>typeof Y===$,E0,w0,P2,U5,n,U2,m0=($)=>$!==null&&typeof $==="object",O5=($)=>$===!0||$===!1,$1=($)=>{if(Q1($)!=="object")return!1;let Y=Y1($);return(Y===null||Y===Object.prototype||Object.getPrototypeOf(Y)===null)&&!(H2 in $)&&!(G1 in $)},C5=($)=>{if(!m0($)||h0($))return!1;try{return Object.keys($).length===0&&Object.getPrototypeOf($)===Object.prototype}catch(Y){return!1}},F5,T5,I5=($)=>{return!!($&&typeof $.uri<"u")},R5=($)=>$&&typeof $.getParts<"u",D5,S5,A5=($)=>m0($)&&n($.pipe),z2,B2,E5=($)=>{if(!$)return!1;if(B2&&$ instanceof B2)return!0;let Y=Y1($);if(!Y||Y===Object.prototype)return!1;if(!n($.append))return!1;let G=Q1($);return G==="formdata"||G==="object"&&n($.toString)&&$.toString()==="[object FormData]"},k5,q5,x5,j5,v5,b5=($)=>{return $.trim?$.trim():$.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},P0,C2=($)=>!w0($)&&$!==P0,y5=($,Y,G,{allOwnKeys:Q}={})=>{return g0(Y,(X,W)=>{if(G&&n(X))Object.defineProperty($,W,{value:f0(X,G),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty($,W,{value:X,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:Q}),$},f5=($)=>{if($.charCodeAt(0)===65279)$=$.slice(1);return $},h5=($,Y,G,Q)=>{$.prototype=Object.create(Y.prototype,Q),Object.defineProperty($.prototype,"constructor",{value:$,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($,"super",{value:Y.prototype}),G&&Object.assign($.prototype,G)},m5=($,Y,G,Q)=>{let X,W,N,Z={};if(Y=Y||{},$==null)return Y;do{X=Object.getOwnPropertyNames($),W=X.length;while(W-- >0)if(N=X[W],(!Q||Q(N,$,Y))&&!Z[N])Y[N]=$[N],Z[N]=!0;$=G!==!1&&Y1($)}while($&&(!G||G($,Y))&&$!==Object.prototype);return Y},g5=($,Y,G)=>{if($=String($),G===void 0||G>$.length)G=$.length;G-=Y.length;let Q=$.indexOf(Y,G);return Q!==-1&&Q===G},u5=($)=>{if(!$)return null;if(E0($))return $;let Y=$.length;if(!U2(Y))return null;let G=Array(Y);while(Y-- >0)G[Y]=$[Y];return G},c5,l5=($,Y)=>{let Q=($&&$[G1]).call($),X;while((X=Q.next())&&!X.done){let W=X.value;Y.call($,W[0],W[1])}},d5=($,Y)=>{let G,Q=[];while((G=$.exec(Y))!==null)Q.push(G);return Q},p5,n5=($)=>{return $.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(G,Q,X){return Q.toUpperCase()+X})},_2,i5,F2=($,Y)=>{let G=Object.getOwnPropertyDescriptors($),Q={};g0(G,(X,W)=>{let N;if((N=Y(X,W,$))!==!1)Q[W]=N||X}),Object.defineProperties($,Q)},t5=($)=>{F2($,(Y,G)=>{if(n($)&&["arguments","caller","callee"].indexOf(G)!==-1)return!1;let Q=$[G];if(!n(Q))return;if(Y.enumerable=!1,"writable"in Y){Y.writable=!1;return}if(!Y.set)Y.set=()=>{throw Error("Can not rewrite read-only method '"+G+"'")}})},a5=($,Y)=>{let G={},Q=(X)=>{X.forEach((W)=>{G[W]=!0})};return E0($)?Q($):Q(String($).split(Y)),G},s5=()=>{},o5=($,Y)=>{return $!=null&&Number.isFinite($=+$)?$:Y},r5=($)=>{let Y=[,,,,,,,,,,],G=(Q,X)=>{if(m0(Q)){if(Y.indexOf(Q)>=0)return;if(h0(Q))return Q;if(!("toJSON"in Q)){Y[X]=Q;let W=E0(Q)?[]:{};return g0(Q,(N,Z)=>{let M=G(N,X+1);!w0(M)&&(W[Z]=M)}),Y[X]=void 0,W}}return Q};return G($,0)},$6,Y6=($)=>$&&(m0($)||n($))&&n($.then)&&n($.catch),T2,G6,Q6=($)=>$!=null&&n($[G1]),J;var q=F(()=>{I1();({toString:H5}=Object.prototype),{getPrototypeOf:Y1}=Object,{iterator:G1,toStringTag:H2}=Symbol,Q1=(($)=>(Y)=>{let G=H5.call(Y);return $[G]||($[G]=G.slice(8,-1).toLowerCase())})(Object.create(null)),{isArray:E0}=Array,w0=X1("undefined");P2=$0("ArrayBuffer");U5=X1("string"),n=X1("function"),U2=X1("number"),F5=$0("Date"),T5=$0("File"),D5=$0("Blob"),S5=$0("FileList");z2=w5(),B2=typeof z2.FormData<"u"?z2.FormData:void 0,k5=$0("URLSearchParams"),[q5,x5,j5,v5]=["ReadableStream","Request","Response","Headers"].map($0);P0=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})();c5=(($)=>{return(Y)=>{return $&&Y instanceof $}})(typeof Uint8Array<"u"&&Y1(Uint8Array)),p5=$0("HTMLFormElement"),_2=(({hasOwnProperty:$})=>(Y,G)=>$.call(Y,G))(Object.prototype),i5=$0("RegExp");$6=$0("AsyncFunction"),T2=(($,Y)=>{if($)return setImmediate;return Y?((G,Q)=>{return P0.addEventListener("message",({source:X,data:W})=>{if(X===P0&&W===G)Q.length&&Q.shift()()},!1),(X)=>{Q.push(X),P0.postMessage(G,"*")}})(`axios@${Math.random()}`,[]):(G)=>setTimeout(G)})(typeof setImmediate==="function",n(P0.postMessage)),G6=typeof queueMicrotask<"u"?queueMicrotask.bind(P0):typeof process<"u"&&process.nextTick||T2,J={isArray:E0,isArrayBuffer:P2,isBuffer:h0,isFormData:E5,isArrayBufferView:P5,isString:U5,isNumber:U2,isBoolean:O5,isObject:m0,isPlainObject:$1,isEmptyObject:C5,isReadableStream:q5,isRequest:x5,isResponse:j5,isHeaders:v5,isUndefined:w0,isDate:F5,isFile:T5,isReactNativeBlob:I5,isReactNative:R5,isBlob:D5,isRegExp:i5,isFunction:n,isStream:A5,isURLSearchParams:k5,isTypedArray:c5,isFileList:S5,forEach:g0,merge:R1,extend:y5,trim:b5,stripBOM:f5,inherits:h5,toFlatObject:m5,kindOf:Q1,kindOfTest:$0,endsWith:g5,toArray:u5,forEachEntry:l5,matchAll:d5,isHTMLForm:p5,hasOwnProperty:_2,hasOwnProp:_2,reduceDescriptors:F2,freezeMethods:t5,toObjectSet:a5,toCamelCase:n5,noop:s5,toFiniteNumber:o5,findKey:O2,global:P0,isContextDefined:C2,isSpecCompliantForm:e5,toJSONObject:r5,isAsyncFn:$6,isThenable:Y6,setImmediate:T2,asap:G6,isIterable:Q6}});var l,z;var i=F(()=>{q();l=class l extends Error{static from($,Y,G,Q,X,W){let N=new l($.message,Y||$.code,G,Q,X);if(N.cause=$,N.name=$.name,$.status!=null&&N.status==null)N.status=$.status;return W&&Object.assign(N,W),N}constructor($,Y,G,Q,X){super($);if(Object.defineProperty(this,"message",{value:$,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,Y&&(this.code=Y),G&&(this.config=G),Q&&(this.request=Q),X)this.response=X,this.status=X.status}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:J.toJSONObject(this.config),code:this.code,status:this.status}}};l.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";l.ERR_BAD_OPTION="ERR_BAD_OPTION";l.ECONNABORTED="ECONNABORTED";l.ETIMEDOUT="ETIMEDOUT";l.ERR_NETWORK="ERR_NETWORK";l.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";l.ERR_DEPRECATED="ERR_DEPRECATED";l.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";l.ERR_BAD_REQUEST="ERR_BAD_REQUEST";l.ERR_CANCELED="ERR_CANCELED";l.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";l.ERR_INVALID_URL="ERR_INVALID_URL";l.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";z=l});var R2,W1;var D1=F(()=>{R2=I2(X6(),1),W1=R2.default});function A1($){return J.isPlainObject($)||J.isArray($)}function D2($){return J.endsWith($,"[]")?$.slice(0,-2):$}function S1($,Y,G){if(!$)return Y;return $.concat(Y).map(function(X,W){return X=D2(X),!G&&W?"["+X+"]":X}).join(G?".":"")}function W6($){return J.isArray($)&&!$.some(A1)}function Z6($,Y,G){if(!J.isObject($))throw TypeError("target must be an object");Y=Y||new(W1||FormData),G=J.toFlatObject(G,{metaTokens:!0,dots:!1,indexes:!1},!1,function(B,T){return!J.isUndefined(T[B])});let Q=G.metaTokens,X=G.visitor||L,W=G.dots,N=G.indexes,Z=G.Blob||typeof Blob<"u"&&Blob,M=G.maxDepth===void 0?100:G.maxDepth,V=Z&&J.isSpecCompliantForm(Y);if(!J.isFunction(X))throw TypeError("visitor must be a function");function K(O){if(O===null)return"";if(J.isDate(O))return O.toISOString();if(J.isBoolean(O))return O.toString();if(!V&&J.isBlob(O))throw new z("Blob is not supported. Use a Buffer instead.");if(J.isArrayBuffer(O)||J.isTypedArray(O))return V&&typeof Blob==="function"?new Blob([O]):Buffer.from(O);return O}function L(O,B,T){let d=O;if(J.isReactNative(Y)&&J.isReactNativeBlob(O))return Y.append(S1(T,B,W),K(O)),!1;if(O&&!T&&typeof O==="object"){if(J.endsWith(B,"{}"))B=Q?B:B.slice(0,-2),O=JSON.stringify(O);else if(J.isArray(O)&&W6(O)||(J.isFileList(O)||J.endsWith(B,"[]"))&&(d=J.toArray(O)))return B=D2(B),d.forEach(function(S,h){!(J.isUndefined(S)||S===null)&&Y.append(N===!0?S1([B],h,W):N===null?B:B+"[]",K(S))}),!1}if(A1(O))return!0;return Y.append(S1(T,B,W),K(O)),!1}let _=[],P=Object.assign(N6,{defaultVisitor:L,convertValue:K,isVisitable:A1});function H(O,B,T=0){if(J.isUndefined(O))return;if(T>M)throw new z("Object is too deeply nested ("+T+" levels). Max depth: "+M,z.ERR_FORM_DATA_DEPTH_EXCEEDED);if(_.indexOf(O)!==-1)throw Error("Circular reference detected in "+B.join("."));_.push(O),J.forEach(O,function(E,S){if((!(J.isUndefined(E)||E===null)&&X.call(Y,E,J.isString(S)?S.trim():S,B,P))===!0)H(E,B?B.concat(S):[S],T+1)}),_.pop()}if(!J.isObject($))throw TypeError("data must be an object");return H($),Y}var N6,L0;var u0=F(()=>{q();i();D1();N6=J.toFlatObject(J,{},null,function(Y){return/^is[A-Z]/.test(Y)});L0=Z6});function S2($){let Y={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent($).replace(/[!'()~]|%20/g,function(Q){return Y[Q]})}function A2($,Y){this._pairs=[],$&&L0($,this,Y)}var w2,E2;var k2=F(()=>{u0();w2=A2.prototype;w2.append=function(Y,G){this._pairs.push([Y,G])};w2.toString=function(Y){let G=Y?function(Q){return Y.call(this,Q,S2)}:S2;return this._pairs.map(function(X){return G(X[0])+"="+G(X[1])},"").join("&")};E2=A2});function J6($){return encodeURIComponent($).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function U0($,Y,G){if(!Y)return $;let Q=G&&G.encode||J6,X=J.isFunction(G)?{serialize:G}:G,W=X&&X.serialize,N;if(W)N=W(Y,X);else N=J.isURLSearchParams(Y)?Y.toString():new E2(Y,X).toString(Q);if(N){let Z=$.indexOf("#");if(Z!==-1)$=$.slice(0,Z);$+=($.indexOf("?")===-1?"?":"&")+N}return $}var N1=F(()=>{q();k2()});class q2{constructor(){this.handlers=[]}use($,Y,G){return this.handlers.push({fulfilled:$,rejected:Y,synchronous:G?G.synchronous:!1,runWhen:G?G.runWhen:null}),this.handlers.length-1}eject($){if(this.handlers[$])this.handlers[$]=null}clear(){if(this.handlers)this.handlers=[]}forEach($){J.forEach(this.handlers,function(G){if(G!==null)$(G)})}}var w1;var x2=F(()=>{q();w1=q2});var z0;var c0=F(()=>{z0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0}});import M6 from"url";var j2;var v2=F(()=>{j2=M6.URLSearchParams});import V6 from"crypto";var E1="abcdefghijklmnopqrstuvwxyz",b2="0123456789",y2,K6=($=16,Y=y2.ALPHA_DIGIT)=>{let G="",{length:Q}=Y,X=new Uint32Array($);V6.randomFillSync(X);for(let W=0;W<$;W++)G+=Y[X[W]%Q];return G},f2;var h2=F(()=>{v2();D1();y2={DIGIT:b2,ALPHA:E1,ALPHA_DIGIT:E1+E1.toUpperCase()+b2},f2={isNode:!0,classes:{URLSearchParams:j2,FormData:W1,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:y2,generateString:K6,protocols:["http","https","file","data"]}});var x1={};L6(x1,{origin:()=>_6,navigator:()=>k1,hasStandardBrowserWebWorkerEnv:()=>B6,hasStandardBrowserEnv:()=>z6,hasBrowserEnv:()=>q1});var q1,k1,z6,B6,_6;var m2=F(()=>{q1=typeof window<"u"&&typeof document<"u",k1=typeof navigator==="object"&&navigator||void 0,z6=q1&&(!k1||["ReactNative","NativeScript","NS"].indexOf(k1.product)<0),B6=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),_6=q1&&window.location.href||"http://localhost"});var A;var Y0=F(()=>{h2();m2();A={...x1,...f2}});function j1($,Y){return L0($,new A.classes.URLSearchParams,{visitor:function(G,Q,X,W){if(A.isNode&&J.isBuffer(G))return this.append(Q,G.toString("base64")),!1;return W.defaultVisitor.apply(this,arguments)},...Y})}var g2=F(()=>{q();u0();Y0()});function H6($){return J.matchAll(/\w+|\[(\w*)]/g,$).map((Y)=>{return Y[0]==="[]"?"":Y[1]||Y[0]})}function P6($){let Y={},G=Object.keys($),Q,X=G.length,W;for(Q=0;Q<X;Q++)W=G[Q],Y[W]=$[W];return Y}function U6($){function Y(G,Q,X,W){let N=G[W++];if(N==="__proto__")return!0;let Z=Number.isFinite(+N),M=W>=G.length;if(N=!N&&J.isArray(X)?X.length:N,M){if(J.hasOwnProp(X,N))X[N]=J.isArray(X[N])?X[N].concat(Q):[X[N],Q];else X[N]=Q;return!Z}if(!X[N]||!J.isObject(X[N]))X[N]=[];if(Y(G,Q,X[N],W)&&J.isArray(X[N]))X[N]=P6(X[N]);return!Z}if(J.isFormData($)&&J.isFunction($.entries)){let G={};return J.forEachEntry($,(Q,X)=>{Y(H6(Q),X,G,0)}),G}return null}var Z1;var v1=F(()=>{q();Z1=U6});function O6($,Y,G){if(J.isString($))try{return(Y||JSON.parse)($),J.trim($)}catch(Q){if(Q.name!=="SyntaxError")throw Q}return(G||JSON.stringify)($)}var k0=($,Y)=>$!=null&&J.hasOwnProp($,Y)?$[Y]:void 0,b1,q0;var J1=F(()=>{q();i();c0();u0();g2();Y0();v1();b1={transitional:z0,adapter:["xhr","http","fetch"],transformRequest:[function(Y,G){let Q=G.getContentType()||"",X=Q.indexOf("application/json")>-1,W=J.isObject(Y);if(W&&J.isHTMLForm(Y))Y=new FormData(Y);if(J.isFormData(Y))return X?JSON.stringify(Z1(Y)):Y;if(J.isArrayBuffer(Y)||J.isBuffer(Y)||J.isStream(Y)||J.isFile(Y)||J.isBlob(Y)||J.isReadableStream(Y))return Y;if(J.isArrayBufferView(Y))return Y.buffer;if(J.isURLSearchParams(Y))return G.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),Y.toString();let Z;if(W){let M=k0(this,"formSerializer");if(Q.indexOf("application/x-www-form-urlencoded")>-1)return j1(Y,M).toString();if((Z=J.isFileList(Y))||Q.indexOf("multipart/form-data")>-1){let V=k0(this,"env"),K=V&&V.FormData;return L0(Z?{"files[]":Y}:Y,K&&new K,M)}}if(W||X)return G.setContentType("application/json",!1),O6(Y);return Y}],transformResponse:[function(Y){let G=k0(this,"transitional")||b1.transitional,Q=G&&G.forcedJSONParsing,X=k0(this,"responseType"),W=X==="json";if(J.isResponse(Y)||J.isReadableStream(Y))return Y;if(Y&&J.isString(Y)&&(Q&&!X||W)){let Z=!(G&&G.silentJSONParsing)&&W;try{return JSON.parse(Y,k0(this,"parseReviver"))}catch(M){if(Z){if(M.name==="SyntaxError")throw z.from(M,z.ERR_BAD_RESPONSE,this,null,k0(this,"response"));throw M}}}return Y}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(Y){return Y>=200&&Y<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],($)=>{b1.headers[$]={}});q0=b1});var C6,u2=($)=>{let Y={},G,Q,X;return $&&$.split(`
|
|
1
|
+
import"./cli-0.1.15-q021qg07.mjs";import{Ag as C7,zg as Z5}from"./cli-0.1.15-3qwnw3ca.mjs";import{BV as N5,CV as O7}from"./cli-0.1.15-my0y22r7.mjs";import{a5 as X6,b5 as T4,c5 as p6,e5 as n6}from"./cli-0.1.15-20tvdt2s.mjs";import"./cli-0.1.15-w8q8f37x.mjs";import{Zla as I2,ama as L6,bma as F,cma as U7}from"./cli-0.1.15-mhbfhhf6.mjs";function f0($,Y){return function(){return $.apply(Y,arguments)}}var I1=()=>{};function h0($){return $!==null&&!w0($)&&$.constructor!==null&&!w0($.constructor)&&n($.constructor.isBuffer)&&$.constructor.isBuffer($)}function P5($){let Y;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)Y=ArrayBuffer.isView($);else Y=$&&$.buffer&&P2($.buffer);return Y}function w5(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;return{}}function g0($,Y,{allOwnKeys:G=!1}={}){if($===null||typeof $>"u")return;let Q,X;if(typeof $!=="object")$=[$];if(E0($))for(Q=0,X=$.length;Q<X;Q++)Y.call(null,$[Q],Q,$);else{if(h0($))return;let W=G?Object.getOwnPropertyNames($):Object.keys($),N=W.length,Z;for(Q=0;Q<N;Q++)Z=W[Q],Y.call(null,$[Z],Z,$)}}function O2($,Y){if(h0($))return null;Y=Y.toLowerCase();let G=Object.keys($),Q=G.length,X;while(Q-- >0)if(X=G[Q],Y===X.toLowerCase())return X;return null}function R1(){let{caseless:$,skipUndefined:Y}=C2(this)&&this||{},G={},Q=(X,W)=>{if(W==="__proto__"||W==="constructor"||W==="prototype")return;let N=$&&O2(G,W)||W;if($1(G[N])&&$1(X))G[N]=R1(G[N],X);else if($1(X))G[N]=R1({},X);else if(E0(X))G[N]=X.slice();else if(!Y||!w0(X))G[N]=X};for(let X=0,W=arguments.length;X<W;X++)arguments[X]&&g0(arguments[X],Q);return G}function e5($){return!!($&&n($.append)&&$[H2]==="FormData"&&$[G1])}var H5,Y1,G1,H2,Q1,$0=($)=>{return $=$.toLowerCase(),(Y)=>Q1(Y)===$},X1=($)=>(Y)=>typeof Y===$,E0,w0,P2,U5,n,U2,m0=($)=>$!==null&&typeof $==="object",O5=($)=>$===!0||$===!1,$1=($)=>{if(Q1($)!=="object")return!1;let Y=Y1($);return(Y===null||Y===Object.prototype||Object.getPrototypeOf(Y)===null)&&!(H2 in $)&&!(G1 in $)},C5=($)=>{if(!m0($)||h0($))return!1;try{return Object.keys($).length===0&&Object.getPrototypeOf($)===Object.prototype}catch(Y){return!1}},F5,T5,I5=($)=>{return!!($&&typeof $.uri<"u")},R5=($)=>$&&typeof $.getParts<"u",D5,S5,A5=($)=>m0($)&&n($.pipe),z2,B2,E5=($)=>{if(!$)return!1;if(B2&&$ instanceof B2)return!0;let Y=Y1($);if(!Y||Y===Object.prototype)return!1;if(!n($.append))return!1;let G=Q1($);return G==="formdata"||G==="object"&&n($.toString)&&$.toString()==="[object FormData]"},k5,q5,x5,j5,v5,b5=($)=>{return $.trim?$.trim():$.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},P0,C2=($)=>!w0($)&&$!==P0,y5=($,Y,G,{allOwnKeys:Q}={})=>{return g0(Y,(X,W)=>{if(G&&n(X))Object.defineProperty($,W,{value:f0(X,G),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty($,W,{value:X,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:Q}),$},f5=($)=>{if($.charCodeAt(0)===65279)$=$.slice(1);return $},h5=($,Y,G,Q)=>{$.prototype=Object.create(Y.prototype,Q),Object.defineProperty($.prototype,"constructor",{value:$,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($,"super",{value:Y.prototype}),G&&Object.assign($.prototype,G)},m5=($,Y,G,Q)=>{let X,W,N,Z={};if(Y=Y||{},$==null)return Y;do{X=Object.getOwnPropertyNames($),W=X.length;while(W-- >0)if(N=X[W],(!Q||Q(N,$,Y))&&!Z[N])Y[N]=$[N],Z[N]=!0;$=G!==!1&&Y1($)}while($&&(!G||G($,Y))&&$!==Object.prototype);return Y},g5=($,Y,G)=>{if($=String($),G===void 0||G>$.length)G=$.length;G-=Y.length;let Q=$.indexOf(Y,G);return Q!==-1&&Q===G},u5=($)=>{if(!$)return null;if(E0($))return $;let Y=$.length;if(!U2(Y))return null;let G=Array(Y);while(Y-- >0)G[Y]=$[Y];return G},c5,l5=($,Y)=>{let Q=($&&$[G1]).call($),X;while((X=Q.next())&&!X.done){let W=X.value;Y.call($,W[0],W[1])}},d5=($,Y)=>{let G,Q=[];while((G=$.exec(Y))!==null)Q.push(G);return Q},p5,n5=($)=>{return $.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(G,Q,X){return Q.toUpperCase()+X})},_2,i5,F2=($,Y)=>{let G=Object.getOwnPropertyDescriptors($),Q={};g0(G,(X,W)=>{let N;if((N=Y(X,W,$))!==!1)Q[W]=N||X}),Object.defineProperties($,Q)},t5=($)=>{F2($,(Y,G)=>{if(n($)&&["arguments","caller","callee"].indexOf(G)!==-1)return!1;let Q=$[G];if(!n(Q))return;if(Y.enumerable=!1,"writable"in Y){Y.writable=!1;return}if(!Y.set)Y.set=()=>{throw Error("Can not rewrite read-only method '"+G+"'")}})},a5=($,Y)=>{let G={},Q=(X)=>{X.forEach((W)=>{G[W]=!0})};return E0($)?Q($):Q(String($).split(Y)),G},s5=()=>{},o5=($,Y)=>{return $!=null&&Number.isFinite($=+$)?$:Y},r5=($)=>{let Y=[,,,,,,,,,,],G=(Q,X)=>{if(m0(Q)){if(Y.indexOf(Q)>=0)return;if(h0(Q))return Q;if(!("toJSON"in Q)){Y[X]=Q;let W=E0(Q)?[]:{};return g0(Q,(N,Z)=>{let M=G(N,X+1);!w0(M)&&(W[Z]=M)}),Y[X]=void 0,W}}return Q};return G($,0)},$6,Y6=($)=>$&&(m0($)||n($))&&n($.then)&&n($.catch),T2,G6,Q6=($)=>$!=null&&n($[G1]),J;var q=F(()=>{I1();({toString:H5}=Object.prototype),{getPrototypeOf:Y1}=Object,{iterator:G1,toStringTag:H2}=Symbol,Q1=(($)=>(Y)=>{let G=H5.call(Y);return $[G]||($[G]=G.slice(8,-1).toLowerCase())})(Object.create(null)),{isArray:E0}=Array,w0=X1("undefined");P2=$0("ArrayBuffer");U5=X1("string"),n=X1("function"),U2=X1("number"),F5=$0("Date"),T5=$0("File"),D5=$0("Blob"),S5=$0("FileList");z2=w5(),B2=typeof z2.FormData<"u"?z2.FormData:void 0,k5=$0("URLSearchParams"),[q5,x5,j5,v5]=["ReadableStream","Request","Response","Headers"].map($0);P0=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})();c5=(($)=>{return(Y)=>{return $&&Y instanceof $}})(typeof Uint8Array<"u"&&Y1(Uint8Array)),p5=$0("HTMLFormElement"),_2=(({hasOwnProperty:$})=>(Y,G)=>$.call(Y,G))(Object.prototype),i5=$0("RegExp");$6=$0("AsyncFunction"),T2=(($,Y)=>{if($)return setImmediate;return Y?((G,Q)=>{return P0.addEventListener("message",({source:X,data:W})=>{if(X===P0&&W===G)Q.length&&Q.shift()()},!1),(X)=>{Q.push(X),P0.postMessage(G,"*")}})(`axios@${Math.random()}`,[]):(G)=>setTimeout(G)})(typeof setImmediate==="function",n(P0.postMessage)),G6=typeof queueMicrotask<"u"?queueMicrotask.bind(P0):typeof process<"u"&&process.nextTick||T2,J={isArray:E0,isArrayBuffer:P2,isBuffer:h0,isFormData:E5,isArrayBufferView:P5,isString:U5,isNumber:U2,isBoolean:O5,isObject:m0,isPlainObject:$1,isEmptyObject:C5,isReadableStream:q5,isRequest:x5,isResponse:j5,isHeaders:v5,isUndefined:w0,isDate:F5,isFile:T5,isReactNativeBlob:I5,isReactNative:R5,isBlob:D5,isRegExp:i5,isFunction:n,isStream:A5,isURLSearchParams:k5,isTypedArray:c5,isFileList:S5,forEach:g0,merge:R1,extend:y5,trim:b5,stripBOM:f5,inherits:h5,toFlatObject:m5,kindOf:Q1,kindOfTest:$0,endsWith:g5,toArray:u5,forEachEntry:l5,matchAll:d5,isHTMLForm:p5,hasOwnProperty:_2,hasOwnProp:_2,reduceDescriptors:F2,freezeMethods:t5,toObjectSet:a5,toCamelCase:n5,noop:s5,toFiniteNumber:o5,findKey:O2,global:P0,isContextDefined:C2,isSpecCompliantForm:e5,toJSONObject:r5,isAsyncFn:$6,isThenable:Y6,setImmediate:T2,asap:G6,isIterable:Q6}});var l,z;var i=F(()=>{q();l=class l extends Error{static from($,Y,G,Q,X,W){let N=new l($.message,Y||$.code,G,Q,X);if(N.cause=$,N.name=$.name,$.status!=null&&N.status==null)N.status=$.status;return W&&Object.assign(N,W),N}constructor($,Y,G,Q,X){super($);if(Object.defineProperty(this,"message",{value:$,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,Y&&(this.code=Y),G&&(this.config=G),Q&&(this.request=Q),X)this.response=X,this.status=X.status}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:J.toJSONObject(this.config),code:this.code,status:this.status}}};l.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";l.ERR_BAD_OPTION="ERR_BAD_OPTION";l.ECONNABORTED="ECONNABORTED";l.ETIMEDOUT="ETIMEDOUT";l.ERR_NETWORK="ERR_NETWORK";l.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";l.ERR_DEPRECATED="ERR_DEPRECATED";l.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";l.ERR_BAD_REQUEST="ERR_BAD_REQUEST";l.ERR_CANCELED="ERR_CANCELED";l.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";l.ERR_INVALID_URL="ERR_INVALID_URL";l.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";z=l});var R2,W1;var D1=F(()=>{R2=I2(X6(),1),W1=R2.default});function A1($){return J.isPlainObject($)||J.isArray($)}function D2($){return J.endsWith($,"[]")?$.slice(0,-2):$}function S1($,Y,G){if(!$)return Y;return $.concat(Y).map(function(X,W){return X=D2(X),!G&&W?"["+X+"]":X}).join(G?".":"")}function W6($){return J.isArray($)&&!$.some(A1)}function Z6($,Y,G){if(!J.isObject($))throw TypeError("target must be an object");Y=Y||new(W1||FormData),G=J.toFlatObject(G,{metaTokens:!0,dots:!1,indexes:!1},!1,function(B,T){return!J.isUndefined(T[B])});let Q=G.metaTokens,X=G.visitor||L,W=G.dots,N=G.indexes,Z=G.Blob||typeof Blob<"u"&&Blob,M=G.maxDepth===void 0?100:G.maxDepth,V=Z&&J.isSpecCompliantForm(Y);if(!J.isFunction(X))throw TypeError("visitor must be a function");function K(O){if(O===null)return"";if(J.isDate(O))return O.toISOString();if(J.isBoolean(O))return O.toString();if(!V&&J.isBlob(O))throw new z("Blob is not supported. Use a Buffer instead.");if(J.isArrayBuffer(O)||J.isTypedArray(O))return V&&typeof Blob==="function"?new Blob([O]):Buffer.from(O);return O}function L(O,B,T){let d=O;if(J.isReactNative(Y)&&J.isReactNativeBlob(O))return Y.append(S1(T,B,W),K(O)),!1;if(O&&!T&&typeof O==="object"){if(J.endsWith(B,"{}"))B=Q?B:B.slice(0,-2),O=JSON.stringify(O);else if(J.isArray(O)&&W6(O)||(J.isFileList(O)||J.endsWith(B,"[]"))&&(d=J.toArray(O)))return B=D2(B),d.forEach(function(S,h){!(J.isUndefined(S)||S===null)&&Y.append(N===!0?S1([B],h,W):N===null?B:B+"[]",K(S))}),!1}if(A1(O))return!0;return Y.append(S1(T,B,W),K(O)),!1}let _=[],P=Object.assign(N6,{defaultVisitor:L,convertValue:K,isVisitable:A1});function H(O,B,T=0){if(J.isUndefined(O))return;if(T>M)throw new z("Object is too deeply nested ("+T+" levels). Max depth: "+M,z.ERR_FORM_DATA_DEPTH_EXCEEDED);if(_.indexOf(O)!==-1)throw Error("Circular reference detected in "+B.join("."));_.push(O),J.forEach(O,function(E,S){if((!(J.isUndefined(E)||E===null)&&X.call(Y,E,J.isString(S)?S.trim():S,B,P))===!0)H(E,B?B.concat(S):[S],T+1)}),_.pop()}if(!J.isObject($))throw TypeError("data must be an object");return H($),Y}var N6,L0;var u0=F(()=>{q();i();D1();N6=J.toFlatObject(J,{},null,function(Y){return/^is[A-Z]/.test(Y)});L0=Z6});function S2($){let Y={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent($).replace(/[!'()~]|%20/g,function(Q){return Y[Q]})}function A2($,Y){this._pairs=[],$&&L0($,this,Y)}var w2,E2;var k2=F(()=>{u0();w2=A2.prototype;w2.append=function(Y,G){this._pairs.push([Y,G])};w2.toString=function(Y){let G=Y?function(Q){return Y.call(this,Q,S2)}:S2;return this._pairs.map(function(X){return G(X[0])+"="+G(X[1])},"").join("&")};E2=A2});function J6($){return encodeURIComponent($).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function U0($,Y,G){if(!Y)return $;let Q=G&&G.encode||J6,X=J.isFunction(G)?{serialize:G}:G,W=X&&X.serialize,N;if(W)N=W(Y,X);else N=J.isURLSearchParams(Y)?Y.toString():new E2(Y,X).toString(Q);if(N){let Z=$.indexOf("#");if(Z!==-1)$=$.slice(0,Z);$+=($.indexOf("?")===-1?"?":"&")+N}return $}var N1=F(()=>{q();k2()});class q2{constructor(){this.handlers=[]}use($,Y,G){return this.handlers.push({fulfilled:$,rejected:Y,synchronous:G?G.synchronous:!1,runWhen:G?G.runWhen:null}),this.handlers.length-1}eject($){if(this.handlers[$])this.handlers[$]=null}clear(){if(this.handlers)this.handlers=[]}forEach($){J.forEach(this.handlers,function(G){if(G!==null)$(G)})}}var w1;var x2=F(()=>{q();w1=q2});var z0;var c0=F(()=>{z0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0}});import M6 from"url";var j2;var v2=F(()=>{j2=M6.URLSearchParams});import V6 from"crypto";var E1="abcdefghijklmnopqrstuvwxyz",b2="0123456789",y2,K6=($=16,Y=y2.ALPHA_DIGIT)=>{let G="",{length:Q}=Y,X=new Uint32Array($);V6.randomFillSync(X);for(let W=0;W<$;W++)G+=Y[X[W]%Q];return G},f2;var h2=F(()=>{v2();D1();y2={DIGIT:b2,ALPHA:E1,ALPHA_DIGIT:E1+E1.toUpperCase()+b2},f2={isNode:!0,classes:{URLSearchParams:j2,FormData:W1,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:y2,generateString:K6,protocols:["http","https","file","data"]}});var x1={};L6(x1,{origin:()=>_6,navigator:()=>k1,hasStandardBrowserWebWorkerEnv:()=>B6,hasStandardBrowserEnv:()=>z6,hasBrowserEnv:()=>q1});var q1,k1,z6,B6,_6;var m2=F(()=>{q1=typeof window<"u"&&typeof document<"u",k1=typeof navigator==="object"&&navigator||void 0,z6=q1&&(!k1||["ReactNative","NativeScript","NS"].indexOf(k1.product)<0),B6=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),_6=q1&&window.location.href||"http://localhost"});var A;var Y0=F(()=>{h2();m2();A={...x1,...f2}});function j1($,Y){return L0($,new A.classes.URLSearchParams,{visitor:function(G,Q,X,W){if(A.isNode&&J.isBuffer(G))return this.append(Q,G.toString("base64")),!1;return W.defaultVisitor.apply(this,arguments)},...Y})}var g2=F(()=>{q();u0();Y0()});function H6($){return J.matchAll(/\w+|\[(\w*)]/g,$).map((Y)=>{return Y[0]==="[]"?"":Y[1]||Y[0]})}function P6($){let Y={},G=Object.keys($),Q,X=G.length,W;for(Q=0;Q<X;Q++)W=G[Q],Y[W]=$[W];return Y}function U6($){function Y(G,Q,X,W){let N=G[W++];if(N==="__proto__")return!0;let Z=Number.isFinite(+N),M=W>=G.length;if(N=!N&&J.isArray(X)?X.length:N,M){if(J.hasOwnProp(X,N))X[N]=J.isArray(X[N])?X[N].concat(Q):[X[N],Q];else X[N]=Q;return!Z}if(!X[N]||!J.isObject(X[N]))X[N]=[];if(Y(G,Q,X[N],W)&&J.isArray(X[N]))X[N]=P6(X[N]);return!Z}if(J.isFormData($)&&J.isFunction($.entries)){let G={};return J.forEachEntry($,(Q,X)=>{Y(H6(Q),X,G,0)}),G}return null}var Z1;var v1=F(()=>{q();Z1=U6});function O6($,Y,G){if(J.isString($))try{return(Y||JSON.parse)($),J.trim($)}catch(Q){if(Q.name!=="SyntaxError")throw Q}return(G||JSON.stringify)($)}var k0=($,Y)=>$!=null&&J.hasOwnProp($,Y)?$[Y]:void 0,b1,q0;var J1=F(()=>{q();i();c0();u0();g2();Y0();v1();b1={transitional:z0,adapter:["xhr","http","fetch"],transformRequest:[function(Y,G){let Q=G.getContentType()||"",X=Q.indexOf("application/json")>-1,W=J.isObject(Y);if(W&&J.isHTMLForm(Y))Y=new FormData(Y);if(J.isFormData(Y))return X?JSON.stringify(Z1(Y)):Y;if(J.isArrayBuffer(Y)||J.isBuffer(Y)||J.isStream(Y)||J.isFile(Y)||J.isBlob(Y)||J.isReadableStream(Y))return Y;if(J.isArrayBufferView(Y))return Y.buffer;if(J.isURLSearchParams(Y))return G.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),Y.toString();let Z;if(W){let M=k0(this,"formSerializer");if(Q.indexOf("application/x-www-form-urlencoded")>-1)return j1(Y,M).toString();if((Z=J.isFileList(Y))||Q.indexOf("multipart/form-data")>-1){let V=k0(this,"env"),K=V&&V.FormData;return L0(Z?{"files[]":Y}:Y,K&&new K,M)}}if(W||X)return G.setContentType("application/json",!1),O6(Y);return Y}],transformResponse:[function(Y){let G=k0(this,"transitional")||b1.transitional,Q=G&&G.forcedJSONParsing,X=k0(this,"responseType"),W=X==="json";if(J.isResponse(Y)||J.isReadableStream(Y))return Y;if(Y&&J.isString(Y)&&(Q&&!X||W)){let Z=!(G&&G.silentJSONParsing)&&W;try{return JSON.parse(Y,k0(this,"parseReviver"))}catch(M){if(Z){if(M.name==="SyntaxError")throw z.from(M,z.ERR_BAD_RESPONSE,this,null,k0(this,"response"));throw M}}}return Y}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(Y){return Y>=200&&Y<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],($)=>{b1.headers[$]={}});q0=b1});var C6,u2=($)=>{let Y={},G,Q,X;return $&&$.split(`
|
|
2
2
|
`).forEach(function(N){if(X=N.indexOf(":"),G=N.substring(0,X).trim().toLowerCase(),Q=N.substring(X+1).trim(),!G||Y[G]&&C6[G])return;if(G==="set-cookie")if(Y[G])Y[G].push(Q);else Y[G]=[Q];else Y[G]=Y[G]?Y[G]+", "+Q:Q}),Y};var c2=F(()=>{q();C6=J.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"])});function T6($){let Y=0,G=$.length;while(Y<G){let Q=$.charCodeAt(Y);if(Q!==9&&Q!==32)break;Y+=1}while(G>Y){let Q=$.charCodeAt(G-1);if(Q!==9&&Q!==32)break;G-=1}return Y===0&&G===$.length?$:$.slice(Y,G)}function l0($){return $&&String($).trim().toLowerCase()}function I6($){return T6($.replace(F6,""))}function M1($){if($===!1||$==null)return $;return J.isArray($)?$.map(M1):I6(String($))}function R6($){let Y=Object.create(null),G=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,Q;while(Q=G.exec($))Y[Q[1]]=Q[2];return Y}function y1($,Y,G,Q,X){if(J.isFunction(Q))return Q.call(this,Y,G);if(X)Y=G;if(!J.isString(Y))return;if(J.isString(Q))return Y.indexOf(Q)!==-1;if(J.isRegExp(Q))return Q.test(Y)}function S6($){return $.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(Y,G,Q)=>{return G.toUpperCase()+Q})}function A6($,Y){let G=J.toCamelCase(" "+Y);["get","set","has"].forEach((Q)=>{Object.defineProperty($,Q+G,{value:function(X,W,N){return this[Q].call(this,Y,X,W,N)},configurable:!0})})}var l2,F6,D6=($)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test($.trim()),d0,j;var N0=F(()=>{q();c2();l2=Symbol("internals"),F6=/[^\x09\x20-\x7E\x80-\xFF]/g;d0=class d0{constructor($){$&&this.set($)}set($,Y,G){let Q=this;function X(N,Z,M){let V=l0(Z);if(!V)throw Error("header name must be a non-empty string");let K=J.findKey(Q,V);if(!K||Q[K]===void 0||M===!0||M===void 0&&Q[K]!==!1)Q[K||Z]=M1(N)}let W=(N,Z)=>J.forEach(N,(M,V)=>X(M,V,Z));if(J.isPlainObject($)||$ instanceof this.constructor)W($,Y);else if(J.isString($)&&($=$.trim())&&!D6($))W(u2($),Y);else if(J.isObject($)&&J.isIterable($)){let N={},Z,M;for(let V of $){if(!J.isArray(V))throw TypeError("Object iterator must return a key-value pair");N[M=V[0]]=(Z=N[M])?J.isArray(Z)?[...Z,V[1]]:[Z,V[1]]:V[1]}W(N,Y)}else $!=null&&X(Y,$,G);return this}get($,Y){if($=l0($),$){let G=J.findKey(this,$);if(G){let Q=this[G];if(!Y)return Q;if(Y===!0)return R6(Q);if(J.isFunction(Y))return Y.call(this,Q,G);if(J.isRegExp(Y))return Y.exec(Q);throw TypeError("parser must be boolean|regexp|function")}}}has($,Y){if($=l0($),$){let G=J.findKey(this,$);return!!(G&&this[G]!==void 0&&(!Y||y1(this,this[G],G,Y)))}return!1}delete($,Y){let G=this,Q=!1;function X(W){if(W=l0(W),W){let N=J.findKey(G,W);if(N&&(!Y||y1(G,G[N],N,Y)))delete G[N],Q=!0}}if(J.isArray($))$.forEach(X);else X($);return Q}clear($){let Y=Object.keys(this),G=Y.length,Q=!1;while(G--){let X=Y[G];if(!$||y1(this,this[X],X,$,!0))delete this[X],Q=!0}return Q}normalize($){let Y=this,G={};return J.forEach(this,(Q,X)=>{let W=J.findKey(G,X);if(W){Y[W]=M1(Q),delete Y[X];return}let N=$?S6(X):String(X).trim();if(N!==X)delete Y[X];Y[N]=M1(Q),G[N]=!0}),this}concat(...$){return this.constructor.concat(this,...$)}toJSON($){let Y=Object.create(null);return J.forEach(this,(G,Q)=>{G!=null&&G!==!1&&(Y[Q]=$&&J.isArray(G)?G.join(", "):G)}),Y}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([$,Y])=>$+": "+Y).join(`
|
|
3
3
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from($){return $ instanceof this?$:new this($)}static concat($,...Y){let G=new this($);return Y.forEach((Q)=>G.set(Q)),G}static accessor($){let G=(this[l2]=this[l2]={accessors:{}}).accessors,Q=this.prototype;function X(W){let N=l0(W);if(!G[N])A6(Q,W),G[N]=!0}return J.isArray($)?$.forEach(X):X($),this}};d0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);J.reduceDescriptors(d0.prototype,({value:$},Y)=>{let G=Y[0].toUpperCase()+Y.slice(1);return{get:()=>$,set(Q){this[G]=Q}}});J.freezeMethods(d0);j=d0});function p0($,Y){let G=this||q0,Q=Y||G,X=j.from(Q.headers),W=Q.data;return J.forEach($,function(Z){W=Z.call(G,W,X.normalize(),Y?Y.status:void 0)}),X.normalize(),W}var d2=F(()=>{q();J1();N0()});function n0($){return!!($&&$.__CANCEL__)}var f1=()=>{};var p2,t;var O0=F(()=>{i();p2=class p2 extends z{constructor($,Y,G){super($==null?"canceled":$,z.ERR_CANCELED,Y,G);this.name="CanceledError",this.__CANCEL__=!0}};t=p2});function Z0($,Y,G){let Q=G.config.validateStatus;if(!G.status||!Q||Q(G.status))$(G);else Y(new z("Request failed with status code "+G.status,[z.ERR_BAD_REQUEST,z.ERR_BAD_RESPONSE][Math.floor(G.status/100)-4],G.config,G.request,G))}var V1=F(()=>{i()});function h1($){if(typeof $!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test($)}var n2=()=>{};function m1($,Y){return Y?$.replace(/\/?\/$/,"")+"/"+Y.replace(/^\/+/,""):$}var i2=()=>{};function C0($,Y,G){let Q=!h1(Y);if($&&(Q||G===!1))return m1($,Y);return Y}var K1=F(()=>{n2();i2()});var F0="1.15.2";var L1=()=>{};function i0($){let Y=/^([-+\w]{1,25})(:?\/\/|:)/.exec($);return Y&&Y[1]||""}var g1=()=>{};function u1($,Y,G){let Q=G&&G.Blob||A.classes.Blob,X=i0($);if(Y===void 0&&Q)Y=!0;if(X==="data"){$=X.length?$.slice(X.length+1):$;let W=w6.exec($);if(!W)throw new z("Invalid URL",z.ERR_INVALID_URL);let N=W[1],Z=W[2],M=W[3],V=Buffer.from(decodeURIComponent(M),Z?"base64":"utf8");if(Y){if(!Q)throw new z("Blob is not supported",z.ERR_NOT_SUPPORT);return new Q([V],{type:N})}return V}throw new z("Unsupported protocol "+X,z.ERR_NOT_SUPPORT)}var w6;var t2=F(()=>{i();g1();Y0();w6=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/});import E6 from"stream";var c1,a2,l1;var s2=F(()=>{q();c1=Symbol("internals");a2=class a2 extends E6.Transform{constructor($){$=J.toFlatObject($,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(G,Q)=>{return!J.isUndefined(Q[G])});super({readableHighWaterMark:$.chunkSize});let Y=this[c1]={timeWindow:$.timeWindow,chunkSize:$.chunkSize,maxRate:$.maxRate,minChunkSize:$.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(G)=>{if(G==="progress"){if(!Y.isCaptured)Y.isCaptured=!0}})}_read($){let Y=this[c1];if(Y.onReadCallback)Y.onReadCallback();return super._read($)}_transform($,Y,G){let Q=this[c1],X=Q.maxRate,W=this.readableHighWaterMark,N=Q.timeWindow,Z=1000/N,M=X/Z,V=Q.minChunkSize!==!1?Math.max(Q.minChunkSize,M*0.01):0,K=(_,P)=>{let H=Buffer.byteLength(_);if(Q.bytesSeen+=H,Q.bytes+=H,Q.isCaptured&&this.emit("progress",Q.bytesSeen),this.push(_))process.nextTick(P);else Q.onReadCallback=()=>{Q.onReadCallback=null,process.nextTick(P)}},L=(_,P)=>{let H=Buffer.byteLength(_),O=null,B=W,T,d=0;if(X){let E=Date.now();if(!Q.ts||(d=E-Q.ts)>=N)Q.ts=E,T=M-Q.bytes,Q.bytes=T<0?-T:0,d=0;T=M-Q.bytes}if(X){if(T<=0)return setTimeout(()=>{P(null,_)},N-d);if(T<B)B=T}if(B&&H>B&&H-B>V)O=_.subarray(B),_=_.subarray(0,B);K(_,O?()=>{process.nextTick(P,null,O)}:P)};L($,function _(P,H){if(P)return G(P);if(H)L(H,_);else G(null)})}};l1=a2});var o2,k6=async function*($){if($.stream)yield*$.stream();else if($.arrayBuffer)yield await $.arrayBuffer();else if($[o2])yield*$[o2]();else yield $},z1;var d1=F(()=>{({asyncIterator:o2}=Symbol),z1=k6});import q6 from"util";import{Readable as x6}from"stream";class e2{constructor($,Y){let{escapeName:G}=this.constructor,Q=J.isString(Y),X=`Content-Disposition: form-data; name="${G($)}"${!Q&&Y.name?`; filename="${G(Y.name)}"`:""}${T0}`;if(Q)Y=t0.encode(String(Y).replace(/\r?\n|\r\n?/g,T0));else{let W=String(Y.type||"application/octet-stream").replace(/[\r\n]/g,"");X+=`Content-Type: ${W}${T0}`}this.headers=t0.encode(X+T0),this.contentLength=Q?Y.byteLength:Y.size,this.size=this.headers.byteLength+this.contentLength+b6,this.name=$,this.value=Y}async*encode(){yield this.headers;let{value:$}=this;if(J.isTypedArray($))yield $;else yield*z1($);yield v6}static escapeName($){return String($).replace(/[\r\n"]/g,(Y)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[Y])}}var j6,t0,T0=`\r
|
|
4
4
|
`,v6,b6=2,y6=($,Y,G)=>{let{tag:Q="form-data-boundary",size:X=25,boundary:W=Q+"-"+A.generateString(X,j6)}=G||{};if(!J.isFormData($))throw TypeError("FormData instance required");if(W.length<1||W.length>70)throw Error("boundary must be 10-70 characters long");let N=t0.encode("--"+W+T0),Z=t0.encode("--"+W+"--"+T0),M=Z.byteLength,V=Array.from($.entries()).map(([L,_])=>{let P=new e2(L,_);return M+=P.size,P});M+=N.byteLength*V.length,M=J.toFiniteNumber(M);let K={"Content-Type":`multipart/form-data; boundary=${W}`};if(Number.isFinite(M))K["Content-Length"]=M;return Y&&Y(K),x6.from(async function*(){for(let L of V)yield N,yield*L.encode();yield Z}())},r2;var $4=F(()=>{q();d1();Y0();j6=A.ALPHABET.ALPHA_DIGIT+"-_",t0=typeof TextEncoder==="function"?new TextEncoder:new q6.TextEncoder,v6=t0.encode(T0);r2=y6});import f6 from"stream";var Y4,G4;var Q4=F(()=>{Y4=class Y4 extends f6.Transform{__transform($,Y,G){this.push($),G()}_transform($,Y,G){if($.length!==0){if(this._transform=this.__transform,$[0]!==120){let Q=Buffer.alloc(2);Q[0]=120,Q[1]=156,this.push(Q,Y)}}this.__transform($,Y,G)}};G4=Y4});var h6=($,Y)=>{return J.isAsyncFn($)?function(...G){let Q=G.pop();$.apply(this,G).then((X)=>{try{Y?Q(null,...Y(X)):Q(null,X)}catch(W){Q(W)}},Q)}:$},X4;var W4=F(()=>{q();X4=h6});function p1($){let Y;try{Y=new URL($)}catch(W){return!1}let G=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!G)return!1;if(G==="*")return!0;let Q=Number.parseInt(Y.port,10)||u6[Y.protocol.split(":",1)[0]]||0,X=Z4(Y.hostname.toLowerCase());return G.split(/[\s,]+/).some((W)=>{if(!W)return!1;let[N,Z]=c6(W);if(N=Z4(N),!N)return!1;if(Z&&Z!==Q)return!1;if(N.charAt(0)==="*")N=N.slice(1);if(N.charAt(0)===".")return X.endsWith(N);return X===N||N4(X)&&N4(N)})}var m6,J4=($)=>{let Y=$.split(".");if(Y.length!==4)return!1;if(Y[0]!=="127")return!1;return Y.every((G)=>/^\d+$/.test(G)&&Number(G)>=0&&Number(G)<=255)},g6=($)=>{if($==="::1")return!0;let Y=$.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(Y)return J4(Y[1]);let G=$.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(G){let X=parseInt(G[1],16);return X>=32512&&X<=32767}let Q=$.split(":");if(Q.length===8){for(let X=0;X<7;X++)if(!/^0+$/.test(Q[X]))return!1;return/^0*1$/.test(Q[7])}return!1},N4=($)=>{if(!$)return!1;if(m6.has($))return!0;if(J4($))return!0;return g6($)},u6,c6=($)=>{let Y=$,G=0;if(Y.charAt(0)==="["){let W=Y.indexOf("]");if(W!==-1){let N=Y.slice(1,W),Z=Y.slice(W+1);if(Z.charAt(0)===":"&&/^\d+$/.test(Z.slice(1)))G=Number.parseInt(Z.slice(1),10);return[N,G]}}let Q=Y.indexOf(":"),X=Y.lastIndexOf(":");if(Q!==-1&&Q===X&&/^\d+$/.test(Y.slice(X+1)))G=Number.parseInt(Y.slice(X+1),10),Y=Y.slice(0,X);return[Y,G]},Z4=($)=>{if(!$)return $;if($.charAt(0)==="["&&$.charAt($.length-1)==="]")$=$.slice(1,-1);return $.replace(/\.+$/,"")};var M4=F(()=>{m6=new Set(["localhost"]),u6={http:80,https:443,ws:80,wss:443,ftp:21}});function l6($,Y){$=$||10;let G=Array($),Q=Array($),X=0,W=0,N;return Y=Y!==void 0?Y:1000,function(M){let V=Date.now(),K=Q[W];if(!N)N=V;G[X]=M,Q[X]=V;let L=W,_=0;while(L!==X)_+=G[L++],L=L%$;if(X=(X+1)%$,X===W)W=(W+1)%$;if(V-N<Y)return;let P=K&&V-K;return P?Math.round(_*1000/P):void 0}}var V4;var K4=F(()=>{V4=l6});function d6($,Y){let G=0,Q=1000/Y,X,W,N=(V,K=Date.now())=>{if(G=K,X=null,W)clearTimeout(W),W=null;$(...V)};return[(...V)=>{let K=Date.now(),L=K-G;if(L>=Q)N(V,K);else if(X=V,!W)W=setTimeout(()=>{W=null,N(X)},Q-L)},()=>X&&N(X)]}var L4;var z4=F(()=>{L4=d6});var V0=($,Y,G=3)=>{let Q=0,X=V4(50,250);return L4((W)=>{let N=W.loaded,Z=W.lengthComputable?W.total:void 0,M=Z!=null?Math.min(N,Z):N,V=Math.max(0,M-Q),K=X(V);Q=Math.max(Q,M);let L={loaded:M,total:Z,progress:Z?M/Z:void 0,bytes:V,rate:K?K:void 0,estimated:K&&Z?(Z-M)/K:void 0,event:W,lengthComputable:Z!=null,[Y?"download":"upload"]:!0};$(L)},G)},x0=($,Y)=>{let G=$!=null;return[(Q)=>Y[0]({lengthComputable:G,total:$,loaded:Q}),Y[1]]},j0=($)=>(...Y)=>J.asap(()=>$(...Y));var B1=F(()=>{K4();z4();q()});function n1($){if(!$||typeof $!=="string")return 0;if(!$.startsWith("data:"))return 0;let Y=$.indexOf(",");if(Y<0)return 0;let G=$.slice(5,Y),Q=$.slice(Y+1);if(/;base64/i.test(G)){let{length:W,length:N}=Q;for(let _=0;_<N;_++)if(Q.charCodeAt(_)===37&&_+2<N){let P=Q.charCodeAt(_+1),H=Q.charCodeAt(_+2);if((P>=48&&P<=57||P>=65&&P<=70||P>=97&&P<=102)&&(H>=48&&H<=57||H>=65&&H<=70||H>=97&&H<=102))W-=2,_+=2}let Z=0,M=N-1,V=(_)=>_>=2&&Q.charCodeAt(_-2)===37&&Q.charCodeAt(_-1)===51&&(Q.charCodeAt(_)===68||Q.charCodeAt(_)===100);if(M>=0){if(Q.charCodeAt(M)===61)Z++,M--;else if(V(M))Z++,M-=3}if(Z===1&&M>=0){if(Q.charCodeAt(M)===61)Z++;else if(V(M))Z++}let L=Math.floor(W/4)*3-(Z||0);return L>0?L:0}return Buffer.byteLength(Q,"utf8")}var B4=()=>{};import i6 from"http";import t6 from"https";import I4 from"http2";import R4 from"util";import{resolve as _4}from"path";import B0 from"zlib";import G0 from"stream";import{EventEmitter as a6}from"events";class S4{constructor(){this.sessions=Object.create(null)}getSession($,Y){Y=Object.assign({sessionTimeout:1000},Y);let G=this.sessions[$];if(G){let V=G.length;for(let K=0;K<V;K++){let[L,_]=G[K];if(!L.destroyed&&!L.closed&&R4.isDeepStrictEqual(_,Y))return L}}let Q=I4.connect($,Y),X,W=()=>{if(X)return;X=!0;let V=G,K=V.length,L=K;while(L--)if(V[L][0]===Q){if(K===1)delete this.sessions[$];else V.splice(L,1);if(!Q.closed)Q.close();return}},N=Q.request,{sessionTimeout:Z}=Y;if(Z!=null){let V,K=0;Q.request=function(){let L=N.apply(this,arguments);if(K++,V)clearTimeout(V),V=null;return L.once("close",()=>{if(!--K)V=setTimeout(()=>{V=null,W()},Z)}),L}}Q.once("close",W);let M=[Q,Y];return G?G.push(M):G=this.sessions[$]=[M],Q}}function Y7($,Y){if($.beforeRedirects.proxy)$.beforeRedirects.proxy($);if($.beforeRedirects.config)$.beforeRedirects.config($,Y)}function A4($,Y,G){let Q=Y;if(!Q&&Q!==!1){let X=T4(G);if(X){if(!p1(G))Q=new URL(X)}}if(Q){if(Q.username)Q.auth=(Q.username||"")+":"+(Q.password||"");if(Q.auth){if(Boolean(Q.auth.username||Q.auth.password))Q.auth=(Q.auth.username||"")+":"+(Q.auth.password||"");else if(typeof Q.auth==="object")throw new z("Invalid proxy authorization",z.ERR_BAD_OPTION,{proxy:Q});let N=Buffer.from(Q.auth,"utf8").toString("base64");$.headers["Proxy-Authorization"]="Basic "+N}$.headers.host=$.hostname+($.port?":"+$.port:"");let X=Q.hostname||Q.host;if($.hostname=X,$.host=X,$.port=Q.port,$.path=G,Q.protocol)$.protocol=Q.protocol.includes(":")?Q.protocol:`${Q.protocol}:`}$.beforeRedirects.proxy=function(W){A4(W,Y,W.href)}}var D4,H4,s6,P4,o6,e6,r6,U4,_1,O4,C4=($,[Y,G])=>{return $.on("end",G).on("error",G),Y},$7,G7,Q7=($)=>{return new Promise((Y,G)=>{let Q,X,W=(M,V)=>{if(X)return;X=!0,Q&&Q(M,V)},N=(M)=>{W(M),Y(M)},Z=(M)=>{W(M,!0),G(M)};$(N,Z,(M)=>Q=M).catch(Z)})},X7=({address:$,family:Y})=>{if(!J.isString($))throw TypeError("address must be a string");return{address:$,family:Y||($.indexOf(".")<0?6:4)}},F4=($,Y)=>X7(J.isObject($)?$:{address:$,family:Y}),W7,w4;var E4=F(()=>{q();V1();K1();N1();p6();L1();c0();i();O0();Y0();t2();N0();s2();$4();d1();Q4();W4();M4();B1();B4();D4=I2(n6(),1),H4={flush:B0.constants.Z_SYNC_FLUSH,finishFlush:B0.constants.Z_SYNC_FLUSH},s6={flush:B0.constants.BROTLI_OPERATION_FLUSH,finishFlush:B0.constants.BROTLI_OPERATION_FLUSH},P4=J.isFunction(B0.createBrotliDecompress),{http:o6,https:e6}=D4.default,r6=/https:?/,U4=Symbol("axios.http.socketListener"),_1=Symbol("axios.http.currentReq"),O4=A.protocols.map(($)=>{return $+":"});$7=new S4;G7=typeof process<"u"&&J.kindOf(process)==="process",W7={request($,Y){let G=$.protocol+"//"+$.hostname+":"+($.port||($.protocol==="https:"?443:80)),{http2Options:Q,headers:X}=$,W=$7.getSession(G,Q),{HTTP2_HEADER_SCHEME:N,HTTP2_HEADER_METHOD:Z,HTTP2_HEADER_PATH:M,HTTP2_HEADER_STATUS:V}=I4.constants,K={[N]:$.protocol.replace(":",""),[Z]:$.method,[M]:$.path};J.forEach(X,(_,P)=>{P.charAt(0)!==":"&&(K[P]=_)});let L=W.request(K);return L.once("response",(_)=>{let P=L;_=Object.assign({},_);let H=_[V];delete _[V],P.headers=_,P.statusCode=+H,Y(P)}),L}},w4=G7&&function(Y){return Q7(async function(Q,X,W){let N=(I)=>J.hasOwnProp(Y,I)?Y[I]:void 0,Z=N("data"),M=N("lookup"),V=N("family"),K=N("httpVersion");if(K===void 0)K=1;let L=N("http2Options"),_=N("responseType"),P=N("responseEncoding"),H=Y.method.toUpperCase(),O,B=!1,T;if(K=+K,Number.isNaN(K))throw TypeError(`Invalid protocol version: '${Y.httpVersion}' is not a number`);if(K!==1&&K!==2)throw TypeError(`Unsupported protocol version '${K}'`);let d=K===2;if(M){let I=X4(M,(C)=>J.isArray(C)?C:[C]);M=(C,w,v)=>{I(C,w,(x,p,M0)=>{if(x)return v(x);let y=J.isArray(p)?p.map((A0)=>F4(A0)):[F4(p,M0)];w.all?v(x,y):v(x,y[0].address,y[0].family)})}}let E=new a6;function S(I){try{E.emit("abort",!I||I.type?new t(null,Y,T):I)}catch(C){console.warn("emit error",C)}}E.once("abort",X);let h=()=>{if(Y.cancelToken)Y.cancelToken.unsubscribe(S);if(Y.signal)Y.signal.removeEventListener("abort",S);E.removeAllListeners()};if(Y.cancelToken||Y.signal){if(Y.cancelToken&&Y.cancelToken.subscribe(S),Y.signal)Y.signal.aborted?S():Y.signal.addEventListener("abort",S)}W((I,C)=>{if(O=!0,C){B=!0,h();return}let{data:w}=I;if(w instanceof G0.Readable||w instanceof G0.Duplex){let v=G0.finished(w,()=>{v(),h()})}else h()});let X0=C0(Y.baseURL,Y.url,Y.allowAbsoluteUrls),k=new URL(X0,A.hasBrowserEnv?A.origin:void 0),e=k.protocol||O4[0];if(e==="data:"){if(Y.maxContentLength>-1){let C=String(Y.url||X0||"");if(n1(C)>Y.maxContentLength)return X(new z("maxContentLength size of "+Y.maxContentLength+" exceeded",z.ERR_BAD_RESPONSE,Y))}let I;if(H!=="GET")return Z0(Q,X,{status:405,statusText:"method not allowed",headers:{},config:Y});try{I=u1(Y.url,_==="blob",{Blob:Y.env&&Y.env.Blob})}catch(C){throw z.from(C,z.ERR_BAD_REQUEST,Y)}if(_==="text"){if(I=I.toString(P),!P||P==="utf8")I=J.stripBOM(I)}else if(_==="stream")I=G0.Readable.from(I);return Z0(Q,X,{data:I,status:200,statusText:"OK",headers:new j,config:Y})}if(O4.indexOf(e)===-1)return X(new z("Unsupported protocol "+e,z.ERR_BAD_REQUEST,Y));let m=j.from(Y.headers).normalize();m.set("User-Agent","axios/"+F0,!1);let{onUploadProgress:R0,onDownloadProgress:D0}=Y,J0=Y.maxRate,W0=void 0,s=void 0;if(J.isSpecCompliantForm(Z)){let I=m.getContentType(/boundary=([-_\w\d]{10,70})/i);Z=r2(Z,(C)=>{m.set(C)},{tag:`axios-${F0}-boundary`,boundary:I&&I[1]||void 0})}else if(J.isFormData(Z)&&J.isFunction(Z.getHeaders)&&Z.getHeaders!==Object.prototype.getHeaders){if(m.set(Z.getHeaders()),!m.hasContentLength())try{let I=await R4.promisify(Z.getLength).call(Z);Number.isFinite(I)&&I>=0&&m.setContentLength(I)}catch(I){}}else if(J.isBlob(Z)||J.isFile(Z))Z.size&&m.setContentType(Z.type||"application/octet-stream"),m.setContentLength(Z.size||0),Z=G0.Readable.from(z1(Z));else if(Z&&!J.isStream(Z)){if(Buffer.isBuffer(Z));else if(J.isArrayBuffer(Z))Z=Buffer.from(new Uint8Array(Z));else if(J.isString(Z))Z=Buffer.from(Z,"utf-8");else return X(new z("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",z.ERR_BAD_REQUEST,Y));if(m.setContentLength(Z.length,!1),Y.maxBodyLength>-1&&Z.length>Y.maxBodyLength)return X(new z("Request body larger than maxBodyLength limit",z.ERR_BAD_REQUEST,Y))}let r0=J.toFiniteNumber(m.getContentLength());if(J.isArray(J0))W0=J0[0],s=J0[1];else W0=s=J0;if(Z&&(R0||W0)){if(!J.isStream(Z))Z=G0.Readable.from(Z,{objectMode:!1});Z=G0.pipeline([Z,new l1({maxRate:J.toFiniteNumber(W0)})],J.noop),R0&&Z.on("progress",C4(Z,x0(r0,V0(j0(R0),!1,3))))}let b=void 0,S0=N("auth");if(S0){let I=S0.username||"",C=S0.password||"";b=I+":"+C}if(!b&&k.username){let{username:I,password:C}=k;b=I+":"+C}b&&m.delete("authorization");let r;try{r=U0(k.pathname+k.search,Y.params,Y.paramsSerializer).replace(/^\?/,"")}catch(I){let C=Error(I.message);return C.config=Y,C.url=Y.url,C.exists=!0,X(C)}m.set("Accept-Encoding","gzip, compress, deflate"+(P4?", br":""),!1);let u=Object.assign(Object.create(null),{path:r,method:H,headers:m.toJSON(),agents:{http:Y.httpAgent,https:Y.httpsAgent},auth:b,protocol:e,family:V,beforeRedirect:Y7,beforeRedirects:Object.create(null),http2Options:L});if(!J.isUndefined(M)&&(u.lookup=M),Y.socketPath){if(typeof Y.socketPath!=="string")return X(new z("socketPath must be a string",z.ERR_BAD_OPTION_VALUE,Y));if(Y.allowedSocketPaths!=null){let I=Array.isArray(Y.allowedSocketPaths)?Y.allowedSocketPaths:[Y.allowedSocketPaths],C=_4(Y.socketPath);if(!I.some((v)=>typeof v==="string"&&_4(v)===C))return X(new z(`socketPath "${Y.socketPath}" is not permitted by allowedSocketPaths`,z.ERR_BAD_OPTION_VALUE,Y))}u.socketPath=Y.socketPath}else u.hostname=k.hostname.startsWith("[")?k.hostname.slice(1,-1):k.hostname,u.port=k.port,A4(u,Y.proxy,e+"//"+k.hostname+(k.port?":"+k.port:"")+u.path);let H0,c=r6.test(u.protocol);if(u.agent=c?Y.httpsAgent:Y.httpAgent,d)H0=W7;else{let I=N("transport");if(I)H0=I;else if(Y.maxRedirects===0)H0=c?t6:i6;else{if(Y.maxRedirects)u.maxRedirects=Y.maxRedirects;let C=N("beforeRedirect");if(C)u.beforeRedirects.config=C;H0=c?e6:o6}}if(Y.maxBodyLength>-1)u.maxBodyLength=Y.maxBodyLength;else u.maxBodyLength=1/0;if(u.insecureHTTPParser=Boolean(N("insecureHTTPParser")),T=H0.request(u,function(C){if(T.destroyed)return;let w=[C],v=J.toFiniteNumber(C.headers["content-length"]);if(D0||s){let y=new l1({maxRate:J.toFiniteNumber(s)});D0&&y.on("progress",C4(y,x0(v,V0(j0(D0),!0,3)))),w.push(y)}let x=C,p=C.req||T;if(Y.decompress!==!1&&C.headers["content-encoding"]){if(H==="HEAD"||C.statusCode===204)delete C.headers["content-encoding"];switch((C.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":w.push(B0.createUnzip(H4)),delete C.headers["content-encoding"];break;case"deflate":w.push(new G4),w.push(B0.createUnzip(H4)),delete C.headers["content-encoding"];break;case"br":if(P4)w.push(B0.createBrotliDecompress(s6)),delete C.headers["content-encoding"]}}x=w.length>1?G0.pipeline(w,J.noop):w[0];let M0={status:C.statusCode,statusText:C.statusMessage,headers:new j(C.headers),config:Y,request:p};if(_==="stream"){if(Y.maxContentLength>-1){let y=Y.maxContentLength,A0=x;async function*y0(){let g=0;for await(let L2 of A0){if(g+=L2.length,g>y)throw new z("maxContentLength size of "+y+" exceeded",z.ERR_BAD_RESPONSE,Y,p);yield L2}}x=G0.Readable.from(y0(),{objectMode:!1})}M0.data=x,Z0(Q,X,M0)}else{let y=[],A0=0;x.on("data",function(g){if(y.push(g),A0+=g.length,Y.maxContentLength>-1&&A0>Y.maxContentLength)B=!0,x.destroy(),S(new z("maxContentLength size of "+Y.maxContentLength+" exceeded",z.ERR_BAD_RESPONSE,Y,p))}),x.on("aborted",function(){if(B)return;let g=new z("stream has been aborted",z.ERR_BAD_RESPONSE,Y,p);x.destroy(g),X(g)}),x.on("error",function(g){if(T.destroyed)return;X(z.from(g,null,Y,p))}),x.on("end",function(){try{let g=y.length===1?y[0]:Buffer.concat(y);if(_!=="arraybuffer"){if(g=g.toString(P),!P||P==="utf8")g=J.stripBOM(g)}M0.data=g}catch(g){return X(z.from(g,null,Y,M0.request,M0))}Z0(Q,X,M0)})}E.once("abort",(y)=>{if(!x.destroyed)x.emit("error",y),x.destroy()})}),E.once("abort",(I)=>{if(T.close)T.close();else T.destroy(I)}),T.on("error",function(C){X(z.from(C,null,Y,T))}),T.on("socket",function(C){if(C.setKeepAlive(!0,60000),!C[U4])C.on("error",function(v){let x=C[_1];if(x&&!x.destroyed)x.destroy(v)}),C[U4]=!0;C[_1]=T,T.once("close",function(){if(C[_1]===T)C[_1]=null})}),Y.timeout){let I=parseInt(Y.timeout,10);if(Number.isNaN(I)){S(new z("error trying to parse `config.timeout` to int",z.ERR_BAD_OPTION_VALUE,Y,T));return}T.setTimeout(I,function(){if(O)return;let w=Y.timeout?"timeout of "+Y.timeout+"ms exceeded":"timeout exceeded",v=Y.transitional||z0;if(Y.timeoutErrorMessage)w=Y.timeoutErrorMessage;S(new z(w,v.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,Y,T))})}else T.setTimeout(0);if(J.isStream(Z)){let I=!1,C=!1;Z.on("end",()=>{I=!0}),Z.once("error",(v)=>{C=!0,T.destroy(v)}),Z.on("close",()=>{if(!I&&!C)S(new t("Request stream has been aborted",Y,T))});let w=Z;if(Y.maxBodyLength>-1&&Y.maxRedirects===0){let v=Y.maxBodyLength,x=0;w=G0.pipeline([Z,new G0.Transform({transform(p,M0,y){if(x+=p.length,x>v)return y(new z("Request body larger than maxBodyLength limit",z.ERR_BAD_REQUEST,Y,T));y(null,p)}})],J.noop),w.on("error",(p)=>{if(!T.destroyed)T.destroy(p)})}w.pipe(T)}else Z&&T.write(Z),T.end()})}});var k4;var q4=F(()=>{Y0();k4=A.hasStandardBrowserEnv?(($,Y)=>(G)=>{return G=new URL(G,A.origin),$.protocol===G.protocol&&$.host===G.host&&(Y||$.port===G.port)})(new URL(A.origin),A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent)):()=>!0});var x4;var j4=F(()=>{q();Y0();x4=A.hasStandardBrowserEnv?{write($,Y,G,Q,X,W,N){if(typeof document>"u")return;let Z=[`${$}=${encodeURIComponent(Y)}`];if(J.isNumber(G))Z.push(`expires=${new Date(G).toUTCString()}`);if(J.isString(Q))Z.push(`path=${Q}`);if(J.isString(X))Z.push(`domain=${X}`);if(W===!0)Z.push("secure");if(J.isString(N))Z.push(`SameSite=${N}`);document.cookie=Z.join("; ")},read($){if(typeof document>"u")return null;let Y=document.cookie.match(new RegExp("(?:^|; )"+$+"=([^;]*)"));return Y?decodeURIComponent(Y[1]):null},remove($){this.write($,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}}});function Q0($,Y){Y=Y||{};let G=Object.create(null);Object.defineProperty(G,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function Q(V,K,L,_){if(J.isPlainObject(V)&&J.isPlainObject(K))return J.merge.call({caseless:_},V,K);else if(J.isPlainObject(K))return J.merge({},K);else if(J.isArray(K))return K.slice();return K}function X(V,K,L,_){if(!J.isUndefined(K))return Q(V,K,L,_);else if(!J.isUndefined(V))return Q(void 0,V,L,_)}function W(V,K){if(!J.isUndefined(K))return Q(void 0,K)}function N(V,K){if(!J.isUndefined(K))return Q(void 0,K);else if(!J.isUndefined(V))return Q(void 0,V)}function Z(V,K,L){if(J.hasOwnProp(Y,L))return Q(V,K);else if(J.hasOwnProp($,L))return Q(void 0,V)}let M={url:W,method:W,data:W,baseURL:N,transformRequest:N,transformResponse:N,paramsSerializer:N,timeout:N,timeoutMessage:N,withCredentials:N,withXSRFToken:N,adapter:N,responseType:N,xsrfCookieName:N,xsrfHeaderName:N,onUploadProgress:N,onDownloadProgress:N,decompress:N,maxContentLength:N,maxBodyLength:N,beforeRedirect:N,transport:N,httpAgent:N,httpsAgent:N,cancelToken:N,socketPath:N,allowedSocketPaths:N,responseEncoding:N,validateStatus:Z,headers:(V,K,L)=>X(v4(V),v4(K),L,!0)};return J.forEach(Object.keys({...$,...Y}),function(K){if(K==="__proto__"||K==="constructor"||K==="prototype")return;let L=J.hasOwnProp(M,K)?M[K]:X,_=J.hasOwnProp($,K)?$[K]:void 0,P=J.hasOwnProp(Y,K)?Y[K]:void 0,H=L(_,P,K);J.isUndefined(H)&&L!==Z||(G[K]=H)}),G}var v4=($)=>$ instanceof j?{...$}:$;var H1=F(()=>{q();N0()});var P1=($)=>{let Y=Q0({},$),G=(_)=>J.hasOwnProp(Y,_)?Y[_]:void 0,Q=G("data"),X=G("withXSRFToken"),W=G("xsrfHeaderName"),N=G("xsrfCookieName"),Z=G("headers"),M=G("auth"),V=G("baseURL"),K=G("allowAbsoluteUrls"),L=G("url");if(Y.headers=Z=j.from(Z),Y.url=U0(C0(V,L,K),$.params,$.paramsSerializer),M)Z.set("Authorization","Basic "+btoa((M.username||"")+":"+(M.password?unescape(encodeURIComponent(M.password)):"")));if(J.isFormData(Q)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)Z.setContentType(void 0);else if(J.isFunction(Q.getHeaders)){let _=Q.getHeaders(),P=["content-type","content-length"];Object.entries(_).forEach(([H,O])=>{if(P.includes(H.toLowerCase()))Z.set(H,O)})}}if(A.hasStandardBrowserEnv){if(J.isFunction(X))X=X(Y);if(X===!0||X==null&&k4(Y.url)){let P=W&&N&&x4.read(N);if(P)Z.set(W,P)}}return Y};var i1=F(()=>{Y0();q();q4();j4();K1();H1();N0();N1()});var N7,b4;var y4=F(()=>{q();V1();c0();i();O0();g1();Y0();N0();B1();i1();N7=typeof XMLHttpRequest<"u",b4=N7&&function($){return new Promise(function(G,Q){let X=P1($),W=X.data,N=j.from(X.headers).normalize(),{responseType:Z,onUploadProgress:M,onDownloadProgress:V}=X,K,L,_,P,H;function O(){P&&P(),H&&H(),X.cancelToken&&X.cancelToken.unsubscribe(K),X.signal&&X.signal.removeEventListener("abort",K)}let B=new XMLHttpRequest;B.open(X.method.toUpperCase(),X.url,!0),B.timeout=X.timeout;function T(){if(!B)return;let E=j.from("getAllResponseHeaders"in B&&B.getAllResponseHeaders()),h={data:!Z||Z==="text"||Z==="json"?B.responseText:B.response,status:B.status,statusText:B.statusText,headers:E,config:$,request:B};Z0(function(k){G(k),O()},function(k){Q(k),O()},h),B=null}if("onloadend"in B)B.onloadend=T;else B.onreadystatechange=function(){if(!B||B.readyState!==4)return;if(B.status===0&&!(B.responseURL&&B.responseURL.indexOf("file:")===0))return;setTimeout(T)};if(B.onabort=function(){if(!B)return;Q(new z("Request aborted",z.ECONNABORTED,$,B)),B=null},B.onerror=function(S){let h=S&&S.message?S.message:"Network Error",X0=new z(h,z.ERR_NETWORK,$,B);X0.event=S||null,Q(X0),B=null},B.ontimeout=function(){let S=X.timeout?"timeout of "+X.timeout+"ms exceeded":"timeout exceeded",h=X.transitional||z0;if(X.timeoutErrorMessage)S=X.timeoutErrorMessage;Q(new z(S,h.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,$,B)),B=null},W===void 0&&N.setContentType(null),"setRequestHeader"in B)J.forEach(N.toJSON(),function(S,h){B.setRequestHeader(h,S)});if(!J.isUndefined(X.withCredentials))B.withCredentials=!!X.withCredentials;if(Z&&Z!=="json")B.responseType=X.responseType;if(V)[_,H]=V0(V,!0),B.addEventListener("progress",_);if(M&&B.upload)[L,P]=V0(M),B.upload.addEventListener("progress",L),B.upload.addEventListener("loadend",P);if(X.cancelToken||X.signal){if(K=(E)=>{if(!B)return;Q(!E||E.type?new t(null,$,B):E),B.abort(),B=null},X.cancelToken&&X.cancelToken.subscribe(K),X.signal)X.signal.aborted?K():X.signal.addEventListener("abort",K)}let d=i0(X.url);if(d&&A.protocols.indexOf(d)===-1){Q(new z("Unsupported protocol "+d+":",z.ERR_BAD_REQUEST,$));return}B.send(W||null)})}});var Z7=($,Y)=>{let{length:G}=$=$?$.filter(Boolean):[];if(Y||G){let Q=new AbortController,X,W=function(V){if(!X){X=!0,Z();let K=V instanceof Error?V:this.reason;Q.abort(K instanceof z?K:new t(K instanceof Error?K.message:K))}},N=Y&&setTimeout(()=>{N=null,W(new z(`timeout of ${Y}ms exceeded`,z.ETIMEDOUT))},Y),Z=()=>{if($)N&&clearTimeout(N),N=null,$.forEach((V)=>{V.unsubscribe?V.unsubscribe(W):V.removeEventListener("abort",W)}),$=null};$.forEach((V)=>V.addEventListener("abort",W));let{signal:M}=Q;return M.unsubscribe=()=>J.asap(Z),M}},f4;var h4=F(()=>{O0();i();q();f4=Z7});var J7=function*($,Y){let G=$.byteLength;if(!Y||G<Y){yield $;return}let Q=0,X;while(Q<G)X=Q+Y,yield $.slice(Q,X),Q=X},M7=async function*($,Y){for await(let G of V7($))yield*J7(G,Y)},V7=async function*($){if($[Symbol.asyncIterator]){yield*$;return}let Y=$.getReader();try{for(;;){let{done:G,value:Q}=await Y.read();if(G)break;yield Q}}finally{await Y.cancel()}},t1=($,Y,G,Q)=>{let X=M7($,Y),W=0,N,Z=(M)=>{if(!N)N=!0,Q&&Q(M)};return new ReadableStream({async pull(M){try{let{done:V,value:K}=await X.next();if(V){Z(),M.close();return}let L=K.byteLength;if(G){let _=W+=L;G(_)}M.enqueue(new Uint8Array(K))}catch(V){throw Z(V),V}},cancel(M){return Z(M),X.return()}},{highWaterMark:2})};var m4=()=>{};var g4=65536,U1,K7,u4,c4,l4=($,...Y)=>{try{return!!$(...Y)}catch(G){return!1}},L7=($)=>{$=J.merge.call({skipUndefined:!0},K7,$);let{fetch:Y,Request:G,Response:Q}=$,X=Y?U1(Y):typeof fetch==="function",W=U1(G),N=U1(Q);if(!X)return!1;let Z=X&&U1(u4),M=X&&(typeof c4==="function"?((H)=>(O)=>H.encode(O))(new c4):async(H)=>new Uint8Array(await new G(H).arrayBuffer())),V=W&&Z&&l4(()=>{let H=!1,O=new G(A.origin,{body:new u4,method:"POST",get duplex(){return H=!0,"half"}}),B=O.headers.has("Content-Type");if(O.body!=null)O.body.cancel();return H&&!B}),K=N&&Z&&l4(()=>J.isReadableStream(new Q("").body)),L={stream:K&&((H)=>H.body)};X&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((H)=>{!L[H]&&(L[H]=(O,B)=>{let T=O&&O[H];if(T)return T.call(O);throw new z(`Response type '${H}' is not supported`,z.ERR_NOT_SUPPORT,B)})})})();let _=async(H)=>{if(H==null)return 0;if(J.isBlob(H))return H.size;if(J.isSpecCompliantForm(H))return(await new G(A.origin,{method:"POST",body:H}).arrayBuffer()).byteLength;if(J.isArrayBufferView(H)||J.isArrayBuffer(H))return H.byteLength;if(J.isURLSearchParams(H))H=H+"";if(J.isString(H))return(await M(H)).byteLength},P=async(H,O)=>{let B=J.toFiniteNumber(H.getContentLength());return B==null?_(O):B};return async(H)=>{let{url:O,method:B,data:T,signal:d,cancelToken:E,timeout:S,onDownloadProgress:h,onUploadProgress:X0,responseType:k,headers:e,withCredentials:m="same-origin",fetchOptions:R0}=P1(H),D0=Y||fetch;k=k?(k+"").toLowerCase():"text";let J0=f4([d,E&&E.toAbortSignal()],S),W0=null,s=J0&&J0.unsubscribe&&(()=>{J0.unsubscribe()}),r0;try{if(X0&&V&&B!=="get"&&B!=="head"&&(r0=await P(e,T))!==0){let c=new G(O,{method:"POST",body:T,duplex:"half"}),I;if(J.isFormData(T)&&(I=c.headers.get("content-type")))e.setContentType(I);if(c.body){let[C,w]=x0(r0,V0(j0(X0)));T=t1(c.body,g4,C,w)}}if(!J.isString(m))m=m?"include":"omit";let b=W&&"credentials"in G.prototype;if(J.isFormData(T)){let c=e.getContentType();if(c&&/^multipart\/form-data/i.test(c)&&!/boundary=/i.test(c))e.delete("content-type")}let S0={...R0,signal:J0,method:B.toUpperCase(),headers:e.normalize().toJSON(),body:T,duplex:"half",credentials:b?m:void 0};W0=W&&new G(O,S0);let r=await(W?D0(W0,R0):D0(O,S0)),u=K&&(k==="stream"||k==="response");if(K&&(h||u&&s)){let c={};["status","statusText","headers"].forEach((v)=>{c[v]=r[v]});let I=J.toFiniteNumber(r.headers.get("content-length")),[C,w]=h&&x0(I,V0(j0(h),!0))||[];r=new Q(t1(r.body,g4,C,()=>{w&&w(),s&&s()}),c)}k=k||"text";let H0=await L[J.findKey(L,k)||"text"](r,H);return!u&&s&&s(),await new Promise((c,I)=>{Z0(c,I,{data:H0,headers:j.from(r.headers),status:r.status,statusText:r.statusText,config:H,request:W0})})}catch(b){if(s&&s(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message))throw Object.assign(new z("Network Error",z.ERR_NETWORK,H,W0,b&&b.response),{cause:b.cause||b});throw z.from(b,b&&b.code,H,W0,b&&b.response)}}},z7,a1=($)=>{let Y=$&&$.env||{},{fetch:G,Request:Q,Response:X}=Y,W=[Q,X,G],N=W.length,Z=N,M,V,K=z7;while(Z--)M=W[Z],V=K.get(M),V===void 0&&K.set(M,V=Z?new Map:L7(Y)),K=V;return V},SY;var d4=F(()=>{Y0();q();i();h4();m4();N0();B1();i1();V1();({isFunction:U1}=J),K7=(({Request:$,Response:Y})=>({Request:$,Response:Y}))(J.global),{ReadableStream:u4,TextEncoder:c4}=J.global,z7=new Map,SY=a1()});function H7($,Y){$=J.isArray($)?$:[$];let{length:G}=$,Q,X,W={};for(let N=0;N<G;N++){Q=$[N];let Z;if(X=Q,!_7(Q)){if(X=s1[(Z=String(Q)).toLowerCase()],X===void 0)throw new z(`Unknown adapter '${Z}'`)}if(X&&(J.isFunction(X)||(X=X.get(Y))))break;W[Z||"#"+N]=X}if(!X){let N=Object.entries(W).map(([M,V])=>`adapter ${M} `+(V===!1?"is not supported by the environment":"is not available in the build")),Z=G?N.length>1?`since :
|
|
@@ -7,4 +7,4 @@ import"./cli-0.1.14-ydm3fwx1.mjs";import{Ag as C7,zg as Z5}from"./cli-0.1.14-tqe
|
|
|
7
7
|
`);return W===-1?"":Q.stack.slice(W+1)})();try{if(!G.stack)G.stack=X;else if(X){let W=X.indexOf(`
|
|
8
8
|
`),N=W===-1?-1:X.indexOf(`
|
|
9
9
|
`,W+1),Z=N===-1?"":X.slice(N+1);if(!String(G.stack).endsWith(Z))G.stack+=`
|
|
10
|
-
`+X}}catch(W){}}throw G}}_request($,Y){if(typeof $==="string")Y=Y||{},Y.url=$;else Y=$||{};Y=Q0(this.defaults,Y);let{transitional:G,paramsSerializer:Q,headers:X}=Y;if(G!==void 0)a0.assertOptions(G,{silentJSONParsing:o.transitional(o.boolean),forcedJSONParsing:o.transitional(o.boolean),clarifyTimeoutError:o.transitional(o.boolean),legacyInterceptorReqResOrdering:o.transitional(o.boolean)},!1);if(Q!=null)if(J.isFunction(Q))Y.paramsSerializer={serialize:Q};else a0.assertOptions(Q,{encode:o.function,serialize:o.function},!0);if(Y.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)Y.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else Y.allowAbsoluteUrls=!0;a0.assertOptions(Y,{baseUrl:o.spelling("baseURL"),withXsrfToken:o.spelling("withXSRFToken")},!0),Y.method=(Y.method||this.defaults.method||"get").toLowerCase();let W=X&&J.merge(X.common,X[Y.method]);X&&J.forEach(["delete","get","head","post","put","patch","common"],(P)=>{delete X[P]}),Y.headers=j.concat(W,X);let N=[],Z=!0;this.interceptors.request.forEach(function(H){if(typeof H.runWhen==="function"&&H.runWhen(Y)===!1)return;Z=Z&&H.synchronous;let O=Y.transitional||z0;if(O&&O.legacyInterceptorReqResOrdering)N.unshift(H.fulfilled,H.rejected);else N.push(H.fulfilled,H.rejected)});let M=[];this.interceptors.response.forEach(function(H){M.push(H.fulfilled,H.rejected)});let V,K=0,L;if(!Z){let P=[C1.bind(this),void 0];P.unshift(...N),P.push(...M),L=P.length,V=Promise.resolve(Y);while(K<L)V=V.then(P[K++],P[K++]);return V}L=N.length;let _=Y;while(K<L){let P=N[K++],H=N[K++];try{_=P(_)}catch(O){H.call(this,O);break}}try{V=C1.call(this,_)}catch(P){return Promise.reject(P)}K=0,L=M.length;while(K<L)V=V.then(M[K++],M[K++]);return V}getUri($){$=Q0(this.defaults,$);let Y=C0($.baseURL,$.url,$.allowAbsoluteUrls);return U0(Y,$.params,$.paramsSerializer)}}var o,o0;var a4=F(()=>{q();N1();x2();n4();H1();K1();t4();N0();c0();o=a0.validators;J.forEach(["delete","get","head","options"],function(Y){s0.prototype[Y]=function(G,Q){return this.request(Q0(Q||{},{method:Y,url:G,data:(Q||{}).data}))}});J.forEach(["post","put","patch"],function(Y){function G(Q){return function(W,N,Z){return this.request(Q0(Z||{},{method:Y,headers:Q?{"Content-Type":"multipart/form-data"}:{},url:W,data:N}))}}s0.prototype[Y]=G(),s0.prototype[Y+"Form"]=G(!0)});o0=s0});class r1{constructor($){if(typeof $!=="function")throw TypeError("executor must be a function.");let Y;this.promise=new Promise(function(X){Y=X});let G=this;this.promise.then((Q)=>{if(!G._listeners)return;let X=G._listeners.length;while(X-- >0)G._listeners[X](Q);G._listeners=null}),this.promise.then=(Q)=>{let X,W=new Promise((N)=>{G.subscribe(N),X=N}).then(Q);return W.cancel=function(){G.unsubscribe(X)},W},$(function(X,W,N){if(G.reason)return;G.reason=new t(X,W,N),Y(G.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe($){if(this.reason){$(this.reason);return}if(this._listeners)this._listeners.push($);else this._listeners=[$]}unsubscribe($){if(!this._listeners)return;let Y=this._listeners.indexOf($);if(Y!==-1)this._listeners.splice(Y,1)}toAbortSignal(){let $=new AbortController,Y=(G)=>{$.abort(G)};return this.subscribe(Y),$.signal.unsubscribe=()=>this.unsubscribe(Y),$.signal}static source(){let $;return{token:new r1(function(Q){$=Q}),cancel:$}}}var s4;var o4=F(()=>{O0();s4=r1});function $2($){return function(G){return $.apply(null,G)}}var e4=()=>{};function Y2($){return J.isObject($)&&$.isAxiosError===!0}var r4=F(()=>{q()});var G2,$5;var Y5=F(()=>{G2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(G2).forEach(([$,Y])=>{G2[Y]=$});$5=G2});function G5($){let Y=new o0($),G=f0(o0.prototype.request,Y);return J.extend(G,o0.prototype,Y,{allOwnKeys:!0}),J.extend(G,Y,null,{allOwnKeys:!0}),G.create=function(X){return G5(Q0($,X))},G}var f,K0;var Q5=F(()=>{q();I1();a4();H1();J1();v1();O0();o4();f1();L1();u0();i();e4();r4();N0();o1();Y5();f=G5(q0);f.Axios=o0;f.CanceledError=t;f.CancelToken=s4;f.isCancel=n0;f.VERSION=F0;f.toFormData=L0;f.AxiosError=z;f.Cancel=f.CanceledError;f.all=function(Y){return Promise.all(Y)};f.spread=$2;f.isAxiosError=Y2;f.mergeConfig=Q0;f.AxiosHeaders=j;f.formToJSON=($)=>Z1(J.isHTMLForm($)?new FormData($):$);f.getAdapter=O1.getAdapter;f.HttpStatusCode=$5;f.default=f;K0=f});var IG,T1,RG,DG,SG,AG,wG,EG,kG,qG,xG,jG,vG,bG,yG,fG;var Q2=F(()=>{Q5();({Axios:IG,AxiosError:T1,CanceledError:RG,isCancel:DG,CancelToken:SG,VERSION:AG,all:wG,Cancel:EG,isAxiosError:kG,spread:qG,toFormData:xG,AxiosHeaders:jG,HttpStatusCode:vG,formToJSON:bG,getAdapter:yG,mergeConfig:fG}=K0)});import{EventEmitter as P$}from"events";function J5(){try{if(typeof process<"u"&&process.env&&process.env.npm_package_version)return process.env.npm_package_version;return Z5()?.version||"3.x.x"}catch{return"3.x.x"}}function b0($){if(!$||typeof $!=="object")return!1;let Y=$,G="_def"in Y&&(typeof Y.safeParse==="function"||typeof Y.parse==="function"),Q="_zod"in Y&&typeof Y._zod==="object";return G||Q}function T7($){if(!$||typeof $!=="object")return!1;return"_zod"in $&&typeof $._zod==="object"}function I7($){if(!T7($))return null;try{let Y=$.constructor?.prototype?.constructor;if(Y&&typeof Y.toJSONSchema==="function")return Y.toJSONSchema($)}catch{}return null}function a($){if(!b0($))return $;let Y=I7($);if(Y)return Y;try{return N5($)}catch{return $}}function N2($){if(!$||typeof $!=="object"||Array.isArray($))return!1;let Y=Object.values($);if(Y.length===0)return!1;return Y.some((G)=>G&&typeof G==="object"&&G._def&&typeof G.safeParse==="function")}function R7($){if(!$)return;for(let Y of $){if(typeof Y==="string"){if(Y==="json")throw Error("json format must be an object with { type: 'json', prompt, schema }");continue}if(Y.type==="json"){let G=Y;if(!G.prompt&&!G.schema)throw Error("json format requires either 'prompt' or 'schema' (or both)");let Q=G.schema;if(b0(Q))G.schema=a(Q);else if(N2(Q))throw Error("json format schema appears to be a Zod schema's .shape property. Pass the Zod schema directly (e.g., `schema: MySchema`) instead of `schema: MySchema.shape`. The SDK will automatically convert Zod schemas to JSON Schema format.");continue}if(Y.type==="changeTracking"){let G=Y,Q=G.schema;if(b0(Q))G.schema=a(Q);else if(N2(Q))throw Error("changeTracking format schema appears to be a Zod schema's .shape property. Pass the Zod schema directly (e.g., `schema: MySchema`) instead of `schema: MySchema.shape`. The SDK will automatically convert Zod schemas to JSON Schema format.");continue}if(Y.type==="question"){let G=Y;if(typeof G.question!=="string"||G.question.trim().length===0)throw Error("question format requires a non-empty 'question' string");continue}if(Y.type==="highlights"){let G=Y;if(typeof G.query!=="string"||G.query.trim().length===0)throw Error("highlights format requires a non-empty 'query' string");continue}if(Y.type==="query"){let G=Y;if(typeof G.prompt!=="string"||G.prompt.trim().length===0)throw Error("query format requires a non-empty 'prompt' string");if(G.mode!=null&&G.mode!=="freeform"&&G.mode!=="directQuote")throw Error("query format mode must be 'freeform' or 'directQuote'");continue}if(Y.type==="screenshot"){let G=Y;if(G.quality!=null&&(typeof G.quality!=="number"||G.quality<0))throw Error("screenshot.quality must be a non-negative number")}}}function e0($){if(!$)return;if($.timeout!=null&&$.timeout<=0)throw Error("timeout must be positive");if($.waitFor!=null&&$.waitFor<0)throw Error("waitFor must be non-negative");R7($.formats)}function D7($){if(!$)return;for(let Y of $){if(typeof Y==="string"){if(Y==="json")throw Error("json format must be an object with { type: 'json', prompt, schema }");if(Y==="screenshot")throw Error("parse does not support screenshot format");if(Y==="changeTracking")throw Error("parse does not support changeTracking format");if(Y==="branding")throw Error("parse does not support branding format");continue}let G=Y.type;if(G==="changeTracking")throw Error("parse does not support changeTracking format");if(G==="screenshot")throw Error("parse does not support screenshot format");if(G==="branding")throw Error("parse does not support branding format");if(Y.type==="json"){let Q=Y;if(!Q.prompt&&!Q.schema)throw Error("json format requires either 'prompt' or 'schema' (or both)");let X=Q.schema;if(b0(X))Q.schema=a(X);else if(N2(X))throw Error("json format schema appears to be a Zod schema's .shape property. Pass the Zod schema directly (e.g., `schema: MySchema`) instead of `schema: MySchema.shape`. The SDK will automatically convert Zod schemas to JSON Schema format.");continue}if(Y.type==="question"){let Q=Y;if(typeof Q.question!=="string"||Q.question.trim().length===0)throw Error("question format requires a non-empty 'question' string");continue}if(Y.type==="highlights"){let Q=Y;if(typeof Q.query!=="string"||Q.query.trim().length===0)throw Error("highlights format requires a non-empty 'query' string");continue}if(Y.type==="query"){let Q=Y;if(typeof Q.prompt!=="string"||Q.prompt.trim().length===0)throw Error("query format requires a non-empty 'prompt' string");if(Q.mode!=null&&Q.mode!=="freeform"&&Q.mode!=="directQuote")throw Error("query format mode must be 'freeform' or 'directQuote'")}}}function S7($){if(!$)return;if($.timeout!=null&&$.timeout<=0)throw Error("timeout must be positive");let Y=$;if(Y.waitFor!==void 0)throw Error("parse does not support waitFor");if(Y.actions!==void 0)throw Error("parse does not support actions");if(Y.location!==void 0)throw Error("parse does not support location overrides");if(Y.mobile!==void 0)throw Error("parse does not support mobile rendering");if(Y.maxAge!==void 0||Y.minAge!==void 0||Y.storeInCache!==void 0||Y.lockdown!==void 0)throw Error("parse does not support cache/index options");if(Y.proxy!==void 0&&Y.proxy!=="basic"&&Y.proxy!=="auto")throw Error("parse only supports proxy values of 'basic' or 'auto'");D7($.formats)}function D($,Y){let G=$.status,Q=$.data||{},X=Q?.error||Q?.message||`Request failed (${G}) while trying to ${Y}`;throw new _0(X,G,void 0,Q?.details)}function R($,Y){let G=$.response?.status,Q=$.response?.data,X=Q?.error||$.message||`Request failed${G?` (${G})`:""} while trying to ${Y}`,W=Q?.code||$.code;throw new _0(X,G,W,Q?.details??Q)}function M5($){if($ instanceof Z2)return!1;if($ instanceof _0||$&&typeof $==="object"&&"status"in $){let Y=$.status;if(Y&&Y>=400&&Y<500)return!1;if(Y&&Y>=500)return!0}if($?.isAxiosError&&!$.response)return!0;if($?.code==="ECONNABORTED"||$?.message?.includes("timeout"))return!0;return!0}async function A7($,Y,G){if(!Y||!Y.trim())throw Error("URL cannot be empty");if(G)e0(G);let Q={url:Y.trim()};if(G)Object.assign(Q,G);try{let X=await $.post("/v2/scrape",Q,typeof G?.timeout==="number"?{timeoutMs:G.timeout+5000}:{});if(X.status!==200||!X.data?.success)D(X,"scrape");return X.data.data||{}}catch(X){if(X?.isAxiosError)return R(X,"scrape");throw X}}async function w7($,Y,G){if(!Y||!Y.trim())throw Error("Job ID cannot be empty");let Q=G?.code&&G.code.trim(),X=G?.prompt&&G.prompt.trim();if(!Q&&!X)throw Error("Either 'code' or 'prompt' must be provided");let W={};if(Q)W.code=G.code;if(X)W.prompt=G.prompt;if(W.language=G.language??"node",G.timeout!=null)W.timeout=G.timeout;if(G.origin)W.origin=G.origin;try{let N=await $.post(`/v2/scrape/${Y}/interact`,W,G.timeout!=null?{timeoutMs:G.timeout*1000+5000}:{});if(N.status!==200)D(N,"interact with scrape browser");return N.data}catch(N){if(N?.isAxiosError)return R(N,"interact with scrape browser");throw N}}async function E7($,Y){if(!Y||!Y.trim())throw Error("Job ID cannot be empty");try{let G=await $.delete(`/v2/scrape/${Y}/interact`);if(G.status!==200)D(G,"stop interaction");return G.data}catch(G){if(G?.isAxiosError)return R(G,"stop interaction");throw G}}function X5($,Y){if(typeof Blob<"u"&&$ instanceof Blob){if(Y&&$.type!==Y)return new Blob([$],{type:Y});return $}if(typeof Buffer<"u"&&Buffer.isBuffer($))return new Blob([$],{type:Y});if($ instanceof ArrayBuffer)return new Blob([$],{type:Y});if(ArrayBuffer.isView($))return new Blob([$],{type:Y});if(typeof $==="string")return new Blob([$],{type:Y??"text/plain; charset=utf-8"});throw Error("Unsupported parse file data type")}async function k7($,Y,G){if(!Y||!Y.filename||!Y.filename.trim())throw Error("filename cannot be empty");if(Y.data==null)throw Error("file data cannot be empty");if(X5(Y.data,Y.contentType).size===0)throw Error("file data cannot be empty");if(G)S7(G);let X=J5(),W={...G??{},origin:typeof G?.origin==="string"&&G.origin.includes("mcp")?G.origin:G?.origin??`js-sdk@${X}`},N=new FormData;N.append("options",JSON.stringify(W)),N.append("file",X5(Y.data,Y.contentType),Y.filename.trim());try{let Z=await $.postMultipart("/v2/parse",N,typeof W.timeout==="number"?{timeoutMs:W.timeout+5000}:{});if(Z.status!==200||!Z.data?.success)D(Z,"parse");return Z.data.data||{}}catch(Z){if(Z?.isAxiosError)return R(Z,"parse");throw Z}}function q7($){if(!$.query||!$.query.trim())throw Error("Query cannot be empty");if($.limit!=null&&$.limit<=0)throw Error("limit must be positive");if($.timeout!=null&&$.timeout<=0)throw Error("timeout must be positive");if($.includeDomains?.length&&$.excludeDomains?.length)throw Error("includeDomains and excludeDomains cannot both be specified");let Y={query:$.query};if($.sources)Y.sources=$.sources;if($.categories)Y.categories=$.categories;if($.includeDomains)Y.includeDomains=$.includeDomains;if($.excludeDomains)Y.excludeDomains=$.excludeDomains;if($.limit!=null)Y.limit=$.limit;if($.tbs!=null)Y.tbs=$.tbs;if($.location!=null)Y.location=$.location;if($.ignoreInvalidURLs!=null)Y.ignoreInvalidURLs=$.ignoreInvalidURLs;if($.timeout!=null)Y.timeout=$.timeout;if($.integration&&$.integration.trim())Y.integration=$.integration.trim();if($.origin)Y.origin=$.origin;if($.scrapeOptions)e0($.scrapeOptions),Y.scrapeOptions=$.scrapeOptions;return Y}function X2($){let Y=[];for(let G of $)if(G&&typeof G==="object")if("markdown"in G||"html"in G||"rawHtml"in G||"links"in G||"screenshot"in G||"changeTracking"in G||"summary"in G||"json"in G)Y.push(G);else Y.push(G);else Y.push({url:G});return Y}async function x7($,Y){let G=q7(Y);try{let Q=await $.post("/v2/search",G,typeof Y.timeout==="number"?{timeoutMs:Y.timeout+5000}:{});if(Q.status!==200||!Q.data?.success)D(Q,"search");let X=Q.data.data||{},W={};if(X.web)W.web=X2(X.web);if(X.news)W.news=X2(X.news);if(X.images)W.images=X2(X.images);return W}catch(Q){if(Q?.isAxiosError)return R(Q,"search");throw Q}}function j7($,Y){if(!$||!$.trim())throw Error("URL cannot be empty");let G={url:$.trim()};if(Y){if(Y.sitemap!=null)G.sitemap=Y.sitemap;if(Y.search!=null)G.search=Y.search;if(Y.includeSubdomains!=null)G.includeSubdomains=Y.includeSubdomains;if(Y.ignoreQueryParameters!=null)G.ignoreQueryParameters=Y.ignoreQueryParameters;if(Y.limit!=null)G.limit=Y.limit;if(Y.timeout!=null)G.timeout=Y.timeout;if(Y.integration!=null&&Y.integration.trim())G.integration=Y.integration.trim();if(Y.origin)G.origin=Y.origin;if(Y.location!=null)G.location=Y.location}return G}async function v7($,Y,G){let Q=j7(Y,G);try{let X=await $.post("/v2/map",Q,typeof G?.timeout==="number"?{timeoutMs:G.timeout+5000}:{});if(X.status!==200||!X.data?.success)D(X,"map");let W=X.data.links||[],N=[];for(let Z of W)if(typeof Z==="string")N.push({url:Z});else if(Z&&typeof Z==="object")N.push({url:Z.url,title:Z.title,description:Z.description});return{links:N}}catch(X){if(X?.isAxiosError)return R(X,"map");throw X}}async function J2($,Y,G,Q){let X=G.slice(),W=Y,N=0,Z=Q?.maxPages??void 0,M=Q?.maxResults??void 0,V=Q?.maxWaitTime??void 0,K=Date.now();while(W){if(Z!=null&&N>=Z)break;if(V!=null&&(Date.now()-K)/1000>V)break;let L=null;try{L=(await $.get(W)).data}catch{break}if(!L?.success)break;let _=Array.isArray(L.data)?L.data:L.data?.pages||[];for(let P of _){if(M!=null&&X.length>=M)break;X.push(P)}if(M!=null&&X.length>=M)break;W=L.next??(Array.isArray(L.data)?null:L.data?.next)??null,N+=1}return X}function b7($){if(!$.url||!$.url.trim())throw Error("URL cannot be empty");let Y={url:$.url.trim()};if($.prompt)Y.prompt=$.prompt;if($.excludePaths)Y.excludePaths=$.excludePaths;if($.includePaths)Y.includePaths=$.includePaths;if($.maxDiscoveryDepth!=null)Y.maxDiscoveryDepth=$.maxDiscoveryDepth;if($.sitemap!=null)Y.sitemap=$.sitemap;if($.robotsUserAgent!=null)Y.robotsUserAgent=$.robotsUserAgent;if($.ignoreQueryParameters!=null)Y.ignoreQueryParameters=$.ignoreQueryParameters;if($.deduplicateSimilarURLs!=null)Y.deduplicateSimilarURLs=$.deduplicateSimilarURLs;if($.limit!=null)Y.limit=$.limit;if($.crawlEntireDomain!=null)Y.crawlEntireDomain=$.crawlEntireDomain;if($.allowExternalLinks!=null)Y.allowExternalLinks=$.allowExternalLinks;if($.allowSubdomains!=null)Y.allowSubdomains=$.allowSubdomains;if($.delay!=null)Y.delay=$.delay;if($.maxConcurrency!=null)Y.maxConcurrency=$.maxConcurrency;if($.regexOnFullURL!=null)Y.regexOnFullURL=$.regexOnFullURL;if($.webhook!=null)Y.webhook=$.webhook;if($.integration!=null&&$.integration.trim())Y.integration=$.integration.trim();if($.origin)Y.origin=$.origin;if($.scrapeOptions)e0($.scrapeOptions),Y.scrapeOptions=$.scrapeOptions;if($.zeroDataRetention!=null)Y.zeroDataRetention=$.zeroDataRetention;return Y}async function V5($,Y){let G=b7(Y);try{let Q=await $.post("/v2/crawl",G);if(Q.status!==200||!Q.data?.success)D(Q,"start crawl");return{id:Q.data.id,url:Q.data.url}}catch(Q){if(Q?.isAxiosError)return R(Q,"start crawl");throw Q}}async function M2($,Y,G){try{let Q=await $.get(`/v2/crawl/${Y}`);if(Q.status!==200||!Q.data?.success)D(Q,"get crawl status");let X=Q.data,W=X.data||[];if(!(G?.autoPaginate??!0)||!X.next)return{id:Y,status:X.status,completed:X.completed??0,total:X.total??0,creditsUsed:X.creditsUsed,expiresAt:X.expiresAt,next:X.next??null,data:W};let Z=await J2($,X.next,W,G);return{id:Y,status:X.status,completed:X.completed??0,total:X.total??0,creditsUsed:X.creditsUsed,expiresAt:X.expiresAt,next:null,data:Z}}catch(Q){if(Q?.isAxiosError)return R(Q,"get crawl status");throw Q}}async function y7($,Y){try{let G=await $.delete(`/v2/crawl/${Y}`);if(G.status!==200)D(G,"cancel crawl");return G.data?.status==="cancelled"}catch(G){if(G?.isAxiosError)return R(G,"cancel crawl");throw G}}async function f7($,Y,G=2,Q){let X=Date.now();while(!0){try{let W=await M2($,Y);if(["completed","failed","cancelled"].includes(W.status))return W}catch(W){if(!M5(W)){if(W instanceof _0)throw new _0(W.message,W.status,W.code,W.details,Y);throw W}}if(Q!=null&&Date.now()-X>Q*1000)throw new Z2(Y,Q,"crawl");await new Promise((W)=>setTimeout(W,Math.max(1000,G*1000)))}}async function h7($,Y,G=2,Q){let X=await V5($,Y);return f7($,X.id,G,Q)}async function m7($,Y){try{let G=await $.get(`/v2/crawl/${Y}/errors`);if(G.status!==200)D(G,"get crawl errors");let Q=G.data?.data??G.data;return{errors:Q.errors||[],robotsBlocked:Q.robotsBlocked||[]}}catch(G){if(G?.isAxiosError)return R(G,"get crawl errors");throw G}}async function g7($){try{let Y=await $.get("/v2/crawl/active");if(Y.status!==200||!Y.data?.success)D(Y,"get active crawls");return{success:!0,crawls:(Y.data?.crawls||[]).map((X)=>({id:X.id,teamId:X.teamId??X.team_id,url:X.url,options:X.options??null}))}}catch(Y){if(Y?.isAxiosError)return R(Y,"get active crawls");throw Y}}async function u7($,Y,G){if(!Y||!Y.trim())throw Error("URL cannot be empty");if(!G||!G.trim())throw Error("Prompt cannot be empty");try{let Q=await $.post("/v2/crawl/params-preview",{url:Y.trim(),prompt:G});if(Q.status!==200||!Q.data?.success)D(Q,"crawl params preview");let X=Q.data.data||{};if(Q.data.warning)X.warning=Q.data.warning;return X}catch(Q){if(Q?.isAxiosError)return R(Q,"crawl params preview");throw Q}}async function K5($,Y,{options:G,webhook:Q,appendToId:X,ignoreInvalidURLs:W,maxConcurrency:N,zeroDataRetention:Z,idempotencyKey:M,integration:V,origin:K}={}){if(!Array.isArray(Y)||Y.length===0)throw Error("URLs list cannot be empty");let L={urls:Y};if(G)e0(G),Object.assign(L,G);if(Q!=null)L.webhook=Q;if(X!=null)L.appendToId=X;if(W!=null)L.ignoreInvalidURLs=W;if(N!=null)L.maxConcurrency=N;if(Z!=null)L.zeroDataRetention=Z;if(V!=null&&V.trim())L.integration=V.trim();if(K)L.origin=K;try{let _=$.prepareHeaders(M),P=await $.post("/v2/batch/scrape",L,{headers:_});if(P.status!==200||!P.data?.success)D(P,"start batch scrape");return{id:P.data.id,url:P.data.url,invalidURLs:P.data.invalidURLs||void 0}}catch(_){if(_?.isAxiosError)return R(_,"start batch scrape");throw _}}async function V2($,Y,G){try{let Q=await $.get(`/v2/batch/scrape/${Y}`);if(Q.status!==200||!Q.data?.success)D(Q,"get batch scrape status");let X=Q.data,W=X.data||[];if(!(G?.autoPaginate??!0)||!X.next)return{id:Y,status:X.status,completed:X.completed??0,total:X.total??0,creditsUsed:X.creditsUsed,expiresAt:X.expiresAt,next:X.next??null,data:W};let Z=await J2($,X.next,W,G);return{id:Y,status:X.status,completed:X.completed??0,total:X.total??0,creditsUsed:X.creditsUsed,expiresAt:X.expiresAt,next:null,data:Z}}catch(Q){if(Q?.isAxiosError)return R(Q,"get batch scrape status");throw Q}}async function c7($,Y){try{let G=await $.delete(`/v2/batch/scrape/${Y}`);if(G.status!==200)D(G,"cancel batch scrape");return G.data?.status==="cancelled"}catch(G){if(G?.isAxiosError)return R(G,"cancel batch scrape");throw G}}async function l7($,Y){try{let G=await $.get(`/v2/batch/scrape/${Y}/errors`);if(G.status!==200)D(G,"get batch scrape errors");let Q=G.data?.data??G.data;return{errors:Q.errors||[],robotsBlocked:Q.robotsBlocked||[]}}catch(G){if(G?.isAxiosError)return R(G,"get batch scrape errors");throw G}}async function d7($,Y,G=2,Q){let X=Date.now();while(!0){try{let W=await V2($,Y);if(["completed","failed","cancelled"].includes(W.status))return W}catch(W){if(!M5(W)){if(W instanceof _0)throw new _0(W.message,W.status,W.code,W.details,Y);throw W}}if(Q!=null&&Date.now()-X>Q*1000)throw new Z2(Y,Q,"batch");await new Promise((W)=>setTimeout(W,Math.max(1000,G*1000)))}}async function p7($,Y,G={}){let Q=await K5($,Y,G);return d7($,Q.id,G.pollInterval??2,G.timeout)}function n7($){let Y={};if($.urls)Y.urls=$.urls;if($.prompt!=null)Y.prompt=$.prompt;if($.schema!=null)Y.schema=b0($.schema)?a($.schema):$.schema;if($.systemPrompt!=null)Y.systemPrompt=$.systemPrompt;if($.allowExternalLinks!=null)Y.allowExternalLinks=$.allowExternalLinks;if($.enableWebSearch!=null)Y.enableWebSearch=$.enableWebSearch;if($.showSources!=null)Y.showSources=$.showSources;if($.ignoreInvalidURLs!=null)Y.ignoreInvalidURLs=$.ignoreInvalidURLs;if($.integration&&$.integration.trim())Y.integration=$.integration.trim();if($.origin)Y.origin=$.origin;if($.agent)Y.agent=$.agent;if($.scrapeOptions)e0($.scrapeOptions),Y.scrapeOptions=$.scrapeOptions;return Y}async function L5($,Y){let G=n7(Y);try{let Q=await $.post("/v2/extract",G);if(Q.status!==200)D(Q,"extract");return Q.data}catch(Q){if(Q?.isAxiosError)return R(Q,"extract");throw Q}}async function z5($,Y){try{let G=await $.get(`/v2/extract/${Y}`);if(G.status!==200)D(G,"extract status");return G.data}catch(G){if(G?.isAxiosError)return R(G,"extract status");throw G}}async function i7($,Y,G=2,Q){let X=Date.now();while(!0){let W=await z5($,Y);if(["completed","failed","cancelled"].includes(W.status||""))return W;if(Q!=null&&Date.now()-X>Q*1000)return W;await new Promise((N)=>setTimeout(N,Math.max(1000,G*1000)))}}async function t7($,Y){let G=await L5($,Y),Q=G.id;if(!Q)return G;return i7($,Q,Y.pollInterval??2,Y.timeout)}function a7($){let Y={};if($.urls)Y.urls=$.urls;if(Y.prompt=$.prompt,$.schema!=null)Y.schema=b0($.schema)?a($.schema):$.schema;if($.integration&&$.integration.trim())Y.integration=$.integration.trim();if($.origin)Y.origin=$.origin;if($.maxCredits!==null&&$.maxCredits!==void 0)Y.maxCredits=$.maxCredits;if($.strictConstrainToURLs!==null&&$.strictConstrainToURLs!==void 0)Y.strictConstrainToURLs=$.strictConstrainToURLs;if($.model!==null&&$.model!==void 0)Y.model=$.model;if($.webhook!=null)Y.webhook=$.webhook;return Y}async function B5($,Y){let G=a7(Y);try{let Q=await $.post("/v2/agent",G);if(Q.status!==200)D(Q,"agent");return Q.data}catch(Q){if(Q?.isAxiosError)return R(Q,"agent");throw Q}}async function _5($,Y){try{let G=await $.get(`/v2/agent/${Y}`);if(G.status!==200)D(G,"agent status");return G.data}catch(G){if(G?.isAxiosError)return R(G,"agent status");throw G}}async function s7($,Y,G=2,Q){let X=Date.now();while(!0){let W=await _5($,Y);if(["completed","failed","cancelled"].includes(W.status||""))return W;if(Q!=null&&Date.now()-X>Q*1000)return W;await new Promise((N)=>setTimeout(N,Math.max(1000,G*1000)))}}async function o7($,Y){let G=await B5($,Y),Q=G.id;if(!Q)return G;return s7($,Q,Y.pollInterval??2,Y.timeout)}async function e7($,Y){try{let G=await $.delete(`/v2/agent/${Y}`);if(G.status!==200)D(G,"cancel agent");return G.data?.success===!0}catch(G){if(G?.isAxiosError)return R(G,"cancel agent");throw G}}async function r7($,Y={}){let G={};if(Y.ttl!=null)G.ttl=Y.ttl;if(Y.activityTtl!=null)G.activityTtl=Y.activityTtl;if(Y.streamWebView!=null)G.streamWebView=Y.streamWebView;if(Y.profile!=null)G.profile=Y.profile;if(Y.integration!=null)G.integration=Y.integration;if(Y.origin)G.origin=Y.origin;try{let Q=await $.post("/v2/browser",G);if(Q.status!==200)D(Q,"create browser session");return Q.data}catch(Q){if(Q?.isAxiosError)return R(Q,"create browser session");throw Q}}async function $$($,Y,G){let Q={code:G.code,language:G.language??"bash"};if(G.timeout!=null)Q.timeout=G.timeout;try{let X=await $.post(`/v2/browser/${Y}/execute`,Q,G.timeout!=null?{timeoutMs:G.timeout*1000+5000}:{});if(X.status!==200)D(X,"execute browser code");return X.data}catch(X){if(X?.isAxiosError)return R(X,"execute browser code");throw X}}async function Y$($,Y){try{let G=await $.delete(`/v2/browser/${Y}`);if(G.status!==200)D(G,"delete browser session");return G.data}catch(G){if(G?.isAxiosError)return R(G,"delete browser session");throw G}}async function G$($,Y={}){let G="/v2/browser";if(Y.status)G+=`?status=${Y.status}`;try{let Q=await $.get(G);if(Q.status!==200)D(Q,"list browser sessions");return Q.data}catch(Q){if(Q?.isAxiosError)return R(Q,"list browser sessions");throw Q}}async function Q$($){try{let Y=await $.get("/v2/concurrency-check");if(Y.status!==200||!Y.data?.success)D(Y,"get concurrency");let G=Y.data.data||Y.data;return{concurrency:G.concurrency,maxConcurrency:G.maxConcurrency??G.max_concurrency}}catch(Y){if(Y?.isAxiosError)return R(Y,"get concurrency");throw Y}}async function X$($){try{let Y=await $.get("/v2/team/credit-usage");if(Y.status!==200||!Y.data?.success)D(Y,"get credit usage");let G=Y.data.data||Y.data;return{remainingCredits:G.remainingCredits??G.remaining_credits??0,planCredits:G.planCredits??G.plan_credits,billingPeriodStart:G.billingPeriodStart??G.billing_period_start??null,billingPeriodEnd:G.billingPeriodEnd??G.billing_period_end??null}}catch(Y){if(Y?.isAxiosError)return R(Y,"get credit usage");throw Y}}async function W$($){try{let Y=await $.get("/v2/team/token-usage");if(Y.status!==200||!Y.data?.success)D(Y,"get token usage");let G=Y.data.data||Y.data;return{remainingTokens:G.remainingTokens??G.remaining_tokens??0,planTokens:G.planTokens??G.plan_tokens,billingPeriodStart:G.billingPeriodStart??G.billing_period_start??null,billingPeriodEnd:G.billingPeriodEnd??G.billing_period_end??null}}catch(Y){if(Y?.isAxiosError)return R(Y,"get token usage");throw Y}}async function N$($){try{let Y=await $.get("/v2/team/queue-status");if(Y.status!==200||!Y.data?.success)D(Y,"get queue status");return Y.data}catch(Y){if(Y?.isAxiosError)return R(Y,"get queue status");throw Y}}async function Z$($,Y){try{let G=Y?"?byApiKey=true":"",Q=await $.get(`/v2/team/credit-usage/historical${G}`);if(Q.status!==200||!Q.data?.success)D(Q,"get credit usage historical");return Q.data}catch(G){if(G?.isAxiosError)return R(G,"get credit usage historical");throw G}}async function J$($,Y){try{let G=Y?"?byApiKey=true":"",Q=await $.get(`/v2/team/token-usage/historical${G}`);if(Q.status!==200||!Q.data?.success)D(Q,"get token usage historical");return Q.data}catch(G){if(G?.isAxiosError)return R(G,"get token usage historical");throw G}}function K2($){if(!$)return"";let Y=new URLSearchParams;for(let[Q,X]of Object.entries($))if(X!==void 0&&X!==null)Y.set(Q,String(X));let G=Y.toString();return G?`?${G}`:""}function I0($,Y){if($.status!==200||!$.data?.success||$.data.data==null)D($,Y);return $.data.data}async function M$($,Y){try{let G=await $.post("/v2/monitor",Y);return I0(G,"create monitor")}catch(G){if(G?.isAxiosError)return R(G,"create monitor");throw G}}async function V$($,Y){try{let G=await $.get(`/v2/monitor${K2(Y)}`);return I0(G,"list monitors")}catch(G){if(G?.isAxiosError)return R(G,"list monitors");throw G}}async function K$($,Y){try{let G=await $.get(`/v2/monitor/${Y}`);return I0(G,"get monitor")}catch(G){if(G?.isAxiosError)return R(G,"get monitor");throw G}}async function L$($,Y,G){try{let Q=await $.patch(`/v2/monitor/${Y}`,G);return I0(Q,"update monitor")}catch(Q){if(Q?.isAxiosError)return R(Q,"update monitor");throw Q}}async function z$($,Y){try{let G=await $.delete(`/v2/monitor/${Y}`);if(G.status!==200||!G.data?.success)D(G,"delete monitor");return!0}catch(G){if(G?.isAxiosError)return R(G,"delete monitor");throw G}}async function B$($,Y){try{let G=await $.post(`/v2/monitor/${Y}/run`,{});return I0(G,"run monitor")}catch(G){if(G?.isAxiosError)return R(G,"run monitor");throw G}}async function _$($,Y,G){try{let Q=await $.get(`/v2/monitor/${Y}/checks${K2(G)}`);return I0(Q,"list monitor checks")}catch(Q){if(Q?.isAxiosError)return R(Q,"list monitor checks");throw Q}}async function H$($,Y,G,Q){try{let{autoPaginate:X,maxPages:W,maxResults:N,maxWaitTime:Z,...M}=Q??{},V=await $.get(`/v2/monitor/${Y}/checks/${G}${K2(M)}`),K=I0(V,"get monitor check"),L=V.data?.next??K.next??null;if(!(Q?.autoPaginate??!0)||!L)return{...K,next:L};return{...K,pages:await J2($,L,K.pages||[],Q),next:null}}catch(X){if(X?.isAxiosError)return R(X,"get monitor check");throw X}}var F7=class{instance;apiKey;apiUrl;maxRetries;backoffFactor;constructor($){this.apiKey=$.apiKey,this.apiUrl=$.apiUrl.replace(/\/$/,""),this.maxRetries=$.maxRetries??3,this.backoffFactor=$.backoffFactor??0.5,this.instance=K0.create({baseURL:this.apiUrl,timeout:$.timeoutMs??300000,headers:{Authorization:`Bearer ${this.apiKey}`},transitional:{clarifyTimeoutError:!0}})}getApiUrl(){return this.apiUrl}getApiKey(){return this.apiKey}async request($){let Y=J5();$.headers={...$.headers||{}};let G;for(let Q=0;Q<this.maxRetries;Q++)try{let X={...$},W=typeof FormData<"u"&&X.data instanceof FormData;if(!W&&X.data!=null&&typeof X.data==="object"&&!Array.isArray(X.data)&&X.method&&["post","put","patch"].includes(X.method.toLowerCase())){let M=X.data??{};X.data={...M,origin:typeof M.origin==="string"&&M.origin.includes("mcp")?M.origin:`js-sdk@${Y}`}}if(W)X.headers={...X.headers||{}},delete X.headers["Content-Type"],delete X.headers["content-type"];let Z=await this.instance.request(X);if(Z.status===502&&Q<this.maxRetries-1){await this.sleep(this.backoffFactor*Math.pow(2,Q));continue}return Z}catch(X){if(G=X,X?.response?.status===502&&Q<this.maxRetries-1){await this.sleep(this.backoffFactor*Math.pow(2,Q));continue}throw X}throw G??Error("Unexpected HTTP client error")}sleep($){return new Promise((Y)=>setTimeout(Y,$*1000))}post($,Y,G){return this.request({method:"post",url:$,data:Y,headers:G?.headers,timeout:G?.timeoutMs})}postMultipart($,Y,G){return this.request({method:"post",url:$,data:Y,headers:G?.headers,timeout:G?.timeoutMs})}get($,Y){return this.request({method:"get",url:$,headers:Y})}delete($,Y){return this.request({method:"delete",url:$,headers:Y})}patch($,Y,G){return this.request({method:"patch",url:$,data:Y,headers:G?.headers,timeout:G?.timeoutMs})}prepareHeaders($){let Y={};if($)Y["x-idempotency-key"]=$;return Y}},_0,Z2,U$=()=>{if(typeof globalThis>"u")return;let $=globalThis.WebSocket;return typeof $==="function"?$:void 0},O$=()=>typeof process<"u"&&!!process.versions?.node,v0,W2,C$=async()=>{if(!O$())return;try{let $=await import("./index-0.1.14-wjc5jkvz.mjs"),Y=$.WebSocket??$.default?.WebSocket;return typeof Y==="function"?Y:void 0}catch{return}},F$=async()=>{if(v0)return v0;let $=U$();if($)return v0=$,v0;if(!W2)W2=C$();return v0=await W2,v0},T$,I$=($)=>{if(typeof $==="string")return $;if(typeof Buffer<"u"&&Buffer.isBuffer($))return $.toString("utf8");let Y=(G)=>{if(typeof Buffer<"u")return Buffer.from(G.buffer,G.byteOffset,G.byteLength).toString("utf8");return T$?.decode(G)};if(ArrayBuffer.isView($))return Y($);if($ instanceof ArrayBuffer)return Y(new Uint8Array($));return},R$,D$=class{http;isCloudService($){return $.includes("api.firecrawl.dev")}constructor($={}){let Y=$.apiKey??process.env.FIRECRAWL_API_KEY??"",G=($.apiUrl??process.env.FIRECRAWL_API_URL??"https://api.firecrawl.dev").replace(/\/$/,"");if(this.isCloudService(G)&&!Y)throw Error("API key is required for the cloud API. Set FIRECRAWL_API_KEY env or pass apiKey.");this.http=new F7({apiKey:Y,apiUrl:G,timeoutMs:$.timeoutMs,maxRetries:$.maxRetries,backoffFactor:$.backoffFactor})}async scrape($,Y){return A7(this.http,$,Y)}async interact($,Y){return w7(this.http,$,Y)}async stopInteraction($){return E7(this.http,$)}async scrapeExecute($,Y){return this.interact($,Y)}async stopInteractiveBrowser($){return this.stopInteraction($)}async deleteScrapeBrowser($){return this.stopInteraction($)}async parse($,Y){return k7(this.http,$,Y)}async search($,Y={}){return x7(this.http,{query:$,...Y})}async map($,Y){return v7(this.http,$,Y)}async startCrawl($,Y={}){return V5(this.http,{url:$,...Y})}async getCrawlStatus($,Y){return M2(this.http,$,Y)}async cancelCrawl($){return y7(this.http,$)}async crawl($,Y={}){return h7(this.http,{url:$,...Y},Y.pollInterval,Y.timeout)}async getCrawlErrors($){return m7(this.http,$)}async getActiveCrawls(){return g7(this.http)}async crawlParamsPreview($,Y){return u7(this.http,$,Y)}async createMonitor($){return M$(this.http,$)}async listMonitors($){return V$(this.http,$)}async getMonitor($){return K$(this.http,$)}async updateMonitor($,Y){return L$(this.http,$,Y)}async deleteMonitor($){return z$(this.http,$)}async runMonitor($){return B$(this.http,$)}async listMonitorChecks($,Y){return _$(this.http,$,Y)}async getMonitorCheck($,Y,G){return H$(this.http,$,Y,G)}async startBatchScrape($,Y){return K5(this.http,$,Y)}async getBatchScrapeStatus($,Y){return V2(this.http,$,Y)}async getBatchScrapeErrors($){return l7(this.http,$)}async cancelBatchScrape($){return c7(this.http,$)}async batchScrape($,Y){return p7(this.http,$,Y)}async startExtract($){return L5(this.http,$)}async getExtractStatus($){return z5(this.http,$)}async extract($){return t7(this.http,$)}async startAgent($){return B5(this.http,$)}async getAgentStatus($){return _5(this.http,$)}async agent($){return o7(this.http,$)}async cancelAgent($){return e7(this.http,$)}async browser($={}){return r7(this.http,$)}async browserExecute($,Y){return $$(this.http,$,Y)}async deleteBrowser($){return Y$(this.http,$)}async listBrowsers($={}){return G$(this.http,$)}async getConcurrency(){return Q$(this.http)}async getCreditUsage(){return X$(this.http)}async getTokenUsage(){return W$(this.http)}async getCreditUsageHistorical($){return Z$(this.http,$)}async getTokenUsageHistorical($){return J$(this.http,$)}async getQueueStatus(){return N$(this.http)}watcher($,Y={}){return new R$(this.http,$,Y)}},S$,U,A$=class{apiKey;apiUrl;version="1.25.1";isCloudService($){return $.includes("api.firecrawl.dev")}async getVersion(){try{if(typeof process<"u"&&process.env&&process.env.npm_package_version)return process.env.npm_package_version;return(await import("./package-WSP46L7M-0.1.14-xy3ej2c4.mjs")).default.version}catch($){if(!(typeof process<"u"&&(process.env.JEST_WORKER_ID!=null||!1)))console.error("Error getting version:",$);return"1.25.1"}}async init(){this.version=await this.getVersion()}constructor({apiKey:$=null,apiUrl:Y=null}){let G=Y||"https://api.firecrawl.dev";if(this.isCloudService(G)&&typeof $!=="string")throw new U("No API key provided",401);this.apiKey=$||"",this.apiUrl=G,this.init()}async scrapeUrl($,Y){let G={"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},Q={url:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};if(Q?.extract?.schema)Q={...Q,extract:{...Q.extract,schema:a(Q.extract.schema)}};if(Q?.jsonOptions?.schema)Q={...Q,jsonOptions:{...Q.jsonOptions,schema:a(Q.jsonOptions.schema)}};try{let X=await K0.post(this.apiUrl+"/v1/scrape",Q,{headers:G,timeout:Y?.timeout!==void 0?Y.timeout+5000:void 0});if(X.status===200){let W=X.data;if(W.success)return{success:!0,warning:W.warning,error:W.error,...W.data};else throw new U(`Failed to scrape URL. Error: ${W.error}`,X.status)}else this.handleError(X,"scrape URL")}catch(X){this.handleError(X.response,"scrape URL")}return{success:!1,error:"Internal server error."}}async search($,Y){let G={"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},Q={query:$,limit:Y?.limit??5,tbs:Y?.tbs,filter:Y?.filter,lang:Y?.lang??"en",country:Y?.country??"us",location:Y?.location,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`,timeout:Y?.timeout??60000,scrapeOptions:Y?.scrapeOptions??{formats:[]}};if(Q?.scrapeOptions?.extract?.schema)Q={...Q,scrapeOptions:{...Q.scrapeOptions,extract:{...Q.scrapeOptions.extract,schema:a(Q.scrapeOptions.extract.schema)}}};try{let X=await this.postRequest(this.apiUrl+"/v1/search",Q,G);if(X.status===200){let W=X.data;if(W.success)return{success:!0,data:W.data,warning:W.warning};else throw new U(`Failed to search. Error: ${W.error}`,X.status)}else this.handleError(X,"search")}catch(X){if(X.response?.data?.error)throw new U(`Request failed with status code ${X.response.status}. Error: ${X.response.data.error} ${X.response.data.details?` - ${JSON.stringify(X.response.data.details)}`:""}`,X.response.status);else throw new U(X.message,500)}return{success:!1,error:"Internal server error.",data:[]}}async crawlUrl($,Y,G=2,Q){let X=this.prepareHeaders(Q),W={url:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};try{let N=await this.postRequest(this.apiUrl+"/v1/crawl",W,X);if(N.status===200){let Z=N.data.id;return this.monitorJobStatus(Z,X,G)}else this.handleError(N,"start crawl job")}catch(N){if(N.response?.data?.error)throw new U(`Request failed with status code ${N.response.status}. Error: ${N.response.data.error} ${N.response.data.details?` - ${JSON.stringify(N.response.data.details)}`:""}`,N.response.status);else throw new U(N.message,500)}return{success:!1,error:"Internal server error."}}async asyncCrawlUrl($,Y,G){let Q=this.prepareHeaders(G),X={url:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};try{let W=await this.postRequest(this.apiUrl+"/v1/crawl",X,Q);if(W.status===200)return W.data;else this.handleError(W,"start crawl job")}catch(W){if(W.response?.data?.error)throw new U(`Request failed with status code ${W.response.status}. Error: ${W.response.data.error} ${W.response.data.details?` - ${JSON.stringify(W.response.data.details)}`:""}`,W.response.status);else throw new U(W.message,500)}return{success:!1,error:"Internal server error."}}async checkCrawlStatus($,Y=!1,G,Q,X){if(!$)throw new U("No crawl ID provided",400);let W=this.prepareHeaders(),N=new URL(G??`${this.apiUrl}/v1/crawl/${$}`);if(Q!==void 0)N.searchParams.set("skip",Q.toString());if(X!==void 0)N.searchParams.set("limit",X.toString());try{let Z=await this.getRequest(N.href,W);if(Z.status===200){let M=Z.data.data;if(Y&&Z.data.status==="completed"){let K=Z.data;if("data"in K){let L=K.data;while(typeof K==="object"&&"next"in K){if(L.length===0)break;K=(await this.getRequest(K.next,W)).data,L=L.concat(K.data)}M=L}}let V={success:Z.data.success,status:Z.data.status,total:Z.data.total,completed:Z.data.completed,creditsUsed:Z.data.creditsUsed,next:Y?void 0:Z.data.next,expiresAt:new Date(Z.data.expiresAt),data:M};if(!Z.data.success&&Z.data.error)V={...V,success:!1,error:Z.data.error};if(Z.data.next)V.next=Z.data.next;return V}else this.handleError(Z,"check crawl status")}catch(Z){throw new U(Z.message,500)}return{success:!1,error:"Internal server error."}}async checkCrawlErrors($){let Y=this.prepareHeaders();try{let G=await this.deleteRequest(`${this.apiUrl}/v1/crawl/${$}/errors`,Y);if(G.status===200)return G.data;else this.handleError(G,"check crawl errors")}catch(G){throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async cancelCrawl($){let Y=this.prepareHeaders();try{let G=await this.deleteRequest(`${this.apiUrl}/v1/crawl/${$}`,Y);if(G.status===200)return G.data;else this.handleError(G,"cancel crawl job")}catch(G){throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async crawlUrlAndWatch($,Y,G){let Q=await this.asyncCrawlUrl($,Y,G);if(Q.success&&Q.id){let X=Q.id;return new W5(X,this)}throw new U("Crawl job failed to start",400)}async mapUrl($,Y){let G=this.prepareHeaders(),Q={url:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};try{let X=await this.postRequest(this.apiUrl+"/v1/map",Q,G);if(X.status===200)return X.data;else this.handleError(X,"map")}catch(X){throw new U(X.message,500)}return{success:!1,error:"Internal server error."}}async batchScrapeUrls($,Y,G=2,Q,X,W,N){let Z=this.prepareHeaders(Q),M={urls:$,webhook:X,ignoreInvalidURLs:W,maxConcurrency:N,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};if(M?.extract?.schema)M={...M,extract:{...M.extract,schema:a(M.extract.schema)}};if(M?.jsonOptions?.schema)M={...M,jsonOptions:{...M.jsonOptions,schema:a(M.jsonOptions.schema)}};try{let V=await this.postRequest(this.apiUrl+"/v1/batch/scrape",M,Z);if(V.status===200){let K=V.data.id;return this.monitorJobStatus(K,Z,G)}else this.handleError(V,"start batch scrape job")}catch(V){if(V.response?.data?.error)throw new U(`Request failed with status code ${V.response.status}. Error: ${V.response.data.error} ${V.response.data.details?` - ${JSON.stringify(V.response.data.details)}`:""}`,V.response.status);else throw new U(V.message,500)}return{success:!1,error:"Internal server error."}}async asyncBatchScrapeUrls($,Y,G,Q,X){let W=this.prepareHeaders(G),N={urls:$,webhook:Q,ignoreInvalidURLs:X,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};try{let Z=await this.postRequest(this.apiUrl+"/v1/batch/scrape",N,W);if(Z.status===200)return Z.data;else this.handleError(Z,"start batch scrape job")}catch(Z){if(Z.response?.data?.error)throw new U(`Request failed with status code ${Z.response.status}. Error: ${Z.response.data.error} ${Z.response.data.details?` - ${JSON.stringify(Z.response.data.details)}`:""}`,Z.response.status);else throw new U(Z.message,500)}return{success:!1,error:"Internal server error."}}async batchScrapeUrlsAndWatch($,Y,G,Q,X){let W=await this.asyncBatchScrapeUrls($,Y,G,Q,X);if(W.success&&W.id){let N=W.id;return new W5(N,this)}throw new U("Batch scrape job failed to start",400)}async checkBatchScrapeStatus($,Y=!1,G,Q,X){if(!$)throw new U("No batch scrape ID provided",400);let W=this.prepareHeaders(),N=new URL(G??`${this.apiUrl}/v1/batch/scrape/${$}`);if(Q!==void 0)N.searchParams.set("skip",Q.toString());if(X!==void 0)N.searchParams.set("limit",X.toString());try{let Z=await this.getRequest(N.href,W);if(Z.status===200){let M=Z.data.data;if(Y&&Z.data.status==="completed"){let K=Z.data;if("data"in K){let L=K.data;while(typeof K==="object"&&"next"in K){if(L.length===0)break;K=(await this.getRequest(K.next,W)).data,L=L.concat(K.data)}M=L}}let V={success:Z.data.success,status:Z.data.status,total:Z.data.total,completed:Z.data.completed,creditsUsed:Z.data.creditsUsed,next:Y?void 0:Z.data.next,expiresAt:new Date(Z.data.expiresAt),data:M};if(!Z.data.success&&Z.data.error)V={...V,success:!1,error:Z.data.error};if(Z.data.next)V.next=Z.data.next;return V}else this.handleError(Z,"check batch scrape status")}catch(Z){throw new U(Z.message,500)}return{success:!1,error:"Internal server error."}}async checkBatchScrapeErrors($){let Y=this.prepareHeaders();try{let G=await this.deleteRequest(`${this.apiUrl}/v1/batch/scrape/${$}/errors`,Y);if(G.status===200)return G.data;else this.handleError(G,"check batch scrape errors")}catch(G){throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async extract($,Y){let G=this.prepareHeaders(),Q={urls:$,...Y},X=Y?.schema?a(Y.schema):void 0;try{let W=await this.postRequest(this.apiUrl+"/v1/extract",{...Q,schema:X,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`},G);if(W.status===200){let N=W.data.id,Z;do{let M=await this.getRequest(`${this.apiUrl}/v1/extract/${N}`,G);if(Z=M.data,Z.status==="completed")if(Z.success)return{success:!0,data:Z.data,warning:Z.warning,error:Z.error,sources:Z?.sources||void 0};else throw new U(`Failed to extract data. Error: ${Z.error}`,M.status);else if(Z.status==="failed"||Z.status==="cancelled")throw new U(`Extract job ${Z.status}. Error: ${Z.error}`,M.status);await new Promise((V)=>setTimeout(V,1000))}while(Z.status!=="completed")}else this.handleError(W,"extract")}catch(W){throw new U(W.message,500,W.response?.data?.details)}return{success:!1,error:"Internal server error."}}async asyncExtract($,Y,G){let Q=this.prepareHeaders(G),X={urls:$,...Y},W=Y?.schema?a(Y.schema):void 0;try{let N=await this.postRequest(this.apiUrl+"/v1/extract",{...X,schema:W,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`},Q);if(N.status===200)return N.data;else this.handleError(N,"start extract job")}catch(N){throw new U(N.message,500,N.response?.data?.details)}return{success:!1,error:"Internal server error."}}async getExtractStatus($){try{let Y=await this.getRequest(`${this.apiUrl}/v1/extract/${$}`,this.prepareHeaders());if(Y.status===200)return Y.data;else this.handleError(Y,"get extract status")}catch(Y){throw new U(Y.message,500)}}prepareHeaders($){return{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`,...$?{"x-idempotency-key":$}:{}}}postRequest($,Y,G){return K0.post($,Y,{headers:G,timeout:Y?.timeout?Y.timeout+5000:void 0})}async getRequest($,Y){try{return await K0.get($,{headers:Y})}catch(G){if(G instanceof T1&&G.response)return G.response;else throw G}}async deleteRequest($,Y){try{return await K0.delete($,{headers:Y})}catch(G){if(G instanceof T1&&G.response)return G.response;else throw G}}async monitorJobStatus($,Y,G){let Q=0,X=0,W=3;while(!0)try{let N=await this.getRequest(`${this.apiUrl}/v1/crawl/${$}`,Y);if(N.status===200){Q=0,X=0;let Z=N.data;if(Z.status==="completed")if("data"in Z){let M=Z.data;while(typeof Z==="object"&&"next"in Z){if(M.length===0)break;N=await this.getRequest(Z.next,Y),Z=N.data,M=M.concat(Z.data)}return Z.data=M,Z}else throw new U("Crawl job completed but no data was returned",500);else if(["active","paused","pending","queued","waiting","scraping"].includes(Z.status))G=Math.max(G,2),await new Promise((M)=>setTimeout(M,G*1000));else throw new U(`Crawl job failed or was stopped. Status: ${Z.status}`,500)}else if(Q++,Q>=3)this.handleError(N,"check crawl status")}catch(N){if(this.isRetryableError(N)&&X<W){X++;let Z=Math.min(1000*Math.pow(2,X-1),1e4);await new Promise((M)=>setTimeout(M,Z));continue}throw new U(N,500)}}isRetryableError($){if($ instanceof T1){if(!$.response){let Y=$.code,G=$.message?.toLowerCase()||"";return Y==="ECONNRESET"||Y==="ETIMEDOUT"||Y==="ENOTFOUND"||Y==="ECONNREFUSED"||G.includes("socket hang up")||G.includes("network error")||G.includes("timeout")}if($.response?.status===408||$.response?.status===504)return!0}if($&&typeof $==="object"){let Y=$.code,G=$.message?.toLowerCase()||"";if(Y==="ECONNRESET"||Y==="ETIMEDOUT"||Y==="ENOTFOUND"||Y==="ECONNREFUSED"||G.includes("socket hang up")||G.includes("network error")||G.includes("timeout"))return!0;if($.response?.status===408||$.response?.status===504)return!0}return!1}handleError($,Y){if(!$)throw new U(`No response received while trying to ${Y}. This may be a network error or the server is unreachable.`,0);if([400,402,403,408,409,500].includes($.status)){let G=$.data.error||"Unknown error occurred",Q=$.data.details?` - ${JSON.stringify($.data.details)}`:"";throw new U(`Failed to ${Y}. Status code: ${$.status}. Error: ${G}${Q}`,$.status,$?.data?.details)}else throw new U(`Unexpected error occurred while trying to ${Y}. Status code: ${$.status}`,$.status)}async deepResearch($,Y,G,Q){try{let X=await this.asyncDeepResearch($,Y);if(!X.success||"error"in X)return{success:!1,error:"error"in X?X.error:"Unknown error"};if(!X.id)throw new U("Failed to start research. No job ID returned.",500);let W=X.id,N,Z=0,M=0;while(!0){if(N=await this.checkDeepResearchStatus(W),"error"in N&&!N.success)return N;if(G&&N.activities){let V=N.activities.slice(Z);for(let K of V)G(K);Z=N.activities.length}if(Q&&N.sources){let V=N.sources.slice(M);for(let K of V)Q(K);M=N.sources.length}if(N.status==="completed")return N;if(N.status==="failed")throw new U(`Research job ${N.status}. Error: ${N.error}`,500);if(N.status!=="processing")break;await new Promise((V)=>setTimeout(V,2000))}return{success:!1,error:"Research job terminated unexpectedly"}}catch(X){throw new U(X.message,500,X.response?.data?.details)}}async asyncDeepResearch($,Y){let G=this.prepareHeaders(),Q={query:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};if(Q?.jsonOptions?.schema)Q={...Q,jsonOptions:{...Q.jsonOptions,schema:a(Q.jsonOptions.schema)}};try{let X=await this.postRequest(`${this.apiUrl}/v1/deep-research`,Q,G);if(X.status===200)return X.data;else this.handleError(X,"start deep research")}catch(X){if(X.response?.data?.error)throw new U(`Request failed with status code ${X.response.status}. Error: ${X.response.data.error} ${X.response.data.details?` - ${JSON.stringify(X.response.data.details)}`:""}`,X.response.status);else throw new U(X.message,500)}return{success:!1,error:"Internal server error."}}async checkDeepResearchStatus($){let Y=this.prepareHeaders();try{let G=await this.getRequest(`${this.apiUrl}/v1/deep-research/${$}`,Y);if(G.status===200)return G.data;else if(G.status===404)throw new U("Deep research job not found",404);else this.handleError(G,"check deep research status")}catch(G){if(G.response?.data?.error)throw new U(`Request failed with status code ${G.response.status}. Error: ${G.response.data.error} ${G.response.data.details?` - ${JSON.stringify(G.response.data.details)}`:""}`,G.response.status);else throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async __deepResearch($,Y,G){try{let Q=await this.__asyncDeepResearch($,Y);if(!Q.success||"error"in Q)return{success:!1,error:"error"in Q?Q.error:"Unknown error"};if(!Q.id)throw new U("Failed to start research. No job ID returned.",500);let X=Q.id,W,N=0;while(!0){if(W=await this.__checkDeepResearchStatus(X),"error"in W&&!W.success)return W;if(G&&W.activities){let Z=W.activities.slice(N);for(let M of Z)G(M);N=W.activities.length}if(W.status==="completed")return W;if(W.status==="failed")throw new U(`Research job ${W.status}. Error: ${W.error}`,500);if(W.status!=="processing")break;await new Promise((Z)=>setTimeout(Z,2000))}return{success:!1,error:"Research job terminated unexpectedly"}}catch(Q){throw new U(Q.message,500,Q.response?.data?.details)}}async __asyncDeepResearch($,Y){let G=this.prepareHeaders();try{let Q={topic:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`},X=await this.postRequest(`${this.apiUrl}/v1/deep-research`,Q,G);if(X.status===200)return X.data;else this.handleError(X,"start deep research")}catch(Q){if(Q.response?.data?.error)throw new U(`Request failed with status code ${Q.response.status}. Error: ${Q.response.data.error} ${Q.response.data.details?` - ${JSON.stringify(Q.response.data.details)}`:""}`,Q.response.status);else throw new U(Q.message,500)}return{success:!1,error:"Internal server error."}}async __checkDeepResearchStatus($){let Y=this.prepareHeaders();try{let G=await this.getRequest(`${this.apiUrl}/v1/deep-research/${$}`,Y);if(G.status===200)return G.data;else if(G.status===404)throw new U("Deep research job not found",404);else this.handleError(G,"check deep research status")}catch(G){if(G.response?.data?.error)throw new U(`Request failed with status code ${G.response.status}. Error: ${G.response.data.error} ${G.response.data.details?` - ${JSON.stringify(G.response.data.details)}`:""}`,G.response.status);else throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async generateLLMsText($,Y){try{let G=await this.asyncGenerateLLMsText($,Y);if(!G.success||"error"in G)return{success:!1,error:"error"in G?G.error:"Unknown error"};if(!G.id)throw new U("Failed to start LLMs.txt generation. No job ID returned.",500);let Q=G.id,X;while(!0){if(X=await this.checkGenerateLLMsTextStatus(Q),"error"in X&&!X.success)return X;if(X.status==="completed")return X;if(X.status==="failed")throw new U(`LLMs.txt generation job ${X.status}. Error: ${X.error}`,500);if(X.status!=="processing")break;await new Promise((W)=>setTimeout(W,2000))}return{success:!1,error:"LLMs.txt generation job terminated unexpectedly"}}catch(G){throw new U(G.message,500,G.response?.data?.details)}}async asyncGenerateLLMsText($,Y){let G=this.prepareHeaders(),Q={url:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};try{let X=await this.postRequest(`${this.apiUrl}/v1/llmstxt`,Q,G);if(X.status===200)return X.data;else this.handleError(X,"start LLMs.txt generation")}catch(X){if(X.response?.data?.error)throw new U(`Request failed with status code ${X.response.status}. Error: ${X.response.data.error} ${X.response.data.details?` - ${JSON.stringify(X.response.data.details)}`:""}`,X.response.status);else throw new U(X.message,500)}return{success:!1,error:"Internal server error."}}async checkGenerateLLMsTextStatus($){let Y=this.prepareHeaders();try{let G=await this.getRequest(`${this.apiUrl}/v1/llmstxt/${$}`,Y);if(G.status===200)return G.data;else if(G.status===404)throw new U("LLMs.txt generation job not found",404);else this.handleError(G,"check LLMs.txt generation status")}catch(G){if(G.response?.data?.error)throw new U(`Request failed with status code ${G.response.status}. Error: ${G.response.data.error} ${G.response.data.details?` - ${JSON.stringify(G.response.data.details)}`:""}`,G.response.status);else throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async getQueueStatus(){let $=this.prepareHeaders();try{let Y=await this.getRequest(`${this.apiUrl}/v1/team/queue-status`,$);if(Y.status===200)return Y.data;else this.handleError(Y,"get queue status")}catch(Y){if(Y.response?.data?.error)throw new U(`Request failed with status code ${Y.response.status}. Error: ${Y.response.data.error} ${Y.response.data.details?` - ${JSON.stringify(Y.response.data.details)}`:""}`,Y.response.status);else throw new U(Y.message,500)}return{success:!1,error:"Internal server error."}}async getCreditUsage(){let $=this.prepareHeaders();try{let Y=await this.getRequest(`${this.apiUrl}/v1/team/credit-usage`,$);if(Y.status===200)return Y.data;else this.handleError(Y,"get credit usage")}catch(Y){if(Y.response?.data?.error)throw new U(`Request failed with status code ${Y.response.status}. Error: ${Y.response.data.error} ${Y.response.data.details?` - ${JSON.stringify(Y.response.data.details)}`:""}`,Y.response.status);else throw new U(Y.message,500)}return{success:!1,error:"Internal server error."}}async getTokenUsage(){let $=this.prepareHeaders();try{let Y=await this.getRequest(`${this.apiUrl}/v1/team/token-usage`,$);if(Y.status===200)return Y.data;else this.handleError(Y,"get token usage")}catch(Y){if(Y.response?.data?.error)throw new U(`Request failed with status code ${Y.response.status}. Error: ${Y.response.data.error} ${Y.response.data.details?` - ${JSON.stringify(Y.response.data.details)}`:""}`,Y.response.status);else throw new U(Y.message,500)}return{success:!1,error:"Internal server error."}}async getCreditUsageHistorical($){let Y=this.prepareHeaders();try{let G=`${this.apiUrl}/v1/team/credit-usage/historical${$?"?byApiKey=true":""}`,Q=await this.getRequest(G,Y);if(Q.status===200)return Q.data;else this.handleError(Q,"get credit usage historical")}catch(G){if(G.response?.data?.error)throw new U(`Request failed with status code ${G.response.status}. Error: ${G.response.data.error} ${G.response.data.details?` - ${JSON.stringify(G.response.data.details)}`:""}`,G.response.status);else throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async getTokenUsageHistorical($){let Y=this.prepareHeaders();try{let G=`${this.apiUrl}/v1/team/token-usage/historical${$?"?byApiKey=true":""}`,Q=await this.getRequest(G,Y);if(Q.status===200)return Q.data;else this.handleError(Q,"get token usage historical")}catch(G){if(G.response?.data?.error)throw new U(`Request failed with status code ${G.response.status}. Error: ${G.response.data.error} ${G.response.data.details?` - ${JSON.stringify(G.response.data.details)}`:""}`,G.response.status);else throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}},W5,w$,dG;var E$=F(()=>{C7();Q2();O7();Q2();_0=class extends Error{status;code;details;jobId;constructor($,Y,G,Q,X){super($);this.name="FirecrawlSdkError",this.status=Y,this.code=G,this.details=Q,this.jobId=X}},Z2=class extends _0{timeoutSeconds;constructor($,Y,G="batch"){let Q=G==="batch"?"batch scrape":"crawl";super(`${Q.charAt(0).toUpperCase()+Q.slice(1)} job ${$} did not complete within ${Y} seconds`,void 0,"JOB_TIMEOUT",void 0,$);this.name="JobTimeoutError",this.timeoutSeconds=Y}};T$=typeof TextDecoder<"u"?new TextDecoder:void 0,R$=class extends P${http;jobId;kind;pollInterval;timeout;ws;closed=!1;emittedDocumentKeys=new Set;constructor($,Y,G={}){super();this.http=$,this.jobId=Y,this.kind=G.kind??"crawl",this.pollInterval=G.pollInterval??2,this.timeout=G.timeout}buildWsUrl(){let Y=this.http.getApiUrl().replace(/^http/,"ws"),G=this.kind==="crawl"?`/v2/crawl/${this.jobId}`:`/v2/batch/scrape/${this.jobId}`;return`${Y}${G}`}async start(){return new Promise(($,Y)=>{let G=()=>{X(),$()},Q=(W)=>{X(),$()},X=()=>{this.removeListener("done",G),this.removeListener("error",Q)};this.on("done",G),this.on("error",Q),(async()=>{try{let W=this.buildWsUrl(),N=await F$();if(!N){this.pollLoop();return}if(this.ws=new N(W,this.http.getApiKey()),this.ws&&"binaryType"in this.ws)this.ws.binaryType="arraybuffer";if(this.ws)this.attachWsHandlers(this.ws)}catch(W){this.pollLoop()}})()})}attachWsHandlers($){let Y=Date.now(),G=this.timeout?this.timeout*1000:void 0;$.onmessage=(Q)=>{try{let X=I$(Q.data);if(!X)return;let W=JSON.parse(X),N=W.type;if(N==="error"){this.emit("error",{status:"failed",data:[],error:W.error,id:this.jobId});return}if(N==="catchup"){let M=W.data||{};this.emitDocuments(M.data||[]),this.emitSnapshot(M);return}if(N==="document"){let M=W.data;if(M)this.emitDocuments([M]);return}if(N==="done"){let M=W.data||W,V=M.data||[];if(V.length)this.emitDocuments(V);this.emit("done",{status:"completed",data:V,id:this.jobId,total:M.total,completed:M.completed,creditsUsed:M.creditsUsed}),this.close();return}let Z=W.data||W;if(Z&&Z.status)this.emitSnapshot(Z)}catch{}if(G&&Date.now()-Y>G)this.emit("error",{status:"failed",data:[],error:"Watcher timeout",id:this.jobId}),this.close()},$.onerror=()=>{this.emit("error",{status:"failed",data:[],error:"WebSocket error",id:this.jobId}),this.close()},$.onclose=()=>{if(!this.closed)this.pollLoop()}}documentKey($){if($&&typeof $==="object"){let Y=$.id??$.docId??$.url;if(typeof Y==="string"&&Y.length)return Y}try{return JSON.stringify($)}catch{return`${Date.now()}-${Math.random()}`}}emitDocuments($){for(let Y of $){if(!Y)continue;let G=this.documentKey(Y);if(this.emittedDocumentKeys.has(G))continue;this.emittedDocumentKeys.add(G),this.emit("document",{...Y,id:this.jobId})}}emitSnapshot($){let Y=$.status,G=$.data||[],Q=this.kind==="crawl"?{id:this.jobId,status:Y,completed:$.completed??0,total:$.total??0,creditsUsed:$.creditsUsed,expiresAt:$.expiresAt,next:$.next??null,data:G}:{id:this.jobId,status:Y,completed:$.completed??0,total:$.total??0,creditsUsed:$.creditsUsed,expiresAt:$.expiresAt,next:$.next??null,data:G};if(this.emit("snapshot",Q),["completed","failed","cancelled"].includes(Y))this.emit("done",{status:Y,data:G,id:this.jobId,total:$.total??0,completed:$.completed??0,creditsUsed:$.creditsUsed}),this.close()}async pollLoop(){let $=Date.now(),Y=this.timeout?this.timeout*1000:void 0;while(!this.closed){try{let G=this.kind==="crawl"?await M2(this.http,this.jobId):await V2(this.http,this.jobId);if(this.emitDocuments(G.data||[]),this.emit("snapshot",G),["completed","failed","cancelled"].includes(G.status)){this.emit("done",{status:G.status,data:G.data,id:this.jobId,total:G.total??0,completed:G.completed??0,creditsUsed:G.creditsUsed}),this.close();break}}catch{}if(Y&&Date.now()-$>Y){this.emit("error",{status:"failed",data:[],error:"Watcher timeout",id:this.jobId}),this.close();break}await new Promise((G)=>setTimeout(G,Math.max(1000,this.pollInterval*1000)))}}close(){if(this.closed=!0,this.ws&&this.ws.close)this.ws.close()}},S$=class extends EventTarget{dispatchTypedEvent($,Y){return super.dispatchEvent(Y)}},U=class extends Error{statusCode;details;constructor($,Y,G){super($);this.statusCode=Y,this.details=G}},W5=class extends S${ws;data;status;id;constructor($,Y){super();this.id=$;let G=Y.apiUrl.replace(/^http/,"ws");this.ws=new WebSocket(`${G}/v1/crawl/${$}`,Y.apiKey),this.status="scraping",this.data=[];let Q=(X)=>{if(X.type==="done")this.status="completed",this.dispatchTypedEvent("done",new CustomEvent("done",{detail:{status:this.status,data:this.data,id:this.id}}));else if(X.type==="error")this.status="failed",this.dispatchTypedEvent("error",new CustomEvent("error",{detail:{status:this.status,data:this.data,error:X.error,id:this.id}}));else if(X.type==="catchup"){this.status=X.data.status,this.data.push(...X.data.data??[]);for(let W of this.data)this.dispatchTypedEvent("document",new CustomEvent("document",{detail:{...W,id:this.id}}))}else if(X.type==="document")this.dispatchTypedEvent("document",new CustomEvent("document",{detail:{...X.data,id:this.id}}))};this.ws.onmessage=((X)=>{if(typeof X.data!=="string"){this.ws.close();return}try{let W=JSON.parse(X.data);Q(W)}catch(W){console.error("Error on message",W)}}).bind(this),this.ws.onclose=((X)=>{try{let W=JSON.parse(X.reason);Q(W)}catch(W){console.error("Error on close",W)}}).bind(this),this.ws.onerror=((X)=>{this.status="failed",this.dispatchTypedEvent("error",new CustomEvent("error",{detail:{status:this.status,data:this.data,error:"WebSocket error",id:this.id}}))}).bind(this)}close(){this.ws.close()}},w$=class extends D${_v1;_v1Opts;constructor($={}){super($);this._v1Opts={apiKey:$.apiKey,apiUrl:$.apiUrl}}get v1(){if(!this._v1)this._v1=new A$(this._v1Opts);return this._v1}},dG=w$});E$();export{dG as default,R$ as Watcher,_0 as SdkError,Z2 as JobTimeoutError,D$ as FirecrawlClient,A$ as FirecrawlAppV1,w$ as Firecrawl};
|
|
10
|
+
`+X}}catch(W){}}throw G}}_request($,Y){if(typeof $==="string")Y=Y||{},Y.url=$;else Y=$||{};Y=Q0(this.defaults,Y);let{transitional:G,paramsSerializer:Q,headers:X}=Y;if(G!==void 0)a0.assertOptions(G,{silentJSONParsing:o.transitional(o.boolean),forcedJSONParsing:o.transitional(o.boolean),clarifyTimeoutError:o.transitional(o.boolean),legacyInterceptorReqResOrdering:o.transitional(o.boolean)},!1);if(Q!=null)if(J.isFunction(Q))Y.paramsSerializer={serialize:Q};else a0.assertOptions(Q,{encode:o.function,serialize:o.function},!0);if(Y.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)Y.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else Y.allowAbsoluteUrls=!0;a0.assertOptions(Y,{baseUrl:o.spelling("baseURL"),withXsrfToken:o.spelling("withXSRFToken")},!0),Y.method=(Y.method||this.defaults.method||"get").toLowerCase();let W=X&&J.merge(X.common,X[Y.method]);X&&J.forEach(["delete","get","head","post","put","patch","common"],(P)=>{delete X[P]}),Y.headers=j.concat(W,X);let N=[],Z=!0;this.interceptors.request.forEach(function(H){if(typeof H.runWhen==="function"&&H.runWhen(Y)===!1)return;Z=Z&&H.synchronous;let O=Y.transitional||z0;if(O&&O.legacyInterceptorReqResOrdering)N.unshift(H.fulfilled,H.rejected);else N.push(H.fulfilled,H.rejected)});let M=[];this.interceptors.response.forEach(function(H){M.push(H.fulfilled,H.rejected)});let V,K=0,L;if(!Z){let P=[C1.bind(this),void 0];P.unshift(...N),P.push(...M),L=P.length,V=Promise.resolve(Y);while(K<L)V=V.then(P[K++],P[K++]);return V}L=N.length;let _=Y;while(K<L){let P=N[K++],H=N[K++];try{_=P(_)}catch(O){H.call(this,O);break}}try{V=C1.call(this,_)}catch(P){return Promise.reject(P)}K=0,L=M.length;while(K<L)V=V.then(M[K++],M[K++]);return V}getUri($){$=Q0(this.defaults,$);let Y=C0($.baseURL,$.url,$.allowAbsoluteUrls);return U0(Y,$.params,$.paramsSerializer)}}var o,o0;var a4=F(()=>{q();N1();x2();n4();H1();K1();t4();N0();c0();o=a0.validators;J.forEach(["delete","get","head","options"],function(Y){s0.prototype[Y]=function(G,Q){return this.request(Q0(Q||{},{method:Y,url:G,data:(Q||{}).data}))}});J.forEach(["post","put","patch"],function(Y){function G(Q){return function(W,N,Z){return this.request(Q0(Z||{},{method:Y,headers:Q?{"Content-Type":"multipart/form-data"}:{},url:W,data:N}))}}s0.prototype[Y]=G(),s0.prototype[Y+"Form"]=G(!0)});o0=s0});class r1{constructor($){if(typeof $!=="function")throw TypeError("executor must be a function.");let Y;this.promise=new Promise(function(X){Y=X});let G=this;this.promise.then((Q)=>{if(!G._listeners)return;let X=G._listeners.length;while(X-- >0)G._listeners[X](Q);G._listeners=null}),this.promise.then=(Q)=>{let X,W=new Promise((N)=>{G.subscribe(N),X=N}).then(Q);return W.cancel=function(){G.unsubscribe(X)},W},$(function(X,W,N){if(G.reason)return;G.reason=new t(X,W,N),Y(G.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe($){if(this.reason){$(this.reason);return}if(this._listeners)this._listeners.push($);else this._listeners=[$]}unsubscribe($){if(!this._listeners)return;let Y=this._listeners.indexOf($);if(Y!==-1)this._listeners.splice(Y,1)}toAbortSignal(){let $=new AbortController,Y=(G)=>{$.abort(G)};return this.subscribe(Y),$.signal.unsubscribe=()=>this.unsubscribe(Y),$.signal}static source(){let $;return{token:new r1(function(Q){$=Q}),cancel:$}}}var s4;var o4=F(()=>{O0();s4=r1});function $2($){return function(G){return $.apply(null,G)}}var e4=()=>{};function Y2($){return J.isObject($)&&$.isAxiosError===!0}var r4=F(()=>{q()});var G2,$5;var Y5=F(()=>{G2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(G2).forEach(([$,Y])=>{G2[Y]=$});$5=G2});function G5($){let Y=new o0($),G=f0(o0.prototype.request,Y);return J.extend(G,o0.prototype,Y,{allOwnKeys:!0}),J.extend(G,Y,null,{allOwnKeys:!0}),G.create=function(X){return G5(Q0($,X))},G}var f,K0;var Q5=F(()=>{q();I1();a4();H1();J1();v1();O0();o4();f1();L1();u0();i();e4();r4();N0();o1();Y5();f=G5(q0);f.Axios=o0;f.CanceledError=t;f.CancelToken=s4;f.isCancel=n0;f.VERSION=F0;f.toFormData=L0;f.AxiosError=z;f.Cancel=f.CanceledError;f.all=function(Y){return Promise.all(Y)};f.spread=$2;f.isAxiosError=Y2;f.mergeConfig=Q0;f.AxiosHeaders=j;f.formToJSON=($)=>Z1(J.isHTMLForm($)?new FormData($):$);f.getAdapter=O1.getAdapter;f.HttpStatusCode=$5;f.default=f;K0=f});var IG,T1,RG,DG,SG,AG,wG,EG,kG,qG,xG,jG,vG,bG,yG,fG;var Q2=F(()=>{Q5();({Axios:IG,AxiosError:T1,CanceledError:RG,isCancel:DG,CancelToken:SG,VERSION:AG,all:wG,Cancel:EG,isAxiosError:kG,spread:qG,toFormData:xG,AxiosHeaders:jG,HttpStatusCode:vG,formToJSON:bG,getAdapter:yG,mergeConfig:fG}=K0)});import{EventEmitter as P$}from"events";function J5(){try{if(typeof process<"u"&&process.env&&process.env.npm_package_version)return process.env.npm_package_version;return Z5()?.version||"3.x.x"}catch{return"3.x.x"}}function b0($){if(!$||typeof $!=="object")return!1;let Y=$,G="_def"in Y&&(typeof Y.safeParse==="function"||typeof Y.parse==="function"),Q="_zod"in Y&&typeof Y._zod==="object";return G||Q}function T7($){if(!$||typeof $!=="object")return!1;return"_zod"in $&&typeof $._zod==="object"}function I7($){if(!T7($))return null;try{let Y=$.constructor?.prototype?.constructor;if(Y&&typeof Y.toJSONSchema==="function")return Y.toJSONSchema($)}catch{}return null}function a($){if(!b0($))return $;let Y=I7($);if(Y)return Y;try{return N5($)}catch{return $}}function N2($){if(!$||typeof $!=="object"||Array.isArray($))return!1;let Y=Object.values($);if(Y.length===0)return!1;return Y.some((G)=>G&&typeof G==="object"&&G._def&&typeof G.safeParse==="function")}function R7($){if(!$)return;for(let Y of $){if(typeof Y==="string"){if(Y==="json")throw Error("json format must be an object with { type: 'json', prompt, schema }");continue}if(Y.type==="json"){let G=Y;if(!G.prompt&&!G.schema)throw Error("json format requires either 'prompt' or 'schema' (or both)");let Q=G.schema;if(b0(Q))G.schema=a(Q);else if(N2(Q))throw Error("json format schema appears to be a Zod schema's .shape property. Pass the Zod schema directly (e.g., `schema: MySchema`) instead of `schema: MySchema.shape`. The SDK will automatically convert Zod schemas to JSON Schema format.");continue}if(Y.type==="changeTracking"){let G=Y,Q=G.schema;if(b0(Q))G.schema=a(Q);else if(N2(Q))throw Error("changeTracking format schema appears to be a Zod schema's .shape property. Pass the Zod schema directly (e.g., `schema: MySchema`) instead of `schema: MySchema.shape`. The SDK will automatically convert Zod schemas to JSON Schema format.");continue}if(Y.type==="question"){let G=Y;if(typeof G.question!=="string"||G.question.trim().length===0)throw Error("question format requires a non-empty 'question' string");continue}if(Y.type==="highlights"){let G=Y;if(typeof G.query!=="string"||G.query.trim().length===0)throw Error("highlights format requires a non-empty 'query' string");continue}if(Y.type==="query"){let G=Y;if(typeof G.prompt!=="string"||G.prompt.trim().length===0)throw Error("query format requires a non-empty 'prompt' string");if(G.mode!=null&&G.mode!=="freeform"&&G.mode!=="directQuote")throw Error("query format mode must be 'freeform' or 'directQuote'");continue}if(Y.type==="screenshot"){let G=Y;if(G.quality!=null&&(typeof G.quality!=="number"||G.quality<0))throw Error("screenshot.quality must be a non-negative number")}}}function e0($){if(!$)return;if($.timeout!=null&&$.timeout<=0)throw Error("timeout must be positive");if($.waitFor!=null&&$.waitFor<0)throw Error("waitFor must be non-negative");R7($.formats)}function D7($){if(!$)return;for(let Y of $){if(typeof Y==="string"){if(Y==="json")throw Error("json format must be an object with { type: 'json', prompt, schema }");if(Y==="screenshot")throw Error("parse does not support screenshot format");if(Y==="changeTracking")throw Error("parse does not support changeTracking format");if(Y==="branding")throw Error("parse does not support branding format");continue}let G=Y.type;if(G==="changeTracking")throw Error("parse does not support changeTracking format");if(G==="screenshot")throw Error("parse does not support screenshot format");if(G==="branding")throw Error("parse does not support branding format");if(Y.type==="json"){let Q=Y;if(!Q.prompt&&!Q.schema)throw Error("json format requires either 'prompt' or 'schema' (or both)");let X=Q.schema;if(b0(X))Q.schema=a(X);else if(N2(X))throw Error("json format schema appears to be a Zod schema's .shape property. Pass the Zod schema directly (e.g., `schema: MySchema`) instead of `schema: MySchema.shape`. The SDK will automatically convert Zod schemas to JSON Schema format.");continue}if(Y.type==="question"){let Q=Y;if(typeof Q.question!=="string"||Q.question.trim().length===0)throw Error("question format requires a non-empty 'question' string");continue}if(Y.type==="highlights"){let Q=Y;if(typeof Q.query!=="string"||Q.query.trim().length===0)throw Error("highlights format requires a non-empty 'query' string");continue}if(Y.type==="query"){let Q=Y;if(typeof Q.prompt!=="string"||Q.prompt.trim().length===0)throw Error("query format requires a non-empty 'prompt' string");if(Q.mode!=null&&Q.mode!=="freeform"&&Q.mode!=="directQuote")throw Error("query format mode must be 'freeform' or 'directQuote'")}}}function S7($){if(!$)return;if($.timeout!=null&&$.timeout<=0)throw Error("timeout must be positive");let Y=$;if(Y.waitFor!==void 0)throw Error("parse does not support waitFor");if(Y.actions!==void 0)throw Error("parse does not support actions");if(Y.location!==void 0)throw Error("parse does not support location overrides");if(Y.mobile!==void 0)throw Error("parse does not support mobile rendering");if(Y.maxAge!==void 0||Y.minAge!==void 0||Y.storeInCache!==void 0||Y.lockdown!==void 0)throw Error("parse does not support cache/index options");if(Y.proxy!==void 0&&Y.proxy!=="basic"&&Y.proxy!=="auto")throw Error("parse only supports proxy values of 'basic' or 'auto'");D7($.formats)}function D($,Y){let G=$.status,Q=$.data||{},X=Q?.error||Q?.message||`Request failed (${G}) while trying to ${Y}`;throw new _0(X,G,void 0,Q?.details)}function R($,Y){let G=$.response?.status,Q=$.response?.data,X=Q?.error||$.message||`Request failed${G?` (${G})`:""} while trying to ${Y}`,W=Q?.code||$.code;throw new _0(X,G,W,Q?.details??Q)}function M5($){if($ instanceof Z2)return!1;if($ instanceof _0||$&&typeof $==="object"&&"status"in $){let Y=$.status;if(Y&&Y>=400&&Y<500)return!1;if(Y&&Y>=500)return!0}if($?.isAxiosError&&!$.response)return!0;if($?.code==="ECONNABORTED"||$?.message?.includes("timeout"))return!0;return!0}async function A7($,Y,G){if(!Y||!Y.trim())throw Error("URL cannot be empty");if(G)e0(G);let Q={url:Y.trim()};if(G)Object.assign(Q,G);try{let X=await $.post("/v2/scrape",Q,typeof G?.timeout==="number"?{timeoutMs:G.timeout+5000}:{});if(X.status!==200||!X.data?.success)D(X,"scrape");return X.data.data||{}}catch(X){if(X?.isAxiosError)return R(X,"scrape");throw X}}async function w7($,Y,G){if(!Y||!Y.trim())throw Error("Job ID cannot be empty");let Q=G?.code&&G.code.trim(),X=G?.prompt&&G.prompt.trim();if(!Q&&!X)throw Error("Either 'code' or 'prompt' must be provided");let W={};if(Q)W.code=G.code;if(X)W.prompt=G.prompt;if(W.language=G.language??"node",G.timeout!=null)W.timeout=G.timeout;if(G.origin)W.origin=G.origin;try{let N=await $.post(`/v2/scrape/${Y}/interact`,W,G.timeout!=null?{timeoutMs:G.timeout*1000+5000}:{});if(N.status!==200)D(N,"interact with scrape browser");return N.data}catch(N){if(N?.isAxiosError)return R(N,"interact with scrape browser");throw N}}async function E7($,Y){if(!Y||!Y.trim())throw Error("Job ID cannot be empty");try{let G=await $.delete(`/v2/scrape/${Y}/interact`);if(G.status!==200)D(G,"stop interaction");return G.data}catch(G){if(G?.isAxiosError)return R(G,"stop interaction");throw G}}function X5($,Y){if(typeof Blob<"u"&&$ instanceof Blob){if(Y&&$.type!==Y)return new Blob([$],{type:Y});return $}if(typeof Buffer<"u"&&Buffer.isBuffer($))return new Blob([$],{type:Y});if($ instanceof ArrayBuffer)return new Blob([$],{type:Y});if(ArrayBuffer.isView($))return new Blob([$],{type:Y});if(typeof $==="string")return new Blob([$],{type:Y??"text/plain; charset=utf-8"});throw Error("Unsupported parse file data type")}async function k7($,Y,G){if(!Y||!Y.filename||!Y.filename.trim())throw Error("filename cannot be empty");if(Y.data==null)throw Error("file data cannot be empty");if(X5(Y.data,Y.contentType).size===0)throw Error("file data cannot be empty");if(G)S7(G);let X=J5(),W={...G??{},origin:typeof G?.origin==="string"&&G.origin.includes("mcp")?G.origin:G?.origin??`js-sdk@${X}`},N=new FormData;N.append("options",JSON.stringify(W)),N.append("file",X5(Y.data,Y.contentType),Y.filename.trim());try{let Z=await $.postMultipart("/v2/parse",N,typeof W.timeout==="number"?{timeoutMs:W.timeout+5000}:{});if(Z.status!==200||!Z.data?.success)D(Z,"parse");return Z.data.data||{}}catch(Z){if(Z?.isAxiosError)return R(Z,"parse");throw Z}}function q7($){if(!$.query||!$.query.trim())throw Error("Query cannot be empty");if($.limit!=null&&$.limit<=0)throw Error("limit must be positive");if($.timeout!=null&&$.timeout<=0)throw Error("timeout must be positive");if($.includeDomains?.length&&$.excludeDomains?.length)throw Error("includeDomains and excludeDomains cannot both be specified");let Y={query:$.query};if($.sources)Y.sources=$.sources;if($.categories)Y.categories=$.categories;if($.includeDomains)Y.includeDomains=$.includeDomains;if($.excludeDomains)Y.excludeDomains=$.excludeDomains;if($.limit!=null)Y.limit=$.limit;if($.tbs!=null)Y.tbs=$.tbs;if($.location!=null)Y.location=$.location;if($.ignoreInvalidURLs!=null)Y.ignoreInvalidURLs=$.ignoreInvalidURLs;if($.timeout!=null)Y.timeout=$.timeout;if($.integration&&$.integration.trim())Y.integration=$.integration.trim();if($.origin)Y.origin=$.origin;if($.scrapeOptions)e0($.scrapeOptions),Y.scrapeOptions=$.scrapeOptions;return Y}function X2($){let Y=[];for(let G of $)if(G&&typeof G==="object")if("markdown"in G||"html"in G||"rawHtml"in G||"links"in G||"screenshot"in G||"changeTracking"in G||"summary"in G||"json"in G)Y.push(G);else Y.push(G);else Y.push({url:G});return Y}async function x7($,Y){let G=q7(Y);try{let Q=await $.post("/v2/search",G,typeof Y.timeout==="number"?{timeoutMs:Y.timeout+5000}:{});if(Q.status!==200||!Q.data?.success)D(Q,"search");let X=Q.data.data||{},W={};if(X.web)W.web=X2(X.web);if(X.news)W.news=X2(X.news);if(X.images)W.images=X2(X.images);return W}catch(Q){if(Q?.isAxiosError)return R(Q,"search");throw Q}}function j7($,Y){if(!$||!$.trim())throw Error("URL cannot be empty");let G={url:$.trim()};if(Y){if(Y.sitemap!=null)G.sitemap=Y.sitemap;if(Y.search!=null)G.search=Y.search;if(Y.includeSubdomains!=null)G.includeSubdomains=Y.includeSubdomains;if(Y.ignoreQueryParameters!=null)G.ignoreQueryParameters=Y.ignoreQueryParameters;if(Y.limit!=null)G.limit=Y.limit;if(Y.timeout!=null)G.timeout=Y.timeout;if(Y.integration!=null&&Y.integration.trim())G.integration=Y.integration.trim();if(Y.origin)G.origin=Y.origin;if(Y.location!=null)G.location=Y.location}return G}async function v7($,Y,G){let Q=j7(Y,G);try{let X=await $.post("/v2/map",Q,typeof G?.timeout==="number"?{timeoutMs:G.timeout+5000}:{});if(X.status!==200||!X.data?.success)D(X,"map");let W=X.data.links||[],N=[];for(let Z of W)if(typeof Z==="string")N.push({url:Z});else if(Z&&typeof Z==="object")N.push({url:Z.url,title:Z.title,description:Z.description});return{links:N}}catch(X){if(X?.isAxiosError)return R(X,"map");throw X}}async function J2($,Y,G,Q){let X=G.slice(),W=Y,N=0,Z=Q?.maxPages??void 0,M=Q?.maxResults??void 0,V=Q?.maxWaitTime??void 0,K=Date.now();while(W){if(Z!=null&&N>=Z)break;if(V!=null&&(Date.now()-K)/1000>V)break;let L=null;try{L=(await $.get(W)).data}catch{break}if(!L?.success)break;let _=Array.isArray(L.data)?L.data:L.data?.pages||[];for(let P of _){if(M!=null&&X.length>=M)break;X.push(P)}if(M!=null&&X.length>=M)break;W=L.next??(Array.isArray(L.data)?null:L.data?.next)??null,N+=1}return X}function b7($){if(!$.url||!$.url.trim())throw Error("URL cannot be empty");let Y={url:$.url.trim()};if($.prompt)Y.prompt=$.prompt;if($.excludePaths)Y.excludePaths=$.excludePaths;if($.includePaths)Y.includePaths=$.includePaths;if($.maxDiscoveryDepth!=null)Y.maxDiscoveryDepth=$.maxDiscoveryDepth;if($.sitemap!=null)Y.sitemap=$.sitemap;if($.robotsUserAgent!=null)Y.robotsUserAgent=$.robotsUserAgent;if($.ignoreQueryParameters!=null)Y.ignoreQueryParameters=$.ignoreQueryParameters;if($.deduplicateSimilarURLs!=null)Y.deduplicateSimilarURLs=$.deduplicateSimilarURLs;if($.limit!=null)Y.limit=$.limit;if($.crawlEntireDomain!=null)Y.crawlEntireDomain=$.crawlEntireDomain;if($.allowExternalLinks!=null)Y.allowExternalLinks=$.allowExternalLinks;if($.allowSubdomains!=null)Y.allowSubdomains=$.allowSubdomains;if($.delay!=null)Y.delay=$.delay;if($.maxConcurrency!=null)Y.maxConcurrency=$.maxConcurrency;if($.regexOnFullURL!=null)Y.regexOnFullURL=$.regexOnFullURL;if($.webhook!=null)Y.webhook=$.webhook;if($.integration!=null&&$.integration.trim())Y.integration=$.integration.trim();if($.origin)Y.origin=$.origin;if($.scrapeOptions)e0($.scrapeOptions),Y.scrapeOptions=$.scrapeOptions;if($.zeroDataRetention!=null)Y.zeroDataRetention=$.zeroDataRetention;return Y}async function V5($,Y){let G=b7(Y);try{let Q=await $.post("/v2/crawl",G);if(Q.status!==200||!Q.data?.success)D(Q,"start crawl");return{id:Q.data.id,url:Q.data.url}}catch(Q){if(Q?.isAxiosError)return R(Q,"start crawl");throw Q}}async function M2($,Y,G){try{let Q=await $.get(`/v2/crawl/${Y}`);if(Q.status!==200||!Q.data?.success)D(Q,"get crawl status");let X=Q.data,W=X.data||[];if(!(G?.autoPaginate??!0)||!X.next)return{id:Y,status:X.status,completed:X.completed??0,total:X.total??0,creditsUsed:X.creditsUsed,expiresAt:X.expiresAt,next:X.next??null,data:W};let Z=await J2($,X.next,W,G);return{id:Y,status:X.status,completed:X.completed??0,total:X.total??0,creditsUsed:X.creditsUsed,expiresAt:X.expiresAt,next:null,data:Z}}catch(Q){if(Q?.isAxiosError)return R(Q,"get crawl status");throw Q}}async function y7($,Y){try{let G=await $.delete(`/v2/crawl/${Y}`);if(G.status!==200)D(G,"cancel crawl");return G.data?.status==="cancelled"}catch(G){if(G?.isAxiosError)return R(G,"cancel crawl");throw G}}async function f7($,Y,G=2,Q){let X=Date.now();while(!0){try{let W=await M2($,Y);if(["completed","failed","cancelled"].includes(W.status))return W}catch(W){if(!M5(W)){if(W instanceof _0)throw new _0(W.message,W.status,W.code,W.details,Y);throw W}}if(Q!=null&&Date.now()-X>Q*1000)throw new Z2(Y,Q,"crawl");await new Promise((W)=>setTimeout(W,Math.max(1000,G*1000)))}}async function h7($,Y,G=2,Q){let X=await V5($,Y);return f7($,X.id,G,Q)}async function m7($,Y){try{let G=await $.get(`/v2/crawl/${Y}/errors`);if(G.status!==200)D(G,"get crawl errors");let Q=G.data?.data??G.data;return{errors:Q.errors||[],robotsBlocked:Q.robotsBlocked||[]}}catch(G){if(G?.isAxiosError)return R(G,"get crawl errors");throw G}}async function g7($){try{let Y=await $.get("/v2/crawl/active");if(Y.status!==200||!Y.data?.success)D(Y,"get active crawls");return{success:!0,crawls:(Y.data?.crawls||[]).map((X)=>({id:X.id,teamId:X.teamId??X.team_id,url:X.url,options:X.options??null}))}}catch(Y){if(Y?.isAxiosError)return R(Y,"get active crawls");throw Y}}async function u7($,Y,G){if(!Y||!Y.trim())throw Error("URL cannot be empty");if(!G||!G.trim())throw Error("Prompt cannot be empty");try{let Q=await $.post("/v2/crawl/params-preview",{url:Y.trim(),prompt:G});if(Q.status!==200||!Q.data?.success)D(Q,"crawl params preview");let X=Q.data.data||{};if(Q.data.warning)X.warning=Q.data.warning;return X}catch(Q){if(Q?.isAxiosError)return R(Q,"crawl params preview");throw Q}}async function K5($,Y,{options:G,webhook:Q,appendToId:X,ignoreInvalidURLs:W,maxConcurrency:N,zeroDataRetention:Z,idempotencyKey:M,integration:V,origin:K}={}){if(!Array.isArray(Y)||Y.length===0)throw Error("URLs list cannot be empty");let L={urls:Y};if(G)e0(G),Object.assign(L,G);if(Q!=null)L.webhook=Q;if(X!=null)L.appendToId=X;if(W!=null)L.ignoreInvalidURLs=W;if(N!=null)L.maxConcurrency=N;if(Z!=null)L.zeroDataRetention=Z;if(V!=null&&V.trim())L.integration=V.trim();if(K)L.origin=K;try{let _=$.prepareHeaders(M),P=await $.post("/v2/batch/scrape",L,{headers:_});if(P.status!==200||!P.data?.success)D(P,"start batch scrape");return{id:P.data.id,url:P.data.url,invalidURLs:P.data.invalidURLs||void 0}}catch(_){if(_?.isAxiosError)return R(_,"start batch scrape");throw _}}async function V2($,Y,G){try{let Q=await $.get(`/v2/batch/scrape/${Y}`);if(Q.status!==200||!Q.data?.success)D(Q,"get batch scrape status");let X=Q.data,W=X.data||[];if(!(G?.autoPaginate??!0)||!X.next)return{id:Y,status:X.status,completed:X.completed??0,total:X.total??0,creditsUsed:X.creditsUsed,expiresAt:X.expiresAt,next:X.next??null,data:W};let Z=await J2($,X.next,W,G);return{id:Y,status:X.status,completed:X.completed??0,total:X.total??0,creditsUsed:X.creditsUsed,expiresAt:X.expiresAt,next:null,data:Z}}catch(Q){if(Q?.isAxiosError)return R(Q,"get batch scrape status");throw Q}}async function c7($,Y){try{let G=await $.delete(`/v2/batch/scrape/${Y}`);if(G.status!==200)D(G,"cancel batch scrape");return G.data?.status==="cancelled"}catch(G){if(G?.isAxiosError)return R(G,"cancel batch scrape");throw G}}async function l7($,Y){try{let G=await $.get(`/v2/batch/scrape/${Y}/errors`);if(G.status!==200)D(G,"get batch scrape errors");let Q=G.data?.data??G.data;return{errors:Q.errors||[],robotsBlocked:Q.robotsBlocked||[]}}catch(G){if(G?.isAxiosError)return R(G,"get batch scrape errors");throw G}}async function d7($,Y,G=2,Q){let X=Date.now();while(!0){try{let W=await V2($,Y);if(["completed","failed","cancelled"].includes(W.status))return W}catch(W){if(!M5(W)){if(W instanceof _0)throw new _0(W.message,W.status,W.code,W.details,Y);throw W}}if(Q!=null&&Date.now()-X>Q*1000)throw new Z2(Y,Q,"batch");await new Promise((W)=>setTimeout(W,Math.max(1000,G*1000)))}}async function p7($,Y,G={}){let Q=await K5($,Y,G);return d7($,Q.id,G.pollInterval??2,G.timeout)}function n7($){let Y={};if($.urls)Y.urls=$.urls;if($.prompt!=null)Y.prompt=$.prompt;if($.schema!=null)Y.schema=b0($.schema)?a($.schema):$.schema;if($.systemPrompt!=null)Y.systemPrompt=$.systemPrompt;if($.allowExternalLinks!=null)Y.allowExternalLinks=$.allowExternalLinks;if($.enableWebSearch!=null)Y.enableWebSearch=$.enableWebSearch;if($.showSources!=null)Y.showSources=$.showSources;if($.ignoreInvalidURLs!=null)Y.ignoreInvalidURLs=$.ignoreInvalidURLs;if($.integration&&$.integration.trim())Y.integration=$.integration.trim();if($.origin)Y.origin=$.origin;if($.agent)Y.agent=$.agent;if($.scrapeOptions)e0($.scrapeOptions),Y.scrapeOptions=$.scrapeOptions;return Y}async function L5($,Y){let G=n7(Y);try{let Q=await $.post("/v2/extract",G);if(Q.status!==200)D(Q,"extract");return Q.data}catch(Q){if(Q?.isAxiosError)return R(Q,"extract");throw Q}}async function z5($,Y){try{let G=await $.get(`/v2/extract/${Y}`);if(G.status!==200)D(G,"extract status");return G.data}catch(G){if(G?.isAxiosError)return R(G,"extract status");throw G}}async function i7($,Y,G=2,Q){let X=Date.now();while(!0){let W=await z5($,Y);if(["completed","failed","cancelled"].includes(W.status||""))return W;if(Q!=null&&Date.now()-X>Q*1000)return W;await new Promise((N)=>setTimeout(N,Math.max(1000,G*1000)))}}async function t7($,Y){let G=await L5($,Y),Q=G.id;if(!Q)return G;return i7($,Q,Y.pollInterval??2,Y.timeout)}function a7($){let Y={};if($.urls)Y.urls=$.urls;if(Y.prompt=$.prompt,$.schema!=null)Y.schema=b0($.schema)?a($.schema):$.schema;if($.integration&&$.integration.trim())Y.integration=$.integration.trim();if($.origin)Y.origin=$.origin;if($.maxCredits!==null&&$.maxCredits!==void 0)Y.maxCredits=$.maxCredits;if($.strictConstrainToURLs!==null&&$.strictConstrainToURLs!==void 0)Y.strictConstrainToURLs=$.strictConstrainToURLs;if($.model!==null&&$.model!==void 0)Y.model=$.model;if($.webhook!=null)Y.webhook=$.webhook;return Y}async function B5($,Y){let G=a7(Y);try{let Q=await $.post("/v2/agent",G);if(Q.status!==200)D(Q,"agent");return Q.data}catch(Q){if(Q?.isAxiosError)return R(Q,"agent");throw Q}}async function _5($,Y){try{let G=await $.get(`/v2/agent/${Y}`);if(G.status!==200)D(G,"agent status");return G.data}catch(G){if(G?.isAxiosError)return R(G,"agent status");throw G}}async function s7($,Y,G=2,Q){let X=Date.now();while(!0){let W=await _5($,Y);if(["completed","failed","cancelled"].includes(W.status||""))return W;if(Q!=null&&Date.now()-X>Q*1000)return W;await new Promise((N)=>setTimeout(N,Math.max(1000,G*1000)))}}async function o7($,Y){let G=await B5($,Y),Q=G.id;if(!Q)return G;return s7($,Q,Y.pollInterval??2,Y.timeout)}async function e7($,Y){try{let G=await $.delete(`/v2/agent/${Y}`);if(G.status!==200)D(G,"cancel agent");return G.data?.success===!0}catch(G){if(G?.isAxiosError)return R(G,"cancel agent");throw G}}async function r7($,Y={}){let G={};if(Y.ttl!=null)G.ttl=Y.ttl;if(Y.activityTtl!=null)G.activityTtl=Y.activityTtl;if(Y.streamWebView!=null)G.streamWebView=Y.streamWebView;if(Y.profile!=null)G.profile=Y.profile;if(Y.integration!=null)G.integration=Y.integration;if(Y.origin)G.origin=Y.origin;try{let Q=await $.post("/v2/browser",G);if(Q.status!==200)D(Q,"create browser session");return Q.data}catch(Q){if(Q?.isAxiosError)return R(Q,"create browser session");throw Q}}async function $$($,Y,G){let Q={code:G.code,language:G.language??"bash"};if(G.timeout!=null)Q.timeout=G.timeout;try{let X=await $.post(`/v2/browser/${Y}/execute`,Q,G.timeout!=null?{timeoutMs:G.timeout*1000+5000}:{});if(X.status!==200)D(X,"execute browser code");return X.data}catch(X){if(X?.isAxiosError)return R(X,"execute browser code");throw X}}async function Y$($,Y){try{let G=await $.delete(`/v2/browser/${Y}`);if(G.status!==200)D(G,"delete browser session");return G.data}catch(G){if(G?.isAxiosError)return R(G,"delete browser session");throw G}}async function G$($,Y={}){let G="/v2/browser";if(Y.status)G+=`?status=${Y.status}`;try{let Q=await $.get(G);if(Q.status!==200)D(Q,"list browser sessions");return Q.data}catch(Q){if(Q?.isAxiosError)return R(Q,"list browser sessions");throw Q}}async function Q$($){try{let Y=await $.get("/v2/concurrency-check");if(Y.status!==200||!Y.data?.success)D(Y,"get concurrency");let G=Y.data.data||Y.data;return{concurrency:G.concurrency,maxConcurrency:G.maxConcurrency??G.max_concurrency}}catch(Y){if(Y?.isAxiosError)return R(Y,"get concurrency");throw Y}}async function X$($){try{let Y=await $.get("/v2/team/credit-usage");if(Y.status!==200||!Y.data?.success)D(Y,"get credit usage");let G=Y.data.data||Y.data;return{remainingCredits:G.remainingCredits??G.remaining_credits??0,planCredits:G.planCredits??G.plan_credits,billingPeriodStart:G.billingPeriodStart??G.billing_period_start??null,billingPeriodEnd:G.billingPeriodEnd??G.billing_period_end??null}}catch(Y){if(Y?.isAxiosError)return R(Y,"get credit usage");throw Y}}async function W$($){try{let Y=await $.get("/v2/team/token-usage");if(Y.status!==200||!Y.data?.success)D(Y,"get token usage");let G=Y.data.data||Y.data;return{remainingTokens:G.remainingTokens??G.remaining_tokens??0,planTokens:G.planTokens??G.plan_tokens,billingPeriodStart:G.billingPeriodStart??G.billing_period_start??null,billingPeriodEnd:G.billingPeriodEnd??G.billing_period_end??null}}catch(Y){if(Y?.isAxiosError)return R(Y,"get token usage");throw Y}}async function N$($){try{let Y=await $.get("/v2/team/queue-status");if(Y.status!==200||!Y.data?.success)D(Y,"get queue status");return Y.data}catch(Y){if(Y?.isAxiosError)return R(Y,"get queue status");throw Y}}async function Z$($,Y){try{let G=Y?"?byApiKey=true":"",Q=await $.get(`/v2/team/credit-usage/historical${G}`);if(Q.status!==200||!Q.data?.success)D(Q,"get credit usage historical");return Q.data}catch(G){if(G?.isAxiosError)return R(G,"get credit usage historical");throw G}}async function J$($,Y){try{let G=Y?"?byApiKey=true":"",Q=await $.get(`/v2/team/token-usage/historical${G}`);if(Q.status!==200||!Q.data?.success)D(Q,"get token usage historical");return Q.data}catch(G){if(G?.isAxiosError)return R(G,"get token usage historical");throw G}}function K2($){if(!$)return"";let Y=new URLSearchParams;for(let[Q,X]of Object.entries($))if(X!==void 0&&X!==null)Y.set(Q,String(X));let G=Y.toString();return G?`?${G}`:""}function I0($,Y){if($.status!==200||!$.data?.success||$.data.data==null)D($,Y);return $.data.data}async function M$($,Y){try{let G=await $.post("/v2/monitor",Y);return I0(G,"create monitor")}catch(G){if(G?.isAxiosError)return R(G,"create monitor");throw G}}async function V$($,Y){try{let G=await $.get(`/v2/monitor${K2(Y)}`);return I0(G,"list monitors")}catch(G){if(G?.isAxiosError)return R(G,"list monitors");throw G}}async function K$($,Y){try{let G=await $.get(`/v2/monitor/${Y}`);return I0(G,"get monitor")}catch(G){if(G?.isAxiosError)return R(G,"get monitor");throw G}}async function L$($,Y,G){try{let Q=await $.patch(`/v2/monitor/${Y}`,G);return I0(Q,"update monitor")}catch(Q){if(Q?.isAxiosError)return R(Q,"update monitor");throw Q}}async function z$($,Y){try{let G=await $.delete(`/v2/monitor/${Y}`);if(G.status!==200||!G.data?.success)D(G,"delete monitor");return!0}catch(G){if(G?.isAxiosError)return R(G,"delete monitor");throw G}}async function B$($,Y){try{let G=await $.post(`/v2/monitor/${Y}/run`,{});return I0(G,"run monitor")}catch(G){if(G?.isAxiosError)return R(G,"run monitor");throw G}}async function _$($,Y,G){try{let Q=await $.get(`/v2/monitor/${Y}/checks${K2(G)}`);return I0(Q,"list monitor checks")}catch(Q){if(Q?.isAxiosError)return R(Q,"list monitor checks");throw Q}}async function H$($,Y,G,Q){try{let{autoPaginate:X,maxPages:W,maxResults:N,maxWaitTime:Z,...M}=Q??{},V=await $.get(`/v2/monitor/${Y}/checks/${G}${K2(M)}`),K=I0(V,"get monitor check"),L=V.data?.next??K.next??null;if(!(Q?.autoPaginate??!0)||!L)return{...K,next:L};return{...K,pages:await J2($,L,K.pages||[],Q),next:null}}catch(X){if(X?.isAxiosError)return R(X,"get monitor check");throw X}}var F7=class{instance;apiKey;apiUrl;maxRetries;backoffFactor;constructor($){this.apiKey=$.apiKey,this.apiUrl=$.apiUrl.replace(/\/$/,""),this.maxRetries=$.maxRetries??3,this.backoffFactor=$.backoffFactor??0.5,this.instance=K0.create({baseURL:this.apiUrl,timeout:$.timeoutMs??300000,headers:{Authorization:`Bearer ${this.apiKey}`},transitional:{clarifyTimeoutError:!0}})}getApiUrl(){return this.apiUrl}getApiKey(){return this.apiKey}async request($){let Y=J5();$.headers={...$.headers||{}};let G;for(let Q=0;Q<this.maxRetries;Q++)try{let X={...$},W=typeof FormData<"u"&&X.data instanceof FormData;if(!W&&X.data!=null&&typeof X.data==="object"&&!Array.isArray(X.data)&&X.method&&["post","put","patch"].includes(X.method.toLowerCase())){let M=X.data??{};X.data={...M,origin:typeof M.origin==="string"&&M.origin.includes("mcp")?M.origin:`js-sdk@${Y}`}}if(W)X.headers={...X.headers||{}},delete X.headers["Content-Type"],delete X.headers["content-type"];let Z=await this.instance.request(X);if(Z.status===502&&Q<this.maxRetries-1){await this.sleep(this.backoffFactor*Math.pow(2,Q));continue}return Z}catch(X){if(G=X,X?.response?.status===502&&Q<this.maxRetries-1){await this.sleep(this.backoffFactor*Math.pow(2,Q));continue}throw X}throw G??Error("Unexpected HTTP client error")}sleep($){return new Promise((Y)=>setTimeout(Y,$*1000))}post($,Y,G){return this.request({method:"post",url:$,data:Y,headers:G?.headers,timeout:G?.timeoutMs})}postMultipart($,Y,G){return this.request({method:"post",url:$,data:Y,headers:G?.headers,timeout:G?.timeoutMs})}get($,Y){return this.request({method:"get",url:$,headers:Y})}delete($,Y){return this.request({method:"delete",url:$,headers:Y})}patch($,Y,G){return this.request({method:"patch",url:$,data:Y,headers:G?.headers,timeout:G?.timeoutMs})}prepareHeaders($){let Y={};if($)Y["x-idempotency-key"]=$;return Y}},_0,Z2,U$=()=>{if(typeof globalThis>"u")return;let $=globalThis.WebSocket;return typeof $==="function"?$:void 0},O$=()=>typeof process<"u"&&!!process.versions?.node,v0,W2,C$=async()=>{if(!O$())return;try{let $=await import("./index-0.1.15-0z186jwx.mjs"),Y=$.WebSocket??$.default?.WebSocket;return typeof Y==="function"?Y:void 0}catch{return}},F$=async()=>{if(v0)return v0;let $=U$();if($)return v0=$,v0;if(!W2)W2=C$();return v0=await W2,v0},T$,I$=($)=>{if(typeof $==="string")return $;if(typeof Buffer<"u"&&Buffer.isBuffer($))return $.toString("utf8");let Y=(G)=>{if(typeof Buffer<"u")return Buffer.from(G.buffer,G.byteOffset,G.byteLength).toString("utf8");return T$?.decode(G)};if(ArrayBuffer.isView($))return Y($);if($ instanceof ArrayBuffer)return Y(new Uint8Array($));return},R$,D$=class{http;isCloudService($){return $.includes("api.firecrawl.dev")}constructor($={}){let Y=$.apiKey??process.env.FIRECRAWL_API_KEY??"",G=($.apiUrl??process.env.FIRECRAWL_API_URL??"https://api.firecrawl.dev").replace(/\/$/,"");if(this.isCloudService(G)&&!Y)throw Error("API key is required for the cloud API. Set FIRECRAWL_API_KEY env or pass apiKey.");this.http=new F7({apiKey:Y,apiUrl:G,timeoutMs:$.timeoutMs,maxRetries:$.maxRetries,backoffFactor:$.backoffFactor})}async scrape($,Y){return A7(this.http,$,Y)}async interact($,Y){return w7(this.http,$,Y)}async stopInteraction($){return E7(this.http,$)}async scrapeExecute($,Y){return this.interact($,Y)}async stopInteractiveBrowser($){return this.stopInteraction($)}async deleteScrapeBrowser($){return this.stopInteraction($)}async parse($,Y){return k7(this.http,$,Y)}async search($,Y={}){return x7(this.http,{query:$,...Y})}async map($,Y){return v7(this.http,$,Y)}async startCrawl($,Y={}){return V5(this.http,{url:$,...Y})}async getCrawlStatus($,Y){return M2(this.http,$,Y)}async cancelCrawl($){return y7(this.http,$)}async crawl($,Y={}){return h7(this.http,{url:$,...Y},Y.pollInterval,Y.timeout)}async getCrawlErrors($){return m7(this.http,$)}async getActiveCrawls(){return g7(this.http)}async crawlParamsPreview($,Y){return u7(this.http,$,Y)}async createMonitor($){return M$(this.http,$)}async listMonitors($){return V$(this.http,$)}async getMonitor($){return K$(this.http,$)}async updateMonitor($,Y){return L$(this.http,$,Y)}async deleteMonitor($){return z$(this.http,$)}async runMonitor($){return B$(this.http,$)}async listMonitorChecks($,Y){return _$(this.http,$,Y)}async getMonitorCheck($,Y,G){return H$(this.http,$,Y,G)}async startBatchScrape($,Y){return K5(this.http,$,Y)}async getBatchScrapeStatus($,Y){return V2(this.http,$,Y)}async getBatchScrapeErrors($){return l7(this.http,$)}async cancelBatchScrape($){return c7(this.http,$)}async batchScrape($,Y){return p7(this.http,$,Y)}async startExtract($){return L5(this.http,$)}async getExtractStatus($){return z5(this.http,$)}async extract($){return t7(this.http,$)}async startAgent($){return B5(this.http,$)}async getAgentStatus($){return _5(this.http,$)}async agent($){return o7(this.http,$)}async cancelAgent($){return e7(this.http,$)}async browser($={}){return r7(this.http,$)}async browserExecute($,Y){return $$(this.http,$,Y)}async deleteBrowser($){return Y$(this.http,$)}async listBrowsers($={}){return G$(this.http,$)}async getConcurrency(){return Q$(this.http)}async getCreditUsage(){return X$(this.http)}async getTokenUsage(){return W$(this.http)}async getCreditUsageHistorical($){return Z$(this.http,$)}async getTokenUsageHistorical($){return J$(this.http,$)}async getQueueStatus(){return N$(this.http)}watcher($,Y={}){return new R$(this.http,$,Y)}},S$,U,A$=class{apiKey;apiUrl;version="1.25.1";isCloudService($){return $.includes("api.firecrawl.dev")}async getVersion(){try{if(typeof process<"u"&&process.env&&process.env.npm_package_version)return process.env.npm_package_version;return(await import("./package-WSP46L7M-0.1.15-jsqef57n.mjs")).default.version}catch($){if(!(typeof process<"u"&&(process.env.JEST_WORKER_ID!=null||!1)))console.error("Error getting version:",$);return"1.25.1"}}async init(){this.version=await this.getVersion()}constructor({apiKey:$=null,apiUrl:Y=null}){let G=Y||"https://api.firecrawl.dev";if(this.isCloudService(G)&&typeof $!=="string")throw new U("No API key provided",401);this.apiKey=$||"",this.apiUrl=G,this.init()}async scrapeUrl($,Y){let G={"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},Q={url:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};if(Q?.extract?.schema)Q={...Q,extract:{...Q.extract,schema:a(Q.extract.schema)}};if(Q?.jsonOptions?.schema)Q={...Q,jsonOptions:{...Q.jsonOptions,schema:a(Q.jsonOptions.schema)}};try{let X=await K0.post(this.apiUrl+"/v1/scrape",Q,{headers:G,timeout:Y?.timeout!==void 0?Y.timeout+5000:void 0});if(X.status===200){let W=X.data;if(W.success)return{success:!0,warning:W.warning,error:W.error,...W.data};else throw new U(`Failed to scrape URL. Error: ${W.error}`,X.status)}else this.handleError(X,"scrape URL")}catch(X){this.handleError(X.response,"scrape URL")}return{success:!1,error:"Internal server error."}}async search($,Y){let G={"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},Q={query:$,limit:Y?.limit??5,tbs:Y?.tbs,filter:Y?.filter,lang:Y?.lang??"en",country:Y?.country??"us",location:Y?.location,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`,timeout:Y?.timeout??60000,scrapeOptions:Y?.scrapeOptions??{formats:[]}};if(Q?.scrapeOptions?.extract?.schema)Q={...Q,scrapeOptions:{...Q.scrapeOptions,extract:{...Q.scrapeOptions.extract,schema:a(Q.scrapeOptions.extract.schema)}}};try{let X=await this.postRequest(this.apiUrl+"/v1/search",Q,G);if(X.status===200){let W=X.data;if(W.success)return{success:!0,data:W.data,warning:W.warning};else throw new U(`Failed to search. Error: ${W.error}`,X.status)}else this.handleError(X,"search")}catch(X){if(X.response?.data?.error)throw new U(`Request failed with status code ${X.response.status}. Error: ${X.response.data.error} ${X.response.data.details?` - ${JSON.stringify(X.response.data.details)}`:""}`,X.response.status);else throw new U(X.message,500)}return{success:!1,error:"Internal server error.",data:[]}}async crawlUrl($,Y,G=2,Q){let X=this.prepareHeaders(Q),W={url:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};try{let N=await this.postRequest(this.apiUrl+"/v1/crawl",W,X);if(N.status===200){let Z=N.data.id;return this.monitorJobStatus(Z,X,G)}else this.handleError(N,"start crawl job")}catch(N){if(N.response?.data?.error)throw new U(`Request failed with status code ${N.response.status}. Error: ${N.response.data.error} ${N.response.data.details?` - ${JSON.stringify(N.response.data.details)}`:""}`,N.response.status);else throw new U(N.message,500)}return{success:!1,error:"Internal server error."}}async asyncCrawlUrl($,Y,G){let Q=this.prepareHeaders(G),X={url:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};try{let W=await this.postRequest(this.apiUrl+"/v1/crawl",X,Q);if(W.status===200)return W.data;else this.handleError(W,"start crawl job")}catch(W){if(W.response?.data?.error)throw new U(`Request failed with status code ${W.response.status}. Error: ${W.response.data.error} ${W.response.data.details?` - ${JSON.stringify(W.response.data.details)}`:""}`,W.response.status);else throw new U(W.message,500)}return{success:!1,error:"Internal server error."}}async checkCrawlStatus($,Y=!1,G,Q,X){if(!$)throw new U("No crawl ID provided",400);let W=this.prepareHeaders(),N=new URL(G??`${this.apiUrl}/v1/crawl/${$}`);if(Q!==void 0)N.searchParams.set("skip",Q.toString());if(X!==void 0)N.searchParams.set("limit",X.toString());try{let Z=await this.getRequest(N.href,W);if(Z.status===200){let M=Z.data.data;if(Y&&Z.data.status==="completed"){let K=Z.data;if("data"in K){let L=K.data;while(typeof K==="object"&&"next"in K){if(L.length===0)break;K=(await this.getRequest(K.next,W)).data,L=L.concat(K.data)}M=L}}let V={success:Z.data.success,status:Z.data.status,total:Z.data.total,completed:Z.data.completed,creditsUsed:Z.data.creditsUsed,next:Y?void 0:Z.data.next,expiresAt:new Date(Z.data.expiresAt),data:M};if(!Z.data.success&&Z.data.error)V={...V,success:!1,error:Z.data.error};if(Z.data.next)V.next=Z.data.next;return V}else this.handleError(Z,"check crawl status")}catch(Z){throw new U(Z.message,500)}return{success:!1,error:"Internal server error."}}async checkCrawlErrors($){let Y=this.prepareHeaders();try{let G=await this.deleteRequest(`${this.apiUrl}/v1/crawl/${$}/errors`,Y);if(G.status===200)return G.data;else this.handleError(G,"check crawl errors")}catch(G){throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async cancelCrawl($){let Y=this.prepareHeaders();try{let G=await this.deleteRequest(`${this.apiUrl}/v1/crawl/${$}`,Y);if(G.status===200)return G.data;else this.handleError(G,"cancel crawl job")}catch(G){throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async crawlUrlAndWatch($,Y,G){let Q=await this.asyncCrawlUrl($,Y,G);if(Q.success&&Q.id){let X=Q.id;return new W5(X,this)}throw new U("Crawl job failed to start",400)}async mapUrl($,Y){let G=this.prepareHeaders(),Q={url:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};try{let X=await this.postRequest(this.apiUrl+"/v1/map",Q,G);if(X.status===200)return X.data;else this.handleError(X,"map")}catch(X){throw new U(X.message,500)}return{success:!1,error:"Internal server error."}}async batchScrapeUrls($,Y,G=2,Q,X,W,N){let Z=this.prepareHeaders(Q),M={urls:$,webhook:X,ignoreInvalidURLs:W,maxConcurrency:N,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};if(M?.extract?.schema)M={...M,extract:{...M.extract,schema:a(M.extract.schema)}};if(M?.jsonOptions?.schema)M={...M,jsonOptions:{...M.jsonOptions,schema:a(M.jsonOptions.schema)}};try{let V=await this.postRequest(this.apiUrl+"/v1/batch/scrape",M,Z);if(V.status===200){let K=V.data.id;return this.monitorJobStatus(K,Z,G)}else this.handleError(V,"start batch scrape job")}catch(V){if(V.response?.data?.error)throw new U(`Request failed with status code ${V.response.status}. Error: ${V.response.data.error} ${V.response.data.details?` - ${JSON.stringify(V.response.data.details)}`:""}`,V.response.status);else throw new U(V.message,500)}return{success:!1,error:"Internal server error."}}async asyncBatchScrapeUrls($,Y,G,Q,X){let W=this.prepareHeaders(G),N={urls:$,webhook:Q,ignoreInvalidURLs:X,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};try{let Z=await this.postRequest(this.apiUrl+"/v1/batch/scrape",N,W);if(Z.status===200)return Z.data;else this.handleError(Z,"start batch scrape job")}catch(Z){if(Z.response?.data?.error)throw new U(`Request failed with status code ${Z.response.status}. Error: ${Z.response.data.error} ${Z.response.data.details?` - ${JSON.stringify(Z.response.data.details)}`:""}`,Z.response.status);else throw new U(Z.message,500)}return{success:!1,error:"Internal server error."}}async batchScrapeUrlsAndWatch($,Y,G,Q,X){let W=await this.asyncBatchScrapeUrls($,Y,G,Q,X);if(W.success&&W.id){let N=W.id;return new W5(N,this)}throw new U("Batch scrape job failed to start",400)}async checkBatchScrapeStatus($,Y=!1,G,Q,X){if(!$)throw new U("No batch scrape ID provided",400);let W=this.prepareHeaders(),N=new URL(G??`${this.apiUrl}/v1/batch/scrape/${$}`);if(Q!==void 0)N.searchParams.set("skip",Q.toString());if(X!==void 0)N.searchParams.set("limit",X.toString());try{let Z=await this.getRequest(N.href,W);if(Z.status===200){let M=Z.data.data;if(Y&&Z.data.status==="completed"){let K=Z.data;if("data"in K){let L=K.data;while(typeof K==="object"&&"next"in K){if(L.length===0)break;K=(await this.getRequest(K.next,W)).data,L=L.concat(K.data)}M=L}}let V={success:Z.data.success,status:Z.data.status,total:Z.data.total,completed:Z.data.completed,creditsUsed:Z.data.creditsUsed,next:Y?void 0:Z.data.next,expiresAt:new Date(Z.data.expiresAt),data:M};if(!Z.data.success&&Z.data.error)V={...V,success:!1,error:Z.data.error};if(Z.data.next)V.next=Z.data.next;return V}else this.handleError(Z,"check batch scrape status")}catch(Z){throw new U(Z.message,500)}return{success:!1,error:"Internal server error."}}async checkBatchScrapeErrors($){let Y=this.prepareHeaders();try{let G=await this.deleteRequest(`${this.apiUrl}/v1/batch/scrape/${$}/errors`,Y);if(G.status===200)return G.data;else this.handleError(G,"check batch scrape errors")}catch(G){throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async extract($,Y){let G=this.prepareHeaders(),Q={urls:$,...Y},X=Y?.schema?a(Y.schema):void 0;try{let W=await this.postRequest(this.apiUrl+"/v1/extract",{...Q,schema:X,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`},G);if(W.status===200){let N=W.data.id,Z;do{let M=await this.getRequest(`${this.apiUrl}/v1/extract/${N}`,G);if(Z=M.data,Z.status==="completed")if(Z.success)return{success:!0,data:Z.data,warning:Z.warning,error:Z.error,sources:Z?.sources||void 0};else throw new U(`Failed to extract data. Error: ${Z.error}`,M.status);else if(Z.status==="failed"||Z.status==="cancelled")throw new U(`Extract job ${Z.status}. Error: ${Z.error}`,M.status);await new Promise((V)=>setTimeout(V,1000))}while(Z.status!=="completed")}else this.handleError(W,"extract")}catch(W){throw new U(W.message,500,W.response?.data?.details)}return{success:!1,error:"Internal server error."}}async asyncExtract($,Y,G){let Q=this.prepareHeaders(G),X={urls:$,...Y},W=Y?.schema?a(Y.schema):void 0;try{let N=await this.postRequest(this.apiUrl+"/v1/extract",{...X,schema:W,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`},Q);if(N.status===200)return N.data;else this.handleError(N,"start extract job")}catch(N){throw new U(N.message,500,N.response?.data?.details)}return{success:!1,error:"Internal server error."}}async getExtractStatus($){try{let Y=await this.getRequest(`${this.apiUrl}/v1/extract/${$}`,this.prepareHeaders());if(Y.status===200)return Y.data;else this.handleError(Y,"get extract status")}catch(Y){throw new U(Y.message,500)}}prepareHeaders($){return{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`,...$?{"x-idempotency-key":$}:{}}}postRequest($,Y,G){return K0.post($,Y,{headers:G,timeout:Y?.timeout?Y.timeout+5000:void 0})}async getRequest($,Y){try{return await K0.get($,{headers:Y})}catch(G){if(G instanceof T1&&G.response)return G.response;else throw G}}async deleteRequest($,Y){try{return await K0.delete($,{headers:Y})}catch(G){if(G instanceof T1&&G.response)return G.response;else throw G}}async monitorJobStatus($,Y,G){let Q=0,X=0,W=3;while(!0)try{let N=await this.getRequest(`${this.apiUrl}/v1/crawl/${$}`,Y);if(N.status===200){Q=0,X=0;let Z=N.data;if(Z.status==="completed")if("data"in Z){let M=Z.data;while(typeof Z==="object"&&"next"in Z){if(M.length===0)break;N=await this.getRequest(Z.next,Y),Z=N.data,M=M.concat(Z.data)}return Z.data=M,Z}else throw new U("Crawl job completed but no data was returned",500);else if(["active","paused","pending","queued","waiting","scraping"].includes(Z.status))G=Math.max(G,2),await new Promise((M)=>setTimeout(M,G*1000));else throw new U(`Crawl job failed or was stopped. Status: ${Z.status}`,500)}else if(Q++,Q>=3)this.handleError(N,"check crawl status")}catch(N){if(this.isRetryableError(N)&&X<W){X++;let Z=Math.min(1000*Math.pow(2,X-1),1e4);await new Promise((M)=>setTimeout(M,Z));continue}throw new U(N,500)}}isRetryableError($){if($ instanceof T1){if(!$.response){let Y=$.code,G=$.message?.toLowerCase()||"";return Y==="ECONNRESET"||Y==="ETIMEDOUT"||Y==="ENOTFOUND"||Y==="ECONNREFUSED"||G.includes("socket hang up")||G.includes("network error")||G.includes("timeout")}if($.response?.status===408||$.response?.status===504)return!0}if($&&typeof $==="object"){let Y=$.code,G=$.message?.toLowerCase()||"";if(Y==="ECONNRESET"||Y==="ETIMEDOUT"||Y==="ENOTFOUND"||Y==="ECONNREFUSED"||G.includes("socket hang up")||G.includes("network error")||G.includes("timeout"))return!0;if($.response?.status===408||$.response?.status===504)return!0}return!1}handleError($,Y){if(!$)throw new U(`No response received while trying to ${Y}. This may be a network error or the server is unreachable.`,0);if([400,402,403,408,409,500].includes($.status)){let G=$.data.error||"Unknown error occurred",Q=$.data.details?` - ${JSON.stringify($.data.details)}`:"";throw new U(`Failed to ${Y}. Status code: ${$.status}. Error: ${G}${Q}`,$.status,$?.data?.details)}else throw new U(`Unexpected error occurred while trying to ${Y}. Status code: ${$.status}`,$.status)}async deepResearch($,Y,G,Q){try{let X=await this.asyncDeepResearch($,Y);if(!X.success||"error"in X)return{success:!1,error:"error"in X?X.error:"Unknown error"};if(!X.id)throw new U("Failed to start research. No job ID returned.",500);let W=X.id,N,Z=0,M=0;while(!0){if(N=await this.checkDeepResearchStatus(W),"error"in N&&!N.success)return N;if(G&&N.activities){let V=N.activities.slice(Z);for(let K of V)G(K);Z=N.activities.length}if(Q&&N.sources){let V=N.sources.slice(M);for(let K of V)Q(K);M=N.sources.length}if(N.status==="completed")return N;if(N.status==="failed")throw new U(`Research job ${N.status}. Error: ${N.error}`,500);if(N.status!=="processing")break;await new Promise((V)=>setTimeout(V,2000))}return{success:!1,error:"Research job terminated unexpectedly"}}catch(X){throw new U(X.message,500,X.response?.data?.details)}}async asyncDeepResearch($,Y){let G=this.prepareHeaders(),Q={query:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};if(Q?.jsonOptions?.schema)Q={...Q,jsonOptions:{...Q.jsonOptions,schema:a(Q.jsonOptions.schema)}};try{let X=await this.postRequest(`${this.apiUrl}/v1/deep-research`,Q,G);if(X.status===200)return X.data;else this.handleError(X,"start deep research")}catch(X){if(X.response?.data?.error)throw new U(`Request failed with status code ${X.response.status}. Error: ${X.response.data.error} ${X.response.data.details?` - ${JSON.stringify(X.response.data.details)}`:""}`,X.response.status);else throw new U(X.message,500)}return{success:!1,error:"Internal server error."}}async checkDeepResearchStatus($){let Y=this.prepareHeaders();try{let G=await this.getRequest(`${this.apiUrl}/v1/deep-research/${$}`,Y);if(G.status===200)return G.data;else if(G.status===404)throw new U("Deep research job not found",404);else this.handleError(G,"check deep research status")}catch(G){if(G.response?.data?.error)throw new U(`Request failed with status code ${G.response.status}. Error: ${G.response.data.error} ${G.response.data.details?` - ${JSON.stringify(G.response.data.details)}`:""}`,G.response.status);else throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async __deepResearch($,Y,G){try{let Q=await this.__asyncDeepResearch($,Y);if(!Q.success||"error"in Q)return{success:!1,error:"error"in Q?Q.error:"Unknown error"};if(!Q.id)throw new U("Failed to start research. No job ID returned.",500);let X=Q.id,W,N=0;while(!0){if(W=await this.__checkDeepResearchStatus(X),"error"in W&&!W.success)return W;if(G&&W.activities){let Z=W.activities.slice(N);for(let M of Z)G(M);N=W.activities.length}if(W.status==="completed")return W;if(W.status==="failed")throw new U(`Research job ${W.status}. Error: ${W.error}`,500);if(W.status!=="processing")break;await new Promise((Z)=>setTimeout(Z,2000))}return{success:!1,error:"Research job terminated unexpectedly"}}catch(Q){throw new U(Q.message,500,Q.response?.data?.details)}}async __asyncDeepResearch($,Y){let G=this.prepareHeaders();try{let Q={topic:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`},X=await this.postRequest(`${this.apiUrl}/v1/deep-research`,Q,G);if(X.status===200)return X.data;else this.handleError(X,"start deep research")}catch(Q){if(Q.response?.data?.error)throw new U(`Request failed with status code ${Q.response.status}. Error: ${Q.response.data.error} ${Q.response.data.details?` - ${JSON.stringify(Q.response.data.details)}`:""}`,Q.response.status);else throw new U(Q.message,500)}return{success:!1,error:"Internal server error."}}async __checkDeepResearchStatus($){let Y=this.prepareHeaders();try{let G=await this.getRequest(`${this.apiUrl}/v1/deep-research/${$}`,Y);if(G.status===200)return G.data;else if(G.status===404)throw new U("Deep research job not found",404);else this.handleError(G,"check deep research status")}catch(G){if(G.response?.data?.error)throw new U(`Request failed with status code ${G.response.status}. Error: ${G.response.data.error} ${G.response.data.details?` - ${JSON.stringify(G.response.data.details)}`:""}`,G.response.status);else throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async generateLLMsText($,Y){try{let G=await this.asyncGenerateLLMsText($,Y);if(!G.success||"error"in G)return{success:!1,error:"error"in G?G.error:"Unknown error"};if(!G.id)throw new U("Failed to start LLMs.txt generation. No job ID returned.",500);let Q=G.id,X;while(!0){if(X=await this.checkGenerateLLMsTextStatus(Q),"error"in X&&!X.success)return X;if(X.status==="completed")return X;if(X.status==="failed")throw new U(`LLMs.txt generation job ${X.status}. Error: ${X.error}`,500);if(X.status!=="processing")break;await new Promise((W)=>setTimeout(W,2000))}return{success:!1,error:"LLMs.txt generation job terminated unexpectedly"}}catch(G){throw new U(G.message,500,G.response?.data?.details)}}async asyncGenerateLLMsText($,Y){let G=this.prepareHeaders(),Q={url:$,...Y,origin:typeof Y.origin==="string"&&Y.origin.includes("mcp")?Y.origin:`js-sdk@${this.version}`};try{let X=await this.postRequest(`${this.apiUrl}/v1/llmstxt`,Q,G);if(X.status===200)return X.data;else this.handleError(X,"start LLMs.txt generation")}catch(X){if(X.response?.data?.error)throw new U(`Request failed with status code ${X.response.status}. Error: ${X.response.data.error} ${X.response.data.details?` - ${JSON.stringify(X.response.data.details)}`:""}`,X.response.status);else throw new U(X.message,500)}return{success:!1,error:"Internal server error."}}async checkGenerateLLMsTextStatus($){let Y=this.prepareHeaders();try{let G=await this.getRequest(`${this.apiUrl}/v1/llmstxt/${$}`,Y);if(G.status===200)return G.data;else if(G.status===404)throw new U("LLMs.txt generation job not found",404);else this.handleError(G,"check LLMs.txt generation status")}catch(G){if(G.response?.data?.error)throw new U(`Request failed with status code ${G.response.status}. Error: ${G.response.data.error} ${G.response.data.details?` - ${JSON.stringify(G.response.data.details)}`:""}`,G.response.status);else throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async getQueueStatus(){let $=this.prepareHeaders();try{let Y=await this.getRequest(`${this.apiUrl}/v1/team/queue-status`,$);if(Y.status===200)return Y.data;else this.handleError(Y,"get queue status")}catch(Y){if(Y.response?.data?.error)throw new U(`Request failed with status code ${Y.response.status}. Error: ${Y.response.data.error} ${Y.response.data.details?` - ${JSON.stringify(Y.response.data.details)}`:""}`,Y.response.status);else throw new U(Y.message,500)}return{success:!1,error:"Internal server error."}}async getCreditUsage(){let $=this.prepareHeaders();try{let Y=await this.getRequest(`${this.apiUrl}/v1/team/credit-usage`,$);if(Y.status===200)return Y.data;else this.handleError(Y,"get credit usage")}catch(Y){if(Y.response?.data?.error)throw new U(`Request failed with status code ${Y.response.status}. Error: ${Y.response.data.error} ${Y.response.data.details?` - ${JSON.stringify(Y.response.data.details)}`:""}`,Y.response.status);else throw new U(Y.message,500)}return{success:!1,error:"Internal server error."}}async getTokenUsage(){let $=this.prepareHeaders();try{let Y=await this.getRequest(`${this.apiUrl}/v1/team/token-usage`,$);if(Y.status===200)return Y.data;else this.handleError(Y,"get token usage")}catch(Y){if(Y.response?.data?.error)throw new U(`Request failed with status code ${Y.response.status}. Error: ${Y.response.data.error} ${Y.response.data.details?` - ${JSON.stringify(Y.response.data.details)}`:""}`,Y.response.status);else throw new U(Y.message,500)}return{success:!1,error:"Internal server error."}}async getCreditUsageHistorical($){let Y=this.prepareHeaders();try{let G=`${this.apiUrl}/v1/team/credit-usage/historical${$?"?byApiKey=true":""}`,Q=await this.getRequest(G,Y);if(Q.status===200)return Q.data;else this.handleError(Q,"get credit usage historical")}catch(G){if(G.response?.data?.error)throw new U(`Request failed with status code ${G.response.status}. Error: ${G.response.data.error} ${G.response.data.details?` - ${JSON.stringify(G.response.data.details)}`:""}`,G.response.status);else throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}async getTokenUsageHistorical($){let Y=this.prepareHeaders();try{let G=`${this.apiUrl}/v1/team/token-usage/historical${$?"?byApiKey=true":""}`,Q=await this.getRequest(G,Y);if(Q.status===200)return Q.data;else this.handleError(Q,"get token usage historical")}catch(G){if(G.response?.data?.error)throw new U(`Request failed with status code ${G.response.status}. Error: ${G.response.data.error} ${G.response.data.details?` - ${JSON.stringify(G.response.data.details)}`:""}`,G.response.status);else throw new U(G.message,500)}return{success:!1,error:"Internal server error."}}},W5,w$,dG;var E$=F(()=>{C7();Q2();O7();Q2();_0=class extends Error{status;code;details;jobId;constructor($,Y,G,Q,X){super($);this.name="FirecrawlSdkError",this.status=Y,this.code=G,this.details=Q,this.jobId=X}},Z2=class extends _0{timeoutSeconds;constructor($,Y,G="batch"){let Q=G==="batch"?"batch scrape":"crawl";super(`${Q.charAt(0).toUpperCase()+Q.slice(1)} job ${$} did not complete within ${Y} seconds`,void 0,"JOB_TIMEOUT",void 0,$);this.name="JobTimeoutError",this.timeoutSeconds=Y}};T$=typeof TextDecoder<"u"?new TextDecoder:void 0,R$=class extends P${http;jobId;kind;pollInterval;timeout;ws;closed=!1;emittedDocumentKeys=new Set;constructor($,Y,G={}){super();this.http=$,this.jobId=Y,this.kind=G.kind??"crawl",this.pollInterval=G.pollInterval??2,this.timeout=G.timeout}buildWsUrl(){let Y=this.http.getApiUrl().replace(/^http/,"ws"),G=this.kind==="crawl"?`/v2/crawl/${this.jobId}`:`/v2/batch/scrape/${this.jobId}`;return`${Y}${G}`}async start(){return new Promise(($,Y)=>{let G=()=>{X(),$()},Q=(W)=>{X(),$()},X=()=>{this.removeListener("done",G),this.removeListener("error",Q)};this.on("done",G),this.on("error",Q),(async()=>{try{let W=this.buildWsUrl(),N=await F$();if(!N){this.pollLoop();return}if(this.ws=new N(W,this.http.getApiKey()),this.ws&&"binaryType"in this.ws)this.ws.binaryType="arraybuffer";if(this.ws)this.attachWsHandlers(this.ws)}catch(W){this.pollLoop()}})()})}attachWsHandlers($){let Y=Date.now(),G=this.timeout?this.timeout*1000:void 0;$.onmessage=(Q)=>{try{let X=I$(Q.data);if(!X)return;let W=JSON.parse(X),N=W.type;if(N==="error"){this.emit("error",{status:"failed",data:[],error:W.error,id:this.jobId});return}if(N==="catchup"){let M=W.data||{};this.emitDocuments(M.data||[]),this.emitSnapshot(M);return}if(N==="document"){let M=W.data;if(M)this.emitDocuments([M]);return}if(N==="done"){let M=W.data||W,V=M.data||[];if(V.length)this.emitDocuments(V);this.emit("done",{status:"completed",data:V,id:this.jobId,total:M.total,completed:M.completed,creditsUsed:M.creditsUsed}),this.close();return}let Z=W.data||W;if(Z&&Z.status)this.emitSnapshot(Z)}catch{}if(G&&Date.now()-Y>G)this.emit("error",{status:"failed",data:[],error:"Watcher timeout",id:this.jobId}),this.close()},$.onerror=()=>{this.emit("error",{status:"failed",data:[],error:"WebSocket error",id:this.jobId}),this.close()},$.onclose=()=>{if(!this.closed)this.pollLoop()}}documentKey($){if($&&typeof $==="object"){let Y=$.id??$.docId??$.url;if(typeof Y==="string"&&Y.length)return Y}try{return JSON.stringify($)}catch{return`${Date.now()}-${Math.random()}`}}emitDocuments($){for(let Y of $){if(!Y)continue;let G=this.documentKey(Y);if(this.emittedDocumentKeys.has(G))continue;this.emittedDocumentKeys.add(G),this.emit("document",{...Y,id:this.jobId})}}emitSnapshot($){let Y=$.status,G=$.data||[],Q=this.kind==="crawl"?{id:this.jobId,status:Y,completed:$.completed??0,total:$.total??0,creditsUsed:$.creditsUsed,expiresAt:$.expiresAt,next:$.next??null,data:G}:{id:this.jobId,status:Y,completed:$.completed??0,total:$.total??0,creditsUsed:$.creditsUsed,expiresAt:$.expiresAt,next:$.next??null,data:G};if(this.emit("snapshot",Q),["completed","failed","cancelled"].includes(Y))this.emit("done",{status:Y,data:G,id:this.jobId,total:$.total??0,completed:$.completed??0,creditsUsed:$.creditsUsed}),this.close()}async pollLoop(){let $=Date.now(),Y=this.timeout?this.timeout*1000:void 0;while(!this.closed){try{let G=this.kind==="crawl"?await M2(this.http,this.jobId):await V2(this.http,this.jobId);if(this.emitDocuments(G.data||[]),this.emit("snapshot",G),["completed","failed","cancelled"].includes(G.status)){this.emit("done",{status:G.status,data:G.data,id:this.jobId,total:G.total??0,completed:G.completed??0,creditsUsed:G.creditsUsed}),this.close();break}}catch{}if(Y&&Date.now()-$>Y){this.emit("error",{status:"failed",data:[],error:"Watcher timeout",id:this.jobId}),this.close();break}await new Promise((G)=>setTimeout(G,Math.max(1000,this.pollInterval*1000)))}}close(){if(this.closed=!0,this.ws&&this.ws.close)this.ws.close()}},S$=class extends EventTarget{dispatchTypedEvent($,Y){return super.dispatchEvent(Y)}},U=class extends Error{statusCode;details;constructor($,Y,G){super($);this.statusCode=Y,this.details=G}},W5=class extends S${ws;data;status;id;constructor($,Y){super();this.id=$;let G=Y.apiUrl.replace(/^http/,"ws");this.ws=new WebSocket(`${G}/v1/crawl/${$}`,Y.apiKey),this.status="scraping",this.data=[];let Q=(X)=>{if(X.type==="done")this.status="completed",this.dispatchTypedEvent("done",new CustomEvent("done",{detail:{status:this.status,data:this.data,id:this.id}}));else if(X.type==="error")this.status="failed",this.dispatchTypedEvent("error",new CustomEvent("error",{detail:{status:this.status,data:this.data,error:X.error,id:this.id}}));else if(X.type==="catchup"){this.status=X.data.status,this.data.push(...X.data.data??[]);for(let W of this.data)this.dispatchTypedEvent("document",new CustomEvent("document",{detail:{...W,id:this.id}}))}else if(X.type==="document")this.dispatchTypedEvent("document",new CustomEvent("document",{detail:{...X.data,id:this.id}}))};this.ws.onmessage=((X)=>{if(typeof X.data!=="string"){this.ws.close();return}try{let W=JSON.parse(X.data);Q(W)}catch(W){console.error("Error on message",W)}}).bind(this),this.ws.onclose=((X)=>{try{let W=JSON.parse(X.reason);Q(W)}catch(W){console.error("Error on close",W)}}).bind(this),this.ws.onerror=((X)=>{this.status="failed",this.dispatchTypedEvent("error",new CustomEvent("error",{detail:{status:this.status,data:this.data,error:"WebSocket error",id:this.id}}))}).bind(this)}close(){this.ws.close()}},w$=class extends D${_v1;_v1Opts;constructor($={}){super($);this._v1Opts={apiKey:$.apiKey,apiUrl:$.apiUrl}}get v1(){if(!this._v1)this._v1=new A$(this._v1Opts);return this._v1}},dG=w$});E$();export{dG as default,R$ as Watcher,_0 as SdkError,Z2 as JobTimeoutError,D$ as FirecrawlClient,A$ as FirecrawlAppV1,w$ as Firecrawl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y4 as a}from"./cli-0.1.15-v07ep52w.mjs";import"./cli-0.1.15-acdm8b28.mjs";import"./cli-0.1.15-mhbfhhf6.mjs";export default a();
|