@thebase/ui 0.0.6 → 0.0.7
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/CHANGELOG.md +15 -0
- package/README.md +2 -2
- package/dist/baseui.esm.js +10 -10
- package/dist/baseui.min.js +10 -10
- package/dist/baseui.registry.json +4 -4
- package/dist/icons/lucide.json +2 -2
- package/dist/runtime/milkdown/block-G2R773CV.js +1 -0
- package/dist/runtime/milkdown/{chunk-LIY3GISO.js → chunk-2EZOVVY4.js} +12 -12
- package/dist/runtime/milkdown/chunk-2TBUBNYK.js +3 -0
- package/dist/runtime/milkdown/{chunk-373V6XMI.js → chunk-5ILY25KD.js} +1 -1
- package/dist/runtime/milkdown/{chunk-6HASM4ZR.js → chunk-7GZI2HGN.js} +1 -1
- package/dist/runtime/milkdown/{chunk-TTCZLSO2.js → chunk-7YQMEBMQ.js} +1 -1
- package/dist/runtime/milkdown/chunk-BJC3HW5B.js +1 -0
- package/dist/runtime/milkdown/chunk-CFWAU3WN.js +1 -0
- package/dist/runtime/milkdown/{chunk-SMRDMV2Q.js → chunk-DWBFWB4X.js} +1 -1
- package/dist/runtime/milkdown/{chunk-KXKDEYCC.js → chunk-JA3LDFRC.js} +1 -1
- package/dist/runtime/milkdown/{chunk-R7FZKCAV.js → chunk-LDCXUKI3.js} +1 -1
- package/dist/runtime/milkdown/{chunk-XOIKFU3P.js → chunk-MYC7FIB2.js} +1 -1
- package/dist/runtime/milkdown/{chunk-PSGXCQNW.js → chunk-NX66TKTH.js} +1 -1
- package/dist/runtime/milkdown/{chunk-6RGD2KUU.js → chunk-NXQJDWPI.js} +1 -1
- package/dist/runtime/milkdown/{chunk-VPKKXG6L.js → chunk-OF2BVG4E.js} +1 -1
- package/dist/runtime/milkdown/{chunk-GHRUWTEV.js → chunk-R43NMSZO.js} +1 -1
- package/dist/runtime/milkdown/{chunk-SFCQEU26.js → chunk-SIRQEE7R.js} +1 -1
- package/dist/runtime/milkdown/{chunk-GVZW4OO4.js → chunk-SZCOI4YV.js} +1 -1
- package/dist/runtime/milkdown/{chunk-GAWLLGNO.js → chunk-TFG5E5LZ.js} +1 -1
- package/dist/runtime/milkdown/{chunk-VBVMNS5A.js → chunk-TOUPIB5N.js} +1 -1
- package/dist/runtime/milkdown/{chunk-WGUKYDQQ.js → chunk-VFZ7ST3H.js} +1 -1
- package/dist/runtime/milkdown/{chunk-E5R7FPWA.js → chunk-VJBGANAS.js} +4 -4
- package/dist/runtime/milkdown/{chunk-UBIXYWAI.js → chunk-WMT3RNOX.js} +1 -1
- package/dist/runtime/milkdown/chunk-XNCXGIZE.js +41 -0
- package/dist/runtime/milkdown/chunk-Y4CBBIL4.js +1 -0
- package/dist/runtime/milkdown/{chunk-3EORQGKQ.js → chunk-ZGHJJLEG.js} +1 -1
- package/dist/runtime/milkdown/{chunk-37CATSBM.js → chunk-ZIYJY6SA.js} +1 -1
- package/dist/runtime/milkdown/clipboard-5NOA4E34.js +1 -0
- package/dist/runtime/milkdown/{commonmark-KYRQSFY7.js → commonmark-263P63KC.js} +1 -1
- package/dist/runtime/milkdown/{core-SZ3VAN2E.js → core-T2SC7EXQ.js} +1 -1
- package/dist/runtime/milkdown/cursor-Z4UWEH5V.js +1 -0
- package/dist/runtime/milkdown/{diff-WJOHA5PX.js → diff-K3BORLOX.js} +1 -1
- package/dist/runtime/milkdown/{dist-TKSPPVS4.js → dist-24V6SL4V.js} +1 -1
- package/dist/runtime/milkdown/{dist-EHUNF6M5.js → dist-34ZP4UZ2.js} +1 -1
- package/dist/runtime/milkdown/{dist-I3JGQGWS.js → dist-3LQISA7E.js} +1 -1
- package/dist/runtime/milkdown/{dist-I3LMG6JF.js → dist-4QC5HFKT.js} +1 -1
- package/dist/runtime/milkdown/{dist-U6ZG6DV6.js → dist-562GM6I6.js} +1 -1
- package/dist/runtime/milkdown/{dist-7277C2KF.js → dist-5QJ34QYN.js} +1 -1
- package/dist/runtime/milkdown/{dist-UHXLU77N.js → dist-657PKZSF.js} +1 -1
- package/dist/runtime/milkdown/{dist-ZBCFN6O5.js → dist-6TS6SSJR.js} +1 -1
- package/dist/runtime/milkdown/{dist-X2CT5LDV.js → dist-7JICPTVR.js} +1 -1
- package/dist/runtime/milkdown/{dist-KY7AL6FL.js → dist-DERKVUMC.js} +1 -1
- package/dist/runtime/milkdown/{dist-QB3U2COU.js → dist-MK4VEXBD.js} +1 -1
- package/dist/runtime/milkdown/{dist-5HJGMMBO.js → dist-NYN7ZJXK.js} +1 -1
- package/dist/runtime/milkdown/dist-OPQE4Z43.js +1 -0
- package/dist/runtime/milkdown/{dist-J2KSREXK.js → dist-P4TF777A.js} +1 -1
- package/dist/runtime/milkdown/{dist-IIRHY5PY.js → dist-PEJBUU6H.js} +1 -1
- package/dist/runtime/milkdown/{dist-WNQ5J4WR.js → dist-R2X7SQDZ.js} +1 -1
- package/dist/runtime/milkdown/{dist-QMASZW6X.js → dist-RE2FJN7S.js} +1 -1
- package/dist/runtime/milkdown/{dist-RS6ERIZS.js → dist-THIQIX3E.js} +1 -1
- package/dist/runtime/milkdown/{dist-EG2OA4VS.js → dist-VEPIKH2V.js} +1 -1
- package/dist/runtime/milkdown/dist-X22ABN6K.js +1 -0
- package/dist/runtime/milkdown/{dist-63GMFB3D.js → dist-YH3NI4VG.js} +1 -1
- package/dist/runtime/milkdown/{dockerfile-NAEEVAQU.js → dockerfile-2B5D6FTU.js} +1 -1
- package/dist/runtime/milkdown/{esm-W3C6FIFD.js → esm-H2D66MX5.js} +68 -68
- package/dist/runtime/milkdown/{factor-MYKNDQPQ.js → factor-JBYSQG3O.js} +1 -1
- package/dist/runtime/milkdown/{gfm-E3RPWLDM.js → gfm-IHXC5DQO.js} +1 -1
- package/dist/runtime/milkdown/history-VOPZ3HXQ.js +1 -0
- package/dist/runtime/milkdown/indent-WYLZY3CZ.js +1 -0
- package/dist/runtime/milkdown/{javascript-43PROIAY.js → javascript-375RXK5M.js} +1 -1
- package/dist/runtime/milkdown/{lib-ULUU3LBY.js → lib-32AGHSKT.js} +1 -1
- package/dist/runtime/milkdown/lib-QZEOHNSS.js +1 -0
- package/dist/runtime/milkdown/listener-GNT2L5RH.js +1 -0
- package/dist/runtime/milkdown/milkdown-editor.js +1 -1
- package/dist/runtime/milkdown/milkdown-text-editor.js +1 -1
- package/dist/runtime/milkdown/{model-YUHBWZ3A.js → model-VKXPTJEQ.js} +1 -1
- package/dist/runtime/milkdown/{nsis-2G5LLGBI.js → nsis-XAIDIMGO.js} +1 -1
- package/dist/runtime/milkdown/{pug-VWTHDU4H.js → pug-SMVC7NDW.js} +1 -1
- package/dist/runtime/milkdown/slash-3TY5YM2E.js +1 -0
- package/dist/runtime/milkdown/{streaming-ODT2C2AX.js → streaming-S7JA52O3.js} +1 -1
- package/dist/runtime/milkdown/tooltip-5CTXOYIA.js +1 -0
- package/dist/runtime/milkdown/upload-DA4OHNVQ.js +1 -0
- package/dist/runtime/milkdown/utils-H6AH4ARX.js +1 -0
- package/dist/runtime/milkdown/y-webrtc-VQGJXSXG.js +2 -0
- package/dist/runtime/milkdown/y-websocket-YOL5ECIU.js +2 -0
- package/dist/runtime/milkdown/yjs-H3MVN7TP.js +1 -0
- package/docs/components/text-editor.md +37 -5
- package/package.json +2 -1
- package/dist/runtime/milkdown/block-B3H3PJID.js +0 -1
- package/dist/runtime/milkdown/chunk-7CVS4AGG.js +0 -3
- package/dist/runtime/milkdown/chunk-FGZNEC46.js +0 -1
- package/dist/runtime/milkdown/chunk-VKELS2FZ.js +0 -41
- package/dist/runtime/milkdown/clipboard-SGEGWVIL.js +0 -1
- package/dist/runtime/milkdown/cursor-4RIJS7XF.js +0 -1
- package/dist/runtime/milkdown/dist-6JDVYEX3.js +0 -1
- package/dist/runtime/milkdown/dist-WWUPY2DM.js +0 -1
- package/dist/runtime/milkdown/history-MXXSC4BB.js +0 -1
- package/dist/runtime/milkdown/indent-DPZPSW7O.js +0 -1
- package/dist/runtime/milkdown/lib-OHEPSUTR.js +0 -1
- package/dist/runtime/milkdown/listener-YERMSFXE.js +0 -1
- package/dist/runtime/milkdown/slash-WRZAFLVA.js +0 -1
- package/dist/runtime/milkdown/tooltip-MQR7E3GN.js +0 -1
- package/dist/runtime/milkdown/upload-4DLRUKG7.js +0 -1
- package/dist/runtime/milkdown/utils-RGFMAFOI.js +0 -1
- package/dist/runtime/milkdown/y-webrtc-MVXVFPYO.js +0 -2
- package/dist/runtime/milkdown/yjs-L4ZX4CJ5.js +0 -1
- /package/dist/runtime/milkdown/{apl-2VCEVXBO.js → apl-A2CKMNHU.js} +0 -0
- /package/dist/runtime/milkdown/{asciiarmor-ND4TKJ2V.js → asciiarmor-LYWOUGA4.js} +0 -0
- /package/dist/runtime/milkdown/{asn1-5NCC72L6.js → asn1-NB5F53MP.js} +0 -0
- /package/dist/runtime/milkdown/{asterisk-V3QQOGYS.js → asterisk-SIDVUCAX.js} +0 -0
- /package/dist/runtime/milkdown/{brainfuck-SETQDLAI.js → brainfuck-K7DBLI5P.js} +0 -0
- /package/dist/runtime/milkdown/{chunk-CS3PHHYU.js → chunk-2FDN6WYA.js} +0 -0
- /package/dist/runtime/milkdown/{chunk-UPNN5QP4.js → chunk-2XECCVBE.js} +0 -0
- /package/dist/runtime/milkdown/{chunk-E6JE25ZM.js → chunk-DLMWAKB5.js} +0 -0
- /package/dist/runtime/milkdown/{chunk-HDKYYBRG.js → chunk-DO4RO6KD.js} +0 -0
- /package/dist/runtime/milkdown/{chunk-KJCZ4UN6.js → chunk-ILE44FN6.js} +0 -0
- /package/dist/runtime/milkdown/{chunk-MSEQNMGN.js → chunk-IPNUYGNC.js} +0 -0
- /package/dist/runtime/milkdown/{chunk-FOZORPFE.js → chunk-K2ROPYIW.js} +0 -0
- /package/dist/runtime/milkdown/{chunk-XOU65PX7.js → chunk-KP5VFDTE.js} +0 -0
- /package/dist/runtime/milkdown/{chunk-KOCVWYBK.js → chunk-MAWHENWJ.js} +0 -0
- /package/dist/runtime/milkdown/{chunk-BV6CAHIM.js → chunk-OQJVATGH.js} +0 -0
- /package/dist/runtime/milkdown/{chunk-Q5FF4VKZ.js → chunk-TEMVRH7B.js} +0 -0
- /package/dist/runtime/milkdown/{chunk-VYL5RGSY.js → chunk-U6C7MJSD.js} +0 -0
- /package/dist/runtime/milkdown/{clike-WKR6QU6G.js → clike-EOWJN572.js} +0 -0
- /package/dist/runtime/milkdown/{clojure-7C5XMSLE.js → clojure-VLG72YFE.js} +0 -0
- /package/dist/runtime/milkdown/{cmake-VX6UCCMV.js → cmake-2PXWCEDK.js} +0 -0
- /package/dist/runtime/milkdown/{cobol-IUBDOVSU.js → cobol-PMRFKEKB.js} +0 -0
- /package/dist/runtime/milkdown/{coffeescript-OEAM3K5M.js → coffeescript-B5G6C2AR.js} +0 -0
- /package/dist/runtime/milkdown/{commonlisp-LRFHKBQZ.js → commonlisp-CFTTVW6U.js} +0 -0
- /package/dist/runtime/milkdown/{crystal-7XKMI75H.js → crystal-M6S3MKED.js} +0 -0
- /package/dist/runtime/milkdown/{css-DTJ74K4A.js → css-HESFBL5J.js} +0 -0
- /package/dist/runtime/milkdown/{cypher-Y7ZMLKQ4.js → cypher-IIJXY2ZS.js} +0 -0
- /package/dist/runtime/milkdown/{d-NSEMXQMQ.js → d-ZHLFM7BM.js} +0 -0
- /package/dist/runtime/milkdown/{diff-BO3JC62N.js → diff-7YFE6XTG.js} +0 -0
- /package/dist/runtime/milkdown/{dtd-3HSCMPBI.js → dtd-NPOQOSDS.js} +0 -0
- /package/dist/runtime/milkdown/{dylan-UCUZF6KU.js → dylan-KB7QIKGL.js} +0 -0
- /package/dist/runtime/milkdown/{ebnf-3LHOCFAJ.js → ebnf-TBCUHQC6.js} +0 -0
- /package/dist/runtime/milkdown/{ecl-5R3NXF6N.js → ecl-OXWKHIHJ.js} +0 -0
- /package/dist/runtime/milkdown/{eiffel-CQ4L5MSH.js → eiffel-WRBXQVBO.js} +0 -0
- /package/dist/runtime/milkdown/{elm-6QYNGBQ3.js → elm-MZAQSXJY.js} +0 -0
- /package/dist/runtime/milkdown/{erlang-6NH23EDV.js → erlang-PNSW52ER.js} +0 -0
- /package/dist/runtime/milkdown/{fcl-ACRUXLOI.js → fcl-6ZY3XINI.js} +0 -0
- /package/dist/runtime/milkdown/{forth-MGVKD22I.js → forth-BAIG3TGB.js} +0 -0
- /package/dist/runtime/milkdown/{fortran-Y2LH5YJY.js → fortran-MQWYHO5L.js} +0 -0
- /package/dist/runtime/milkdown/{gas-DGW2BQT5.js → gas-Q6YL6AQO.js} +0 -0
- /package/dist/runtime/milkdown/{gherkin-YE56IVZ5.js → gherkin-W5ZB2USN.js} +0 -0
- /package/dist/runtime/milkdown/{groovy-ACMNYCLF.js → groovy-JTF2GBED.js} +0 -0
- /package/dist/runtime/milkdown/{haskell-MIB6HZSL.js → haskell-HFE6BWET.js} +0 -0
- /package/dist/runtime/milkdown/{haxe-TANQRBYK.js → haxe-WWIJK4Z5.js} +0 -0
- /package/dist/runtime/milkdown/{http-QUK2BL6J.js → http-NZKSSIDP.js} +0 -0
- /package/dist/runtime/milkdown/{idl-54U6ONEE.js → idl-CMM2WWSO.js} +0 -0
- /package/dist/runtime/milkdown/{julia-7E2ZIO2U.js → julia-BMA4W7GB.js} +0 -0
- /package/dist/runtime/milkdown/{livescript-SUEXR7PK.js → livescript-3UKKDN45.js} +0 -0
- /package/dist/runtime/milkdown/{lua-QNGITPQK.js → lua-SWEBXZV4.js} +0 -0
- /package/dist/runtime/milkdown/{mathematica-HJQQXVFC.js → mathematica-CJOQYQFY.js} +0 -0
- /package/dist/runtime/milkdown/{mbox-F6SUCJVD.js → mbox-Y4XZOKOO.js} +0 -0
- /package/dist/runtime/milkdown/{mirc-7S5H76VB.js → mirc-5HDV5JC4.js} +0 -0
- /package/dist/runtime/milkdown/{mllike-TTW7I7W4.js → mllike-2EOQGIBG.js} +0 -0
- /package/dist/runtime/milkdown/{modelica-3POMKZFY.js → modelica-XKNFUSSN.js} +0 -0
- /package/dist/runtime/milkdown/{mscgen-IKAT43RT.js → mscgen-2X7TXJM6.js} +0 -0
- /package/dist/runtime/milkdown/{mumps-XZE3RMGJ.js → mumps-R6QPEBAR.js} +0 -0
- /package/dist/runtime/milkdown/{nginx-QCVWU6DV.js → nginx-7TJP7GQA.js} +0 -0
- /package/dist/runtime/milkdown/{ntriples-T6AMEY2C.js → ntriples-SCDRUUH2.js} +0 -0
- /package/dist/runtime/milkdown/{octave-64EAJHKR.js → octave-RV2OSSMQ.js} +0 -0
- /package/dist/runtime/milkdown/{oz-7QHCZG72.js → oz-6VL77R5Z.js} +0 -0
- /package/dist/runtime/milkdown/{pascal-KWNZTZKE.js → pascal-TQWMLNUO.js} +0 -0
- /package/dist/runtime/milkdown/{perl-KX75FRG7.js → perl-MJLZUOI2.js} +0 -0
- /package/dist/runtime/milkdown/{pig-YA2LFBUW.js → pig-MQKMXNXN.js} +0 -0
- /package/dist/runtime/milkdown/{powershell-SONNWKJG.js → powershell-RJOL52GR.js} +0 -0
- /package/dist/runtime/milkdown/{properties-MEUWSNZY.js → properties-XL2YBZDU.js} +0 -0
- /package/dist/runtime/milkdown/{protobuf-RKCPHWGY.js → protobuf-NQWTK3Z6.js} +0 -0
- /package/dist/runtime/milkdown/{puppet-JMZDB2TG.js → puppet-POQGMO34.js} +0 -0
- /package/dist/runtime/milkdown/{python-GVEPBHD7.js → python-NMGCKPUX.js} +0 -0
- /package/dist/runtime/milkdown/{q-QBK3FAEX.js → q-ILHJCNOR.js} +0 -0
- /package/dist/runtime/milkdown/{r-QZYPZHNL.js → r-XNO7UDHK.js} +0 -0
- /package/dist/runtime/milkdown/{rpm-DU7TLFAI.js → rpm-TPSVG357.js} +0 -0
- /package/dist/runtime/milkdown/{ruby-DMEPZV6P.js → ruby-3ZLDCDCY.js} +0 -0
- /package/dist/runtime/milkdown/{sas-UQCOIXSD.js → sas-X4IZVM55.js} +0 -0
- /package/dist/runtime/milkdown/{scheme-ABXYL6GU.js → scheme-JSRTR252.js} +0 -0
- /package/dist/runtime/milkdown/{shell-M3XELTMZ.js → shell-IJ2JLDQQ.js} +0 -0
- /package/dist/runtime/milkdown/{sieve-MUKKCDBZ.js → sieve-4ACSKBHV.js} +0 -0
- /package/dist/runtime/milkdown/{smalltalk-P4FKOVAU.js → smalltalk-AHTDIHSN.js} +0 -0
- /package/dist/runtime/milkdown/{solr-HHKG4NNK.js → solr-HDS3YMCJ.js} +0 -0
- /package/dist/runtime/milkdown/{sparql-5YJAIBWN.js → sparql-OPR2SX5E.js} +0 -0
- /package/dist/runtime/milkdown/{spreadsheet-M3SEYOFV.js → spreadsheet-YMJBRXJ6.js} +0 -0
- /package/dist/runtime/milkdown/{sql-Z6C3KTS5.js → sql-4LK5AARR.js} +0 -0
- /package/dist/runtime/milkdown/{stex-MO67FBMF.js → stex-CBOLYXFQ.js} +0 -0
- /package/dist/runtime/milkdown/{stylus-JEMVT3OU.js → stylus-5SYL4OMN.js} +0 -0
- /package/dist/runtime/milkdown/{swift-HP7RYRJA.js → swift-W3IKYGAN.js} +0 -0
- /package/dist/runtime/milkdown/{tcl-WPHRLNQC.js → tcl-QKBH3MVM.js} +0 -0
- /package/dist/runtime/milkdown/{textile-3LZDM6IW.js → textile-KRYPADXN.js} +0 -0
- /package/dist/runtime/milkdown/{tiddlywiki-LMGAXCWG.js → tiddlywiki-XNSPF27C.js} +0 -0
- /package/dist/runtime/milkdown/{tiki-SC7NYLRG.js → tiki-ZZLJUPPJ.js} +0 -0
- /package/dist/runtime/milkdown/{toml-VBRI3ILD.js → toml-FCAM6ZFK.js} +0 -0
- /package/dist/runtime/milkdown/{troff-MZNIC3MS.js → troff-7BWGQP4Z.js} +0 -0
- /package/dist/runtime/milkdown/{ttcn-ZUOU74GM.js → ttcn-K3WYQPKS.js} +0 -0
- /package/dist/runtime/milkdown/{ttcn-cfg-2JJUM5CY.js → ttcn-cfg-LDHTKWFO.js} +0 -0
- /package/dist/runtime/milkdown/{turtle-SNBPEJHA.js → turtle-6Q2P3NLY.js} +0 -0
- /package/dist/runtime/milkdown/{vb-U45Y75DV.js → vb-BYDJL3EX.js} +0 -0
- /package/dist/runtime/milkdown/{vbscript-XTRRB36U.js → vbscript-WOMP2PYW.js} +0 -0
- /package/dist/runtime/milkdown/{velocity-Y7TX26SP.js → velocity-ZG7EESTK.js} +0 -0
- /package/dist/runtime/milkdown/{verilog-IFT4S6MZ.js → verilog-MW2R7Q2Y.js} +0 -0
- /package/dist/runtime/milkdown/{vhdl-CK4X465M.js → vhdl-GQOJ6JVT.js} +0 -0
- /package/dist/runtime/milkdown/{webidl-N7XOMHHB.js → webidl-5Q6QYACY.js} +0 -0
- /package/dist/runtime/milkdown/{xquery-EPMIEXTW.js → xquery-MD4ZCF7M.js} +0 -0
- /package/dist/runtime/milkdown/{yacas-A74LVH45.js → yacas-EKNE7G24.js} +0 -0
- /package/dist/runtime/milkdown/{z80-NVBCD5FV.js → z80-44FRSRYD.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-XOIKFU3P.js";import"./chunk-GHRUWTEV.js";import"./chunk-VKELS2FZ.js";import"./chunk-BV6CAHIM.js";import"./chunk-KJCZ4UN6.js";import"./chunk-23NN352E.js";export{a as clipboard};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"./chunk-373V6XMI.js";import"./chunk-GHRUWTEV.js";import"./chunk-VKELS2FZ.js";import"./chunk-BV6CAHIM.js";import"./chunk-KJCZ4UN6.js";import"./chunk-23NN352E.js";export{g as cursor,f as dropCursorConfig,b as dropIndicatorConfig,c as dropIndicatorDOMPlugin,d as dropIndicatorPlugin,a as dropIndicatorState,e as gapCursorPlugin};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-VPKKXG6L.js";import"./chunk-SFCQEU26.js";import"./chunk-LIY3GISO.js";import"./chunk-KJCZ4UN6.js";import"./chunk-23NN352E.js";export{d as css,b as cssCompletionSource,c as cssLanguage,a as defineCSSCompletionSource};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"./chunk-6RGD2KUU.js";import"./chunk-VPKKXG6L.js";import"./chunk-UBIXYWAI.js";import"./chunk-TTCZLSO2.js";import"./chunk-SFCQEU26.js";import"./chunk-LIY3GISO.js";import"./chunk-KJCZ4UN6.js";import"./chunk-23NN352E.js";export{e as autoCloseTags,d as html,a as htmlCompletionSource,b as htmlCompletionSourceWith,c as htmlLanguage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as a,d as b,e as c,f as d,g as e,h as f}from"./chunk-R7FZKCAV.js";import"./chunk-GHRUWTEV.js";import"./chunk-VKELS2FZ.js";import"./chunk-BV6CAHIM.js";import"./chunk-KJCZ4UN6.js";import"./chunk-23NN352E.js";export{f as history,e as historyKeymap,c as historyProviderConfig,d as historyProviderPlugin,b as redoCommand,a as undoCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c}from"./chunk-KXKDEYCC.js";import"./chunk-GHRUWTEV.js";import"./chunk-VKELS2FZ.js";import"./chunk-BV6CAHIM.js";import"./chunk-KJCZ4UN6.js";import"./chunk-23NN352E.js";export{c as indent,a as indentConfig,b as indentPlugin};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as mt}from"./chunk-FGZNEC46.js";import{Ab as se,B as Be,Ba as oe,Bb as Te,Cb as y,Ea as lt,Fa as _e,Fb as x,Ga as Se,J as qe,K as $e,M as Ze,Ma as ct,Mb as dt,O as Ge,Oa as re,Pb as ft,Q as Qe,Qb as ut,R as et,Rb as le,S as z,Sa as at,Z as xe,Za as ie,_ as tt,a as He,aa as nt,b as G,c as Je,da as ee,h as w,i as D,ka as be,la as ot,na as rt,rb as we,s as We,sa as it,t as Q,ta as te,ua as st,xa as ne,za as E}from"./chunk-E5R7FPWA.js";import{Ka as ye,P as he,Q as Ue,R as Xe,T as Y,U as F,_a as je,d as R,e as me,h as De,i as Ee,jb as Le,pa as Ie,pb as ze,qa as pe,ra as ge,ta as Ke,ya as Z}from"./chunk-VKELS2FZ.js";import{a as M,d as L}from"./chunk-BV6CAHIM.js";import"./chunk-KJCZ4UN6.js";import{f as p,g as A,h as C,i as j}from"./chunk-23NN352E.js";var Dt=/[\uD800-\uDBFF]/,Et=/[\uDC00-\uDFFF]/,Ut=(t,e)=>{let o=0,n=0;for(;o<t.length&&o<e.length&&t[o]===e[o];)o++;for(o>0&&Dt.test(t[o-1])&&o--;n+o<t.length&&n+o<e.length&&t[t.length-n-1]===e[e.length-n-1];)n++;return n>0&&Et.test(t[t.length-n])&&n--,{index:o,remove:t.length-o-n,insert:e.slice(o,e.length-n)}},ht=Ut;var h=new F("y-sync"),b=new F("y-undo"),O=new F("yjs-cursor");var _=(t,e)=>t>>>e|t<<32-e,It=t=>_(t,2)^_(t,13)^_(t,22),Kt=t=>_(t,6)^_(t,11)^_(t,25),jt=t=>_(t,7)^_(t,18)^t>>>3,Lt=t=>_(t,17)^_(t,19)^t>>>10,zt=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ht=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Pe=class{constructor(){let e=new ArrayBuffer(320);this._H=new Uint32Array(e,0,8),this._H.set(Ht),this._W=new Uint32Array(e,64,64)}_updateHash(){let e=this._H,o=this._W;for(let a=16;a<64;a++)o[a]=Lt(o[a-2])+o[a-7]+jt(o[a-15])+o[a-16];let n=e[0],r=e[1],c=e[2],i=e[3],l=e[4],d=e[5],s=e[6],f=e[7];for(let a=0,u,m;a<64;a++)u=f+Kt(l)+(l&d^~l&s)+zt[a]+o[a]>>>0,m=It(n)+(n&r^n&c^r&c)>>>0,f=s,s=d,d=l,l=i+u>>>0,i=c,c=r,r=n,n=u+m>>>0;e[0]+=n,e[1]+=r,e[2]+=c,e[3]+=i,e[4]+=l,e[5]+=d,e[6]+=s,e[7]+=f}digest(e){let o=0;for(;o+56<=e.length;){let i=0;for(;i<16&&o+3<e.length;i++)this._W[i]=e[o++]<<24|e[o++]<<16|e[o++]<<8|e[o++];if(o%64!==0){for(this._W.fill(0,i,16);o<e.length;)this._W[i]|=e[o]<<(3-o%4)*8,o++;this._W[i]|=128<<(3-o%4)*8}this._updateHash()}let n=o%64!==0;this._W.fill(0,0,16);let r=0;for(;o<e.length;r++)for(let i=3;i>=0&&o<e.length;i--)this._W[r]|=e[o++]<<i*8;n||(this._W[r-(o%4===0?0:1)]|=128<<(3-o%4)*8),this._W[14]=e.byteLength/536870912,this._W[15]=e.byteLength*8,this._updateHash();let c=new Uint8Array(32);for(let i=0;i<this._H.length;i++)for(let l=0;l<4;l++)c[i*4+l]=this._H[i]>>>(3-l)*8;return c}},pt=t=>new Pe().digest(t);var Wt=t=>{for(let o=6;o<t.length;o++)t[o%6]=t[o%6]^t[o];return t.slice(0,6)},gt=t=>Ge(Wt(pt(Qe(t))));var _t=()=>({mapping:new Map,isOMark:new Map}),H=(t,e)=>e===void 0?!t.deleted:e.sv.has(t.id.client)&&e.sv.get(t.id.client)>t.id.clock&&!tt(e.ds,t.id),Qt=[{light:"#ecd44433",dark:"#ecd444"}],en=(t,e,o)=>{if(!t.has(o)){if(t.size<e.length){let n=Je();t.forEach(r=>n.add(r)),e=e.filter(r=>!n.has(r))}t.set(o,Be(e))}return t.get(o)},Ae=(t,{colors:e=Qt,colorMapping:o=new Map,permanentUserData:n=null,onFirstRender:r=()=>{},mapping:c}={})=>{let i=!1,l=new ce(t,c),d=new Y({props:{editable:s=>{let f=h.getState(s);return f.snapshot==null&&f.prevSnapshot==null}},key:h,state:{init:(s,f)=>({type:t,doc:t.doc,binding:l,snapshot:null,prevSnapshot:null,isChangeOrigin:!1,isUndoRedoOperation:!1,addToHistory:!0,colors:e,colorMapping:o,permanentUserData:n}),apply:(s,f)=>{let a=s.getMeta(h);if(a!==void 0){f=Object.assign({},f);for(let u in a)f[u]=a[u]}return f.addToHistory=s.getMeta("addToHistory")!==!1,f.isChangeOrigin=a!==void 0&&!!a.isChangeOrigin,f.isUndoRedoOperation=a!==void 0&&!!a.isChangeOrigin&&!!a.isUndoRedoOperation,l.prosemirrorView!==null&&a!==void 0&&(a.snapshot!=null||a.prevSnapshot!=null)&&z(0,()=>{l.prosemirrorView!=null&&(a.restore==null?l._renderSnapshot(a.snapshot,a.prevSnapshot,f):(l._renderSnapshot(a.snapshot,a.snapshot,f),delete f.restore,delete f.snapshot,delete f.prevSnapshot,l.mux(()=>{l._prosemirrorChanged(l.prosemirrorView.state.doc)})))}),f}},view:s=>(l.initView(s),c==null&&l._forceRerender(),r(),{update:()=>{let f=d.getState(s.state);if(f.snapshot==null&&f.prevSnapshot==null&&(i||s.state.doc.content.findDiffStart(s.state.doc.type.createAndFill().content)!==null)){if(i=!0,f.addToHistory===!1&&!f.isChangeOrigin){let a=b.getState(s.state),u=a&&a.undoManager;u&&u.stopCapturing()}l.mux(()=>{f.doc.transact(a=>{a.meta.set("addToHistory",f.addToHistory),l._prosemirrorChanged(s.state.doc)},h)})}},destroy:()=>{l.destroy()}})});return d},tn=(t,e,o)=>{if(e!==null&&e.anchor!==null&&e.head!==null)if(e.type==="all")t.setSelection(new Xe(t.doc));else if(e.type==="node"){let n=T(o.doc,o.type,e.anchor,o.mapping);t.setSelection(Ue.create(t.doc,n))}else{let n=T(o.doc,o.type,e.anchor,o.mapping),r=T(o.doc,o.type,e.head,o.mapping);if(n!==null&&r!==null){let c=he.between(t.doc.resolve(n),t.doc.resolve(r));t.setSelection(c)}}},J=(t,e)=>({type:e.selection.jsonID,anchor:v(e.selection.anchor,t.type,t.mapping),head:v(e.selection.head,t.type,t.mapping)}),ce=class{constructor(e,o=new Map){this.type=e,this.prosemirrorView=null,this.mux=mt(),this.mapping=o,this.isOMark=new Map,this._observeFunction=this._typeChanged.bind(this),this.doc=e.doc,this.beforeTransactionSelection=null,this.beforeAllTransactions=()=>{this.beforeTransactionSelection===null&&this.prosemirrorView!=null&&(this.beforeTransactionSelection=J(this,this.prosemirrorView.state))},this.afterAllTransactions=()=>{this.beforeTransactionSelection=null},this._domSelectionInView=null}get _tr(){return this.prosemirrorView.state.tr.setMeta("addToHistory",!1)}_isLocalCursorInView(){return this.prosemirrorView.hasFocus()?(Ze&&this._domSelectionInView===null&&(z(0,()=>{this._domSelectionInView=null}),this._domSelectionInView=this._isDomSelectionInView()),this._domSelectionInView):!1}_isDomSelectionInView(){let e=this.prosemirrorView._root.getSelection();if(e==null||e.anchorNode==null)return!1;let o=this.prosemirrorView._root.createRange();o.setStart(e.anchorNode,e.anchorOffset),o.setEnd(e.focusNode,e.focusOffset),o.getClientRects().length===0&&o.startContainer&&o.collapsed&&o.selectNodeContents(o.startContainer);let r=o.getBoundingClientRect(),c=et.documentElement;return r.bottom>=0&&r.right>=0&&r.left<=(window.innerWidth||c.clientWidth||0)&&r.top<=(window.innerHeight||c.clientHeight||0)}renderSnapshot(e,o){o||(o=ct(nt(),new Map)),this.prosemirrorView.dispatch(this._tr.setMeta(h,{snapshot:e,prevSnapshot:o}))}unrenderSnapshot(){this.mapping.clear(),this.mux(()=>{let e=this.type.toArray().map(n=>U(n,this.prosemirrorView.state.schema,this)).filter(n=>n!==null),o=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new L(M.from(e),0,0));o.setMeta(h,{snapshot:null,prevSnapshot:null}),this.prosemirrorView.dispatch(o)})}_forceRerender(){this.mapping.clear(),this.mux(()=>{let e=this.beforeTransactionSelection!==null?null:this.prosemirrorView.state.selection,o=this.type.toArray().map(r=>U(r,this.prosemirrorView.state.schema,this)).filter(r=>r!==null),n=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new L(M.from(o),0,0));if(e){let r=w(D(e.anchor,0),n.doc.content.size),c=w(D(e.head,0),n.doc.content.size);n.setSelection(he.create(n.doc,r,c))}this.prosemirrorView.dispatch(n.setMeta(h,{isChangeOrigin:!0,binding:this}))})}_renderSnapshot(e,o,n){let r=this.doc,c=this.type;if(e||(e=re(this.doc)),e instanceof Uint8Array||o instanceof Uint8Array)if((!(e instanceof Uint8Array)||!(o instanceof Uint8Array))&&Q(),r=new ee({gc:!1}),be(r,o),o=re(r),be(r,e),e=re(r),c._item===null){let i=Array.from(this.doc.share.keys()).find(l=>this.doc.share.get(l)===this.type);c=r.getXmlFragment(i)}else{let i=r.store.clients.get(c._item.id.client)??[],l=at(i,c._item.id.clock);c=i[l].content.type}this.mapping.clear(),this.mux(()=>{r.transact(i=>{let l=n.permanentUserData;l&&l.dss.forEach(a=>{xe(i,a,u=>{})});let d=(a,u)=>{let m=a==="added"?l.getUserByClientId(u.client):l.getUserByDeletedId(u);return{user:m,type:a,color:en(n.colorMapping,n.colors,m)}},s=we(c,new Se(o.ds,e.sv)).map(a=>!a._item.deleted||H(a._item,e)||H(a._item,o)?U(a,this.prosemirrorView.state.schema,{mapping:new Map,isOMark:new Map},e,o,d):null).filter(a=>a!==null),f=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new L(M.from(s),0,0));this.prosemirrorView.dispatch(f.setMeta(h,{isChangeOrigin:!0}))},h)})}_typeChanged(e,o){if(this.prosemirrorView==null)return;let n=h.getState(this.prosemirrorView.state);if(e.length===0||n.snapshot!=null||n.prevSnapshot!=null){this.renderSnapshot(n.snapshot,n.prevSnapshot);return}this.mux(()=>{let r=(l,d)=>this.mapping.delete(d);xe(o,o.deleteSet,l=>{if(l.constructor===le){let d=l.content.type;d&&this.mapping.delete(d)}}),o.changed.forEach(r),o.changedParentTypes.forEach(r);let c=this.type.toArray().map(l=>St(l,this.prosemirrorView.state.schema,this)).filter(l=>l!==null),i=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new L(M.from(c),0,0));tn(i,this.beforeTransactionSelection,this),i=i.setMeta(h,{isChangeOrigin:!0,isUndoRedoOperation:o.origin instanceof ie}),this.beforeTransactionSelection!==null&&this._isLocalCursorInView()&&i.scrollIntoView(),this.prosemirrorView.dispatch(i)})}_prosemirrorChanged(e){this.doc.transact(()=>{X(this.doc,this.type,e,this),this.beforeTransactionSelection=J(this,this.prosemirrorView.state)},h)}initView(e){this.prosemirrorView!=null&&this.destroy(),this.prosemirrorView=e,this.doc.on("beforeAllTransactions",this.beforeAllTransactions),this.doc.on("afterAllTransactions",this.afterAllTransactions),this.type.observeDeep(this._observeFunction)}destroy(){this.prosemirrorView!=null&&(this.prosemirrorView=null,this.type.unobserveDeep(this._observeFunction),this.doc.off("beforeAllTransactions",this.beforeAllTransactions),this.doc.off("afterAllTransactions",this.afterAllTransactions))}},St=(t,e,o,n,r,c)=>{let i=o.mapping.get(t);if(i===void 0){if(t instanceof y)return U(t,e,o,n,r,c);throw We()}return i},U=(t,e,o,n,r,c)=>{let i=[],l=d=>{if(d instanceof y){let s=St(d,e,o,n,r,c);s!==null&&i.push(s)}else{let s=d._item.right?.content?.type;s instanceof se&&!s._item.deleted&&s._item.id.client===s.doc.clientID&&(d.applyDelta([{retain:d.length},...s.toDelta()]),s.doc.transact(a=>{s._item.delete(a)}));let f=nn(d,e,o,n,r,c);f!==null&&f.forEach(a=>{a!==null&&i.push(a)})}};n===void 0||r===void 0?t.toArray().forEach(l):we(t,new Se(r.ds,n.sv)).forEach(l);try{let d=t.getAttributes(n);n!==void 0&&(H(t._item,n)?H(t._item,r)||(d.ychange=c?c("added",t._item.id):{type:"added"}):d.ychange=c?c("removed",t._item.id):{type:"removed"});let s=e.node(t.nodeName,d,i);return o.mapping.set(t,s),s}catch{return t.doc.transact(s=>{t._item.delete(s)},h),o.mapping.delete(t),null}},nn=(t,e,o,n,r,c)=>{let i=[],l=t.toDelta(n,r,c);try{for(let d=0;d<l.length;d++){let s=l[d];i.push(e.text(s.insert,an(s.attributes,e)))}}catch{return t.doc.transact(s=>{t._item.delete(s)},h),null}return i},on=(t,e)=>{let o=new x,n=t.map(r=>({insert:r.text,attributes:Tt(r.marks,e)}));return o.applyDelta(n),e.mapping.set(o,t),o},rn=(t,e)=>{let o=new y(t.type.name);for(let n in t.attrs){let r=t.attrs[n];r!==null&&n!=="ychange"&&o.setAttribute(n,r)}return o.insert(0,de(t).map(n=>Ce(n,e))),e.mapping.set(o,t),o},Ce=(t,e)=>t instanceof Array?on(t,e):rn(t,e),yt=t=>typeof t=="object"&&t!==null,Me=(t,e)=>{let o=Object.keys(t).filter(r=>t[r]!==null),n=o.length===(e==null?0:Object.keys(e).filter(r=>e[r]!==null).length);for(let r=0;r<o.length&&n;r++){let c=o[r],i=t[c],l=e[c];n=c==="ychange"||i===l||yt(i)&&yt(l)&&Me(i,l)}return n},de=t=>{let e=t.content.content,o=[];for(let n=0;n<e.length;n++){let r=e[n];if(r.isText){let c=[];for(let i=e[n];n<e.length&&i.isText;i=e[++n])c.push(i);n--,o.push(c)}else o.push(r)}return o},wt=(t,e)=>{let o=t.toDelta();return o.length===e.length&&o.every((n,r)=>n.insert===e[r].text&&qe(n.attributes||{}).length===e[r].marks.length&&$e(n.attributes,(c,i)=>{let l=Oe(i),d=e[r].marks;return Me(c,d.find(s=>s.type.name===l)?.attrs)}))},W=(t,e)=>{if(t instanceof y&&!(e instanceof Array)&&Ye(t,e)){let o=de(e);return t._length===o.length&&Me(t.getAttributes(),e.attrs)&&t.toArray().every((n,r)=>W(n,o[r]))}return t instanceof x&&e instanceof Array&&wt(t,e)},ae=(t,e)=>t===e||t instanceof Array&&e instanceof Array&&t.length===e.length&&t.every((o,n)=>e[n]===o),xt=(t,e,o)=>{let n=t.toArray(),r=de(e),c=r.length,i=n.length,l=w(i,c),d=0,s=0,f=!1;for(;d<l;d++){let a=n[d],u=r[d];if(ae(o.mapping.get(a),u))f=!0;else if(!W(a,u))break}for(;d+s<l;s++){let a=n[i-s-1],u=r[c-s-1];if(ae(o.mapping.get(a),u))f=!0;else if(!W(a,u))break}return{equalityFactor:d+s,foundMappedChild:f}},sn=t=>{let e="",o=t._start,n={};for(;o!==null;)o.deleted||(o.countable&&o.content instanceof ft?e+=o.content.str:o.content instanceof dt&&(n[o.content.key]=null)),o=o.right;return{str:e,nAttrs:n}},ln=(t,e,o)=>{o.mapping.set(t,e);let{nAttrs:n,str:r}=sn(t),c=e.map(s=>({insert:s.text,attributes:Object.assign({},n,Tt(s.marks,o))})),{insert:i,remove:l,index:d}=ht(r,c.map(s=>s.insert).join(""));t.delete(d,l),t.insert(d,i),t.applyDelta(c.map(s=>({retain:s.insert.length,attributes:s.attributes})))},cn=/(.*)(--[a-zA-Z0-9+/=]{8})$/,Oe=t=>cn.exec(t)?.[1]??t,an=(t,e)=>{let o=[];for(let n in t)o.push(e.mark(Oe(n),t[n]));return o},Tt=(t,e)=>{let o={};return t.forEach(n=>{if(n.type.name!=="ychange"){let r=G(e.isOMark,n.type,()=>!n.type.excludes(n.type));o[r?`${n.type.name}--${gt(n.toJSON())}`:n.type.name]=n.attrs}}),o},X=(t,e,o,n)=>{if(e instanceof y&&e.nodeName!==o.type.name)throw new Error("node name mismatch!");if(n.mapping.set(e,o),e instanceof y){let a=e.getAttributes(),u=o.attrs;for(let m in u)u[m]!==null?a[m]!==u[m]&&m!=="ychange"&&e.setAttribute(m,u[m]):e.removeAttribute(m);for(let m in a)u[m]===void 0&&e.removeAttribute(m)}let r=de(o),c=r.length,i=e.toArray(),l=i.length,d=w(c,l),s=0,f=0;for(;s<d;s++){let a=i[s],u=r[s];if(!ae(n.mapping.get(a),u))if(W(a,u))n.mapping.set(a,u);else break}for(;f+s<d;f++){let a=i[l-f-1],u=r[c-f-1];if(!ae(n.mapping.get(a),u))if(W(a,u))n.mapping.set(a,u);else break}t.transact(()=>{for(;l-s-f>0&&c-s-f>0;){let u=i[s],m=r[s],V=i[l-f-1],K=r[c-f-1];if(u instanceof x&&m instanceof Array)wt(u,m)||ln(u,m,n),s+=1;else{let q=u instanceof y&&Ye(u,m),$=V instanceof y&&Ye(V,K);if(q&&$){let fe=xt(u,m,n),ue=xt(V,K,n);fe.foundMappedChild&&!ue.foundMappedChild?$=!1:!fe.foundMappedChild&&ue.foundMappedChild||fe.equalityFactor<ue.equalityFactor?q=!1:$=!1}q?(X(t,u,m,n),s+=1):$?(X(t,V,K,n),f+=1):(n.mapping.delete(e.get(s)),e.delete(s,1),e.insert(s,[Ce(m,n)]),s+=1)}}let a=l-s-f;if(l===1&&c===0&&i[0]instanceof x?(n.mapping.delete(i[0]),i[0].delete(0,i[0].length)):a>0&&(e.slice(s,s+a).forEach(u=>n.mapping.delete(u)),e.delete(s,a)),s+f<c){let u=[];for(let m=s;m<c-f;m++)u.push(Ce(r[m],n));e.insert(s,u)}},h)},Ye=(t,e)=>!(e instanceof Array)&&t.nodeName===e.type.name;var B=null,dn=()=>{let t=B;B=null,t.forEach((e,o)=>{let n=o.state.tr,r=h.getState(o.state);r&&r.binding&&!r.binding.isDestroyed&&(e.forEach((c,i)=>{n.setMeta(i,c)}),o.dispatch(n))})},ve=(t,e,o)=>{B||(B=new Map,z(0,dn)),G(B,t,He).set(e,o)},v=(t,e,o)=>{if(t===0)return oe(e,0,e.length===0?-1:0);let n=e._first===null?null:e._first.content.type;for(;n!==null&&e!==n;){if(n instanceof x){if(n._length>=t)return oe(n,t,e.length===0?-1:0);if(t-=n._length,n._item!==null&&n._item.next!==null)n=n._item.next.content.type;else{do n=n._item===null?null:n._item.parent,t--;while(n!==e&&n!==null&&n._item!==null&&n._item.next===null);n!==null&&n!==e&&(n=n._item===null?null:n._item.next.content.type)}}else{let r=(o.get(n)||{nodeSize:0}).nodeSize;if(n._first!==null&&t<r)n=n._first.content.type,t--;else{if(t===1&&n._length===0&&r>1)return new ne(n._item===null?null:n._item.id,n._item===null?te(n):null,null);if(t-=r,n._item!==null&&n._item.next!==null)n=n._item.next.content.type;else{if(t===0)return n=n._item===null?n:n._item.parent,new ne(n._item===null?null:n._item.id,n._item===null?te(n):null,null);do n=n._item.parent,t--;while(n!==e&&n._item.next===null);n!==e&&(n=n._item.next.content.type)}}}if(n===null)throw Q();if(t===0&&n.constructor!==x&&n!==e)return fn(n._item.parent,n._item)}return oe(e,e._length,e.length===0?-1:0)},fn=(t,e)=>{let o=null,n=null;return t._item===null?n=te(t):o=it(t._item.id.client,t._item.id.clock),new ne(o,n,e.id)},T=(t,e,o,n)=>{let r=lt(o,t);if(r===null||r.type!==e&&!st(e,r.type._item))return null;let c=r.type,i=0;if(c.constructor===x)i=r.index;else if(c._item===null||!c._item.deleted){let l=c._first,d=0;for(;d<c._length&&d<r.index&&l!==null;){if(!l.deleted){let s=l.content.type;d++,s instanceof x?i+=s._length:i+=n.get(s).nodeSize}l=l.right}i+=1}for(;c!==e&&c._item!==null;){let l=c._item.parent;if(l._item===null||!l._item.deleted){i+=1;let d=l._first;for(;d!==null;){let s=d.content.type;if(s===c)break;d.deleted||(s instanceof x?i+=s._length:i+=n.get(s).nodeSize),d=d.right}}c=l}return i-1},Pt=(t,e)=>{let o=t.toArray().map(n=>U(n,e,_t())).filter(n=>n!==null);return M.fromArray(o)},Ne=(t,e)=>e.topNodeType.create(null,Pt(t,e));function ke(t,e="prosemirror"){let o=new ee,n=o.get(e,Te);return n.doc?(Ct(t,n),n.doc):o}function Ct(t,e){let o=e||new Te,n=o.doc?o.doc:{transact:r=>r(void 0)};return X(n,o,t,{mapping:new Map,isOMark:new Map}),o}var un=(t,e,o)=>t!==e,mn=t=>{let e=document.createElement("span");e.classList.add("ProseMirror-yjs-cursor"),e.setAttribute("style",`border-color: ${t.color}`);let o=document.createElement("div");o.setAttribute("style",`background-color: ${t.color}`),o.insertBefore(document.createTextNode(t.name),null);let n=document.createTextNode("\u2060"),r=document.createTextNode("\u2060");return e.insertBefore(n,null),e.insertBefore(o,null),e.insertBefore(r,null),e},hn=t=>({style:`background-color: ${t.color}70`,class:"ProseMirror-yjs-selection"}),pn=/^#[0-9a-fA-F]{6}$/,Yt=(t,e,o,n,r)=>{let c=h.getState(t),i=c.doc,l=[];return c.snapshot!=null||c.prevSnapshot!=null||c.binding.mapping.size===0?ge.create(t.doc,[]):(e.getStates().forEach((d,s)=>{if(o(i.clientID,s,d)&&d.cursor!=null){let f=d.user||{};f.color==null?f.color="#ffa500":pn.test(f.color)||console.warn("A user uses an unsupported color format",f),f.name==null&&(f.name=`User: ${s}`);let a=T(i,c.type,E(d.cursor.anchor),c.binding.mapping),u=T(i,c.type,E(d.cursor.head),c.binding.mapping);if(a!==null&&u!==null){let m=D(t.doc.content.size-1,0);a=w(a,m),u=w(u,m),l.push(pe.widget(u,()=>n(f,s),{key:s+"",side:10}));let V=w(a,u),K=D(a,u);l.push(pe.inline(V,K,r(f,s),{inclusiveEnd:!0,inclusiveStart:!1}))}}}),ge.create(t.doc,l))},At=(t,{awarenessStateFilter:e=un,cursorBuilder:o=mn,selectionBuilder:n=hn,getSelection:r=i=>i.selection}={},c="cursor")=>new Y({key:O,state:{init(i,l){return Yt(l,t,e,o,n)},apply(i,l,d,s){let f=h.getState(s),a=i.getMeta(O);return f&&f.isChangeOrigin||a&&a.awarenessUpdated?Yt(s,t,e,o,n):l.map(i.mapping,i.doc)}},props:{decorations:i=>O.getState(i)},view:i=>{let l=()=>{i.docView&&ve(i,O,{awarenessUpdated:!0})},d=()=>{let s=h.getState(i.state),f=t.getLocalState()||{};if(i.hasFocus()){let a=r(i.state),u=v(a.anchor,s.type,s.binding.mapping),m=v(a.head,s.type,s.binding.mapping);(f.cursor==null||!_e(E(f.cursor.anchor),u)||!_e(E(f.cursor.head),m))&&t.setLocalStateField(c,{anchor:u,head:m})}else f.cursor!=null&&T(s.doc,s.type,E(f.cursor.anchor),s.binding.mapping)!==null&&t.setLocalStateField(c,null)};return t.on("change",l),i.dom.addEventListener("focusin",d),i.dom.addEventListener("focusout",d),{update:d,destroy:()=>{i.dom.removeEventListener("focusin",d),i.dom.removeEventListener("focusout",d),t.off("change",l),t.setLocalStateField(c,null)}}}});var Mt=t=>b.getState(t)?.undoManager?.undo()!=null,Ve=t=>b.getState(t)?.undoManager?.redo()!=null;var gn=new Set(["paragraph"]),yn=(t,e)=>!(t instanceof le)||!(t.content instanceof ut)||!(t.content.type instanceof se||t.content.type instanceof y&&e.has(t.content.type.nodeName))||t.content.type._length===0,Ot=({protectedNodes:t=gn,trackedOrigins:e=[],undoManager:o=null}={})=>new Y({key:b,state:{init:(n,r)=>{let c=h.getState(r),i=o||new ie(c.type,{trackedOrigins:new Set([h].concat(e)),deleteFilter:l=>yn(l,t),captureTransaction:l=>l.meta.get("addToHistory")!==!1});return{undoManager:i,prevSel:null,hasUndoOps:i.undoStack.length>0,hasRedoOps:i.redoStack.length>0}},apply:(n,r,c,i)=>{let l=h.getState(i).binding,d=r.undoManager,s=d.undoStack.length>0,f=d.redoStack.length>0;return l?{undoManager:d,prevSel:J(l,c),hasUndoOps:s,hasRedoOps:f}:s!==r.hasUndoOps||f!==r.hasRedoOps?Object.assign({},r,{hasUndoOps:d.undoStack.length>0,hasRedoOps:d.redoStack.length>0}):r}},view:n=>{let r=h.getState(n.state),c=b.getState(n.state).undoManager;return c.on("stack-item-added",({stackItem:i})=>{let l=r.binding;l&&i.meta.set(l,b.getState(n.state).prevSel)}),c.on("stack-item-popped",({stackItem:i})=>{let l=r.binding;l&&(l.beforeTransactionSelection=i.meta.get(l)||l.beforeTransactionSelection)}),{destroy:()=>{c.destroy()}}}});var kt=new F("MILKDOWN_COLLAB_KEYMAP"),xn=[kt,h,O,b],N,S,I,g,k,P,Rt,Ft,Fe,Nt,Vt=(Nt=class{constructor(){A(this,P);A(this,N,{});A(this,S,null);A(this,I,null);A(this,g,null);A(this,k,!1)}bindCtx(t){return C(this,g,t),this}bindDoc(t){return C(this,S,t.getXmlFragment("prosemirror")),this}bindXmlFragment(t){return C(this,S,t),this}setOptions(t){return C(this,N,t),this}mergeOptions(t){return Object.assign(p(this,N),t),this}setAwareness(t){return C(this,I,t),this}applyTemplate(t,e){if(!p(this,g))throw R();if(!p(this,S))throw me();let o=e||(i=>i.textContent.length===0),n=j(this,P,Rt).call(this,t),r=p(this,g).get(ye),c=Ne(p(this,S),r);if(n&&o(c,n)){let i=p(this,S);i.delete(0,i.length);let l=ke(n),d=rt(l);i.doc&&ot(i.doc,d),l.destroy()}return this}connect(){if(!p(this,g))throw R();if(p(this,k))return;let t=p(this,g).get(Z),e=j(this,P,Ft).call(this),o=t.concat(e);return j(this,P,Fe).call(this,o),C(this,k,!0),this}disconnect(){if(!p(this,g))throw R();if(!p(this,k))return this;let t=p(this,g).get(Z).filter(e=>!e.spec.key||!xn.includes(e.spec.key));return j(this,P,Fe).call(this,t),C(this,k,!1),this}},N=new WeakMap,S=new WeakMap,I=new WeakMap,g=new WeakMap,k=new WeakMap,P=new WeakSet,Rt=function(t){if(!p(this,g))throw R();let e=p(this,g).get(ye),o=p(this,g).get(je);return Le(t,o,e)},Ft=function(){if(!p(this,S))throw me();let{ySyncOpts:t,yUndoOpts:e}=p(this,N),o=[Ae(p(this,S),t),Ot(e),new Y({key:kt,props:{handleKeyDown:Ie({"Mod-z":Mt,"Mod-y":Ve,"Mod-Shift-z":Ve})}})];if(p(this,I)){let{yCursorOpts:n,yCursorStateField:r}=p(this,N);o.push(At(p(this,I),n,r))}return o},Fe=function(t){if(!p(this,g))throw R();p(this,g).set(Z,t);let e=p(this,g).get(Ke),o=e.state.reconfigure({plugins:t});e.updateState(o)},Nt),vt=De(new Vt,"collabServiceCtx"),Re=Ee("CollabReady"),bn=t=>{let e=new Vt;return t.inject(vt,e).record(Re),async()=>(await t.wait(ze),e.bindCtx(t),t.done(Re),()=>{t.remove(vt).clearTimer(Re)})};bn.meta={package:"@milkdown/plugin-collab",displayName:"Collab"};export{kt as CollabKeymapPluginKey,Re as CollabReady,Vt as CollabService,bn as collab,vt as collabServiceCtx};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-GVZW4OO4.js";import"./chunk-FOZORPFE.js";import"./chunk-VKELS2FZ.js";import"./chunk-BV6CAHIM.js";import"./chunk-KJCZ4UN6.js";import"./chunk-23NN352E.js";export{a as ListenerManager,c as key,d as listener,b as listenerCtx};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-37CATSBM.js";import"./chunk-KOCVWYBK.js";import"./chunk-FOZORPFE.js";import"./chunk-GHRUWTEV.js";import"./chunk-VKELS2FZ.js";import"./chunk-BV6CAHIM.js";import"./chunk-KJCZ4UN6.js";import"./chunk-23NN352E.js";export{b as SlashProvider,a as slashFactory};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-WGUKYDQQ.js";import"./chunk-KOCVWYBK.js";import"./chunk-FOZORPFE.js";import"./chunk-GHRUWTEV.js";import"./chunk-VKELS2FZ.js";import"./chunk-BV6CAHIM.js";import"./chunk-KJCZ4UN6.js";import"./chunk-23NN352E.js";export{a as TooltipProvider,b as tooltipFactory};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"./chunk-6HASM4ZR.js";import"./chunk-GHRUWTEV.js";import"./chunk-VKELS2FZ.js";import"./chunk-BV6CAHIM.js";import"./chunk-KJCZ4UN6.js";import"./chunk-23NN352E.js";export{b as defaultUploader,a as readImageAsBase64,e as upload,c as uploadConfig,d as uploadPlugin};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-CS3PHHYU.js";import{A as z,B as A,C as B,D as C,E as D,F as E,G as F,H as G,I as H,J as I,K as J,L as K,M as L,b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t,v as u,w as v,x as w,y as x,z as y}from"./chunk-GHRUWTEV.js";import"./chunk-VKELS2FZ.js";import"./chunk-BV6CAHIM.js";import"./chunk-KJCZ4UN6.js";import"./chunk-23NN352E.js";export{d as $command,e as $commandAsync,t as $ctx,f as $inputRule,g as $inputRuleAsync,j as $mark,k as $markAsync,y as $markAttr,v as $markSchema,l as $node,m as $nodeAsync,x as $nodeAttr,u as $nodeSchema,h as $pasteRule,i as $pasteRuleAsync,n as $prose,o as $proseAsync,z as $remark,p as $shortcut,q as $shortcutAsync,w as $useKeymap,r as $view,s as $viewAsync,c as addTimer,A as callCommand,B as forceUpdate,C as getHTML,D as getMarkdown,E as insert,J as insertPos,I as markdownToSlice,a as nanoid,F as outline,L as pipe,G as replaceAll,K as replaceRange,H as setAttr,b as upsertById};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as It,b as Dt,c as Xe,d as Ue,e as Pt}from"./chunk-FGZNEC46.js";import{A as Ct,C as St,D as Be,E as Rt,F as xe,G as Tt,H as At,I as kt,N as Ot,O as Fe,P as je,T as ae,U as Ee,V as $e,W as Je,X as Lt,b as ve,c as pt,d as gt,e as yt,f as mt,g as bt,h as _t,j as Ge,k as Z,l as re,la as xt,m as Ke,n as Q,na as Ut,o as Oe,p as ie,pa as Nt,q as wt,r as De,u as Le,v as fe,w as vt,x as Pe,y as Me,z as Et}from"./chunk-E5R7FPWA.js";import{a as ke,b as sr,d as or}from"./chunk-23NN352E.js";var Vt=sr((qt,tt)=>{(function(S){if(typeof qt=="object"&&typeof tt<"u")tt.exports=S();else if(typeof define=="function"&&define.amd)define([],S);else{var O;O=typeof window>"u"?typeof global>"u"?typeof self>"u"?this:self:global:window,O.SimplePeer=S()}})(function(){var S=Math.floor,O=Math.abs,x=Math.pow;return(function(){function m(T,p,s){function v(l,d){if(!p[l]){if(!T[l]){var o=typeof ke=="function"&&ke;if(!d&&o)return o(l,!0);if(L)return L(l,!0);var _=new Error("Cannot find module '"+l+"'");throw _.code="MODULE_NOT_FOUND",_}var C=p[l]={exports:{}};T[l][0].call(C.exports,function(A){var U=T[l][1][A];return v(U||A)},C,C.exports,m,T,p,s)}return p[l].exports}for(var L=typeof ke=="function"&&ke,n=0;n<s.length;n++)v(s[n]);return v}return m})()({1:[function(m,T,p){"use strict";function s(c){var u=c.length;if(0<u%4)throw new Error("Invalid string. Length must be a multiple of 4");var g=c.indexOf("=");g===-1&&(g=u);var h=g===u?0:4-g%4;return[g,h]}function v(c,u,g){return 3*(u+g)/4-g}function L(c){var u,g,h=s(c),w=h[0],N=h[1],f=new C(v(c,w,N)),y=0,I=0<N?w-4:w;for(g=0;g<I;g+=4)u=_[c.charCodeAt(g)]<<18|_[c.charCodeAt(g+1)]<<12|_[c.charCodeAt(g+2)]<<6|_[c.charCodeAt(g+3)],f[y++]=255&u>>16,f[y++]=255&u>>8,f[y++]=255&u;return N===2&&(u=_[c.charCodeAt(g)]<<2|_[c.charCodeAt(g+1)]>>4,f[y++]=255&u),N===1&&(u=_[c.charCodeAt(g)]<<10|_[c.charCodeAt(g+1)]<<4|_[c.charCodeAt(g+2)]>>2,f[y++]=255&u>>8,f[y++]=255&u),f}function n(c){return o[63&c>>18]+o[63&c>>12]+o[63&c>>6]+o[63&c]}function l(c,u,g){for(var h,w=[],N=u;N<g;N+=3)h=(16711680&c[N]<<16)+(65280&c[N+1]<<8)+(255&c[N+2]),w.push(n(h));return w.join("")}function d(c){for(var u,g=c.length,h=g%3,w=[],N=16383,f=0,y=g-h;f<y;f+=N)w.push(l(c,f,f+N>y?y:f+N));return h===1?(u=c[g-1],w.push(o[u>>2]+o[63&u<<4]+"==")):h===2&&(u=(c[g-2]<<8)+c[g-1],w.push(o[u>>10]+o[63&u>>4]+o[63&u<<2]+"=")),w.join("")}p.byteLength=function(c){var u=s(c),g=u[0],h=u[1];return 3*(g+h)/4-h},p.toByteArray=L,p.fromByteArray=d;for(var o=[],_=[],C=typeof Uint8Array>"u"?Array:Uint8Array,A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",U=0,i=A.length;U<i;++U)o[U]=A[U],_[A.charCodeAt(U)]=U;_[45]=62,_[95]=63},{}],2:[function(){},{}],3:[function(m,T,p){(function(){(function(){"use strict";var s=String.fromCharCode,v=Math.min;function L(e){if(2147483647<e)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=n.prototype,t}function n(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(e)}return l(e,t,r)}function l(e,t,r){if(typeof e=="string")return C(e,t);if(ArrayBuffer.isView(e))return A(e);if(e==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(b(e,ArrayBuffer)||e&&b(e.buffer,ArrayBuffer))return U(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var a=e.valueOf&&e.valueOf();if(a!=null&&a!==e)return n.from(a,t,r);var E=i(e);if(E)return E;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return n.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function d(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(0>e)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function o(e,t,r){return d(e),0>=e||t===void 0?L(e):typeof r=="string"?L(e).fill(t,r):L(e).fill(t)}function _(e){return d(e),L(0>e?0:0|c(e))}function C(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!n.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|u(e,t),a=L(r),E=a.write(e,t);return E!==r&&(a=a.slice(0,E)),a}function A(e){for(var t=0>e.length?0:0|c(e.length),r=L(t),a=0;a<t;a+=1)r[a]=255&e[a];return r}function U(e,t,r){if(0>t||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var a;return a=t===void 0&&r===void 0?new Uint8Array(e):r===void 0?new Uint8Array(e,t):new Uint8Array(e,t,r),a.__proto__=n.prototype,a}function i(e){if(n.isBuffer(e)){var t=0|c(e.length),r=L(t);return r.length===0||e.copy(r,0,0,t),r}return e.length===void 0?e.type==="Buffer"&&Array.isArray(e.data)?A(e.data):void 0:typeof e.length!="number"||k(e.length)?L(0):A(e)}function c(e){if(e>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function u(e,t){if(n.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||b(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,a=2<arguments.length&&arguments[2]===!0;if(!a&&r===0)return 0;for(var E=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return ue(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return te(e).length;default:if(E)return a?-1:ue(e).length;t=(""+t).toLowerCase(),E=!0}}function g(e,t,r){var a=!1;if((t===void 0||0>t)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),0>=r)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return le(this,t,r);case"utf8":case"utf-8":return X(this,t,r);case"ascii":return F(this,t,r);case"latin1":case"binary":return Ie(this,t,r);case"base64":return H(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,t,r);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function h(e,t,r){var a=e[t];e[t]=e[r],e[r]=a}function w(e,t,r,a,E){if(e.length===0)return-1;if(typeof r=="string"?(a=r,r=0):2147483647<r?r=2147483647:-2147483648>r&&(r=-2147483648),r=+r,k(r)&&(r=E?0:e.length-1),0>r&&(r=e.length+r),r>=e.length){if(E)return-1;r=e.length-1}else if(0>r)if(E)r=0;else return-1;if(typeof t=="string"&&(t=n.from(t,a)),n.isBuffer(t))return t.length===0?-1:N(e,t,r,a,E);if(typeof t=="number")return t&=255,typeof Uint8Array.prototype.indexOf=="function"?E?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):N(e,[t],r,a,E);throw new TypeError("val must be string, number or Buffer")}function N(e,t,r,a,E){function R(Ae,be){return P===1?Ae[be]:Ae.readUInt16BE(be*P)}var P=1,W=e.length,J=t.length;if(a!==void 0&&(a=(a+"").toLowerCase(),a==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le")){if(2>e.length||2>t.length)return-1;P=2,W/=2,J/=2,r/=2}var G;if(E){var Y=-1;for(G=r;G<W;G++)if(R(e,G)!==R(t,Y===-1?0:G-Y))Y!==-1&&(G-=G-Y),Y=-1;else if(Y===-1&&(Y=G),G-Y+1===J)return Y*P}else for(r+J>W&&(r=W-J),G=r;0<=G;G--){for(var z=!0,me=0;me<J;me++)if(R(e,G+me)!==R(t,me)){z=!1;break}if(z)return G}return-1}function f(e,t,r,a){r=+r||0;var E=e.length-r;a?(a=+a,a>E&&(a=E)):a=E;var R=t.length;a>R/2&&(a=R/2);for(var P,W=0;W<a;++W){if(P=parseInt(t.substr(2*W,2),16),k(P))return W;e[r+W]=P}return W}function y(e,t,r,a){return oe(ue(t,e.length-r),e,r,a)}function I(e,t,r,a){return oe(Re(t),e,r,a)}function M(e,t,r,a){return I(e,t,r,a)}function j(e,t,r,a){return oe(te(t),e,r,a)}function q(e,t,r,a){return oe(Te(t,e.length-r),e,r,a)}function H(e,t,r){return t===0&&r===e.length?D.fromByteArray(e):D.fromByteArray(e.slice(t,r))}function X(e,t,r){r=v(e.length,r);for(var a=[],E=t;E<r;){var R=e[E],P=null,W=239<R?4:223<R?3:191<R?2:1;if(E+W<=r){var J,G,Y,z;W===1?128>R&&(P=R):W===2?(J=e[E+1],(192&J)==128&&(z=(31&R)<<6|63&J,127<z&&(P=z))):W===3?(J=e[E+1],G=e[E+2],(192&J)==128&&(192&G)==128&&(z=(15&R)<<12|(63&J)<<6|63&G,2047<z&&(55296>z||57343<z)&&(P=z))):W===4&&(J=e[E+1],G=e[E+2],Y=e[E+3],(192&J)==128&&(192&G)==128&&(192&Y)==128&&(z=(15&R)<<18|(63&J)<<12|(63&G)<<6|63&Y,65535<z&&1114112>z&&(P=z)))}P===null?(P=65533,W=1):65535<P&&(P-=65536,a.push(55296|1023&P>>>10),P=56320|1023&P),a.push(P),E+=W}return ee(a)}function ee(e){var t=e.length;if(t<=4096)return s.apply(String,e);for(var r="",a=0;a<t;)r+=s.apply(String,e.slice(a,a+=4096));return r}function F(e,t,r){var a="";r=v(e.length,r);for(var E=t;E<r;++E)a+=s(127&e[E]);return a}function Ie(e,t,r){var a="";r=v(e.length,r);for(var E=t;E<r;++E)a+=s(e[E]);return a}function le(e,t,r){var a=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>a)&&(r=a);for(var E="",R=t;R<r;++R)E+=Se(e[R]);return E}function ce(e,t,r){for(var a=e.slice(t,r),E="",R=0;R<a.length;R+=2)E+=s(a[R]+256*a[R+1]);return E}function K(e,t,r){if(e%1!=0||0>e)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function $(e,t,r,a,E,R){if(!n.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>E||t<R)throw new RangeError('"value" argument is out of bounds');if(r+a>e.length)throw new RangeError("Index out of range")}function he(e,t,r,a){if(r+a>e.length)throw new RangeError("Index out of range");if(0>r)throw new RangeError("Index out of range")}function se(e,t,r,a,E){return t=+t,r>>>=0,E||he(e,t,r,4,34028234663852886e22,-34028234663852886e22),B.write(e,t,r,a,23,4),r+4}function de(e,t,r,a,E){return t=+t,r>>>=0,E||he(e,t,r,8,17976931348623157e292,-17976931348623157e292),B.write(e,t,r,a,52,8),r+8}function ge(e){if(e=e.split("=")[0],e=e.trim().replace(V,""),2>e.length)return"";for(;e.length%4!=0;)e+="=";return e}function Se(e){return 16>e?"0"+e.toString(16):e.toString(16)}function ue(e,t){t=t||1/0;for(var r,a=e.length,E=null,R=[],P=0;P<a;++P){if(r=e.charCodeAt(P),55295<r&&57344>r){if(!E){if(56319<r){-1<(t-=3)&&R.push(239,191,189);continue}else if(P+1===a){-1<(t-=3)&&R.push(239,191,189);continue}E=r;continue}if(56320>r){-1<(t-=3)&&R.push(239,191,189),E=r;continue}r=(E-55296<<10|r-56320)+65536}else E&&-1<(t-=3)&&R.push(239,191,189);if(E=null,128>r){if(0>(t-=1))break;R.push(r)}else if(2048>r){if(0>(t-=2))break;R.push(192|r>>6,128|63&r)}else if(65536>r){if(0>(t-=3))break;R.push(224|r>>12,128|63&r>>6,128|63&r)}else if(1114112>r){if(0>(t-=4))break;R.push(240|r>>18,128|63&r>>12,128|63&r>>6,128|63&r)}else throw new Error("Invalid code point")}return R}function Re(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function Te(e,t){for(var r,a,E,R=[],P=0;P<e.length&&!(0>(t-=2));++P)r=e.charCodeAt(P),a=r>>8,E=r%256,R.push(E),R.push(a);return R}function te(e){return D.toByteArray(ge(e))}function oe(e,t,r,a){for(var E=0;E<a&&!(E+r>=t.length||E>=e.length);++E)t[E+r]=e[E];return E}function b(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function k(e){return e!==e}var D=m("base64-js"),B=m("ieee754");p.Buffer=n,p.SlowBuffer=function(e){return+e!=e&&(e=0),n.alloc(+e)},p.INSPECT_MAX_BYTES=50,p.kMaxLength=2147483647,n.TYPED_ARRAY_SUPPORT=(function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},e.foo()===42}catch{return!1}})(),n.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){return n.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){return n.isBuffer(this)?this.byteOffset:void 0}}),typeof Symbol<"u"&&Symbol.species!=null&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),n.poolSize=8192,n.from=function(e,t,r){return l(e,t,r)},n.prototype.__proto__=Uint8Array.prototype,n.__proto__=Uint8Array,n.alloc=function(e,t,r){return o(e,t,r)},n.allocUnsafe=function(e){return _(e)},n.allocUnsafeSlow=function(e){return _(e)},n.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==n.prototype},n.compare=function(e,t){if(b(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),b(t,Uint8Array)&&(t=n.from(t,t.offset,t.byteLength)),!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,a=t.length,E=0,R=v(r,a);E<R;++E)if(e[E]!==t[E]){r=e[E],a=t[E];break}return r<a?-1:a<r?1:0},n.isEncoding=function(e){switch((e+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return n.alloc(0);var r;if(t===void 0)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var a=n.allocUnsafe(t),E=0;for(r=0;r<e.length;++r){var R=e[r];if(b(R,Uint8Array)&&(R=n.from(R)),!n.isBuffer(R))throw new TypeError('"list" argument must be an Array of Buffers');R.copy(a,E),E+=R.length}return a},n.byteLength=u,n.prototype._isBuffer=!0,n.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},n.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},n.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},n.prototype.toString=function(){var e=this.length;return e===0?"":arguments.length===0?X(this,0,e):g.apply(this,arguments)},n.prototype.toLocaleString=n.prototype.toString,n.prototype.equals=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||n.compare(this,e)===0},n.prototype.inspect=function(){var e="",t=p.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},n.prototype.compare=function(e,t,r,a,E){if(b(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),!n.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),a===void 0&&(a=0),E===void 0&&(E=this.length),0>t||r>e.length||0>a||E>this.length)throw new RangeError("out of range index");if(a>=E&&t>=r)return 0;if(a>=E)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,a>>>=0,E>>>=0,this===e)return 0;for(var R=E-a,P=r-t,W=v(R,P),J=this.slice(a,E),G=e.slice(t,r),Y=0;Y<W;++Y)if(J[Y]!==G[Y]){R=J[Y],P=G[Y];break}return R<P?-1:P<R?1:0},n.prototype.includes=function(e,t,r){return this.indexOf(e,t,r)!==-1},n.prototype.indexOf=function(e,t,r){return w(this,e,t,r,!0)},n.prototype.lastIndexOf=function(e,t,r){return w(this,e,t,r,!1)},n.prototype.write=function(e,t,r,a){if(t===void 0)a="utf8",r=this.length,t=0;else if(r===void 0&&typeof t=="string")a=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,a===void 0&&(a="utf8")):(a=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var E=this.length-t;if((r===void 0||r>E)&&(r=E),0<e.length&&(0>r||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var R=!1;;)switch(a){case"hex":return f(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return I(this,e,t,r);case"latin1":case"binary":return M(this,e,t,r);case"base64":return j(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,e,t,r);default:if(R)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),R=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(e,t){var r=this.length;e=~~e,t=t===void 0?r:~~t,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),t<e&&(t=e);var a=this.subarray(e,t);return a.__proto__=n.prototype,a},n.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||K(e,t,this.length);for(var a=this[e],E=1,R=0;++R<t&&(E*=256);)a+=this[e+R]*E;return a},n.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||K(e,t,this.length);for(var a=this[e+--t],E=1;0<t&&(E*=256);)a+=this[e+--t]*E;return a},n.prototype.readUInt8=function(e,t){return e>>>=0,t||K(e,1,this.length),this[e]},n.prototype.readUInt16LE=function(e,t){return e>>>=0,t||K(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUInt16BE=function(e,t){return e>>>=0,t||K(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUInt32LE=function(e,t){return e>>>=0,t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},n.prototype.readUInt32BE=function(e,t){return e>>>=0,t||K(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||K(e,t,this.length);for(var a=this[e],E=1,R=0;++R<t&&(E*=256);)a+=this[e+R]*E;return E*=128,a>=E&&(a-=x(2,8*t)),a},n.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||K(e,t,this.length);for(var a=t,E=1,R=this[e+--a];0<a&&(E*=256);)R+=this[e+--a]*E;return E*=128,R>=E&&(R-=x(2,8*t)),R},n.prototype.readInt8=function(e,t){return e>>>=0,t||K(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){e>>>=0,t||K(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(e,t){e>>>=0,t||K(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(e,t){return e>>>=0,t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return e>>>=0,t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return e>>>=0,t||K(e,4,this.length),B.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return e>>>=0,t||K(e,4,this.length),B.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return e>>>=0,t||K(e,8,this.length),B.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return e>>>=0,t||K(e,8,this.length),B.read(this,e,!1,52,8)},n.prototype.writeUIntLE=function(e,t,r,a){if(e=+e,t>>>=0,r>>>=0,!a){var E=x(2,8*r)-1;$(this,e,t,r,E,0)}var R=1,P=0;for(this[t]=255&e;++P<r&&(R*=256);)this[t+P]=255&e/R;return t+r},n.prototype.writeUIntBE=function(e,t,r,a){if(e=+e,t>>>=0,r>>>=0,!a){var E=x(2,8*r)-1;$(this,e,t,r,E,0)}var R=r-1,P=1;for(this[t+R]=255&e;0<=--R&&(P*=256);)this[t+R]=255&e/P;return t+r},n.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,1,255,0),this[t]=255&e,t+1},n.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},n.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},n.prototype.writeIntLE=function(e,t,r,a){if(e=+e,t>>>=0,!a){var E=x(2,8*r-1);$(this,e,t,r,E-1,-E)}var R=0,P=1,W=0;for(this[t]=255&e;++R<r&&(P*=256);)0>e&&W===0&&this[t+R-1]!==0&&(W=1),this[t+R]=255&(e/P>>0)-W;return t+r},n.prototype.writeIntBE=function(e,t,r,a){if(e=+e,t>>>=0,!a){var E=x(2,8*r-1);$(this,e,t,r,E-1,-E)}var R=r-1,P=1,W=0;for(this[t+R]=255&e;0<=--R&&(P*=256);)0>e&&W===0&&this[t+R+1]!==0&&(W=1),this[t+R]=255&(e/P>>0)-W;return t+r},n.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,1,127,-128),0>e&&(e=255+e+1),this[t]=255&e,t+1},n.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},n.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},n.prototype.writeFloatLE=function(e,t,r){return se(this,e,t,!0,r)},n.prototype.writeFloatBE=function(e,t,r){return se(this,e,t,!1,r)},n.prototype.writeDoubleLE=function(e,t,r){return de(this,e,t,!0,r)},n.prototype.writeDoubleBE=function(e,t,r){return de(this,e,t,!1,r)},n.prototype.copy=function(e,t,r,a){if(!n.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),a||a===0||(a=this.length),t>=e.length&&(t=e.length),t||(t=0),0<a&&a<r&&(a=r),a===r||e.length===0||this.length===0)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("Index out of range");if(0>a)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t<a-r&&(a=e.length-t+r);var E=a-r;if(this===e&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(t,r,a);else if(this===e&&r<t&&t<a)for(var R=E-1;0<=R;--R)e[R+t]=this[R+r];else Uint8Array.prototype.set.call(e,this.subarray(r,a),t);return E},n.prototype.fill=function(e,t,r,a){if(typeof e=="string"){if(typeof t=="string"?(a=t,t=0,r=this.length):typeof r=="string"&&(a=r,r=this.length),a!==void 0&&typeof a!="string")throw new TypeError("encoding must be a string");if(typeof a=="string"&&!n.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(e.length===1){var E=e.charCodeAt(0);(a==="utf8"&&128>E||a==="latin1")&&(e=E)}}else typeof e=="number"&&(e&=255);if(0>t||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=r===void 0?this.length:r>>>0,e||(e=0);var R;if(typeof e=="number")for(R=t;R<r;++R)this[R]=e;else{var P=n.isBuffer(e)?e:n.from(e,a),W=P.length;if(W===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(R=0;R<r-t;++R)this[R+t]=P[R%W]}return this};var V=/[^+/0-9A-Za-z-_]/g}).call(this)}).call(this,m("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:9}],4:[function(m,T,p){(function(s){(function(){function v(){let n;try{n=p.storage.getItem("debug")}catch{}return!n&&typeof s<"u"&&"env"in s&&(n=s.env.DEBUG),n}p.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+T.exports.humanize(this.diff),!this.useColors)return;let l="color: "+this.color;n.splice(1,0,l,"color: inherit");let d=0,o=0;n[0].replace(/%[a-zA-Z%]/g,_=>{_==="%%"||(d++,_==="%c"&&(o=d))}),n.splice(o,0,l)},p.save=function(n){try{n?p.storage.setItem("debug",n):p.storage.removeItem("debug")}catch{}},p.load=v,p.useColors=function(){return!!(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},p.storage=(function(){try{return localStorage}catch{}})(),p.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),p.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],p.log=console.debug||console.log||(()=>{}),T.exports=m("./common")(p);let{formatters:L}=T.exports;L.j=function(n){try{return JSON.stringify(n)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}}).call(this)}).call(this,m("_process"))},{"./common":5,_process:12}],5:[function(m,T){T.exports=function(p){function s(n){function l(..._){if(!l.enabled)return;let C=l,A=+new Date,U=A-(d||A);C.diff=U,C.prev=d,C.curr=A,d=A,_[0]=s.coerce(_[0]),typeof _[0]!="string"&&_.unshift("%O");let i=0;_[0]=_[0].replace(/%([a-zA-Z%])/g,(u,g)=>{if(u==="%%")return"%";i++;let h=s.formatters[g];if(typeof h=="function"){let w=_[i];u=h.call(C,w),_.splice(i,1),i--}return u}),s.formatArgs.call(C,_),(C.log||s.log).apply(C,_)}let d,o=null;return l.namespace=n,l.useColors=s.useColors(),l.color=s.selectColor(n),l.extend=v,l.destroy=s.destroy,Object.defineProperty(l,"enabled",{enumerable:!0,configurable:!1,get:()=>o===null?s.enabled(n):o,set:_=>{o=_}}),typeof s.init=="function"&&s.init(l),l}function v(n,l){let d=s(this.namespace+(typeof l>"u"?":":l)+n);return d.log=this.log,d}function L(n){return n.toString().substring(2,n.toString().length-2).replace(/\.\*\?$/,"*")}return s.debug=s,s.default=s,s.coerce=function(n){return n instanceof Error?n.stack||n.message:n},s.disable=function(){let n=[...s.names.map(L),...s.skips.map(L).map(l=>"-"+l)].join(",");return s.enable(""),n},s.enable=function(n){s.save(n),s.names=[],s.skips=[];let l,d=(typeof n=="string"?n:"").split(/[\s,]+/),o=d.length;for(l=0;l<o;l++)d[l]&&(n=d[l].replace(/\*/g,".*?"),n[0]==="-"?s.skips.push(new RegExp("^"+n.substr(1)+"$")):s.names.push(new RegExp("^"+n+"$")))},s.enabled=function(n){if(n[n.length-1]==="*")return!0;let l,d;for(l=0,d=s.skips.length;l<d;l++)if(s.skips[l].test(n))return!1;for(l=0,d=s.names.length;l<d;l++)if(s.names[l].test(n))return!0;return!1},s.humanize=m("ms"),s.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(p).forEach(n=>{s[n]=p[n]}),s.names=[],s.skips=[],s.formatters={},s.selectColor=function(n){let l=0;for(let d=0;d<n.length;d++)l=(l<<5)-l+n.charCodeAt(d),l|=0;return s.colors[O(l)%s.colors.length]},s.enable(s.load()),s}},{ms:11}],6:[function(m,T){"use strict";function p(s,v){for(let L in v)Object.defineProperty(s,L,{value:v[L],enumerable:!0,configurable:!0});return s}T.exports=function(s,v,L){if(!s||typeof s=="string")throw new TypeError("Please pass an Error to err-code");L||(L={}),typeof v=="object"&&(L=v,v=""),v&&(L.code=v);try{return p(s,L)}catch{L.message=s.message,L.stack=s.stack;let l=function(){};return l.prototype=Object.create(Object.getPrototypeOf(s)),p(new l,L)}}},{}],7:[function(m,T){"use strict";function p(f){console&&console.warn&&console.warn(f)}function s(){s.init.call(this)}function v(f){if(typeof f!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof f)}function L(f){return f._maxListeners===void 0?s.defaultMaxListeners:f._maxListeners}function n(f,y,I,M){var j,q,H;if(v(I),q=f._events,q===void 0?(q=f._events=Object.create(null),f._eventsCount=0):(q.newListener!==void 0&&(f.emit("newListener",y,I.listener?I.listener:I),q=f._events),H=q[y]),H===void 0)H=q[y]=I,++f._eventsCount;else if(typeof H=="function"?H=q[y]=M?[I,H]:[H,I]:M?H.unshift(I):H.push(I),j=L(f),0<j&&H.length>j&&!H.warned){H.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+H.length+" "+(y+" listeners added. Use emitter.setMaxListeners() to increase limit"));X.name="MaxListenersExceededWarning",X.emitter=f,X.type=y,X.count=H.length,p(X)}return f}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(f,y,I){var M={fired:!1,wrapFn:void 0,target:f,type:y,listener:I},j=l.bind(M);return j.listener=I,M.wrapFn=j,j}function o(f,y,I){var M=f._events;if(M===void 0)return[];var j=M[y];return j===void 0?[]:typeof j=="function"?I?[j.listener||j]:[j]:I?U(j):C(j,j.length)}function _(f){var y=this._events;if(y!==void 0){var I=y[f];if(typeof I=="function")return 1;if(I!==void 0)return I.length}return 0}function C(f,y){for(var I=Array(y),M=0;M<y;++M)I[M]=f[M];return I}function A(f,y){for(;y+1<f.length;y++)f[y]=f[y+1];f.pop()}function U(f){for(var y=Array(f.length),I=0;I<y.length;++I)y[I]=f[I].listener||f[I];return y}function i(f,y,I){typeof f.on=="function"&&c(f,"error",y,I)}function c(f,y,I,M){if(typeof f.on=="function")M.once?f.once(y,I):f.on(y,I);else if(typeof f.addEventListener=="function")f.addEventListener(y,function j(q){M.once&&f.removeEventListener(y,j),I(q)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof f)}var u,g=typeof Reflect=="object"?Reflect:null,h=g&&typeof g.apply=="function"?g.apply:function(f,y,I){return Function.prototype.apply.call(f,y,I)};u=g&&typeof g.ownKeys=="function"?g.ownKeys:Object.getOwnPropertySymbols?function(f){return Object.getOwnPropertyNames(f).concat(Object.getOwnPropertySymbols(f))}:function(f){return Object.getOwnPropertyNames(f)};var w=Number.isNaN||function(f){return f!==f};T.exports=s,T.exports.once=function(f,y){return new Promise(function(I,M){function j(H){f.removeListener(y,q),M(H)}function q(){typeof f.removeListener=="function"&&f.removeListener("error",j),I([].slice.call(arguments))}c(f,y,q,{once:!0}),y!=="error"&&i(f,j,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var N=10;Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return N},set:function(f){if(typeof f!="number"||0>f||w(f))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+f+".");N=f}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(f){if(typeof f!="number"||0>f||w(f))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+f+".");return this._maxListeners=f,this},s.prototype.getMaxListeners=function(){return L(this)},s.prototype.emit=function(f){for(var y=[],I=1;I<arguments.length;I++)y.push(arguments[I]);var M=f==="error",j=this._events;if(j!==void 0)M=M&&j.error===void 0;else if(!M)return!1;if(M){var q;if(0<y.length&&(q=y[0]),q instanceof Error)throw q;var H=new Error("Unhandled error."+(q?" ("+q.message+")":""));throw H.context=q,H}var X=j[f];if(X===void 0)return!1;if(typeof X=="function")h(X,this,y);else for(var ee=X.length,F=C(X,ee),I=0;I<ee;++I)h(F[I],this,y);return!0},s.prototype.addListener=function(f,y){return n(this,f,y,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(f,y){return n(this,f,y,!0)},s.prototype.once=function(f,y){return v(y),this.on(f,d(this,f,y)),this},s.prototype.prependOnceListener=function(f,y){return v(y),this.prependListener(f,d(this,f,y)),this},s.prototype.removeListener=function(f,y){var I,M,j,q,H;if(v(y),M=this._events,M===void 0)return this;if(I=M[f],I===void 0)return this;if(I===y||I.listener===y)--this._eventsCount==0?this._events=Object.create(null):(delete M[f],M.removeListener&&this.emit("removeListener",f,I.listener||y));else if(typeof I!="function"){for(j=-1,q=I.length-1;0<=q;q--)if(I[q]===y||I[q].listener===y){H=I[q].listener,j=q;break}if(0>j)return this;j===0?I.shift():A(I,j),I.length===1&&(M[f]=I[0]),M.removeListener!==void 0&&this.emit("removeListener",f,H||y)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(f){var y,I,M;if(I=this._events,I===void 0)return this;if(I.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):I[f]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete I[f]),this;if(arguments.length===0){var j,q=Object.keys(I);for(M=0;M<q.length;++M)j=q[M],j!=="removeListener"&&this.removeAllListeners(j);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(y=I[f],typeof y=="function")this.removeListener(f,y);else if(y!==void 0)for(M=y.length-1;0<=M;M--)this.removeListener(f,y[M]);return this},s.prototype.listeners=function(f){return o(this,f,!0)},s.prototype.rawListeners=function(f){return o(this,f,!1)},s.listenerCount=function(f,y){return typeof f.listenerCount=="function"?f.listenerCount(y):_.call(f,y)},s.prototype.listenerCount=_,s.prototype.eventNames=function(){return 0<this._eventsCount?u(this._events):[]}},{}],8:[function(m,T){T.exports=function(){if(typeof globalThis>"u")return null;var p={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return p.RTCPeerConnection?p:null}},{}],9:[function(m,T,p){p.read=function(s,v,L,n,l){var d,o,_=8*l-n-1,C=(1<<_)-1,A=C>>1,U=-7,i=L?l-1:0,c=L?-1:1,u=s[v+i];for(i+=c,d=u&(1<<-U)-1,u>>=-U,U+=_;0<U;d=256*d+s[v+i],i+=c,U-=8);for(o=d&(1<<-U)-1,d>>=-U,U+=n;0<U;o=256*o+s[v+i],i+=c,U-=8);if(d===0)d=1-A;else{if(d===C)return o?NaN:(u?-1:1)*(1/0);o+=x(2,n),d-=A}return(u?-1:1)*o*x(2,d-n)},p.write=function(s,v,L,n,l,d){var o,_,C,A=Math.LN2,U=Math.log,i=8*d-l-1,c=(1<<i)-1,u=c>>1,g=l===23?x(2,-24)-x(2,-77):0,h=n?0:d-1,w=n?1:-1,N=0>v||v===0&&0>1/v?1:0;for(v=O(v),isNaN(v)||v===1/0?(_=isNaN(v)?1:0,o=c):(o=S(U(v)/A),1>v*(C=x(2,-o))&&(o--,C*=2),v+=1<=o+u?g/C:g*x(2,1-u),2<=v*C&&(o++,C/=2),o+u>=c?(_=0,o=c):1<=o+u?(_=(v*C-1)*x(2,l),o+=u):(_=v*x(2,u-1)*x(2,l),o=0));8<=l;s[L+h]=255&_,h+=w,_/=256,l-=8);for(o=o<<l|_,i+=l;0<i;s[L+h]=255&o,h+=w,o/=256,i-=8);s[L+h-w]|=128*N}},{}],10:[function(m,T){T.exports=typeof Object.create=="function"?function(p,s){s&&(p.super_=s,p.prototype=Object.create(s.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}))}:function(p,s){if(s){p.super_=s;var v=function(){};v.prototype=s.prototype,p.prototype=new v,p.prototype.constructor=p}}},{}],11:[function(m,T){var p=Math.round;function s(d){if(d+="",!(100<d.length)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(o){var _=parseFloat(o[1]),C=(o[2]||"ms").toLowerCase();return C==="years"||C==="year"||C==="yrs"||C==="yr"||C==="y"?315576e5*_:C==="weeks"||C==="week"||C==="w"?6048e5*_:C==="days"||C==="day"||C==="d"?864e5*_:C==="hours"||C==="hour"||C==="hrs"||C==="hr"||C==="h"?36e5*_:C==="minutes"||C==="minute"||C==="mins"||C==="min"||C==="m"?6e4*_:C==="seconds"||C==="second"||C==="secs"||C==="sec"||C==="s"?1e3*_:C==="milliseconds"||C==="millisecond"||C==="msecs"||C==="msec"||C==="ms"?_:void 0}}}function v(d){var o=O(d);return 864e5<=o?p(d/864e5)+"d":36e5<=o?p(d/36e5)+"h":6e4<=o?p(d/6e4)+"m":1e3<=o?p(d/1e3)+"s":d+"ms"}function L(d){var o=O(d);return 864e5<=o?n(d,o,864e5,"day"):36e5<=o?n(d,o,36e5,"hour"):6e4<=o?n(d,o,6e4,"minute"):1e3<=o?n(d,o,1e3,"second"):d+" ms"}function n(d,o,_,C){return p(d/_)+" "+C+(o>=1.5*_?"s":"")}var l=24*(60*6e4);T.exports=function(d,o){o=o||{};var _=typeof d;if(_=="string"&&0<d.length)return s(d);if(_==="number"&&isFinite(d))return o.long?L(d):v(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))}},{}],12:[function(m,T){function p(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function v(g){if(_===setTimeout)return setTimeout(g,0);if((_===p||!_)&&setTimeout)return _=setTimeout,setTimeout(g,0);try{return _(g,0)}catch{try{return _.call(null,g,0)}catch{return _.call(this,g,0)}}}function L(g){if(C===clearTimeout)return clearTimeout(g);if((C===s||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(g);try{return C(g)}catch{try{return C.call(null,g)}catch{return C.call(this,g)}}}function n(){c&&U&&(c=!1,U.length?i=U.concat(i):u=-1,i.length&&l())}function l(){if(!c){var g=v(n);c=!0;for(var h=i.length;h;){for(U=i,i=[];++u<h;)U&&U[u].run();u=-1,h=i.length}U=null,c=!1,L(g)}}function d(g,h){this.fun=g,this.array=h}function o(){}var _,C,A=T.exports={};(function(){try{_=typeof setTimeout=="function"?setTimeout:p}catch{_=p}try{C=typeof clearTimeout=="function"?clearTimeout:s}catch{C=s}})();var U,i=[],c=!1,u=-1;A.nextTick=function(g){var h=Array(arguments.length-1);if(1<arguments.length)for(var w=1;w<arguments.length;w++)h[w-1]=arguments[w];i.push(new d(g,h)),i.length!==1||c||v(l)},d.prototype.run=function(){this.fun.apply(null,this.array)},A.title="browser",A.browser=!0,A.env={},A.argv=[],A.version="",A.versions={},A.on=o,A.addListener=o,A.once=o,A.off=o,A.removeListener=o,A.removeAllListeners=o,A.emit=o,A.prependListener=o,A.prependOnceListener=o,A.listeners=function(){return[]},A.binding=function(){throw new Error("process.binding is not supported")},A.cwd=function(){return"/"},A.chdir=function(){throw new Error("process.chdir is not supported")},A.umask=function(){return 0}},{}],13:[function(m,T){(function(p){(function(){let s;T.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window>"u"?p:window):v=>(s||(s=Promise.resolve())).then(v).catch(L=>setTimeout(()=>{throw L},0))}).call(this)}).call(this,typeof global>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:global)},{}],14:[function(m,T){(function(p,s){(function(){"use strict";var v=m("safe-buffer").Buffer,L=s.crypto||s.msCrypto;T.exports=L&&L.getRandomValues?function(n,l){if(n>4294967295)throw new RangeError("requested too many random bytes");var d=v.allocUnsafe(n);if(0<n)if(65536<n)for(var o=0;o<n;o+=65536)L.getRandomValues(d.slice(o,o+65536));else L.getRandomValues(d);return typeof l=="function"?p.nextTick(function(){l(null,d)}):d}:function(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
-
Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,m("_process"),typeof global>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:global)},{_process:12,"safe-buffer":30}],15:[function(m,T){"use strict";function p(o,_){o.prototype=Object.create(_.prototype),o.prototype.constructor=o,o.__proto__=_}function s(o,_,C){function A(i,c,u){return typeof _=="string"?_:_(i,c,u)}C||(C=Error);var U=(function(i){function c(u,g,h){return i.call(this,A(u,g,h))||this}return p(c,i),c})(C);U.prototype.name=C.name,U.prototype.code=o,d[o]=U}function v(o,_){if(Array.isArray(o)){var C=o.length;return o=o.map(function(A){return A+""}),2<C?"one of ".concat(_," ").concat(o.slice(0,C-1).join(", "),", or ")+o[C-1]:C===2?"one of ".concat(_," ").concat(o[0]," or ").concat(o[1]):"of ".concat(_," ").concat(o[0])}return"of ".concat(_," ").concat(o+"")}function L(o,_,C){return o.substr(!C||0>C?0:+C,_.length)===_}function n(o,_,C){return(C===void 0||C>o.length)&&(C=o.length),o.substring(C-_.length,C)===_}function l(o,_,C){return typeof C!="number"&&(C=0),!(C+_.length>o.length)&&o.indexOf(_,C)!==-1}var d={};s("ERR_INVALID_OPT_VALUE",function(o,_){return'The value "'+_+'" is invalid for option "'+o+'"'},TypeError),s("ERR_INVALID_ARG_TYPE",function(o,_,C){var A;typeof _=="string"&&L(_,"not ")?(A="must not be",_=_.replace(/^not /,"")):A="must be";var U;if(n(o," argument"))U="The ".concat(o," ").concat(A," ").concat(v(_,"type"));else{var i=l(o,".")?"property":"argument";U='The "'.concat(o,'" ').concat(i," ").concat(A," ").concat(v(_,"type"))}return U+=". Received type ".concat(typeof C),U},TypeError),s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),s("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),s("ERR_STREAM_PREMATURE_CLOSE","Premature close"),s("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),s("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),s("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),s("ERR_STREAM_WRITE_AFTER_END","write after end"),s("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),s("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),T.exports.codes=d},{}],16:[function(m,T){(function(p){(function(){"use strict";function s(A){return this instanceof s?(l.call(this,A),d.call(this,A),this.allowHalfOpen=!0,void(A&&(A.readable===!1&&(this.readable=!1),A.writable===!1&&(this.writable=!1),A.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",v))))):new s(A)}function v(){this._writableState.ended||p.nextTick(L,this)}function L(A){A.end()}var n=Object.keys||function(A){var U=[];for(var i in A)U.push(i);return U};T.exports=s;var l=m("./_stream_readable"),d=m("./_stream_writable");m("inherits")(s,l);for(var o,_=n(d.prototype),C=0;C<_.length;C++)o=_[C],s.prototype[o]||(s.prototype[o]=d.prototype[o]);Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(A){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=A,this._writableState.destroyed=A)}})}).call(this)}).call(this,m("_process"))},{"./_stream_readable":18,"./_stream_writable":20,_process:12,inherits:10}],17:[function(m,T){"use strict";function p(v){return this instanceof p?void s.call(this,v):new p(v)}T.exports=p;var s=m("./_stream_transform");m("inherits")(p,s),p.prototype._transform=function(v,L,n){n(null,v)}},{"./_stream_transform":19,inherits:10}],18:[function(m,T){(function(p,s){(function(){"use strict";function v(e){return K.from(e)}function L(e){return K.isBuffer(e)||e instanceof $}function n(e,t,r){return typeof e.prependListener=="function"?e.prependListener(t,r):void(e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r))}function l(e,t,r){ee=ee||m("./_stream_duplex"),e=e||{},typeof r!="boolean"&&(r=t instanceof ee),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Te(this,e,"readableHighWaterMark",r),this.buffer=new Se,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(!se&&(se=m("string_decoder/").StringDecoder),this.decoder=new se(e.encoding),this.encoding=e.encoding)}function d(e){if(ee=ee||m("./_stream_duplex"),!(this instanceof d))return new d(e);var t=this instanceof ee;this._readableState=new l(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),ce.call(this)}function o(e,t,r,a,E){F("readableAddChunk",t);var R=e._readableState;if(t===null)R.reading=!1,i(e,R);else{var P;if(E||(P=C(R,t)),P)B(e,P);else if(!(R.objectMode||t&&0<t.length))a||(R.reading=!1,g(e,R));else if(typeof t=="string"||R.objectMode||Object.getPrototypeOf(t)===K.prototype||(t=v(t)),a)R.endEmitted?B(e,new D):_(e,R,t,!0);else if(R.ended)B(e,new b);else{if(R.destroyed)return!1;R.reading=!1,R.decoder&&!r?(t=R.decoder.write(t),R.objectMode||t.length!==0?_(e,R,t,!1):g(e,R)):_(e,R,t,!1)}}return!R.ended&&(R.length<R.highWaterMark||R.length===0)}function _(e,t,r,a){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,a?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&c(e)),g(e,t)}function C(e,t){var r;return L(t)||typeof t=="string"||t===void 0||e.objectMode||(r=new oe("chunk",["string","Buffer","Uint8Array"],t)),r}function A(e){return 1073741824<=e?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function U(e,t){return 0>=e||t.length===0&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=A(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}function i(e,t){if(F("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?c(e):(t.needReadable=!1,!t.emittedReadable&&(t.emittedReadable=!0,u(e)))}}function c(e){var t=e._readableState;F("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(F("emitReadable",t.flowing),t.emittedReadable=!0,p.nextTick(u,e))}function u(e){var t=e._readableState;F("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,M(e)}function g(e,t){t.readingMore||(t.readingMore=!0,p.nextTick(h,e,t))}function h(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(F("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function w(e){return function(){var t=e._readableState;F("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&le(e,"data")&&(t.flowing=!0,M(e))}}function N(e){var t=e._readableState;t.readableListening=0<e.listenerCount("readable"),t.resumeScheduled&&!t.paused?t.flowing=!0:0<e.listenerCount("data")&&e.resume()}function f(e){F("readable nexttick read 0"),e.read(0)}function y(e,t){t.resumeScheduled||(t.resumeScheduled=!0,p.nextTick(I,e,t))}function I(e,t){F("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(F("flow",t.flowing);t.flowing&&e.read()!==null;);}function j(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):t.buffer.length===1?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function q(e){var t=e._readableState;F("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,p.nextTick(H,t,e))}function H(e,t){if(F("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function X(e,t){for(var r=0,a=e.length;r<a;r++)if(e[r]===t)return r;return-1}T.exports=d;var ee;d.ReadableState=l;var F,Ie=m("events").EventEmitter,le=function(e,t){return e.listeners(t).length},ce=m("./internal/streams/stream"),K=m("buffer").Buffer,$=s.Uint8Array||function(){},he=m("util");F=he&&he.debuglog?he.debuglog("stream"):function(){};var se,de,ge,Se=m("./internal/streams/buffer_list"),ue=m("./internal/streams/destroy"),Re=m("./internal/streams/state"),Te=Re.getHighWaterMark,te=m("../errors").codes,oe=te.ERR_INVALID_ARG_TYPE,b=te.ERR_STREAM_PUSH_AFTER_EOF,k=te.ERR_METHOD_NOT_IMPLEMENTED,D=te.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;m("inherits")(d,ce);var B=ue.errorOrDestroy,V=["error","close","destroy","pause","resume"];Object.defineProperty(d.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),d.prototype.destroy=ue.destroy,d.prototype._undestroy=ue.undestroy,d.prototype._destroy=function(e,t){t(e)},d.prototype.push=function(e,t){var r,a=this._readableState;return a.objectMode?r=!0:typeof e=="string"&&(t=t||a.defaultEncoding,t!==a.encoding&&(e=K.from(e,t),t=""),r=!0),o(this,e,t,!1,r)},d.prototype.unshift=function(e){return o(this,e,null,!0,!1)},d.prototype.isPaused=function(){return this._readableState.flowing===!1},d.prototype.setEncoding=function(e){se||(se=m("string_decoder/").StringDecoder);var t=new se(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,a="";r!==null;)a+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),a!==""&&this._readableState.buffer.push(a),this._readableState.length=a.length,this},d.prototype.read=function(e){F("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark===0?0<t.length:t.length>=t.highWaterMark)||t.ended))return F("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?q(this):c(this),null;if(e=U(e,t),e===0&&t.ended)return t.length===0&&q(this),null;var a=t.needReadable;F("need readable",a),(t.length===0||t.length-e<t.highWaterMark)&&(a=!0,F("length less than watermark",a)),t.ended||t.reading?(a=!1,F("reading or ended",a)):a&&(F("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,!t.reading&&(e=U(r,t)));var E;return E=0<e?j(e,t):null,E===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(!t.ended&&(t.needReadable=!0),r!==e&&t.ended&&q(this)),E!==null&&this.emit("data",E),E},d.prototype._read=function(){B(this,new k("_read()"))},d.prototype.pipe=function(e,t){function r(_e,we){F("onunpipe"),_e===Y&&we&&we.hasUnpiped===!1&&(we.hasUnpiped=!0,E())}function a(){F("onend"),e.end()}function E(){F("cleanup"),e.removeListener("close",W),e.removeListener("finish",J),e.removeListener("drain",be),e.removeListener("error",P),e.removeListener("unpipe",r),Y.removeListener("end",a),Y.removeListener("end",G),Y.removeListener("data",R),ft=!0,z.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&be()}function R(_e){F("ondata");var we=e.write(_e);F("dest.write",we),we===!1&&((z.pipesCount===1&&z.pipes===e||1<z.pipesCount&&X(z.pipes,e)!==-1)&&!ft&&(F("false write response, pause",z.awaitDrain),z.awaitDrain++),Y.pause())}function P(_e){F("onerror",_e),G(),e.removeListener("error",P),le(e,"error")===0&&B(e,_e)}function W(){e.removeListener("finish",J),G()}function J(){F("onfinish"),e.removeListener("close",W),G()}function G(){F("unpipe"),Y.unpipe(e)}var Y=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=e;break;case 1:z.pipes=[z.pipes,e];break;default:z.pipes.push(e)}z.pipesCount+=1,F("pipe count=%d opts=%j",z.pipesCount,t);var me=(!t||t.end!==!1)&&e!==p.stdout&&e!==p.stderr,Ae=me?a:G;z.endEmitted?p.nextTick(Ae):Y.once("end",Ae),e.on("unpipe",r);var be=w(Y);e.on("drain",be);var ft=!1;return Y.on("data",R),n(e,"error",P),e.once("close",W),e.once("finish",J),e.emit("pipe",Y),z.flowing||(F("pipe resume"),Y.resume()),e},d.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var a=t.pipes,E=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var R=0;R<E;R++)a[R].emit("unpipe",this,{hasUnpiped:!1});return this}var P=X(t.pipes,e);return P===-1?this:(t.pipes.splice(P,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},d.prototype.on=function(e,t){var r=ce.prototype.on.call(this,e,t),a=this._readableState;return e==="data"?(a.readableListening=0<this.listenerCount("readable"),a.flowing!==!1&&this.resume()):e=="readable"&&!a.endEmitted&&!a.readableListening&&(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,F("on readable",a.length,a.reading),a.length?c(this):!a.reading&&p.nextTick(f,this)),r},d.prototype.addListener=d.prototype.on,d.prototype.removeListener=function(e,t){var r=ce.prototype.removeListener.call(this,e,t);return e==="readable"&&p.nextTick(N,this),r},d.prototype.removeAllListeners=function(e){var t=ce.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&p.nextTick(N,this),t},d.prototype.resume=function(){var e=this._readableState;return e.flowing||(F("resume"),e.flowing=!e.readableListening,y(this,e)),e.paused=!1,this},d.prototype.pause=function(){return F("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(F("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},d.prototype.wrap=function(e){var t=this,r=this._readableState,a=!1;for(var E in e.on("end",function(){if(F("wrapped end"),r.decoder&&!r.ended){var P=r.decoder.end();P&&P.length&&t.push(P)}t.push(null)}),e.on("data",function(P){if(F("wrapped data"),r.decoder&&(P=r.decoder.write(P)),!(r.objectMode&&P==null)&&(r.objectMode||P&&P.length)){var W=t.push(P);W||(a=!0,e.pause())}}),e)this[E]===void 0&&typeof e[E]=="function"&&(this[E]=(function(P){return function(){return e[P].apply(e,arguments)}})(E));for(var R=0;R<V.length;R++)e.on(V[R],this.emit.bind(this,V[R]));return this._read=function(P){F("wrapped _read",P),a&&(a=!1,e.resume())},this},typeof Symbol=="function"&&(d.prototype[Symbol.asyncIterator]=function(){return de===void 0&&(de=m("./internal/streams/async_iterator")),de(this)}),Object.defineProperty(d.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(d.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(d.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),d._fromList=j,Object.defineProperty(d.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(d.from=function(e,t){return ge===void 0&&(ge=m("./internal/streams/from")),ge(d,e,t)})}).call(this)}).call(this,m("_process"),typeof global>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:global)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(m,T){"use strict";function p(A,U){var i=this._transformState;i.transforming=!1;var c=i.writecb;if(c===null)return this.emit("error",new d);i.writechunk=null,i.writecb=null,U!=null&&this.push(U),c(A);var u=this._readableState;u.reading=!1,(u.needReadable||u.length<u.highWaterMark)&&this._read(u.highWaterMark)}function s(A){return this instanceof s?(C.call(this,A),this._transformState={afterTransform:p.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,A&&(typeof A.transform=="function"&&(this._transform=A.transform),typeof A.flush=="function"&&(this._flush=A.flush)),void this.on("prefinish",v)):new s(A)}function v(){var A=this;typeof this._flush!="function"||this._readableState.destroyed?L(this,null,null):this._flush(function(U,i){L(A,U,i)})}function L(A,U,i){if(U)return A.emit("error",U);if(i!=null&&A.push(i),A._writableState.length)throw new _;if(A._transformState.transforming)throw new o;return A.push(null)}T.exports=s;var n=m("../errors").codes,l=n.ERR_METHOD_NOT_IMPLEMENTED,d=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,_=n.ERR_TRANSFORM_WITH_LENGTH_0,C=m("./_stream_duplex");m("inherits")(s,C),s.prototype.push=function(A,U){return this._transformState.needTransform=!1,C.prototype.push.call(this,A,U)},s.prototype._transform=function(A,U,i){i(new l("_transform()"))},s.prototype._write=function(A,U,i){var c=this._transformState;if(c.writecb=i,c.writechunk=A,c.writeencoding=U,!c.transforming){var u=this._readableState;(c.needTransform||u.needReadable||u.length<u.highWaterMark)&&this._read(u.highWaterMark)}},s.prototype._read=function(){var A=this._transformState;A.writechunk===null||A.transforming?A.needTransform=!0:(A.transforming=!0,this._transform(A.writechunk,A.writeencoding,A.afterTransform))},s.prototype._destroy=function(A,U){C.prototype._destroy.call(this,A,function(i){U(i)})}},{"../errors":15,"./_stream_duplex":16,inherits:10}],20:[function(m,T){(function(p,s){(function(){"use strict";function v(b){var k=this;this.next=null,this.entry=null,this.finish=function(){q(k,b)}}function L(b){return F.from(b)}function n(b){return F.isBuffer(b)||b instanceof Ie}function l(){}function d(b,k,D){H=H||m("./_stream_duplex"),b=b||{},typeof D!="boolean"&&(D=k instanceof H),this.objectMode=!!b.objectMode,D&&(this.objectMode=this.objectMode||!!b.writableObjectMode),this.highWaterMark=K(this,b,"writableHighWaterMark",D),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var B=b.decodeStrings===!1;this.decodeStrings=!B,this.defaultEncoding=b.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(V){g(k,V)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=b.emitClose!==!1,this.autoDestroy=!!b.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new v(this)}function o(b){H=H||m("./_stream_duplex");var k=this instanceof H;return k||oe.call(o,this)?(this._writableState=new d(b,this,k),this.writable=!0,b&&(typeof b.write=="function"&&(this._write=b.write),typeof b.writev=="function"&&(this._writev=b.writev),typeof b.destroy=="function"&&(this._destroy=b.destroy),typeof b.final=="function"&&(this._final=b.final)),void ee.call(this)):new o(b)}function _(b,k){var D=new Re;te(b,D),p.nextTick(k,D)}function C(b,k,D,B){var V;return D===null?V=new ue:typeof D!="string"&&!k.objectMode&&(V=new he("chunk",["string","Buffer"],D)),!V||(te(b,V),p.nextTick(B,V),!1)}function A(b,k,D){return b.objectMode||b.decodeStrings===!1||typeof k!="string"||(k=F.from(k,D)),k}function U(b,k,D,B,V,e){if(!D){var t=A(k,B,V);B!==t&&(D=!0,V="buffer",B=t)}var r=k.objectMode?1:B.length;k.length+=r;var a=k.length<k.highWaterMark;if(a||(k.needDrain=!0),k.writing||k.corked){var E=k.lastBufferedRequest;k.lastBufferedRequest={chunk:B,encoding:V,isBuf:D,callback:e,next:null},E?E.next=k.lastBufferedRequest:k.bufferedRequest=k.lastBufferedRequest,k.bufferedRequestCount+=1}else i(b,k,!1,r,B,V,e);return a}function i(b,k,D,B,V,e,t){k.writelen=B,k.writecb=t,k.writing=!0,k.sync=!0,k.destroyed?k.onwrite(new Se("write")):D?b._writev(V,k.onwrite):b._write(V,e,k.onwrite),k.sync=!1}function c(b,k,D,B,V){--k.pendingcb,D?(p.nextTick(V,B),p.nextTick(M,b,k),b._writableState.errorEmitted=!0,te(b,B)):(V(B),b._writableState.errorEmitted=!0,te(b,B),M(b,k))}function u(b){b.writing=!1,b.writecb=null,b.length-=b.writelen,b.writelen=0}function g(b,k){var D=b._writableState,B=D.sync,V=D.writecb;if(typeof V!="function")throw new de;if(u(D),k)c(b,D,B,k,V);else{var e=f(D)||b.destroyed;e||D.corked||D.bufferProcessing||!D.bufferedRequest||N(b,D),B?p.nextTick(h,b,D,e,V):h(b,D,e,V)}}function h(b,k,D,B){D||w(b,k),k.pendingcb--,B(),M(b,k)}function w(b,k){k.length===0&&k.needDrain&&(k.needDrain=!1,b.emit("drain"))}function N(b,k){k.bufferProcessing=!0;var D=k.bufferedRequest;if(b._writev&&D&&D.next){var B=k.bufferedRequestCount,V=Array(B),e=k.corkedRequestsFree;e.entry=D;for(var t=0,r=!0;D;)V[t]=D,D.isBuf||(r=!1),D=D.next,t+=1;V.allBuffers=r,i(b,k,!0,k.length,V,"",e.finish),k.pendingcb++,k.lastBufferedRequest=null,e.next?(k.corkedRequestsFree=e.next,e.next=null):k.corkedRequestsFree=new v(k),k.bufferedRequestCount=0}else{for(;D;){var a=D.chunk,E=D.encoding,R=D.callback,P=k.objectMode?1:a.length;if(i(b,k,!1,P,a,E,R),D=D.next,k.bufferedRequestCount--,k.writing)break}D===null&&(k.lastBufferedRequest=null)}k.bufferedRequest=D,k.bufferProcessing=!1}function f(b){return b.ending&&b.length===0&&b.bufferedRequest===null&&!b.finished&&!b.writing}function y(b,k){b._final(function(D){k.pendingcb--,D&&te(b,D),k.prefinished=!0,b.emit("prefinish"),M(b,k)})}function I(b,k){k.prefinished||k.finalCalled||(typeof b._final!="function"||k.destroyed?(k.prefinished=!0,b.emit("prefinish")):(k.pendingcb++,k.finalCalled=!0,p.nextTick(y,b,k)))}function M(b,k){var D=f(k);if(D&&(I(b,k),k.pendingcb===0&&(k.finished=!0,b.emit("finish"),k.autoDestroy))){var B=b._readableState;(!B||B.autoDestroy&&B.endEmitted)&&b.destroy()}return D}function j(b,k,D){k.ending=!0,M(b,k),D&&(k.finished?p.nextTick(D):b.once("finish",D)),k.ended=!0,b.writable=!1}function q(b,k,D){var B=b.entry;for(b.entry=null;B;){var V=B.callback;k.pendingcb--,V(D),B=B.next}k.corkedRequestsFree.next=b}T.exports=o;var H;o.WritableState=d;var X={deprecate:m("util-deprecate")},ee=m("./internal/streams/stream"),F=m("buffer").Buffer,Ie=s.Uint8Array||function(){},le=m("./internal/streams/destroy"),ce=m("./internal/streams/state"),K=ce.getHighWaterMark,$=m("../errors").codes,he=$.ERR_INVALID_ARG_TYPE,se=$.ERR_METHOD_NOT_IMPLEMENTED,de=$.ERR_MULTIPLE_CALLBACK,ge=$.ERR_STREAM_CANNOT_PIPE,Se=$.ERR_STREAM_DESTROYED,ue=$.ERR_STREAM_NULL_VALUES,Re=$.ERR_STREAM_WRITE_AFTER_END,Te=$.ERR_UNKNOWN_ENCODING,te=le.errorOrDestroy;m("inherits")(o,ee),d.prototype.getBuffer=function(){for(var b=this.bufferedRequest,k=[];b;)k.push(b),b=b.next;return k},(function(){try{Object.defineProperty(d.prototype,"buffer",{get:X.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var oe;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(oe=Function.prototype[Symbol.hasInstance],Object.defineProperty(o,Symbol.hasInstance,{value:function(b){return!!oe.call(this,b)||this===o&&b&&b._writableState instanceof d}})):oe=function(b){return b instanceof this},o.prototype.pipe=function(){te(this,new ge)},o.prototype.write=function(b,k,D){var B=this._writableState,V=!1,e=!B.objectMode&&n(b);return e&&!F.isBuffer(b)&&(b=L(b)),typeof k=="function"&&(D=k,k=null),e?k="buffer":!k&&(k=B.defaultEncoding),typeof D!="function"&&(D=l),B.ending?_(this,D):(e||C(this,B,b,D))&&(B.pendingcb++,V=U(this,B,e,b,k,D)),V},o.prototype.cork=function(){this._writableState.corked++},o.prototype.uncork=function(){var b=this._writableState;b.corked&&(b.corked--,!b.writing&&!b.corked&&!b.bufferProcessing&&b.bufferedRequest&&N(this,b))},o.prototype.setDefaultEncoding=function(b){if(typeof b=="string"&&(b=b.toLowerCase()),!(-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((b+"").toLowerCase())))throw new Te(b);return this._writableState.defaultEncoding=b,this},Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),o.prototype._write=function(b,k,D){D(new se("_write()"))},o.prototype._writev=null,o.prototype.end=function(b,k,D){var B=this._writableState;return typeof b=="function"?(D=b,b=null,k=null):typeof k=="function"&&(D=k,k=null),b!=null&&this.write(b,k),B.corked&&(B.corked=1,this.uncork()),B.ending||j(this,B,D),this},Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(b){this._writableState&&(this._writableState.destroyed=b)}}),o.prototype.destroy=le.destroy,o.prototype._undestroy=le.undestroy,o.prototype._destroy=function(b,k){k(b)}}).call(this)}).call(this,m("_process"),typeof global>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:global)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(m,T){(function(p){(function(){"use strict";function s(w,N,f){return N in w?Object.defineProperty(w,N,{value:f,enumerable:!0,configurable:!0,writable:!0}):w[N]=f,w}function v(w,N){return{value:w,done:N}}function L(w){var N=w[_];if(N!==null){var f=w[u].read();f!==null&&(w[i]=null,w[_]=null,w[C]=null,N(v(f,!1)))}}function n(w){p.nextTick(L,w)}function l(w,N){return function(f,y){w.then(function(){return N[U]?void f(v(void 0,!0)):void N[c](f,y)},y)}}var d,o=m("./end-of-stream"),_=Symbol("lastResolve"),C=Symbol("lastReject"),A=Symbol("error"),U=Symbol("ended"),i=Symbol("lastPromise"),c=Symbol("handlePromise"),u=Symbol("stream"),g=Object.getPrototypeOf(function(){}),h=Object.setPrototypeOf((d={get stream(){return this[u]},next:function(){var w=this,N=this[A];if(N!==null)return Promise.reject(N);if(this[U])return Promise.resolve(v(void 0,!0));if(this[u].destroyed)return new Promise(function(M,j){p.nextTick(function(){w[A]?j(w[A]):M(v(void 0,!0))})});var f,y=this[i];if(y)f=new Promise(l(y,this));else{var I=this[u].read();if(I!==null)return Promise.resolve(v(I,!1));f=new Promise(this[c])}return this[i]=f,f}},s(d,Symbol.asyncIterator,function(){return this}),s(d,"return",function(){var w=this;return new Promise(function(N,f){w[u].destroy(null,function(y){return y?void f(y):void N(v(void 0,!0))})})}),d),g);T.exports=function(w){var N,f=Object.create(h,(N={},s(N,u,{value:w,writable:!0}),s(N,_,{value:null,writable:!0}),s(N,C,{value:null,writable:!0}),s(N,A,{value:null,writable:!0}),s(N,U,{value:w._readableState.endEmitted,writable:!0}),s(N,c,{value:function(y,I){var M=f[u].read();M?(f[i]=null,f[_]=null,f[C]=null,y(v(M,!1))):(f[_]=y,f[C]=I)},writable:!0}),N));return f[i]=null,o(w,function(y){if(y&&y.code!=="ERR_STREAM_PREMATURE_CLOSE"){var I=f[C];return I!==null&&(f[i]=null,f[_]=null,f[C]=null,I(y)),void(f[A]=y)}var M=f[_];M!==null&&(f[i]=null,f[_]=null,f[C]=null,M(v(void 0,!0))),f[U]=!0}),w.on("readable",n.bind(null,f)),f}}).call(this)}).call(this,m("_process"))},{"./end-of-stream":24,_process:12}],22:[function(m,T){"use strict";function p(i,c){var u=Object.keys(i);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(i);c&&(g=g.filter(function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable})),u.push.apply(u,g)}return u}function s(i){for(var c,u=1;u<arguments.length;u++)c=arguments[u]==null?{}:arguments[u],u%2?p(Object(c),!0).forEach(function(g){v(i,g,c[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(c)):p(Object(c)).forEach(function(g){Object.defineProperty(i,g,Object.getOwnPropertyDescriptor(c,g))});return i}function v(i,c,u){return c in i?Object.defineProperty(i,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[c]=u,i}function L(i,c){if(!(i instanceof c))throw new TypeError("Cannot call a class as a function")}function n(i,c){for(var u,g=0;g<c.length;g++)u=c[g],u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}function l(i,c,u){return c&&n(i.prototype,c),u&&n(i,u),i}function d(i,c,u){_.prototype.copy.call(i,c,u)}var o=m("buffer"),_=o.Buffer,C=m("util"),A=C.inspect,U=A&&A.custom||"inspect";T.exports=(function(){function i(){L(this,i),this.head=null,this.tail=null,this.length=0}return l(i,[{key:"push",value:function(c){var u={data:c,next:null};0<this.length?this.tail.next=u:this.head=u,this.tail=u,++this.length}},{key:"unshift",value:function(c){var u={data:c,next:this.head};this.length===0&&(this.tail=u),this.head=u,++this.length}},{key:"shift",value:function(){if(this.length!==0){var c=this.head.data;return this.head=this.length===1?this.tail=null:this.head.next,--this.length,c}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(c){if(this.length===0)return"";for(var u=this.head,g=""+u.data;u=u.next;)g+=c+u.data;return g}},{key:"concat",value:function(c){if(this.length===0)return _.alloc(0);for(var u=_.allocUnsafe(c>>>0),g=this.head,h=0;g;)d(g.data,u,h),h+=g.data.length,g=g.next;return u}},{key:"consume",value:function(c,u){var g;return c<this.head.data.length?(g=this.head.data.slice(0,c),this.head.data=this.head.data.slice(c)):c===this.head.data.length?g=this.shift():g=u?this._getString(c):this._getBuffer(c),g}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(c){var u=this.head,g=1,h=u.data;for(c-=h.length;u=u.next;){var w=u.data,N=c>w.length?w.length:c;if(h+=N===w.length?w:w.slice(0,c),c-=N,c===0){N===w.length?(++g,this.head=u.next?u.next:this.tail=null):(this.head=u,u.data=w.slice(N));break}++g}return this.length-=g,h}},{key:"_getBuffer",value:function(c){var u=_.allocUnsafe(c),g=this.head,h=1;for(g.data.copy(u),c-=g.data.length;g=g.next;){var w=g.data,N=c>w.length?w.length:c;if(w.copy(u,u.length-c,0,N),c-=N,c===0){N===w.length?(++h,this.head=g.next?g.next:this.tail=null):(this.head=g,g.data=w.slice(N));break}++h}return this.length-=h,u}},{key:U,value:function(c,u){return A(this,s({},u,{depth:0,customInspect:!1}))}}]),i})()},{buffer:3,util:2}],23:[function(m,T){(function(p){(function(){"use strict";function s(n,l){L(n,l),v(n)}function v(n){n._writableState&&!n._writableState.emitClose||n._readableState&&!n._readableState.emitClose||n.emit("close")}function L(n,l){n.emit("error",l)}T.exports={destroy:function(n,l){var d=this,o=this._readableState&&this._readableState.destroyed,_=this._writableState&&this._writableState.destroyed;return o||_?(l?l(n):n&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,p.nextTick(L,this,n)):p.nextTick(L,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,function(C){!l&&C?d._writableState?d._writableState.errorEmitted?p.nextTick(v,d):(d._writableState.errorEmitted=!0,p.nextTick(s,d,C)):p.nextTick(s,d,C):l?(p.nextTick(v,d),l(C)):p.nextTick(v,d)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(n,l){var d=n._readableState,o=n._writableState;d&&d.autoDestroy||o&&o.autoDestroy?n.destroy(l):n.emit("error",l)}}}).call(this)}).call(this,m("_process"))},{_process:12}],24:[function(m,T){"use strict";function p(l){var d=!1;return function(){if(!d){d=!0;for(var o=arguments.length,_=Array(o),C=0;C<o;C++)_[C]=arguments[C];l.apply(this,_)}}}function s(){}function v(l){return l.setHeader&&typeof l.abort=="function"}function L(l,d,o){if(typeof d=="function")return L(l,null,d);d||(d={}),o=p(o||s);var _=d.readable||d.readable!==!1&&l.readable,C=d.writable||d.writable!==!1&&l.writable,A=function(){l.writable||i()},U=l._writableState&&l._writableState.finished,i=function(){C=!1,U=!0,_||o.call(l)},c=l._readableState&&l._readableState.endEmitted,u=function(){_=!1,c=!0,C||o.call(l)},g=function(N){o.call(l,N)},h=function(){var N;return _&&!c?(l._readableState&&l._readableState.ended||(N=new n),o.call(l,N)):C&&!U?(l._writableState&&l._writableState.ended||(N=new n),o.call(l,N)):void 0},w=function(){l.req.on("finish",i)};return v(l)?(l.on("complete",i),l.on("abort",h),l.req?w():l.on("request",w)):C&&!l._writableState&&(l.on("end",A),l.on("close",A)),l.on("end",u),l.on("finish",i),d.error!==!1&&l.on("error",g),l.on("close",h),function(){l.removeListener("complete",i),l.removeListener("abort",h),l.removeListener("request",w),l.req&&l.req.removeListener("finish",i),l.removeListener("end",A),l.removeListener("close",A),l.removeListener("finish",i),l.removeListener("end",u),l.removeListener("error",g),l.removeListener("close",h)}}var n=m("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;T.exports=L},{"../../../errors":15}],25:[function(m,T){T.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],26:[function(m,T){"use strict";function p(U){var i=!1;return function(){i||(i=!0,U.apply(void 0,arguments))}}function s(U){if(U)throw U}function v(U){return U.setHeader&&typeof U.abort=="function"}function L(U,i,c,u){u=p(u);var g=!1;U.on("close",function(){g=!0}),o===void 0&&(o=m("./end-of-stream")),o(U,{readable:i,writable:c},function(w){return w?u(w):(g=!0,void u())});var h=!1;return function(w){if(!g)return h?void 0:(h=!0,v(U)?U.abort():typeof U.destroy=="function"?U.destroy():void u(w||new A("pipe")))}}function n(U){U()}function l(U,i){return U.pipe(i)}function d(U){return U.length&&typeof U[U.length-1]=="function"?U.pop():s}var o,_=m("../../../errors").codes,C=_.ERR_MISSING_ARGS,A=_.ERR_STREAM_DESTROYED;T.exports=function(){for(var U=arguments.length,i=Array(U),c=0;c<U;c++)i[c]=arguments[c];var u=d(i);if(Array.isArray(i[0])&&(i=i[0]),2>i.length)throw new C("streams");var g,h=i.map(function(w,N){var f=N<i.length-1;return L(w,f,0<N,function(y){g||(g=y),y&&h.forEach(n),f||(h.forEach(n),u(g))})});return i.reduce(l)}},{"../../../errors":15,"./end-of-stream":24}],27:[function(m,T){"use strict";function p(v,L,n){return v.highWaterMark==null?L?v[n]:null:v.highWaterMark}var s=m("../../../errors").codes.ERR_INVALID_OPT_VALUE;T.exports={getHighWaterMark:function(v,L,n,l){var d=p(L,l,n);if(d!=null){if(!(isFinite(d)&&S(d)===d)||0>d){var o=l?n:"highWaterMark";throw new s(o,d)}return S(d)}return v.objectMode?16:16384}}},{"../../../errors":15}],28:[function(m,T){T.exports=m("events").EventEmitter},{events:7}],29:[function(m,T,p){p=T.exports=m("./lib/_stream_readable.js"),p.Stream=p,p.Readable=p,p.Writable=m("./lib/_stream_writable.js"),p.Duplex=m("./lib/_stream_duplex.js"),p.Transform=m("./lib/_stream_transform.js"),p.PassThrough=m("./lib/_stream_passthrough.js"),p.finished=m("./lib/internal/streams/end-of-stream.js"),p.pipeline=m("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(m,T,p){function s(l,d){for(var o in l)d[o]=l[o]}function v(l,d,o){return n(l,d,o)}var L=m("buffer"),n=L.Buffer;n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?T.exports=L:(s(L,p),p.Buffer=v),v.prototype=Object.create(n.prototype),s(n,v),v.from=function(l,d,o){if(typeof l=="number")throw new TypeError("Argument must not be a number");return n(l,d,o)},v.alloc=function(l,d,o){if(typeof l!="number")throw new TypeError("Argument must be a number");var _=n(l);return d===void 0?_.fill(0):typeof o=="string"?_.fill(d,o):_.fill(d),_},v.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return n(l)},v.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return L.SlowBuffer(l)}},{buffer:3}],31:[function(m,T,p){"use strict";function s(h){if(!h)return"utf8";for(var w;;)switch(h){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return h;default:if(w)return;h=(""+h).toLowerCase(),w=!0}}function v(h){var w=s(h);if(typeof w!="string"&&(u.isEncoding===g||!g(h)))throw new Error("Unknown encoding: "+h);return w||h}function L(h){this.encoding=v(h);var w;switch(this.encoding){case"utf16le":this.text=_,this.end=C,w=4;break;case"utf8":this.fillLast=o,w=4;break;case"base64":this.text=A,this.end=U,w=3;break;default:return this.write=i,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=u.allocUnsafe(w)}function n(h){return 127>=h?0:h>>5==6?2:h>>4==14?3:h>>3==30?4:h>>6==2?-1:-2}function l(h,w,N){var f=w.length-1;if(f<N)return 0;var y=n(w[f]);return 0<=y?(0<y&&(h.lastNeed=y-1),y):--f<N||y===-2?0:(y=n(w[f]),0<=y?(0<y&&(h.lastNeed=y-2),y):--f<N||y===-2?0:(y=n(w[f]),0<=y?(0<y&&(y===2?y=0:h.lastNeed=y-3),y):0))}function d(h,w){if((192&w[0])!=128)return h.lastNeed=0,"\uFFFD";if(1<h.lastNeed&&1<w.length){if((192&w[1])!=128)return h.lastNeed=1,"\uFFFD";if(2<h.lastNeed&&2<w.length&&(192&w[2])!=128)return h.lastNeed=2,"\uFFFD"}}function o(h){var w=this.lastTotal-this.lastNeed,N=d(this,h,w);return N===void 0?this.lastNeed<=h.length?(h.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(h.copy(this.lastChar,w,0,h.length),void(this.lastNeed-=h.length)):N}function _(h,w){if((h.length-w)%2==0){var N=h.toString("utf16le",w);if(N){var f=N.charCodeAt(N.length-1);if(55296<=f&&56319>=f)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1],N.slice(0,-1)}return N}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=h[h.length-1],h.toString("utf16le",w,h.length-1)}function C(h){var w=h&&h.length?this.write(h):"";if(this.lastNeed){var N=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,N)}return w}function A(h,w){var N=(h.length-w)%3;return N==0?h.toString("base64",w):(this.lastNeed=3-N,this.lastTotal=3,N==1?this.lastChar[0]=h[h.length-1]:(this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1]),h.toString("base64",w,h.length-N))}function U(h){var w=h&&h.length?this.write(h):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function i(h){return h.toString(this.encoding)}function c(h){return h&&h.length?this.write(h):""}var u=m("safe-buffer").Buffer,g=u.isEncoding||function(h){switch(h=""+h,h&&h.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};p.StringDecoder=L,L.prototype.write=function(h){if(h.length===0)return"";var w,N;if(this.lastNeed){if(w=this.fillLast(h),w===void 0)return"";N=this.lastNeed,this.lastNeed=0}else N=0;return N<h.length?w?w+this.text(h,N):this.text(h,N):w||""},L.prototype.end=function(h){var w=h&&h.length?this.write(h):"";return this.lastNeed?w+"\uFFFD":w},L.prototype.text=function(h,w){var N=l(this,h,w);if(!this.lastNeed)return h.toString("utf8",w);this.lastTotal=N;var f=h.length-(N-this.lastNeed);return h.copy(this.lastChar,0,f),h.toString("utf8",w,f)},L.prototype.fillLast=function(h){return this.lastNeed<=h.length?(h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,h.length),void(this.lastNeed-=h.length))}},{"safe-buffer":30}],32:[function(m,T){(function(p){(function(){function s(v){try{if(!p.localStorage)return!1}catch{return!1}var L=p.localStorage[v];return L!=null&&(L+"").toLowerCase()==="true"}T.exports=function(v,L){function n(){if(!l){if(s("throwDeprecation"))throw new Error(L);s("traceDeprecation")?console.trace(L):console.warn(L),l=!0}return v.apply(this,arguments)}if(s("noDeprecation"))return v;var l=!1;return n}}).call(this)}).call(this,typeof global>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:global)},{}],"/":[function(m,T){function p(U){return U.replace(/a=ice-options:trickle\s\n/g,"")}function s(U){console.warn(U)}let v=m("debug")("simple-peer"),L=m("get-browser-rtc"),n=m("randombytes"),l=m("readable-stream"),d=m("queue-microtask"),o=m("err-code"),{Buffer:_}=m("buffer"),C=65536;class A extends l.Duplex{constructor(i){if(i=Object.assign({allowHalfOpen:!1},i),super(i),this._id=n(4).toString("hex").slice(0,7),this._debug("new peer %o",i),this.channelName=i.initiator?i.channelName||n(20).toString("hex"):null,this.initiator=i.initiator||!1,this.channelConfig=i.channelConfig||A.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},A.config,i.config),this.offerOptions=i.offerOptions||{},this.answerOptions=i.answerOptions||{},this.sdpTransform=i.sdpTransform||(c=>c),this.streams=i.streams||(i.stream?[i.stream]:[]),this.trickle=i.trickle===void 0||i.trickle,this.allowHalfTrickle=i.allowHalfTrickle!==void 0&&i.allowHalfTrickle,this.iceCompleteTimeout=i.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=i.wrtc&&typeof i.wrtc=="object"?i.wrtc:L(),!this._wrtc)throw o(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(c){return void this.destroy(o(c,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=c=>{this._onIceCandidate(c)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(c=>{this.destroy(o(c,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=c=>{this._setupData(c)},this.streams&&this.streams.forEach(c=>{this.addStream(c)}),this._pc.ontrack=c=>{this._onTrack(c)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(i){if(!this.destroying){if(this.destroyed)throw o(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof i=="string")try{i=JSON.parse(i)}catch{i={}}this._debug("signal()"),i.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),i.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(i.transceiverRequest.kind,i.transceiverRequest.init)),i.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(i.candidate):this._pendingCandidates.push(i.candidate)),i.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(i)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(c=>{this._addIceCandidate(c)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(c=>{this.destroy(o(c,"ERR_SET_REMOTE_DESCRIPTION"))}),i.sdp||i.candidate||i.renegotiate||i.transceiverRequest||this.destroy(o(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(i){let c=new this._wrtc.RTCIceCandidate(i);this._pc.addIceCandidate(c).catch(u=>{!c.address||c.address.endsWith(".local")?s("Ignoring unsupported ICE candidate."):this.destroy(o(u,"ERR_ADD_ICE_CANDIDATE"))})}send(i){if(!this.destroying){if(this.destroyed)throw o(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(i)}}addTransceiver(i,c){if(!this.destroying){if(this.destroyed)throw o(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(i,c),this._needsNegotiation()}catch(u){this.destroy(o(u,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:i,init:c}})}}addStream(i){if(!this.destroying){if(this.destroyed)throw o(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),i.getTracks().forEach(c=>{this.addTrack(c,i)})}}addTrack(i,c){if(this.destroying)return;if(this.destroyed)throw o(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");let u=this._senderMap.get(i)||new Map,g=u.get(c);if(!g)g=this._pc.addTrack(i,c),u.set(c,g),this._senderMap.set(i,u),this._needsNegotiation();else throw g.removed?o(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):o(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(i,c,u){if(this.destroying)return;if(this.destroyed)throw o(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");let g=this._senderMap.get(i),h=g?g.get(u):null;if(!h)throw o(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");c&&this._senderMap.set(c,g),h.replaceTrack==null?this.destroy(o(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):h.replaceTrack(c)}removeTrack(i,c){if(this.destroying)return;if(this.destroyed)throw o(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");let u=this._senderMap.get(i),g=u?u.get(c):null;if(!g)throw o(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{g.removed=!0,this._pc.removeTrack(g)}catch(h){h.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(g):this.destroy(o(h,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(i){if(!this.destroying){if(this.destroyed)throw o(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),i.getTracks().forEach(c=>{this.removeTrack(c,i)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,d(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw o(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(i){this._destroy(i,()=>{})}_destroy(i,c){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",i&&(i.message||i)),d(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",i&&(i.message||i)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,i&&this.emit("error",i),this.emit("close"),c()}))}_setupData(i){if(!i.channel)return this.destroy(o(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=i.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=C),this.channelName=this._channel.label,this._channel.onmessage=u=>{this._onChannelMessage(u)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=u=>{let g=u.error instanceof Error?u.error:new Error(`Datachannel error: ${u.message} ${u.filename}:${u.lineno}:${u.colno}`);this.destroy(o(g,"ERR_DATA_CHANNEL"))};let c=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(c&&this._onChannelClose(),c=!0):c=!1},5e3)}_read(){}_write(i,c,u){if(this.destroyed)return u(o(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(i)}catch(g){return this.destroy(o(g,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>C?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=u):u(null)}else this._debug("write before connect"),this._chunk=i,this._cb=u}_onFinish(){if(!this.destroyed){let i=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?i():this.once("connect",i)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(i=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(i.sdp=p(i.sdp)),i.sdp=this.sdpTransform(i.sdp);let c=()=>{if(!this.destroyed){let u=this._pc.localDescription||i;this._debug("signal"),this.emit("signal",{type:u.type,sdp:u.sdp})}};this._pc.setLocalDescription(i).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?c():this.once("_iceComplete",c))}).catch(u=>{this.destroy(o(u,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(i=>{this.destroy(o(i,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(i=>{i.mid||!i.sender.track||i.requested||(i.requested=!0,this.addTransceiver(i.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(i=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(i.sdp=p(i.sdp)),i.sdp=this.sdpTransform(i.sdp);let c=()=>{if(!this.destroyed){let u=this._pc.localDescription||i;this._debug("signal"),this.emit("signal",{type:u.type,sdp:u.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(i).then(()=>{this.destroyed||(this.trickle||this._iceComplete?c():this.once("_iceComplete",c))}).catch(u=>{this.destroy(o(u,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(i=>{this.destroy(o(i,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(o(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;let i=this._pc.iceConnectionState,c=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",i,c),this.emit("iceStateChange",i,c),(i==="connected"||i==="completed")&&(this._pcReady=!0,this._maybeReady()),i==="failed"&&this.destroy(o(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),i==="closed"&&this.destroy(o(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(i){let c=u=>(Object.prototype.toString.call(u.values)==="[object Array]"&&u.values.forEach(g=>{Object.assign(u,g)}),u);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(u=>{let g=[];u.forEach(h=>{g.push(c(h))}),i(null,g)},u=>i(u)):0<this._pc.getStats.length?this._pc.getStats(u=>{if(this.destroyed)return;let g=[];u.result().forEach(h=>{let w={};h.names().forEach(N=>{w[N]=h.stat(N)}),w.id=h.id,w.type=h.type,w.timestamp=h.timestamp,g.push(c(w))}),i(null,g)},u=>i(u)):i(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;let i=()=>{this.destroyed||this.getStats((c,u)=>{if(this.destroyed)return;c&&(u=[]);let g={},h={},w={},N=!1;u.forEach(y=>{(y.type==="remotecandidate"||y.type==="remote-candidate")&&(g[y.id]=y),(y.type==="localcandidate"||y.type==="local-candidate")&&(h[y.id]=y),(y.type==="candidatepair"||y.type==="candidate-pair")&&(w[y.id]=y)});let f=y=>{N=!0;let I=h[y.localCandidateId];I&&(I.ip||I.address)?(this.localAddress=I.ip||I.address,this.localPort=+I.port):I&&I.ipAddress?(this.localAddress=I.ipAddress,this.localPort=+I.portNumber):typeof y.googLocalAddress=="string"&&(I=y.googLocalAddress.split(":"),this.localAddress=I[0],this.localPort=+I[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let M=g[y.remoteCandidateId];M&&(M.ip||M.address)?(this.remoteAddress=M.ip||M.address,this.remotePort=+M.port):M&&M.ipAddress?(this.remoteAddress=M.ipAddress,this.remotePort=+M.portNumber):typeof y.googRemoteAddress=="string"&&(M=y.googRemoteAddress.split(":"),this.remoteAddress=M[0],this.remotePort=+M[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(u.forEach(y=>{y.type==="transport"&&y.selectedCandidatePairId&&f(w[y.selectedCandidatePairId]),(y.type==="googCandidatePair"&&y.googActiveConnection==="true"||(y.type==="candidatepair"||y.type==="candidate-pair")&&y.selected)&&f(y)}),!N&&(!Object.keys(w).length||Object.keys(h).length))return void setTimeout(i,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(I){return this.destroy(o(I,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');let y=this._cb;this._cb=null,y(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};i()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>C)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(i=>{this._pc.removeTrack(i),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(i){this.destroyed||(i.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:i.candidate.candidate,sdpMLineIndex:i.candidate.sdpMLineIndex,sdpMid:i.candidate.sdpMid}}):!i.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),i.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(i){if(this.destroyed)return;let c=i.data;c instanceof ArrayBuffer&&(c=_.from(c)),this.push(c)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);let i=this._cb;this._cb=null,i(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(i){this.destroyed||i.streams.forEach(c=>{this._debug("on track"),this.emit("track",i.track,c),this._remoteTracks.push({track:i.track,stream:c}),this._remoteStreams.some(u=>u.id===c.id)||(this._remoteStreams.push(c),d(()=>{this._debug("on stream"),this.emit("stream",c)}))})}_debug(){let i=[].slice.call(arguments);i[0]="["+this._id+"] "+i[0],v.apply(null,i)}}A.WEBRTC_SUPPORT=!!L(),A.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},A.channelConfig={},T.exports=A},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})});var cr=1200,ur=2500,qe=3e4,Qe=S=>{if(S.shouldConnect&&S.ws===null){let O=new WebSocket(S.url),x=S.binaryType,m=null;x&&(O.binaryType=x),S.ws=O,S.connecting=!0,S.connected=!1,O.onmessage=s=>{S.lastMessageReceived=Be();let v=s.data,L=typeof v=="string"?JSON.parse(v):v;L&&L.type==="pong"&&(clearTimeout(m),m=setTimeout(p,qe/2)),S.emit("message",[L,S])};let T=s=>{S.ws!==null&&(S.ws=null,S.connecting=!1,S.connected?(S.connected=!1,S.emit("disconnect",[{type:"disconnect",error:s},S])):S.unsuccessfulReconnects++,setTimeout(Qe,_t(bt(S.unsuccessfulReconnects+1)*cr,ur),S)),clearTimeout(m)},p=()=>{S.ws===O&&S.send({type:"ping"})};O.onclose=()=>T(null),O.onerror=s=>T(s),O.onopen=()=>{S.lastMessageReceived=Be(),S.connecting=!1,S.connected=!0,S.unsuccessfulReconnects=0,S.emit("connect",[{type:"connect"},S]),m=setTimeout(p,qe/2)}}},Ve=class extends yt{constructor(O,{binaryType:x}={}){super(),this.url=O,this.ws=null,this.binaryType=x||null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&qe<Be()-this.lastMessageReceived&&this.ws.close()},qe/2),Qe(this)}send(O){this.ws&&this.ws.send(JSON.stringify(O))}destroy(){clearInterval(this._checkInterval),this.disconnect(),super.destroy()}disconnect(){this.shouldConnect=!1,this.ws!==null&&this.ws.close()}connect(){this.shouldConnect=!0,!this.connected&&this.ws===null&&Qe(this)}};var Mt=new Map,Ze=class{constructor(O){this.room=O,this.onmessage=null,this._onChange=x=>x.key===O&&this.onmessage!==null&&this.onmessage({data:je(x.newValue||"")}),At(this._onChange)}postMessage(O){Tt.setItem(this.room,Fe(Ot(O)))}close(){kt(this._onChange)}},fr=typeof BroadcastChannel>"u"?Ze:BroadcastChannel,et=S=>ve(Mt,S,()=>{let O=pt(),x=new fr(S);return x.onmessage=m=>O.forEach(T=>T(m.data,"broadcastchannel")),{bc:x,subs:O}}),Bt=(S,O)=>(et(S).subs.add(O),O),Ft=(S,O)=>{let x=et(S),m=x.subs.delete(O);return m&&x.subs.size===0&&(x.bc.close(),Mt.delete(S)),m},jt=(S,O,x=null)=>{let m=et(S);m.bc.postMessage(O),m.subs.forEach(T=>T(O,x))};var er=or(Vt(),1);var We=0,He=1,Yt=2,rt=(S,O)=>{Q(S,We);let x=Nt(O);ie(S,x)},nt=(S,O,x)=>{Q(S,He),ie(S,Ut(O,x))},gr=(S,O,x)=>nt(O,x,fe(S)),zt=(S,O,x,m)=>{try{xt(O,fe(S),x)}catch(T){m?.(T),console.error("Caught error while handling a Yjs update",T)}},Gt=(S,O)=>{Q(S,Yt),ie(S,O)},yr=zt,Kt=(S,O,x,m,T)=>{let p=Pe(S);switch(p){case We:gr(S,O,x);break;case He:zt(S,x,m,T);break;case Yt:yr(S,x,m,T);break;default:throw new Error("Unknown message type")}return p};var $t=(S,O)=>{let x=Ge(S).buffer,m=Ge(O).buffer;return crypto.subtle.importKey("raw",x,"PBKDF2",!1,["deriveKey"]).then(T=>crypto.subtle.deriveKey({name:"PBKDF2",salt:m,iterations:1e5,hash:"SHA-256"},T,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))},it=(S,O)=>{if(!O)return xe(S);let x=crypto.getRandomValues(new Uint8Array(12));return crypto.subtle.encrypt({name:"AES-GCM",iv:x},O,S).then(m=>{let T=Z();return Oe(T,"AES-GCM"),ie(T,x),ie(T,new Uint8Array(m)),re(T)})},Jt=(S,O)=>{let x=Z();return wt(x,S),it(re(x),O)},st=(S,O)=>{if(!O)return xe(S);let x=Le(S);Me(x)!=="AES-GCM"&&Rt(De("Unknown encryption algorithm"));let T=fe(x),p=fe(x);return crypto.subtle.decrypt({name:"AES-GCM",iv:T},O,p).then(s=>new Uint8Array(s))},Xt=(S,O)=>st(S,O).then(x=>Et(Le(new Uint8Array(x))));var ne=Lt("y-webrtc"),Ce=0,tr=3,Ne=1,ht=4,Ye=new Map,ye=new Map,rr=S=>{let O=!0;S.webrtcConns.forEach(x=>{x.synced||(O=!1)}),(!O&&S.synced||O&&!S.synced)&&(S.synced=O,S.provider.emit("synced",[{synced:O}]),ne("synced ",ae,S.name,Ee," with all peers"))},nr=(S,O,x)=>{let m=Le(O),T=Z(),p=Pe(m);if(S===void 0)return null;let s=S.awareness,v=S.doc,L=!1;switch(p){case Ce:{Q(T,Ce);let n=Kt(m,T,v,S);n===He&&!S.synced&&x(),n===We&&(L=!0);break}case tr:Q(T,Ne),ie(T,Ue(s,Array.from(s.getStates().keys()))),L=!0;break;case Ne:Pt(s,fe(m),S);break;case ht:{let n=vt(m)===1,l=Me(m);if(l!==S.peerId&&(S.bcConns.has(l)&&!n||!S.bcConns.has(l)&&n)){let d=[],o=[];n?(S.bcConns.add(l),o.push(l)):(S.bcConns.delete(l),d.push(l)),S.provider.emit("peers",[{added:o,removed:d,webrtcPeers:Array.from(S.webrtcConns.keys()),bcPeers:Array.from(S.bcConns)}]),ir(S)}break}default:return console.error("Unable to compute message"),T}return L?T:null},vr=(S,O)=>{let x=S.room;return ne("received message from ",ae,S.remotePeerId,$e," (",x.name,")",Ee,Je),nr(x,O,()=>{S.synced=!0,ne("synced ",ae,x.name,Ee," with ",ae,S.remotePeerId),rr(x)})},ot=(S,O)=>{ne("send message to ",ae,S.remotePeerId,Ee,$e," (",S.room.name,")",Je);try{S.peer.send(re(O))}catch{}},Er=(S,O)=>{ne("broadcast message in ",ae,S.name,Ee),S.webrtcConns.forEach(x=>{try{x.peer.send(O)}catch{}})},ze=class{constructor(O,x,m,T){ne("establishing connection to ",ae,m),this.room=T,this.remotePeerId=m,this.glareToken=void 0,this.closed=!1,this.connected=!1,this.synced=!1,this.peer=new er.default({initiator:x,...T.provider.peerOpts}),this.peer.on("signal",p=>{this.glareToken===void 0&&(this.glareToken=Date.now()+Math.random()),dt(O,T,{to:m,from:T.peerId,type:"signal",token:this.glareToken,signal:p})}),this.peer.on("connect",()=>{ne("connected to ",ae,m),this.connected=!0;let s=T.provider.doc,v=T.awareness,L=Z();Q(L,Ce),rt(L,s),ot(this,L);let n=v.getStates();if(n.size>0){let l=Z();Q(l,Ne),ie(l,Ue(v,Array.from(n.keys()))),ot(this,l)}}),this.peer.on("close",()=>{this.connected=!1,this.closed=!0,T.webrtcConns.has(this.remotePeerId)&&(T.webrtcConns.delete(this.remotePeerId),T.provider.emit("peers",[{removed:[this.remotePeerId],added:[],webrtcPeers:Array.from(T.webrtcConns.keys()),bcPeers:Array.from(T.bcConns)}])),rr(T),this.peer.destroy(),ne("closed connection to ",ae,m),ct(T)}),this.peer.on("error",p=>{ne("Error in connection to ",ae,m,": ",p),ct(T)}),this.peer.on("data",p=>{let s=vr(this,p);s!==null&&ot(this,s)})}destroy(){this.peer.destroy()}},pe=(S,O)=>it(O,S.key).then(x=>S.mux(()=>jt(S.name,x))),Qt=(S,O)=>{S.bcconnected&&pe(S,O),Er(S,O)},ct=S=>{Ye.forEach(O=>{O.connected&&(O.send({type:"subscribe",topics:[S.name]}),S.webrtcConns.size<S.provider.maxConns&&dt(O,S,{type:"announce",from:S.peerId}))})},ir=S=>{if(S.provider.filterBcConns){let O=Z();Q(O,ht),Ke(O,1),Oe(O,S.peerId),pe(S,re(O))}},ut=class{constructor(O,x,m,T){this.peerId=St(),this.doc=O,this.awareness=x.awareness,this.provider=x,this.synced=!1,this.name=m,this.key=T,this.webrtcConns=new Map,this.bcConns=new Set,this.mux=It(),this.bcconnected=!1,this._bcSubscriber=p=>st(new Uint8Array(p),T).then(s=>this.mux(()=>{let v=nr(this,s,()=>{});v&&pe(this,re(v))})),this._docUpdateHandler=(p,s)=>{let v=Z();Q(v,Ce),Gt(v,p),Qt(this,re(v))},this._awarenessUpdateHandler=({added:p,updated:s,removed:v},L)=>{let n=p.concat(s).concat(v),l=Z();Q(l,Ne),ie(l,Ue(this.awareness,n)),Qt(this,re(l))},this._beforeUnloadHandler=()=>{Xe(this.awareness,[O.clientID],"window unload"),ye.forEach(p=>{p.disconnect()})},typeof window<"u"?window.addEventListener("beforeunload",this._beforeUnloadHandler):typeof process<"u"&&process.on("exit",this._beforeUnloadHandler)}connect(){this.doc.on("update",this._docUpdateHandler),this.awareness.on("update",this._awarenessUpdateHandler),ct(this);let O=this.name;Bt(O,this._bcSubscriber),this.bcconnected=!0,ir(this);let x=Z();Q(x,Ce),rt(x,this.doc),pe(this,re(x));let m=Z();Q(m,Ce),nt(m,this.doc),pe(this,re(m));let T=Z();Q(T,tr),pe(this,re(T));let p=Z();Q(p,Ne),ie(p,Ue(this.awareness,[this.doc.clientID])),pe(this,re(p))}disconnect(){Ye.forEach(x=>{x.connected&&x.send({type:"unsubscribe",topics:[this.name]})}),Xe(this.awareness,[this.doc.clientID],"disconnect");let O=Z();Q(O,ht),Ke(O,0),Oe(O,this.peerId),pe(this,re(O)),Ft(this.name,this._bcSubscriber),this.bcconnected=!1,this.doc.off("update",this._docUpdateHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.webrtcConns.forEach(x=>x.destroy())}destroy(){this.disconnect(),typeof window<"u"?window.removeEventListener("beforeunload",this._beforeUnloadHandler):typeof process<"u"&&process.off("exit",this._beforeUnloadHandler)}},Cr=(S,O,x,m)=>{if(ye.has(x))throw De(`A Yjs Doc connected to room "${x}" already exists!`);let T=new ut(S,O,x,m);return ye.set(x,T),T},dt=(S,O,x)=>{O.key?Jt(x,O.key).then(m=>{S.send({type:"publish",topic:O.name,data:Fe(m)})}):S.send({type:"publish",topic:O.name,data:x})},lt=class extends Ve{constructor(O){super(O),this.providers=new Set,this.on("connect",()=>{ne(`connected (${O})`);let x=Array.from(ye.keys());this.send({type:"subscribe",topics:x}),ye.forEach(m=>dt(this,m,{type:"announce",from:m.peerId}))}),this.on("message",x=>{switch(x.type){case"publish":{let m=x.topic,T=ye.get(m);if(T==null||typeof m!="string")return;let p=s=>{let v=T.webrtcConns,L=T.peerId;if(s==null||s.from===L||s.to!==void 0&&s.to!==L||T.bcConns.has(s.from))return;let n=v.has(s.from)?()=>{}:()=>T.provider.emit("peers",[{removed:[],added:[s.from],webrtcPeers:Array.from(T.webrtcConns.keys()),bcPeers:Array.from(T.bcConns)}]);switch(s.type){case"announce":v.size<T.provider.maxConns&&(ve(v,s.from,()=>new ze(this,!0,s.from,T)),n());break;case"signal":if(s.signal.type==="offer"){let l=v.get(s.from);if(l){let d=s.token,o=l.glareToken;if(o&&o>d){ne("offer rejected: ",s.from);return}l.glareToken=void 0}}if(s.signal.type==="answer"){ne("offer answered by: ",s.from);let l=v.get(s.from);l.glareToken=void 0}s.to===L&&(ve(v,s.from,()=>new ze(this,!1,s.from,T)).peer.signal(s.signal),n());break}};T.key?typeof x.data=="string"&&Xt(je(x.data),T.key).then(p):p(x.data)}}}),this.on("disconnect",()=>ne(`disconnect (${O})`))}},at=S=>{S.emit("status",[{connected:S.connected}])},Zt=class extends gt{constructor(O,x,{signaling:m=["wss://y-webrtc-eu.fly.dev"],password:T=null,awareness:p=new Dt(x),maxConns:s=20+mt(Ct()*15),filterBcConns:v=!0,peerOpts:L={}}={}){super(),this.roomName=O,this.doc=x,this.filterBcConns=v,this.awareness=p,this.shouldConnect=!1,this.signalingUrls=m,this.signalingConns=[],this.maxConns=s,this.peerOpts=L,this.key=T?$t(T,O):xe(null),this.room=null,this.key.then(n=>{this.room=Cr(x,this,O,n),this.shouldConnect?this.room.connect():this.room.disconnect(),at(this)}),this.connect(),this.destroy=this.destroy.bind(this),x.on("destroy",this.destroy)}get connected(){return this.room!==null&&this.shouldConnect}connect(){this.shouldConnect=!0,this.signalingUrls.forEach(O=>{let x=ve(Ye,O,()=>new lt(O));this.signalingConns.push(x),x.providers.add(this)}),this.room&&(this.room.connect(),at(this))}disconnect(){this.shouldConnect=!1,this.signalingConns.forEach(O=>{O.providers.delete(this),O.providers.size===0&&(O.destroy(),Ye.delete(O.url))}),this.room&&(this.room.disconnect(),at(this))}destroy(){this.doc.off("destroy",this.destroy),this.key.then(()=>{this.room.destroy(),ye.delete(this.roomName)}),super.destroy()}};export{ut as Room,lt as SignalingConn,ze as WebrtcConn,Zt as WebrtcProvider};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as d,$a as da,Aa as E,Ab as Ea,Ba as F,Bb as Fa,Ca as G,Cb as Ga,Da as H,Db as Ha,Ea as I,Eb as Ia,Fa as J,Fb as Ja,Ga as K,Gb as Ka,Ha as L,Hb as La,Ia as M,Ib as Ma,Ja as N,Jb as Na,Ka as O,Kb as Oa,La as P,Lb as Pa,Ma as Q,Mb as Qa,Na as R,Nb as Ra,Oa as S,Ob as Sa,Pa as T,Pb as Ta,Qa as U,Qb as Ua,Ra as V,Rb as Va,Sa as W,Sb as Wa,Ta as X,Ua as Y,Va as Z,Wa as _,Xa as $,Y as a,Ya as aa,Z as b,Za as ba,_ as c,_a as ca,aa as e,ab as ea,ba as f,bb as fa,ca as g,cb as ga,da as h,db as ha,ea as i,eb as ia,fa as j,fb as ja,ga as k,gb as ka,ha as l,hb as la,ia as m,ib as ma,ja as n,jb as na,ka as o,kb as oa,la as p,lb as pa,ma as q,mb as qa,na as r,nb as ra,oa as s,ob as sa,pa as t,pb as ta,qa as u,qb as ua,ra as v,rb as va,sa as w,sb as wa,ta as x,tb as xa,ua as y,ub as ya,va as z,vb as za,wa as A,wb as Aa,xa as B,xb as Ba,ya as C,yb as Ca,za as D,zb as Da}from"./chunk-E5R7FPWA.js";import"./chunk-23NN352E.js";export{E as AbsolutePosition,a as AbstractConnector,Ka as AbstractStruct,ua as AbstractType,za as Array,Sa as ContentAny,Ma as ContentBinary,Na as ContentDeleted,Oa as ContentDoc,Pa as ContentEmbed,Qa as ContentFormat,Ra as ContentJSON,Ta as ContentString,Ua as ContentType,h as Doc,La as GC,u as ID,Va as Item,Ba as Map,A as PermanentUserData,B as RelativePosition,Wa as Skip,K as Snapshot,Ea as Text,_ as Transaction,ba as UndoManager,i as UpdateDecoderV1,j as UpdateDecoderV2,k as UpdateEncoderV1,l as UpdateEncoderV2,Ga as XmlElement,Fa as XmlFragment,Ia as XmlHook,Ja as XmlText,ya as YArrayEvent,sa as YEvent,Aa as YMapEvent,Da as YTextEvent,Ha as YXmlEvent,p as applyUpdate,o as applyUpdateV2,Ca as cleanupYTextFormatting,v as compareIDs,J as compareRelativePositions,qa as convertUpdateFormatV1ToV2,ra as convertUpdateFormatV2ToV1,I as createAbsolutePositionFromRelativePosition,e as createDeleteSet,f as createDeleteSetFromStructStore,T as createDocFromSnapshot,w as createID,D as createRelativePositionFromJSON,F as createRelativePositionFromTypeIndex,Q as createSnapshot,H as decodeRelativePosition,P as decodeSnapshot,O as decodeSnapshotV2,s as decodeStateVector,ea as decodeUpdate,fa as decodeUpdateV2,na as diffUpdate,ma as diffUpdateV2,R as emptySnapshot,G as encodeRelativePosition,N as encodeSnapshot,M as encodeSnapshotV2,r as encodeStateAsUpdate,q as encodeStateAsUpdateV2,t as encodeStateVector,ia as encodeStateVectorFromUpdate,ha as encodeStateVectorFromUpdateV2,g as equalDeleteSets,L as equalSnapshots,W as findIndexSS,x as findRootTypeKey,X as getItem,Z as getItemCleanEnd,Y as getItemCleanStart,V as getState,ta as getTypeChildren,c as isDeleted,y as isParentOf,b as iterateDeletedStructs,z as logType,ca as logUpdate,da as logUpdateV2,d as mergeDeleteSets,ga as mergeUpdates,la as mergeUpdatesV2,oa as obfuscateUpdate,pa as obfuscateUpdateV2,ka as parseUpdateMeta,ja as parseUpdateMetaV2,n as readUpdate,m as readUpdateV2,C as relativePositionToJSON,S as snapshot,U as snapshotContainsUpdate,aa as transact,$ as tryGc,va as typeListToArraySnapshot,xa as typeMapGetAllSnapshot,wa as typeMapGetSnapshot};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|