@openc3/vue-common 6.10.1 → 6.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ArrayWidget-DvCX-1Om.cjs → ArrayWidget-ByKRAWXn.cjs} +2 -2
- package/dist/{ArrayWidget-DvCX-1Om.cjs.map → ArrayWidget-ByKRAWXn.cjs.map} +1 -1
- package/dist/{ArrayWidget-DQRQ7dPa.js → ArrayWidget-CR7Wpw3N.js} +4 -4
- package/dist/{ArrayWidget-DQRQ7dPa.js.map → ArrayWidget-CR7Wpw3N.js.map} +1 -1
- package/dist/{ArrayplotWidget-DA4SCxEg.cjs → ArrayplotWidget-Cty7KQ_h.cjs} +2 -2
- package/dist/{ArrayplotWidget-DA4SCxEg.cjs.map → ArrayplotWidget-Cty7KQ_h.cjs.map} +1 -1
- package/dist/{ArrayplotWidget-BeSfz3MR.js → ArrayplotWidget-DDEd-jRJ.js} +3 -3
- package/dist/{ArrayplotWidget-BeSfz3MR.js.map → ArrayplotWidget-DDEd-jRJ.js.map} +1 -1
- package/dist/{BarColumn-C5VfAEOx.cjs → BarColumn-BZSUr33b.cjs} +2 -2
- package/dist/{BarColumn-C5VfAEOx.cjs.map → BarColumn-BZSUr33b.cjs.map} +1 -1
- package/dist/{BarColumn-BdIaQfOz.js → BarColumn-XWs-3Cwb.js} +3 -3
- package/dist/{BarColumn-BdIaQfOz.js.map → BarColumn-XWs-3Cwb.js.map} +1 -1
- package/dist/{BlockWidget-C33RBqR2.cjs → BlockWidget-BDzoqpxO.cjs} +2 -2
- package/dist/{BlockWidget-C33RBqR2.cjs.map → BlockWidget-BDzoqpxO.cjs.map} +1 -1
- package/dist/{BlockWidget-DSFKrUxl.js → BlockWidget-CfFgdNSv.js} +4 -4
- package/dist/{BlockWidget-DSFKrUxl.js.map → BlockWidget-CfFgdNSv.js.map} +1 -1
- package/dist/{ButtonWidget-DV33-G5z.cjs → ButtonWidget-BBMDS_YF.cjs} +2 -2
- package/dist/{ButtonWidget-DV33-G5z.cjs.map → ButtonWidget-BBMDS_YF.cjs.map} +1 -1
- package/dist/{ButtonWidget-CFbjdxSr.js → ButtonWidget-BaSvtElA.js} +4 -4
- package/dist/{ButtonWidget-CFbjdxSr.js.map → ButtonWidget-BaSvtElA.js.map} +1 -1
- package/dist/{CanvasWidget-CO5Ql5FM.cjs → CanvasWidget-CFNpgqfW.cjs} +2 -2
- package/dist/{CanvasWidget-CO5Ql5FM.cjs.map → CanvasWidget-CFNpgqfW.cjs.map} +1 -1
- package/dist/{CanvasWidget-BloYxuKE.js → CanvasWidget-DcwDi5Zk.js} +2 -2
- package/dist/{CanvasWidget-BloYxuKE.js.map → CanvasWidget-DcwDi5Zk.js.map} +1 -1
- package/dist/{CanvasdotWidget-CZxUOPRd.js → CanvasdotWidget--awMOWyz.js} +2 -2
- package/dist/{CanvasdotWidget-CZxUOPRd.js.map → CanvasdotWidget--awMOWyz.js.map} +1 -1
- package/dist/{CanvasdotWidget-v73CXaR2.cjs → CanvasdotWidget-BZ9TrTvw.cjs} +2 -2
- package/dist/{CanvasdotWidget-v73CXaR2.cjs.map → CanvasdotWidget-BZ9TrTvw.cjs.map} +1 -1
- package/dist/{CanvasimageWidget-CCwRuLep.cjs → CanvasimageWidget-Dk15uRRu.cjs} +2 -2
- package/dist/{CanvasimageWidget-CCwRuLep.cjs.map → CanvasimageWidget-Dk15uRRu.cjs.map} +1 -1
- package/dist/{CanvasimageWidget-ULQq3nqZ.js → CanvasimageWidget-YP1pCtvb.js} +3 -3
- package/dist/{CanvasimageWidget-ULQq3nqZ.js.map → CanvasimageWidget-YP1pCtvb.js.map} +1 -1
- package/dist/{CanvasimagevalueWidget-NZYl_3mA.cjs → CanvasimagevalueWidget-BQHjJCuq.cjs} +2 -2
- package/dist/{CanvasimagevalueWidget-NZYl_3mA.cjs.map → CanvasimagevalueWidget-BQHjJCuq.cjs.map} +1 -1
- package/dist/{CanvasimagevalueWidget-jFCVXYhi.js → CanvasimagevalueWidget-CjVHb2uj.js} +3 -3
- package/dist/{CanvasimagevalueWidget-jFCVXYhi.js.map → CanvasimagevalueWidget-CjVHb2uj.js.map} +1 -1
- package/dist/{CanvaslabelWidget-DQhBI1vZ.js → CanvaslabelWidget-DoMplTTO.js} +2 -2
- package/dist/{CanvaslabelWidget-DQhBI1vZ.js.map → CanvaslabelWidget-DoMplTTO.js.map} +1 -1
- package/dist/{CanvaslabelWidget-XfEANCQ-.cjs → CanvaslabelWidget-Dw1YmiY0.cjs} +2 -2
- package/dist/{CanvaslabelWidget-XfEANCQ-.cjs.map → CanvaslabelWidget-Dw1YmiY0.cjs.map} +1 -1
- package/dist/{CanvaslabelvalueWidget-CJCZdHId.cjs → CanvaslabelvalueWidget-BYmsu9r_.cjs} +2 -2
- package/dist/{CanvaslabelvalueWidget-CJCZdHId.cjs.map → CanvaslabelvalueWidget-BYmsu9r_.cjs.map} +1 -1
- package/dist/{CanvaslabelvalueWidget-C4REgztL.js → CanvaslabelvalueWidget-Dyo_ogHn.js} +2 -2
- package/dist/{CanvaslabelvalueWidget-C4REgztL.js.map → CanvaslabelvalueWidget-Dyo_ogHn.js.map} +1 -1
- package/dist/{CanvaslineWidget-S4PCEvZM.js → CanvaslineWidget-D7W1TIxm.js} +2 -2
- package/dist/{CanvaslineWidget-S4PCEvZM.js.map → CanvaslineWidget-D7W1TIxm.js.map} +1 -1
- package/dist/{CanvaslineWidget-DycxDsyJ.cjs → CanvaslineWidget-tm194dw1.cjs} +2 -2
- package/dist/{CanvaslineWidget-DycxDsyJ.cjs.map → CanvaslineWidget-tm194dw1.cjs.map} +1 -1
- package/dist/{CanvaslinevalueWidget-597khOSA.js → CanvaslinevalueWidget-BOZyJuLE.js} +2 -2
- package/dist/{CanvaslinevalueWidget-597khOSA.js.map → CanvaslinevalueWidget-BOZyJuLE.js.map} +1 -1
- package/dist/{CanvaslinevalueWidget-bChpy38C.cjs → CanvaslinevalueWidget-DM5c-ciY.cjs} +2 -2
- package/dist/{CanvaslinevalueWidget-bChpy38C.cjs.map → CanvaslinevalueWidget-DM5c-ciY.cjs.map} +1 -1
- package/dist/{CheckbuttonWidget-BcblKat3.js → CheckbuttonWidget-B1E4BC6v.js} +2 -2
- package/dist/{CheckbuttonWidget-BcblKat3.js.map → CheckbuttonWidget-B1E4BC6v.js.map} +1 -1
- package/dist/{CheckbuttonWidget-BwDttJTf.cjs → CheckbuttonWidget-BSvTWD3x.cjs} +2 -2
- package/dist/{CheckbuttonWidget-BwDttJTf.cjs.map → CheckbuttonWidget-BSvTWD3x.cjs.map} +1 -1
- package/dist/{ClassificationBanners-CEzDn5cM.cjs → ClassificationBanners-CzZoKcRy.cjs} +2 -2
- package/dist/{ClassificationBanners-CEzDn5cM.cjs.map → ClassificationBanners-CzZoKcRy.cjs.map} +1 -1
- package/dist/{ClassificationBanners-CS4GUeYv.js → ClassificationBanners-DQeVwmYp.js} +2 -2
- package/dist/{ClassificationBanners-CS4GUeYv.js.map → ClassificationBanners-DQeVwmYp.js.map} +1 -1
- package/dist/{ComboboxWidget-BMcHS4g5.js → ComboboxWidget-BExUBH57.js} +2 -2
- package/dist/{ComboboxWidget-BMcHS4g5.js.map → ComboboxWidget-BExUBH57.js.map} +1 -1
- package/dist/{ComboboxWidget-DkBtLQ41.cjs → ComboboxWidget-B_KAnIVB.cjs} +2 -2
- package/dist/{ComboboxWidget-DkBtLQ41.cjs.map → ComboboxWidget-B_KAnIVB.cjs.map} +1 -1
- package/dist/{CriticalCmdDialog-CVLyYtng.js → CriticalCmdDialog-BtzhxuZi.js} +2 -2
- package/dist/{CriticalCmdDialog-CVLyYtng.js.map → CriticalCmdDialog-BtzhxuZi.js.map} +1 -1
- package/dist/{CriticalCmdDialog-C4DRtDnA.cjs → CriticalCmdDialog-CeohXoAG.cjs} +2 -2
- package/dist/{CriticalCmdDialog-C4DRtDnA.cjs.map → CriticalCmdDialog-CeohXoAG.cjs.map} +1 -1
- package/dist/{DateWidget-BpnMzSBn.js → DateWidget-_ZmPsi2l.js} +2 -2
- package/dist/{DateWidget-BpnMzSBn.js.map → DateWidget-_ZmPsi2l.js.map} +1 -1
- package/dist/{DateWidget-CRFiLyxD.cjs → DateWidget-kTJBAHVp.cjs} +2 -2
- package/dist/{DateWidget-CRFiLyxD.cjs.map → DateWidget-kTJBAHVp.cjs.map} +1 -1
- package/dist/{DetailsDialog-Brv3nVs3.cjs → DetailsDialog-Bc_VEG95.cjs} +2 -2
- package/dist/{DetailsDialog-Brv3nVs3.cjs.map → DetailsDialog-Bc_VEG95.cjs.map} +1 -1
- package/dist/{DetailsDialog-q9piPmHq.js → DetailsDialog-Bq7SS7bc.js} +2 -2
- package/dist/{DetailsDialog-q9piPmHq.js.map → DetailsDialog-Bq7SS7bc.js.map} +1 -1
- package/dist/{EventListDialog-DXIYmkWb.cjs → EventListDialog-Dycx70tY.cjs} +2 -2
- package/dist/{EventListDialog-DXIYmkWb.cjs.map → EventListDialog-Dycx70tY.cjs.map} +1 -1
- package/dist/{EventListDialog-BlcxcO8a.js → EventListDialog-jdNF3szO.js} +3 -3
- package/dist/{EventListDialog-BlcxcO8a.js.map → EventListDialog-jdNF3szO.js.map} +1 -1
- package/dist/{FormatvalueWidget-Cm-HmAmw.js → FormatvalueWidget-4C0vrL2i.js} +3 -3
- package/dist/{FormatvalueWidget-Cm-HmAmw.js.map → FormatvalueWidget-4C0vrL2i.js.map} +1 -1
- package/dist/{FormatvalueWidget-AXH-VW-A.cjs → FormatvalueWidget-CVoJgFJA.cjs} +2 -2
- package/dist/{FormatvalueWidget-AXH-VW-A.cjs.map → FormatvalueWidget-CVoJgFJA.cjs.map} +1 -1
- package/dist/{Graph-BEodMaxQ.js → Graph-B7KPo9Ul.js} +3 -3
- package/dist/{Graph-BEodMaxQ.js.map → Graph-B7KPo9Ul.js.map} +1 -1
- package/dist/{Graph-wDFY6Kd7.cjs → Graph-C9FS6KR3.cjs} +2 -2
- package/dist/{Graph-wDFY6Kd7.cjs.map → Graph-C9FS6KR3.cjs.map} +1 -1
- package/dist/{GraphWidget-CAADBFV-.js → GraphWidget-BpkPpAbd.js} +2 -2
- package/dist/{GraphWidget-CAADBFV-.js.map → GraphWidget-BpkPpAbd.js.map} +1 -1
- package/dist/{GraphWidget-B878ArE1.cjs → GraphWidget-D3HueIZi.cjs} +2 -2
- package/dist/{GraphWidget-B878ArE1.cjs.map → GraphWidget-D3HueIZi.cjs.map} +1 -1
- package/dist/{HorizontalWidget-D2lXnQqQ.cjs → HorizontalWidget-CN6goWHY.cjs} +2 -2
- package/dist/{HorizontalWidget-D2lXnQqQ.cjs.map → HorizontalWidget-CN6goWHY.cjs.map} +1 -1
- package/dist/{HorizontalWidget-NcXIXxh7.js → HorizontalWidget-DbEQYjFC.js} +2 -2
- package/dist/{HorizontalWidget-NcXIXxh7.js.map → HorizontalWidget-DbEQYjFC.js.map} +1 -1
- package/dist/{HorizontalboxWidget-CW9XX4uH.js → HorizontalboxWidget-CTomf_Iy.js} +5 -5
- package/dist/{HorizontalboxWidget-CW9XX4uH.js.map → HorizontalboxWidget-CTomf_Iy.js.map} +1 -1
- package/dist/{HorizontalboxWidget-BGzl7-Rt.cjs → HorizontalboxWidget-ysq7slso.cjs} +2 -2
- package/dist/{HorizontalboxWidget-BGzl7-Rt.cjs.map → HorizontalboxWidget-ysq7slso.cjs.map} +1 -1
- package/dist/{HorizontallineWidget-Cu2dDt7k.js → HorizontallineWidget-B7xx7ofY.js} +2 -2
- package/dist/{HorizontallineWidget-Cu2dDt7k.js.map → HorizontallineWidget-B7xx7ofY.js.map} +1 -1
- package/dist/{HorizontallineWidget-x2u6MQNz.cjs → HorizontallineWidget-BgXZZymr.cjs} +2 -2
- package/dist/{HorizontallineWidget-x2u6MQNz.cjs.map → HorizontallineWidget-BgXZZymr.cjs.map} +1 -1
- package/dist/{IframeWidget-BBU3MkSq.js → IframeWidget-DK7rbULe.js} +2 -2
- package/dist/{IframeWidget-BBU3MkSq.js.map → IframeWidget-DK7rbULe.js.map} +1 -1
- package/dist/{IframeWidget-B5simCWn.cjs → IframeWidget-fV9e-Nm1.cjs} +2 -2
- package/dist/{IframeWidget-B5simCWn.cjs.map → IframeWidget-fV9e-Nm1.cjs.map} +1 -1
- package/dist/{ImageLoader-XAGgjKkq.js → ImageLoader-C9rN_pSY.js} +2 -2
- package/dist/{ImageLoader-XAGgjKkq.js.map → ImageLoader-C9rN_pSY.js.map} +1 -1
- package/dist/{ImageLoader-Dj3MZVq9.cjs → ImageLoader-CJxiBXAL.cjs} +2 -2
- package/dist/{ImageLoader-Dj3MZVq9.cjs.map → ImageLoader-CJxiBXAL.cjs.map} +1 -1
- package/dist/{ImageviewerWidget-UByjeO63.js → ImageviewerWidget-6d6Kl3W_.js} +2 -2
- package/dist/{ImageviewerWidget-UByjeO63.js.map → ImageviewerWidget-6d6Kl3W_.js.map} +1 -1
- package/dist/{ImageviewerWidget-BtuiORhN.cjs → ImageviewerWidget-CULuNsiD.cjs} +2 -2
- package/dist/{ImageviewerWidget-BtuiORhN.cjs.map → ImageviewerWidget-CULuNsiD.cjs.map} +1 -1
- package/dist/{InterfacesTab-B1CwBWFu.cjs → InterfacesTab-0pmK3KNu.cjs} +2 -2
- package/dist/{InterfacesTab-B1CwBWFu.cjs.map → InterfacesTab-0pmK3KNu.cjs.map} +1 -1
- package/dist/{InterfacesTab-6hli9fcg.js → InterfacesTab-BCqTanhV.js} +3 -3
- package/dist/{InterfacesTab-6hli9fcg.js.map → InterfacesTab-BCqTanhV.js.map} +1 -1
- package/dist/{LabelWidget-BsOpolUL.js → LabelWidget-D71FfOSw.js} +2 -2
- package/dist/{LabelWidget-BsOpolUL.js.map → LabelWidget-D71FfOSw.js.map} +1 -1
- package/dist/{LabelWidget-X4cBbl5N.cjs → LabelWidget-DdZz2NWv.cjs} +2 -2
- package/dist/{LabelWidget-X4cBbl5N.cjs.map → LabelWidget-DdZz2NWv.cjs.map} +1 -1
- package/dist/{LabelledWidget-DaHqSURc.cjs → LabelledWidget-BZ319slb.cjs} +2 -2
- package/dist/{LabelledWidget-DaHqSURc.cjs.map → LabelledWidget-BZ319slb.cjs.map} +1 -1
- package/dist/{LabelledWidget-DVOGpgZ-.js → LabelledWidget-D2ir5kVU.js} +4 -4
- package/dist/{LabelledWidget-DVOGpgZ-.js.map → LabelledWidget-D2ir5kVU.js.map} +1 -1
- package/dist/{LabelprogressbarWidget-BeE9fDs6.js → LabelprogressbarWidget-C4_YbROz.js} +4 -4
- package/dist/{LabelprogressbarWidget-BeE9fDs6.js.map → LabelprogressbarWidget-C4_YbROz.js.map} +1 -1
- package/dist/{LabelprogressbarWidget-Cz3nXacL.cjs → LabelprogressbarWidget-LyevJNuz.cjs} +2 -2
- package/dist/{LabelprogressbarWidget-Cz3nXacL.cjs.map → LabelprogressbarWidget-LyevJNuz.cjs.map} +1 -1
- package/dist/{LabelsparklineWidget-Bns8kwBj.cjs → LabelsparklineWidget-Cbug97Ne.cjs} +2 -2
- package/dist/{LabelsparklineWidget-Bns8kwBj.cjs.map → LabelsparklineWidget-Cbug97Ne.cjs.map} +1 -1
- package/dist/{LabelsparklineWidget-Bj7trKML.js → LabelsparklineWidget-CdZ_pM2B.js} +4 -4
- package/dist/{LabelsparklineWidget-Bj7trKML.js.map → LabelsparklineWidget-CdZ_pM2B.js.map} +1 -1
- package/dist/{LabelvalueWidget-Dwqsh5o2.js → LabelvalueWidget-BS0EPY5h.js} +4 -4
- package/dist/{LabelvalueWidget-Dwqsh5o2.js.map → LabelvalueWidget-BS0EPY5h.js.map} +1 -1
- package/dist/{LabelvalueWidget-D-sncwem.cjs → LabelvalueWidget-DSHwAKma.cjs} +2 -2
- package/dist/{LabelvalueWidget-D-sncwem.cjs.map → LabelvalueWidget-DSHwAKma.cjs.map} +1 -1
- package/dist/{LabelvaluedescWidget-DmqG8dzJ.cjs → LabelvaluedescWidget-3lwQxkKj.cjs} +2 -2
- package/dist/{LabelvaluedescWidget-DmqG8dzJ.cjs.map → LabelvaluedescWidget-3lwQxkKj.cjs.map} +1 -1
- package/dist/{LabelvaluedescWidget-Cfu2vuja.js → LabelvaluedescWidget-Cpr8_Voq.js} +5 -5
- package/dist/{LabelvaluedescWidget-Cfu2vuja.js.map → LabelvaluedescWidget-Cpr8_Voq.js.map} +1 -1
- package/dist/{LabelvaluelimitsbarWidget-DYV68AJ_.js → LabelvaluelimitsbarWidget-DTcYbEQS.js} +4 -4
- package/dist/{LabelvaluelimitsbarWidget-DYV68AJ_.js.map → LabelvaluelimitsbarWidget-DTcYbEQS.js.map} +1 -1
- package/dist/{LabelvaluelimitsbarWidget-_l7xjrX9.cjs → LabelvaluelimitsbarWidget-DbO_Q5ex.cjs} +2 -2
- package/dist/{LabelvaluelimitsbarWidget-_l7xjrX9.cjs.map → LabelvaluelimitsbarWidget-DbO_Q5ex.cjs.map} +1 -1
- package/dist/{LabelvaluelimitscolumnWidget-D0WEVZMc.cjs → LabelvaluelimitscolumnWidget-BMSwK1Ys.cjs} +2 -2
- package/dist/{LabelvaluelimitscolumnWidget-D0WEVZMc.cjs.map → LabelvaluelimitscolumnWidget-BMSwK1Ys.cjs.map} +1 -1
- package/dist/{LabelvaluelimitscolumnWidget-CtaoTixt.js → LabelvaluelimitscolumnWidget-D0ltQ9Ta.js} +5 -5
- package/dist/{LabelvaluelimitscolumnWidget-CtaoTixt.js.map → LabelvaluelimitscolumnWidget-D0ltQ9Ta.js.map} +1 -1
- package/dist/{LabelvaluerangebarWidget-BZTEfPQh.cjs → LabelvaluerangebarWidget-B6_alHq4.cjs} +2 -2
- package/dist/{LabelvaluerangebarWidget-BZTEfPQh.cjs.map → LabelvaluerangebarWidget-B6_alHq4.cjs.map} +1 -1
- package/dist/{LabelvaluerangebarWidget-3EaUB6E6.js → LabelvaluerangebarWidget-O8IHjvHs.js} +4 -4
- package/dist/{LabelvaluerangebarWidget-3EaUB6E6.js.map → LabelvaluerangebarWidget-O8IHjvHs.js.map} +1 -1
- package/dist/Layout-DDewLzbI.cjs +2 -0
- package/dist/{Layout-U0MXDxLO.cjs.map → Layout-DDewLzbI.cjs.map} +1 -1
- package/dist/{Layout-DNR3xnku.js → Layout-DW5yNlp7.js} +2 -2
- package/dist/{Layout-DNR3xnku.js.map → Layout-DW5yNlp7.js.map} +1 -1
- package/dist/{LedWidget-MAyRDM2n.cjs → LedWidget-Cif7vC7q.cjs} +2 -2
- package/dist/{LedWidget-MAyRDM2n.cjs.map → LedWidget-Cif7vC7q.cjs.map} +1 -1
- package/dist/{LedWidget-Gi6GXtrW.js → LedWidget-DUvJ2v8k.js} +4 -4
- package/dist/{LedWidget-Gi6GXtrW.js.map → LedWidget-DUvJ2v8k.js.map} +1 -1
- package/dist/{LimitsbarWidget-BTZQY9XQ.js → LimitsbarWidget-BehZv0-k.js} +2 -2
- package/dist/{LimitsbarWidget-BTZQY9XQ.js.map → LimitsbarWidget-BehZv0-k.js.map} +1 -1
- package/dist/{LimitsbarWidget-ytyfCphX.cjs → LimitsbarWidget-BodNPbuH.cjs} +2 -2
- package/dist/{LimitsbarWidget-ytyfCphX.cjs.map → LimitsbarWidget-BodNPbuH.cjs.map} +1 -1
- package/dist/{LimitscolorWidget-CeZYYSQn.cjs → LimitscolorWidget-DPhymKgB.cjs} +2 -2
- package/dist/{LimitscolorWidget-CeZYYSQn.cjs.map → LimitscolorWidget-DPhymKgB.cjs.map} +1 -1
- package/dist/{LimitscolorWidget-CFnmvlrA.js → LimitscolorWidget-FXT0ZPPH.js} +2 -2
- package/dist/{LimitscolorWidget-CFnmvlrA.js.map → LimitscolorWidget-FXT0ZPPH.js.map} +1 -1
- package/dist/{LimitscolumnWidget-CXzLYznR.cjs → LimitscolumnWidget-C5yozwf0.cjs} +2 -2
- package/dist/{LimitscolumnWidget-CXzLYznR.cjs.map → LimitscolumnWidget-C5yozwf0.cjs.map} +1 -1
- package/dist/{LimitscolumnWidget-DSsz36tT.js → LimitscolumnWidget-CjBy-CCI.js} +2 -2
- package/dist/{LimitscolumnWidget-DSsz36tT.js.map → LimitscolumnWidget-CjBy-CCI.js.map} +1 -1
- package/dist/{LinegraphWidget-WVSJOuTE.cjs → LinegraphWidget-dO_B0T3E.cjs} +2 -2
- package/dist/{LinegraphWidget-WVSJOuTE.cjs.map → LinegraphWidget-dO_B0T3E.cjs.map} +1 -1
- package/dist/{LinegraphWidget-CeBijgDo.js → LinegraphWidget-lmu_tFKd.js} +4 -4
- package/dist/{LinegraphWidget-CeBijgDo.js.map → LinegraphWidget-lmu_tFKd.js.map} +1 -1
- package/dist/{MatrixbycolumnsWidget-COWMt_-r.cjs → MatrixbycolumnsWidget-BLkwvpMk.cjs} +2 -2
- package/dist/{MatrixbycolumnsWidget-COWMt_-r.cjs.map → MatrixbycolumnsWidget-BLkwvpMk.cjs.map} +1 -1
- package/dist/{MatrixbycolumnsWidget-DX9uhjAv.js → MatrixbycolumnsWidget-CCF7rCkV.js} +3 -3
- package/dist/{MatrixbycolumnsWidget-DX9uhjAv.js.map → MatrixbycolumnsWidget-CCF7rCkV.js.map} +1 -1
- package/dist/{MicroservicesTab-BSSCh5Ss.js → MicroservicesTab-rxOATXLO.js} +3 -3
- package/dist/{MicroservicesTab-BSSCh5Ss.js.map → MicroservicesTab-rxOATXLO.js.map} +1 -1
- package/dist/{MicroservicesTab-Btw8r_9N.cjs → MicroservicesTab-uesXuuM4.cjs} +2 -2
- package/dist/{MicroservicesTab-Btw8r_9N.cjs.map → MicroservicesTab-uesXuuM4.cjs.map} +1 -1
- package/dist/{Openc3Screen-DIN4KVsw.cjs → Openc3Screen-CzD9BB0M.cjs} +2 -2
- package/dist/{Openc3Screen-DIN4KVsw.cjs.map → Openc3Screen-CzD9BB0M.cjs.map} +1 -1
- package/dist/{Openc3Screen-iW_gaikc.js → Openc3Screen-DcIIUO63.js} +3 -3
- package/dist/{Openc3Screen-iW_gaikc.js.map → Openc3Screen-DcIIUO63.js.map} +1 -1
- package/dist/{OutputDialog-BMzp6wy3.js → OutputDialog-CNH74LpJ.js} +2 -2
- package/dist/{OutputDialog-BMzp6wy3.js.map → OutputDialog-CNH74LpJ.js.map} +1 -1
- package/dist/{OutputDialog-CKObLICh.cjs → OutputDialog-QIabyvK1.cjs} +2 -2
- package/dist/{OutputDialog-CKObLICh.cjs.map → OutputDialog-QIabyvK1.cjs.map} +1 -1
- package/dist/{PackagesTab-BascLTCK.js → PackagesTab-BE6W7Aru.js} +3 -3
- package/dist/{PackagesTab-BascLTCK.js.map → PackagesTab-BE6W7Aru.js.map} +1 -1
- package/dist/{PackagesTab-D_1kbMkk.cjs → PackagesTab-PEPT4CQu.cjs} +2 -2
- package/dist/{PackagesTab-D_1kbMkk.cjs.map → PackagesTab-PEPT4CQu.cjs.map} +1 -1
- package/dist/{PluginsTab-Yz9HZqpp.js → PluginsTab-B_Pf2A9c.js} +4 -4
- package/dist/{PluginsTab-Yz9HZqpp.js.map → PluginsTab-B_Pf2A9c.js.map} +1 -1
- package/dist/{PluginsTab-CjYoMrbj.cjs → PluginsTab-DXf9zX0h.cjs} +2 -2
- package/dist/{PluginsTab-CjYoMrbj.cjs.map → PluginsTab-DXf9zX0h.cjs.map} +1 -1
- package/dist/{ProgressbarWidget-DJepvOip.js → ProgressbarWidget-B5WN658S.js} +2 -2
- package/dist/{ProgressbarWidget-DJepvOip.js.map → ProgressbarWidget-B5WN658S.js.map} +1 -1
- package/dist/{ProgressbarWidget-BUSOhcZ3.cjs → ProgressbarWidget-D2NHSJny.cjs} +2 -2
- package/dist/{ProgressbarWidget-BUSOhcZ3.cjs.map → ProgressbarWidget-D2NHSJny.cjs.map} +1 -1
- package/dist/{RadiobuttonWidget-4e8ROIfg.js → RadiobuttonWidget-B_3nys46.js} +2 -2
- package/dist/{RadiobuttonWidget-4e8ROIfg.js.map → RadiobuttonWidget-B_3nys46.js.map} +1 -1
- package/dist/{RadiobuttonWidget-D4Fka1eN.cjs → RadiobuttonWidget-DkG9GtAy.cjs} +2 -2
- package/dist/{RadiobuttonWidget-D4Fka1eN.cjs.map → RadiobuttonWidget-DkG9GtAy.cjs.map} +1 -1
- package/dist/{RadiogroupWidget-CUucj6aT.js → RadiogroupWidget-BiMIL9li.js} +2 -2
- package/dist/{RadiogroupWidget-CUucj6aT.js.map → RadiogroupWidget-BiMIL9li.js.map} +1 -1
- package/dist/{RadiogroupWidget-DU9G6qLq.cjs → RadiogroupWidget-BnUjXU28.cjs} +2 -2
- package/dist/{RadiogroupWidget-DU9G6qLq.cjs.map → RadiogroupWidget-BnUjXU28.cjs.map} +1 -1
- package/dist/{RangebarWidget-DlMJo2o3.cjs → RangebarWidget-CJgtAk5z.cjs} +2 -2
- package/dist/{RangebarWidget-DlMJo2o3.cjs.map → RangebarWidget-CJgtAk5z.cjs.map} +1 -1
- package/dist/{RangebarWidget-Bu4rqlrx.js → RangebarWidget-Dn0GASdi.js} +2 -2
- package/dist/{RangebarWidget-Bu4rqlrx.js.map → RangebarWidget-Dn0GASdi.js.map} +1 -1
- package/dist/{RedisTab-C00rFmdl.js → RedisTab-BsKrL4fD.js} +2 -2
- package/dist/{RedisTab-C00rFmdl.js.map → RedisTab-BsKrL4fD.js.map} +1 -1
- package/dist/{RedisTab-Dz4m_JfV.cjs → RedisTab-C1yaDRSt.cjs} +2 -2
- package/dist/{RedisTab-Dz4m_JfV.cjs.map → RedisTab-C1yaDRSt.cjs.map} +1 -1
- package/dist/{RollupWidget-D-Dx6Dkx.cjs → RollupWidget-B2pGGoET.cjs} +2 -2
- package/dist/{RollupWidget-D-Dx6Dkx.cjs.map → RollupWidget-B2pGGoET.cjs.map} +1 -1
- package/dist/{RollupWidget-ByLvEEau.js → RollupWidget-b62qcG5K.js} +2 -2
- package/dist/{RollupWidget-ByLvEEau.js.map → RollupWidget-b62qcG5K.js.map} +1 -1
- package/dist/{RoutersTab-CyjPaVVb.cjs → RoutersTab-8wGbiPCk.cjs} +2 -2
- package/dist/{RoutersTab-CyjPaVVb.cjs.map → RoutersTab-8wGbiPCk.cjs.map} +1 -1
- package/dist/{RoutersTab-CEe4oS0x.js → RoutersTab-EHz4wDCn.js} +3 -3
- package/dist/{RoutersTab-CEe4oS0x.js.map → RoutersTab-EHz4wDCn.js.map} +1 -1
- package/dist/{ScriptChooser-B83Pgq2H.cjs → ScriptChooser-CtV7dDJS.cjs} +2 -2
- package/dist/{ScriptChooser-B83Pgq2H.cjs.map → ScriptChooser-CtV7dDJS.cjs.map} +1 -1
- package/dist/{ScriptChooser-CbVbI0x-.js → ScriptChooser-DMPY3m8a.js} +4 -4
- package/dist/{ScriptChooser-CbVbI0x-.js.map → ScriptChooser-DMPY3m8a.js.map} +1 -1
- package/dist/{ScrollwindowWidget-0UcfntpY.cjs → ScrollwindowWidget-ByJRy528.cjs} +2 -2
- package/dist/{ScrollwindowWidget-0UcfntpY.cjs.map → ScrollwindowWidget-ByJRy528.cjs.map} +1 -1
- package/dist/{ScrollwindowWidget-CXJ9QGN1.js → ScrollwindowWidget-Dn29gs-U.js} +3 -3
- package/dist/{ScrollwindowWidget-CXJ9QGN1.js.map → ScrollwindowWidget-Dn29gs-U.js.map} +1 -1
- package/dist/{SecretsTab-DFrxV8Q8.js → SecretsTab-Cbt_r-1I.js} +2 -2
- package/dist/{SecretsTab-DFrxV8Q8.js.map → SecretsTab-Cbt_r-1I.js.map} +1 -1
- package/dist/{SecretsTab-B07A5MeK.cjs → SecretsTab-DSMFodJM.cjs} +2 -2
- package/dist/{SecretsTab-B07A5MeK.cjs.map → SecretsTab-DSMFodJM.cjs.map} +1 -1
- package/dist/{SettingsTab-CDaG6VS1.cjs → SettingsTab-8Zeg3G0C.cjs} +2 -2
- package/dist/{SettingsTab-CDaG6VS1.cjs.map → SettingsTab-8Zeg3G0C.cjs.map} +1 -1
- package/dist/{SettingsTab-CpLxrjTc.js → SettingsTab-L5xbCAW_.js} +4 -4
- package/dist/{SettingsTab-CpLxrjTc.js.map → SettingsTab-L5xbCAW_.js.map} +1 -1
- package/dist/{SignalWidget-DhS8nGJu.cjs → SignalWidget-CEmQymzQ.cjs} +2 -2
- package/dist/{SignalWidget-DhS8nGJu.cjs.map → SignalWidget-CEmQymzQ.cjs.map} +1 -1
- package/dist/{SignalWidget-qvL2YZJA.js → SignalWidget-CLi6qask.js} +2 -2
- package/dist/{SignalWidget-qvL2YZJA.js.map → SignalWidget-CLi6qask.js.map} +1 -1
- package/dist/{SimpleTextDialog--iSWgPgq.js → SimpleTextDialog-8vDPDt6X.js} +2 -2
- package/dist/{SimpleTextDialog--iSWgPgq.js.map → SimpleTextDialog-8vDPDt6X.js.map} +1 -1
- package/dist/{SimpleTextDialog-tZ7qO1zq.cjs → SimpleTextDialog-CJ8pLBGz.cjs} +2 -2
- package/dist/{SimpleTextDialog-tZ7qO1zq.cjs.map → SimpleTextDialog-CJ8pLBGz.cjs.map} +1 -1
- package/dist/{SpacerWidget-CaWx41K7.js → SpacerWidget-BCA3gdap.js} +2 -2
- package/dist/{SpacerWidget-CaWx41K7.js.map → SpacerWidget-BCA3gdap.js.map} +1 -1
- package/dist/{SpacerWidget-CUrYZDLP.cjs → SpacerWidget-BJpqoaeP.cjs} +2 -2
- package/dist/{SpacerWidget-CUrYZDLP.cjs.map → SpacerWidget-BJpqoaeP.cjs.map} +1 -1
- package/dist/{SparklineWidget-BOnHnJOh.cjs → SparklineWidget-CIkMm4O-.cjs} +2 -2
- package/dist/{SparklineWidget-BOnHnJOh.cjs.map → SparklineWidget-CIkMm4O-.cjs.map} +1 -1
- package/dist/{SparklineWidget-BkNSRypJ.js → SparklineWidget-D8mb4zLt.js} +4 -4
- package/dist/{SparklineWidget-BkNSRypJ.js.map → SparklineWidget-D8mb4zLt.js.map} +1 -1
- package/dist/{TabbookWidget-MsrRG1vn.js → TabbookWidget-Bkt4g02d.js} +2 -2
- package/dist/{TabbookWidget-MsrRG1vn.js.map → TabbookWidget-Bkt4g02d.js.map} +1 -1
- package/dist/{TabbookWidget-BTvyYn7i.cjs → TabbookWidget-DqcScWwW.cjs} +2 -2
- package/dist/{TabbookWidget-BTvyYn7i.cjs.map → TabbookWidget-DqcScWwW.cjs.map} +1 -1
- package/dist/{TargetPacketItemChooser-CmjEcxN3.cjs → TargetPacketItemChooser-Cm6mQvhI.cjs} +2 -2
- package/dist/{TargetPacketItemChooser-CmjEcxN3.cjs.map → TargetPacketItemChooser-Cm6mQvhI.cjs.map} +1 -1
- package/dist/{TargetPacketItemChooser-oSQHf8Ht.js → TargetPacketItemChooser-DGcXvdTX.js} +2 -2
- package/dist/{TargetPacketItemChooser-oSQHf8Ht.js.map → TargetPacketItemChooser-DGcXvdTX.js.map} +1 -1
- package/dist/{TargetsTab-DwFb3_1K.cjs → TargetsTab-C4tQ1auc.cjs} +2 -2
- package/dist/{TargetsTab-DwFb3_1K.cjs.map → TargetsTab-C4tQ1auc.cjs.map} +1 -1
- package/dist/{TargetsTab-B6tf2hKl.js → TargetsTab-c-qMsGHh.js} +3 -3
- package/dist/{TargetsTab-B6tf2hKl.js.map → TargetsTab-c-qMsGHh.js.map} +1 -1
- package/dist/{TextboxWidget-CPmQEhMm.cjs → TextboxWidget-BcRfHcF6.cjs} +2 -2
- package/dist/{TextboxWidget-CPmQEhMm.cjs.map → TextboxWidget-BcRfHcF6.cjs.map} +1 -1
- package/dist/{TextboxWidget-DbwpPVGB.js → TextboxWidget-CR05wO-t.js} +4 -4
- package/dist/{TextboxWidget-DbwpPVGB.js.map → TextboxWidget-CR05wO-t.js.map} +1 -1
- package/dist/{TextfieldWidget-DzMlTMYW.js → TextfieldWidget-Be_Pz2bF.js} +2 -2
- package/dist/{TextfieldWidget-DzMlTMYW.js.map → TextfieldWidget-Be_Pz2bF.js.map} +1 -1
- package/dist/{TextfieldWidget-BzaNs7J4.cjs → TextfieldWidget-Ct1hZr2M.cjs} +2 -2
- package/dist/{TextfieldWidget-BzaNs7J4.cjs.map → TextfieldWidget-Ct1hZr2M.cjs.map} +1 -1
- package/dist/{TimeWidget-DksEVe5c.cjs → TimeWidget-3M7CQ893.cjs} +2 -2
- package/dist/{TimeWidget-DksEVe5c.cjs.map → TimeWidget-3M7CQ893.cjs.map} +1 -1
- package/dist/{TimeWidget-BHybAfg8.js → TimeWidget-Dy8zpkC6.js} +2 -2
- package/dist/{TimeWidget-BHybAfg8.js.map → TimeWidget-Dy8zpkC6.js.map} +1 -1
- package/dist/{TitleWidget-DL_sE5YE.js → TitleWidget-BcmxUDzM.js} +2 -2
- package/dist/{TitleWidget-DL_sE5YE.js.map → TitleWidget-BcmxUDzM.js.map} +1 -1
- package/dist/{TitleWidget-C7_pj0lU.cjs → TitleWidget-C1qzja9l.cjs} +2 -2
- package/dist/{TitleWidget-C7_pj0lU.cjs.map → TitleWidget-C1qzja9l.cjs.map} +1 -1
- package/dist/{ToolsTab-CXoxIck8.js → ToolsTab-Buklih4C.js} +3 -3
- package/dist/{ToolsTab-CXoxIck8.js.map → ToolsTab-Buklih4C.js.map} +1 -1
- package/dist/{ToolsTab-DTL8ujgd.cjs → ToolsTab-CbY2K86w.cjs} +2 -2
- package/dist/{ToolsTab-DTL8ujgd.cjs.map → ToolsTab-CbY2K86w.cjs.map} +1 -1
- package/dist/{TopBar-B8LJESUg.js → TopBar-D4C9DJcu.js} +2 -2
- package/dist/{TopBar-B8LJESUg.js.map → TopBar-D4C9DJcu.js.map} +1 -1
- package/dist/{TopBar-CGSMcenK.cjs → TopBar-HxaiWynT.cjs} +2 -2
- package/dist/{TopBar-CGSMcenK.cjs.map → TopBar-HxaiWynT.cjs.map} +1 -1
- package/dist/{UpgradeToEnterpriseDialog-CqnhQ8So.js → UpgradeToEnterpriseDialog-D0AGxldj.js} +2 -2
- package/dist/{UpgradeToEnterpriseDialog-CqnhQ8So.js.map → UpgradeToEnterpriseDialog-D0AGxldj.js.map} +1 -1
- package/dist/{UpgradeToEnterpriseDialog-Dv_egyCM.cjs → UpgradeToEnterpriseDialog-D8BkzmVD.cjs} +2 -2
- package/dist/{UpgradeToEnterpriseDialog-Dv_egyCM.cjs.map → UpgradeToEnterpriseDialog-D8BkzmVD.cjs.map} +1 -1
- package/dist/{UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-C3WTK6F-.js → UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-B8ikVCn7.js} +6 -6
- package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-B8ikVCn7.js.map +1 -0
- package/dist/{UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-RGlL9jUF.cjs → UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-CP8T5W6m.cjs} +67 -67
- package/dist/{UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-RGlL9jUF.cjs.map → UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-CP8T5W6m.cjs.map} +1 -1
- package/dist/{VWidget-D06LY-Yc.js → VWidget-CBmUpKSV.js} +3 -3
- package/dist/{VWidget-D06LY-Yc.js.map → VWidget-CBmUpKSV.js.map} +1 -1
- package/dist/{VWidget-CTcOKw09.cjs → VWidget-DhGLFGS2.cjs} +2 -2
- package/dist/{VWidget-CTcOKw09.cjs.map → VWidget-DhGLFGS2.cjs.map} +1 -1
- package/dist/{ValueWidget-CGT0LV_n.js → ValueWidget-BxWrHkYY.js} +4 -4
- package/dist/{ValueWidget-CGT0LV_n.js.map → ValueWidget-BxWrHkYY.js.map} +1 -1
- package/dist/{ValueWidget-C2qn7lVq.cjs → ValueWidget-yuZ8tPzG.cjs} +2 -2
- package/dist/{ValueWidget-C2qn7lVq.cjs.map → ValueWidget-yuZ8tPzG.cjs.map} +1 -1
- package/dist/{ValuelimitsbarWidget-CmpyPO-1.js → ValuelimitsbarWidget-BdY02gqc.js} +4 -4
- package/dist/{ValuelimitsbarWidget-CmpyPO-1.js.map → ValuelimitsbarWidget-BdY02gqc.js.map} +1 -1
- package/dist/{ValuelimitsbarWidget-_lEKCmQl.cjs → ValuelimitsbarWidget-KsFz7ipK.cjs} +2 -2
- package/dist/{ValuelimitsbarWidget-_lEKCmQl.cjs.map → ValuelimitsbarWidget-KsFz7ipK.cjs.map} +1 -1
- package/dist/{ValuelimitscolumnWidget-0urjo-hR.cjs → ValuelimitscolumnWidget-B0HGnyS5.cjs} +2 -2
- package/dist/{ValuelimitscolumnWidget-0urjo-hR.cjs.map → ValuelimitscolumnWidget-B0HGnyS5.cjs.map} +1 -1
- package/dist/{ValuelimitscolumnWidget-jzxrQd-f.js → ValuelimitscolumnWidget-CuJ6rqtC.js} +4 -4
- package/dist/{ValuelimitscolumnWidget-jzxrQd-f.js.map → ValuelimitscolumnWidget-CuJ6rqtC.js.map} +1 -1
- package/dist/{ValuerangebarWidget-C8ckuAeh.js → ValuerangebarWidget-C5rolGDi.js} +4 -4
- package/dist/{ValuerangebarWidget-C8ckuAeh.js.map → ValuerangebarWidget-C5rolGDi.js.map} +1 -1
- package/dist/{ValuerangebarWidget-lXHRe4YZ.cjs → ValuerangebarWidget-CDJeamPr.cjs} +2 -2
- package/dist/{ValuerangebarWidget-lXHRe4YZ.cjs.map → ValuerangebarWidget-CDJeamPr.cjs.map} +1 -1
- package/dist/{VerticalWidget-qN82km_m.js → VerticalWidget-DsnEzKZ2.js} +2 -2
- package/dist/{VerticalWidget-qN82km_m.js.map → VerticalWidget-DsnEzKZ2.js.map} +1 -1
- package/dist/{VerticalWidget-XBSrdA2c.cjs → VerticalWidget-wuRCrd7Q.cjs} +2 -2
- package/dist/{VerticalWidget-XBSrdA2c.cjs.map → VerticalWidget-wuRCrd7Q.cjs.map} +1 -1
- package/dist/{VerticalboxWidget-CiJZDlHJ.js → VerticalboxWidget-CzDgveBl.js} +5 -5
- package/dist/{VerticalboxWidget-CiJZDlHJ.js.map → VerticalboxWidget-CzDgveBl.js.map} +1 -1
- package/dist/{VerticalboxWidget-1FHkgmf0.cjs → VerticalboxWidget-D-3H1PYU.cjs} +2 -2
- package/dist/{VerticalboxWidget-1FHkgmf0.cjs.map → VerticalboxWidget-D-3H1PYU.cjs.map} +1 -1
- package/dist/{Widget-BwvnfXRa.cjs → Widget-CKianvfR.cjs} +2 -2
- package/dist/{Widget-BwvnfXRa.cjs.map → Widget-CKianvfR.cjs.map} +1 -1
- package/dist/{Widget-DXvVFSH5.js → Widget-VCl8Ts8s.js} +2 -2
- package/dist/{Widget-DXvVFSH5.js.map → Widget-VCl8Ts8s.js.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +12 -12
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.cjs.map +1 -1
- package/dist/plugins.js +1 -1
- package/dist/plugins.js.map +1 -1
- package/dist/purify.es-B608WQkR.cjs +3 -0
- package/dist/purify.es-B608WQkR.cjs.map +1 -0
- package/dist/{purify.es-BuxjWxA2.js → purify.es-BGaRrCfO.js} +144 -144
- package/dist/purify.es-BGaRrCfO.js.map +1 -0
- package/dist/{settings-DRNFiuf0.js → settings-DlX9yvJJ.js} +2 -2
- package/dist/{settings-DRNFiuf0.js.map → settings-DlX9yvJJ.js.map} +1 -1
- package/dist/{settings-s8NuYKD-.cjs → settings-sg_XHXQ-.cjs} +2 -2
- package/dist/{settings-s8NuYKD-.cjs.map → settings-sg_XHXQ-.cjs.map} +1 -1
- package/dist/tools/admin.cjs +1 -1
- package/dist/tools/admin.js +12 -12
- package/dist/tools/base.cjs +1 -1
- package/dist/tools/base.js +4 -4
- package/dist/tools/calendar.cjs +1 -1
- package/dist/tools/calendar.js +1 -1
- package/dist/tools/scriptrunner.cjs +8 -8
- package/dist/tools/scriptrunner.cjs.map +1 -1
- package/dist/tools/scriptrunner.js +774 -772
- package/dist/tools/scriptrunner.js.map +1 -1
- package/dist/vue-common.css +1 -1
- package/dist/widgets.cjs +1 -1
- package/dist/widgets.js +63 -63
- package/package.json +7 -7
- package/dist/Layout-U0MXDxLO.cjs +0 -2
- package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-C3WTK6F-.js.map +0 -1
- package/dist/purify.es-BuxjWxA2.js.map +0 -1
- package/dist/purify.es-d7tb6jjJ.cjs +0 -3
- package/dist/purify.es-d7tb6jjJ.cjs.map +0 -1
|
@@ -163,26 +163,26 @@
|
|
|
163
163
|
.ace-tm .ace_indent-guide-active {
|
|
164
164
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
165
165
|
}
|
|
166
|
-
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,u,$){u.isDark=!1,u.cssClass="ace-tm",u.cssText=e("./textmate-css"),u.$id="ace/theme/textmate";var b=e("../lib/dom");b.importCssString(u.cssText,u.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(e,u,$){"no use strict";var b=e("./lib/lang"),v=e("./lib/net"),x=e("./lib/dom"),p=e("./lib/app_config").AppConfig;$.exports=u=new p;var d={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};u.get=function(r){if(!d.hasOwnProperty(r))throw new Error("Unknown config key: "+r);return d[r]},u.set=function(r,n){if(d.hasOwnProperty(r))d[r]=n;else if(this.setDefaultValue("",r,n)==!1)throw new Error("Unknown config key: "+r);r=="useStrictCSP"&&x.useStrictCSP(n)},u.all=function(){return b.copyObject(d)},u.$modes={},u.moduleUrl=function(r,n){if(d.$moduleUrls[r])return d.$moduleUrls[r];var i=r.split("/");n=n||i[i.length-2]||"";var h=n=="snippets"?"/":"-",m=i[i.length-1];if(n=="worker"&&h=="-"){var y=new RegExp("^"+n+"[\\-_]|[\\-_]"+n+"$","g");m=m.replace(y,"")}(!m||m==n)&&i.length>1&&(m=i[i.length-2]);var R=d[n+"Path"];return R==null?R=d.basePath:h=="/"&&(n=h=""),R&&R.slice(-1)!="/"&&(R+="/"),R+n+h+m+this.get("suffix")},u.setModuleUrl=function(r,n){return d.$moduleUrls[r]=n};var o=function(r,n){if(r==="ace/theme/textmate"||r==="./theme/textmate")return n(null,e("./theme/textmate"));if(a)return a(r,n);console.error("loader is not configured")},a;u.setLoader=function(r){a=r},u.dynamicModules=Object.create(null),u.$loading={},u.$loaded={},u.loadModule=function(r,n){var i;if(Array.isArray(r))var h=r[0],m=r[1];else if(typeof r=="string")var m=r;var y=function(R){if(R&&!u.$loading[m])return n&&n(R);if(u.$loading[m]||(u.$loading[m]=[]),u.$loading[m].push(n),!(u.$loading[m].length>1)){var T=function(){o(m,function(C,w){w&&(u.$loaded[m]=w),u._emit("load.module",{name:m,module:w});var E=u.$loading[m];u.$loading[m]=null,E.forEach(function(D){D&&D(w)})})};if(!u.get("packaged"))return T();v.loadScript(u.moduleUrl(m,h),T),s()}};if(u.dynamicModules[m])u.dynamicModules[m]().then(function(R){R.default?y(R.default):y(R)});else{try{i=this.$require(m)}catch{}y(i||u.$loaded[m])}},u.$require=function(r){if(typeof $.require=="function"){var n="require";return $[n](r)}},u.setModuleLoader=function(r,n){u.dynamicModules[r]=n};var s=function(){!d.basePath&&!d.workerPath&&!d.modePath&&!d.themePath&&!Object.keys(d.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),s=function(){})};u.version="1.43.4"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,u,$){e("./lib/fixoldbrowsers");var b=e("./config");b.setLoader(function(d,o){e([d],function(a){o(null,a)})});var v=function(){return this||typeof window<"u"&&window}();$.exports=function(d){b.init=x,b.$require=e,d.require=e},x(!0);function x(d){if(!(!v||!v.document)){b.set("packaged",d||e.packaged||$.packaged||v.define&&(void 0).packaged);var o={},a="",s=document.currentScript||document._currentScript,r=s&&s.ownerDocument||document;s&&s.src&&(a=s.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var n=r.getElementsByTagName("script"),i=0;i<n.length;i++){var h=n[i],m=h.src||h.getAttribute("src");if(m){for(var y=h.attributes,R=0,T=y.length;R<T;R++){var C=y[R];C.name.indexOf("data-ace-")===0&&(o[p(C.name.replace(/^data-ace-/,""))]=C.value)}var w=m.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);w&&(a=w[1])}}a&&(o.base=o.base||a,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base;for(var E in o)typeof o[E]<"u"&&b.set(E,o[E])}}function p(d){return d.replace(/-(.)/g,function(o,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,u,$){var b=function(){function v(x,p,d,o){this.start={row:x,column:p},this.end={row:d,column:o}}return v.prototype.isEqual=function(x){return this.start.row===x.start.row&&this.end.row===x.end.row&&this.start.column===x.start.column&&this.end.column===x.end.column},v.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},v.prototype.contains=function(x,p){return this.compare(x,p)==0},v.prototype.compareRange=function(x){var p,d=x.end,o=x.start;return p=this.compare(d.row,d.column),p==1?(p=this.compare(o.row,o.column),p==1?2:p==0?1:0):p==-1?-2:(p=this.compare(o.row,o.column),p==-1?-1:p==1?42:0)},v.prototype.comparePoint=function(x){return this.compare(x.row,x.column)},v.prototype.containsRange=function(x){return this.comparePoint(x.start)==0&&this.comparePoint(x.end)==0},v.prototype.intersects=function(x){var p=this.compareRange(x);return p==-1||p==0||p==1},v.prototype.isEnd=function(x,p){return this.end.row==x&&this.end.column==p},v.prototype.isStart=function(x,p){return this.start.row==x&&this.start.column==p},v.prototype.setStart=function(x,p){typeof x=="object"?(this.start.column=x.column,this.start.row=x.row):(this.start.row=x,this.start.column=p)},v.prototype.setEnd=function(x,p){typeof x=="object"?(this.end.column=x.column,this.end.row=x.row):(this.end.row=x,this.end.column=p)},v.prototype.inside=function(x,p){return this.compare(x,p)==0?!(this.isEnd(x,p)||this.isStart(x,p)):!1},v.prototype.insideStart=function(x,p){return this.compare(x,p)==0?!this.isEnd(x,p):!1},v.prototype.insideEnd=function(x,p){return this.compare(x,p)==0?!this.isStart(x,p):!1},v.prototype.compare=function(x,p){return!this.isMultiLine()&&x===this.start.row?p<this.start.column?-1:p>this.end.column?1:0:x<this.start.row?-1:x>this.end.row?1:this.start.row===x?p>=this.start.column?0:-1:this.end.row===x?p<=this.end.column?0:1:0},v.prototype.compareStart=function(x,p){return this.start.row==x&&this.start.column==p?-1:this.compare(x,p)},v.prototype.compareEnd=function(x,p){return this.end.row==x&&this.end.column==p?1:this.compare(x,p)},v.prototype.compareInside=function(x,p){return this.end.row==x&&this.end.column==p?1:this.start.row==x&&this.start.column==p?-1:this.compare(x,p)},v.prototype.clipRows=function(x,p){if(this.end.row>p)var d={row:p+1,column:0};else if(this.end.row<x)var d={row:x,column:0};if(this.start.row>p)var o={row:p+1,column:0};else if(this.start.row<x)var o={row:x,column:0};return v.fromPoints(o||this.start,d||this.end)},v.prototype.extend=function(x,p){var d=this.compare(x,p);if(d==0)return this;if(d==-1)var o={row:x,column:p};else var a={row:x,column:p};return v.fromPoints(o||this.start,a||this.end)},v.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},v.prototype.isMultiLine=function(){return this.start.row!==this.end.row},v.prototype.clone=function(){return v.fromPoints(this.start,this.end)},v.prototype.collapseRows=function(){return this.end.column==0?new v(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new v(this.start.row,0,this.end.row,0)},v.prototype.toScreenRange=function(x){var p=x.documentToScreenPosition(this.start),d=x.documentToScreenPosition(this.end);return new v(p.row,p.column,d.row,d.column)},v.prototype.moveBy=function(x,p){this.start.row+=x,this.start.column+=p,this.end.row+=x,this.end.column+=p},v}();b.fromPoints=function(v,x){return new b(v.row,v.column,x.row,x.column)},b.comparePoints=function(v,x){return v.row-x.row||v.column-x.column},u.Range=b}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,u,$){for(var b=e("./oop"),v={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},x={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},p=0;p<10;p++)x["Digit"+p]=48+p,x["Numpad"+p]=96+p,v.PRINTABLE_KEYS[48+p]=""+p,v.FUNCTION_KEYS[96+p]="Numpad"+p;for(var p=65;p<91;p++){var d=String.fromCharCode(p+32);x["Key"+d.toUpperCase()]=p,v.PRINTABLE_KEYS[p]=d}for(var p=1;p<13;p++)x["F"+p]=111+p,v.FUNCTION_KEYS[111+p]="F"+p;var o={Shift:16,Control:17,Alt:18,Meta:224};for(var a in o)x[a]=x[a+"Left"]=x[a+"Right"]=o[a];u.$codeToKeyCode=x,v.PRINTABLE_KEYS[173]="-";for(var s in v.FUNCTION_KEYS){var r=v.FUNCTION_KEYS[s].toLowerCase();v[r]=parseInt(s,10)}for(var s in v.PRINTABLE_KEYS){var r=v.PRINTABLE_KEYS[s].toLowerCase();v[r]=parseInt(s,10)}b.mixin(v,v.MODIFIER_KEYS),b.mixin(v,v.PRINTABLE_KEYS),b.mixin(v,v.FUNCTION_KEYS),v.enter=v.return,v.escape=v.esc,v.del=v.delete,function(){for(var n=["cmd","ctrl","alt","shift"],i=Math.pow(2,n.length);i--;)v.KEY_MODS[i]=n.filter(function(h){return i&v.KEY_MODS[h]}).join("-")+"-"}(),v.KEY_MODS[0]="",v.KEY_MODS[-1]="input-",b.mixin(u,v),u.default=u,u.keyCodeToString=function(n){var i=v[n];return typeof i!="string"&&(i=String.fromCharCode(n)),i.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,u,$){var b=e("./keys"),v=e("./useragent"),x=null,p=0,d;function o(){d=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return d={passive:!1},!0}})}catch{}}function a(){return d==null&&o(),d}function s(R,T,C){this.elem=R,this.type=T,this.callback=C}s.prototype.destroy=function(){n(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var r=u.addListener=function(R,T,C,w){R.addEventListener(T,C,a()),w&&w.$toDestroy.push(new s(R,T,C))},n=u.removeListener=function(R,T,C){R.removeEventListener(T,C,a())};u.stopEvent=function(R){return u.stopPropagation(R),u.preventDefault(R),!1},u.stopPropagation=function(R){R.stopPropagation&&R.stopPropagation()},u.preventDefault=function(R){R.preventDefault&&R.preventDefault()},u.getButton=function(R){return R.type=="dblclick"?0:R.type=="contextmenu"||v.isMac&&R.ctrlKey&&!R.altKey&&!R.shiftKey?2:R.button},u.capture=function(R,T,C){var w=R&&R.ownerDocument||document;function E(D){T&&T(D),C&&C(D),n(w,"mousemove",T),n(w,"mouseup",E),n(w,"dragstart",E)}return r(w,"mousemove",T),r(w,"mouseup",E),r(w,"dragstart",E),E},u.addMouseWheelListener=function(R,T,C){r(R,"wheel",function(w){var E=.15,D=w.deltaX||0,I=w.deltaY||0;switch(w.deltaMode){case w.DOM_DELTA_PIXEL:w.wheelX=D*E,w.wheelY=I*E;break;case w.DOM_DELTA_LINE:var L=15;w.wheelX=D*L,w.wheelY=I*L;break;case w.DOM_DELTA_PAGE:var z=150;w.wheelX=D*z,w.wheelY=I*z;break}T(w)},C)},u.addMultiMouseDownListener=function(R,T,C,w,E){var D=0,I,L,z,F={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(A){if(u.getButton(A)!==0?D=0:A.detail>1?(D++,D>4&&(D=1)):D=1,v.isIE){var S=Math.abs(A.clientX-I)>5||Math.abs(A.clientY-L)>5;(!z||S)&&(D=1),z&&clearTimeout(z),z=setTimeout(function(){z=null},T[D-1]||600),D==1&&(I=A.clientX,L=A.clientY)}if(A._clicks=D,C[w]("mousedown",A),D>4)D=0;else if(D>1)return C[w](F[D],A)}Array.isArray(R)||(R=[R]),R.forEach(function(A){r(A,"mousedown",O,E)})};function i(R){return 0|(R.ctrlKey?1:0)|(R.altKey?2:0)|(R.shiftKey?4:0)|(R.metaKey?8:0)}u.getModifierString=function(R){return b.KEY_MODS[i(R)]};function h(R,T,C){var w=i(T);if(!C&&T.code&&(C=b.$codeToKeyCode[T.code]||C),!v.isMac&&x){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(w|=8),x.altGr)if((3&w)!=3)x.altGr=0;else return;if(C===18||C===17){var E=T.location;if(C===17&&E===1)x[C]==1&&(p=T.timeStamp);else if(C===18&&w===3&&E===2){var D=T.timeStamp-p;D<50&&(x.altGr=!0)}}}if(C in b.MODIFIER_KEYS&&(C=-1),!(!w&&C===13&&T.location===3&&(R(T,w,-C),T.defaultPrevented))){if(v.isChromeOS&&w&8){if(R(T,w,C),T.defaultPrevented)return;w&=-9}return!w&&!(C in b.FUNCTION_KEYS)&&!(C in b.PRINTABLE_KEYS)?!1:R(T,w,C)}}u.addCommandKeyListener=function(R,T,C){var w=null;r(R,"keydown",function(E){x[E.keyCode]=(x[E.keyCode]||0)+1;var D=h(T,E,E.keyCode);return w=E.defaultPrevented,D},C),r(R,"keypress",function(E){w&&(E.ctrlKey||E.altKey||E.shiftKey||E.metaKey)&&(u.stopEvent(E),w=null)},C),r(R,"keyup",function(E){x[E.keyCode]=null},C),x||(m(),r(window,"focus",m))};function m(){x=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!v.isOldIE){var y=1;u.nextTick=function(R,T){T=T||window;var C="zero-timeout-message-"+y++,w=function(E){E.data==C&&(u.stopPropagation(E),n(T,"message",w),R())};r(T,"message",w),T.postMessage(C,"*")}}u.$idleBlocked=!1,u.onIdle=function(R,T){return setTimeout(function C(){u.$idleBlocked?setTimeout(C,100):R()},T)},u.$idleBlockId=null,u.blockIdle=function(R){u.$idleBlockId&&clearTimeout(u.$idleBlockId),u.$idleBlocked=!0,u.$idleBlockId=setTimeout(function(){u.$idleBlocked=!1},R||100)},u.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),u.nextFrame?u.nextFrame=u.nextFrame.bind(window):u.nextFrame=function(R){setTimeout(R,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,u,$){var b;$.exports={lineMode:!1,pasteCancelled:function(){return b&&b>Date.now()-50?!0:b=!1},cancel:function(){b=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,u,$){var b=e("../lib/event"),v=e("../config").nls,x=e("../lib/useragent"),p=e("../lib/dom"),d=e("../lib/lang"),o=e("../clipboard"),a=x.isChrome<18,s=x.isIE,r=x.isChrome>63,n=400,i=e("../lib/keys"),h=i.KEY_MODS,m=x.isIOS,y=m?/\s/:/\n/,R=x.isMobile,T=function(){function C(w,E){var D=this;this.host=E,this.text=p.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",w.insertBefore(this.text,w.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",R||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),b.addListener(this.text,"blur",function(I){D.ignoreFocusEvents||(E.onBlur(I),D.$isFocused=!1)},E),b.addListener(this.text,"focus",function(I){if(!D.ignoreFocusEvents){if(D.$isFocused=!0,x.isEdge)try{if(!document.hasFocus())return}catch{}E.onFocus(I),x.isEdge?setTimeout(D.resetSelection.bind(D)):D.resetSelection()}},E),this.$focusScroll=!1,E.on("beforeEndOperation",function(){var I=E.curOp,L=I&&I.command&&I.command.name;if(L!="insertstring"){var z=L&&(I.docChanged||I.selectionChanged);D.inComposition&&z&&(D.lastValue=D.text.value="",D.onCompositionEnd()),D.resetSelection()}}),E.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=m?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&E.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,b.addCommandKeyListener(this.text,function(I,L,z){if(!D.inComposition)return E.onCommandKey(I,L,z)},E),b.addListener(this.text,"select",this.onSelect.bind(this),E),b.addListener(this.text,"input",this.onInput.bind(this),E),b.addListener(this.text,"cut",this.onCut.bind(this),E),b.addListener(this.text,"copy",this.onCopy.bind(this),E),b.addListener(this.text,"paste",this.onPaste.bind(this),E),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&b.addListener(w,"keydown",function(I){if(!(x.isMac&&!I.metaKey||!I.ctrlKey))switch(I.keyCode){case 67:D.onCopy(I);break;case 86:D.onPaste(I);break;case 88:D.onCut(I);break}},E),this.syncComposition=d.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),b.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),E),b.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),E),b.addListener(this.text,"keyup",this.onKeyup.bind(this),E),b.addListener(this.text,"keydown",this.syncComposition.bind(this),E),b.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),E),this.closeTimeout,b.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),E),b.addListener(this.text,"mousedown",function(I){I.preventDefault(),D.onContextMenuClose()},E),b.addListener(E.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),E),b.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),E),m&&this.addIosSelectionHandler(w,E,this.text)}return C.prototype.addIosSelectionHandler=function(w,E,D){var I=this,L=null,z=!1;D.addEventListener("keydown",function(O){L&&clearTimeout(L),z=!0},!0),D.addEventListener("keyup",function(O){L=setTimeout(function(){z=!1},100)},!0);var F=function(O){if(document.activeElement===D&&!(z||I.inComposition||E.$mouseHandler.isMousePressed)&&!I.copied){var A=D.selectionStart,S=D.selectionEnd,N=null,B=0;if(A==0?N=i.up:A==1?N=i.home:S>I.lastSelectionEnd&&I.lastValue[S]==`
|
|
167
|
-
`?N=i.end:A<I.lastSelectionStart&&I.lastValue[A-1]==" "?(N=i.left,
|
|
168
|
-
`).length>2?N=i.down:S>I.lastSelectionEnd&&I.lastValue[S-1]==" "?(N=i.right,
|
|
166
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,u,$){u.isDark=!1,u.cssClass="ace-tm",u.cssText=e("./textmate-css"),u.$id="ace/theme/textmate";var b=e("../lib/dom");b.importCssString(u.cssText,u.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(e,u,$){"no use strict";var b=e("./lib/lang"),v=e("./lib/net"),x=e("./lib/dom"),p=e("./lib/app_config").AppConfig;$.exports=u=new p;var d={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};u.get=function(r){if(!d.hasOwnProperty(r))throw new Error("Unknown config key: "+r);return d[r]},u.set=function(r,n){if(d.hasOwnProperty(r))d[r]=n;else if(this.setDefaultValue("",r,n)==!1)throw new Error("Unknown config key: "+r);r=="useStrictCSP"&&x.useStrictCSP(n)},u.all=function(){return b.copyObject(d)},u.$modes={},u.moduleUrl=function(r,n){if(d.$moduleUrls[r])return d.$moduleUrls[r];var i=r.split("/");n=n||i[i.length-2]||"";var h=n=="snippets"?"/":"-",m=i[i.length-1];if(n=="worker"&&h=="-"){var y=new RegExp("^"+n+"[\\-_]|[\\-_]"+n+"$","g");m=m.replace(y,"")}(!m||m==n)&&i.length>1&&(m=i[i.length-2]);var R=d[n+"Path"];return R==null?R=d.basePath:h=="/"&&(n=h=""),R&&R.slice(-1)!="/"&&(R+="/"),R+n+h+m+this.get("suffix")},u.setModuleUrl=function(r,n){return d.$moduleUrls[r]=n};var o=function(r,n){if(r==="ace/theme/textmate"||r==="./theme/textmate")return n(null,e("./theme/textmate"));if(a)return a(r,n);console.error("loader is not configured")},a;u.setLoader=function(r){a=r},u.dynamicModules=Object.create(null),u.$loading={},u.$loaded={},u.loadModule=function(r,n){var i;if(Array.isArray(r))var h=r[0],m=r[1];else if(typeof r=="string")var m=r;var y=function(R){if(R&&!u.$loading[m])return n&&n(R);if(u.$loading[m]||(u.$loading[m]=[]),u.$loading[m].push(n),!(u.$loading[m].length>1)){var T=function(){o(m,function(C,w){w&&(u.$loaded[m]=w),u._emit("load.module",{name:m,module:w});var E=u.$loading[m];u.$loading[m]=null,E.forEach(function(D){D&&D(w)})})};if(!u.get("packaged"))return T();v.loadScript(u.moduleUrl(m,h),T),s()}};if(u.dynamicModules[m])u.dynamicModules[m]().then(function(R){R.default?y(R.default):y(R)});else{try{i=this.$require(m)}catch{}y(i||u.$loaded[m])}},u.$require=function(r){if(typeof $.require=="function"){var n="require";return $[n](r)}},u.setModuleLoader=function(r,n){u.dynamicModules[r]=n};var s=function(){!d.basePath&&!d.workerPath&&!d.modePath&&!d.themePath&&!Object.keys(d.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),s=function(){})};u.version="1.43.5"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,u,$){e("./lib/fixoldbrowsers");var b=e("./config");b.setLoader(function(d,o){e([d],function(a){o(null,a)})});var v=function(){return this||typeof window<"u"&&window}();$.exports=function(d){b.init=x,b.$require=e,d.require=e},x(!0);function x(d){if(!(!v||!v.document)){b.set("packaged",d||e.packaged||$.packaged||v.define&&(void 0).packaged);var o={},a="",s=document.currentScript||document._currentScript,r=s&&s.ownerDocument||document;s&&s.src&&(a=s.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var n=r.getElementsByTagName("script"),i=0;i<n.length;i++){var h=n[i],m=h.src||h.getAttribute("src");if(m){for(var y=h.attributes,R=0,T=y.length;R<T;R++){var C=y[R];C.name.indexOf("data-ace-")===0&&(o[p(C.name.replace(/^data-ace-/,""))]=C.value)}var w=m.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);w&&(a=w[1])}}a&&(o.base=o.base||a,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base;for(var E in o)typeof o[E]<"u"&&b.set(E,o[E])}}function p(d){return d.replace(/-(.)/g,function(o,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,u,$){var b=function(){function v(x,p,d,o){this.start={row:x,column:p},this.end={row:d,column:o}}return v.prototype.isEqual=function(x){return this.start.row===x.start.row&&this.end.row===x.end.row&&this.start.column===x.start.column&&this.end.column===x.end.column},v.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},v.prototype.contains=function(x,p){return this.compare(x,p)==0},v.prototype.compareRange=function(x){var p,d=x.end,o=x.start;return p=this.compare(d.row,d.column),p==1?(p=this.compare(o.row,o.column),p==1?2:p==0?1:0):p==-1?-2:(p=this.compare(o.row,o.column),p==-1?-1:p==1?42:0)},v.prototype.comparePoint=function(x){return this.compare(x.row,x.column)},v.prototype.containsRange=function(x){return this.comparePoint(x.start)==0&&this.comparePoint(x.end)==0},v.prototype.intersects=function(x){var p=this.compareRange(x);return p==-1||p==0||p==1},v.prototype.isEnd=function(x,p){return this.end.row==x&&this.end.column==p},v.prototype.isStart=function(x,p){return this.start.row==x&&this.start.column==p},v.prototype.setStart=function(x,p){typeof x=="object"?(this.start.column=x.column,this.start.row=x.row):(this.start.row=x,this.start.column=p)},v.prototype.setEnd=function(x,p){typeof x=="object"?(this.end.column=x.column,this.end.row=x.row):(this.end.row=x,this.end.column=p)},v.prototype.inside=function(x,p){return this.compare(x,p)==0?!(this.isEnd(x,p)||this.isStart(x,p)):!1},v.prototype.insideStart=function(x,p){return this.compare(x,p)==0?!this.isEnd(x,p):!1},v.prototype.insideEnd=function(x,p){return this.compare(x,p)==0?!this.isStart(x,p):!1},v.prototype.compare=function(x,p){return!this.isMultiLine()&&x===this.start.row?p<this.start.column?-1:p>this.end.column?1:0:x<this.start.row?-1:x>this.end.row?1:this.start.row===x?p>=this.start.column?0:-1:this.end.row===x?p<=this.end.column?0:1:0},v.prototype.compareStart=function(x,p){return this.start.row==x&&this.start.column==p?-1:this.compare(x,p)},v.prototype.compareEnd=function(x,p){return this.end.row==x&&this.end.column==p?1:this.compare(x,p)},v.prototype.compareInside=function(x,p){return this.end.row==x&&this.end.column==p?1:this.start.row==x&&this.start.column==p?-1:this.compare(x,p)},v.prototype.clipRows=function(x,p){if(this.end.row>p)var d={row:p+1,column:0};else if(this.end.row<x)var d={row:x,column:0};if(this.start.row>p)var o={row:p+1,column:0};else if(this.start.row<x)var o={row:x,column:0};return v.fromPoints(o||this.start,d||this.end)},v.prototype.extend=function(x,p){var d=this.compare(x,p);if(d==0)return this;if(d==-1)var o={row:x,column:p};else var a={row:x,column:p};return v.fromPoints(o||this.start,a||this.end)},v.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},v.prototype.isMultiLine=function(){return this.start.row!==this.end.row},v.prototype.clone=function(){return v.fromPoints(this.start,this.end)},v.prototype.collapseRows=function(){return this.end.column==0?new v(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new v(this.start.row,0,this.end.row,0)},v.prototype.toScreenRange=function(x){var p=x.documentToScreenPosition(this.start),d=x.documentToScreenPosition(this.end);return new v(p.row,p.column,d.row,d.column)},v.prototype.moveBy=function(x,p){this.start.row+=x,this.start.column+=p,this.end.row+=x,this.end.column+=p},v}();b.fromPoints=function(v,x){return new b(v.row,v.column,x.row,x.column)},b.comparePoints=function(v,x){return v.row-x.row||v.column-x.column},u.Range=b}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,u,$){for(var b=e("./oop"),v={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},x={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},p=0;p<10;p++)x["Digit"+p]=48+p,x["Numpad"+p]=96+p,v.PRINTABLE_KEYS[48+p]=""+p,v.FUNCTION_KEYS[96+p]="Numpad"+p;for(var p=65;p<91;p++){var d=String.fromCharCode(p+32);x["Key"+d.toUpperCase()]=p,v.PRINTABLE_KEYS[p]=d}for(var p=1;p<13;p++)x["F"+p]=111+p,v.FUNCTION_KEYS[111+p]="F"+p;var o={Shift:16,Control:17,Alt:18,Meta:224};for(var a in o)x[a]=x[a+"Left"]=x[a+"Right"]=o[a];u.$codeToKeyCode=x,v.PRINTABLE_KEYS[173]="-";for(var s in v.FUNCTION_KEYS){var r=v.FUNCTION_KEYS[s].toLowerCase();v[r]=parseInt(s,10)}for(var s in v.PRINTABLE_KEYS){var r=v.PRINTABLE_KEYS[s].toLowerCase();v[r]=parseInt(s,10)}b.mixin(v,v.MODIFIER_KEYS),b.mixin(v,v.PRINTABLE_KEYS),b.mixin(v,v.FUNCTION_KEYS),v.enter=v.return,v.escape=v.esc,v.del=v.delete,function(){for(var n=["cmd","ctrl","alt","shift"],i=Math.pow(2,n.length);i--;)v.KEY_MODS[i]=n.filter(function(h){return i&v.KEY_MODS[h]}).join("-")+"-"}(),v.KEY_MODS[0]="",v.KEY_MODS[-1]="input-",b.mixin(u,v),u.default=u,u.keyCodeToString=function(n){var i=v[n];return typeof i!="string"&&(i=String.fromCharCode(n)),i.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,u,$){var b=e("./keys"),v=e("./useragent"),x=null,p=0,d;function o(){d=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return d={passive:!1},!0}})}catch{}}function a(){return d==null&&o(),d}function s(R,T,C){this.elem=R,this.type=T,this.callback=C}s.prototype.destroy=function(){n(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var r=u.addListener=function(R,T,C,w){R.addEventListener(T,C,a()),w&&w.$toDestroy.push(new s(R,T,C))},n=u.removeListener=function(R,T,C){R.removeEventListener(T,C,a())};u.stopEvent=function(R){return u.stopPropagation(R),u.preventDefault(R),!1},u.stopPropagation=function(R){R.stopPropagation&&R.stopPropagation()},u.preventDefault=function(R){R.preventDefault&&R.preventDefault()},u.getButton=function(R){return R.type=="dblclick"?0:R.type=="contextmenu"||v.isMac&&R.ctrlKey&&!R.altKey&&!R.shiftKey?2:R.button},u.capture=function(R,T,C){var w=R&&R.ownerDocument||document;function E(D){T&&T(D),C&&C(D),n(w,"mousemove",T),n(w,"mouseup",E),n(w,"dragstart",E)}return r(w,"mousemove",T),r(w,"mouseup",E),r(w,"dragstart",E),E},u.addMouseWheelListener=function(R,T,C){r(R,"wheel",function(w){var E=.15,D=w.deltaX||0,I=w.deltaY||0;switch(w.deltaMode){case w.DOM_DELTA_PIXEL:w.wheelX=D*E,w.wheelY=I*E;break;case w.DOM_DELTA_LINE:var L=15;w.wheelX=D*L,w.wheelY=I*L;break;case w.DOM_DELTA_PAGE:var z=150;w.wheelX=D*z,w.wheelY=I*z;break}T(w)},C)},u.addMultiMouseDownListener=function(R,T,C,w,E){var D=0,I,L,z,F={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(A){if(u.getButton(A)!==0?D=0:A.detail>1?(D++,D>4&&(D=1)):D=1,v.isIE){var S=Math.abs(A.clientX-I)>5||Math.abs(A.clientY-L)>5;(!z||S)&&(D=1),z&&clearTimeout(z),z=setTimeout(function(){z=null},T[D-1]||600),D==1&&(I=A.clientX,L=A.clientY)}if(A._clicks=D,C[w]("mousedown",A),D>4)D=0;else if(D>1)return C[w](F[D],A)}Array.isArray(R)||(R=[R]),R.forEach(function(A){r(A,"mousedown",O,E)})};function i(R){return 0|(R.ctrlKey?1:0)|(R.altKey?2:0)|(R.shiftKey?4:0)|(R.metaKey?8:0)}u.getModifierString=function(R){return b.KEY_MODS[i(R)]};function h(R,T,C){var w=i(T);if(!C&&T.code&&(C=b.$codeToKeyCode[T.code]||C),!v.isMac&&x){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(w|=8),x.altGr)if((3&w)!=3)x.altGr=0;else return;if(C===18||C===17){var E=T.location;if(C===17&&E===1)x[C]==1&&(p=T.timeStamp);else if(C===18&&w===3&&E===2){var D=T.timeStamp-p;D<50&&(x.altGr=!0)}}}if(C in b.MODIFIER_KEYS&&(C=-1),!(!w&&C===13&&T.location===3&&(R(T,w,-C),T.defaultPrevented))){if(v.isChromeOS&&w&8){if(R(T,w,C),T.defaultPrevented)return;w&=-9}return!w&&!(C in b.FUNCTION_KEYS)&&!(C in b.PRINTABLE_KEYS)?!1:R(T,w,C)}}u.addCommandKeyListener=function(R,T,C){var w=null;r(R,"keydown",function(E){x[E.keyCode]=(x[E.keyCode]||0)+1;var D=h(T,E,E.keyCode);return w=E.defaultPrevented,D},C),r(R,"keypress",function(E){w&&(E.ctrlKey||E.altKey||E.shiftKey||E.metaKey)&&(u.stopEvent(E),w=null)},C),r(R,"keyup",function(E){x[E.keyCode]=null},C),x||(m(),r(window,"focus",m))};function m(){x=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!v.isOldIE){var y=1;u.nextTick=function(R,T){T=T||window;var C="zero-timeout-message-"+y++,w=function(E){E.data==C&&(u.stopPropagation(E),n(T,"message",w),R())};r(T,"message",w),T.postMessage(C,"*")}}u.$idleBlocked=!1,u.onIdle=function(R,T){return setTimeout(function C(){u.$idleBlocked?setTimeout(C,100):R()},T)},u.$idleBlockId=null,u.blockIdle=function(R){u.$idleBlockId&&clearTimeout(u.$idleBlockId),u.$idleBlocked=!0,u.$idleBlockId=setTimeout(function(){u.$idleBlocked=!1},R||100)},u.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),u.nextFrame?u.nextFrame=u.nextFrame.bind(window):u.nextFrame=function(R){setTimeout(R,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,u,$){var b;$.exports={lineMode:!1,pasteCancelled:function(){return b&&b>Date.now()-50?!0:b=!1},cancel:function(){b=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,u,$){var b=e("../lib/event"),v=e("../config").nls,x=e("../lib/useragent"),p=e("../lib/dom"),d=e("../lib/lang"),o=e("../clipboard"),a=x.isChrome<18,s=x.isIE,r=x.isChrome>63,n=400,i=e("../lib/keys"),h=i.KEY_MODS,m=x.isIOS,y=m?/\s/:/\n/,R=x.isMobile,T=function(){function C(w,E){var D=this;this.host=E,this.text=p.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",w.insertBefore(this.text,w.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",R||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),b.addListener(this.text,"blur",function(I){D.ignoreFocusEvents||(E.onBlur(I),D.$isFocused=!1)},E),b.addListener(this.text,"focus",function(I){if(!D.ignoreFocusEvents){if(D.$isFocused=!0,x.isEdge)try{if(!document.hasFocus())return}catch{}E.onFocus(I),x.isEdge?setTimeout(D.resetSelection.bind(D)):D.resetSelection()}},E),this.$focusScroll=!1,E.on("beforeEndOperation",function(){var I=E.curOp,L=I&&I.command&&I.command.name;if(L!="insertstring"){var z=L&&(I.docChanged||I.selectionChanged);D.inComposition&&z&&(D.lastValue=D.text.value="",D.onCompositionEnd()),D.resetSelection()}}),E.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=m?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&E.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,b.addCommandKeyListener(this.text,function(I,L,z){if(!D.inComposition)return E.onCommandKey(I,L,z)},E),b.addListener(this.text,"select",this.onSelect.bind(this),E),b.addListener(this.text,"input",this.onInput.bind(this),E),b.addListener(this.text,"cut",this.onCut.bind(this),E),b.addListener(this.text,"copy",this.onCopy.bind(this),E),b.addListener(this.text,"paste",this.onPaste.bind(this),E),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&b.addListener(w,"keydown",function(I){if(!(x.isMac&&!I.metaKey||!I.ctrlKey))switch(I.keyCode){case 67:D.onCopy(I);break;case 86:D.onPaste(I);break;case 88:D.onCut(I);break}},E),this.syncComposition=d.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),b.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),E),b.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),E),b.addListener(this.text,"keyup",this.onKeyup.bind(this),E),b.addListener(this.text,"keydown",this.syncComposition.bind(this),E),b.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),E),this.closeTimeout,b.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),E),b.addListener(this.text,"mousedown",function(I){I.preventDefault(),D.onContextMenuClose()},E),b.addListener(E.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),E),b.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),E),m&&this.addIosSelectionHandler(w,E,this.text)}return C.prototype.addIosSelectionHandler=function(w,E,D){var I=this,L=null,z=!1;D.addEventListener("keydown",function(O){L&&clearTimeout(L),z=!0},!0),D.addEventListener("keyup",function(O){L=setTimeout(function(){z=!1},100)},!0);var F=function(O){if(document.activeElement===D&&!(z||I.inComposition||E.$mouseHandler.isMousePressed)&&!I.copied){var A=D.selectionStart,S=D.selectionEnd,N=null,W=0;if(A==0?N=i.up:A==1?N=i.home:S>I.lastSelectionEnd&&I.lastValue[S]==`
|
|
167
|
+
`?N=i.end:A<I.lastSelectionStart&&I.lastValue[A-1]==" "?(N=i.left,W=h.option):A<I.lastSelectionStart||A==I.lastSelectionStart&&I.lastSelectionEnd!=I.lastSelectionStart&&A==S?N=i.left:S>I.lastSelectionEnd&&I.lastValue.slice(0,S).split(`
|
|
168
|
+
`).length>2?N=i.down:S>I.lastSelectionEnd&&I.lastValue[S-1]==" "?(N=i.right,W=h.option):(S>I.lastSelectionEnd||S==I.lastSelectionEnd&&I.lastSelectionEnd!=I.lastSelectionStart&&A==S)&&(N=i.right),A!==S&&(W|=h.shift),N){var V=E.onCommandKey({},W,N);if(!V&&E.commands){N=i.keyCodeToString(N);var G=E.commands.findKeyCommand(W,N);G&&E.execCommand(G)}I.lastSelectionStart=A,I.lastSelectionEnd=S,I.resetSelection("")}}};document.addEventListener("selectionchange",F),E.on("destroy",function(){document.removeEventListener("selectionchange",F)})},C.prototype.onContextMenuClose=function(){var w=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){w.tempStyle&&(w.text.style.cssText=w.tempStyle,w.tempStyle=""),w.host.renderer.$isMousePressed=!1,w.host.renderer.$keepTextAreaAtCursor&&w.host.renderer.$moveTextAreaToCursor()},0)},C.prototype.$onContextMenu=function(w){this.host.textInput.onContextMenu(w),this.onContextMenuClose()},C.prototype.onKeyup=function(w){w.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},C.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},C.prototype.onCompositionStart=function(w){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){w.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var E=this.host.getSelectionRange();E.end.row=E.start.row,E.end.column=E.start.column,this.inComposition.markerRange=E,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},C.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var w=this.text.value;this.sendText(w),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},C.prototype.onCompositionEnd=function(w){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),w&&this.onInput())},C.prototype.onCut=function(w){this.doCopy(w,!0)},C.prototype.onCopy=function(w){this.doCopy(w,!1)},C.prototype.onPaste=function(w){var E=this.handleClipboardData(w);o.pasteCancelled()||(typeof E=="string"?(E&&this.host.onPaste(E,w),x.isIE&&setTimeout(this.resetSelection),b.preventDefault(w)):(this.text.value="",this.pasted=!0))},C.prototype.doCopy=function(w,E){var D=this,I=this.host.getCopyText();if(!I)return b.preventDefault(w);this.handleClipboardData(w,I)?(m&&(this.resetSelection(I),this.copied=I,setTimeout(function(){D.copied=!1},10)),E?this.host.onCut():this.host.onCopy(),b.preventDefault(w)):(this.copied=!0,this.text.value=I,this.text.select(),setTimeout(function(){D.copied=!1,D.resetSelection(),E?D.host.onCut():D.host.onCopy()}))},C.prototype.handleClipboardData=function(w,E,D){var I=w.clipboardData||window.clipboardData;if(!(!I||a)){var L=s||D?"Text":"text/plain";try{return E?I.setData(L,E)!==!1:I.getData(L)}catch(z){if(!D)return this.handleClipboardData(z,E,!0)}}},C.prototype.onInput=function(w){if(this.inComposition)return this.onCompositionUpdate();if(w&&w.inputType){if(w.inputType=="historyUndo")return this.host.execCommand("undo");if(w.inputType=="historyRedo")return this.host.execCommand("redo")}var E=this.text.value,D=this.sendText(E,!0);(E.length>n+100||y.test(D)||R&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},C.prototype.sendText=function(w,E){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),w&&this.host.onPaste(w),this.pasted=!1,"";for(var D=this.text.selectionStart,I=this.text.selectionEnd,L=this.lastSelectionStart,z=this.lastValue.length-this.lastSelectionEnd,F=w,O=w.length-D,A=w.length-I,S=0;L>0&&this.lastValue[S]==w[S];)S++,L--;for(F=F.slice(S),S=1;z>0&&this.lastValue.length-S>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-S]==w[w.length-S];)S++,z--;O-=S-1,A-=S-1;var N=F.length-S+1;if(N<0&&(L=-N,N=0),F=F.slice(0,N),!E&&!F&&!O&&!L&&!z&&!A)return"";this.sendingText=!0;var W=!1;return x.isAndroid&&F==". "&&(F=" ",W=!0),F&&!L&&!z&&!O&&!A||this.commandMode?this.host.onTextInput(F):this.host.onTextInput(F,{extendLeft:L,extendRight:z,restoreStart:O,restoreEnd:A}),this.sendingText=!1,this.lastValue=w,this.lastSelectionStart=D,this.lastSelectionEnd=I,this.lastRestoreEnd=A,W?`
|
|
169
169
|
`:F},C.prototype.onSelect=function(w){var E=this;if(!this.inComposition){var D=function(I){return I.selectionStart===0&&I.selectionEnd>=E.lastValue.length&&I.value===E.lastValue&&E.lastValue&&I.selectionEnd!==E.lastSelectionEnd};this.copied?this.copied=!1:D(this.text)?(this.host.selectAll(),this.resetSelection()):R&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},C.prototype.$resetSelectionIOS=function(w){if(!(!this.$isFocused||this.copied&&!w||this.sendingText)){w||(w="");var E=`
|
|
170
170
|
ab`+w+`cde fg
|
|
171
171
|
`;E!=this.text.value&&(this.text.value=this.lastValue=E);var D=4,I=4+(w.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=D||this.lastSelectionEnd!=I)&&this.text.setSelectionRange(D,I),this.lastSelectionStart=D,this.lastSelectionEnd=I}},C.prototype.$resetSelection=function(){var w=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var E=0,D=0,I="",L=function(G,Z){for(var ee=Z,ce=1;ce<=G-w.rowStart&&ce<2*w.numberOfExtraLines+1;ce++)ee+=w.host.session.getLine(G-ce).length+1;return ee};if(this.host.session){var z=this.host.selection,F=z.getRange(),O=z.cursor.row;O===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):O===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(O<this.rowStart-1||O>this.rowEnd+1)&&(this.rowStart=O>this.numberOfExtraLines?O-this.numberOfExtraLines:0,this.rowEnd=O>this.numberOfExtraLines?O+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var A=[],S=this.rowStart;S<=this.rowEnd;S++)A.push(this.host.session.getLine(S));if(I=A.join(`
|
|
172
172
|
`),E=L(F.start.row,F.start.column),D=L(F.end.row,F.end.column),F.start.row<this.rowStart){var N=this.host.session.getLine(this.rowStart-1);E=F.start.row<this.rowStart-1?0:E,D+=N.length+1,I=N+`
|
|
173
|
-
`+I}else if(F.end.row>this.rowEnd){var
|
|
174
|
-
`+
|
|
173
|
+
`+I}else if(F.end.row>this.rowEnd){var W=this.host.session.getLine(this.rowEnd+1);D=F.end.row>this.rowEnd+1?W.length:F.end.column,D+=I.length+1,I=I+`
|
|
174
|
+
`+W}else R&&O>0&&(I=`
|
|
175
175
|
`+I,D+=1,E+=1);I.length>n&&(E<n&&D<n?I=I.slice(0,n):(I=`
|
|
176
176
|
`,E==D?E=D=0:(E=0,D=1)));var V=I+`
|
|
177
177
|
|
|
178
|
-
`;V!=this.lastValue&&(this.text.value=this.lastValue=V,this.lastSelectionStart=this.lastSelectionEnd=V.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=D||this.lastSelectionStart!=E||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(E,D),this.lastSelectionStart=E,this.lastSelectionEnd=D}catch{}this.inComposition=!1}},C.prototype.setHost=function(w){this.host=w},C.prototype.setNumberOfExtraLines=function(w){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,w<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=w},C.prototype.setAriaLabel=function(){var w="";if(this.host.$textInputAriaLabel&&(w+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var E=this.host.session.selection.cursor.row;w+=v("text-input.aria-label","Cursor at row $0",[E+1])}this.text.setAttribute("aria-label",w)},C.prototype.setAriaOptions=function(w){w.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",w.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",w.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),w.role&&this.text.setAttribute("role",w.role),w.setLabel&&(this.text.setAttribute("aria-roledescription",v("text-input.aria-roledescription","editor")),this.setAriaLabel())},C.prototype.focus=function(){var w=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||r||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var E=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var D=this.text.getBoundingClientRect().top!=0}catch{return}var I=[];if(D)for(var L=this.text.parentElement;L&&L.nodeType==1;)I.push(L),L.setAttribute("ace_nocontext","true"),!L.parentElement&&L.getRootNode?L=L.getRootNode().host:L=L.parentElement;this.text.focus({preventScroll:!0}),D&&I.forEach(function(z){z.removeAttribute("ace_nocontext")}),setTimeout(function(){w.text.style.position="",w.text.style.top=="0px"&&(w.text.style.top=E)},0)},C.prototype.blur=function(){this.text.blur()},C.prototype.isFocused=function(){return this.$isFocused},C.prototype.setInputHandler=function(w){this.inputHandler=w},C.prototype.getInputHandler=function(){return this.inputHandler},C.prototype.getElement=function(){return this.text},C.prototype.setCommandMode=function(w){this.commandMode=w,this.text.readOnly=!1},C.prototype.setReadOnly=function(w){this.commandMode||(this.text.readOnly=w)},C.prototype.setCopyWithEmptySelection=function(w){},C.prototype.onContextMenu=function(w){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:w}),this.moveToMouse(w,!0)},C.prototype.moveToMouse=function(w,E){var D=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(E?"z-index:100000;":"")+(x.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var I=this.host.container.getBoundingClientRect(),L=p.computedStyle(this.host.container),z=I.top+(parseInt(L.borderTopWidth)||0),F=I.left+(parseInt(L.borderLeftWidth)||0),O=I.bottom-z-this.text.clientHeight-2,A=function(S){p.translate(D.text,S.clientX-F-2,Math.min(S.clientY-z-2,O))};A(w),w.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),x.isWin&&b.capture(this.host.container,A,this.onContextMenuClose.bind(this)))},C.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},C}();u.TextInput=T,u.$setUserAgentForTests=function(C,w){R=C,m=w}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,u,$){var b=e("../lib/useragent"),v=0,x=550,p=function(){function a(s){s.$clickSelection=null;var r=s.editor;r.setDefaultHandler("mousedown",this.onMouseDown.bind(s)),r.setDefaultHandler("dblclick",this.onDoubleClick.bind(s)),r.setDefaultHandler("tripleclick",this.onTripleClick.bind(s)),r.setDefaultHandler("quadclick",this.onQuadClick.bind(s)),r.setDefaultHandler("mousewheel",this.onMouseWheel.bind(s));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(i){s[i]=this[i]},this),s.selectByLines=this.extendSelectionBy.bind(s,"getLineRange"),s.selectByWords=this.extendSelectionBy.bind(s,"getWordRange")}return a.prototype.onMouseDown=function(s){var r=s.inSelection(),n=s.getDocumentPosition();this.mousedownEvent=s;var i=this.editor,h=s.getButton();if(h!==0){var m=i.getSelectionRange(),y=m.isEmpty();(y||h==1)&&i.selection.moveToPosition(n),h==2&&(i.textInput.onContextMenu(s.domEvent),b.isMozilla||s.preventDefault());return}if(this.mousedownEvent.time=Date.now(),r&&!i.isFocused()&&(i.focus(),this.$focusTimeout&&!this.$clickSelection&&!i.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(s);return}return this.captureMouse(s),this.startSelect(n,s.domEvent._clicks>1),s.preventDefault()},a.prototype.startSelect=function(s,r){s=s||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(s):r||n.selection.moveToPosition(s),r||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var s,r=this.editor,n=r.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(i==-1)s=this.$clickSelection.end;else if(i==1)s=this.$clickSelection.start;else{var h=o(this.$clickSelection,n,r.session);n=h.cursor,s=h.anchor}r.selection.setSelectionAnchor(s.row,s.column)}r.selection.selectToPosition(n),r.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(s){var r,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),h=n.selection[s](i.row,i.column);if(this.$clickSelection){var m=this.$clickSelection.comparePoint(h.start),y=this.$clickSelection.comparePoint(h.end);if(m==-1&&y<=0)r=this.$clickSelection.end,(h.end.row!=i.row||h.end.column!=i.column)&&(i=h.start);else if(y==1&&m>=0)r=this.$clickSelection.start,(h.start.row!=i.row||h.start.column!=i.column)&&(i=h.end);else if(m==-1&&y==1)i=h.end,r=h.start;else{var R=o(this.$clickSelection,i,n.session);i=R.cursor,r=R.anchor}n.selection.setSelectionAnchor(r.row,r.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var s=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),r=Date.now();(s>v||r-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(s){var r=s.getDocumentPosition(),n=this.editor,i=n.session,h=i.getBracketRange(r);h?(h.isEmpty()&&(h.start.column--,h.end.column++),this.setState("select")):(h=n.selection.getWordRange(r.row,r.column),this.setState("selectByWords")),this.$clickSelection=h,this.select()},a.prototype.onTripleClick=function(s){var r=s.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(r.row,r.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(r.row),this.select()},a.prototype.onQuadClick=function(s){var r=this.editor;r.selectAll(),this.$clickSelection=r.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(s){if(!s.getAccelKey()){s.getShiftKey()&&s.wheelY&&!s.wheelX&&(s.wheelX=s.wheelY,s.wheelY=0);var r=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=s.domEvent.timeStamp,h=i-n.t,m=h?s.wheelX/h:n.vx,y=h?s.wheelY/h:n.vy;h<x&&(m=(m+n.vx)/2,y=(y+n.vy)/2);var R=Math.abs(m/y),T=!1;if(R>=1&&r.renderer.isScrollableBy(s.wheelX*s.speed,0)&&(T=!0),R<=1&&r.renderer.isScrollableBy(0,s.wheelY*s.speed)&&(T=!0),T)n.allowed=i;else if(i-n.allowed<x){var C=Math.abs(m)<=1.5*Math.abs(n.vx)&&Math.abs(y)<=1.5*Math.abs(n.vy);C?(T=!0,n.allowed=i):n.allowed=0}if(n.t=i,n.vx=m,n.vy=y,T)return r.renderer.scrollBy(s.wheelX*s.speed,s.wheelY*s.speed),s.stop()}},a}();p.prototype.selectEnd=p.prototype.selectByLinesEnd,p.prototype.selectAllEnd=p.prototype.selectByLinesEnd,p.prototype.selectByWordsEnd=p.prototype.selectByLinesEnd,u.DefaultHandlers=p;function d(a,s,r,n){return Math.sqrt(Math.pow(r-a,2)+Math.pow(n-s,2))}function o(a,s,r){if(a.start.row==a.end.row)var n=2*s.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var n=3*s.column-2*r.getLine(a.start.row).length;else var n=2*s.row-a.start.row-a.end.row;return n<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,u,$){var b=e("../lib/event"),v=e("../lib/useragent"),x=function(){function p(d,o){this.speed,this.wheelX,this.wheelY,this.domEvent=d,this.editor=o,this.x=this.clientX=d.clientX,this.y=this.clientY=d.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return p.prototype.stopPropagation=function(){b.stopPropagation(this.domEvent),this.propagationStopped=!0},p.prototype.preventDefault=function(){b.preventDefault(this.domEvent),this.defaultPrevented=!0},p.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},p.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},p.prototype.getGutterRow=function(){var d=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(d,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-a},p.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var d=this.editor,o=d.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=o.contains(a.row,a.column)}return this.$inSelection},p.prototype.getButton=function(){return b.getButton(this.domEvent)},p.prototype.getShiftKey=function(){return this.domEvent.shiftKey},p.prototype.getAccelKey=function(){return v.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},p}();u.MouseEvent=x}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,u,$){u.preventParentScroll=function(v){v.stopPropagation();var x=v.currentTarget,p=x.scrollHeight>x.clientHeight;p||v.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,u,$){var b=this&&this.__extends||function(){var i=function(h,m){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,R){y.__proto__=R}||function(y,R){for(var T in R)Object.prototype.hasOwnProperty.call(R,T)&&(y[T]=R[T])},i(h,m)};return function(h,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");i(h,m);function y(){this.constructor=h}h.prototype=m===null?Object.create(m):(y.prototype=m.prototype,new y)}}(),v=this&&this.__values||function(i){var h=typeof Symbol=="function"&&Symbol.iterator,m=h&&i[h],y=0;if(m)return m.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&y>=i.length&&(i=void 0),{value:i&&i[y++],done:!i}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("./lib/dom");e("./lib/event");var p=e("./range").Range,d=e("./lib/scroll").preventParentScroll,o="ace_tooltip",a=function(){function i(h){this.isOpen=!1,this.$element=null,this.$parentNode=h}return i.prototype.$init=function(){return this.$element=x.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},i.prototype.getElement=function(){return this.$element||this.$init()},i.prototype.setText=function(h){this.getElement().textContent=h},i.prototype.setHtml=function(h){this.getElement().innerHTML=h},i.prototype.setPosition=function(h,m){this.getElement().style.left=h+"px",this.getElement().style.top=m+"px"},i.prototype.setClassName=function(h){x.addCssClass(this.getElement(),h)},i.prototype.setTheme=function(h){this.theme&&(this.theme.isDark&&x.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&x.removeCssClass(this.getElement(),this.theme.cssClass)),h.isDark&&x.addCssClass(this.getElement(),"ace_dark"),h.cssClass&&x.addCssClass(this.getElement(),h.cssClass),this.theme={isDark:h.isDark,cssClass:h.cssClass}},i.prototype.show=function(h,m,y){h!=null&&this.setText(h),m!=null&&y!=null&&this.setPosition(m,y),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},i.prototype.hide=function(h){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},i.prototype.getHeight=function(){return this.getElement().offsetHeight},i.prototype.getWidth=function(){return this.getElement().offsetWidth},i.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},i}(),s=function(){function i(){this.popups=[]}return i.prototype.addPopup=function(h){this.popups.push(h),this.updatePopups()},i.prototype.removePopup=function(h){var m=this.popups.indexOf(h);m!==-1&&(this.popups.splice(m,1),this.updatePopups())},i.prototype.updatePopups=function(){var h,m,y,R;this.popups.sort(function(F,O){return O.priority-F.priority});var T=[];try{for(var C=v(this.popups),w=C.next();!w.done;w=C.next()){var E=w.value,D=!0;try{for(var I=(y=void 0,v(T)),L=I.next();!L.done;L=I.next()){var z=L.value;if(this.doPopupsOverlap(z,E)){D=!1;break}}}catch(F){y={error:F}}finally{try{L&&!L.done&&(R=I.return)&&R.call(I)}finally{if(y)throw y.error}}D?T.push(E):E.hide()}}catch(F){h={error:F}}finally{try{w&&!w.done&&(m=C.return)&&m.call(C)}finally{if(h)throw h.error}}},i.prototype.doPopupsOverlap=function(h,m){var y=h.getElement().getBoundingClientRect(),R=m.getElement().getBoundingClientRect();return y.left<R.right&&y.right>R.left&&y.top<R.bottom&&y.bottom>R.top},i}(),r=new s;u.popupManager=r,u.Tooltip=a;var n=function(i){b(h,i);function h(m){m===void 0&&(m=document.body);var y=i.call(this,m)||this;y.timeout=void 0,y.lastT=0,y.idleTime=350,y.lastEvent=void 0,y.onMouseOut=y.onMouseOut.bind(y),y.onMouseMove=y.onMouseMove.bind(y),y.waitForHover=y.waitForHover.bind(y),y.hide=y.hide.bind(y);var R=y.getElement();return R.style.whiteSpace="pre-wrap",R.style.pointerEvents="auto",R.addEventListener("mouseout",y.onMouseOut),R.tabIndex=-1,R.addEventListener("blur",(function(){R.contains(document.activeElement)||this.hide()}).bind(y)),R.addEventListener("wheel",d),y}return h.prototype.addToEditor=function(m){m.on("mousemove",this.onMouseMove),m.on("mousedown",this.hide);var y=m.renderer.getMouseEventTarget();y&&typeof y.removeEventListener=="function"&&y.addEventListener("mouseout",this.onMouseOut,!0)},h.prototype.removeFromEditor=function(m){m.off("mousemove",this.onMouseMove),m.off("mousedown",this.hide);var y=m.renderer.getMouseEventTarget();y&&typeof y.removeEventListener=="function"&&y.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},h.prototype.onMouseMove=function(m,y){this.lastEvent=m,this.lastT=Date.now();var R=y.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||R||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||R||(this.lastEvent=m,this.timeout=setTimeout(this.waitForHover,this.idleTime))},h.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var m=Date.now()-this.lastT;if(this.idleTime-m>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-m);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},h.prototype.isOutsideOfText=function(m){var y=m.editor,R=m.getDocumentPosition(),T=y.session.getLine(R.row);if(R.column==T.length){var C=y.renderer.pixelToScreenCoordinates(m.clientX,m.clientY),w=y.session.documentToScreenPosition(R.row,R.column);if(w.column!=C.column||w.row!=C.row)return!0}return!1},h.prototype.setDataProvider=function(m){this.$gatherData=m},h.prototype.showForRange=function(m,y,R,T){if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=m.renderer;this.isOpen||(r.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.range=p.fromPoints(y.start,y.end);var w=C.textToScreenCoordinates(y.start.row,y.start.column),E=C.scroller.getBoundingClientRect();w.pageX<E.left&&(w.pageX=E.left);var D=this.getElement();D.innerHTML="",D.appendChild(R),D.style.maxHeight="",D.style.display="block",this.$setPosition(m,w,!0,y),x.$fixPositionBug(D)}},h.prototype.$setPosition=function(m,y,R,T){var C=10;R&&this.addMarker(T,m.session);var w=m.renderer,E=this.getElement(),D=E.offsetHeight,I=E.offsetWidth,L=y.pageY,z=y.pageX,F=window.innerHeight-L-w.lineHeight,O=this.$shouldPlaceAbove(D,L,F-C);E.style.maxHeight=(O?L:F)-C+"px",E.style.top=O?"":L+w.lineHeight+"px",E.style.bottom=O?window.innerHeight-L+"px":"",E.style.left=Math.min(z,window.innerWidth-I-C)+"px"},h.prototype.$shouldPlaceAbove=function(m,y,R){return!(y-m<0&&y<R)},h.prototype.addMarker=function(m,y){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=y,this.marker=y&&y.addMarker(m,"ace_highlight-marker","text")},h.prototype.hide=function(m){m&&this.$fromKeyboard&&m.type=="keydown"&&m.code=="Escape"||!m&&document.activeElement==this.getElement()||m&&m.target&&(m.type!="keydown"||m.ctrlKey||m.metaKey)&&this.$element.contains(m.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,r.removePopup(this)))},h.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},h.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},h.prototype.onMouseOut=function(m){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!m.relatedTarget||this.getElement().contains(m.relatedTarget)||m&&m.currentTarget.contains(m.relatedTarget)||m.relatedTarget.classList.contains("ace_content")||this.hide())},h}(a);u.HoverTooltip=n}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(e,u,$){var b=this&&this.__extends||function(){var n=function(i,h){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var R in y)Object.prototype.hasOwnProperty.call(y,R)&&(m[R]=y[R])},n(i,h)};return function(i,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");n(i,h);function m(){this.constructor=i}i.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}}(),v=this&&this.__values||function(n){var i=typeof Symbol=="function"&&Symbol.iterator,h=i&&n[i],m=0;if(h)return h.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&m>=n.length&&(n=void 0),{value:n&&n[m++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("../lib/dom"),p=e("./mouse_event").MouseEvent,d=e("../tooltip").HoverTooltip,o=e("../config").nls,a=e("../range").Range;function s(n){var i=n.editor,h=i.renderer.$gutterLayer;n.$tooltip=new r(i),n.$tooltip.addToEditor(i),n.$tooltip.setDataProvider(function(m,y){var R=m.getDocumentPosition().row;n.$tooltip.showTooltip(R)}),n.editor.setDefaultHandler("guttermousedown",function(m){if(!(!i.isFocused()||m.getButton()!=0)){var y=h.getRegion(m);if(y!="foldWidgets"){var R=m.getDocumentPosition().row,T=i.session.selection;if(m.getShiftKey())T.selectTo(R,0);else{if(m.domEvent.detail==2)return i.selectAll(),m.preventDefault();n.$clickSelection=i.selection.getLineRange(R)}return n.setState("selectByLines"),n.captureMouse(m),m.preventDefault()}}})}u.GutterHandler=s;var r=function(n){b(i,n);function i(h){var m=n.call(this,h.container)||this;m.id="gt"+ ++i.$uid,m.editor=h,m.visibleTooltipRow;var y=m.getElement();return y.setAttribute("role","tooltip"),y.setAttribute("id",m.id),y.style.pointerEvents="auto",m.idleTime=50,m.onDomMouseMove=m.onDomMouseMove.bind(m),m.onDomMouseOut=m.onDomMouseOut.bind(m),m.setClassName("ace_gutter-tooltip"),m}return i.prototype.onDomMouseMove=function(h){var m=new p(h,this.editor);this.onMouseMove(m,this.editor)},i.prototype.onDomMouseOut=function(h){var m=new p(h,this.editor);this.onMouseOut(m)},i.prototype.addToEditor=function(h){var m=h.renderer.$gutter;m.addEventListener("mousemove",this.onDomMouseMove),m.addEventListener("mouseout",this.onDomMouseOut),n.prototype.addToEditor.call(this,h)},i.prototype.removeFromEditor=function(h){var m=h.renderer.$gutter;m.removeEventListener("mousemove",this.onDomMouseMove),m.removeEventListener("mouseout",this.onDomMouseOut),n.prototype.removeFromEditor.call(this,h)},i.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),n.prototype.destroy.call(this)},Object.defineProperty(i,"annotationLabels",{get:function(){return{error:{singular:o("gutter-tooltip.aria-label.error.singular","error"),plural:o("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:o("gutter-tooltip.aria-label.security.singular","security finding"),plural:o("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:o("gutter-tooltip.aria-label.warning.singular","warning"),plural:o("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:o("gutter-tooltip.aria-label.info.singular","information message"),plural:o("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:o("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:o("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),i.prototype.showTooltip=function(h){var m,y=this.editor.renderer.$gutterLayer,R=y.$annotations[h],T;R?T={displayText:Array.from(R.displayText),type:Array.from(R.type)}:T={displayText:[],type:[]};var C=y.session.getFoldLine(h);if(C&&y.$showFoldedAnnotations){for(var w={error:[],security:[],warning:[],info:[],hint:[]},E={error:1,security:2,warning:3,info:4,hint:5},D,I=h+1;I<=C.end.row;I++)if(y.$annotations[I])for(var L=0;L<y.$annotations[I].text.length;L++){var z=y.$annotations[I].type[L];w[z].push(y.$annotations[I].text[L]),(!D||E[z]<E[D])&&(D=z)}if(["error","security","warning"].includes(D)){var F="".concat(i.annotationsToSummaryString(w)," in folded code.");T.displayText.push(F),T.type.push(D+"_fold")}}if(T.displayText.length===0)return this.hide();for(var O={error:[],security:[],warning:[],info:[],hint:[]},A=y.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<T.displayText.length;I++){var S=x.createElement("span"),N=x.createElement("span");(m=N.classList).add.apply(m,["ace_".concat(T.type[I]),A]),N.setAttribute("aria-label","".concat(i.annotationLabels[T.type[I].replace("_fold","")].singular)),N.setAttribute("role","img"),N.appendChild(x.createTextNode(" ")),S.appendChild(N),S.appendChild(x.createTextNode(T.displayText[I])),S.appendChild(x.createElement("br")),O[T.type[I].replace("_fold","")].push(S)}var B=x.createElement("span");O.error.forEach(function(Z){return B.appendChild(Z)}),O.security.forEach(function(Z){return B.appendChild(Z)}),O.warning.forEach(function(Z){return B.appendChild(Z)}),O.info.forEach(function(Z){return B.appendChild(Z)}),O.hint.forEach(function(Z){return B.appendChild(Z)}),B.setAttribute("aria-live","polite");var V=this.$findLinkedAnnotationNode(h);V&&V.setAttribute("aria-describedby",this.id);var G=a.fromPoints({row:h,column:0},{row:h,column:0});this.showForRange(this.editor,G,B),this.visibleTooltipRow=h,this.editor._signal("showGutterTooltip",this)},i.prototype.$setPosition=function(h,m,y,R){var T=this.$findCellByRow(R.start.row);if(T){var C=T&&T.element,w=C&&C.querySelector(".ace_gutter_annotation");if(w){var E=w.getBoundingClientRect();if(E){var D={pageX:E.right,pageY:E.top};return n.prototype.$setPosition.call(this,h,D,!1,R)}}}},i.prototype.$shouldPlaceAbove=function(h,m,y){return y<h},i.prototype.$findLinkedAnnotationNode=function(h){var m=this.$findCellByRow(h);if(m){var y=m.element;if(y.childNodes.length>2)return y.childNodes[2]}},i.prototype.$findCellByRow=function(h){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(m){return m.row===h})},i.prototype.hide=function(h){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var m=this.$findLinkedAnnotationNode(this.visibleTooltipRow);m&&m.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),n.prototype.hide.call(this,h)}},i.annotationsToSummaryString=function(h){var m,y,R=[],T=["error","security","warning","info","hint"];try{for(var C=v(T),w=C.next();!w.done;w=C.next()){var E=w.value;if(h[E].length){var D=h[E].length===1?i.annotationLabels[E].singular:i.annotationLabels[E].plural;R.push("".concat(h[E].length," ").concat(D))}}}catch(I){m={error:I}}finally{try{w&&!w.done&&(y=C.return)&&y.call(C)}finally{if(m)throw m.error}}return R.join(", ")},i.prototype.isOutsideOfText=function(h){var m=h.editor,y=m.renderer.$gutter.getBoundingClientRect();return!(h.clientX>=y.left&&h.clientX<=y.right&&h.clientY>=y.top&&h.clientY<=y.bottom)},i}(d);r.$uid=0,u.GutterTooltip=r}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,u,$){var b=e("../lib/dom"),v=e("../lib/event"),x=e("../lib/useragent"),p=200,d=200,o=5;function a(r){var n=r.editor,i=b.createElement("div");i.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",i.textContent=" ";var h=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];h.forEach(function(ne){r[ne]=this[ne]},this),n.on("mousedown",this.onMouseDown.bind(r));var m=n.container,y,R,T,C,w,E,D=0,I,L,z,F,O;this.onDragStart=function(ne){if(this.cancelDrag||!m.draggable){var he=this;return setTimeout(function(){he.startSelect(),he.captureMouse(ne)},0),ne.preventDefault()}w=n.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=n.getReadOnly()?"copy":"copyMove",n.container.appendChild(i),ue.setDragImage&&ue.setDragImage(i,0,0),setTimeout(function(){n.container.removeChild(i)}),ue.clearData(),ue.setData("Text",n.session.getTextRange()),L=!0,this.setState("drag")},this.onDragEnd=function(ne){if(m.draggable=!1,L=!1,this.setState(null),!n.getReadOnly()){var he=ne.dataTransfer.dropEffect;!I&&he=="move"&&n.session.remove(n.getSelectionRange()),n.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(n.getReadOnly()||!ee(ne.dataTransfer)))return R=ne.clientX,T=ne.clientY,y||B(),D++,ne.dataTransfer.dropEffect=I=ce(ne),v.preventDefault(ne)},this.onDragOver=function(ne){if(!(n.getReadOnly()||!ee(ne.dataTransfer)))return R=ne.clientX,T=ne.clientY,y||(B(),D++),G!==null&&(G=null),ne.dataTransfer.dropEffect=I=ce(ne),v.preventDefault(ne)},this.onDragLeave=function(ne){if(D--,D<=0&&y)return V(),I=null,v.preventDefault(ne)},this.onDrop=function(ne){if(E){var he=ne.dataTransfer;if(L)switch(I){case"move":w.contains(E.row,E.column)?w={start:E,end:E}:w=n.moveText(w,E);break;case"copy":w=n.moveText(w,E,!0);break}else{var ue=he.getData("Text");w={start:E,end:n.session.insert(E,ue)},n.focus(),I=null}return V(),v.preventDefault(ne)}},v.addListener(m,"dragstart",this.onDragStart.bind(r),n),v.addListener(m,"dragend",this.onDragEnd.bind(r),n),v.addListener(m,"dragenter",this.onDragEnter.bind(r),n),v.addListener(m,"dragover",this.onDragOver.bind(r),n),v.addListener(m,"dragleave",this.onDragLeave.bind(r),n),v.addListener(m,"drop",this.onDrop.bind(r),n);function A(ne,he){var ue=Date.now(),le=!he||ne.row!=he.row,me=!he||ne.column!=he.column;if(!F||le||me)n.moveCursorToPosition(ne),F=ue,O={x:R,y:T};else{var _e=s(O.x,O.y,R,T);_e>o?F=null:ue-F>=d&&(n.renderer.scrollCursorIntoView(),F=null)}}function S(ne,he){var ue=Date.now(),le=n.renderer.layerConfig.lineHeight,me=n.renderer.layerConfig.characterWidth,_e=n.renderer.scroller.getBoundingClientRect(),Ae={x:{left:R-_e.left,right:_e.right-R},y:{top:T-_e.top,bottom:_e.bottom-T}},Me=Math.min(Ae.x.left,Ae.x.right),qe=Math.min(Ae.y.top,Ae.y.bottom),Ve={row:ne.row,column:ne.column};Me/me<=2&&(Ve.column+=Ae.x.left<Ae.x.right?-3:2),qe/le<=1&&(Ve.row+=Ae.y.top<Ae.y.bottom?-1:1);var ot=ne.row!=Ve.row,Je=ne.column!=Ve.column,lt=!he||ne.row!=he.row;ot||Je&&!lt?z?ue-z>=p&&n.renderer.scrollCursorIntoView(Ve):z=ue:z=null}function N(){var ne=E;E=n.renderer.screenToTextCoordinates(R,T),A(E,ne),S(E,ne)}function B(){w=n.selection.toOrientedRange(),y=n.session.addMarker(w,"ace_selection",n.getSelectionStyle()),n.clearSelection(),n.isFocused()&&n.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),N(),C=setInterval(N,20),D=0,v.addListener(document,"mousemove",Z)}function V(){clearInterval(C),n.session.removeMarker(y),y=null,n.selection.fromOrientedRange(w),n.isFocused()&&!L&&n.$resetCursorStyle(),w=null,E=null,D=0,z=null,F=null,v.removeListener(document,"mousemove",Z)}var G=null;function Z(){G==null&&(G=setTimeout(function(){G!=null&&y&&V()},20))}function ee(ne){var he=ne.types;return!he||Array.prototype.some.call(he,function(ue){return ue=="text/plain"||ue=="Text"})}function ce(ne){var he=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],le=x.isMac?ne.altKey:ne.ctrlKey,me="uninitialized";try{me=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var _e="none";return le&&he.indexOf(me)>=0?_e="copy":ue.indexOf(me)>=0?_e="move":he.indexOf(me)>=0&&(_e="copy"),_e}}(function(){this.dragWait=function(){var r=Date.now()-this.mousedownEvent.time;r>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var r=this.editor.container;r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(r){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var r=this.editor,n=r.container;n.draggable=!0,r.renderer.$cursorLayer.setBlinking(!1),r.setStyle("ace_dragging");var i=x.isWin?"default":"move";r.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(r){var n=this.editor.container;if(x.isIE&&this.state=="dragReady"){var i=s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&n.dragDrop()}if(this.state==="dragWait"){var i=s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(n.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(r){if(this.$dragEnabled){this.mousedownEvent=r;var n=this.editor,i=r.inSelection(),h=r.getButton(),m=r.domEvent.detail||1;if(m===1&&h===0&&i){if(r.editor.inMultiSelectMode&&(r.getAccelKey()||r.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=r.domEvent.target||r.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),n.getDragDelay()){if(x.isWebKit){this.cancelDrag=!0;var R=n.container;R.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(r,this.onMouseDrag.bind(this)),r.defaultPrevented=!0}}}}).call(a.prototype);function s(r,n,i,h){return Math.sqrt(Math.pow(i-r,2)+Math.pow(h-n,2))}u.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,u,$){var b=e("./mouse_event").MouseEvent,v=e("../lib/event"),x=e("../lib/dom");u.addTouchListeners=function(p,d){var o="scroll",a,s,r,n,i,h,m=0,y,R=0,T=0,C=0,w,E;function D(){var A=window.navigator&&window.navigator.clipboard,S=!1,N=function(){var G=d.getCopyText(),Z=d.session.getUndoManager().hasUndo();E.replaceChild(x.buildDom(S?["span",!G&&B("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],G&&B("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],G&&B("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&B("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&B("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],B("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],B("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),E.firstChild)},B=function(G){return d.commands.canExecute(G,d)},V=function(G){var Z=G.target.getAttribute("action");if(Z=="more"||!S)return S=!S,N();Z=="paste"?A.readText().then(function(ee){d.execCommand(Z,ee)}):Z&&((Z=="cut"||Z=="copy")&&(A?A.writeText(d.getCopyText()):document.execCommand("copy")),d.execCommand(Z)),E.firstChild.style.display="none",S=!1,Z!="openCommandPalette"&&d.focus()};E=x.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(G){o="menu",G.stopPropagation(),G.preventDefault(),d.textInput.focus()},ontouchend:function(G){G.stopPropagation(),G.preventDefault(),V(G)},onclick:V},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],d.container)}function I(){if(!d.getOption("enableMobileMenu")){E&&L();return}E||D();var A=d.selection.cursor,S=d.renderer.textToScreenCoordinates(A.row,A.column),N=d.renderer.textToScreenCoordinates(0,0).pageX,B=d.renderer.scrollLeft,V=d.container.getBoundingClientRect();E.style.top=S.pageY-V.top-3+"px",S.pageX-V.left<V.width-70?(E.style.left="",E.style.right="10px"):(E.style.right="",E.style.left=N+B-V.left+"px"),E.style.display="",E.firstChild.style.display="none",d.on("input",L)}function L(A){E&&(E.style.display="none"),d.off("input",L)}function z(){i=null,clearTimeout(i);var A=d.selection.getRange(),S=A.contains(y.row,y.column);(A.isEmpty()||!S)&&(d.selection.moveToPosition(y),d.selection.selectWord()),o="wait",I()}function F(){i=null,clearTimeout(i),d.selection.moveToPosition(y);var A=R>=2?d.selection.getLineRange(y.row):d.session.getBracketRange(y);A&&!A.isEmpty()?d.selection.setRange(A):d.selection.selectWord(),o="wait"}v.addListener(p,"contextmenu",function(A){if(w){var S=d.textInput.getElement();S.focus()}},d),v.addListener(p,"touchstart",function(A){var S=A.touches;if(i||S.length>1){clearTimeout(i),i=null,r=-1,o="zoom";return}w=d.$mouseHandler.isMousePressed=!0;var N=d.renderer.layerConfig.lineHeight,B=d.renderer.layerConfig.lineHeight,V=A.timeStamp;n=V;var G=S[0],Z=G.clientX,ee=G.clientY;Math.abs(a-Z)+Math.abs(s-ee)>N&&(r=-1),a=A.clientX=Z,s=A.clientY=ee,T=C=0;var ce=new b(A,d);if(y=ce.getDocumentPosition(),V-r<500&&S.length==1&&!m)R++,A.preventDefault(),A.button=0,F();else{R=0;var ne=d.selection.cursor,he=d.selection.isEmpty()?ne:d.selection.anchor,ue=d.renderer.$cursorLayer.getPixelPosition(ne,!0),le=d.renderer.$cursorLayer.getPixelPosition(he,!0),me=d.renderer.scroller.getBoundingClientRect(),_e=d.renderer.layerConfig.offset,Ae=d.renderer.scrollLeft,Me=function(ot,Je){return ot=ot/B,Je=Je/N-.75,ot*ot+Je*Je};if(A.clientX<me.left){o="zoom";return}var qe=Me(A.clientX-me.left-ue.left+Ae,A.clientY-me.top-ue.top+_e),Ve=Me(A.clientX-me.left-le.left+Ae,A.clientY-me.top-le.top+_e);qe<3.5&&Ve<3.5&&(o=qe>Ve?"cursor":"anchor"),Ve<3.5?o="anchor":qe<3.5?o="cursor":o="scroll",i=setTimeout(z,450)}r=V},d),v.addListener(p,"touchend",function(A){w=d.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),o=="zoom"?(o="",m=0):i?(d.selection.moveToPosition(y),m=0,I()):o=="scroll"?(O(),L()):I(),clearTimeout(i),i=null},d),v.addListener(p,"touchmove",function(A){i&&(clearTimeout(i),i=null);var S=A.touches;if(!(S.length>1||o=="zoom")){var N=S[0],B=a-N.clientX,V=s-N.clientY;if(o=="wait")if(B*B+V*V>4)o="cursor";else return A.preventDefault();a=N.clientX,s=N.clientY,A.clientX=N.clientX,A.clientY=N.clientY;var G=A.timeStamp,Z=G-n;if(n=G,o=="scroll"){var ee=new b(A,d);ee.speed=1,ee.wheelX=B,ee.wheelY=V,10*Math.abs(B)<Math.abs(V)&&(B=0),10*Math.abs(V)<Math.abs(B)&&(V=0),Z!=0&&(T=B/Z,C=V/Z),d._emit("mousewheel",ee),ee.propagationStopped||(T=C=0)}else{var ce=new b(A,d),ne=ce.getDocumentPosition();o=="cursor"?d.selection.moveCursorToPosition(ne):o=="anchor"&&d.selection.setSelectionAnchor(ne.row,ne.column),d.renderer.scrollCursorIntoView(ne),A.preventDefault()}}},d);function O(){m+=60,h=setInterval(function(){m--<=0&&(clearInterval(h),h=null),Math.abs(T)<.01&&(T=0),Math.abs(C)<.01&&(C=0),m<20&&(T=.9*T),m<20&&(C=.9*C);var A=d.session.getScrollTop();d.renderer.scrollBy(10*T,10*C),A==d.session.getScrollTop()&&(m=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,u,$){var b=e("../lib/event"),v=e("../lib/useragent"),x=e("./default_handlers").DefaultHandlers,p=e("./default_gutter_handler").GutterHandler,d=e("./mouse_event").MouseEvent,o=e("./dragdrop_handler").DragdropHandler,a=e("./touch_handler").addTouchListeners,s=e("../config"),r=function(){function n(i){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var h=this;this.editor=i,new x(this),new p(this),new o(this);var m=function(T){var C=!document.hasFocus||!document.hasFocus()||!i.isFocused()&&document.activeElement==(i.textInput&&i.textInput.getElement());C&&window.focus(),i.focus(),setTimeout(function(){i.isFocused()||i.focus()})},y=i.renderer.getMouseEventTarget();b.addListener(y,"click",this.onMouseEvent.bind(this,"click"),i),b.addListener(y,"mousemove",this.onMouseMove.bind(this,"mousemove"),i),b.addMultiMouseDownListener([y,i.renderer.scrollBarV&&i.renderer.scrollBarV.inner,i.renderer.scrollBarH&&i.renderer.scrollBarH.inner,i.textInput&&i.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",i),b.addMouseWheelListener(i.container,this.onMouseWheel.bind(this,"mousewheel"),i),a(i.container,i);var R=i.renderer.$gutter;b.addListener(R,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),i),b.addListener(R,"click",this.onMouseEvent.bind(this,"gutterclick"),i),b.addListener(R,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),i),b.addListener(R,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),i),b.addListener(y,"mousedown",m,i),b.addListener(R,"mousedown",m,i),v.isIE&&i.renderer.scrollBarV&&(b.addListener(i.renderer.scrollBarV.element,"mousedown",m,i),b.addListener(i.renderer.scrollBarH.element,"mousedown",m,i)),i.on("mousemove",function(T){if(!(h.state||h.$dragDelay||!h.$dragEnabled)){var C=i.renderer.screenToTextCoordinates(T.x,T.y),w=i.session.selection.getRange(),E=i.renderer;!w.isEmpty()&&w.insideStart(C.row,C.column)?E.setCursorStyle("default"):E.setCursorStyle("")}},i)}return n.prototype.onMouseEvent=function(i,h){this.editor.session&&this.editor._emit(i,new d(h,this.editor))},n.prototype.onMouseMove=function(i,h){var m=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!m||!m.length||this.editor._emit(i,new d(h,this.editor))},n.prototype.onMouseWheel=function(i,h){var m=new d(h,this.editor);m.speed=this.$scrollSpeed*2,m.wheelX=h.wheelX,m.wheelY=h.wheelY,this.editor._emit(i,m)},n.prototype.setState=function(i){this.state=i},n.prototype.captureMouse=function(i,h){this.x=i.x,this.y=i.y,this.isMousePressed=!0;var m=this.editor,y=this.editor.renderer;y.$isMousePressed=!0;var R=this,T=!0,C=function(L){if(L){if(v.isWebKit&&!L.which&&R.releaseMouse)return R.releaseMouse();R.x=L.clientX,R.y=L.clientY,h&&h(L),R.mouseEvent=new d(L,R.editor),R.$mouseMoved=!0}},w=function(L){m.off("beforeEndOperation",I),T=!1,m.session&&E(),R[R.state+"End"]&&R[R.state+"End"](L),R.state="",R.isMousePressed=y.$isMousePressed=!1,y.$keepTextAreaAtCursor&&y.$moveTextAreaToCursor(),R.$onCaptureMouseMove=R.releaseMouse=null,L&&R.onMouseEvent("mouseup",L),m.endOperation()},E=function(){R[R.state]&&R[R.state](),R.$mouseMoved=!1},D=function(){T&&(E(),b.nextFrame(D))};if(v.isOldIE&&i.domEvent.type=="dblclick")return setTimeout(function(){w(i)});var I=function(L){R.releaseMouse&&m.curOp.command.name&&m.curOp.selectionChanged&&(R[R.state+"End"]&&R[R.state+"End"](),R.state="",R.releaseMouse())};m.on("beforeEndOperation",I),m.startOperation({command:{name:"mouse"}}),R.$onCaptureMouseMove=C,R.releaseMouse=b.capture(this.editor.container,C,w),D()},n.prototype.cancelContextMenu=function(){var i=(function(h){h&&h.domEvent&&h.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",i),h&&h.domEvent&&b.stopEvent(h.domEvent))}).bind(this);setTimeout(i,10),this.editor.on("nativecontextmenu",i)},n.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},n}();r.prototype.releaseMouse=null,s.defineOptions(r.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:v.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),u.MouseHandler=r}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,u,$){var b=e("../lib/dom"),v=function(){function x(p){p.on("click",function(d){var o=d.getDocumentPosition(),a=p.session,s=a.getFoldAt(o.row,o.column,1);s&&(d.getAccelKey()?a.removeFold(s):a.expandFold(s),d.stop());var r=d.domEvent&&d.domEvent.target;r&&b.hasCssClass(r,"ace_inline_button")&&b.hasCssClass(r,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),p.renderer.scrollCursorIntoView())}),p.on("gutterclick",function(d){var o=p.renderer.$gutterLayer.getRegion(d);if(o=="foldWidgets"){var a=d.getDocumentPosition().row,s=p.session;s.foldWidgets&&s.foldWidgets[a]&&p.session.onFoldWidgetClick(a,d),p.isFocused()||p.focus(),d.stop()}}),p.on("gutterdblclick",function(d){var o=p.renderer.$gutterLayer.getRegion(d);if(o=="foldWidgets"){var a=d.getDocumentPosition().row,s=p.session,r=s.getParentFoldRangeData(a,!0),n=r.range||r.firstRange;if(n){a=n.start.row;var i=s.getFoldAt(a,s.getLine(a).length,1);i?s.removeFold(i):(s.addFold("...",n),p.renderer.scrollCursorIntoView({row:n.start.row,column:0}))}d.stop()}})}return x}();u.FoldHandler=v}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,u,$){var b=e("../lib/keys"),v=e("../lib/event"),x=function(){function p(d){this.$editor=d,this.$data={editor:d},this.$handlers=[],this.setDefaultHandler(d.commands)}return p.prototype.setDefaultHandler=function(d){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=d,this.addKeyboardHandler(d,0)},p.prototype.setKeyboardHandler=function(d){var o=this.$handlers;if(o[o.length-1]!=d){for(;o[o.length-1]&&o[o.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(o[o.length-1]);this.addKeyboardHandler(d,1)}},p.prototype.addKeyboardHandler=function(d,o){if(d){typeof d=="function"&&!d.handleKeyboard&&(d.handleKeyboard=d);var a=this.$handlers.indexOf(d);a!=-1&&this.$handlers.splice(a,1),o==null?this.$handlers.push(d):this.$handlers.splice(o,0,d),a==-1&&d.attach&&d.attach(this.$editor)}},p.prototype.removeKeyboardHandler=function(d){var o=this.$handlers.indexOf(d);return o==-1?!1:(this.$handlers.splice(o,1),d.detach&&d.detach(this.$editor),!0)},p.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},p.prototype.getStatusText=function(){var d=this.$data,o=d.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(o,d)||""}).filter(Boolean).join(" ")},p.prototype.$callKeyboardHandlers=function(d,o,a,s){for(var r,n=!1,i=this.$editor.commands,h=this.$handlers.length;h--&&(r=this.$handlers[h].handleKeyboard(this.$data,d,o,a,s),!(!(!r||!r.command)&&(r.command=="null"?n=!0:n=i.exec(r.command,this.$editor,r.args,s),n&&s&&d!=-1&&r.passEvent!=!0&&r.command.passEvent!=!0&&v.stopEvent(s),n))););return!n&&d==-1&&(r={command:"insertstring"},n=i.exec("insertstring",this.$editor,o)),n&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),n},p.prototype.onCommandKey=function(d,o,a){var s=b.keyCodeToString(a);return this.$callKeyboardHandlers(o,s,a,d)},p.prototype.onTextInput=function(d){return this.$callKeyboardHandlers(-1,d)},p}();u.KeyBinding=x}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,u,$){var b=0,v=0,x=!1,p=!1,d=!1,o=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],s=0,r=1,n=0,i=1,h=2,m=3,y=4,R=5,T=6,C=7,w=8,E=9,D=10,I=11,L=12,z=13,F=14,O=15,A=16,S=17,N=18,B=[N,N,N,N,N,N,N,N,N,T,R,T,w,R,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,R,R,T,w,y,y,I,I,I,y,y,y,y,y,D,E,D,E,E,h,h,h,h,h,h,h,h,h,h,E,y,y,y,y,y,y,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,y,y,y,y,y,y,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,y,y,y,y,N,N,N,N,N,N,R,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,E,y,I,I,I,I,y,y,y,y,n,y,y,N,y,y,I,I,h,h,y,n,y,y,y,h,n,y,y,y,y,y],V=[w,w,w,w,w,w,w,w,w,w,w,N,N,N,n,i,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,w,R,z,F,O,A,S,E,I,I,I,I,I,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,E,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,w];function G(ne,he,ue,le){var me=b?a:o,_e=null,Ae=null,Me=null,qe=0,Ve=null,ot=null,Je=-1,lt=null,Ht=null,vn=[];if(!le)for(lt=0,le=[];lt<ue;lt++)le[lt]=ce(ne[lt]);for(v=b,x=!1,p=!1,d=!1,Ht=0;Ht<ue;Ht++){if(_e=qe,vn[Ht]=Ae=ee(ne,le,vn,Ht),qe=me[_e][Ae],Ve=qe&240,qe&=15,he[Ht]=Me=me[qe][5],Ve>0)if(Ve==16){for(lt=Je;lt<Ht;lt++)he[lt]=1;Je=-1}else Je=-1;if(ot=me[qe][6],ot)Je==-1&&(Je=Ht);else if(Je>-1){for(lt=Je;lt<Ht;lt++)he[lt]=Me;Je=-1}le[Ht]==R&&(he[Ht]=0),v|=Me}if(d){for(lt=0;lt<ue;lt++)if(le[lt]==T){he[lt]=b;for(var Pt=lt-1;Pt>=0&&le[Pt]==w;Pt--)he[Pt]=b}}}function Z(ne,he,ue){if(!(v<ne)){if(ne==1&&b==r&&!p){ue.reverse();return}for(var le=ue.length,me=0,_e,Ae,Me,qe;me<le;){if(he[me]>=ne){for(_e=me+1;_e<le&&he[_e]>=ne;)_e++;for(Ae=me,Me=_e-1;Ae<Me;Ae++,Me--)qe=ue[Ae],ue[Ae]=ue[Me],ue[Me]=qe;me=_e}me++}}}function ee(ne,he,ue,le){var me=he[le],_e,Ae,Me,qe;switch(me){case n:case i:x=!1;case y:case m:return me;case h:return x?m:h;case C:return x=!0,i;case w:return y;case E:return le<1||le+1>=he.length||(_e=ue[le-1])!=h&&_e!=m||(Ae=he[le+1])!=h&&Ae!=m?y:(x&&(Ae=m),Ae==_e?Ae:y);case D:return _e=le>0?ue[le-1]:R,_e==h&&le+1<he.length&&he[le+1]==h?h:y;case I:if(le>0&&ue[le-1]==h)return h;if(x)return y;for(qe=le+1,Me=he.length;qe<Me&&he[qe]==I;)qe++;return qe<Me&&he[qe]==h?h:y;case L:for(Me=he.length,qe=le+1;qe<Me&&he[qe]==L;)qe++;if(qe<Me){var Ve=ne[le],ot=Ve>=1425&&Ve<=2303||Ve==64286;if(_e=he[qe],ot&&(_e==i||_e==C))return i}return le<1||(_e=he[le-1])==R?y:ue[le-1];case R:return x=!1,p=!0,b;case T:return d=!0,y;case z:case F:case A:case S:case O:x=!1;case N:return y}}function ce(ne){var he=ne.charCodeAt(0),ue=he>>8;return ue==0?he>191?n:B[he]:ue==5?/[\u0591-\u05f4]/.test(ne)?i:n:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?L:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?m:he==1642?I:/[\u06f0-\u06f9]/.test(ne)?h:C:ue==32&&he<=8287?V[he&255]:ue==254&&he>=65136?C:y}u.L=n,u.R=i,u.EN=h,u.ON_R=3,u.AN=4,u.R_H=5,u.B=6,u.RLE=7,u.DOT="·",u.doBidiReorder=function(ne,he,ue){if(ne.length<2)return{};var le=ne.split(""),me=new Array(le.length),_e=new Array(le.length),Ae=[];b=ue?r:s,G(le,Ae,le.length,he);for(var Me=0;Me<me.length;me[Me]=Me,Me++);Z(2,Ae,me),Z(1,Ae,me);for(var Me=0;Me<me.length-1;Me++)he[Me]===m?Ae[Me]=u.AN:Ae[Me]===i&&(he[Me]>C&&he[Me]<z||he[Me]===y||he[Me]===N)?Ae[Me]=u.ON_R:Me>0&&le[Me-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(le[Me])&&(Ae[Me-1]=Ae[Me]=u.R_H,Me++);le[le.length-1]===u.DOT&&(Ae[le.length-1]=u.B),le[0]===""&&(Ae[0]=u.RLE);for(var Me=0;Me<me.length;Me++)_e[Me]=Ae[me[Me]];return{logicalFromVisual:me,bidiLevels:_e}},u.hasBidiCharacters=function(ne,he){for(var ue=!1,le=0;le<ne.length;le++)he[le]=ce(ne.charAt(le)),!ue&&(he[le]==i||he[le]==C||he[le]==m)&&(ue=!0);return ue},u.getVisualFromLogicalIdx=function(ne,he){for(var ue=0;ue<he.logicalFromVisual.length;ue++)if(he.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,u,$){var b=e("./lib/bidiutil"),v=e("./lib/lang"),x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,p=function(){function d(o){this.session=o,this.bidiMap={},this.currentRow=null,this.bidiUtil=b,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=x.test(o.getValue())}return d.prototype.isBidiRow=function(o,a,s){return this.seenBidi?(o!==this.currentRow&&(this.currentRow=o,this.updateRowLine(a,s),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},d.prototype.onChange=function(o){this.seenBidi?this.currentRow=null:o.action=="insert"&&x.test(o.lines.join(`
|
|
178
|
+
`;V!=this.lastValue&&(this.text.value=this.lastValue=V,this.lastSelectionStart=this.lastSelectionEnd=V.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=D||this.lastSelectionStart!=E||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(E,D),this.lastSelectionStart=E,this.lastSelectionEnd=D}catch{}this.inComposition=!1}},C.prototype.setHost=function(w){this.host=w},C.prototype.setNumberOfExtraLines=function(w){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,w<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=w},C.prototype.setAriaLabel=function(){var w="";if(this.host.$textInputAriaLabel&&(w+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var E=this.host.session.selection.cursor.row;w+=v("text-input.aria-label","Cursor at row $0",[E+1])}this.text.setAttribute("aria-label",w)},C.prototype.setAriaOptions=function(w){w.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",w.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",w.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),w.role&&this.text.setAttribute("role",w.role),w.setLabel&&(this.text.setAttribute("aria-roledescription",v("text-input.aria-roledescription","editor")),this.setAriaLabel())},C.prototype.focus=function(){var w=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||r||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var E=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var D=this.text.getBoundingClientRect().top!=0}catch{return}var I=[];if(D)for(var L=this.text.parentElement;L&&L.nodeType==1;)I.push(L),L.setAttribute("ace_nocontext","true"),!L.parentElement&&L.getRootNode?L=L.getRootNode().host:L=L.parentElement;this.text.focus({preventScroll:!0}),D&&I.forEach(function(z){z.removeAttribute("ace_nocontext")}),setTimeout(function(){w.text.style.position="",w.text.style.top=="0px"&&(w.text.style.top=E)},0)},C.prototype.blur=function(){this.text.blur()},C.prototype.isFocused=function(){return this.$isFocused},C.prototype.setInputHandler=function(w){this.inputHandler=w},C.prototype.getInputHandler=function(){return this.inputHandler},C.prototype.getElement=function(){return this.text},C.prototype.setCommandMode=function(w){this.commandMode=w,this.text.readOnly=!1},C.prototype.setReadOnly=function(w){this.commandMode||(this.text.readOnly=w)},C.prototype.setCopyWithEmptySelection=function(w){},C.prototype.onContextMenu=function(w){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:w}),this.moveToMouse(w,!0)},C.prototype.moveToMouse=function(w,E){var D=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(E?"z-index:100000;":"")+(x.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var I=this.host.container.getBoundingClientRect(),L=p.computedStyle(this.host.container),z=I.top+(parseInt(L.borderTopWidth)||0),F=I.left+(parseInt(L.borderLeftWidth)||0),O=I.bottom-z-this.text.clientHeight-2,A=function(S){p.translate(D.text,S.clientX-F-2,Math.min(S.clientY-z-2,O))};A(w),w.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),x.isWin&&b.capture(this.host.container,A,this.onContextMenuClose.bind(this)))},C.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},C}();u.TextInput=T,u.$setUserAgentForTests=function(C,w){R=C,m=w}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,u,$){var b=e("../lib/useragent"),v=0,x=550,p=function(){function a(s){s.$clickSelection=null;var r=s.editor;r.setDefaultHandler("mousedown",this.onMouseDown.bind(s)),r.setDefaultHandler("dblclick",this.onDoubleClick.bind(s)),r.setDefaultHandler("tripleclick",this.onTripleClick.bind(s)),r.setDefaultHandler("quadclick",this.onQuadClick.bind(s)),r.setDefaultHandler("mousewheel",this.onMouseWheel.bind(s));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(i){s[i]=this[i]},this),s.selectByLines=this.extendSelectionBy.bind(s,"getLineRange"),s.selectByWords=this.extendSelectionBy.bind(s,"getWordRange")}return a.prototype.onMouseDown=function(s){var r=s.inSelection(),n=s.getDocumentPosition();this.mousedownEvent=s;var i=this.editor,h=s.getButton();if(h!==0){var m=i.getSelectionRange(),y=m.isEmpty();(y||h==1)&&i.selection.moveToPosition(n),h==2&&(i.textInput.onContextMenu(s.domEvent),b.isMozilla||s.preventDefault());return}if(this.mousedownEvent.time=Date.now(),r&&!i.isFocused()&&(i.focus(),this.$focusTimeout&&!this.$clickSelection&&!i.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(s);return}return this.captureMouse(s),this.startSelect(n,s.domEvent._clicks>1),s.preventDefault()},a.prototype.startSelect=function(s,r){s=s||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(s):r||n.selection.moveToPosition(s),r||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var s,r=this.editor,n=r.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(i==-1)s=this.$clickSelection.end;else if(i==1)s=this.$clickSelection.start;else{var h=o(this.$clickSelection,n,r.session);n=h.cursor,s=h.anchor}r.selection.setSelectionAnchor(s.row,s.column)}r.selection.selectToPosition(n),r.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(s){var r,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),h=n.selection[s](i.row,i.column);if(this.$clickSelection){var m=this.$clickSelection.comparePoint(h.start),y=this.$clickSelection.comparePoint(h.end);if(m==-1&&y<=0)r=this.$clickSelection.end,(h.end.row!=i.row||h.end.column!=i.column)&&(i=h.start);else if(y==1&&m>=0)r=this.$clickSelection.start,(h.start.row!=i.row||h.start.column!=i.column)&&(i=h.end);else if(m==-1&&y==1)i=h.end,r=h.start;else{var R=o(this.$clickSelection,i,n.session);i=R.cursor,r=R.anchor}n.selection.setSelectionAnchor(r.row,r.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var s=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),r=Date.now();(s>v||r-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(s){var r=s.getDocumentPosition(),n=this.editor,i=n.session,h=i.getBracketRange(r);h?(h.isEmpty()&&(h.start.column--,h.end.column++),this.setState("select")):(h=n.selection.getWordRange(r.row,r.column),this.setState("selectByWords")),this.$clickSelection=h,this.select()},a.prototype.onTripleClick=function(s){var r=s.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(r.row,r.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(r.row),this.select()},a.prototype.onQuadClick=function(s){var r=this.editor;r.selectAll(),this.$clickSelection=r.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(s){if(!s.getAccelKey()){s.getShiftKey()&&s.wheelY&&!s.wheelX&&(s.wheelX=s.wheelY,s.wheelY=0);var r=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=s.domEvent.timeStamp,h=i-n.t,m=h?s.wheelX/h:n.vx,y=h?s.wheelY/h:n.vy;h<x&&(m=(m+n.vx)/2,y=(y+n.vy)/2);var R=Math.abs(m/y),T=!1;if(R>=1&&r.renderer.isScrollableBy(s.wheelX*s.speed,0)&&(T=!0),R<=1&&r.renderer.isScrollableBy(0,s.wheelY*s.speed)&&(T=!0),T)n.allowed=i;else if(i-n.allowed<x){var C=Math.abs(m)<=1.5*Math.abs(n.vx)&&Math.abs(y)<=1.5*Math.abs(n.vy);C?(T=!0,n.allowed=i):n.allowed=0}if(n.t=i,n.vx=m,n.vy=y,T)return r.renderer.scrollBy(s.wheelX*s.speed,s.wheelY*s.speed),s.stop()}},a}();p.prototype.selectEnd=p.prototype.selectByLinesEnd,p.prototype.selectAllEnd=p.prototype.selectByLinesEnd,p.prototype.selectByWordsEnd=p.prototype.selectByLinesEnd,u.DefaultHandlers=p;function d(a,s,r,n){return Math.sqrt(Math.pow(r-a,2)+Math.pow(n-s,2))}function o(a,s,r){if(a.start.row==a.end.row)var n=2*s.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var n=3*s.column-2*r.getLine(a.start.row).length;else var n=2*s.row-a.start.row-a.end.row;return n<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,u,$){var b=e("../lib/event"),v=e("../lib/useragent"),x=function(){function p(d,o){this.speed,this.wheelX,this.wheelY,this.domEvent=d,this.editor=o,this.x=this.clientX=d.clientX,this.y=this.clientY=d.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return p.prototype.stopPropagation=function(){b.stopPropagation(this.domEvent),this.propagationStopped=!0},p.prototype.preventDefault=function(){b.preventDefault(this.domEvent),this.defaultPrevented=!0},p.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},p.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},p.prototype.getGutterRow=function(){var d=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(d,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-a},p.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var d=this.editor,o=d.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=o.contains(a.row,a.column)}return this.$inSelection},p.prototype.getButton=function(){return b.getButton(this.domEvent)},p.prototype.getShiftKey=function(){return this.domEvent.shiftKey},p.prototype.getAccelKey=function(){return v.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},p}();u.MouseEvent=x}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,u,$){u.preventParentScroll=function(v){v.stopPropagation();var x=v.currentTarget,p=x.scrollHeight>x.clientHeight;p||v.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,u,$){var b=this&&this.__extends||function(){var i=function(h,m){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,R){y.__proto__=R}||function(y,R){for(var T in R)Object.prototype.hasOwnProperty.call(R,T)&&(y[T]=R[T])},i(h,m)};return function(h,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");i(h,m);function y(){this.constructor=h}h.prototype=m===null?Object.create(m):(y.prototype=m.prototype,new y)}}(),v=this&&this.__values||function(i){var h=typeof Symbol=="function"&&Symbol.iterator,m=h&&i[h],y=0;if(m)return m.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&y>=i.length&&(i=void 0),{value:i&&i[y++],done:!i}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("./lib/dom");e("./lib/event");var p=e("./range").Range,d=e("./lib/scroll").preventParentScroll,o="ace_tooltip",a=function(){function i(h){this.isOpen=!1,this.$element=null,this.$parentNode=h}return i.prototype.$init=function(){return this.$element=x.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},i.prototype.getElement=function(){return this.$element||this.$init()},i.prototype.setText=function(h){this.getElement().textContent=h},i.prototype.setHtml=function(h){this.getElement().innerHTML=h},i.prototype.setPosition=function(h,m){this.getElement().style.left=h+"px",this.getElement().style.top=m+"px"},i.prototype.setClassName=function(h){x.addCssClass(this.getElement(),h)},i.prototype.setTheme=function(h){this.theme&&(this.theme.isDark&&x.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&x.removeCssClass(this.getElement(),this.theme.cssClass)),h.isDark&&x.addCssClass(this.getElement(),"ace_dark"),h.cssClass&&x.addCssClass(this.getElement(),h.cssClass),this.theme={isDark:h.isDark,cssClass:h.cssClass}},i.prototype.show=function(h,m,y){h!=null&&this.setText(h),m!=null&&y!=null&&this.setPosition(m,y),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},i.prototype.hide=function(h){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},i.prototype.getHeight=function(){return this.getElement().offsetHeight},i.prototype.getWidth=function(){return this.getElement().offsetWidth},i.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},i}(),s=function(){function i(){this.popups=[]}return i.prototype.addPopup=function(h){this.popups.push(h),this.updatePopups()},i.prototype.removePopup=function(h){var m=this.popups.indexOf(h);m!==-1&&(this.popups.splice(m,1),this.updatePopups())},i.prototype.updatePopups=function(){var h,m,y,R;this.popups.sort(function(F,O){return O.priority-F.priority});var T=[];try{for(var C=v(this.popups),w=C.next();!w.done;w=C.next()){var E=w.value,D=!0;try{for(var I=(y=void 0,v(T)),L=I.next();!L.done;L=I.next()){var z=L.value;if(this.doPopupsOverlap(z,E)){D=!1;break}}}catch(F){y={error:F}}finally{try{L&&!L.done&&(R=I.return)&&R.call(I)}finally{if(y)throw y.error}}D?T.push(E):E.hide()}}catch(F){h={error:F}}finally{try{w&&!w.done&&(m=C.return)&&m.call(C)}finally{if(h)throw h.error}}},i.prototype.doPopupsOverlap=function(h,m){var y=h.getElement().getBoundingClientRect(),R=m.getElement().getBoundingClientRect();return y.left<R.right&&y.right>R.left&&y.top<R.bottom&&y.bottom>R.top},i}(),r=new s;u.popupManager=r,u.Tooltip=a;var n=function(i){b(h,i);function h(m){m===void 0&&(m=document.body);var y=i.call(this,m)||this;y.timeout=void 0,y.lastT=0,y.idleTime=350,y.lastEvent=void 0,y.onMouseOut=y.onMouseOut.bind(y),y.onMouseMove=y.onMouseMove.bind(y),y.waitForHover=y.waitForHover.bind(y),y.hide=y.hide.bind(y);var R=y.getElement();return R.style.whiteSpace="pre-wrap",R.style.pointerEvents="auto",R.addEventListener("mouseout",y.onMouseOut),R.tabIndex=-1,R.addEventListener("blur",(function(){R.contains(document.activeElement)||this.hide()}).bind(y)),R.addEventListener("wheel",d),y}return h.prototype.addToEditor=function(m){m.on("mousemove",this.onMouseMove),m.on("mousedown",this.hide);var y=m.renderer.getMouseEventTarget();y&&typeof y.removeEventListener=="function"&&y.addEventListener("mouseout",this.onMouseOut,!0)},h.prototype.removeFromEditor=function(m){m.off("mousemove",this.onMouseMove),m.off("mousedown",this.hide);var y=m.renderer.getMouseEventTarget();y&&typeof y.removeEventListener=="function"&&y.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},h.prototype.onMouseMove=function(m,y){this.lastEvent=m,this.lastT=Date.now();var R=y.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||R||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||R||(this.lastEvent=m,this.timeout=setTimeout(this.waitForHover,this.idleTime))},h.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var m=Date.now()-this.lastT;if(this.idleTime-m>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-m);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},h.prototype.isOutsideOfText=function(m){var y=m.editor,R=m.getDocumentPosition(),T=y.session.getLine(R.row);if(R.column==T.length){var C=y.renderer.pixelToScreenCoordinates(m.clientX,m.clientY),w=y.session.documentToScreenPosition(R.row,R.column);if(w.column!=C.column||w.row!=C.row)return!0}return!1},h.prototype.setDataProvider=function(m){this.$gatherData=m},h.prototype.showForRange=function(m,y,R,T){if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=m.renderer;this.isOpen||(r.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.range=p.fromPoints(y.start,y.end);var w=C.textToScreenCoordinates(y.start.row,y.start.column),E=C.scroller.getBoundingClientRect();w.pageX<E.left&&(w.pageX=E.left);var D=this.getElement();D.innerHTML="",D.appendChild(R),D.style.maxHeight="",D.style.display="block",this.$setPosition(m,w,!0,y),x.$fixPositionBug(D)}},h.prototype.$setPosition=function(m,y,R,T){var C=10;R&&this.addMarker(T,m.session);var w=m.renderer,E=this.getElement(),D=E.offsetHeight,I=E.offsetWidth,L=y.pageY,z=y.pageX,F=window.innerHeight-L-w.lineHeight,O=this.$shouldPlaceAbove(D,L,F-C);E.style.maxHeight=(O?L:F)-C+"px",E.style.top=O?"":L+w.lineHeight+"px",E.style.bottom=O?window.innerHeight-L+"px":"",E.style.left=Math.min(z,window.innerWidth-I-C)+"px"},h.prototype.$shouldPlaceAbove=function(m,y,R){return!(y-m<0&&y<R)},h.prototype.addMarker=function(m,y){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=y,this.marker=y&&y.addMarker(m,"ace_highlight-marker","text")},h.prototype.hide=function(m){m&&this.$fromKeyboard&&m.type=="keydown"&&m.code=="Escape"||!m&&document.activeElement==this.getElement()||m&&m.target&&(m.type!="keydown"||m.ctrlKey||m.metaKey)&&this.$element.contains(m.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,r.removePopup(this)))},h.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},h.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},h.prototype.onMouseOut=function(m){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!m.relatedTarget||this.getElement().contains(m.relatedTarget)||m&&m.currentTarget.contains(m.relatedTarget)||m.relatedTarget.classList.contains("ace_content")||this.hide())},h}(a);u.HoverTooltip=n}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(e,u,$){var b=this&&this.__extends||function(){var n=function(i,h){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var R in y)Object.prototype.hasOwnProperty.call(y,R)&&(m[R]=y[R])},n(i,h)};return function(i,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");n(i,h);function m(){this.constructor=i}i.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}}(),v=this&&this.__values||function(n){var i=typeof Symbol=="function"&&Symbol.iterator,h=i&&n[i],m=0;if(h)return h.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&m>=n.length&&(n=void 0),{value:n&&n[m++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("../lib/dom"),p=e("./mouse_event").MouseEvent,d=e("../tooltip").HoverTooltip,o=e("../config").nls,a=e("../range").Range;function s(n){var i=n.editor,h=i.renderer.$gutterLayer;n.$tooltip=new r(i),n.$tooltip.addToEditor(i),n.$tooltip.setDataProvider(function(m,y){var R=m.getDocumentPosition().row;n.$tooltip.showTooltip(R)}),n.editor.setDefaultHandler("guttermousedown",function(m){if(!(!i.isFocused()||m.getButton()!=0)){var y=h.getRegion(m);if(y!="foldWidgets"){var R=m.getDocumentPosition().row,T=i.session.selection;if(m.getShiftKey())T.selectTo(R,0);else{if(m.domEvent.detail==2)return i.selectAll(),m.preventDefault();n.$clickSelection=i.selection.getLineRange(R)}return n.setState("selectByLines"),n.captureMouse(m),m.preventDefault()}}})}u.GutterHandler=s;var r=function(n){b(i,n);function i(h){var m=n.call(this,h.container)||this;m.id="gt"+ ++i.$uid,m.editor=h,m.visibleTooltipRow;var y=m.getElement();return y.setAttribute("role","tooltip"),y.setAttribute("id",m.id),y.style.pointerEvents="auto",m.idleTime=50,m.onDomMouseMove=m.onDomMouseMove.bind(m),m.onDomMouseOut=m.onDomMouseOut.bind(m),m.setClassName("ace_gutter-tooltip"),m}return i.prototype.onDomMouseMove=function(h){var m=new p(h,this.editor);this.onMouseMove(m,this.editor)},i.prototype.onDomMouseOut=function(h){var m=new p(h,this.editor);this.onMouseOut(m)},i.prototype.addToEditor=function(h){var m=h.renderer.$gutter;m.addEventListener("mousemove",this.onDomMouseMove),m.addEventListener("mouseout",this.onDomMouseOut),n.prototype.addToEditor.call(this,h)},i.prototype.removeFromEditor=function(h){var m=h.renderer.$gutter;m.removeEventListener("mousemove",this.onDomMouseMove),m.removeEventListener("mouseout",this.onDomMouseOut),n.prototype.removeFromEditor.call(this,h)},i.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),n.prototype.destroy.call(this)},Object.defineProperty(i,"annotationLabels",{get:function(){return{error:{singular:o("gutter-tooltip.aria-label.error.singular","error"),plural:o("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:o("gutter-tooltip.aria-label.security.singular","security finding"),plural:o("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:o("gutter-tooltip.aria-label.warning.singular","warning"),plural:o("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:o("gutter-tooltip.aria-label.info.singular","information message"),plural:o("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:o("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:o("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),i.prototype.showTooltip=function(h){var m,y=this.editor.renderer.$gutterLayer,R=y.$annotations[h],T;R?T={displayText:Array.from(R.displayText),type:Array.from(R.type)}:T={displayText:[],type:[]};var C=y.session.getFoldLine(h);if(C&&y.$showFoldedAnnotations){for(var w={error:[],security:[],warning:[],info:[],hint:[]},E={error:1,security:2,warning:3,info:4,hint:5},D,I=h+1;I<=C.end.row;I++)if(y.$annotations[I])for(var L=0;L<y.$annotations[I].text.length;L++){var z=y.$annotations[I].type[L];w[z].push(y.$annotations[I].text[L]),(!D||E[z]<E[D])&&(D=z)}if(["error","security","warning"].includes(D)){var F="".concat(i.annotationsToSummaryString(w)," in folded code.");T.displayText.push(F),T.type.push(D+"_fold")}}if(T.displayText.length===0)return this.hide();for(var O={error:[],security:[],warning:[],info:[],hint:[]},A=y.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<T.displayText.length;I++){var S=x.createElement("span"),N=x.createElement("span");(m=N.classList).add.apply(m,["ace_".concat(T.type[I]),A]),N.setAttribute("aria-label","".concat(i.annotationLabels[T.type[I].replace("_fold","")].singular)),N.setAttribute("role","img"),N.appendChild(x.createTextNode(" ")),S.appendChild(N),S.appendChild(x.createTextNode(T.displayText[I])),S.appendChild(x.createElement("br")),O[T.type[I].replace("_fold","")].push(S)}var W=x.createElement("span");O.error.forEach(function(Z){return W.appendChild(Z)}),O.security.forEach(function(Z){return W.appendChild(Z)}),O.warning.forEach(function(Z){return W.appendChild(Z)}),O.info.forEach(function(Z){return W.appendChild(Z)}),O.hint.forEach(function(Z){return W.appendChild(Z)}),W.setAttribute("aria-live","polite");var V=this.$findLinkedAnnotationNode(h);V&&V.setAttribute("aria-describedby",this.id);var G=a.fromPoints({row:h,column:0},{row:h,column:0});this.showForRange(this.editor,G,W),this.visibleTooltipRow=h,this.editor._signal("showGutterTooltip",this)},i.prototype.$setPosition=function(h,m,y,R){var T=this.$findCellByRow(R.start.row);if(T){var C=T&&T.element,w=C&&C.querySelector(".ace_gutter_annotation");if(w){var E=w.getBoundingClientRect();if(E){var D={pageX:E.right,pageY:E.top};return n.prototype.$setPosition.call(this,h,D,!1,R)}}}},i.prototype.$shouldPlaceAbove=function(h,m,y){return y<h},i.prototype.$findLinkedAnnotationNode=function(h){var m=this.$findCellByRow(h);if(m){var y=m.element;if(y.childNodes.length>2)return y.childNodes[2]}},i.prototype.$findCellByRow=function(h){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(m){return m.row===h})},i.prototype.hide=function(h){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var m=this.$findLinkedAnnotationNode(this.visibleTooltipRow);m&&m.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),n.prototype.hide.call(this,h)}},i.annotationsToSummaryString=function(h){var m,y,R=[],T=["error","security","warning","info","hint"];try{for(var C=v(T),w=C.next();!w.done;w=C.next()){var E=w.value;if(h[E].length){var D=h[E].length===1?i.annotationLabels[E].singular:i.annotationLabels[E].plural;R.push("".concat(h[E].length," ").concat(D))}}}catch(I){m={error:I}}finally{try{w&&!w.done&&(y=C.return)&&y.call(C)}finally{if(m)throw m.error}}return R.join(", ")},i.prototype.isOutsideOfText=function(h){var m=h.editor,y=m.renderer.$gutter.getBoundingClientRect();return!(h.clientX>=y.left&&h.clientX<=y.right&&h.clientY>=y.top&&h.clientY<=y.bottom)},i}(d);r.$uid=0,u.GutterTooltip=r}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,u,$){var b=e("../lib/dom"),v=e("../lib/event"),x=e("../lib/useragent"),p=200,d=200,o=5;function a(r){var n=r.editor,i=b.createElement("div");i.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",i.textContent=" ";var h=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];h.forEach(function(ne){r[ne]=this[ne]},this),n.on("mousedown",this.onMouseDown.bind(r));var m=n.container,y,R,T,C,w,E,D=0,I,L,z,F,O;this.onDragStart=function(ne){if(this.cancelDrag||!m.draggable){var he=this;return setTimeout(function(){he.startSelect(),he.captureMouse(ne)},0),ne.preventDefault()}w=n.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=n.getReadOnly()?"copy":"copyMove",n.container.appendChild(i),ue.setDragImage&&ue.setDragImage(i,0,0),setTimeout(function(){n.container.removeChild(i)}),ue.clearData(),ue.setData("Text",n.session.getTextRange()),L=!0,this.setState("drag")},this.onDragEnd=function(ne){if(m.draggable=!1,L=!1,this.setState(null),!n.getReadOnly()){var he=ne.dataTransfer.dropEffect;!I&&he=="move"&&n.session.remove(n.getSelectionRange()),n.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(n.getReadOnly()||!ee(ne.dataTransfer)))return R=ne.clientX,T=ne.clientY,y||W(),D++,ne.dataTransfer.dropEffect=I=ce(ne),v.preventDefault(ne)},this.onDragOver=function(ne){if(!(n.getReadOnly()||!ee(ne.dataTransfer)))return R=ne.clientX,T=ne.clientY,y||(W(),D++),G!==null&&(G=null),ne.dataTransfer.dropEffect=I=ce(ne),v.preventDefault(ne)},this.onDragLeave=function(ne){if(D--,D<=0&&y)return V(),I=null,v.preventDefault(ne)},this.onDrop=function(ne){if(E){var he=ne.dataTransfer;if(L)switch(I){case"move":w.contains(E.row,E.column)?w={start:E,end:E}:w=n.moveText(w,E);break;case"copy":w=n.moveText(w,E,!0);break}else{var ue=he.getData("Text");w={start:E,end:n.session.insert(E,ue)},n.focus(),I=null}return V(),v.preventDefault(ne)}},v.addListener(m,"dragstart",this.onDragStart.bind(r),n),v.addListener(m,"dragend",this.onDragEnd.bind(r),n),v.addListener(m,"dragenter",this.onDragEnter.bind(r),n),v.addListener(m,"dragover",this.onDragOver.bind(r),n),v.addListener(m,"dragleave",this.onDragLeave.bind(r),n),v.addListener(m,"drop",this.onDrop.bind(r),n);function A(ne,he){var ue=Date.now(),le=!he||ne.row!=he.row,me=!he||ne.column!=he.column;if(!F||le||me)n.moveCursorToPosition(ne),F=ue,O={x:R,y:T};else{var _e=s(O.x,O.y,R,T);_e>o?F=null:ue-F>=d&&(n.renderer.scrollCursorIntoView(),F=null)}}function S(ne,he){var ue=Date.now(),le=n.renderer.layerConfig.lineHeight,me=n.renderer.layerConfig.characterWidth,_e=n.renderer.scroller.getBoundingClientRect(),Ae={x:{left:R-_e.left,right:_e.right-R},y:{top:T-_e.top,bottom:_e.bottom-T}},Me=Math.min(Ae.x.left,Ae.x.right),qe=Math.min(Ae.y.top,Ae.y.bottom),Ve={row:ne.row,column:ne.column};Me/me<=2&&(Ve.column+=Ae.x.left<Ae.x.right?-3:2),qe/le<=1&&(Ve.row+=Ae.y.top<Ae.y.bottom?-1:1);var ot=ne.row!=Ve.row,Je=ne.column!=Ve.column,lt=!he||ne.row!=he.row;ot||Je&&!lt?z?ue-z>=p&&n.renderer.scrollCursorIntoView(Ve):z=ue:z=null}function N(){var ne=E;E=n.renderer.screenToTextCoordinates(R,T),A(E,ne),S(E,ne)}function W(){w=n.selection.toOrientedRange(),y=n.session.addMarker(w,"ace_selection",n.getSelectionStyle()),n.clearSelection(),n.isFocused()&&n.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),N(),C=setInterval(N,20),D=0,v.addListener(document,"mousemove",Z)}function V(){clearInterval(C),n.session.removeMarker(y),y=null,n.selection.fromOrientedRange(w),n.isFocused()&&!L&&n.$resetCursorStyle(),w=null,E=null,D=0,z=null,F=null,v.removeListener(document,"mousemove",Z)}var G=null;function Z(){G==null&&(G=setTimeout(function(){G!=null&&y&&V()},20))}function ee(ne){var he=ne.types;return!he||Array.prototype.some.call(he,function(ue){return ue=="text/plain"||ue=="Text"})}function ce(ne){var he=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],le=x.isMac?ne.altKey:ne.ctrlKey,me="uninitialized";try{me=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var _e="none";return le&&he.indexOf(me)>=0?_e="copy":ue.indexOf(me)>=0?_e="move":he.indexOf(me)>=0&&(_e="copy"),_e}}(function(){this.dragWait=function(){var r=Date.now()-this.mousedownEvent.time;r>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var r=this.editor.container;r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(r){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var r=this.editor,n=r.container;n.draggable=!0,r.renderer.$cursorLayer.setBlinking(!1),r.setStyle("ace_dragging");var i=x.isWin?"default":"move";r.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(r){var n=this.editor.container;if(x.isIE&&this.state=="dragReady"){var i=s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&n.dragDrop()}if(this.state==="dragWait"){var i=s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(n.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(r){if(this.$dragEnabled){this.mousedownEvent=r;var n=this.editor,i=r.inSelection(),h=r.getButton(),m=r.domEvent.detail||1;if(m===1&&h===0&&i){if(r.editor.inMultiSelectMode&&(r.getAccelKey()||r.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=r.domEvent.target||r.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),n.getDragDelay()){if(x.isWebKit){this.cancelDrag=!0;var R=n.container;R.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(r,this.onMouseDrag.bind(this)),r.defaultPrevented=!0}}}}).call(a.prototype);function s(r,n,i,h){return Math.sqrt(Math.pow(i-r,2)+Math.pow(h-n,2))}u.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,u,$){var b=e("./mouse_event").MouseEvent,v=e("../lib/event"),x=e("../lib/dom");u.addTouchListeners=function(p,d){var o="scroll",a,s,r,n,i,h,m=0,y,R=0,T=0,C=0,w,E;function D(){var A=window.navigator&&window.navigator.clipboard,S=!1,N=function(){var G=d.getCopyText(),Z=d.session.getUndoManager().hasUndo();E.replaceChild(x.buildDom(S?["span",!G&&W("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],G&&W("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],G&&W("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&W("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&W("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],W("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],W("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),E.firstChild)},W=function(G){return d.commands.canExecute(G,d)},V=function(G){var Z=G.target.getAttribute("action");if(Z=="more"||!S)return S=!S,N();Z=="paste"?A.readText().then(function(ee){d.execCommand(Z,ee)}):Z&&((Z=="cut"||Z=="copy")&&(A?A.writeText(d.getCopyText()):document.execCommand("copy")),d.execCommand(Z)),E.firstChild.style.display="none",S=!1,Z!="openCommandPalette"&&d.focus()};E=x.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(G){o="menu",G.stopPropagation(),G.preventDefault(),d.textInput.focus()},ontouchend:function(G){G.stopPropagation(),G.preventDefault(),V(G)},onclick:V},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],d.container)}function I(){if(!d.getOption("enableMobileMenu")){E&&L();return}E||D();var A=d.selection.cursor,S=d.renderer.textToScreenCoordinates(A.row,A.column),N=d.renderer.textToScreenCoordinates(0,0).pageX,W=d.renderer.scrollLeft,V=d.container.getBoundingClientRect();E.style.top=S.pageY-V.top-3+"px",S.pageX-V.left<V.width-70?(E.style.left="",E.style.right="10px"):(E.style.right="",E.style.left=N+W-V.left+"px"),E.style.display="",E.firstChild.style.display="none",d.on("input",L)}function L(A){E&&(E.style.display="none"),d.off("input",L)}function z(){i=null,clearTimeout(i);var A=d.selection.getRange(),S=A.contains(y.row,y.column);(A.isEmpty()||!S)&&(d.selection.moveToPosition(y),d.selection.selectWord()),o="wait",I()}function F(){i=null,clearTimeout(i),d.selection.moveToPosition(y);var A=R>=2?d.selection.getLineRange(y.row):d.session.getBracketRange(y);A&&!A.isEmpty()?d.selection.setRange(A):d.selection.selectWord(),o="wait"}v.addListener(p,"contextmenu",function(A){if(w){var S=d.textInput.getElement();S.focus()}},d),v.addListener(p,"touchstart",function(A){var S=A.touches;if(i||S.length>1){clearTimeout(i),i=null,r=-1,o="zoom";return}w=d.$mouseHandler.isMousePressed=!0;var N=d.renderer.layerConfig.lineHeight,W=d.renderer.layerConfig.lineHeight,V=A.timeStamp;n=V;var G=S[0],Z=G.clientX,ee=G.clientY;Math.abs(a-Z)+Math.abs(s-ee)>N&&(r=-1),a=A.clientX=Z,s=A.clientY=ee,T=C=0;var ce=new b(A,d);if(y=ce.getDocumentPosition(),V-r<500&&S.length==1&&!m)R++,A.preventDefault(),A.button=0,F();else{R=0;var ne=d.selection.cursor,he=d.selection.isEmpty()?ne:d.selection.anchor,ue=d.renderer.$cursorLayer.getPixelPosition(ne,!0),le=d.renderer.$cursorLayer.getPixelPosition(he,!0),me=d.renderer.scroller.getBoundingClientRect(),_e=d.renderer.layerConfig.offset,Ae=d.renderer.scrollLeft,Me=function(ot,Je){return ot=ot/W,Je=Je/N-.75,ot*ot+Je*Je};if(A.clientX<me.left){o="zoom";return}var qe=Me(A.clientX-me.left-ue.left+Ae,A.clientY-me.top-ue.top+_e),Ve=Me(A.clientX-me.left-le.left+Ae,A.clientY-me.top-le.top+_e);qe<3.5&&Ve<3.5&&(o=qe>Ve?"cursor":"anchor"),Ve<3.5?o="anchor":qe<3.5?o="cursor":o="scroll",i=setTimeout(z,450)}r=V},d),v.addListener(p,"touchend",function(A){w=d.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),o=="zoom"?(o="",m=0):i?(d.selection.moveToPosition(y),m=0,I()):o=="scroll"?(O(),L()):I(),clearTimeout(i),i=null},d),v.addListener(p,"touchmove",function(A){i&&(clearTimeout(i),i=null);var S=A.touches;if(!(S.length>1||o=="zoom")){var N=S[0],W=a-N.clientX,V=s-N.clientY;if(o=="wait")if(W*W+V*V>4)o="cursor";else return A.preventDefault();a=N.clientX,s=N.clientY,A.clientX=N.clientX,A.clientY=N.clientY;var G=A.timeStamp,Z=G-n;if(n=G,o=="scroll"){var ee=new b(A,d);ee.speed=1,ee.wheelX=W,ee.wheelY=V,10*Math.abs(W)<Math.abs(V)&&(W=0),10*Math.abs(V)<Math.abs(W)&&(V=0),Z!=0&&(T=W/Z,C=V/Z),d._emit("mousewheel",ee),ee.propagationStopped||(T=C=0)}else{var ce=new b(A,d),ne=ce.getDocumentPosition();o=="cursor"?d.selection.moveCursorToPosition(ne):o=="anchor"&&d.selection.setSelectionAnchor(ne.row,ne.column),d.renderer.scrollCursorIntoView(ne),A.preventDefault()}}},d);function O(){m+=60,h=setInterval(function(){m--<=0&&(clearInterval(h),h=null),Math.abs(T)<.01&&(T=0),Math.abs(C)<.01&&(C=0),m<20&&(T=.9*T),m<20&&(C=.9*C);var A=d.session.getScrollTop();d.renderer.scrollBy(10*T,10*C),A==d.session.getScrollTop()&&(m=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,u,$){var b=e("../lib/event"),v=e("../lib/useragent"),x=e("./default_handlers").DefaultHandlers,p=e("./default_gutter_handler").GutterHandler,d=e("./mouse_event").MouseEvent,o=e("./dragdrop_handler").DragdropHandler,a=e("./touch_handler").addTouchListeners,s=e("../config"),r=function(){function n(i){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var h=this;this.editor=i,new x(this),new p(this),new o(this);var m=function(T){var C=!document.hasFocus||!document.hasFocus()||!i.isFocused()&&document.activeElement==(i.textInput&&i.textInput.getElement());C&&window.focus(),i.focus(),setTimeout(function(){i.isFocused()||i.focus()})},y=i.renderer.getMouseEventTarget();b.addListener(y,"click",this.onMouseEvent.bind(this,"click"),i),b.addListener(y,"mousemove",this.onMouseMove.bind(this,"mousemove"),i),b.addMultiMouseDownListener([y,i.renderer.scrollBarV&&i.renderer.scrollBarV.inner,i.renderer.scrollBarH&&i.renderer.scrollBarH.inner,i.textInput&&i.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",i),b.addMouseWheelListener(i.container,this.onMouseWheel.bind(this,"mousewheel"),i),a(i.container,i);var R=i.renderer.$gutter;b.addListener(R,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),i),b.addListener(R,"click",this.onMouseEvent.bind(this,"gutterclick"),i),b.addListener(R,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),i),b.addListener(R,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),i),b.addListener(y,"mousedown",m,i),b.addListener(R,"mousedown",m,i),v.isIE&&i.renderer.scrollBarV&&(b.addListener(i.renderer.scrollBarV.element,"mousedown",m,i),b.addListener(i.renderer.scrollBarH.element,"mousedown",m,i)),i.on("mousemove",function(T){if(!(h.state||h.$dragDelay||!h.$dragEnabled)){var C=i.renderer.screenToTextCoordinates(T.x,T.y),w=i.session.selection.getRange(),E=i.renderer;!w.isEmpty()&&w.insideStart(C.row,C.column)?E.setCursorStyle("default"):E.setCursorStyle("")}},i)}return n.prototype.onMouseEvent=function(i,h){this.editor.session&&this.editor._emit(i,new d(h,this.editor))},n.prototype.onMouseMove=function(i,h){var m=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!m||!m.length||this.editor._emit(i,new d(h,this.editor))},n.prototype.onMouseWheel=function(i,h){var m=new d(h,this.editor);m.speed=this.$scrollSpeed*2,m.wheelX=h.wheelX,m.wheelY=h.wheelY,this.editor._emit(i,m)},n.prototype.setState=function(i){this.state=i},n.prototype.captureMouse=function(i,h){this.x=i.x,this.y=i.y,this.isMousePressed=!0;var m=this.editor,y=this.editor.renderer;y.$isMousePressed=!0;var R=this,T=!0,C=function(L){if(L){if(v.isWebKit&&!L.which&&R.releaseMouse)return R.releaseMouse();R.x=L.clientX,R.y=L.clientY,h&&h(L),R.mouseEvent=new d(L,R.editor),R.$mouseMoved=!0}},w=function(L){m.off("beforeEndOperation",I),T=!1,m.session&&E(),R[R.state+"End"]&&R[R.state+"End"](L),R.state="",R.isMousePressed=y.$isMousePressed=!1,y.$keepTextAreaAtCursor&&y.$moveTextAreaToCursor(),R.$onCaptureMouseMove=R.releaseMouse=null,L&&R.onMouseEvent("mouseup",L),m.endOperation()},E=function(){R[R.state]&&R[R.state](),R.$mouseMoved=!1},D=function(){T&&(E(),b.nextFrame(D))};if(v.isOldIE&&i.domEvent.type=="dblclick")return setTimeout(function(){w(i)});var I=function(L){R.releaseMouse&&m.curOp.command.name&&m.curOp.selectionChanged&&(R[R.state+"End"]&&R[R.state+"End"](),R.state="",R.releaseMouse())};m.on("beforeEndOperation",I),m.startOperation({command:{name:"mouse"}}),R.$onCaptureMouseMove=C,R.releaseMouse=b.capture(this.editor.container,C,w),D()},n.prototype.cancelContextMenu=function(){var i=(function(h){h&&h.domEvent&&h.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",i),h&&h.domEvent&&b.stopEvent(h.domEvent))}).bind(this);setTimeout(i,10),this.editor.on("nativecontextmenu",i)},n.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},n}();r.prototype.releaseMouse=null,s.defineOptions(r.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:v.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),u.MouseHandler=r}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,u,$){var b=e("../lib/dom"),v=function(){function x(p){p.on("click",function(d){var o=d.getDocumentPosition(),a=p.session,s=a.getFoldAt(o.row,o.column,1);s&&(d.getAccelKey()?a.removeFold(s):a.expandFold(s),d.stop());var r=d.domEvent&&d.domEvent.target;r&&b.hasCssClass(r,"ace_inline_button")&&b.hasCssClass(r,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),p.renderer.scrollCursorIntoView())}),p.on("gutterclick",function(d){var o=p.renderer.$gutterLayer.getRegion(d);if(o=="foldWidgets"){var a=d.getDocumentPosition().row,s=p.session;s.foldWidgets&&s.foldWidgets[a]&&p.session.onFoldWidgetClick(a,d),p.isFocused()||p.focus(),d.stop()}}),p.on("gutterdblclick",function(d){var o=p.renderer.$gutterLayer.getRegion(d);if(o=="foldWidgets"){var a=d.getDocumentPosition().row,s=p.session,r=s.getParentFoldRangeData(a,!0),n=r.range||r.firstRange;if(n){a=n.start.row;var i=s.getFoldAt(a,s.getLine(a).length,1);i?s.removeFold(i):(s.addFold("...",n),p.renderer.scrollCursorIntoView({row:n.start.row,column:0}))}d.stop()}})}return x}();u.FoldHandler=v}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,u,$){var b=e("../lib/keys"),v=e("../lib/event"),x=function(){function p(d){this.$editor=d,this.$data={editor:d},this.$handlers=[],this.setDefaultHandler(d.commands)}return p.prototype.setDefaultHandler=function(d){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=d,this.addKeyboardHandler(d,0)},p.prototype.setKeyboardHandler=function(d){var o=this.$handlers;if(o[o.length-1]!=d){for(;o[o.length-1]&&o[o.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(o[o.length-1]);this.addKeyboardHandler(d,1)}},p.prototype.addKeyboardHandler=function(d,o){if(d){typeof d=="function"&&!d.handleKeyboard&&(d.handleKeyboard=d);var a=this.$handlers.indexOf(d);a!=-1&&this.$handlers.splice(a,1),o==null?this.$handlers.push(d):this.$handlers.splice(o,0,d),a==-1&&d.attach&&d.attach(this.$editor)}},p.prototype.removeKeyboardHandler=function(d){var o=this.$handlers.indexOf(d);return o==-1?!1:(this.$handlers.splice(o,1),d.detach&&d.detach(this.$editor),!0)},p.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},p.prototype.getStatusText=function(){var d=this.$data,o=d.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(o,d)||""}).filter(Boolean).join(" ")},p.prototype.$callKeyboardHandlers=function(d,o,a,s){for(var r,n=!1,i=this.$editor.commands,h=this.$handlers.length;h--&&(r=this.$handlers[h].handleKeyboard(this.$data,d,o,a,s),!(!(!r||!r.command)&&(r.command=="null"?n=!0:n=i.exec(r.command,this.$editor,r.args,s),n&&s&&d!=-1&&r.passEvent!=!0&&r.command.passEvent!=!0&&v.stopEvent(s),n))););return!n&&d==-1&&(r={command:"insertstring"},n=i.exec("insertstring",this.$editor,o)),n&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),n},p.prototype.onCommandKey=function(d,o,a){var s=b.keyCodeToString(a);return this.$callKeyboardHandlers(o,s,a,d)},p.prototype.onTextInput=function(d){return this.$callKeyboardHandlers(-1,d)},p}();u.KeyBinding=x}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,u,$){var b=0,v=0,x=!1,p=!1,d=!1,o=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],s=0,r=1,n=0,i=1,h=2,m=3,y=4,R=5,T=6,C=7,w=8,E=9,D=10,I=11,L=12,z=13,F=14,O=15,A=16,S=17,N=18,W=[N,N,N,N,N,N,N,N,N,T,R,T,w,R,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,R,R,T,w,y,y,I,I,I,y,y,y,y,y,D,E,D,E,E,h,h,h,h,h,h,h,h,h,h,E,y,y,y,y,y,y,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,y,y,y,y,y,y,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,y,y,y,y,N,N,N,N,N,N,R,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,E,y,I,I,I,I,y,y,y,y,n,y,y,N,y,y,I,I,h,h,y,n,y,y,y,h,n,y,y,y,y,y],V=[w,w,w,w,w,w,w,w,w,w,w,N,N,N,n,i,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,w,R,z,F,O,A,S,E,I,I,I,I,I,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,E,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,w];function G(ne,he,ue,le){var me=b?a:o,_e=null,Ae=null,Me=null,qe=0,Ve=null,ot=null,Je=-1,lt=null,Ht=null,vn=[];if(!le)for(lt=0,le=[];lt<ue;lt++)le[lt]=ce(ne[lt]);for(v=b,x=!1,p=!1,d=!1,Ht=0;Ht<ue;Ht++){if(_e=qe,vn[Ht]=Ae=ee(ne,le,vn,Ht),qe=me[_e][Ae],Ve=qe&240,qe&=15,he[Ht]=Me=me[qe][5],Ve>0)if(Ve==16){for(lt=Je;lt<Ht;lt++)he[lt]=1;Je=-1}else Je=-1;if(ot=me[qe][6],ot)Je==-1&&(Je=Ht);else if(Je>-1){for(lt=Je;lt<Ht;lt++)he[lt]=Me;Je=-1}le[Ht]==R&&(he[Ht]=0),v|=Me}if(d){for(lt=0;lt<ue;lt++)if(le[lt]==T){he[lt]=b;for(var Pt=lt-1;Pt>=0&&le[Pt]==w;Pt--)he[Pt]=b}}}function Z(ne,he,ue){if(!(v<ne)){if(ne==1&&b==r&&!p){ue.reverse();return}for(var le=ue.length,me=0,_e,Ae,Me,qe;me<le;){if(he[me]>=ne){for(_e=me+1;_e<le&&he[_e]>=ne;)_e++;for(Ae=me,Me=_e-1;Ae<Me;Ae++,Me--)qe=ue[Ae],ue[Ae]=ue[Me],ue[Me]=qe;me=_e}me++}}}function ee(ne,he,ue,le){var me=he[le],_e,Ae,Me,qe;switch(me){case n:case i:x=!1;case y:case m:return me;case h:return x?m:h;case C:return x=!0,i;case w:return y;case E:return le<1||le+1>=he.length||(_e=ue[le-1])!=h&&_e!=m||(Ae=he[le+1])!=h&&Ae!=m?y:(x&&(Ae=m),Ae==_e?Ae:y);case D:return _e=le>0?ue[le-1]:R,_e==h&&le+1<he.length&&he[le+1]==h?h:y;case I:if(le>0&&ue[le-1]==h)return h;if(x)return y;for(qe=le+1,Me=he.length;qe<Me&&he[qe]==I;)qe++;return qe<Me&&he[qe]==h?h:y;case L:for(Me=he.length,qe=le+1;qe<Me&&he[qe]==L;)qe++;if(qe<Me){var Ve=ne[le],ot=Ve>=1425&&Ve<=2303||Ve==64286;if(_e=he[qe],ot&&(_e==i||_e==C))return i}return le<1||(_e=he[le-1])==R?y:ue[le-1];case R:return x=!1,p=!0,b;case T:return d=!0,y;case z:case F:case A:case S:case O:x=!1;case N:return y}}function ce(ne){var he=ne.charCodeAt(0),ue=he>>8;return ue==0?he>191?n:W[he]:ue==5?/[\u0591-\u05f4]/.test(ne)?i:n:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?L:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?m:he==1642?I:/[\u06f0-\u06f9]/.test(ne)?h:C:ue==32&&he<=8287?V[he&255]:ue==254&&he>=65136?C:y}u.L=n,u.R=i,u.EN=h,u.ON_R=3,u.AN=4,u.R_H=5,u.B=6,u.RLE=7,u.DOT="·",u.doBidiReorder=function(ne,he,ue){if(ne.length<2)return{};var le=ne.split(""),me=new Array(le.length),_e=new Array(le.length),Ae=[];b=ue?r:s,G(le,Ae,le.length,he);for(var Me=0;Me<me.length;me[Me]=Me,Me++);Z(2,Ae,me),Z(1,Ae,me);for(var Me=0;Me<me.length-1;Me++)he[Me]===m?Ae[Me]=u.AN:Ae[Me]===i&&(he[Me]>C&&he[Me]<z||he[Me]===y||he[Me]===N)?Ae[Me]=u.ON_R:Me>0&&le[Me-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(le[Me])&&(Ae[Me-1]=Ae[Me]=u.R_H,Me++);le[le.length-1]===u.DOT&&(Ae[le.length-1]=u.B),le[0]===""&&(Ae[0]=u.RLE);for(var Me=0;Me<me.length;Me++)_e[Me]=Ae[me[Me]];return{logicalFromVisual:me,bidiLevels:_e}},u.hasBidiCharacters=function(ne,he){for(var ue=!1,le=0;le<ne.length;le++)he[le]=ce(ne.charAt(le)),!ue&&(he[le]==i||he[le]==C||he[le]==m)&&(ue=!0);return ue},u.getVisualFromLogicalIdx=function(ne,he){for(var ue=0;ue<he.logicalFromVisual.length;ue++)if(he.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,u,$){var b=e("./lib/bidiutil"),v=e("./lib/lang"),x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,p=function(){function d(o){this.session=o,this.bidiMap={},this.currentRow=null,this.bidiUtil=b,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=x.test(o.getValue())}return d.prototype.isBidiRow=function(o,a,s){return this.seenBidi?(o!==this.currentRow&&(this.currentRow=o,this.updateRowLine(a,s),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},d.prototype.onChange=function(o){this.seenBidi?this.currentRow=null:o.action=="insert"&&x.test(o.lines.join(`
|
|
179
179
|
`))&&(this.seenBidi=!0,this.currentRow=null)},d.prototype.getDocumentRow=function(){var o=0,a=this.session.$screenRowCache;if(a.length){var s=this.session.$getRowCacheIndex(a,this.currentRow);s>=0&&(o=this.session.$docRowCache[s])}return o},d.prototype.getSplitIndex=function(){var o=0,a=this.session.$screenRowCache;if(a.length)for(var s,r=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-o>0&&(s=this.session.$getRowCacheIndex(a,this.currentRow-o-1),s===r);)r=s,o++;else o=this.currentRow;return o},d.prototype.updateRowLine=function(o,a){o===void 0&&(o=this.getDocumentRow());var s=o===this.session.getLength()-1,r=s?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var n=this.session.$wrapData[o];n&&(a===void 0&&(a=this.getSplitIndex()),a>0&&n.length?(this.wrapIndent=n.indent,this.wrapOffset=this.wrapIndent*this.charWidths[b.L],this.line=a<n.length?this.line.substring(n[a-1],n[a]):this.line.substring(n[n.length-1])):this.line=this.line.substring(0,n[a]),a==n.length&&(this.line+=this.showInvisibles?r:b.DOT))}else this.line+=this.showInvisibles?r:b.DOT;var i=this.session,h=0,m;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(y,R){return y===" "||i.isFullWidth(y.charCodeAt(0))?(m=y===" "?i.getScreenTabSize(R+h):2,h+=m-1,v.stringRepeat(b.DOT,m)):y}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==b.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},d.prototype.updateBidiMap=function(){var o=[];b.hasBidiCharacters(this.line,o)||this.isRtlDir?this.bidiMap=b.doBidiReorder(this.line,o,this.isRtlDir):this.bidiMap={}},d.prototype.markAsDirty=function(){this.currentRow=null},d.prototype.updateCharacterWidths=function(o){if(this.characterWidth!==o.$characterSize.width){this.fontMetrics=o;var a=this.characterWidth=o.$characterSize.width,s=o.$measureCharWidth("ה");this.charWidths[b.L]=this.charWidths[b.EN]=this.charWidths[b.ON_R]=a,this.charWidths[b.R]=this.charWidths[b.AN]=s,this.charWidths[b.R_H]=s*.45,this.charWidths[b.B]=this.charWidths[b.RLE]=0,this.currentRow=null}},d.prototype.setShowInvisibles=function(o){this.showInvisibles=o,this.currentRow=null},d.prototype.setEolChar=function(o){this.EOL=o},d.prototype.setContentWidth=function(o){this.contentWidth=o},d.prototype.isRtlLine=function(o){return this.$isRtl?!0:o!=null?this.session.getLine(o).charAt(0)==this.RLE:this.isRtlDir},d.prototype.setRtlDirection=function(o,a){for(var s=o.getCursorPosition(),r=o.selection.getSelectionAnchor().row;r<=s.row;r++)!a&&o.session.getLine(r).charAt(0)===o.session.$bidiHandler.RLE?o.session.doc.removeInLine(r,0,1):a&&o.session.getLine(r).charAt(0)!==o.session.$bidiHandler.RLE&&o.session.doc.insert({column:0,row:r},o.session.$bidiHandler.RLE)},d.prototype.getPosLeft=function(o){o-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,s=o>a?this.session.getOverwrite()?o:o-1:a,r=b.getVisualFromLogicalIdx(s,this.bidiMap),n=this.bidiMap.bidiLevels,i=0;!this.session.getOverwrite()&&o<=a&&n[r]%2!==0&&r++;for(var h=0;h<r;h++)i+=this.charWidths[n[h]];return!this.session.getOverwrite()&&o>a&&n[r]%2===0&&(i+=this.charWidths[n[r]]),this.wrapIndent&&(i+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(i+=this.rtlLineOffset),i},d.prototype.getSelections=function(o,a){var s=this.bidiMap,r=s.bidiLevels,n,i=[],h=0,m=Math.min(o,a)-this.wrapIndent,y=Math.max(o,a)-this.wrapIndent,R=!1,T=!1,C=0;this.wrapIndent&&(h+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var w,E=0;E<r.length;E++)w=s.logicalFromVisual[E],n=r[E],R=w>=m&&w<y,R&&!T?C=h:!R&&T&&i.push({left:C,width:h-C}),h+=this.charWidths[n],T=R;if(R&&E===r.length&&i.push({left:C,width:h-C}),this.isRtlDir)for(var D=0;D<i.length;D++)i[D].left+=this.rtlLineOffset;return i},d.prototype.offsetToCol=function(s){this.isRtlDir&&(s-=this.rtlLineOffset);var a=0,s=Math.max(s,0),r=0,n=0,i=this.bidiMap.bidiLevels,h=this.charWidths[i[n]];for(this.wrapIndent&&(s-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);s>r+h/2;){if(r+=h,n===i.length-1){h=0;break}h=this.charWidths[i[++n]]}return n>0&&i[n-1]%2!==0&&i[n]%2===0?(s<r&&n--,a=this.bidiMap.logicalFromVisual[n]):n>0&&i[n-1]%2===0&&i[n]%2!==0?a=1+(s>r?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===i.length-1&&h===0&&i[n-1]%2===0||!this.isRtlDir&&n===0&&i[n]%2!==0?a=1+this.bidiMap.logicalFromVisual[n]:(n>0&&i[n-1]%2!==0&&h!==0&&n--,a=this.bidiMap.logicalFromVisual[n]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},d}();u.BidiHandler=p}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,u,$){var b=e("./lib/oop"),v=e("./lib/lang"),x=e("./lib/event_emitter").EventEmitter,p=e("./range").Range,d=function(){function o(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var s=this;this.cursor.on("change",function(r){s.$cursorChanged=!0,s.$silent||s._emit("changeCursor"),!s.$isEmpty&&!s.$silent&&s._emit("changeSelection"),!s.$keepDesiredColumnOnChange&&r.old.column!=r.value.column&&(s.$desiredColumn=null)}),this.anchor.on("change",function(){s.$anchorChanged=!0,!s.$isEmpty&&!s.$silent&&s._emit("changeSelection")})}return o.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},o.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},o.prototype.getCursor=function(){return this.lead.getPosition()},o.prototype.setAnchor=function(a,s){this.$isEmpty=!1,this.anchor.setPosition(a,s)},o.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},o.prototype.getSelectionLead=function(){return this.lead.getPosition()},o.prototype.isBackwards=function(){var a=this.anchor,s=this.lead;return a.row>s.row||a.row==s.row&&a.column>s.column},o.prototype.getRange=function(){var a=this.anchor,s=this.lead;return this.$isEmpty?p.fromPoints(s,s):this.isBackwards()?p.fromPoints(s,a):p.fromPoints(a,s)},o.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},o.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},o.prototype.setRange=function(a,s){var r=s?a.end:a.start,n=s?a.start:a.end;this.$setSelection(r.row,r.column,n.row,n.column)},o.prototype.$setSelection=function(a,s,r,n){if(!this.$silent){var i=this.$isEmpty,h=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,s),this.cursor.setPosition(r,n),this.$isEmpty=!p.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||h)&&this._emit("changeSelection")}},o.prototype.$moveSelection=function(a){var s=this.lead;this.$isEmpty&&this.setSelectionAnchor(s.row,s.column),a.call(this)},o.prototype.selectTo=function(a,s){this.$moveSelection(function(){this.moveCursorTo(a,s)})},o.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},o.prototype.moveTo=function(a,s){this.clearSelection(),this.moveCursorTo(a,s)},o.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},o.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},o.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},o.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},o.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},o.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},o.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},o.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},o.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},o.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},o.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},o.prototype.getWordRange=function(a,s){if(typeof s>"u"){var r=a||this.lead;a=r.row,s=r.column}return this.session.getWordRange(a,s)},o.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},o.prototype.selectAWord=function(){var a=this.getCursor(),s=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(s)},o.prototype.getLineRange=function(a,s){var r=typeof a=="number"?a:this.lead.row,n,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,s===!0?new p(r,0,n,this.session.getLine(n).length):new p(r,0,n+1,0)},o.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},o.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},o.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},o.prototype.wouldMoveIntoSoftTab=function(a,s,r){var n=a.column,i=a.column+s;return r<0&&(n=a.column-s,i=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(n,i).split(" ").length-1==s},o.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),s;if(s=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(s.start.row,s.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var r=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,r,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-r):this.moveCursorBy(0,-1)}},o.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),s;if(s=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(s.end.row,s.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var r=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,r,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,r):this.moveCursorBy(0,1)}},o.prototype.moveCursorLineStart=function(){var a=this.lead.row,s=this.lead.column,r=this.session.documentToScreenRow(a,s),n=this.session.screenToDocumentPosition(r,0),i=this.session.getDisplayLine(a,null,n.row,n.column),h=i.match(/^\s*/);h[0].length!=s&&!this.session.$useEmacsStyleLineStart&&(n.column+=h[0].length),this.moveCursorToPosition(n)},o.prototype.moveCursorLineEnd=function(){var a=this.lead,s=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==s.column){var r=this.session.getLine(s.row);if(s.column==r.length){var n=r.search(/\s+$/);n>0&&(s.column=n)}}this.moveCursorTo(s.row,s.column)},o.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,s=this.doc.getLine(a).length;this.moveCursorTo(a,s)},o.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},o.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,s=this.lead.column,r=this.doc.getLine(a),n=r.substring(s);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(a,s,1);if(i){this.moveCursorTo(i.end.row,i.end.column);return}if(this.session.nonTokenRe.exec(n)&&(s+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=r.substring(s)),s>=r.length){this.moveCursorTo(a,r.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(n)&&(s+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,s)},o.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,s=this.lead.column,r;if(r=this.session.getFoldAt(a,s,-1)){this.moveCursorTo(r.start.row,r.start.column);return}var n=this.session.getFoldStringAt(a,s,-1);n==null&&(n=this.doc.getLine(a).substring(0,s));var i=v.stringReverse(n);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(i)&&(s-=this.session.nonTokenRe.lastIndex,i=i.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),s<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(i)&&(s-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,s)},o.prototype.$shortWordEndIndex=function(a){var s=0,r,n=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(a))s=this.session.tokenRe.lastIndex;else{for(;(r=a[s])&&n.test(r);)s++;if(s<1){for(i.lastIndex=0;(r=a[s])&&!i.test(r);)if(i.lastIndex=0,s++,n.test(r))if(s>2){s--;break}else{for(;(r=a[s])&&n.test(r);)s++;if(s>2)break}}}return i.lastIndex=0,s},o.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,s=this.lead.column,r=this.doc.getLine(a),n=r.substring(s),i=this.session.getFoldAt(a,s,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(s==r.length){var h=this.doc.getLength();do a++,n=this.doc.getLine(a);while(a<h&&/^\s*$/.test(n));/^\s+/.test(n)||(n=""),s=0}var m=this.$shortWordEndIndex(n);this.moveCursorTo(a,s+m)},o.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,s=this.lead.column,r;if(r=this.session.getFoldAt(a,s,-1))return this.moveCursorTo(r.start.row,r.start.column);var n=this.session.getLine(a).substring(0,s);if(s===0){do a--,n=this.doc.getLine(a);while(a>0&&/^\s*$/.test(n));s=n.length,/\s+$/.test(n)||(n="")}var i=v.stringReverse(n),h=this.$shortWordEndIndex(i);return this.moveCursorTo(a,s-h)},o.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},o.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},o.prototype.moveCursorBy=function(a,s){var r=this.session.documentToScreenPosition(this.lead.row,this.lead.column),n;if(s===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];a<0?a-=i.rowsAbove||0:a>0&&(a+=i.rowCount-(i.rowsAbove||0))}var h=this.session.screenToDocumentPosition(r.row+a,r.column,n);a!==0&&s===0&&h.row===this.lead.row&&(h.column,this.lead.column),this.moveCursorTo(h.row,h.column+s,s===0)},o.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},o.prototype.moveCursorTo=function(a,s,r){var n=this.session.getFoldAt(a,s,1);n&&(a=n.start.row,s=n.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(i.charAt(s))&&i.charAt(s-1)&&(this.lead.row==a&&this.lead.column==s+1?s=s-1:s=s+1),this.lead.setPosition(a,s),this.$keepDesiredColumnOnChange=!1,r||(this.$desiredColumn=null)},o.prototype.moveCursorToScreen=function(a,s,r){var n=this.session.screenToDocumentPosition(a,s);this.moveCursorTo(n.row,n.column,r)},o.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},o.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},o.prototype.toOrientedRange=function(a){var s=this.getRange();return a?(a.start.column=s.start.column,a.start.row=s.start.row,a.end.column=s.end.column,a.end.row=s.end.row):a=s,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},o.prototype.getRangeOfMovements=function(a){var s=this.getCursor();try{a(this);var r=this.getCursor();return p.fromPoints(s,r)}catch{return p.fromPoints(s,s)}finally{this.moveCursorToPosition(s)}},o.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(s){var r=s.clone();return r.isBackwards=s.cursor==s.start,r});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},o.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var s=a.length;s--;){var r=p.fromPoints(a[s].start,a[s].end);a[s].isBackwards&&(r.cursor=r.start),this.addRange(r,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},o.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var s=this.ranges.length;s--;)if(!this.ranges[s].isEqual(a[s]))return!1;return!0},o}();d.prototype.setSelectionAnchor=d.prototype.setAnchor,d.prototype.getSelectionAnchor=d.prototype.getAnchor,d.prototype.setSelectionRange=d.prototype.setRange,b.implement(d.prototype,x),u.Selection=d}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,u,$){var b=e("./lib/report_error").reportError,v=2e3,x=function(){function p(d){this.splitRegex,this.states=d,this.regExps={},this.matchMappings={};for(var o in this.states){for(var a=this.states[o],s=[],r=0,n=this.matchMappings[o]={defaultToken:"text"},i="g",h=[],m=0;m<a.length;m++){var y=a[m];if(y.defaultToken&&(n.defaultToken=y.defaultToken),y.caseInsensitive&&i.indexOf("i")===-1&&(i+="i"),y.unicode&&i.indexOf("u")===-1&&(i+="u"),y.regex!=null){y.regex instanceof RegExp&&(y.regex=y.regex.toString().slice(1,-1));var R=y.regex,T=new RegExp("(?:("+R+")|(.))").exec("a").length-2;Array.isArray(y.token)?y.token.length==1||T==1?y.token=y.token[0]:T-1!=y.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:y,groupCount:T-1}),y.token=y.token[0]):(y.tokenArray=y.token,y.token=null,y.onMatch=this.$arrayTokens):typeof y.token=="function"&&!y.onMatch&&(T>1?y.onMatch=this.$applyToken:y.onMatch=y.token),T>1&&(/\\\d/.test(y.regex)?R=y.regex.replace(/\\([0-9]+)/g,function(C,w){return"\\"+(parseInt(w,10)+r+1)}):(T=1,R=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&h.push(y)),n[r]=m,r+=T,s.push(R),y.onMatch||(y.onMatch=null)}}s.length||(n[0]=0,s.push("$")),h.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,i)},this),this.regExps[o]=new RegExp("("+s.join(")|(")+")|($)",i)}}return p.prototype.$setMaxTokenCount=function(d){v=d|0},p.prototype.$applyToken=function(d){var o=this.splitRegex.exec(d).slice(1),a=this.token.apply(this,o);if(typeof a=="string")return[{type:a,value:d}];for(var s=[],r=0,n=a.length;r<n;r++)o[r]&&(s[s.length]={type:a[r],value:o[r]});return s},p.prototype.$arrayTokens=function(d){if(!d)return[];var o=this.splitRegex.exec(d);if(!o)return"text";for(var a=[],s=this.tokenArray,r=0,n=s.length;r<n;r++)o[r+1]&&(a[a.length]={type:s[r],value:o[r+1]});return a},p.prototype.removeCapturingGroups=function(d){var o=d.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,s){return s?"(?:":a});return o},p.prototype.createSplitterRegexp=function(d,o){if(d.indexOf("(?=")!=-1){var a=0,s=!1,r={};d.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(n,i,h,m,y,R){return s?s=y!="]":y?s=!0:m?(a==r.stack&&(r.end=R+1,r.stack=-1),a--):h&&(a++,h.length!=1&&(r.stack=a,r.start=R)),n}),r.end!=null&&/^\)*$/.test(d.substr(r.end))&&(d=d.substring(0,r.start)+d.substr(r.end))}return d.charAt(0)!="^"&&(d="^"+d),d.charAt(d.length-1)!="$"&&(d+="$"),new RegExp(d,(o||"").replace("g",""))},p.prototype.getLineTokens=function(d,o){if(o&&typeof o!="string"){var a=o.slice(0);o=a[0],o==="#tmp"&&(a.shift(),o=a.shift())}else var a=[];var s=o||"start",r=this.states[s];r||(s="start",r=this.states[s]);var n=this.matchMappings[s],i=this.regExps[s];i.lastIndex=0;for(var h,m=[],y=0,R=0,T={type:null,value:""};h=i.exec(d);){var C=n.defaultToken,w=null,E=h[0],D=i.lastIndex;if(D-E.length>y){var I=d.substring(y,D-E.length);T.type==C?T.value+=I:(T.type&&m.push(T),T={type:C,value:I})}for(var L=0;L<h.length-2;L++)if(h[L+1]!==void 0){w=r[n[L]],w.onMatch?C=w.onMatch(E,s,a,d):C=w.token,w.next&&(typeof w.next=="string"?s=w.next:s=w.next(s,a),r=this.states[s],r||(this.reportError("state doesn't exist",s),s="start",r=this.states[s]),n=this.matchMappings[s],y=D,i=this.regExps[s],i.lastIndex=D),w.consumeLineEnd&&(y=D);break}if(E){if(typeof C=="string")(!w||w.merge!==!1)&&T.type===C?T.value+=E:(T.type&&m.push(T),T={type:C,value:E});else if(C){T.type&&m.push(T),T={type:null,value:""};for(var L=0;L<C.length;L++)m.push(C[L])}}if(y==d.length)break;if(y=D,R++>v){for(R>2*d.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:d});y<d.length;)T.type&&m.push(T),T={value:d.substring(y,y+=500),type:"overflow"};s="start",a=[];break}}return T.type&&m.push(T),a.length>1&&a[0]!==s&&a.unshift("#tmp",s),{tokens:m,state:a.length?a:s}},p}();x.prototype.reportError=b,u.Tokenizer=x}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,u,$){var b=e("../lib/deep_copy").deepCopy,v;v=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(d,o){if(!o){for(var a in d)this.$rules[a]=d[a];return}for(var a in d){for(var s=d[a],r=0;r<s.length;r++){var n=s[r];(n.next||n.onMatch)&&(typeof n.next=="string"&&n.next.indexOf(o)!==0&&(n.next=o+n.next),n.nextState&&n.nextState.indexOf(o)!==0&&(n.nextState=o+n.nextState))}this.$rules[o+a]=s}},this.getRules=function(){return this.$rules},this.embedRules=function(d,o,a,s,r){var n=typeof d=="function"?new d().getRules():d;if(s)for(var i=0;i<s.length;i++)s[i]=o+s[i];else{s=[];for(var h in n)s.push(o+h)}if(this.addRules(n,o),a)for(var m=Array.prototype[r?"push":"unshift"],i=0;i<s.length;i++)m.apply(this.$rules[s[i]],b(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(o)},this.getEmbeds=function(){return this.$embeds};var x=function(d,o){return(d!="start"||o.length)&&o.unshift(this.nextState,d),this.nextState},p=function(d,o){return o.shift(),o.shift()||"start"};this.normalizeRules=function(){var d=0,o=this.$rules;function a(s){var r=o[s];r.processed=!0;for(var n=0;n<r.length;n++){var i=r[n],h=null;Array.isArray(i)&&(h=i,i={}),!i.regex&&i.start&&(i.regex=i.start,i.next||(i.next=[]),i.next.push({defaultToken:i.token},{token:i.token+".end",regex:i.end||i.start,next:"pop"}),i.token=i.token+".start",i.push=!0);var m=i.next||i.push;if(m&&Array.isArray(m)){var y=i.stateName;y||(y=i.token,typeof y!="string"&&(y=y[0]||""),o[y]&&(y+=d++)),o[y]=m,i.next=y,a(y)}else m=="pop"&&(i.next=p);if(i.push&&(i.nextState=i.next||i.push,i.next=x,delete i.push),i.rules)for(var R in i.rules)o[R]?o[R].push&&o[R].push.apply(o[R],i.rules[R]):o[R]=i.rules[R];var T=typeof i=="string"?i:i.include;if(T&&(T==="$self"&&(T="start"),Array.isArray(T)?h=T.map(function(w){return o[w]}):h=o[T]),h){var C=[n,1].concat(h);i.noEscape&&(C=C.filter(function(w){return!w.next})),r.splice.apply(r,C),n--}i.keywordMap&&(i.token=this.createKeywordMapper(i.keywordMap,i.defaultToken||"text",i.caseInsensitive),delete i.defaultToken)}}Object.keys(o).forEach(a,this)},this.createKeywordMapper=function(d,o,a,s){var r=Object.create(null);return this.$keywordList=[],Object.keys(d).forEach(function(n){for(var i=d[n],h=i.split(s||"|"),m=h.length;m--;){var y=h[m];this.$keywordList.push(y),a&&(y=y.toLowerCase()),r[y]=n}},this),d=null,a?function(n){return r[n.toLowerCase()]||o}:function(n){return r[n]||o}},this.getKeywords=function(){return this.$keywords}}).call(v.prototype),u.TextHighlightRules=v}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,u,$){var b;b=function(){this.$behaviours={}},(function(){this.add=function(v,x,p){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[v]:this.$behaviours[v]={}}this.$behaviours[v][x]=p},this.addBehaviours=function(v){for(var x in v)for(var p in v[x])this.add(x,p,v[x][p])},this.remove=function(v){this.$behaviours&&this.$behaviours[v]&&delete this.$behaviours[v]},this.inherit=function(v,x){if(typeof v=="function")var p=new v().getBehaviours(x);else var p=v.getBehaviours(x);this.addBehaviours(p)},this.getBehaviours=function(v){if(v){for(var x={},p=0;p<v.length;p++)this.$behaviours[v[p]]&&(x[v[p]]=this.$behaviours[v[p]]);return x}else return this.$behaviours}}).call(b.prototype),u.Behaviour=b}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,u,$){var b=e("./range").Range,v=function(){function x(p,d,o){this.$session=p,this.$row=d,this.$rowTokens=p.getTokens(d);var a=p.getTokenAt(d,o);this.$tokenIndex=a?a.index:-1}return x.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},x.prototype.stepForward=function(){this.$tokenIndex+=1;for(var p;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,p||(p=this.$session.getLength()),this.$row>=p)return this.$row=p-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentTokenRow=function(){return this.$row},x.prototype.getCurrentTokenColumn=function(){var p=this.$rowTokens,d=this.$tokenIndex,o=p[d].start;if(o!==void 0)return o;for(o=0;d>0;)d-=1,o+=p[d].value.length;return o},x.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},x.prototype.getCurrentTokenRange=function(){var p=this.$rowTokens[this.$tokenIndex],d=this.getCurrentTokenColumn();return new b(this.$row,d,this.$row,d+p.value.length)},x}();u.TokenIterator=v}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,u,$){var b=e("../../lib/oop"),v=e("../behaviour").Behaviour,x=e("../../token_iterator").TokenIterator,p=e("../../lib/lang"),d=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,s={},r={'"':'"',"'":"'"},n=function(m){var y=-1;if(m.multiSelect&&(y=m.selection.index,s.rangeCount!=m.multiSelect.rangeCount&&(s={rangeCount:m.multiSelect.rangeCount})),s[y])return a=s[y];a=s[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},i=function(m,y,R,T){var C=m.end.row-m.start.row;return{text:R+y+T,selection:[0,m.start.column+1,C,m.end.column+(C?0:1)]}},h;h=function(m){m=m||{},this.add("braces","insertion",function(y,R,T,C,w){var E=T.getCursorPosition(),D=C.doc.getLine(E.row);if(w=="{"){n(T);var I=T.getSelectionRange(),L=C.doc.getTextRange(I),z=C.getTokenAt(E.row,E.column);if(L!==""&&L!=="{"&&T.getWrapBehavioursEnabled())return i(I,L,"{","}");if(z&&/(?:string)\.quasi|\.xml/.test(z.type)){var F=[/tag\-(?:open|name)/,/attribute\-name/];return F.some(function(G){return G.test(z.type)})||/(string)\.quasi/.test(z.type)&&z.value[E.column-z.start-1]!=="$"?void 0:(h.recordAutoInsert(T,C,"}"),{text:"{}",selection:[1,1]})}else if(h.isSaneInsertion(T,C))return/[\]\}\)]/.test(D[E.column])||T.inMultiSelectMode||m.braces?(h.recordAutoInsert(T,C,"}"),{text:"{}",selection:[1,1]}):(h.recordMaybeInsert(T,C,"{"),{text:"{",selection:[1,1]})}else if(w=="}"){n(T);var O=D.substring(E.column,E.column+1);if(O=="}"){var A=C.$findOpeningBracket("}",{column:E.column+1,row:E.row});if(A!==null&&h.isAutoInsertedClosing(E,D,w))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(w==`
|
|
180
180
|
`||w==`\r
|
|
181
|
-
`){n(T);var S="";h.isMaybeInsertedClosing(E,D)&&(S=p.stringRepeat("}",a.maybeInsertedBrackets),h.clearMaybeInsertedClosing());var O=D.substring(E.column,E.column+1);if(O==="}"){var N=C.findMatchingBracket({row:E.row,column:E.column+1},"}");if(!N)return null;var
|
|
181
|
+
`){n(T);var S="";h.isMaybeInsertedClosing(E,D)&&(S=p.stringRepeat("}",a.maybeInsertedBrackets),h.clearMaybeInsertedClosing());var O=D.substring(E.column,E.column+1);if(O==="}"){var N=C.findMatchingBracket({row:E.row,column:E.column+1},"}");if(!N)return null;var W=this.$getIndent(C.getLine(N.row))}else if(S)var W=this.$getIndent(D);else{h.clearMaybeInsertedClosing();return}var V=W+C.getTabString();return{text:`
|
|
182
182
|
`+V+`
|
|
183
|
-
`+
|
|
183
|
+
`+W+S,selection:[1,V.length,1,V.length]}}else h.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,R,T,C,w){var E=C.doc.getTextRange(w);if(!w.isMultiLine()&&E=="{"){n(T);var D=C.doc.getLine(w.start.row),I=D.substring(w.end.column,w.end.column+1);if(I=="}")return w.end.column++,w;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,R,T,C,w){if(w=="("){n(T);var E=T.getSelectionRange(),D=C.doc.getTextRange(E);if(D!==""&&T.getWrapBehavioursEnabled())return i(E,D,"(",")");if(h.isSaneInsertion(T,C))return h.recordAutoInsert(T,C,")"),{text:"()",selection:[1,1]}}else if(w==")"){n(T);var I=T.getCursorPosition(),L=C.doc.getLine(I.row),z=L.substring(I.column,I.column+1);if(z==")"){var F=C.$findOpeningBracket(")",{column:I.column+1,row:I.row});if(F!==null&&h.isAutoInsertedClosing(I,L,w))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,R,T,C,w){var E=C.doc.getTextRange(w);if(!w.isMultiLine()&&E=="("){n(T);var D=C.doc.getLine(w.start.row),I=D.substring(w.start.column+1,w.start.column+2);if(I==")")return w.end.column++,w}}),this.add("brackets","insertion",function(y,R,T,C,w){if(w=="["){n(T);var E=T.getSelectionRange(),D=C.doc.getTextRange(E);if(D!==""&&T.getWrapBehavioursEnabled())return i(E,D,"[","]");if(h.isSaneInsertion(T,C))return h.recordAutoInsert(T,C,"]"),{text:"[]",selection:[1,1]}}else if(w=="]"){n(T);var I=T.getCursorPosition(),L=C.doc.getLine(I.row),z=L.substring(I.column,I.column+1);if(z=="]"){var F=C.$findOpeningBracket("]",{column:I.column+1,row:I.row});if(F!==null&&h.isAutoInsertedClosing(I,L,w))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,R,T,C,w){var E=C.doc.getTextRange(w);if(!w.isMultiLine()&&E=="["){n(T);var D=C.doc.getLine(w.start.row),I=D.substring(w.start.column+1,w.start.column+2);if(I=="]")return w.end.column++,w}}),this.add("string_dquotes","insertion",function(y,R,T,C,w){var E=C.$mode.$quotes||r;if(w.length==1&&E[w]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(w)!=-1)return;n(T);var D=w,I=T.getSelectionRange(),L=C.doc.getTextRange(I);if(L!==""&&(L.length!=1||!E[L])&&T.getWrapBehavioursEnabled())return i(I,L,D,D);if(!L){var z=T.getCursorPosition(),F=C.doc.getLine(z.row),O=F.substring(z.column-1,z.column),A=F.substring(z.column,z.column+1),S=C.getTokenAt(z.row,z.column),N=C.getTokenAt(z.row,z.column+1);if(O=="\\"&&S&&/escape/.test(S.type))return null;var W=S&&/string|escape/.test(S.type),V=!N||/string|escape/.test(N.type),G;if(A==D)G=W!==V,G&&/string\.end/.test(N.type)&&(G=!1);else{if(W&&!V||W&&V)return null;var Z=C.$mode.tokenRe;Z.lastIndex=0;var ee=Z.test(O);Z.lastIndex=0;var ce=Z.test(A),ne=C.$mode.$pairQuotesAfter,he=ne&&ne[D]&&ne[D].test(O);if(!he&&ee||ce||A&&!/[\s;,.})\]\\]/.test(A))return null;var ue=F[z.column-2];if(O==D&&(ue==D||Z.test(ue)))return null;G=!0}return{text:G?D+D:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,R,T,C,w){var E=C.$mode.$quotes||r,D=C.doc.getTextRange(w);if(!w.isMultiLine()&&E.hasOwnProperty(D)){n(T);var I=C.doc.getLine(w.start.row),L=I.substring(w.start.column+1,w.start.column+2);if(L==D)return w.end.column++,w}}),m.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,R,T,C,w){if(y==="doc-start"&&(w===`
|
|
184
184
|
`||w===`\r
|
|
185
|
-
`)&&T.selection.isEmpty()){var E=T.getCursorPosition();if(E.column===0)return;for(var D=C.doc.getLine(E.row),I=C.doc.getLine(E.row+1),L=C.getTokens(E.row),z=0,F=0;F<L.length;F++){z+=L[F].value.length;var O=L[F];if(z>=E.column){if(z===E.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var A=L[F+1];if(!A||!/\.doc/.test(A.type))return}}var S=E.column-(z-O.value.length),N=O.value.indexOf("*/"),B=O.value.indexOf("/**",N>-1?N+2:0);if(B!==-1&&S>B&&S<B+3||N!==-1&&B!==-1&&S>=N&&S<=B||!/\.doc/.test(O.type))return;break}}var V=this.$getIndent(D);if(/\s*\*/.test(I))return/^\s*\*/.test(D)?{text:w+V+"* ",selection:[1,2+V.length,1,2+V.length]}:{text:w+V+" * ",selection:[1,3+V.length,1,3+V.length]};if(/\/\*\*/.test(D.substring(0,E.column)))return{text:w+V+" * "+w+" "+V+"*/",selection:[1,4+V.length,1,4+V.length]}}})},h.isSaneInsertion=function(m,y){var R=m.getCursorPosition(),T=new x(y,R.row,R.column);if(!this.$matchTokenType(T.getCurrentToken()||"text",d)){if(/[)}\]]/.test(m.session.getLine(R.row)[R.column]))return!0;var C=new x(y,R.row,R.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",d))return!1}return T.stepForward(),T.getCurrentTokenRow()!==R.row||this.$matchTokenType(T.getCurrentToken()||"text",o)},h.$matchTokenType=function(m,y){return y.indexOf(m.type||m)>-1},h.recordAutoInsert=function(m,y,R){var T=m.getCursorPosition(),C=y.doc.getLine(T.row);this.isAutoInsertedClosing(T,C,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=T.row,a.autoInsertedLineEnd=R+C.substr(T.column),a.autoInsertedBrackets++},h.recordMaybeInsert=function(m,y,R){var T=m.getCursorPosition(),C=y.doc.getLine(T.row);this.isMaybeInsertedClosing(T,C)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=T.row,a.maybeInsertedLineStart=C.substr(0,T.column)+R,a.maybeInsertedLineEnd=C.substr(T.column),a.maybeInsertedBrackets++},h.isAutoInsertedClosing=function(m,y,R){return a.autoInsertedBrackets>0&&m.row===a.autoInsertedRow&&R===a.autoInsertedLineEnd[0]&&y.substr(m.column)===a.autoInsertedLineEnd},h.isMaybeInsertedClosing=function(m,y){return a.maybeInsertedBrackets>0&&m.row===a.maybeInsertedRow&&y.substr(m.column)===a.maybeInsertedLineEnd&&y.substr(0,m.column)==a.maybeInsertedLineStart},h.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},h.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},b.inherits(h,v),u.CstyleBehaviour=h}),ace.define("ace/unicode",["require","exports","module"],function(e,u,$){for(var b=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],v=0,x=[],p=0;p<b.length;p+=2)x.push(v+=b[p]),b[p+1]&&x.push(45,v+=b[p+1]);u.wordChars=String.fromCharCode.apply(null,x)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,u,$){var b=e("../config"),v=e("../tokenizer").Tokenizer,x=e("./text_highlight_rules").TextHighlightRules,p=e("./behaviour/cstyle").CstyleBehaviour,d=e("../unicode"),o=e("../lib/lang"),a=e("../token_iterator").TokenIterator,s=e("../range").Range,r;r=function(){this.HighlightRules=x},(function(){this.$defaultBehaviour=new p,this.tokenRe=new RegExp("^["+d.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+d.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new v(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(n,i,h,m){var y=i.doc,R=!0,T=!0,C=1/0,w=i.getTabSize(),E=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var L=this.lineCommentStart.map(o.escapeRegExp).join("|"),D=this.lineCommentStart[0];else var L=o.escapeRegExp(this.lineCommentStart),D=this.lineCommentStart;L=new RegExp("^(\\s*)(?:"+L+") ?"),E=i.getUseSoftTabs();var O=function(ce,ne){var he=ce.match(L);if(he){var ue=he[1].length,le=he[0].length;!N(ce,ue,le)&&he[0][le-1]==" "&&le--,y.removeInLine(ne,ue,le)}},S=D+" ",F=function(ce,ne){(!R||/\S/.test(ce))&&(N(ce,C,C)?y.insertInLine({row:ne,column:C},S):y.insertInLine({row:ne,column:C},D))},A=function(ce,ne){return L.test(ce)},N=function(ce,ne,he){for(var ue=0;ne--&&ce.charAt(ne)==" ";)ue++;if(ue%w!=0)return!1;for(var ue=0;ce.charAt(he++)==" ";)ue++;return w>2?ue%w!=w-1:ue%w==0}}else{if(!this.blockComment)return!1;var D=this.blockComment.start,I=this.blockComment.end,L=new RegExp("^(\\s*)(?:"+o.escapeRegExp(D)+")"),z=new RegExp("(?:"+o.escapeRegExp(I)+")\\s*$"),F=function(G,Z){A(G,Z)||(!R||/\S/.test(G))&&(y.insertInLine({row:Z,column:G.length},I),y.insertInLine({row:Z,column:C},D))},O=function(G,Z){var ee;(ee=G.match(z))&&y.removeInLine(Z,G.length-ee[0].length,G.length),(ee=G.match(L))&&y.removeInLine(Z,ee[1].length,ee[0].length)},A=function(G,Z){if(L.test(G))return!0;for(var ee=i.getTokens(Z),ce=0;ce<ee.length;ce++)if(ee[ce].type==="comment")return!0}}function B(G){for(var Z=h;Z<=m;Z++)G(y.getLine(Z),Z)}var V=1/0;B(function(G,Z){var ee=G.search(/\S/);ee!==-1?(ee<C&&(C=ee),T&&!A(G,Z)&&(T=!1)):V>G.length&&(V=G.length)}),C==1/0&&(C=V,R=!1,T=!1),E&&C%w!=0&&(C=Math.floor(C/w)*w),B(T?O:F)},this.toggleBlockComment=function(n,i,h,m){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var R=new a(i,m.row,m.column),T=R.getCurrentToken();i.selection;var C=i.selection.toOrientedRange(),w,E;if(T&&/comment/.test(T.type)){for(var D,I;T&&/comment/.test(T.type);){var L=T.value.indexOf(y.start);if(L!=-1){var z=R.getCurrentTokenRow(),F=R.getCurrentTokenColumn()+L;D=new s(z,F,z,F+y.start.length);break}T=R.stepBackward()}for(var R=new a(i,m.row,m.column),T=R.getCurrentToken();T&&/comment/.test(T.type);){var L=T.value.indexOf(y.end);if(L!=-1){var z=R.getCurrentTokenRow(),F=R.getCurrentTokenColumn()+L;I=new s(z,F,z,F+y.end.length);break}T=R.stepForward()}I&&i.remove(I),D&&(i.remove(D),w=D.start.row,E=-y.start.length)}else E=y.start.length,w=h.start.row,i.insert(h.end,y.end),i.insert(h.start,y.start);C.start.row==w&&(C.start.column+=E),C.end.row==w&&(C.end.column+=E),i.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(n,i,h){return this.$getIndent(i)},this.checkOutdent=function(n,i,h){return!1},this.autoOutdent=function(n,i,h){},this.$getIndent=function(n){return n.match(/^\s*/)[0]},this.createWorker=function(n){return null},this.createModeDelegates=function(n){this.$embeds=[],this.$modes={};for(var i in n)if(n[i]){var h=n[i],m=h.prototype.$id,y=b.$modes[m];y||(b.$modes[m]=y=new h),b.$modes[i]||(b.$modes[i]=y),this.$embeds.push(i),this.$modes[i]=y}for(var R=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],T=function(w){(function(E){var D=R[w],I=E[D];E[R[w]]=function(){return this.$delegator(D,arguments,I)}})(C)},C=this,i=0;i<R.length;i++)T(i)},this.$delegator=function(n,i,h){var m=i[0]||"start";if(typeof m!="string"){if(Array.isArray(m[2])){var y=m[2][m[2].length-1],R=this.$modes[y];if(R)return R[n].apply(R,[m[1]].concat([].slice.call(i,1)))}m=m[0]||"start"}for(var T=0;T<this.$embeds.length;T++)if(this.$modes[this.$embeds[T]]){var C=m.split(this.$embeds[T]);if(!C[0]&&C[1]){i[0]=C[1];var R=this.$modes[this.$embeds[T]];return R[n].apply(R,i)}}var w=h.apply(this,i);return h?w:void 0},this.transformAction=function(n,i,h,m,y){if(this.$behaviour){var R=this.$behaviour.getBehaviours();for(var T in R)if(R[T][i]){var C=R[T][i].apply(this,arguments);if(C)return C}}},this.getKeywords=function(n){if(!this.completionKeywords){var i=this.$tokenizer.rules,h=[];for(var m in i)for(var y=i[m],R=0,T=y.length;R<T;R++)if(typeof y[R].token=="string")/keyword|support|storage/.test(y[R].token)&&h.push(y[R].regex);else if(typeof y[R].token=="object"){for(var C=0,w=y[R].token.length;C<w;C++)if(/keyword|support|storage/.test(y[R].token[C])){var m=y[R].regex.match(/\(.+?\)/g)[C];h.push(m.substr(1,m.length-2))}}this.completionKeywords=h}return n?h.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(n,i,h,m){var y=this.$keywordList||this.$createKeywordList();return y.map(function(R){return{name:R,value:R,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(r.prototype),u.Mode=r}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,u,$){var b=e("./lib/dom"),v=function(){function x(p){this.session=p,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return x.prototype.getRowLength=function(p){var d;return this.lineWidgets?d=this.lineWidgets[p]&&this.lineWidgets[p].rowCount||0:d=0,!this.$useWrapMode||!this.$wrapData[p]?1+d:this.$wrapData[p].length+1+d},x.prototype.$getWidgetScreenLength=function(){var p=0;return this.lineWidgets.forEach(function(d){d&&d.rowCount&&!d.hidden&&(p+=d.rowCount)}),p},x.prototype.$onChangeEditor=function(p){this.attach(p.editor)},x.prototype.attach=function(p){p&&p.widgetManager&&p.widgetManager!=this&&p.widgetManager.detach(),this.editor!=p&&(this.detach(),this.editor=p,p&&(p.widgetManager=this,p.renderer.on("beforeRender",this.measureWidgets),p.renderer.on("afterRender",this.renderWidgets)))},x.prototype.detach=function(p){var d=this.editor;if(d){this.editor=null,d.widgetManager=null,d.renderer.off("beforeRender",this.measureWidgets),d.renderer.off("afterRender",this.renderWidgets);var o=this.session.lineWidgets;o&&o.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},x.prototype.updateOnFold=function(p,d){var o=d.lineWidgets;if(!(!o||!p.action)){for(var a=p.data,s=a.start.row,r=a.end.row,n=p.action=="add",i=s+1;i<r;i++)o[i]&&(o[i].hidden=n);o[r]&&(n?o[s]?o[r].hidden=n:o[s]=o[r]:(o[s]==o[r]&&(o[s]=void 0),o[r].hidden=n))}},x.prototype.updateOnChange=function(p){var d=this.session.lineWidgets;if(d){var o=p.start.row,a=p.end.row-o;if(a!==0)if(p.action=="remove"){var s=d.splice(o+1,a);!d[o]&&s[s.length-1]&&(d[o]=s.pop()),s.forEach(function(n){n&&this.removeLineWidget(n)},this),this.$updateRows()}else{var r=new Array(a);d[o]&&d[o].column!=null&&p.start.column>d[o].column&&o++,r.unshift(o,0),d.splice.apply(d,r),this.$updateRows()}}},x.prototype.$updateRows=function(){var p=this.session.lineWidgets;if(p){var d=!0;p.forEach(function(o,a){if(o)for(d=!1,o.row=a;o.$oldWidget;)o.$oldWidget.row=a,o=o.$oldWidget}),d&&(this.session.lineWidgets=null)}},x.prototype.$registerLineWidget=function(p){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var d=this.session.lineWidgets[p.row];return d&&(p.$oldWidget=d,d.el&&d.el.parentNode&&(d.el.parentNode.removeChild(d.el),d._inDocument=!1)),this.session.lineWidgets[p.row]=p,p},x.prototype.addLineWidget=function(p){if(this.$registerLineWidget(p),p.session=this.session,!this.editor)return p;var d=this.editor.renderer;p.html&&!p.el&&(p.el=b.createElement("div"),p.el.innerHTML=p.html),p.text&&!p.el&&(p.el=b.createElement("div"),p.el.textContent=p.text),p.el&&(b.addCssClass(p.el,"ace_lineWidgetContainer"),p.className&&b.addCssClass(p.el,p.className),p.el.style.position="absolute",p.el.style.zIndex="5",d.container.appendChild(p.el),p._inDocument=!0,p.coverGutter||(p.el.style.zIndex="3"),p.pixelHeight==null&&(p.pixelHeight=p.el.offsetHeight)),p.rowCount==null&&(p.rowCount=p.pixelHeight/d.layerConfig.lineHeight);var o=this.session.getFoldAt(p.row,0);if(p.$fold=o,o){var a=this.session.lineWidgets;p.row==o.end.row&&!a[o.start.row]?a[o.start.row]=p:p.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows(),this.renderWidgets(null,d),this.onWidgetChanged(p),p},x.prototype.removeLineWidget=function(p){if(p._inDocument=!1,p.session=null,p.el&&p.el.parentNode&&p.el.parentNode.removeChild(p.el),p.editor&&p.editor.destroy)try{p.editor.destroy()}catch{}if(this.session.lineWidgets){var d=this.session.lineWidgets[p.row];if(d==p)this.session.lineWidgets[p.row]=p.$oldWidget,p.$oldWidget&&this.onWidgetChanged(p.$oldWidget);else for(;d;){if(d.$oldWidget==p){d.$oldWidget=p.$oldWidget;break}d=d.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows()},x.prototype.getWidgetsAtRow=function(p){for(var d=this.session.lineWidgets,o=d&&d[p],a=[];o;)a.push(o),o=o.$oldWidget;return a},x.prototype.onWidgetChanged=function(p){this.session._changedWidgets.push(p),this.editor&&this.editor.renderer.updateFull()},x.prototype.measureWidgets=function(p,d){var o=this.session._changedWidgets,a=d.layerConfig;if(!(!o||!o.length)){for(var s=1/0,r=0;r<o.length;r++){var n=o[r];if(!(!n||!n.el)&&n.session==this.session){if(!n._inDocument){if(this.session.lineWidgets[n.row]!=n)continue;n._inDocument=!0,d.container.appendChild(n.el)}n.h=n.el.offsetHeight,n.fixedWidth||(n.w=n.el.offsetWidth,n.screenWidth=Math.ceil(n.w/a.characterWidth));var i=n.h/a.lineHeight;n.coverLine&&(i-=this.session.getRowLineCount(n.row),i<0&&(i=0)),n.rowCount!=i&&(n.rowCount=i,n.row<s&&(s=n.row))}}s!=1/0&&(this.session._emit("changeFold",{data:{start:{row:s}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},x.prototype.renderWidgets=function(p,d){var o=d.layerConfig,a=this.session.lineWidgets;if(a){for(var s=Math.min(this.firstRow,o.firstRow),r=Math.max(this.lastRow,o.lastRow,a.length);s>0&&!a[s];)s--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,d.$cursorLayer.config=o;for(var n=s;n<=r;n++){var i=a[n];if(!(!i||!i.el)){if(i.hidden){i.el.style.top=-100-(i.pixelHeight||0)+"px";continue}i._inDocument||(i._inDocument=!0,d.container.appendChild(i.el));var h=d.$cursorLayer.getPixelPosition({row:n,column:0},!0).top;i.coverLine||(h+=o.lineHeight*this.session.getRowLineCount(i.row)),i.el.style.top=h-o.offset+"px";var m=i.coverGutter?0:d.gutterWidth;i.fixedWidth||(m-=d.scrollLeft),i.el.style.left=m+"px",i.fullWidth&&i.screenWidth&&(i.el.style.minWidth=o.width+2*o.padding+"px"),i.fixedWidth?i.el.style.right=d.scrollBar.getWidth()+"px":i.el.style.right=""}}}},x}();u.LineWidgets=v}),ace.define("ace/apply_delta",["require","exports","module"],function(e,u,$){u.applyDelta=function(b,v,x){var p=v.start.row,d=v.start.column,o=b[p]||"";switch(v.action){case"insert":var a=v.lines;if(a.length===1)b[p]=o.substring(0,d)+v.lines[0]+o.substring(d);else{var s=[p,1].concat(v.lines);b.splice.apply(b,s),b[p]=o.substring(0,d)+b[p],b[p+v.lines.length-1]+=o.substring(d)}break;case"remove":var r=v.end.column,n=v.end.row;p===n?b[p]=o.substring(0,d)+o.substring(r):b.splice(p,n-p+1,o.substring(0,d)+b[n].substring(r));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,u,$){var b=e("./lib/oop"),v=e("./lib/event_emitter").EventEmitter,x=function(){function o(a,s,r){this.$onChange=this.onChange.bind(this),this.attach(a),typeof s!="number"?this.setPosition(s.row,s.column):this.setPosition(s,r)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var s=d(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(s.row,s.column,!0)}},o.prototype.setPosition=function(a,s,r){var n;if(r?n={row:a,column:s}:n=this.$clipPositionToDocument(a,s),!(this.row==n.row&&this.column==n.column)){var i={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:i,value:n})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(a,s){var r={};return a>=this.document.getLength()?(r.row=Math.max(0,this.document.getLength()-1),r.column=this.document.getLine(r.row).length):a<0?(r.row=0,r.column=0):(r.row=a,r.column=Math.min(this.document.getLine(r.row).length,Math.max(0,s))),s<0&&(r.column=0),r},o}();x.prototype.$insertRight=!1,b.implement(x.prototype,v);function p(o,a,s){var r=s?o.column<=a.column:o.column<a.column;return o.row<a.row||o.row==a.row&&r}function d(o,a,s){var r=o.action=="insert",n=(r?1:-1)*(o.end.row-o.start.row),i=(r?1:-1)*(o.end.column-o.start.column),h=o.start,m=r?h:o.end;return p(a,h,s)?{row:a.row,column:a.column}:p(m,a,!s)?{row:a.row+n,column:a.column+(a.row==m.row?i:0)}:{row:h.row,column:h.column}}u.Anchor=x}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,u,$){var b=e("./lib/oop"),v=e("./apply_delta").applyDelta,x=e("./lib/event_emitter").EventEmitter,p=e("./range").Range,d=e("./anchor").Anchor,o=function(){function a(s){this.$lines=[""],s.length===0?this.$lines=[""]:Array.isArray(s)?this.insertMergedLines({row:0,column:0},s):this.insert({row:0,column:0},s)}return a.prototype.setValue=function(s){var r=this.getLength()-1;this.remove(new p(0,0,r,this.getLine(r).length)),this.insert({row:0,column:0},s||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(s,r){return new d(this,s,r)},a.prototype.$detectNewLine=function(s){var r=s.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=r?r[1]:`
|
|
185
|
+
`)&&T.selection.isEmpty()){var E=T.getCursorPosition();if(E.column===0)return;for(var D=C.doc.getLine(E.row),I=C.doc.getLine(E.row+1),L=C.getTokens(E.row),z=0,F=0;F<L.length;F++){z+=L[F].value.length;var O=L[F];if(z>=E.column){if(z===E.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var A=L[F+1];if(!A||!/\.doc/.test(A.type))return}}var S=E.column-(z-O.value.length),N=O.value.indexOf("*/"),W=O.value.indexOf("/**",N>-1?N+2:0);if(W!==-1&&S>W&&S<W+3||N!==-1&&W!==-1&&S>=N&&S<=W||!/\.doc/.test(O.type))return;break}}var V=this.$getIndent(D);if(/\s*\*/.test(I))return/^\s*\*/.test(D)?{text:w+V+"* ",selection:[1,2+V.length,1,2+V.length]}:{text:w+V+" * ",selection:[1,3+V.length,1,3+V.length]};if(/\/\*\*/.test(D.substring(0,E.column)))return{text:w+V+" * "+w+" "+V+"*/",selection:[1,4+V.length,1,4+V.length]}}})},h.isSaneInsertion=function(m,y){var R=m.getCursorPosition(),T=new x(y,R.row,R.column);if(!this.$matchTokenType(T.getCurrentToken()||"text",d)){if(/[)}\]]/.test(m.session.getLine(R.row)[R.column]))return!0;var C=new x(y,R.row,R.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",d))return!1}return T.stepForward(),T.getCurrentTokenRow()!==R.row||this.$matchTokenType(T.getCurrentToken()||"text",o)},h.$matchTokenType=function(m,y){return y.indexOf(m.type||m)>-1},h.recordAutoInsert=function(m,y,R){var T=m.getCursorPosition(),C=y.doc.getLine(T.row);this.isAutoInsertedClosing(T,C,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=T.row,a.autoInsertedLineEnd=R+C.substr(T.column),a.autoInsertedBrackets++},h.recordMaybeInsert=function(m,y,R){var T=m.getCursorPosition(),C=y.doc.getLine(T.row);this.isMaybeInsertedClosing(T,C)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=T.row,a.maybeInsertedLineStart=C.substr(0,T.column)+R,a.maybeInsertedLineEnd=C.substr(T.column),a.maybeInsertedBrackets++},h.isAutoInsertedClosing=function(m,y,R){return a.autoInsertedBrackets>0&&m.row===a.autoInsertedRow&&R===a.autoInsertedLineEnd[0]&&y.substr(m.column)===a.autoInsertedLineEnd},h.isMaybeInsertedClosing=function(m,y){return a.maybeInsertedBrackets>0&&m.row===a.maybeInsertedRow&&y.substr(m.column)===a.maybeInsertedLineEnd&&y.substr(0,m.column)==a.maybeInsertedLineStart},h.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},h.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},b.inherits(h,v),u.CstyleBehaviour=h}),ace.define("ace/unicode",["require","exports","module"],function(e,u,$){for(var b=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],v=0,x=[],p=0;p<b.length;p+=2)x.push(v+=b[p]),b[p+1]&&x.push(45,v+=b[p+1]);u.wordChars=String.fromCharCode.apply(null,x)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,u,$){var b=e("../config"),v=e("../tokenizer").Tokenizer,x=e("./text_highlight_rules").TextHighlightRules,p=e("./behaviour/cstyle").CstyleBehaviour,d=e("../unicode"),o=e("../lib/lang"),a=e("../token_iterator").TokenIterator,s=e("../range").Range,r;r=function(){this.HighlightRules=x},(function(){this.$defaultBehaviour=new p,this.tokenRe=new RegExp("^["+d.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+d.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new v(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(n,i,h,m){var y=i.doc,R=!0,T=!0,C=1/0,w=i.getTabSize(),E=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var L=this.lineCommentStart.map(o.escapeRegExp).join("|"),D=this.lineCommentStart[0];else var L=o.escapeRegExp(this.lineCommentStart),D=this.lineCommentStart;L=new RegExp("^(\\s*)(?:"+L+") ?"),E=i.getUseSoftTabs();var O=function(ce,ne){var he=ce.match(L);if(he){var ue=he[1].length,le=he[0].length;!N(ce,ue,le)&&he[0][le-1]==" "&&le--,y.removeInLine(ne,ue,le)}},S=D+" ",F=function(ce,ne){(!R||/\S/.test(ce))&&(N(ce,C,C)?y.insertInLine({row:ne,column:C},S):y.insertInLine({row:ne,column:C},D))},A=function(ce,ne){return L.test(ce)},N=function(ce,ne,he){for(var ue=0;ne--&&ce.charAt(ne)==" ";)ue++;if(ue%w!=0)return!1;for(var ue=0;ce.charAt(he++)==" ";)ue++;return w>2?ue%w!=w-1:ue%w==0}}else{if(!this.blockComment)return!1;var D=this.blockComment.start,I=this.blockComment.end,L=new RegExp("^(\\s*)(?:"+o.escapeRegExp(D)+")"),z=new RegExp("(?:"+o.escapeRegExp(I)+")\\s*$"),F=function(G,Z){A(G,Z)||(!R||/\S/.test(G))&&(y.insertInLine({row:Z,column:G.length},I),y.insertInLine({row:Z,column:C},D))},O=function(G,Z){var ee;(ee=G.match(z))&&y.removeInLine(Z,G.length-ee[0].length,G.length),(ee=G.match(L))&&y.removeInLine(Z,ee[1].length,ee[0].length)},A=function(G,Z){if(L.test(G))return!0;for(var ee=i.getTokens(Z),ce=0;ce<ee.length;ce++)if(ee[ce].type==="comment")return!0}}function W(G){for(var Z=h;Z<=m;Z++)G(y.getLine(Z),Z)}var V=1/0;W(function(G,Z){var ee=G.search(/\S/);ee!==-1?(ee<C&&(C=ee),T&&!A(G,Z)&&(T=!1)):V>G.length&&(V=G.length)}),C==1/0&&(C=V,R=!1,T=!1),E&&C%w!=0&&(C=Math.floor(C/w)*w),W(T?O:F)},this.toggleBlockComment=function(n,i,h,m){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var R=new a(i,m.row,m.column),T=R.getCurrentToken();i.selection;var C=i.selection.toOrientedRange(),w,E;if(T&&/comment/.test(T.type)){for(var D,I;T&&/comment/.test(T.type);){var L=T.value.indexOf(y.start);if(L!=-1){var z=R.getCurrentTokenRow(),F=R.getCurrentTokenColumn()+L;D=new s(z,F,z,F+y.start.length);break}T=R.stepBackward()}for(var R=new a(i,m.row,m.column),T=R.getCurrentToken();T&&/comment/.test(T.type);){var L=T.value.indexOf(y.end);if(L!=-1){var z=R.getCurrentTokenRow(),F=R.getCurrentTokenColumn()+L;I=new s(z,F,z,F+y.end.length);break}T=R.stepForward()}I&&i.remove(I),D&&(i.remove(D),w=D.start.row,E=-y.start.length)}else E=y.start.length,w=h.start.row,i.insert(h.end,y.end),i.insert(h.start,y.start);C.start.row==w&&(C.start.column+=E),C.end.row==w&&(C.end.column+=E),i.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(n,i,h){return this.$getIndent(i)},this.checkOutdent=function(n,i,h){return!1},this.autoOutdent=function(n,i,h){},this.$getIndent=function(n){return n.match(/^\s*/)[0]},this.createWorker=function(n){return null},this.createModeDelegates=function(n){this.$embeds=[],this.$modes={};for(var i in n)if(n[i]){var h=n[i],m=h.prototype.$id,y=b.$modes[m];y||(b.$modes[m]=y=new h),b.$modes[i]||(b.$modes[i]=y),this.$embeds.push(i),this.$modes[i]=y}for(var R=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],T=function(w){(function(E){var D=R[w],I=E[D];E[R[w]]=function(){return this.$delegator(D,arguments,I)}})(C)},C=this,i=0;i<R.length;i++)T(i)},this.$delegator=function(n,i,h){var m=i[0]||"start";if(typeof m!="string"){if(Array.isArray(m[2])){var y=m[2][m[2].length-1],R=this.$modes[y];if(R)return R[n].apply(R,[m[1]].concat([].slice.call(i,1)))}m=m[0]||"start"}for(var T=0;T<this.$embeds.length;T++)if(this.$modes[this.$embeds[T]]){var C=m.split(this.$embeds[T]);if(!C[0]&&C[1]){i[0]=C[1];var R=this.$modes[this.$embeds[T]];return R[n].apply(R,i)}}var w=h.apply(this,i);return h?w:void 0},this.transformAction=function(n,i,h,m,y){if(this.$behaviour){var R=this.$behaviour.getBehaviours();for(var T in R)if(R[T][i]){var C=R[T][i].apply(this,arguments);if(C)return C}}},this.getKeywords=function(n){if(!this.completionKeywords){var i=this.$tokenizer.rules,h=[];for(var m in i)for(var y=i[m],R=0,T=y.length;R<T;R++)if(typeof y[R].token=="string")/keyword|support|storage/.test(y[R].token)&&h.push(y[R].regex);else if(typeof y[R].token=="object"){for(var C=0,w=y[R].token.length;C<w;C++)if(/keyword|support|storage/.test(y[R].token[C])){var m=y[R].regex.match(/\(.+?\)/g)[C];h.push(m.substr(1,m.length-2))}}this.completionKeywords=h}return n?h.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(n,i,h,m){var y=this.$keywordList||this.$createKeywordList();return y.map(function(R){return{name:R,value:R,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(r.prototype),u.Mode=r}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,u,$){var b=e("./lib/dom"),v=function(){function x(p){this.session=p,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return x.prototype.getRowLength=function(p){var d;return this.lineWidgets?d=this.lineWidgets[p]&&this.lineWidgets[p].rowCount||0:d=0,!this.$useWrapMode||!this.$wrapData[p]?1+d:this.$wrapData[p].length+1+d},x.prototype.$getWidgetScreenLength=function(){var p=0;return this.lineWidgets.forEach(function(d){d&&d.rowCount&&!d.hidden&&(p+=d.rowCount)}),p},x.prototype.$onChangeEditor=function(p){this.attach(p.editor)},x.prototype.attach=function(p){p&&p.widgetManager&&p.widgetManager!=this&&p.widgetManager.detach(),this.editor!=p&&(this.detach(),this.editor=p,p&&(p.widgetManager=this,p.renderer.on("beforeRender",this.measureWidgets),p.renderer.on("afterRender",this.renderWidgets)))},x.prototype.detach=function(p){var d=this.editor;if(d){this.editor=null,d.widgetManager=null,d.renderer.off("beforeRender",this.measureWidgets),d.renderer.off("afterRender",this.renderWidgets);var o=this.session.lineWidgets;o&&o.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},x.prototype.updateOnFold=function(p,d){var o=d.lineWidgets;if(!(!o||!p.action)){for(var a=p.data,s=a.start.row,r=a.end.row,n=p.action=="add",i=s+1;i<r;i++)o[i]&&(o[i].hidden=n);o[r]&&(n?o[s]?o[r].hidden=n:o[s]=o[r]:(o[s]==o[r]&&(o[s]=void 0),o[r].hidden=n))}},x.prototype.updateOnChange=function(p){var d=this.session.lineWidgets;if(d){var o=p.start.row,a=p.end.row-o;if(a!==0)if(p.action=="remove"){var s=d.splice(o+1,a);!d[o]&&s[s.length-1]&&(d[o]=s.pop()),s.forEach(function(n){n&&this.removeLineWidget(n)},this),this.$updateRows()}else{var r=new Array(a);d[o]&&d[o].column!=null&&p.start.column>d[o].column&&o++,r.unshift(o,0),d.splice.apply(d,r),this.$updateRows()}}},x.prototype.$updateRows=function(){var p=this.session.lineWidgets;if(p){var d=!0;p.forEach(function(o,a){if(o)for(d=!1,o.row=a;o.$oldWidget;)o.$oldWidget.row=a,o=o.$oldWidget}),d&&(this.session.lineWidgets=null)}},x.prototype.$registerLineWidget=function(p){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var d=this.session.lineWidgets[p.row];return d&&(p.$oldWidget=d,d.el&&d.el.parentNode&&(d.el.parentNode.removeChild(d.el),d._inDocument=!1)),this.session.lineWidgets[p.row]=p,p},x.prototype.addLineWidget=function(p){if(this.$registerLineWidget(p),p.session=this.session,!this.editor)return p;var d=this.editor.renderer;p.html&&!p.el&&(p.el=b.createElement("div"),p.el.innerHTML=p.html),p.text&&!p.el&&(p.el=b.createElement("div"),p.el.textContent=p.text),p.el&&(b.addCssClass(p.el,"ace_lineWidgetContainer"),p.className&&b.addCssClass(p.el,p.className),p.el.style.position="absolute",p.el.style.zIndex="5",d.container.appendChild(p.el),p._inDocument=!0,p.coverGutter||(p.el.style.zIndex="3"),p.pixelHeight==null&&(p.pixelHeight=p.el.offsetHeight)),p.rowCount==null&&(p.rowCount=p.pixelHeight/d.layerConfig.lineHeight);var o=this.session.getFoldAt(p.row,0);if(p.$fold=o,o){var a=this.session.lineWidgets;p.row==o.end.row&&!a[o.start.row]?a[o.start.row]=p:p.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows(),this.renderWidgets(null,d),this.onWidgetChanged(p),p},x.prototype.removeLineWidget=function(p){if(p._inDocument=!1,p.session=null,p.el&&p.el.parentNode&&p.el.parentNode.removeChild(p.el),p.editor&&p.editor.destroy)try{p.editor.destroy()}catch{}if(this.session.lineWidgets){var d=this.session.lineWidgets[p.row];if(d==p)this.session.lineWidgets[p.row]=p.$oldWidget,p.$oldWidget&&this.onWidgetChanged(p.$oldWidget);else for(;d;){if(d.$oldWidget==p){d.$oldWidget=p.$oldWidget;break}d=d.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows()},x.prototype.getWidgetsAtRow=function(p){for(var d=this.session.lineWidgets,o=d&&d[p],a=[];o;)a.push(o),o=o.$oldWidget;return a},x.prototype.onWidgetChanged=function(p){this.session._changedWidgets.push(p),this.editor&&this.editor.renderer.updateFull()},x.prototype.measureWidgets=function(p,d){var o=this.session._changedWidgets,a=d.layerConfig;if(!(!o||!o.length)){for(var s=1/0,r=0;r<o.length;r++){var n=o[r];if(!(!n||!n.el)&&n.session==this.session){if(!n._inDocument){if(this.session.lineWidgets[n.row]!=n)continue;n._inDocument=!0,d.container.appendChild(n.el)}n.h=n.el.offsetHeight,n.fixedWidth||(n.w=n.el.offsetWidth,n.screenWidth=Math.ceil(n.w/a.characterWidth));var i=n.h/a.lineHeight;n.coverLine&&(i-=this.session.getRowLineCount(n.row),i<0&&(i=0)),n.rowCount!=i&&(n.rowCount=i,n.row<s&&(s=n.row))}}s!=1/0&&(this.session._emit("changeFold",{data:{start:{row:s}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},x.prototype.renderWidgets=function(p,d){var o=d.layerConfig,a=this.session.lineWidgets;if(a){for(var s=Math.min(this.firstRow,o.firstRow),r=Math.max(this.lastRow,o.lastRow,a.length);s>0&&!a[s];)s--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,d.$cursorLayer.config=o;for(var n=s;n<=r;n++){var i=a[n];if(!(!i||!i.el)){if(i.hidden){i.el.style.top=-100-(i.pixelHeight||0)+"px";continue}i._inDocument||(i._inDocument=!0,d.container.appendChild(i.el));var h=d.$cursorLayer.getPixelPosition({row:n,column:0},!0).top;i.coverLine||(h+=o.lineHeight*this.session.getRowLineCount(i.row)),i.el.style.top=h-o.offset+"px";var m=i.coverGutter?0:d.gutterWidth;i.fixedWidth||(m-=d.scrollLeft),i.el.style.left=m+"px",i.fullWidth&&i.screenWidth&&(i.el.style.minWidth=o.width+2*o.padding+"px"),i.fixedWidth?i.el.style.right=d.scrollBar.getWidth()+"px":i.el.style.right=""}}}},x}();u.LineWidgets=v}),ace.define("ace/apply_delta",["require","exports","module"],function(e,u,$){u.applyDelta=function(b,v,x){var p=v.start.row,d=v.start.column,o=b[p]||"";switch(v.action){case"insert":var a=v.lines;if(a.length===1)b[p]=o.substring(0,d)+v.lines[0]+o.substring(d);else{var s=[p,1].concat(v.lines);b.splice.apply(b,s),b[p]=o.substring(0,d)+b[p],b[p+v.lines.length-1]+=o.substring(d)}break;case"remove":var r=v.end.column,n=v.end.row;p===n?b[p]=o.substring(0,d)+o.substring(r):b.splice(p,n-p+1,o.substring(0,d)+b[n].substring(r));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,u,$){var b=e("./lib/oop"),v=e("./lib/event_emitter").EventEmitter,x=function(){function o(a,s,r){this.$onChange=this.onChange.bind(this),this.attach(a),typeof s!="number"?this.setPosition(s.row,s.column):this.setPosition(s,r)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var s=d(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(s.row,s.column,!0)}},o.prototype.setPosition=function(a,s,r){var n;if(r?n={row:a,column:s}:n=this.$clipPositionToDocument(a,s),!(this.row==n.row&&this.column==n.column)){var i={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:i,value:n})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(a,s){var r={};return a>=this.document.getLength()?(r.row=Math.max(0,this.document.getLength()-1),r.column=this.document.getLine(r.row).length):a<0?(r.row=0,r.column=0):(r.row=a,r.column=Math.min(this.document.getLine(r.row).length,Math.max(0,s))),s<0&&(r.column=0),r},o}();x.prototype.$insertRight=!1,b.implement(x.prototype,v);function p(o,a,s){var r=s?o.column<=a.column:o.column<a.column;return o.row<a.row||o.row==a.row&&r}function d(o,a,s){var r=o.action=="insert",n=(r?1:-1)*(o.end.row-o.start.row),i=(r?1:-1)*(o.end.column-o.start.column),h=o.start,m=r?h:o.end;return p(a,h,s)?{row:a.row,column:a.column}:p(m,a,!s)?{row:a.row+n,column:a.column+(a.row==m.row?i:0)}:{row:h.row,column:h.column}}u.Anchor=x}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,u,$){var b=e("./lib/oop"),v=e("./apply_delta").applyDelta,x=e("./lib/event_emitter").EventEmitter,p=e("./range").Range,d=e("./anchor").Anchor,o=function(){function a(s){this.$lines=[""],s.length===0?this.$lines=[""]:Array.isArray(s)?this.insertMergedLines({row:0,column:0},s):this.insert({row:0,column:0},s)}return a.prototype.setValue=function(s){var r=this.getLength()-1;this.remove(new p(0,0,r,this.getLine(r).length)),this.insert({row:0,column:0},s||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(s,r){return new d(this,s,r)},a.prototype.$detectNewLine=function(s){var r=s.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=r?r[1]:`
|
|
186
186
|
`,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
|
187
187
|
`;case"unix":return`
|
|
188
188
|
`;default:return this.$autoNewLine||`
|
|
@@ -194,8 +194,8 @@
|
|
|
194
194
|
`);var w="";return C.action?(w=C.action=="insert"?"+":"-",w+="["+C.lines+"]"):C.value&&(Array.isArray(C.value)?w=C.value.map(s).join(`
|
|
195
195
|
`):w=s(C.value)),C.start&&(w+=s(C)),(C.id||C.rev)&&(w+=" ("+(C.id||C.rev)+")"),w}function s(C){return C.start.row+":"+C.start.column+"=>"+C.end.row+":"+C.end.column}function r(C,w){var E=C.action=="insert",D=w.action=="insert";if(E&&D)if(p(w.start,C.end)>=0)h(w,C,-1);else if(p(w.start,C.start)<=0)h(C,w,1);else return null;else if(E&&!D)if(p(w.start,C.end)>=0)h(w,C,-1);else if(p(w.end,C.start)<=0)h(C,w,-1);else return null;else if(!E&&D)if(p(w.start,C.start)>=0)h(w,C,1);else if(p(w.start,C.start)<=0)h(C,w,1);else return null;else if(!E&&!D)if(p(w.start,C.start)>=0)h(w,C,1);else if(p(w.end,C.start)<=0)h(C,w,-1);else return null;return[w,C]}function n(C,w){for(var E=C.length;E--;)for(var D=0;D<w.length;D++)if(!r(C[E],w[D])){for(;E<C.length;){for(;D--;)r(w[D],C[E]);D=w.length,E++}return[C,w]}return C.selectionBefore=w.selectionBefore=C.selectionAfter=w.selectionAfter=null,[w,C]}function i(C,w){var E=C.action=="insert",D=w.action=="insert";if(E&&D)p(C.start,w.start)<0?h(w,C,1):h(C,w,1);else if(E&&!D)p(C.start,w.end)>=0?h(C,w,-1):(p(C.start,w.start)<=0||h(C,x.fromPoints(w.start,C.start),-1),h(w,C,1));else if(!E&&D)p(w.start,C.end)>=0?h(w,C,-1):(p(w.start,C.start)<=0||h(w,x.fromPoints(C.start,w.start),-1),h(C,w,1));else if(!E&&!D)if(p(w.start,C.end)>=0)h(w,C,-1);else if(p(w.end,C.start)<=0)h(C,w,-1);else{var I,L;return p(C.start,w.start)<0&&(I=C,C=y(C,w.start)),p(C.end,w.end)>0&&(L=y(C,w.end)),m(w.end,C.start,C.end,-1),L&&!I&&(C.lines=L.lines,C.start=L.start,C.end=L.end,L=C),[w,I,L].filter(Boolean)}return[w,C]}function h(C,w,E){m(C.start,w.start,w.end,E),m(C.end,w.start,w.end,E)}function m(C,w,E,D){C.row==(D==1?w:E).row&&(C.column+=D*(E.column-w.column)),C.row+=D*(E.row-w.row)}function y(C,w){var E=C.lines,D=C.end;C.end=d(w);var I=C.end.row-C.start.row,L=E.splice(I,E.length),z=I?w.column:w.column-C.start.column;E.push(L[0].substring(0,z)),L[0]=L[0].substr(z);var F={start:d(w),end:D,lines:L,action:C.action};return F}function R(C,w){w=o(w);for(var E=C.length;E--;){for(var D=C[E],I=0;I<D.length;I++){var L=D[I],z=i(L,w);w=z[0],z.length!=2&&(z[2]?(D.splice(I+1,1,z[1],z[2]),I++):z[1]||(D.splice(I,1),I--))}D.length||C.splice(E,1)}return C}function T(C,w){for(var E=0;E<w.length;E++)for(var D=w[E],I=0;I<D.length;I++)R(C,D[I])}u.UndoManager=b}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,u,$){var b=e("../range").Range,v=function(){function x(p,d){this.foldData=p,Array.isArray(d)?this.folds=d:d=this.folds=[d];var o=d[d.length-1];this.range=new b(d[0].start.row,d[0].start.column,o.end.row,o.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return x.prototype.shiftRow=function(p){this.start.row+=p,this.end.row+=p,this.folds.forEach(function(d){d.start.row+=p,d.end.row+=p})},x.prototype.addFold=function(p){if(p.sameRow){if(p.start.row<this.startRow||p.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(p),this.folds.sort(function(d,o){return-d.range.compareEnd(o.start.row,o.start.column)}),this.range.compareEnd(p.start.row,p.start.column)>0?(this.end.row=p.end.row,this.end.column=p.end.column):this.range.compareStart(p.end.row,p.end.column)<0&&(this.start.row=p.start.row,this.start.column=p.start.column)}else if(p.start.row==this.end.row)this.folds.push(p),this.end.row=p.end.row,this.end.column=p.end.column;else if(p.end.row==this.start.row)this.folds.unshift(p),this.start.row=p.start.row,this.start.column=p.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");p.foldLine=this},x.prototype.containsRow=function(p){return p>=this.start.row&&p<=this.end.row},x.prototype.walk=function(p,d,o){var a=0,s=this.folds,r,n,i,h=!0;d==null&&(d=this.end.row,o=this.end.column);for(var m=0;m<s.length;m++){if(r=s[m],n=r.range.compareStart(d,o),n==-1){p(null,d,o,a,h);return}if(i=p(null,r.start.row,r.start.column,a,h),i=!i&&p(r.placeholder,r.start.row,r.start.column,a),i||n===0)return;h=!r.sameRow,a=r.end.column}p(null,d,o,a,h)},x.prototype.getNextFoldTo=function(p,d){for(var o,a,s=0;s<this.folds.length;s++){if(o=this.folds[s],a=o.range.compareEnd(p,d),a==-1)return{fold:o,kind:"after"};if(a===0)return{fold:o,kind:"inside"}}return null},x.prototype.addRemoveChars=function(p,d,o){var a=this.getNextFoldTo(p,d),s,r;if(a){if(s=a.fold,a.kind=="inside"&&s.start.column!=d&&s.start.row!=p)window.console&&window.console.log(p,d,s);else if(s.start.row==p){r=this.folds;var n=r.indexOf(s);for(n===0&&(this.start.column+=o),n;n<r.length;n++){if(s=r[n],s.start.column+=o,!s.sameRow)return;s.end.column+=o}this.end.column+=o}}},x.prototype.split=function(p,d){var o=this.getNextFoldTo(p,d);if(!o||o.kind=="inside")return null;var a=o.fold,s=this.folds,r=this.foldData,n=s.indexOf(a),i=s[n-1];this.end.row=i.end.row,this.end.column=i.end.column,s=s.splice(n,s.length-n);var h=new x(r,s);return r.splice(r.indexOf(this)+1,0,h),h},x.prototype.merge=function(p){for(var d=p.folds,o=0;o<d.length;o++)this.addFold(d[o]);var a=this.foldData;a.splice(a.indexOf(p),1)},x.prototype.toString=function(){var p=[this.range.toString()+": ["];return this.folds.forEach(function(d){p.push(" "+d.toString())}),p.push("]"),p.join(`
|
|
196
196
|
`)},x.prototype.idxToPosition=function(p){for(var d=0,o=0;o<this.folds.length;o++){var a=this.folds[o];if(p-=a.start.column-d,p<0)return{row:a.start.row,column:a.start.column+p};if(p-=a.placeholder.length,p<0)return a.start;d=a.end.column}return{row:this.end.row,column:this.end.column+p}},x}();u.FoldLine=v}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,u,$){var b=e("./range").Range,v=b.comparePoints,x=function(){function p(){this.ranges=[],this.$bias=1}return p.prototype.pointIndex=function(d,o,a){for(var s=this.ranges,r=a||0;r<s.length;r++){var n=s[r],i=v(d,n.end);if(!(i>0)){var h=v(d,n.start);return i===0?o&&h!==0?-r-2:r:h>0||h===0&&!o?r:-r-1}}return-r-1},p.prototype.add=function(d){var o=!d.isEmpty(),a=this.pointIndex(d.start,o);a<0&&(a=-a-1);var s=this.pointIndex(d.end,o,a);return s<0?s=-s-1:s++,this.ranges.splice(a,s-a,d)},p.prototype.addList=function(d){for(var o=[],a=d.length;a--;)o.push.apply(o,this.add(d[a]));return o},p.prototype.substractPoint=function(d){var o=this.pointIndex(d);if(o>=0)return this.ranges.splice(o,1)},p.prototype.merge=function(){var d=[],o=this.ranges;o=o.sort(function(i,h){return v(i.start,h.start)});for(var a=o[0],s,r=1;r<o.length;r++){s=a,a=o[r];var n=v(s.end,a.start);n<0||n==0&&!s.isEmpty()&&!a.isEmpty()||(v(s.end,a.end)<0&&(s.end.row=a.end.row,s.end.column=a.end.column),o.splice(r,1),d.push(a),a=s,r--)}return this.ranges=o,d},p.prototype.contains=function(d,o){return this.pointIndex({row:d,column:o})>=0},p.prototype.containsPoint=function(d){return this.pointIndex(d)>=0},p.prototype.rangeAtPoint=function(d){var o=this.pointIndex(d);if(o>=0)return this.ranges[o]},p.prototype.clipRows=function(d,o){var a=this.ranges;if(a[0].start.row>o||a[a.length-1].start.row<d)return[];var s=this.pointIndex({row:d,column:0});s<0&&(s=-s-1);var r=this.pointIndex({row:o,column:0},s);r<0&&(r=-r-1);for(var n=[],i=s;i<r;i++)n.push(a[i]);return n},p.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},p.prototype.attach=function(d){this.session&&this.detach(),this.session=d,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},p.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},p.prototype.$onChange=function(d){for(var o=d.start,a=d.end,s=o.row,r=a.row,n=this.ranges,i=0,h=n.length;i<h;i++){var m=n[i];if(m.end.row>=s)break}if(d.action=="insert")for(var y=r-s,R=-o.column+a.column;i<h;i++){var m=n[i];if(m.start.row>s)break;if(m.start.row==s&&m.start.column>=o.column&&(m.start.column==o.column&&this.$bias<=0||(m.start.column+=R,m.start.row+=y)),m.end.row==s&&m.end.column>=o.column){if(m.end.column==o.column&&this.$bias<0)continue;m.end.column==o.column&&R>0&&i<h-1&&m.end.column>m.start.column&&m.end.column==n[i+1].start.column&&(m.end.column-=R),m.end.column+=R,m.end.row+=y}}else for(var y=s-r,R=o.column-a.column;i<h;i++){var m=n[i];if(m.start.row>r)break;m.end.row<r&&(s<m.end.row||s==m.end.row&&o.column<m.end.column)?(m.end.row=s,m.end.column=o.column):m.end.row==r?m.end.column<=a.column?(y||m.end.column>o.column)&&(m.end.column=o.column,m.end.row=o.row):(m.end.column+=R,m.end.row+=y):m.end.row>r&&(m.end.row+=y),m.start.row<r&&(s<m.start.row||s==m.start.row&&o.column<m.start.column)?(m.start.row=s,m.start.column=o.column):m.start.row==r?m.start.column<=a.column?(y||m.start.column>o.column)&&(m.start.column=o.column,m.start.row=o.row):(m.start.column+=R,m.start.row+=y):m.start.row>r&&(m.start.row+=y)}if(y!=0&&i<h)for(;i<h;i++){var m=n[i];m.start.row+=y,m.end.row+=y}},p}();x.prototype.comparePoints=v,u.RangeList=x}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,u,$){var b=this&&this.__extends||function(){var s=function(r,n){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,h){i.__proto__=h}||function(i,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(i[m]=h[m])},s(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");s(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),v=e("../range_list").RangeList,x=function(s){b(r,s);function r(n,i){var h=s.call(this)||this;return h.foldLine=null,h.placeholder=i,h.range=n,h.start=n.start,h.end=n.end,h.sameRow=n.start.row==n.end.row,h.subFolds=h.ranges=[],h}return r.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},r.prototype.setFoldLine=function(n){this.foldLine=n,this.subFolds.forEach(function(i){i.setFoldLine(n)})},r.prototype.clone=function(){var n=this.range.clone(),i=new r(n,this.placeholder);return this.subFolds.forEach(function(h){i.subFolds.push(h.clone())}),i.collapseChildren=this.collapseChildren,i},r.prototype.addSubFold=function(n){if(!this.range.isEqual(n)){d(n,this.start);for(var R=n.start.row,T=n.start.column,i=0,h=-1;i<this.subFolds.length&&(h=this.subFolds[i].range.compare(R,T),h==1);i++);var m=this.subFolds[i],y=0;if(h==0){if(m.range.containsRange(n))return m.addSubFold(n);y=1}for(var R=n.range.end.row,T=n.range.end.column,C=i,h=-1;C<this.subFolds.length&&(h=this.subFolds[C].range.compare(R,T),h==1);C++);h==0&&C++;for(var w=this.subFolds.splice(i,C-i,n),E=h==0?w.length-1:w.length,D=y;D<E;D++)n.addSubFold(w[D]);return n.setFoldLine(this.foldLine),n}},r.prototype.restoreRange=function(n){return a(n,this.start)},r}(v);function p(s,r){s.row-=r.row,s.row==0&&(s.column-=r.column)}function d(s,r){p(s.start,r),p(s.end,r)}function o(s,r){s.row==0&&(s.column+=r.column),s.row+=r.row}function a(s,r){o(s.start,r),o(s.end,r)}u.Fold=x}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(e,u,$){var b=e("../range").Range,v=e("./fold_line").FoldLine,x=e("./fold").Fold,p=e("../token_iterator").TokenIterator,d=e("../mouse/mouse_event").MouseEvent;function o(){this.getFoldAt=function(a,s,r){var n=this.getFoldLine(a);if(!n)return null;for(var i=n.folds,h=0;h<i.length;h++){var m=i[h].range;if(m.contains(a,s)){if(r==1&&m.isEnd(a,s)&&!m.isEmpty())continue;if(r==-1&&m.isStart(a,s)&&!m.isEmpty())continue;return i[h]}}},this.getFoldsInRange=function(a){var s=a.start,r=a.end,n=this.$foldData,i=[];s.column+=1,r.column-=1;for(var h=0;h<n.length;h++){var m=n[h].range.compareRange(a);if(m!=2){if(m==-2)break;for(var y=n[h].folds,R=0;R<y.length;R++){var T=y[R];if(m=T.range.compareRange(a),m==-2)break;if(m==2)continue;if(m==42)break;i.push(T)}}}return s.column-=1,r.column+=1,i},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var s=[];a.forEach(function(r){s=s.concat(this.getFoldsInRange(r))},this)}else var s=this.getFoldsInRange(a);return s},this.getAllFolds=function(){for(var a=[],s=this.$foldData,r=0;r<s.length;r++)for(var n=0;n<s[r].folds.length;n++)a.push(s[r].folds[n]);return a},this.getFoldStringAt=function(a,s,r,n){if(n=n||this.getFoldLine(a),!n)return null;for(var i={end:{column:0}},h,m,y=0;y<n.folds.length;y++){m=n.folds[y];var R=m.range.compareEnd(a,s);if(R==-1){h=this.getLine(m.start.row).substring(i.end.column,m.start.column);break}else if(R===0)return null;i=m}return h||(h=this.getLine(m.start.row).substring(i.end.column)),r==-1?h.substring(0,s-i.end.column):r==1?h.substring(s-i.end.column):h},this.getFoldLine=function(a,s){var r=this.$foldData,n=0;for(s&&(n=r.indexOf(s)),n==-1&&(n=0),n;n<r.length;n++){var i=r[n];if(i.start.row<=a&&i.end.row>=a)return i;if(i.end.row>a)return null}return null},this.getNextFoldLine=function(a,s){var r=this.$foldData,n=0;for(s&&(n=r.indexOf(s)),n==-1&&(n=0),n;n<r.length;n++){var i=r[n];if(i.end.row>=a)return i}return null},this.getFoldedRowCount=function(a,s){for(var r=this.$foldData,n=s-a+1,i=0;i<r.length;i++){var h=r[i],m=h.end.row,y=h.start.row;if(m>=s){y<s&&(y>=a?n-=s-y:n=0);break}else m>=a&&(y>=a?n-=m-y:n-=m-a+1)}return n},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(s,r){return s.start.row-r.start.row}),a},this.addFold=function(a,s){var r=this.$foldData,n=!1,i;a instanceof x?i=a:(i=new x(s,a),i.collapseChildren=s.collapseChildren),this.$clipRangeToDocument(i.range);var h=i.start.row,m=i.start.column,y=i.end.row,R=i.end.column,T=this.getFoldAt(h,m,1),C=this.getFoldAt(y,R,-1);if(T&&C==T)return T.addSubFold(i);T&&!T.range.isStart(h,m)&&this.removeFold(T),C&&!C.range.isEnd(y,R)&&this.removeFold(C);var w=this.getFoldsInRange(i.range);w.length>0&&(this.removeFolds(w),i.collapseChildren||w.forEach(function(L){i.addSubFold(L)}));for(var E=0;E<r.length;E++){var D=r[E];if(y==D.start.row){D.addFold(i),n=!0;break}else if(h==D.end.row){if(D.addFold(i),n=!0,!i.sameRow){var I=r[E+1];if(I&&I.start.row==y){D.merge(I);break}}break}else if(y<=D.start.row)break}return n||(D=this.$addFoldLine(new v(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(D.start.row,D.start.row):this.$updateRowLengthCache(D.start.row,D.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(a){a.forEach(function(s){this.addFold(s)},this)},this.removeFold=function(a){var s=a.foldLine,r=s.start.row,n=s.end.row,i=this.$foldData,h=s.folds;if(h.length==1)i.splice(i.indexOf(s),1);else if(s.range.isEnd(a.end.row,a.end.column))h.pop(),s.end.row=h[h.length-1].end.row,s.end.column=h[h.length-1].end.column;else if(s.range.isStart(a.start.row,a.start.column))h.shift(),s.start.row=h[0].start.row,s.start.column=h[0].start.column;else if(a.sameRow)h.splice(h.indexOf(a),1);else{var m=s.split(a.start.row,a.start.column);h=m.folds,h.shift(),m.start.row=h[0].start.row,m.start.column=h[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(r,n):this.$updateRowLengthCache(r,n)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var s=[],r=0;r<a.length;r++)s.push(a[r]);s.forEach(function(n){this.removeFold(n)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(s){a.restoreRange(s),this.addFold(s)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(s){this.expandFold(s)},this)},this.unfold=function(a,s){var r,n;if(a==null)r=new b(0,0,this.getLength(),0),s==null&&(s=!0);else if(typeof a=="number")r=new b(a,0,a,this.getLine(a).length);else if("row"in a)r=b.fromPoints(a,a);else{if(Array.isArray(a))return n=[],a.forEach(function(h){n=n.concat(this.unfold(h))},this),n;r=a}n=this.getFoldsInRangeList(r);for(var i=n;n.length==1&&b.comparePoints(n[0].start,r.start)<0&&b.comparePoints(n[0].end,r.end)>0;)this.expandFolds(n),n=this.getFoldsInRangeList(r);if(s!=!1?this.removeFolds(n):this.expandFolds(n),i.length)return i},this.isRowFolded=function(a,s){return!!this.getFoldLine(a,s)},this.getRowFoldEnd=function(a,s){var r=this.getFoldLine(a,s);return r?r.end.row:a},this.getRowFoldStart=function(a,s){var r=this.getFoldLine(a,s);return r?r.start.row:a},this.getFoldDisplayLine=function(a,s,r,n,i){n==null&&(n=a.start.row),i==null&&(i=0),s==null&&(s=a.end.row),r==null&&(r=this.getLine(s).length);var h=this.doc,m="";return a.walk(function(y,R,T,C){if(!(R<n)){if(R==n){if(T<i)return;C=Math.max(i,C)}y!=null?m+=y:m+=h.getLine(R).substring(C,T)}},s,r),m},this.getDisplayLine=function(a,s,r,n){var i=this.getFoldLine(a);if(i)return this.getFoldDisplayLine(i,a,s,r,n);var h;return h=this.doc.getLine(a),h.substring(n||0,s||h.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(s){var r=s.folds.map(function(n){return n.clone()});return new v(a,r)}),a},this.toggleFold=function(a){var s=this.selection,r=s.getRange(),n,i;if(r.isEmpty()){var h=r.start;if(n=this.getFoldAt(h.row,h.column),n){this.expandFold(n);return}else if(a){var m=this.getFoldLine(h.row);m&&this.expandFolds(m.folds);return}else(i=this.findMatchingBracket(h))?r.comparePoint(i)==1?r.end=i:(r.start=i,r.start.column++,r.end.column--):(i=this.findMatchingBracket({row:h.row,column:h.column+1}))?(r.comparePoint(i)==1?r.end=i:r.start=i,r.start.column++):r=this.getCommentFoldRange(h.row,h.column)||r}else{var y=this.getFoldsInRange(r);if(a&&y.length){this.expandFolds(y);return}else y.length==1&&(n=y[0])}if(n||(n=this.getFoldAt(r.start.row,r.start.column)),n&&n.range.toString()==r.toString()){this.expandFold(n);return}var R="...";if(!r.isMultiLine()){if(R=this.getTextRange(r),R.length<4)return;R=R.trim().substring(0,2)+".."}this.addFold(R,r)},this.getCommentFoldRange=function(a,s,r){var n=new p(this,a,s),i=n.getCurrentToken(),h=i&&i.type;if(i&&/^comment|string/.test(h)){h=h.match(/comment|string/)[0],h=="comment"&&(h+="|doc-start|\\.doc");var m=new RegExp(h),y=new b;if(r!=1){do i=n.stepBackward();while(i&&m.test(i.type));i=n.stepForward()}y.start.row=n.getCurrentTokenRow(),y.start.column=n.getCurrentTokenColumn()+i.value.length,n=new p(this,a,s);var R=this.getState(n.$row);if(r!=-1){var T=-1;do if(i=n.stepForward(),T==-1){var C=this.getState(n.$row);R.toString()!==C.toString()&&(T=n.$row)}else if(n.$row>T)break;while(i&&m.test(i.type));i=n.stepBackward()}else i=n.getCurrentToken();return y.end.row=n.getCurrentTokenRow(),y.end.column=n.getCurrentTokenColumn(),y.start.row==y.end.row&&y.start.column>y.end.column?void 0:y}},this.foldAll=function(a,s,r,n){r==null&&(r=1e5);var i=this.foldWidgets;if(i){s=s||this.getLength(),a=a||0;for(var h=a;h<s;h++)if(i[h]==null&&(i[h]=this.getFoldWidget(h)),i[h]=="start"&&!(n&&!n(h))){var m=this.getFoldWidgetRange(h);m&&m.isMultiLine()&&m.end.row<=s&&m.start.row>=a&&(h=m.end.row,m.collapseChildren=r,this.addFold("...",m))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(s){for(var r=a.getTokens(s),n=0;n<r.length;n++){var i=r[n];if(!(i.type=="text"&&/^\s+$/.test(i.value)))return!!/comment/.test(i.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,a=="manual"&&this.unfold();var s=this.$foldMode;this.$setFolding(null),this.$setFolding(s)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(a,s){var r=this.foldWidgets;if(!r||s&&r[a])return{};for(var n=a-1,i;n>=0;){var h=r[n];if(h==null&&(h=r[n]=this.getFoldWidget(n)),h=="start"){var m=this.getFoldWidgetRange(n);if(i||(i=m),m&&m.end.row>=a)break}n--}return{range:n!==-1&&m,firstRange:i}},this.onFoldWidgetClick=function(a,s){s instanceof d&&(s=s.domEvent);var r={children:s.shiftKey,all:s.ctrlKey||s.metaKey,siblings:s.altKey},n=this.$toggleFoldWidget(a,r);if(!n){var i=s.target||s.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,s){if(this.getFoldWidget){var r=this.getFoldWidget(a),n=this.getLine(a),i=r==="end"?-1:1,h=this.getFoldAt(a,i===-1?0:n.length,i);if(h)return s.children||s.all?this.removeFold(h):this.expandFold(h),h;var m=this.getFoldWidgetRange(a,!0);if(m&&!m.isMultiLine()&&(h=this.getFoldAt(m.start.row,m.start.column,1),h&&m.isEqual(h.range)))return this.removeFold(h),h;if(s.siblings){var y=this.getParentFoldRangeData(a);if(y.range)var R=y.range.start.row+1,T=y.range.end.row;this.foldAll(R,T,s.all?1e4:0)}else s.children?(T=m?m.end.row:this.getLength(),this.foldAll(a+1,T,s.all?1e4:0)):m&&(s.all&&(m.collapseChildren=1e4),this.addFold("...",m));return m}},this.toggleFoldWidget=function(a){var s=this.selection.getCursor().row;s=this.getRowFoldStart(s);var r=this.$toggleFoldWidget(s,{});if(!r){var n=this.getParentFoldRangeData(s,!0);if(r=n.range||n.firstRange,r){s=r.start.row;var i=this.getFoldAt(s,this.getLine(s).length,1);i?this.removeFold(i):this.addFold("...",r)}}},this.updateFoldWidgets=function(a){var s=a.start.row,r=a.end.row-s;if(r===0)this.foldWidgets[s]=null;else if(a.action=="remove")this.foldWidgets.splice(s,r+1,null);else{var n=Array(r+1);n.unshift(s,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(a){var s=a.data;s.first!=s.last&&this.foldWidgets.length>s.first&&this.foldWidgets.splice(s.first,this.foldWidgets.length)}}u.Folding=o}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,u,$){var b=e("../token_iterator").TokenIterator,v=e("../range").Range;function x(){this.findMatchingBracket=function(p,d){if(p.column==0)return null;var o=d||this.getLine(p.row).charAt(p.column-1);if(o=="")return null;var a=o.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],p):this.$findOpeningBracket(a[2],p):null},this.getBracketRange=function(p){var d=this.getLine(p.row),o=!0,a,s=d.charAt(p.column-1),r=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(r||(s=d.charAt(p.column),p={row:p.row,column:p.column+1},r=s&&s.match(/([\(\[\{])|([\)\]\}])/),o=!1),!r)return null;if(r[1]){var n=this.$findClosingBracket(r[1],p);if(!n)return null;a=v.fromPoints(p,n),o||(a.end.column++,a.start.column--),a.cursor=a.end}else{var n=this.$findOpeningBracket(r[2],p);if(!n)return null;a=v.fromPoints(n,p),o||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(p,d){var o=this.getLine(p.row),a=/([\(\[\{])|([\)\]\}])/,s=!d&&o.charAt(p.column-1),r=s&&s.match(a);if(r||(s=(d===void 0||d)&&o.charAt(p.column),p={row:p.row,column:p.column+1},r=s&&s.match(a)),!r)return null;var n=new v(p.row,p.column-1,p.row,p.column),i=r[1]?this.$findClosingBracket(r[1],p):this.$findOpeningBracket(r[2],p);if(!i)return[n];var h=new v(i.row,i.column,i.row,i.column+1);return[n,h]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(p,d,o){var a=this.$brackets[p],s=1,r=new b(this,d.row,d.column),n=r.getCurrentToken();if(n||(n=r.stepForward()),!!n){o||(o=new RegExp("(\\.?"+n.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var i=d.column-r.getCurrentTokenColumn()-2,h=n.value;;){for(;i>=0;){var m=h.charAt(i);if(m==a){if(s-=1,s==0)return{row:r.getCurrentTokenRow(),column:i+r.getCurrentTokenColumn()}}else m==p&&(s+=1);i-=1}do n=r.stepBackward();while(n&&!o.test(n.type));if(n==null)break;h=n.value,i=h.length-1}return null}},this.$findClosingBracket=function(p,d,o){var a=this.$brackets[p],s=1,r=new b(this,d.row,d.column),n=r.getCurrentToken();if(n||(n=r.stepForward()),!!n){o||(o=new RegExp("(\\.?"+n.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var i=d.column-r.getCurrentTokenColumn();;){for(var h=n.value,m=h.length;i<m;){var y=h.charAt(i);if(y==a){if(s-=1,s==0)return{row:r.getCurrentTokenRow(),column:i+r.getCurrentTokenColumn()}}else y==p&&(s+=1);i+=1}do n=r.stepForward();while(n&&!o.test(n.type));if(n==null)break;i=0}return null}},this.getMatchingTags=function(p){var d=new b(this,p.row,p.column),o=this.$findTagName(d);if(o){var a=d.stepBackward();return a.value==="<"?this.$findClosingTag(d,o):this.$findOpeningTag(d,o)}},this.$findTagName=function(p){var d=p.getCurrentToken(),o=!1,a=!1;if(d&&d.type.indexOf("tag-name")===-1)do a?d=p.stepBackward():d=p.stepForward(),d&&(d.value==="/>"?a=!0:d.type.indexOf("tag-name")!==-1&&(o=!0));while(d&&!o);return d},this.$findClosingTag=function(p,d){var o,a=d.value,s=d.value,r=0,n=new v(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);d=p.stepForward();var i=new v(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+d.value.length),h=!1;do{if(o=d,o.type.indexOf("tag-close")!==-1&&!h){var m=new v(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);h=!0}if(d=p.stepForward(),d){if(d.value===">"&&!h){var m=new v(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);h=!0}if(d.type.indexOf("tag-name")!==-1){if(a=d.value,s===a){if(o.value==="<")r++;else if(o.value==="</"&&(r--,r<0)){p.stepBackward();var y=new v(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+2);d=p.stepForward();var R=new v(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=p.stepForward()),d&&d.value===">")var T=new v(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);else return}}}else if(s===a&&d.value==="/>"&&(r--,r<0))var y=new v(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+2),R=y,T=R,m=new v(i.end.row,i.end.column,i.end.row,i.end.column+1)}}while(d&&r>=0);if(n&&m&&y&&T&&i&&R)return{openTag:new v(n.start.row,n.start.column,m.end.row,m.end.column),closeTag:new v(y.start.row,y.start.column,T.end.row,T.end.column),openTagName:i,closeTagName:R}},this.$findOpeningTag=function(p,d){var o=p.getCurrentToken(),a=d.value,s=0,r=p.getCurrentTokenRow(),n=p.getCurrentTokenColumn(),i=n+2,h=new v(r,n,r,i);p.stepForward();var m=new v(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=p.stepForward()),!(!d||d.value!==">")){var y=new v(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);p.stepBackward(),p.stepBackward();do if(d=o,r=p.getCurrentTokenRow(),n=p.getCurrentTokenColumn(),i=n+d.value.length,o=p.stepBackward(),d){if(d.type.indexOf("tag-name")!==-1){if(a===d.value)if(o.value==="<"){if(s++,s>0){var R=new v(r,n,r,i),T=new v(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);do d=p.stepForward();while(d&&d.value!==">");var C=new v(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1)}}else o.value==="</"&&s--}else if(d.value==="/>"){for(var w=0,E=o;E;){if(E.type.indexOf("tag-name")!==-1&&E.value===a){s--;break}else if(E.value==="<")break;E=p.stepBackward(),w++}for(var D=0;D<w;D++)p.stepForward()}}while(o&&s<=0);if(T&&C&&h&&y&&R&&m)return{openTag:new v(T.start.row,T.start.column,C.end.row,C.end.column),closeTag:new v(h.start.row,h.start.column,y.end.row,y.end.column),openTagName:R,closeTagName:m}}}}u.BracketMatch=x}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,u,$){var b=e("./lib/oop"),v=e("./lib/lang"),x=e("./bidihandler").BidiHandler,p=e("./config"),d=e("./lib/event_emitter").EventEmitter,o=e("./selection").Selection,a=e("./mode/text").Mode,s=e("./range").Range,r=e("./line_widgets").LineWidgets,n=e("./document").Document,i=e("./background_tokenizer").BackgroundTokenizer,h=e("./search_highlight").SearchHighlight,m=e("./undomanager").UndoManager,y=function(){function F(O,A){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++F.$uid,this.$foldData.toString=function(){return this.join(`
|
|
197
|
-
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new i(new a().getTokenizer(),this);var S=this;this.bgTokenizer.on("update",function(N){S._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new n(O)),this.setDocument(O),this.selection=new o(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new x(this),p.resetOptions(this),this.setMode(A),p._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return F.prototype.$initOperationListeners=function(){var O=this;this.curOp=null,this.on("change",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.docChanged=!0},!0),this.on("changeSelection",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.selectionChanged=!0},!0),this.$operationResetTimer=v.delayedCall(this.endOperation.bind(this,!0))},F.prototype.startOperation=function(O){if(this.curOp){if(!O||this.curOp.command)return;this.prevOp=this.curOp}O||(O={}),this.$operationResetTimer.schedule(),this.curOp={command:O.command||{},args:O.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",O)},F.prototype.endOperation=function(O){if(this.curOp){if(O&&O.returnValue===!1){this.curOp=null,this._signal("endOperation",O);return}if(O==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var A=this.selection.toJSON();this.curOp.selectionAfter=A,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(A),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},F.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},F.prototype.getDocument=function(){return this.doc},Object.defineProperty(F.prototype,"widgetManager",{get:function(){var O=new r(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),F.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var A=this.$docRowCache.length,S=this.$getRowCacheIndex(this.$docRowCache,O)+1;A>S&&(this.$docRowCache.splice(S,A),this.$screenRowCache.splice(S,A))},F.prototype.$getRowCacheIndex=function(O,A){for(var S=0,N=O.length-1;S<=N;){var
|
|
198
|
-
`},F.prototype.getWordRange=function(O,A){var S=this.getLine(O),N=!1;if(A>0&&(N=!!S.charAt(A-1).match(this.tokenRe)),N||(N=!!S.charAt(A).match(this.tokenRe)),N)var B=this.tokenRe;else if(/^\s+$/.test(S.slice(A-1,A+1)))var B=/\s/;else var B=this.nonTokenRe;var V=A;if(V>0){do V--;while(V>=0&&S.charAt(V).match(B));V++}for(var G=A;G<S.length&&S.charAt(G).match(B);)G++;return new s(O,V,O,G)},F.prototype.getAWordRange=function(O,A){for(var S=this.getWordRange(O,A),N=this.getLine(S.end.row);N.charAt(S.end.column).match(/[ \t]/);)S.end.column+=1;return S},F.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},F.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},F.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},F.prototype.getUseWorker=function(){return this.$useWorker},F.prototype.onReloadTokenizer=function(O){var A=O.data;this.bgTokenizer.start(A.first),this._signal("tokenizerUpdate",O)},F.prototype.setMode=function(O,A){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var S=O,N=S.path}else N=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[N]&&!S){this.$onChangeMode(this.$modes[N]),A&&A();return}this.$modeId=N,p.loadModule(["mode",N],(function(B){if(!this.destroyed){if(this.$modeId!==N)return A&&A();this.$modes[N]&&!S?this.$onChangeMode(this.$modes[N]):B&&B.Mode&&(B=new B.Mode(S),S||(this.$modes[N]=B,B.$id=N),this.$onChangeMode(B)),A&&A()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},F.prototype.$onChangeMode=function(O,A){if(A||(this.$modeId=O.$id),this.$mode!==O){var S=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=O.getTokenizer();if(N.on!==void 0){var B=this.onReloadTokenizer.bind(this);N.on("update",B)}this.bgTokenizer.setTokenizer(N),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,A||(O.attachToSession&&O.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(O.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:S,mode:O}))}},F.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},F.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){p.warn("Could not load worker",O),this.$worker=null}},F.prototype.getMode=function(){return this.$mode},F.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},F.prototype.getScrollTop=function(){return this.$scrollTop},F.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},F.prototype.getScrollLeft=function(){return this.$scrollLeft},F.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},F.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var O=0;return this.lineWidgets.forEach(function(A){A&&A.screenWidth>O&&(O=A.screenWidth)}),this.lineWidgetWidth=O},F.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var A=this.doc.getAllLines(),S=this.$rowLengthCache,N=0,B=0,V=this.$foldData[B],G=V?V.start.row:1/0,Z=A.length,ee=0;ee<Z;ee++){if(ee>G){if(ee=V.end.row+1,ee>=Z)break;V=this.$foldData[B++],G=V?V.start.row:1/0}S[ee]==null&&(S[ee]=this.$getStringScreenWidth(A[ee])[0]),S[ee]>N&&(N=S[ee])}this.screenWidth=N}},F.prototype.getLine=function(O){return this.doc.getLine(O)},F.prototype.getLines=function(O,A){return this.doc.getLines(O,A)},F.prototype.getLength=function(){return this.doc.getLength()},F.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},F.prototype.insert=function(O,A){return this.doc.insert(O,A)},F.prototype.remove=function(O){return this.doc.remove(O)},F.prototype.removeFullLines=function(O,A){return this.doc.removeFullLines(O,A)},F.prototype.undoChanges=function(O,A){if(O.length){this.$fromUndo=!0;for(var S=O.length-1;S!=-1;S--){var N=O[S];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!A&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},F.prototype.redoChanges=function(O,A){if(O.length){this.$fromUndo=!0;for(var S=0;S<O.length;S++){var N=O[S];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!A&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},F.prototype.setUndoSelect=function(O){this.$undoSelect=O},F.prototype.$getUndoSelection=function(O,A){function S(Z){return A?Z.action!=="insert":Z.action==="insert"}for(var N,B,V=0;V<O.length;V++){var G=O[V];if(G.start){if(!N){S(G)?N=s.fromPoints(G.start,G.end):N=s.fromPoints(G.start,G.start);continue}S(G)?(B=G.start,N.compare(B.row,B.column)==-1&&N.setStart(B),B=G.end,N.compare(B.row,B.column)==1&&N.setEnd(B)):(B=G.start,N.compare(B.row,B.column)==-1&&(N=s.fromPoints(G.start,G.start)))}}return N},F.prototype.replace=function(O,A){return this.doc.replace(O,A)},F.prototype.moveText=function(O,A,S){var N=this.getTextRange(O),B=this.getFoldsInRange(O),V=s.fromPoints(A,A);if(!S){this.remove(O);var G=O.start.row-O.end.row,Z=G?-O.end.column:O.start.column-O.end.column;Z&&(V.start.row==O.end.row&&V.start.column>O.end.column&&(V.start.column+=Z),V.end.row==O.end.row&&V.end.column>O.end.column&&(V.end.column+=Z)),G&&V.start.row>=O.end.row&&(V.start.row+=G,V.end.row+=G)}if(V.end=this.insert(V.start,N),B.length){var ee=O.start,ce=V.start,G=ce.row-ee.row,Z=ce.column-ee.column;this.addFolds(B.map(function(ue){return ue=ue.clone(),ue.start.row==ee.row&&(ue.start.column+=Z),ue.end.row==ee.row&&(ue.end.column+=Z),ue.start.row+=G,ue.end.row+=G,ue}))}return V},F.prototype.indentRows=function(O,A,S){S=S.replace(/\t/g,this.getTabString());for(var N=O;N<=A;N++)this.doc.insertInLine({row:N,column:0},S)},F.prototype.outdentRows=function(O){for(var A=O.collapseRows(),S=new s(0,0,0,0),N=this.getTabSize(),B=A.start.row;B<=A.end.row;++B){var V=this.getLine(B);S.start.row=B,S.end.row=B;for(var G=0;G<N&&V.charAt(G)==" ";++G);G<N&&V.charAt(G)==" "?(S.start.column=G,S.end.column=G+1):(S.start.column=0,S.end.column=G),this.remove(S)}},F.prototype.$moveLines=function(O,A,S){if(O=this.getRowFoldStart(O),A=this.getRowFoldEnd(A),S<0){var N=this.getRowFoldStart(O+S);if(N<0)return 0;var B=N-O}else if(S>0){var N=this.getRowFoldEnd(A+S);if(N>this.doc.getLength()-1)return 0;var B=N-A}else{O=this.$clipRowToDocument(O),A=this.$clipRowToDocument(A);var B=A-O+1}var V=new s(O,0,A,Number.MAX_VALUE),G=this.getFoldsInRange(V).map(function(ee){return ee=ee.clone(),ee.start.row+=B,ee.end.row+=B,ee}),Z=S==0?this.doc.getLines(O,A):this.doc.removeFullLines(O,A);return this.doc.insertFullLines(O+B,Z),G.length&&this.addFolds(G),B},F.prototype.moveLinesUp=function(O,A){return this.$moveLines(O,A,-1)},F.prototype.moveLinesDown=function(O,A){return this.$moveLines(O,A,1)},F.prototype.duplicateLines=function(O,A){return this.$moveLines(O,A,0)},F.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},F.prototype.$clipColumnToRow=function(O,A){return A<0?0:Math.min(this.doc.getLine(O).length,A)},F.prototype.$clipPositionToDocument=function(O,A){if(A=Math.max(0,A),O<0)O=0,A=0;else{var S=this.doc.getLength();O>=S?(O=S-1,A=this.doc.getLine(S-1).length):A=Math.min(this.doc.getLine(O).length,A)}return{row:O,column:A}},F.prototype.$clipRangeToDocument=function(O){O.start.row<0?(O.start.row=0,O.start.column=0):O.start.column=this.$clipColumnToRow(O.start.row,O.start.column);var A=this.doc.getLength()-1;return O.end.row>A?(O.end.row=A,O.end.column=this.doc.getLine(A).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},F.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var A=this.getLength();this.$wrapData=Array(A),this.$updateWrapData(0,A-1)}this._signal("changeWrapMode")}},F.prototype.getUseWrapMode=function(){return this.$useWrapMode},F.prototype.setWrapLimitRange=function(O,A){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==A)&&(this.$wrapLimitRange={min:O,max:A},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},F.prototype.adjustWrapLimit=function(O,A){var S=this.$wrapLimitRange;S.max<0&&(S={min:A,max:A});var N=this.$constrainWrapLimit(O,S.min,S.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},F.prototype.$constrainWrapLimit=function(O,A,S){return A&&(O=Math.max(A,O)),S&&(O=Math.min(S,O)),O},F.prototype.getWrapLimit=function(){return this.$wrapLimit},F.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},F.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},F.prototype.$updateInternalDataOnChange=function(O){var A=this.$useWrapMode,S=O.action,N=O.start,B=O.end,V=N.row,G=B.row,Z=G-V,ee=null;if(this.$updating=!0,Z!=0)if(S==="remove"){this[A?"$wrapData":"$rowLengthCache"].splice(V,Z);var ce=this.$foldData;ee=this.getFoldsInRange(O),this.removeFolds(ee);var ne=this.getFoldLine(B.row),he=0;if(ne){ne.addRemoveChars(B.row,B.column,N.column-B.column),ne.shiftRow(-Z);var ue=this.getFoldLine(V);ue&&ue!==ne&&(ue.merge(ne),ne=ue),he=ce.indexOf(ne)+1}for(he;he<ce.length;he++){var ne=ce[he];ne.start.row>=B.row&&ne.shiftRow(-Z)}G=V}else{var le=Array(Z);le.unshift(V,0);var me=A?this.$wrapData:this.$rowLengthCache;me.splice.apply(me,le);var ce=this.$foldData,ne=this.getFoldLine(V),he=0;if(ne){var _e=ne.range.compareInside(N.row,N.column);_e==0?(ne=ne.split(N.row,N.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(G,0,B.column-N.column))):_e==-1&&(ne.addRemoveChars(V,0,B.column-N.column),ne.shiftRow(Z)),he=ce.indexOf(ne)+1}for(he;he<ce.length;he++){var ne=ce[he];ne.start.row>=V&&ne.shiftRow(Z)}}else{Z=Math.abs(O.start.column-O.end.column),S==="remove"&&(ee=this.getFoldsInRange(O),this.removeFolds(ee),Z=-Z);var ne=this.getFoldLine(V);ne&&ne.addRemoveChars(V,N.column,Z)}return A&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,A?this.$updateWrapData(V,G):this.$updateRowLengthCache(V,G),ee},F.prototype.$updateRowLengthCache=function(O,A){this.$rowLengthCache[O]=null,this.$rowLengthCache[A]=null},F.prototype.$updateWrapData=function(O,A){var S=this.doc.getAllLines(),N=this.getTabSize(),B=this.$wrapData,V=this.$wrapLimit,G,Z,ee=O;for(A=Math.min(A,S.length-1);ee<=A;)Z=this.getFoldLine(ee,Z),Z?(G=[],Z.walk((function(ce,ne,he,ue){var le;if(ce!=null){le=this.$getDisplayTokens(ce,G.length),le[0]=C;for(var me=1;me<le.length;me++)le[me]=w}else le=this.$getDisplayTokens(S[ne].substring(ue,he),G.length);G=G.concat(le)}).bind(this),Z.end.row,S[Z.end.row].length+1),B[Z.start.row]=this.$computeWrapSplits(G,V,N),ee=Z.end.row+1):(G=this.$getDisplayTokens(S[ee]),B[ee]=this.$computeWrapSplits(G,V,N),ee++)},F.prototype.$computeWrapSplits=function(O,A,S){if(O.length==0)return[];var N=[],B=O.length,V=0,G=0,Z=this.$wrapAsCode,ee=this.$indentedSoftWrap,ce=A<=Math.max(2*S,8)||ee===!1?0:Math.floor(A/2);function ne(){var _e=0;if(ce===0)return _e;if(ee)for(var Ae=0;Ae<O.length;Ae++){var Me=O[Ae];if(Me==D)_e+=1;else if(Me==I)_e+=S;else{if(Me==L)continue;break}}return Z&&ee!==!1&&(_e+=S),Math.min(_e,ce)}function he(_e){for(var Ae=_e-V,Me=V;Me<_e;Me++){var qe=O[Me];(qe===12||qe===2)&&(Ae-=1)}N.length||(ue=ne(),N.indent=ue),G+=Ae,N.push(G),V=_e}for(var ue=0;B-V>A-ue;){var le=V+A-ue;if(O[le-1]>=D&&O[le]>=D){he(le);continue}if(O[le]==C||O[le]==w){for(le;le!=V-1&&O[le]!=C;le--);if(le>V){he(le);continue}for(le=V+A,le;le<O.length&&O[le]==w;le++);if(le==O.length)break;he(le);continue}for(var me=Math.max(le-(A-(A>>2)),V-1);le>me&&O[le]<C;)le--;if(Z){for(;le>me&&O[le]<C;)le--;for(;le>me&&O[le]==E;)le--}else for(;le>me&&O[le]<D;)le--;if(le>me){he(++le);continue}le=V+A,O[le]==T&&le--,he(le-ue)}return N},F.prototype.$getDisplayTokens=function(O,A){var S=[],N;A=A||0;for(var B=0;B<O.length;B++){var V=O.charCodeAt(B);if(V==9){N=this.getScreenTabSize(S.length+A),S.push(I);for(var G=1;G<N;G++)S.push(L)}else V==32?S.push(D):V>39&&V<48||V>57&&V<64?S.push(E):V>=4352&&z(V)?S.push(R,T):S.push(R)}return S},F.prototype.$getStringScreenWidth=function(O,A,S){if(A==0)return[0,0];A==null&&(A=1/0),S=S||0;var N,B;for(B=0;B<O.length&&(N=O.charCodeAt(B),N==9?S+=this.getScreenTabSize(S):N>=4352&&z(N)?S+=2:S+=1,!(S>A));B++);return[S,B]},F.prototype.getRowLength=function(O){var A=1;return this.lineWidgets&&(A+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?A:this.$wrapData[O].length+A},F.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},F.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var A=this.screenToDocumentPosition(O,Number.MAX_VALUE),S=this.$wrapData[A.row];return S.length&&S[0]<A.column?S.indent:0}else return 0},F.prototype.getScreenLastRowColumn=function(O){var A=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(A.row,A.column)},F.prototype.getDocumentLastRowColumn=function(O,A){var S=this.documentToScreenRow(O,A);return this.getScreenLastRowColumn(S)},F.prototype.getDocumentLastRowColumnPosition=function(O,A){var S=this.documentToScreenRow(O,A);return this.screenToDocumentPosition(S,Number.MAX_VALUE/10)},F.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},F.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},F.prototype.screenToDocumentRow=function(O,A){return this.screenToDocumentPosition(O,A).row},F.prototype.screenToDocumentColumn=function(O,A){return this.screenToDocumentPosition(O,A).column},F.prototype.screenToDocumentPosition=function(O,A,S){if(O<0)return{row:0,column:0};var N,B=0,V=0,G,Z=0,ee=0,ce=this.$screenRowCache,ne=this.$getRowCacheIndex(ce,O),he=ce.length;if(he&&ne>=0)var Z=ce[ne],B=this.$docRowCache[ne],ue=O>ce[he-1];else var ue=!he;for(var le=this.getLength()-1,me=this.getNextFoldLine(B),_e=me?me.start.row:1/0;Z<=O&&(ee=this.getRowLength(B),!(Z+ee>O||B>=le));)Z+=ee,B++,B>_e&&(B=me.end.row+1,me=this.getNextFoldLine(B,me),_e=me?me.start.row:1/0),ue&&(this.$docRowCache.push(B),this.$screenRowCache.push(Z));if(me&&me.start.row<=B)N=this.getFoldDisplayLine(me),B=me.start.row;else{if(Z+ee<=O||B>le)return{row:le,column:this.getLine(le).length};N=this.getLine(B),me=null}var Ae=0,Me=Math.floor(O-Z);if(this.$useWrapMode){var qe=this.$wrapData[B];qe&&(G=qe[Me],Me>0&&qe.length&&(Ae=qe.indent,V=qe[Me-1]||qe[qe.length-1],N=N.substring(V)))}return S!==void 0&&this.$bidiHandler.isBidiRow(Z+Me,B,Me)&&(A=this.$bidiHandler.offsetToCol(S)),V+=this.$getStringScreenWidth(N,A-Ae)[1],this.$useWrapMode&&V>=G&&(V=G-1),me?me.idxToPosition(V):{row:B,column:V}},F.prototype.documentToScreenPosition=function(O,A){if(typeof A>"u")var S=this.$clipPositionToDocument(O.row,O.column);else S=this.$clipPositionToDocument(O,A);O=S.row,A=S.column;var N=0,B=null,V=null;V=this.getFoldAt(O,A,1),V&&(O=V.start.row,A=V.start.column);var G,Z=0,ee=this.$docRowCache,ce=this.$getRowCacheIndex(ee,O),ne=ee.length;if(ne&&ce>=0)var Z=ee[ce],N=this.$screenRowCache[ce],he=O>ee[ne-1];else var he=!ne;for(var ue=this.getNextFoldLine(Z),le=ue?ue.start.row:1/0;Z<O;){if(Z>=le){if(G=ue.end.row+1,G>O)break;ue=this.getNextFoldLine(G,ue),le=ue?ue.start.row:1/0}else G=Z+1;N+=this.getRowLength(Z),Z=G,he&&(this.$docRowCache.push(Z),this.$screenRowCache.push(N))}var me="";ue&&Z>=le?(me=this.getFoldDisplayLine(ue,O,A),B=ue.start.row):(me=this.getLine(O).substring(0,A),B=O);var _e=0;if(this.$useWrapMode){var Ae=this.$wrapData[B];if(Ae){for(var Me=0;me.length>=Ae[Me];)N++,Me++;me=me.substring(Ae[Me-1]||0,me.length),_e=Me>0?Ae.indent:0}}return this.lineWidgets&&this.lineWidgets[Z]&&this.lineWidgets[Z].rowsAbove&&(N+=this.lineWidgets[Z].rowsAbove),{row:N,column:_e+this.$getStringScreenWidth(me)[0]}},F.prototype.documentToScreenColumn=function(O,A){return this.documentToScreenPosition(O,A).column},F.prototype.documentToScreenRow=function(O,A){return this.documentToScreenPosition(O,A).row},F.prototype.getScreenLength=function(){var O=0,A=null;if(this.$useWrapMode)for(var B=this.$wrapData.length,V=0,N=0,A=this.$foldData[N++],G=A?A.start.row:1/0;V<B;){var Z=this.$wrapData[V];O+=Z?Z.length+1:1,V++,V>G&&(V=A.end.row+1,A=this.$foldData[N++],G=A?A.start.row:1/0)}else{O=this.getLength();for(var S=this.$foldData,N=0;N<S.length;N++)A=S[N],O-=A.end.row-A.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},F.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(A,S,N){if(S===0)return[0,0];S||(S=1/0),N=N||0;var B,V;for(V=0;V<A.length&&(B=A.charAt(V),B===" "?N+=this.getScreenTabSize(N):N+=O.getCharacterWidth(B),!(N>S));V++);return[N,V]})},F.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var A=this.getLine(O.row);return A[O.column-1]},F.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},F}();y.$uid=0,y.prototype.$modes=p.$modes,y.prototype.getValue=y.prototype.toString,y.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},y.prototype.$overwrite=!1,y.prototype.$mode=null,y.prototype.$modeId=null,y.prototype.$scrollTop=0,y.prototype.$scrollLeft=0,y.prototype.$wrapLimit=80,y.prototype.$useWrapMode=!1,y.prototype.$wrapLimitRange={min:null,max:null},y.prototype.lineWidgets=null,y.prototype.isFullWidth=z,b.implement(y.prototype,d);var R=1,T=2,C=3,w=4,E=9,D=10,I=11,L=12;function z(F){return F<4352?!1:F>=4352&&F<=4447||F>=4515&&F<=4519||F>=4602&&F<=4607||F>=9001&&F<=9002||F>=11904&&F<=11929||F>=11931&&F<=12019||F>=12032&&F<=12245||F>=12272&&F<=12283||F>=12288&&F<=12350||F>=12353&&F<=12438||F>=12441&&F<=12543||F>=12549&&F<=12589||F>=12593&&F<=12686||F>=12688&&F<=12730||F>=12736&&F<=12771||F>=12784&&F<=12830||F>=12832&&F<=12871||F>=12880&&F<=13054||F>=13056&&F<=19903||F>=19968&&F<=42124||F>=42128&&F<=42182||F>=43360&&F<=43388||F>=44032&&F<=55203||F>=55216&&F<=55238||F>=55243&&F<=55291||F>=63744&&F<=64255||F>=65040&&F<=65049||F>=65072&&F<=65106||F>=65108&&F<=65126||F>=65128&&F<=65131||F>=65281&&F<=65376||F>=65504&&F<=65510}e("./edit_session/folding").Folding.call(y.prototype),e("./edit_session/bracket_match").BracketMatch.call(y.prototype),p.defineOptions(y.prototype,"session",{wrap:{set:function(F){if(!F||F=="off"?F=!1:F=="free"?F=!0:F=="printMargin"?F=-1:typeof F=="string"&&(F=parseInt(F,10)||!1),this.$wrap!=F)if(this.$wrap=F,!F)this.setUseWrapMode(!1);else{var O=typeof F=="number"?F:null;this.setWrapLimitRange(O,O),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(F){F=F=="auto"?this.$mode.type!="text":F!="text",F!=this.$wrapAsCode&&(this.$wrapAsCode=F,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(F){this.$useWorker=F,this.$stopWorker(),F&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(F){F=parseInt(F),F>0&&this.$tabSize!==F&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=F,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(F){this.setFoldStyle(F)},handlesSet:!0},overwrite:{set:function(F){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(F){this.doc.setNewLineMode(F)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(F){this.setMode(F)},get:function(){return this.$modeId},handlesSet:!0}}),u.EditSession=y}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,u,$){var b=e("./lib/lang"),v=e("./lib/oop"),x=e("./range").Range,p=function(){function s(){this.$options={}}return s.prototype.set=function(r){return v.mixin(this.$options,r),this},s.prototype.getOptions=function(){return b.copyObject(this.$options)},s.prototype.setOptions=function(r){this.$options=r},s.prototype.find=function(r){var n=this.$options,i=this.$matchIterator(r,n);if(!i)return!1;var h=null;return i.forEach(function(m,y,R,T){return h=new x(m,y,R,T),y==T&&n.start&&n.start.start&&n.skipCurrent!=!1&&h.isEqual(n.start)?(h=null,!1):!0}),h},s.prototype.findAll=function(r){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var i=n.range,h=i?r.getLines(i.start.row,i.end.row):r.doc.getAllLines(),m=[],y=n.re;if(n.$isMultiLine){var R=y.length,T=h.length-R,C;e:for(var w=y.offset||0;w<=T;w++){for(var E=0;E<R;E++)if(h[w+E].search(y[E])==-1)continue e;var D=h[w],I=h[w+R-1],L=D.length-D.match(y[0])[0].length,z=I.match(y[R-1])[0].length;C&&C.end.row===w&&C.end.column>L||(m.push(C=new x(w,L,w+R-1,z)),R>2&&(w=w+R-2))}}else for(var F,O=0;O<h.length;O++)if(this.$isMultilineSearch(n)){var A=h.length-1;if(F=this.$multiLineForward(r,y,O,A),F){var S=F.endRow<=A?F.endRow-1:A;S>O&&(O=S),m.push(new x(F.startRow,F.startCol,F.endRow,F.endCol))}}else{F=b.getMatchOffsets(h[O],y);for(var E=0;E<F.length;E++){var N=F[E];m.push(new x(O,N.offset,O,N.offset+N.length))}}if(i){for(var B=i.start.column,V=i.end.column,O=0,E=m.length-1;O<E&&m[O].start.column<B&&m[O].start.row==0;)O++;for(var G=i.end.row-i.start.row;O<E&&m[E].end.column>V&&m[E].end.row==G;)E--;for(m=m.slice(O,E+1),O=0,E=m.length;O<E;O++)m[O].start.row+=i.start.row,m[O].end.row+=i.start.row}return m},s.prototype.parseReplaceString=function(r){for(var n={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},i="",h=0,m=r.length;h<m;h++){var y=r.charCodeAt(h);if(y===n.Backslash){if(h++,h>=m){i+="\\";break}var R=r.charCodeAt(h);switch(R){case n.Backslash:i+="\\";break;case n.n:i+=`
|
|
197
|
+
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new i(new a().getTokenizer(),this);var S=this;this.bgTokenizer.on("update",function(N){S._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new n(O)),this.setDocument(O),this.selection=new o(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new x(this),p.resetOptions(this),this.setMode(A),p._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return F.prototype.$initOperationListeners=function(){var O=this;this.curOp=null,this.on("change",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.docChanged=!0},!0),this.on("changeSelection",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.selectionChanged=!0},!0),this.$operationResetTimer=v.delayedCall(this.endOperation.bind(this,!0))},F.prototype.startOperation=function(O){if(this.curOp){if(!O||this.curOp.command)return;this.prevOp=this.curOp}O||(O={}),this.$operationResetTimer.schedule(),this.curOp={command:O.command||{},args:O.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",O)},F.prototype.endOperation=function(O){if(this.curOp){if(O&&O.returnValue===!1){this.curOp=null,this._signal("endOperation",O);return}if(O==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var A=this.selection.toJSON();this.curOp.selectionAfter=A,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(A),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},F.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},F.prototype.getDocument=function(){return this.doc},Object.defineProperty(F.prototype,"widgetManager",{get:function(){var O=new r(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),F.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var A=this.$docRowCache.length,S=this.$getRowCacheIndex(this.$docRowCache,O)+1;A>S&&(this.$docRowCache.splice(S,A),this.$screenRowCache.splice(S,A))},F.prototype.$getRowCacheIndex=function(O,A){for(var S=0,N=O.length-1;S<=N;){var W=S+N>>1,V=O[W];if(A>V)S=W+1;else if(A<V)N=W-1;else return W}return S-1},F.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},F.prototype.onChangeFold=function(O){var A=O.data;this.$resetRowCache(A.start.row)},F.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var A=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(A&&A.length&&(this.$undoManager.add({action:"removeFolds",folds:A},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(O,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(O),this._signal("change",O)},F.prototype.onSelectionChange=function(){this._signal("changeSelection")},F.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},F.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var A=new m;A.$undoStack=O.history.undo,A.$redoStack=O.history.redo,A.mark=O.history.mark,A.$rev=O.history.rev;var S=new F(O.value);return O.folds.forEach(function(N){S.addFold("...",s.fromPoints(N.start,N.end))}),S.setAnnotations(O.annotations),S.setBreakpoints(O.breakpoints),S.setMode(O.mode),S.setScrollLeft(O.scrollLeft),S.setScrollTop(O.scrollTop),S.setUndoManager(A),S.selection.fromJSON(O.selection),S},F.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(O){return O.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},F.prototype.toString=function(){return this.doc.getValue()},F.prototype.getSelection=function(){return this.selection},F.prototype.getState=function(O){return this.bgTokenizer.getState(O)},F.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},F.prototype.getTokenAt=function(O,A){var S=this.bgTokenizer.getTokens(O),N,W=0;if(A==null){var V=S.length-1;W=this.getLine(O).length}else for(var V=0;V<S.length&&(W+=S[V].value.length,!(W>=A));V++);return N=S[V],N?(N.index=V,N.start=W-N.value.length,N):null},F.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var A=this;O.addSession(this),this.$syncInformUndoManager=function(){A.$informUndoManager.cancel(),A.mergeUndoDeltas=!1},this.$informUndoManager=v.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},F.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},F.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},F.prototype.getTabString=function(){return this.getUseSoftTabs()?v.stringRepeat(" ",this.getTabSize()):" "},F.prototype.setUseSoftTabs=function(O){this.setOption("useSoftTabs",O)},F.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},F.prototype.setTabSize=function(O){this.setOption("tabSize",O)},F.prototype.getTabSize=function(){return this.$tabSize},F.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},F.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},F.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},F.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},F.prototype.getOverwrite=function(){return this.$overwrite},F.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},F.prototype.addGutterDecoration=function(O,A){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+A,this._signal("changeBreakpoint",{})},F.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},F.prototype.addGutterCustomWidget=function(O,A){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,A)},F.prototype.removeGutterDecoration=function(O,A){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+A,""),this._signal("changeBreakpoint",{})},F.prototype.getBreakpoints=function(){return this.$breakpoints},F.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var A=0;A<O.length;A++)this.$breakpoints[O[A]]="ace_breakpoint";this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},F.prototype.setBreakpoint=function(O,A){A===void 0&&(A="ace_breakpoint"),A?this.$breakpoints[O]=A:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},F.prototype.addMarker=function(O,A,S,N){var W=this.$markerId++,V={range:O,type:S||"line",renderer:typeof S=="function"?S:null,clazz:A,inFront:!!N,id:W};return N?(this.$frontMarkers[W]=V,this._signal("changeFrontMarker")):(this.$backMarkers[W]=V,this._signal("changeBackMarker")),W},F.prototype.addDynamicMarker=function(O,A){if(O.update){var S=this.$markerId++;return O.id=S,O.inFront=!!A,A?(this.$frontMarkers[S]=O,this._signal("changeFrontMarker")):(this.$backMarkers[S]=O,this._signal("changeBackMarker")),O}},F.prototype.removeMarker=function(O){var A=this.$frontMarkers[O]||this.$backMarkers[O];if(A){var S=A.inFront?this.$frontMarkers:this.$backMarkers;delete S[O],this._signal(A.inFront?"changeFrontMarker":"changeBackMarker")}},F.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},F.prototype.highlight=function(O){if(!this.$searchHighlight){var A=new h(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(A)}this.$searchHighlight.setRegexp(O)},F.prototype.highlightLines=function(O,A,S,N){typeof A!="number"&&(S=A,A=O),S||(S="ace_step");var W=new s(O,0,A,1/0);return W.id=this.addMarker(W,S,"fullLine",N),W},F.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},F.prototype.getAnnotations=function(){return this.$annotations||[]},F.prototype.clearAnnotations=function(){this.setAnnotations([])},F.prototype.$detectNewLine=function(O){var A=O.match(/^.*?(\r?\n)/m);A?this.$autoNewLine=A[1]:this.$autoNewLine=`
|
|
198
|
+
`},F.prototype.getWordRange=function(O,A){var S=this.getLine(O),N=!1;if(A>0&&(N=!!S.charAt(A-1).match(this.tokenRe)),N||(N=!!S.charAt(A).match(this.tokenRe)),N)var W=this.tokenRe;else if(/^\s+$/.test(S.slice(A-1,A+1)))var W=/\s/;else var W=this.nonTokenRe;var V=A;if(V>0){do V--;while(V>=0&&S.charAt(V).match(W));V++}for(var G=A;G<S.length&&S.charAt(G).match(W);)G++;return new s(O,V,O,G)},F.prototype.getAWordRange=function(O,A){for(var S=this.getWordRange(O,A),N=this.getLine(S.end.row);N.charAt(S.end.column).match(/[ \t]/);)S.end.column+=1;return S},F.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},F.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},F.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},F.prototype.getUseWorker=function(){return this.$useWorker},F.prototype.onReloadTokenizer=function(O){var A=O.data;this.bgTokenizer.start(A.first),this._signal("tokenizerUpdate",O)},F.prototype.setMode=function(O,A){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var S=O,N=S.path}else N=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[N]&&!S){this.$onChangeMode(this.$modes[N]),A&&A();return}this.$modeId=N,p.loadModule(["mode",N],(function(W){if(!this.destroyed){if(this.$modeId!==N)return A&&A();this.$modes[N]&&!S?this.$onChangeMode(this.$modes[N]):W&&W.Mode&&(W=new W.Mode(S),S||(this.$modes[N]=W,W.$id=N),this.$onChangeMode(W)),A&&A()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},F.prototype.$onChangeMode=function(O,A){if(A||(this.$modeId=O.$id),this.$mode!==O){var S=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=O.getTokenizer();if(N.on!==void 0){var W=this.onReloadTokenizer.bind(this);N.on("update",W)}this.bgTokenizer.setTokenizer(N),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,A||(O.attachToSession&&O.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(O.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:S,mode:O}))}},F.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},F.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){p.warn("Could not load worker",O),this.$worker=null}},F.prototype.getMode=function(){return this.$mode},F.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},F.prototype.getScrollTop=function(){return this.$scrollTop},F.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},F.prototype.getScrollLeft=function(){return this.$scrollLeft},F.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},F.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var O=0;return this.lineWidgets.forEach(function(A){A&&A.screenWidth>O&&(O=A.screenWidth)}),this.lineWidgetWidth=O},F.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var A=this.doc.getAllLines(),S=this.$rowLengthCache,N=0,W=0,V=this.$foldData[W],G=V?V.start.row:1/0,Z=A.length,ee=0;ee<Z;ee++){if(ee>G){if(ee=V.end.row+1,ee>=Z)break;V=this.$foldData[W++],G=V?V.start.row:1/0}S[ee]==null&&(S[ee]=this.$getStringScreenWidth(A[ee])[0]),S[ee]>N&&(N=S[ee])}this.screenWidth=N}},F.prototype.getLine=function(O){return this.doc.getLine(O)},F.prototype.getLines=function(O,A){return this.doc.getLines(O,A)},F.prototype.getLength=function(){return this.doc.getLength()},F.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},F.prototype.insert=function(O,A){return this.doc.insert(O,A)},F.prototype.remove=function(O){return this.doc.remove(O)},F.prototype.removeFullLines=function(O,A){return this.doc.removeFullLines(O,A)},F.prototype.undoChanges=function(O,A){if(O.length){this.$fromUndo=!0;for(var S=O.length-1;S!=-1;S--){var N=O[S];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!A&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},F.prototype.redoChanges=function(O,A){if(O.length){this.$fromUndo=!0;for(var S=0;S<O.length;S++){var N=O[S];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!A&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},F.prototype.setUndoSelect=function(O){this.$undoSelect=O},F.prototype.$getUndoSelection=function(O,A){function S(Z){return A?Z.action!=="insert":Z.action==="insert"}for(var N,W,V=0;V<O.length;V++){var G=O[V];if(G.start){if(!N){S(G)?N=s.fromPoints(G.start,G.end):N=s.fromPoints(G.start,G.start);continue}S(G)?(W=G.start,N.compare(W.row,W.column)==-1&&N.setStart(W),W=G.end,N.compare(W.row,W.column)==1&&N.setEnd(W)):(W=G.start,N.compare(W.row,W.column)==-1&&(N=s.fromPoints(G.start,G.start)))}}return N},F.prototype.replace=function(O,A){return this.doc.replace(O,A)},F.prototype.moveText=function(O,A,S){var N=this.getTextRange(O),W=this.getFoldsInRange(O),V=s.fromPoints(A,A);if(!S){this.remove(O);var G=O.start.row-O.end.row,Z=G?-O.end.column:O.start.column-O.end.column;Z&&(V.start.row==O.end.row&&V.start.column>O.end.column&&(V.start.column+=Z),V.end.row==O.end.row&&V.end.column>O.end.column&&(V.end.column+=Z)),G&&V.start.row>=O.end.row&&(V.start.row+=G,V.end.row+=G)}if(V.end=this.insert(V.start,N),W.length){var ee=O.start,ce=V.start,G=ce.row-ee.row,Z=ce.column-ee.column;this.addFolds(W.map(function(ue){return ue=ue.clone(),ue.start.row==ee.row&&(ue.start.column+=Z),ue.end.row==ee.row&&(ue.end.column+=Z),ue.start.row+=G,ue.end.row+=G,ue}))}return V},F.prototype.indentRows=function(O,A,S){S=S.replace(/\t/g,this.getTabString());for(var N=O;N<=A;N++)this.doc.insertInLine({row:N,column:0},S)},F.prototype.outdentRows=function(O){for(var A=O.collapseRows(),S=new s(0,0,0,0),N=this.getTabSize(),W=A.start.row;W<=A.end.row;++W){var V=this.getLine(W);S.start.row=W,S.end.row=W;for(var G=0;G<N&&V.charAt(G)==" ";++G);G<N&&V.charAt(G)==" "?(S.start.column=G,S.end.column=G+1):(S.start.column=0,S.end.column=G),this.remove(S)}},F.prototype.$moveLines=function(O,A,S){if(O=this.getRowFoldStart(O),A=this.getRowFoldEnd(A),S<0){var N=this.getRowFoldStart(O+S);if(N<0)return 0;var W=N-O}else if(S>0){var N=this.getRowFoldEnd(A+S);if(N>this.doc.getLength()-1)return 0;var W=N-A}else{O=this.$clipRowToDocument(O),A=this.$clipRowToDocument(A);var W=A-O+1}var V=new s(O,0,A,Number.MAX_VALUE),G=this.getFoldsInRange(V).map(function(ee){return ee=ee.clone(),ee.start.row+=W,ee.end.row+=W,ee}),Z=S==0?this.doc.getLines(O,A):this.doc.removeFullLines(O,A);return this.doc.insertFullLines(O+W,Z),G.length&&this.addFolds(G),W},F.prototype.moveLinesUp=function(O,A){return this.$moveLines(O,A,-1)},F.prototype.moveLinesDown=function(O,A){return this.$moveLines(O,A,1)},F.prototype.duplicateLines=function(O,A){return this.$moveLines(O,A,0)},F.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},F.prototype.$clipColumnToRow=function(O,A){return A<0?0:Math.min(this.doc.getLine(O).length,A)},F.prototype.$clipPositionToDocument=function(O,A){if(A=Math.max(0,A),O<0)O=0,A=0;else{var S=this.doc.getLength();O>=S?(O=S-1,A=this.doc.getLine(S-1).length):A=Math.min(this.doc.getLine(O).length,A)}return{row:O,column:A}},F.prototype.$clipRangeToDocument=function(O){O.start.row<0?(O.start.row=0,O.start.column=0):O.start.column=this.$clipColumnToRow(O.start.row,O.start.column);var A=this.doc.getLength()-1;return O.end.row>A?(O.end.row=A,O.end.column=this.doc.getLine(A).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},F.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var A=this.getLength();this.$wrapData=Array(A),this.$updateWrapData(0,A-1)}this._signal("changeWrapMode")}},F.prototype.getUseWrapMode=function(){return this.$useWrapMode},F.prototype.setWrapLimitRange=function(O,A){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==A)&&(this.$wrapLimitRange={min:O,max:A},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},F.prototype.adjustWrapLimit=function(O,A){var S=this.$wrapLimitRange;S.max<0&&(S={min:A,max:A});var N=this.$constrainWrapLimit(O,S.min,S.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},F.prototype.$constrainWrapLimit=function(O,A,S){return A&&(O=Math.max(A,O)),S&&(O=Math.min(S,O)),O},F.prototype.getWrapLimit=function(){return this.$wrapLimit},F.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},F.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},F.prototype.$updateInternalDataOnChange=function(O){var A=this.$useWrapMode,S=O.action,N=O.start,W=O.end,V=N.row,G=W.row,Z=G-V,ee=null;if(this.$updating=!0,Z!=0)if(S==="remove"){this[A?"$wrapData":"$rowLengthCache"].splice(V,Z);var ce=this.$foldData;ee=this.getFoldsInRange(O),this.removeFolds(ee);var ne=this.getFoldLine(W.row),he=0;if(ne){ne.addRemoveChars(W.row,W.column,N.column-W.column),ne.shiftRow(-Z);var ue=this.getFoldLine(V);ue&&ue!==ne&&(ue.merge(ne),ne=ue),he=ce.indexOf(ne)+1}for(he;he<ce.length;he++){var ne=ce[he];ne.start.row>=W.row&&ne.shiftRow(-Z)}G=V}else{var le=Array(Z);le.unshift(V,0);var me=A?this.$wrapData:this.$rowLengthCache;me.splice.apply(me,le);var ce=this.$foldData,ne=this.getFoldLine(V),he=0;if(ne){var _e=ne.range.compareInside(N.row,N.column);_e==0?(ne=ne.split(N.row,N.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(G,0,W.column-N.column))):_e==-1&&(ne.addRemoveChars(V,0,W.column-N.column),ne.shiftRow(Z)),he=ce.indexOf(ne)+1}for(he;he<ce.length;he++){var ne=ce[he];ne.start.row>=V&&ne.shiftRow(Z)}}else{Z=Math.abs(O.start.column-O.end.column),S==="remove"&&(ee=this.getFoldsInRange(O),this.removeFolds(ee),Z=-Z);var ne=this.getFoldLine(V);ne&&ne.addRemoveChars(V,N.column,Z)}return A&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,A?this.$updateWrapData(V,G):this.$updateRowLengthCache(V,G),ee},F.prototype.$updateRowLengthCache=function(O,A){this.$rowLengthCache[O]=null,this.$rowLengthCache[A]=null},F.prototype.$updateWrapData=function(O,A){var S=this.doc.getAllLines(),N=this.getTabSize(),W=this.$wrapData,V=this.$wrapLimit,G,Z,ee=O;for(A=Math.min(A,S.length-1);ee<=A;)Z=this.getFoldLine(ee,Z),Z?(G=[],Z.walk((function(ce,ne,he,ue){var le;if(ce!=null){le=this.$getDisplayTokens(ce,G.length),le[0]=C;for(var me=1;me<le.length;me++)le[me]=w}else le=this.$getDisplayTokens(S[ne].substring(ue,he),G.length);G=G.concat(le)}).bind(this),Z.end.row,S[Z.end.row].length+1),W[Z.start.row]=this.$computeWrapSplits(G,V,N),ee=Z.end.row+1):(G=this.$getDisplayTokens(S[ee]),W[ee]=this.$computeWrapSplits(G,V,N),ee++)},F.prototype.$computeWrapSplits=function(O,A,S){if(O.length==0)return[];var N=[],W=O.length,V=0,G=0,Z=this.$wrapAsCode,ee=this.$indentedSoftWrap,ce=A<=Math.max(2*S,8)||ee===!1?0:Math.floor(A/2);function ne(){var _e=0;if(ce===0)return _e;if(ee)for(var Ae=0;Ae<O.length;Ae++){var Me=O[Ae];if(Me==D)_e+=1;else if(Me==I)_e+=S;else{if(Me==L)continue;break}}return Z&&ee!==!1&&(_e+=S),Math.min(_e,ce)}function he(_e){for(var Ae=_e-V,Me=V;Me<_e;Me++){var qe=O[Me];(qe===12||qe===2)&&(Ae-=1)}N.length||(ue=ne(),N.indent=ue),G+=Ae,N.push(G),V=_e}for(var ue=0;W-V>A-ue;){var le=V+A-ue;if(O[le-1]>=D&&O[le]>=D){he(le);continue}if(O[le]==C||O[le]==w){for(le;le!=V-1&&O[le]!=C;le--);if(le>V){he(le);continue}for(le=V+A,le;le<O.length&&O[le]==w;le++);if(le==O.length)break;he(le);continue}for(var me=Math.max(le-(A-(A>>2)),V-1);le>me&&O[le]<C;)le--;if(Z){for(;le>me&&O[le]<C;)le--;for(;le>me&&O[le]==E;)le--}else for(;le>me&&O[le]<D;)le--;if(le>me){he(++le);continue}le=V+A,O[le]==T&&le--,he(le-ue)}return N},F.prototype.$getDisplayTokens=function(O,A){var S=[],N;A=A||0;for(var W=0;W<O.length;W++){var V=O.charCodeAt(W);if(V==9){N=this.getScreenTabSize(S.length+A),S.push(I);for(var G=1;G<N;G++)S.push(L)}else V==32?S.push(D):V>39&&V<48||V>57&&V<64?S.push(E):V>=4352&&z(V)?S.push(R,T):S.push(R)}return S},F.prototype.$getStringScreenWidth=function(O,A,S){if(A==0)return[0,0];A==null&&(A=1/0),S=S||0;var N,W;for(W=0;W<O.length&&(N=O.charCodeAt(W),N==9?S+=this.getScreenTabSize(S):N>=4352&&z(N)?S+=2:S+=1,!(S>A));W++);return[S,W]},F.prototype.getRowLength=function(O){var A=1;return this.lineWidgets&&(A+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?A:this.$wrapData[O].length+A},F.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},F.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var A=this.screenToDocumentPosition(O,Number.MAX_VALUE),S=this.$wrapData[A.row];return S.length&&S[0]<A.column?S.indent:0}else return 0},F.prototype.getScreenLastRowColumn=function(O){var A=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(A.row,A.column)},F.prototype.getDocumentLastRowColumn=function(O,A){var S=this.documentToScreenRow(O,A);return this.getScreenLastRowColumn(S)},F.prototype.getDocumentLastRowColumnPosition=function(O,A){var S=this.documentToScreenRow(O,A);return this.screenToDocumentPosition(S,Number.MAX_VALUE/10)},F.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},F.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},F.prototype.screenToDocumentRow=function(O,A){return this.screenToDocumentPosition(O,A).row},F.prototype.screenToDocumentColumn=function(O,A){return this.screenToDocumentPosition(O,A).column},F.prototype.screenToDocumentPosition=function(O,A,S){if(O<0)return{row:0,column:0};var N,W=0,V=0,G,Z=0,ee=0,ce=this.$screenRowCache,ne=this.$getRowCacheIndex(ce,O),he=ce.length;if(he&&ne>=0)var Z=ce[ne],W=this.$docRowCache[ne],ue=O>ce[he-1];else var ue=!he;for(var le=this.getLength()-1,me=this.getNextFoldLine(W),_e=me?me.start.row:1/0;Z<=O&&(ee=this.getRowLength(W),!(Z+ee>O||W>=le));)Z+=ee,W++,W>_e&&(W=me.end.row+1,me=this.getNextFoldLine(W,me),_e=me?me.start.row:1/0),ue&&(this.$docRowCache.push(W),this.$screenRowCache.push(Z));if(me&&me.start.row<=W)N=this.getFoldDisplayLine(me),W=me.start.row;else{if(Z+ee<=O||W>le)return{row:le,column:this.getLine(le).length};N=this.getLine(W),me=null}var Ae=0,Me=Math.floor(O-Z);if(this.$useWrapMode){var qe=this.$wrapData[W];qe&&(G=qe[Me],Me>0&&qe.length&&(Ae=qe.indent,V=qe[Me-1]||qe[qe.length-1],N=N.substring(V)))}return S!==void 0&&this.$bidiHandler.isBidiRow(Z+Me,W,Me)&&(A=this.$bidiHandler.offsetToCol(S)),V+=this.$getStringScreenWidth(N,A-Ae)[1],this.$useWrapMode&&V>=G&&(V=G-1),me?me.idxToPosition(V):{row:W,column:V}},F.prototype.documentToScreenPosition=function(O,A){if(typeof A>"u")var S=this.$clipPositionToDocument(O.row,O.column);else S=this.$clipPositionToDocument(O,A);O=S.row,A=S.column;var N=0,W=null,V=null;V=this.getFoldAt(O,A,1),V&&(O=V.start.row,A=V.start.column);var G,Z=0,ee=this.$docRowCache,ce=this.$getRowCacheIndex(ee,O),ne=ee.length;if(ne&&ce>=0)var Z=ee[ce],N=this.$screenRowCache[ce],he=O>ee[ne-1];else var he=!ne;for(var ue=this.getNextFoldLine(Z),le=ue?ue.start.row:1/0;Z<O;){if(Z>=le){if(G=ue.end.row+1,G>O)break;ue=this.getNextFoldLine(G,ue),le=ue?ue.start.row:1/0}else G=Z+1;N+=this.getRowLength(Z),Z=G,he&&(this.$docRowCache.push(Z),this.$screenRowCache.push(N))}var me="";ue&&Z>=le?(me=this.getFoldDisplayLine(ue,O,A),W=ue.start.row):(me=this.getLine(O).substring(0,A),W=O);var _e=0;if(this.$useWrapMode){var Ae=this.$wrapData[W];if(Ae){for(var Me=0;me.length>=Ae[Me];)N++,Me++;me=me.substring(Ae[Me-1]||0,me.length),_e=Me>0?Ae.indent:0}}return this.lineWidgets&&this.lineWidgets[Z]&&this.lineWidgets[Z].rowsAbove&&(N+=this.lineWidgets[Z].rowsAbove),{row:N,column:_e+this.$getStringScreenWidth(me)[0]}},F.prototype.documentToScreenColumn=function(O,A){return this.documentToScreenPosition(O,A).column},F.prototype.documentToScreenRow=function(O,A){return this.documentToScreenPosition(O,A).row},F.prototype.getScreenLength=function(){var O=0,A=null;if(this.$useWrapMode)for(var W=this.$wrapData.length,V=0,N=0,A=this.$foldData[N++],G=A?A.start.row:1/0;V<W;){var Z=this.$wrapData[V];O+=Z?Z.length+1:1,V++,V>G&&(V=A.end.row+1,A=this.$foldData[N++],G=A?A.start.row:1/0)}else{O=this.getLength();for(var S=this.$foldData,N=0;N<S.length;N++)A=S[N],O-=A.end.row-A.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},F.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(A,S,N){if(S===0)return[0,0];S||(S=1/0),N=N||0;var W,V;for(V=0;V<A.length&&(W=A.charAt(V),W===" "?N+=this.getScreenTabSize(N):N+=O.getCharacterWidth(W),!(N>S));V++);return[N,V]})},F.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var A=this.getLine(O.row);return A[O.column-1]},F.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},F}();y.$uid=0,y.prototype.$modes=p.$modes,y.prototype.getValue=y.prototype.toString,y.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},y.prototype.$overwrite=!1,y.prototype.$mode=null,y.prototype.$modeId=null,y.prototype.$scrollTop=0,y.prototype.$scrollLeft=0,y.prototype.$wrapLimit=80,y.prototype.$useWrapMode=!1,y.prototype.$wrapLimitRange={min:null,max:null},y.prototype.lineWidgets=null,y.prototype.isFullWidth=z,b.implement(y.prototype,d);var R=1,T=2,C=3,w=4,E=9,D=10,I=11,L=12;function z(F){return F<4352?!1:F>=4352&&F<=4447||F>=4515&&F<=4519||F>=4602&&F<=4607||F>=9001&&F<=9002||F>=11904&&F<=11929||F>=11931&&F<=12019||F>=12032&&F<=12245||F>=12272&&F<=12283||F>=12288&&F<=12350||F>=12353&&F<=12438||F>=12441&&F<=12543||F>=12549&&F<=12589||F>=12593&&F<=12686||F>=12688&&F<=12730||F>=12736&&F<=12771||F>=12784&&F<=12830||F>=12832&&F<=12871||F>=12880&&F<=13054||F>=13056&&F<=19903||F>=19968&&F<=42124||F>=42128&&F<=42182||F>=43360&&F<=43388||F>=44032&&F<=55203||F>=55216&&F<=55238||F>=55243&&F<=55291||F>=63744&&F<=64255||F>=65040&&F<=65049||F>=65072&&F<=65106||F>=65108&&F<=65126||F>=65128&&F<=65131||F>=65281&&F<=65376||F>=65504&&F<=65510}e("./edit_session/folding").Folding.call(y.prototype),e("./edit_session/bracket_match").BracketMatch.call(y.prototype),p.defineOptions(y.prototype,"session",{wrap:{set:function(F){if(!F||F=="off"?F=!1:F=="free"?F=!0:F=="printMargin"?F=-1:typeof F=="string"&&(F=parseInt(F,10)||!1),this.$wrap!=F)if(this.$wrap=F,!F)this.setUseWrapMode(!1);else{var O=typeof F=="number"?F:null;this.setWrapLimitRange(O,O),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(F){F=F=="auto"?this.$mode.type!="text":F!="text",F!=this.$wrapAsCode&&(this.$wrapAsCode=F,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(F){this.$useWorker=F,this.$stopWorker(),F&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(F){F=parseInt(F),F>0&&this.$tabSize!==F&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=F,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(F){this.setFoldStyle(F)},handlesSet:!0},overwrite:{set:function(F){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(F){this.doc.setNewLineMode(F)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(F){this.setMode(F)},get:function(){return this.$modeId},handlesSet:!0}}),u.EditSession=y}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,u,$){var b=e("./lib/lang"),v=e("./lib/oop"),x=e("./range").Range,p=function(){function s(){this.$options={}}return s.prototype.set=function(r){return v.mixin(this.$options,r),this},s.prototype.getOptions=function(){return b.copyObject(this.$options)},s.prototype.setOptions=function(r){this.$options=r},s.prototype.find=function(r){var n=this.$options,i=this.$matchIterator(r,n);if(!i)return!1;var h=null;return i.forEach(function(m,y,R,T){return h=new x(m,y,R,T),y==T&&n.start&&n.start.start&&n.skipCurrent!=!1&&h.isEqual(n.start)?(h=null,!1):!0}),h},s.prototype.findAll=function(r){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var i=n.range,h=i?r.getLines(i.start.row,i.end.row):r.doc.getAllLines(),m=[],y=n.re;if(n.$isMultiLine){var R=y.length,T=h.length-R,C;e:for(var w=y.offset||0;w<=T;w++){for(var E=0;E<R;E++)if(h[w+E].search(y[E])==-1)continue e;var D=h[w],I=h[w+R-1],L=D.length-D.match(y[0])[0].length,z=I.match(y[R-1])[0].length;C&&C.end.row===w&&C.end.column>L||(m.push(C=new x(w,L,w+R-1,z)),R>2&&(w=w+R-2))}}else for(var F,O=0;O<h.length;O++)if(this.$isMultilineSearch(n)){var A=h.length-1;if(F=this.$multiLineForward(r,y,O,A),F){var S=F.endRow<=A?F.endRow-1:A;S>O&&(O=S),m.push(new x(F.startRow,F.startCol,F.endRow,F.endCol))}}else{F=b.getMatchOffsets(h[O],y);for(var E=0;E<F.length;E++){var N=F[E];m.push(new x(O,N.offset,O,N.offset+N.length))}}if(i){for(var W=i.start.column,V=i.end.column,O=0,E=m.length-1;O<E&&m[O].start.column<W&&m[O].start.row==0;)O++;for(var G=i.end.row-i.start.row;O<E&&m[E].end.column>V&&m[E].end.row==G;)E--;for(m=m.slice(O,E+1),O=0,E=m.length;O<E;O++)m[O].start.row+=i.start.row,m[O].end.row+=i.start.row}return m},s.prototype.parseReplaceString=function(r){for(var n={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},i="",h=0,m=r.length;h<m;h++){var y=r.charCodeAt(h);if(y===n.Backslash){if(h++,h>=m){i+="\\";break}var R=r.charCodeAt(h);switch(R){case n.Backslash:i+="\\";break;case n.n:i+=`
|
|
199
199
|
`;break;case n.t:i+=" ";break}continue}if(y===n.DollarSign){if(h++,h>=m){i+="$";break}var T=r.charCodeAt(h);if(T===n.DollarSign){i+="$$";continue}if(T===n.Digit0||T===n.Ampersand){i+="$&";continue}if(n.Digit1<=T&&T<=n.Digit9){i+="$"+r[h];continue}}i+=r[h]}return i||r},s.prototype.replace=function(r,n){var i=this.$options,h=this.$assembleRegExp(i);if(i.$isMultiLine)return n;if(h){var m=this.$isMultilineSearch(i);m&&(r=r.replace(/\r\n|\r|\n/g,`
|
|
200
200
|
`));var y=h.exec(r);if(!y||!m&&y[0].length!=r.length)return null;if(n=i.regExp?this.parseReplaceString(n):n.replace(/\$/g,"$$$$"),n=r.replace(h,n),i.preserveCase){n=n.split("");for(var R=Math.min(r.length,r.length);R--;){var T=r[R];T&&T.toLowerCase()!=T?n[R]=n[R].toUpperCase():n[R]=n[R].toLowerCase()}n=n.join("")}return n}},s.prototype.$assembleRegExp=function(r,n){if(r.needle instanceof RegExp)return r.re=r.needle;var i=r.needle;if(!r.needle)return r.re=!1;r.regExp||(i=b.escapeRegExp(i));var h=r.caseSensitive?"gm":"gmi";try{new RegExp(i,"u"),r.$supportsUnicodeFlag=!0,h+="u"}catch{r.$supportsUnicodeFlag=!1}if(r.wholeWord&&(i=d(i,r)),r.$isMultiLine=!n&&/[\n\r]/.test(i),r.$isMultiLine)return r.re=this.$assembleMultilineRegExp(i,h);try{var m=new RegExp(i,h)}catch{m=!1}return r.re=m},s.prototype.$assembleMultilineRegExp=function(r,n){for(var i=r.replace(/\r\n|\r|\n/g,`$
|
|
201
201
|
^`).split(`
|
|
@@ -205,14 +205,14 @@
|
|
|
205
205
|
`),I=i+E.length-1,L=E[E.length-1].length,z=I+D.length-1,F=D.length==1?L+D[0].length:D[D.length-1].length;return{startRow:I,startCol:L,endRow:z,endCol:F}}}return null},s.prototype.$multiLineBackward=function(r,n,i,h,m){for(var y,R=a(r,h),T=r.getLine(h).length-i,C=h;C>=m;){for(var w=0;w<R&&C>=m;w++){var E=r.getLine(C--);y=y==null?E:E+`
|
|
206
206
|
`+y}var D=o(y,n,T);if(D){var I=y.slice(0,D.index).split(`
|
|
207
207
|
`),L=D[0].split(`
|
|
208
|
-
`),z=C+I.length,F=I[I.length-1].length,O=z+L.length-1,A=L.length==1?F+L[0].length:L[L.length-1].length;return{startRow:z,startCol:F,endRow:O,endCol:A}}}return null},s.prototype.$matchIterator=function(r,n){var i=this.$assembleRegExp(n);if(!i)return!1;var h=this.$isMultilineSearch(n),m=this.$multiLineForward,y=this.$multiLineBackward,R=n.backwards==!0,T=n.skipCurrent!=!1,C=i.unicode,w=n.range,E=n.start;E||(E=w?w[R?"end":"start"]:r.selection.getRange()),E.start&&(E=E[T!=R?"end":"start"]);var D=w?w.start.row:0,I=w?w.end.row:r.getLength()-1;if(R)var L=function(O){var A=E.row;if(!F(A,E.column,O)){for(A--;A>=D;A--)if(F(A,Number.MAX_VALUE,O))return;if(n.wrap!=!1){for(A=I,D=E.row;A>=D;A--)if(F(A,Number.MAX_VALUE,O))return}}};else var L=function(A){var S=E.row;if(!F(S,E.column,A)){for(S=S+1;S<=I;S++)if(F(S,0,A))return;if(n.wrap!=!1){for(S=D,I=E.row;S<=I;S++)if(F(S,0,A))return}}};if(n.$isMultiLine)var z=i.length,F=function(O,A,S){var N=R?O-z+1:O;if(!(N<0||N+z>r.getLength())){var B=r.getLine(N),V=B.search(i[0]);if(!(!R&&V<A||V===-1)){for(var G=1;G<z;G++)if(B=r.getLine(N+G),B.search(i[G])==-1)return;var Z=B.match(i[z-1])[0].length;if(!(R&&Z>A)&&S(N,V,N+z-1,Z))return!0}}};else if(R)var F=function(A,S,N){if(h){var B=y(r,i,S,A,D);if(!B)return!1;if(N(B.startRow,B.startCol,B.endRow,B.endCol))return!0}else{var V=r.getLine(A),G=[],Z,ee=0;for(i.lastIndex=0;Z=i.exec(V);){var ce=Z[0].length;if(ee=Z.index,!ce){if(ee>=V.length)break;i.lastIndex=ee+=b.skipEmptyMatch(V,ee,C)}if(Z.index+ce>S)break;G.push(Z.index,ce)}for(var ne=G.length-1;ne>=0;ne-=2){var he=G[ne-1],ce=G[ne];if(N(A,he,A,he+ce))return!0}}};else var F=function(A,S,N){if(i.lastIndex=S,h){var B=m(r,i,A,I);if(B){var V=B.endRow<=I?B.endRow-1:I;V>A&&(A=V)}if(!B)return!1;if(N(B.startRow,B.startCol,B.endRow,B.endCol))return!0}else for(var G=r.getLine(A),Z,ee;ee=i.exec(G);){var ce=ee[0].length;if(Z=ee.index,N(A,Z,A,Z+ce))return!0;if(!ce&&(i.lastIndex=Z+=b.skipEmptyMatch(G,Z,C),Z>=G.length))return!1}};return{forEach:L}},s}();function d(s,r){var n=b.supportsLookbehind();function i(R,T){T===void 0&&(T=!0);var C=n&&r.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return C.test(R)||r.regExp?n&&r.$supportsUnicodeFlag?T?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var h=Array.from(s),m=h[0],y=h[h.length-1];return i(m)+s+i(y,!1)}function o(s,r,n){for(var i=null,h=0;h<=s.length;){r.lastIndex=h;var m=r.exec(s);if(!m)break;var y=m.index+m[0].length;if(y>s.length-n)break;(!i||y>i.index+i[0].length)&&(i=m),h=m.index+1}return i}function a(s,r){var n=5e3,i={row:r,column:0},h=s.doc.positionToIndex(i),m=h+n,y=s.doc.indexToPosition(m),R=y.row;return R+1}u.Search=p}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,u,$){var b=this&&this.__extends||function(){var s=function(r,n){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,h){i.__proto__=h}||function(i,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(i[m]=h[m])},s(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");s(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),v=e("../lib/keys"),x=e("../lib/useragent"),p=v.KEY_MODS,d=function(){function s(r,n){this.$init(r,n,!1)}return s.prototype.$init=function(r,n,i){this.platform=n||(x.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(r),this.$singleCommand=i},s.prototype.addCommand=function(r){this.commands[r.name]&&this.removeCommand(r),this.commands[r.name]=r,r.bindKey&&this._buildKeyHash(r)},s.prototype.removeCommand=function(r,n){var i=r&&(typeof r=="string"?r:r.name);r=this.commands[i],n||delete this.commands[i];var h=this.commandKeyBinding;for(var m in h){var y=h[m];if(y==r)delete h[m];else if(Array.isArray(y)){var R=y.indexOf(r);R!=-1&&(y.splice(R,1),y.length==1&&(h[m]=y[0]))}}},s.prototype.bindKey=function(r,n,i){if(typeof r=="object"&&r&&(i==null&&(i=r.position),r=r[this.platform]),!!r){if(typeof n=="function")return this.addCommand({exec:n,bindKey:r,name:n.name||r});r.split("|").forEach(function(h){var m="";if(h.indexOf(" ")!=-1){var y=h.split(/\s+/);h=y.pop(),y.forEach(function(C){var w=this.parseKeys(C),E=p[w.hashId]+w.key;m+=(m?" ":"")+E,this._addCommandToBinding(m,"chainKeys")},this),m+=" "}var R=this.parseKeys(h),T=p[R.hashId]+R.key;this._addCommandToBinding(m+T,n,i)},this)}},s.prototype._addCommandToBinding=function(r,n,i){var h=this.commandKeyBinding,m;if(!n)delete h[r];else if(!h[r]||this.$singleCommand)h[r]=n;else{Array.isArray(h[r])?(m=h[r].indexOf(n))!=-1&&h[r].splice(m,1):h[r]=[h[r]],typeof i!="number"&&(i=o(n));var y=h[r];for(m=0;m<y.length;m++){var R=y[m],T=o(R);if(T>i)break}y.splice(m,0,n)}},s.prototype.addCommands=function(r){r&&Object.keys(r).forEach(function(n){var i=r[n];if(i){if(typeof i=="string")return this.bindKey(i,n);typeof i=="function"&&(i={exec:i}),typeof i=="object"&&(i.name||(i.name=n),this.addCommand(i))}},this)},s.prototype.removeCommands=function(r){Object.keys(r).forEach(function(n){this.removeCommand(r[n])},this)},s.prototype.bindKeys=function(r){Object.keys(r).forEach(function(n){this.bindKey(n,r[n])},this)},s.prototype._buildKeyHash=function(r){this.bindKey(r.bindKey,r)},s.prototype.parseKeys=function(r){var n=r.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(T){return T}),i=n.pop(),h=v[i];if(v.FUNCTION_KEYS[h])i=v.FUNCTION_KEYS[h].toLowerCase();else if(n.length){if(n.length==1&&n[0]=="shift")return{key:i.toUpperCase(),hashId:-1}}else return{key:i,hashId:-1};for(var m=0,y=n.length;y--;){var R=v.KEY_MODS[n[y]];if(R==null)return typeof console<"u"&&console.error("invalid modifier "+n[y]+" in "+r),!1;m|=R}return{key:i,hashId:m}},s.prototype.findKeyCommand=function(r,n){var i=p[r]+n;return this.commandKeyBinding[i]},s.prototype.handleKeyboard=function(r,n,i,h){if(!(h<0)){var m=p[n]+i,y=this.commandKeyBinding[m];return r.$keyChain&&(r.$keyChain+=" "+m,y=this.commandKeyBinding[r.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(r.$keyChain=r.$keyChain||m,{command:"null"}):(r.$keyChain&&((!n||n==4)&&i.length==1?r.$keyChain=r.$keyChain.slice(0,-m.length-1):(n==-1||h>0)&&(r.$keyChain="")),{command:y})}},s.prototype.getStatusText=function(r,n){return n.$keyChain||""},s}();function o(s){return typeof s=="object"&&s.bindKey&&s.bindKey.position||(s.isDefault?-100:0)}var a=function(s){b(r,s);function r(n,i){var h=s.call(this,n,i)||this;return h.$singleCommand=!0,h}return r}(d);a.call=function(s,r,n){d.prototype.$init.call(s,r,n,!0)},d.call=function(s,r,n){d.prototype.$init.call(s,r,n,!1)},u.HashHandler=a,u.MultiHashHandler=d}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,u,$){var b=this&&this.__extends||function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function r(){this.constructor=a}a.prototype=s===null?Object.create(s):(r.prototype=s.prototype,new r)}}(),v=e("../lib/oop"),x=e("../keyboard/hash_handler").MultiHashHandler,p=e("../lib/event_emitter").EventEmitter,d=function(o){b(a,o);function a(s,r){var n=o.call(this,r,s)||this;return n.byName=n.commands,n.setDefaultHandler("exec",function(i){return i.args?i.command.exec(i.editor,i.args,i.event,!1):i.command.exec(i.editor,{},i.event,!0)}),n}return a.prototype.exec=function(s,r,n){if(Array.isArray(s)){for(var i=s.length;i--;)if(this.exec(s[i],r,n))return!0;return!1}typeof s=="string"&&(s=this.commands[s]);var h={editor:r,command:s,args:n};return this.canExecute(s,r)?(h.returnValue=this._emit("exec",h),this._signal("afterExec",h),h.returnValue!==!1):(this._signal("commandUnavailable",h),!1)},a.prototype.canExecute=function(s,r){return typeof s=="string"&&(s=this.commands[s]),!(!s||r&&r.$readOnly&&!s.readOnly||this.$checkCommandState!=!1&&s.isAvailable&&!s.isAvailable(r))},a.prototype.toggleRecording=function(s){if(!this.$inReplay)return s&&s._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(r){this.macro.push([r.command,r.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(s){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(s);try{this.$inReplay=!0,this.macro.forEach(function(r){typeof r=="string"?this.exec(r,s):this.exec(r[0],s,r[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(s){return s.map(function(r){return typeof r[0]!="string"&&(r[0]=r[0].name),r[1]||(r=r[0]),r})},a}(x);v.implement(d.prototype,p),u.CommandManager=d}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,u,$){var b=e("../lib/lang"),v=e("../config"),x=e("../range").Range;function p(o,a){return{win:o,mac:a}}u.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:p("Ctrl-,","Command-,"),exec:function(o){v.loadModule("ace/ext/settings_menu",function(a){a.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:p("Alt-E","F4"),exec:function(o){v.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:p("Alt-Shift-E","Shift-F4"),exec:function(o){v.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:p("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:p(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:p("Ctrl-L","Command-L"),exec:function(o,a){typeof a=="number"&&!isNaN(a)&&o.gotoLine(a),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:p("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:p("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:p("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:p("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:p(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:p(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:p("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:p("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:p("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:p("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:p("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:p("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:p("Ctrl-F","Command-F"),exec:function(o){v.loadModule("ace/ext/searchbox",function(a){a.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:p("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:p("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:p("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:p("Up","Up|Ctrl-P"),exec:function(o,a){o.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:p("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:p("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:p("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:p("Down","Down|Ctrl-N"),exec:function(o,a){o.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:p("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:p("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:p("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:p("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:p("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:p("Left","Left|Ctrl-B"),exec:function(o,a){o.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:p("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:p("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:p("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:p("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:p("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:p("Right","Right|Ctrl-F"),exec:function(o,a){o.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:p(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:p("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:p(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:p("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:p("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:p("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:p("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:p("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:p("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:p("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:p(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var a=o.$copyWithEmptySelection&&o.selection.isEmpty(),s=a?o.selection.getLineRange():o.selection.getRange();o._emit("cut",s),s.isEmpty()||o.session.remove(s),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,a){o.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:p("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:p("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:p("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:p("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:p("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:p("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:p("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:p("Ctrl-H","Command-Option-F"),exec:function(o){v.loadModule("ace/ext/searchbox",function(a){a.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:p("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:p("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:p("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:p("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:p("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:p("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:p("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:p("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:p("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:p("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:p("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:p("Ctrl-Shift-Backspace",null),exec:function(o){var a=o.selection.getRange();a.start.column=0,o.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:p("Ctrl-Shift-Delete",null),exec:function(o){var a=o.selection.getRange();a.end.column=Number.MAX_VALUE,o.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:p("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:p("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:p("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:p("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:p("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:p("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,a){o.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,a){o.insert(b.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:p(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:p("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:p("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:p("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:p(null,null),exec:function(o){o.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:p("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var a=o.selection.getRange();a.start.column=a.end.column=0,a.end.row++,o.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:p("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:p(null,null),exec:function(o){for(var a=o.selection.isBackwards(),s=a?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),r=a?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),n=o.session.doc.getLine(s.row).length,i=o.session.doc.getTextRange(o.selection.getRange()),h=i.replace(/\n\s*/," ").length,m=o.session.doc.getLine(s.row),y=s.row+1;y<=r.row+1;y++){var R=b.stringTrimLeft(b.stringTrimRight(o.session.doc.getLine(y)));R.length!==0&&(R=" "+R),m+=R}r.row+1<o.session.doc.getLength()-1&&(m+=o.session.doc.getNewLineCharacter()),o.clearSelection(),o.session.doc.replace(new x(s.row,0,r.row+2,0),m),h>0?(o.selection.moveCursorTo(s.row,s.column),o.selection.selectTo(s.row,s.column+h)):(n=o.session.doc.getLine(s.row).length>n?n+1:n,o.selection.moveCursorTo(s.row,n))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:p(null,null),exec:function(o){var a=o.session.doc.getLength()-1,s=o.session.doc.getLine(a).length,r=o.selection.rangeList.ranges,n=[];r.length<1&&(r=[o.selection.getRange()]);for(var i=0;i<r.length;i++)i==r.length-1&&(r[i].end.row===a&&r[i].end.column===s||n.push(new x(r[i].end.row,r[i].end.column,a,s))),i===0?r[i].start.row===0&&r[i].start.column===0||n.push(new x(0,0,r[i].start.row,r[i].start.column)):n.push(new x(r[i-1].end.row,r[i-1].end.column,r[i].start.row,r[i].start.column));o.exitMultiSelectMode(),o.clearSelection();for(var i=0;i<n.length;i++)o.selection.addRange(n[i],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(o){o.selection.clearSelection(),o.navigateLineEnd(),o.insert(`
|
|
208
|
+
`),z=C+I.length,F=I[I.length-1].length,O=z+L.length-1,A=L.length==1?F+L[0].length:L[L.length-1].length;return{startRow:z,startCol:F,endRow:O,endCol:A}}}return null},s.prototype.$matchIterator=function(r,n){var i=this.$assembleRegExp(n);if(!i)return!1;var h=this.$isMultilineSearch(n),m=this.$multiLineForward,y=this.$multiLineBackward,R=n.backwards==!0,T=n.skipCurrent!=!1,C=i.unicode,w=n.range,E=n.start;E||(E=w?w[R?"end":"start"]:r.selection.getRange()),E.start&&(E=E[T!=R?"end":"start"]);var D=w?w.start.row:0,I=w?w.end.row:r.getLength()-1;if(R)var L=function(O){var A=E.row;if(!F(A,E.column,O)){for(A--;A>=D;A--)if(F(A,Number.MAX_VALUE,O))return;if(n.wrap!=!1){for(A=I,D=E.row;A>=D;A--)if(F(A,Number.MAX_VALUE,O))return}}};else var L=function(A){var S=E.row;if(!F(S,E.column,A)){for(S=S+1;S<=I;S++)if(F(S,0,A))return;if(n.wrap!=!1){for(S=D,I=E.row;S<=I;S++)if(F(S,0,A))return}}};if(n.$isMultiLine)var z=i.length,F=function(O,A,S){var N=R?O-z+1:O;if(!(N<0||N+z>r.getLength())){var W=r.getLine(N),V=W.search(i[0]);if(!(!R&&V<A||V===-1)){for(var G=1;G<z;G++)if(W=r.getLine(N+G),W.search(i[G])==-1)return;var Z=W.match(i[z-1])[0].length;if(!(R&&Z>A)&&S(N,V,N+z-1,Z))return!0}}};else if(R)var F=function(A,S,N){if(h){var W=y(r,i,S,A,D);if(!W)return!1;if(N(W.startRow,W.startCol,W.endRow,W.endCol))return!0}else{var V=r.getLine(A),G=[],Z,ee=0;for(i.lastIndex=0;Z=i.exec(V);){var ce=Z[0].length;if(ee=Z.index,!ce){if(ee>=V.length)break;i.lastIndex=ee+=b.skipEmptyMatch(V,ee,C)}if(Z.index+ce>S)break;G.push(Z.index,ce)}for(var ne=G.length-1;ne>=0;ne-=2){var he=G[ne-1],ce=G[ne];if(N(A,he,A,he+ce))return!0}}};else var F=function(A,S,N){if(i.lastIndex=S,h){var W=m(r,i,A,I);if(W){var V=W.endRow<=I?W.endRow-1:I;V>A&&(A=V)}if(!W)return!1;if(N(W.startRow,W.startCol,W.endRow,W.endCol))return!0}else for(var G=r.getLine(A),Z,ee;ee=i.exec(G);){var ce=ee[0].length;if(Z=ee.index,N(A,Z,A,Z+ce))return!0;if(!ce&&(i.lastIndex=Z+=b.skipEmptyMatch(G,Z,C),Z>=G.length))return!1}};return{forEach:L}},s}();function d(s,r){var n=b.supportsLookbehind();function i(R,T){T===void 0&&(T=!0);var C=n&&r.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return C.test(R)||r.regExp?n&&r.$supportsUnicodeFlag?T?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var h=Array.from(s),m=h[0],y=h[h.length-1];return i(m)+s+i(y,!1)}function o(s,r,n){for(var i=null,h=0;h<=s.length;){r.lastIndex=h;var m=r.exec(s);if(!m)break;var y=m.index+m[0].length;if(y>s.length-n)break;(!i||y>i.index+i[0].length)&&(i=m),h=m.index+1}return i}function a(s,r){var n=5e3,i={row:r,column:0},h=s.doc.positionToIndex(i),m=h+n,y=s.doc.indexToPosition(m),R=y.row;return R+1}u.Search=p}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,u,$){var b=this&&this.__extends||function(){var s=function(r,n){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,h){i.__proto__=h}||function(i,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(i[m]=h[m])},s(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");s(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),v=e("../lib/keys"),x=e("../lib/useragent"),p=v.KEY_MODS,d=function(){function s(r,n){this.$init(r,n,!1)}return s.prototype.$init=function(r,n,i){this.platform=n||(x.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(r),this.$singleCommand=i},s.prototype.addCommand=function(r){this.commands[r.name]&&this.removeCommand(r),this.commands[r.name]=r,r.bindKey&&this._buildKeyHash(r)},s.prototype.removeCommand=function(r,n){var i=r&&(typeof r=="string"?r:r.name);r=this.commands[i],n||delete this.commands[i];var h=this.commandKeyBinding;for(var m in h){var y=h[m];if(y==r)delete h[m];else if(Array.isArray(y)){var R=y.indexOf(r);R!=-1&&(y.splice(R,1),y.length==1&&(h[m]=y[0]))}}},s.prototype.bindKey=function(r,n,i){if(typeof r=="object"&&r&&(i==null&&(i=r.position),r=r[this.platform]),!!r){if(typeof n=="function")return this.addCommand({exec:n,bindKey:r,name:n.name||r});r.split("|").forEach(function(h){var m="";if(h.indexOf(" ")!=-1){var y=h.split(/\s+/);h=y.pop(),y.forEach(function(C){var w=this.parseKeys(C),E=p[w.hashId]+w.key;m+=(m?" ":"")+E,this._addCommandToBinding(m,"chainKeys")},this),m+=" "}var R=this.parseKeys(h),T=p[R.hashId]+R.key;this._addCommandToBinding(m+T,n,i)},this)}},s.prototype._addCommandToBinding=function(r,n,i){var h=this.commandKeyBinding,m;if(!n)delete h[r];else if(!h[r]||this.$singleCommand)h[r]=n;else{Array.isArray(h[r])?(m=h[r].indexOf(n))!=-1&&h[r].splice(m,1):h[r]=[h[r]],typeof i!="number"&&(i=o(n));var y=h[r];for(m=0;m<y.length;m++){var R=y[m],T=o(R);if(T>i)break}y.splice(m,0,n)}},s.prototype.addCommands=function(r){r&&Object.keys(r).forEach(function(n){var i=r[n];if(i){if(typeof i=="string")return this.bindKey(i,n);typeof i=="function"&&(i={exec:i}),typeof i=="object"&&(i.name||(i.name=n),this.addCommand(i))}},this)},s.prototype.removeCommands=function(r){Object.keys(r).forEach(function(n){this.removeCommand(r[n])},this)},s.prototype.bindKeys=function(r){Object.keys(r).forEach(function(n){this.bindKey(n,r[n])},this)},s.prototype._buildKeyHash=function(r){this.bindKey(r.bindKey,r)},s.prototype.parseKeys=function(r){var n=r.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(T){return T}),i=n.pop(),h=v[i];if(v.FUNCTION_KEYS[h])i=v.FUNCTION_KEYS[h].toLowerCase();else if(n.length){if(n.length==1&&n[0]=="shift")return{key:i.toUpperCase(),hashId:-1}}else return{key:i,hashId:-1};for(var m=0,y=n.length;y--;){var R=v.KEY_MODS[n[y]];if(R==null)return typeof console<"u"&&console.error("invalid modifier "+n[y]+" in "+r),!1;m|=R}return{key:i,hashId:m}},s.prototype.findKeyCommand=function(r,n){var i=p[r]+n;return this.commandKeyBinding[i]},s.prototype.handleKeyboard=function(r,n,i,h){if(!(h<0)){var m=p[n]+i,y=this.commandKeyBinding[m];return r.$keyChain&&(r.$keyChain+=" "+m,y=this.commandKeyBinding[r.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(r.$keyChain=r.$keyChain||m,{command:"null"}):(r.$keyChain&&((!n||n==4)&&i.length==1?r.$keyChain=r.$keyChain.slice(0,-m.length-1):(n==-1||h>0)&&(r.$keyChain="")),{command:y})}},s.prototype.getStatusText=function(r,n){return n.$keyChain||""},s}();function o(s){return typeof s=="object"&&s.bindKey&&s.bindKey.position||(s.isDefault?-100:0)}var a=function(s){b(r,s);function r(n,i){var h=s.call(this,n,i)||this;return h.$singleCommand=!0,h}return r}(d);a.call=function(s,r,n){d.prototype.$init.call(s,r,n,!0)},d.call=function(s,r,n){d.prototype.$init.call(s,r,n,!1)},u.HashHandler=a,u.MultiHashHandler=d}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,u,$){var b=this&&this.__extends||function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function r(){this.constructor=a}a.prototype=s===null?Object.create(s):(r.prototype=s.prototype,new r)}}(),v=e("../lib/oop"),x=e("../keyboard/hash_handler").MultiHashHandler,p=e("../lib/event_emitter").EventEmitter,d=function(o){b(a,o);function a(s,r){var n=o.call(this,r,s)||this;return n.byName=n.commands,n.setDefaultHandler("exec",function(i){return i.args?i.command.exec(i.editor,i.args,i.event,!1):i.command.exec(i.editor,{},i.event,!0)}),n}return a.prototype.exec=function(s,r,n){if(Array.isArray(s)){for(var i=s.length;i--;)if(this.exec(s[i],r,n))return!0;return!1}typeof s=="string"&&(s=this.commands[s]);var h={editor:r,command:s,args:n};return this.canExecute(s,r)?(h.returnValue=this._emit("exec",h),this._signal("afterExec",h),h.returnValue!==!1):(this._signal("commandUnavailable",h),!1)},a.prototype.canExecute=function(s,r){return typeof s=="string"&&(s=this.commands[s]),!(!s||r&&r.$readOnly&&!s.readOnly||this.$checkCommandState!=!1&&s.isAvailable&&!s.isAvailable(r))},a.prototype.toggleRecording=function(s){if(!this.$inReplay)return s&&s._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(r){this.macro.push([r.command,r.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(s){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(s);try{this.$inReplay=!0,this.macro.forEach(function(r){typeof r=="string"?this.exec(r,s):this.exec(r[0],s,r[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(s){return s.map(function(r){return typeof r[0]!="string"&&(r[0]=r[0].name),r[1]||(r=r[0]),r})},a}(x);v.implement(d.prototype,p),u.CommandManager=d}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,u,$){var b=e("../lib/lang"),v=e("../config"),x=e("../range").Range;function p(o,a){return{win:o,mac:a}}u.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:p("Ctrl-,","Command-,"),exec:function(o){v.loadModule("ace/ext/settings_menu",function(a){a.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:p("Alt-E","F4"),exec:function(o){v.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:p("Alt-Shift-E","Shift-F4"),exec:function(o){v.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:p("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:p(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:p("Ctrl-L","Command-L"),exec:function(o,a){typeof a=="number"&&!isNaN(a)&&o.gotoLine(a),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:p("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:p("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:p("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:p("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:p(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:p(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:p("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:p("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:p("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:p("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:p("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:p("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:p("Ctrl-F","Command-F"),exec:function(o){v.loadModule("ace/ext/searchbox",function(a){a.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:p("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:p("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:p("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:p("Up","Up|Ctrl-P"),exec:function(o,a){o.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:p("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:p("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:p("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:p("Down","Down|Ctrl-N"),exec:function(o,a){o.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:p("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:p("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:p("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:p("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:p("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:p("Left","Left|Ctrl-B"),exec:function(o,a){o.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:p("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:p("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:p("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:p("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:p("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:p("Right","Right|Ctrl-F"),exec:function(o,a){o.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:p(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:p("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:p(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:p("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:p("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:p("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:p("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:p("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:p("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:p("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:p(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var a=o.$copyWithEmptySelection&&o.selection.isEmpty(),s=a?o.selection.getLineRange():o.selection.getRange();o._emit("cut",s),s.isEmpty()||o.session.remove(s),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,a){o.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:p("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:p("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:p("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:p("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:p("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:p("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:p("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:p("Ctrl-H","Command-Option-F"),exec:function(o){v.loadModule("ace/ext/searchbox",function(a){a.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:p("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:p("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:p("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:p("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:p("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:p("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:p("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:p("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:p("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:p("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:p("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:p("Ctrl-Shift-Backspace",null),exec:function(o){var a=o.selection.getRange();a.start.column=0,o.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:p("Ctrl-Shift-Delete",null),exec:function(o){var a=o.selection.getRange();a.end.column=Number.MAX_VALUE,o.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:p("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:p("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:p("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:p("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:p("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:p("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,a){o.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,a){o.insert(b.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:p(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:p("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:p("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:p("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:p(null,null),exec:function(o){o.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:p("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var a=o.selection.getRange();a.start.column=a.end.column=0,a.end.row++,o.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:p("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:p(null,null),exec:function(o){for(var a=o.selection.isBackwards(),s=a?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),r=a?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),n=o.session.doc.getLine(s.row).length,i=o.session.doc.getTextRange(o.selection.getRange()),h=i.replace(/\n\s*/," ").length,m=o.session.doc.getLine(s.row),y=s.row+1;y<=r.row+1;y++){var R=b.stringTrimLeft(b.stringTrimRight(o.session.doc.getLine(y)));R.length!==0&&(R=" "+R),m+=R}r.row+1<o.session.doc.getLength()-1&&(m+=o.session.doc.getNewLineCharacter()),o.clearSelection(),o.session.doc.replace(new x(s.row,0,r.row+2,0),m),h>0?(o.selection.moveCursorTo(s.row,s.column),o.selection.selectTo(s.row,s.column+h)):(n=o.session.doc.getLine(s.row).length>n?n+1:n,o.selection.moveCursorTo(s.row,n))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:p(null,null),exec:function(o){var a=o.session.doc.getLength()-1,s=o.session.doc.getLine(a).length,r=o.selection.rangeList.ranges,n=[];r.length<1&&(r=[o.selection.getRange()]);for(var i=0;i<r.length;i++)i==r.length-1&&(r[i].end.row===a&&r[i].end.column===s||n.push(new x(r[i].end.row,r[i].end.column,a,s))),i===0?r[i].start.row===0&&r[i].start.column===0||n.push(new x(0,0,r[i].start.row,r[i].start.column)):n.push(new x(r[i-1].end.row,r[i-1].end.column,r[i].start.row,r[i].start.column));o.exitMultiSelectMode(),o.clearSelection();for(var i=0;i<n.length;i++)o.selection.addRange(n[i],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(o){o.selection.clearSelection(),o.navigateLineEnd(),o.insert(`
|
|
209
209
|
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(o){o.selection.clearSelection();var a=o.getCursorPosition();o.selection.moveTo(a.row-1,Number.MAX_VALUE),o.insert(`
|
|
210
|
-
`),a.row===0&&o.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(o){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),o.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:p("F1","F1"),exec:function(o){o.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:p(null,null),exec:function(o){o.prompt({$type:"modes"})},readOnly:!0}];for(var d=1;d<9;d++)u.commands.push({name:"foldToLevel"+d,description:"Fold To Level "+d,level:d,exec:function(o){o.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(e,u,$){var b=e("../lib/keys"),v=function(){function p(d){this.editor=d,this.gutterLayer=d.renderer.$gutterLayer,this.element=d.renderer.$gutter,this.lines=d.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return p.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},p.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},p.prototype.$onGutterKeyDown=function(d){if(this.annotationTooltip.isOpen){d.preventDefault(),d.keyCode===b.escape&&this.annotationTooltip.hide();return}if(d.target===this.element){if(d.keyCode!=b.enter)return;d.preventDefault();var o=this.editor.getCursorPosition().row;this.editor.isRowVisible(o)||this.editor.scrollToLine(o,!0,!0),setTimeout((function(){var a=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),s=this.$findNearestFoldLaneWidget(a),r=this.$findNearestAnnotation(a);if(!(s===null&&r===null)){var n=this.$findClosestNumber(s,r,a);if(n===s)if(this.activeLane="fold",this.activeRowIndex=s,this.$isCustomWidgetVisible(s)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=r,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(d),setTimeout((function(){this.editor._signal("gutterkeydown",new x(d,this))}).bind(this),10)},p.prototype.$handleGutterKeyboardInteraction=function(d){if(d.keyCode===b.tab){d.preventDefault();return}if(d.keyCode===b.escape){d.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(d.keyCode===b.up){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(d.keyCode===b.down){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(d.keyCode===b.left){d.preventDefault(),this.$switchLane("annotation");return}if(d.keyCode===b.right){d.preventDefault(),this.$switchLane("fold");return}if(d.keyCode===b.enter||d.keyCode===b.space){switch(d.preventDefault(),this.activeLane){case"fold":var o=this.$rowIndexToRow(this.activeRowIndex),a=this.editor.session.$gutterCustomWidgets[o];if(a)a.callbacks&&a.callbacks.onClick&&a.callbacks.onClick(d,o);else if(this.gutterLayer.session.foldWidgets[o]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),d),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==o&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(o),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},p.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},p.prototype.$isFoldWidgetVisible=function(d){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),a=this.$getFoldWidget(d).style.display!=="none";return o&&a},p.prototype.$isCustomWidgetVisible=function(d){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),a=!!this.$getCustomWidget(d);return o&&a},p.prototype.$isAnnotationVisible=function(d){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),a=this.$getAnnotation(d).style.display!=="none";return o&&a},p.prototype.$getFoldWidget=function(d){var o=this.lines.get(d),a=o.element;return a.childNodes[1]},p.prototype.$getCustomWidget=function(d){var o=this.lines.get(d),a=o.element;return a.childNodes[3]},p.prototype.$getAnnotation=function(d){var o=this.lines.get(d),a=o.element;return a.childNodes[2]},p.prototype.$findNearestFoldLaneWidget=function(d){if(this.$isCustomWidgetVisible(d)||this.$isFoldWidgetVisible(d))return d;for(var o=0;d-o>0||d+o<this.lines.getLength()-1;){if(o++,d-o>=0&&this.$isCustomWidgetVisible(d-o))return d-o;if(d+o<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(d+o))return d+o;if(d-o>=0&&this.$isFoldWidgetVisible(d-o))return d-o;if(d+o<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(d+o))return d+o}return null},p.prototype.$findNearestAnnotation=function(d){if(this.$isAnnotationVisible(d))return d;for(var o=0;d-o>0||d+o<this.lines.getLength()-1;){if(o++,d-o>=0&&this.$isAnnotationVisible(d-o))return d-o;if(d+o<=this.lines.getLength()-1&&this.$isAnnotationVisible(d+o))return d+o}return null},p.prototype.$focusFoldWidget=function(d){if(d!=null){var o=this.$getFoldWidget(d);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},p.prototype.$focusCustomWidget=function(d){if(d!=null){var o=this.$getCustomWidget(d);o&&(o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus())}},p.prototype.$focusAnnotation=function(d){if(d!=null){var o=this.$getAnnotation(d);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},p.prototype.$blurFoldWidget=function(d){var o=this.$getFoldWidget(d);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},p.prototype.$blurCustomWidget=function(d){var o=this.$getCustomWidget(d);o&&(o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur())},p.prototype.$blurAnnotation=function(d){var o=this.$getAnnotation(d);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},p.prototype.$moveFoldWidgetUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},p.prototype.$moveFoldWidgetDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},p.prototype.$moveAnnotationUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$moveAnnotationDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$findClosestNumber=function(d,o,a){return d===null?o:o===null||Math.abs(a-d)<=Math.abs(a-o)?d:o},p.prototype.$switchLane=function(d){switch(d){case"annotation":if(this.activeLane==="annotation")break;var o=this.$findNearestAnnotation(this.activeRowIndex);if(o==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var a=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(a===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,this.$isCustomWidgetVisible(a)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},p.prototype.$rowIndexToRow=function(d){var o=this.lines.get(d);return o?o.row:null},p.prototype.$rowToRowIndex=function(d){for(var o=0;o<this.lines.getLength();o++){var a=this.lines.get(o);if(a.row==d)return o}return null},p}();u.GutterKeyboardHandler=v;var x=function(){function p(d,o){this.gutterKeyboardHandler=o,this.domEvent=d}return p.prototype.getKey=function(){return b.keyCodeToString(this.domEvent.keyCode)},p.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},p.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},p.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},p}();u.GutterKeyboardEvent=x}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(e,u,$){var b=this&&this.__values||function(A){var S=typeof Symbol=="function"&&Symbol.iterator,N=S&&A[S],B=0;if(N)return N.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&B>=A.length&&(A=void 0),{value:A&&A[B++],done:!A}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")},v=e("./lib/oop"),x=e("./lib/dom"),p=e("./lib/lang"),d=e("./lib/useragent"),o=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,s=e("./mouse/fold_handler").FoldHandler,r=e("./keyboard/keybinding").KeyBinding,n=e("./edit_session").EditSession,i=e("./search").Search,h=e("./range").Range,m=e("./lib/event_emitter").EventEmitter,y=e("./commands/command_manager").CommandManager,R=e("./commands/default_commands").commands,T=e("./config"),C=e("./token_iterator").TokenIterator,w=e("./keyboard/gutter_handler").GutterKeyboardHandler,E=e("./config").nls,D=e("./clipboard"),I=e("./lib/keys"),L=e("./lib/event"),z=e("./tooltip").HoverTooltip,F=function(){function A(S,N,B){this.id="editor"+ ++A.$uid,this.session,this.$toDestroy=[];var V=S.getContainerElement();this.container=V,this.renderer=S,this.commands=new y(d.isMac?"mac":"win",R),typeof document=="object"&&(this.textInput=new o(S.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new s(this)),this.keyBinding=new r(this),this.$search=new i().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=p.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(G,Z){Z._$emitInputEvent.schedule(31)}),this.setSession(N||B&&B.session||new n("")),T.resetOptions(this),B&&this.setOptions(B),T._signal("editor",this)}return A.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},A.prototype.startOperation=function(S){this.session.startOperation(S)},A.prototype.endOperation=function(S){this.session.endOperation(S)},A.prototype.onStartOperation=function(S){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,S||(this.previousCommand=null)},A.prototype.onEndOperation=function(S){if(this.curOp&&this.session){if(S&&S.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var N=this.curOp.command,B=N&&N.scrollIntoView;if(B){switch(B){case"center-animate":B="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var V=this.selection.getRange(),G=this.renderer.layerConfig;(V.start.row>=G.lastRow||V.end.row<=G.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}B=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},A.prototype.$historyTracker=function(S){if(this.$mergeUndoDeltas){var N=this.prevOp,B=this.$mergeableCommands,V=N.command&&S.command.name==N.command.name;if(S.command.name=="insertstring"){var G=S.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),V=V&&this.mergeNextCommand&&(!/\s/.test(G)||/\s/.test(N.args)),this.mergeNextCommand=!0}else V=V&&B.indexOf(S.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(V=!1),V?this.session.mergeUndoDeltas=!0:B.indexOf(S.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},A.prototype.setKeyboardHandler=function(S,N){if(S&&typeof S=="string"&&S!="ace"){this.$keybindingId=S;var B=this;T.loadModule(["keybinding",S],function(V){B.$keybindingId==S&&B.keyBinding.setKeyboardHandler(V&&V.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(S),N&&N()},A.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},A.prototype.setSession=function(S){if(this.session!=S){this.curOp&&this.endOperation(),this.curOp={};var N=this.session;if(N){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var B=this.session.getSelection();B.off("changeCursor",this.$onCursorChange),B.off("changeSelection",this.$onSelectionChange)}this.session=S,S?(this.$onDocumentChange=this.onDocumentChange.bind(this),S.on("change",this.$onDocumentChange),this.renderer.setSession(S),this.$onChangeMode=this.onChangeMode.bind(this),S.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),S.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),S.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),S.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),S.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),S.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=S.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(S)),this._signal("changeSession",{session:S,oldSession:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),S&&S._signal("changeEditor",{editor:this}),S&&(S.$editor=this),S&&!S.destroyed&&S.bgTokenizer.scheduleStart()}},A.prototype.getSession=function(){return this.session},A.prototype.setValue=function(S,N){return this.session.doc.setValue(S),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),S},A.prototype.getValue=function(){return this.session.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.resize=function(S){this.renderer.onResize(S)},A.prototype.setTheme=function(S,N){this.renderer.setTheme(S,N)},A.prototype.getTheme=function(){return this.renderer.getTheme()},A.prototype.setStyle=function(S,N){this.renderer.setStyle(S,N)},A.prototype.unsetStyle=function(S){this.renderer.unsetStyle(S)},A.prototype.getFontSize=function(){return this.getOption("fontSize")||x.computedStyle(this.container).fontSize},A.prototype.setFontSize=function(S){this.setOption("fontSize",S)},A.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var S=this;this.$highlightPending=!0,setTimeout(function(){S.$highlightPending=!1;var N=S.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(ue){N.removeMarker(ue)}),N.$bracketHighlight=null);var B=S.getCursorPosition(),V=S.getKeyboardHandler(),G=V&&V.$getDirectionForHighlight&&V.$getDirectionForHighlight(S),Z=N.getMatchingBracketRanges(B,G);if(!Z){var ee=new C(N,B.row,B.column),ce=ee.getCurrentToken();if(ce&&/\b(?:tag-open|tag-name)/.test(ce.type)){var ne=N.getMatchingTags(B);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&N.$mode.getMatching&&(Z=N.$mode.getMatching(S.session)),!Z){S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide();return}var he="ace_bracket";Array.isArray(Z)?Z.length==1&&(he="ace_error_bracket"):Z=[Z],Z.length==2&&(h.comparePoints(Z[0].end,Z[1].start)==0?Z=[h.fromPoints(Z[0].start,Z[1].end)]:h.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[h.fromPoints(Z[1].start,Z[0].end)])),N.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ue){return N.addMarker(ue,he,"text")})},S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide()}},50)}},A.prototype.focus=function(){this.textInput.focus()},A.prototype.isFocused=function(){return this.textInput.isFocused()},A.prototype.blur=function(){this.textInput.blur()},A.prototype.onFocus=function(S){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",S))},A.prototype.onBlur=function(S){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",S))},A.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},A.prototype.onDocumentChange=function(S){var N=this.session.$useWrapMode,B=S.start.row==S.end.row?S.end.row:1/0;this.renderer.updateLines(S.start.row,B,N),this._signal("change",S),this.$cursorChange()},A.prototype.onTokenizerUpdate=function(S){var N=S.data;this.renderer.updateLines(N.first,N.last)},A.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},A.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},A.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},A.prototype.$updateHighlightActiveLine=function(){var S=this.getSession(),N;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(N=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(N=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(N=!1)),S.$highlightLineMarker&&!N)S.removeMarker(S.$highlightLineMarker.id),S.$highlightLineMarker=null;else if(!S.$highlightLineMarker&&N){var B=new h(N.row,N.column,N.row,1/0);B.id=S.addMarker(B,"ace_active-line","screenLine"),S.$highlightLineMarker=B}else N&&(S.$highlightLineMarker.start.row=N.row,S.$highlightLineMarker.end.row=N.row,S.$highlightLineMarker.start.column=N.column,S._signal("changeBackMarker"))},A.prototype.onSelectionChange=function(S){var N=this.session;if(N.$selectionMarker&&N.removeMarker(N.$selectionMarker),N.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var B=this.selection.getRange(),V=this.getSelectionStyle();N.$selectionMarker=N.addMarker(B,"ace_selection",V)}var G=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(G),this._signal("changeSelection")},A.prototype.$getSelectionHighLightRegexp=function(){var S=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var B=N.start.column,V=N.end.column,G=S.getLine(N.start.row),Z=G.substring(B,V);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var ee=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),ce=G.substring(B-1,V+1);if(ee.test(ce))return ee}}},A.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},A.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},A.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},A.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},A.prototype.onChangeMode=function(S){this.renderer.updateText(),this._emit("changeMode",S)},A.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},A.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},A.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},A.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},A.prototype.getCopyText=function(){var S=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),B=!1;if(!S&&this.$copyWithEmptySelection){B=!0;for(var V=this.selection.getAllRanges(),G=0;G<V.length;G++){var Z=V[G];G&&V[G-1].start.row==Z.start.row||(S+=this.session.getLine(Z.start.row)+N)}}var ee={text:S};return this._signal("copy",ee),D.lineMode=B?ee.text:!1,ee.text},A.prototype.onCopy=function(){this.commands.exec("copy",this)},A.prototype.onCut=function(){this.commands.exec("cut",this)},A.prototype.onPaste=function(S,N){var B={text:S,event:N};this.commands.exec("paste",this,B)},A.prototype.$handlePaste=function(S){typeof S=="string"&&(S={text:S}),this._signal("paste",S);var N=S.text,B=N===D.lineMode,V=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)B?V.insert({row:this.selection.lead.row,column:0},N):this.insert(N);else if(B)this.selection.rangeList.ranges.forEach(function(he){V.insert({row:he.start.row,column:0},N)});else{var G=N.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,ee=G.length==2&&(!G[0]||!G[1]);if(G.length!=Z.length||ee)return this.commands.exec("insertstring",this,N);for(var ce=Z.length;ce--;){var ne=Z[ce];ne.isEmpty()||V.remove(ne),V.insert(ne.start,G[ce])}}},A.prototype.execCommand=function(S,N){return this.commands.exec(S,this,N)},A.prototype.insert=function(S,N){var B=this.session,V=B.getMode(),G=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var Z=V.transformAction(B.getState(G.row),"insertion",this,B,S);Z&&(S!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),S=Z.text)}if(S==" "&&(S=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&S.indexOf(`
|
|
210
|
+
`),a.row===0&&o.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(o){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),o.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:p("F1","F1"),exec:function(o){o.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:p(null,null),exec:function(o){o.prompt({$type:"modes"})},readOnly:!0}];for(var d=1;d<9;d++)u.commands.push({name:"foldToLevel"+d,description:"Fold To Level "+d,level:d,exec:function(o){o.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(e,u,$){var b=e("../lib/keys"),v=function(){function p(d){this.editor=d,this.gutterLayer=d.renderer.$gutterLayer,this.element=d.renderer.$gutter,this.lines=d.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return p.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},p.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},p.prototype.$onGutterKeyDown=function(d){if(this.annotationTooltip.isOpen){d.preventDefault(),d.keyCode===b.escape&&this.annotationTooltip.hide();return}if(d.target===this.element){if(d.keyCode!=b.enter)return;d.preventDefault();var o=this.editor.getCursorPosition().row;this.editor.isRowVisible(o)||this.editor.scrollToLine(o,!0,!0),setTimeout((function(){var a=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),s=this.$findNearestFoldLaneWidget(a),r=this.$findNearestAnnotation(a);if(!(s===null&&r===null)){var n=this.$findClosestNumber(s,r,a);if(n===s)if(this.activeLane="fold",this.activeRowIndex=s,this.$isCustomWidgetVisible(s)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=r,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(d),setTimeout((function(){this.editor._signal("gutterkeydown",new x(d,this))}).bind(this),10)},p.prototype.$handleGutterKeyboardInteraction=function(d){if(d.keyCode===b.tab){d.preventDefault();return}if(d.keyCode===b.escape){d.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(d.keyCode===b.up){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(d.keyCode===b.down){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(d.keyCode===b.left){d.preventDefault(),this.$switchLane("annotation");return}if(d.keyCode===b.right){d.preventDefault(),this.$switchLane("fold");return}if(d.keyCode===b.enter||d.keyCode===b.space){switch(d.preventDefault(),this.activeLane){case"fold":var o=this.$rowIndexToRow(this.activeRowIndex),a=this.editor.session.$gutterCustomWidgets[o];if(a)a.callbacks&&a.callbacks.onClick&&a.callbacks.onClick(d,o);else if(this.gutterLayer.session.foldWidgets[o]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),d),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==o&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(o),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},p.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},p.prototype.$isFoldWidgetVisible=function(d){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),a=this.$getFoldWidget(d).style.display!=="none";return o&&a},p.prototype.$isCustomWidgetVisible=function(d){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),a=!!this.$getCustomWidget(d);return o&&a},p.prototype.$isAnnotationVisible=function(d){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),a=this.$getAnnotation(d).style.display!=="none";return o&&a},p.prototype.$getFoldWidget=function(d){var o=this.lines.get(d),a=o.element;return a.childNodes[1]},p.prototype.$getCustomWidget=function(d){var o=this.lines.get(d),a=o.element;return a.childNodes[3]},p.prototype.$getAnnotation=function(d){var o=this.lines.get(d),a=o.element;return a.childNodes[2]},p.prototype.$findNearestFoldLaneWidget=function(d){if(this.$isCustomWidgetVisible(d)||this.$isFoldWidgetVisible(d))return d;for(var o=0;d-o>0||d+o<this.lines.getLength()-1;){if(o++,d-o>=0&&this.$isCustomWidgetVisible(d-o))return d-o;if(d+o<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(d+o))return d+o;if(d-o>=0&&this.$isFoldWidgetVisible(d-o))return d-o;if(d+o<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(d+o))return d+o}return null},p.prototype.$findNearestAnnotation=function(d){if(this.$isAnnotationVisible(d))return d;for(var o=0;d-o>0||d+o<this.lines.getLength()-1;){if(o++,d-o>=0&&this.$isAnnotationVisible(d-o))return d-o;if(d+o<=this.lines.getLength()-1&&this.$isAnnotationVisible(d+o))return d+o}return null},p.prototype.$focusFoldWidget=function(d){if(d!=null){var o=this.$getFoldWidget(d);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},p.prototype.$focusCustomWidget=function(d){if(d!=null){var o=this.$getCustomWidget(d);o&&(o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus())}},p.prototype.$focusAnnotation=function(d){if(d!=null){var o=this.$getAnnotation(d);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},p.prototype.$blurFoldWidget=function(d){var o=this.$getFoldWidget(d);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},p.prototype.$blurCustomWidget=function(d){var o=this.$getCustomWidget(d);o&&(o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur())},p.prototype.$blurAnnotation=function(d){var o=this.$getAnnotation(d);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},p.prototype.$moveFoldWidgetUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},p.prototype.$moveFoldWidgetDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},p.prototype.$moveAnnotationUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$moveAnnotationDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$findClosestNumber=function(d,o,a){return d===null?o:o===null||Math.abs(a-d)<=Math.abs(a-o)?d:o},p.prototype.$switchLane=function(d){switch(d){case"annotation":if(this.activeLane==="annotation")break;var o=this.$findNearestAnnotation(this.activeRowIndex);if(o==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var a=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(a===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,this.$isCustomWidgetVisible(a)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},p.prototype.$rowIndexToRow=function(d){var o=this.lines.get(d);return o?o.row:null},p.prototype.$rowToRowIndex=function(d){for(var o=0;o<this.lines.getLength();o++){var a=this.lines.get(o);if(a.row==d)return o}return null},p}();u.GutterKeyboardHandler=v;var x=function(){function p(d,o){this.gutterKeyboardHandler=o,this.domEvent=d}return p.prototype.getKey=function(){return b.keyCodeToString(this.domEvent.keyCode)},p.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},p.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},p.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},p}();u.GutterKeyboardEvent=x}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(e,u,$){var b=this&&this.__values||function(A){var S=typeof Symbol=="function"&&Symbol.iterator,N=S&&A[S],W=0;if(N)return N.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&W>=A.length&&(A=void 0),{value:A&&A[W++],done:!A}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")},v=e("./lib/oop"),x=e("./lib/dom"),p=e("./lib/lang"),d=e("./lib/useragent"),o=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,s=e("./mouse/fold_handler").FoldHandler,r=e("./keyboard/keybinding").KeyBinding,n=e("./edit_session").EditSession,i=e("./search").Search,h=e("./range").Range,m=e("./lib/event_emitter").EventEmitter,y=e("./commands/command_manager").CommandManager,R=e("./commands/default_commands").commands,T=e("./config"),C=e("./token_iterator").TokenIterator,w=e("./keyboard/gutter_handler").GutterKeyboardHandler,E=e("./config").nls,D=e("./clipboard"),I=e("./lib/keys"),L=e("./lib/event"),z=e("./tooltip").HoverTooltip,F=function(){function A(S,N,W){this.id="editor"+ ++A.$uid,this.session,this.$toDestroy=[];var V=S.getContainerElement();this.container=V,this.renderer=S,this.commands=new y(d.isMac?"mac":"win",R),typeof document=="object"&&(this.textInput=new o(S.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new s(this)),this.keyBinding=new r(this),this.$search=new i().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=p.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(G,Z){Z._$emitInputEvent.schedule(31)}),this.setSession(N||W&&W.session||new n("")),T.resetOptions(this),W&&this.setOptions(W),T._signal("editor",this)}return A.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},A.prototype.startOperation=function(S){this.session.startOperation(S)},A.prototype.endOperation=function(S){this.session.endOperation(S)},A.prototype.onStartOperation=function(S){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,S||(this.previousCommand=null)},A.prototype.onEndOperation=function(S){if(this.curOp&&this.session){if(S&&S.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var N=this.curOp.command,W=N&&N.scrollIntoView;if(W){switch(W){case"center-animate":W="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var V=this.selection.getRange(),G=this.renderer.layerConfig;(V.start.row>=G.lastRow||V.end.row<=G.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}W=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},A.prototype.$historyTracker=function(S){if(this.$mergeUndoDeltas){var N=this.prevOp,W=this.$mergeableCommands,V=N.command&&S.command.name==N.command.name;if(S.command.name=="insertstring"){var G=S.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),V=V&&this.mergeNextCommand&&(!/\s/.test(G)||/\s/.test(N.args)),this.mergeNextCommand=!0}else V=V&&W.indexOf(S.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(V=!1),V?this.session.mergeUndoDeltas=!0:W.indexOf(S.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},A.prototype.setKeyboardHandler=function(S,N){if(S&&typeof S=="string"&&S!="ace"){this.$keybindingId=S;var W=this;T.loadModule(["keybinding",S],function(V){W.$keybindingId==S&&W.keyBinding.setKeyboardHandler(V&&V.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(S),N&&N()},A.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},A.prototype.setSession=function(S){if(this.session!=S){this.curOp&&this.endOperation(),this.curOp={};var N=this.session;if(N){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var W=this.session.getSelection();W.off("changeCursor",this.$onCursorChange),W.off("changeSelection",this.$onSelectionChange)}this.session=S,S?(this.$onDocumentChange=this.onDocumentChange.bind(this),S.on("change",this.$onDocumentChange),this.renderer.setSession(S),this.$onChangeMode=this.onChangeMode.bind(this),S.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),S.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),S.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),S.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),S.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),S.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=S.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(S)),this._signal("changeSession",{session:S,oldSession:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),S&&S._signal("changeEditor",{editor:this}),S&&(S.$editor=this),S&&!S.destroyed&&S.bgTokenizer.scheduleStart()}},A.prototype.getSession=function(){return this.session},A.prototype.setValue=function(S,N){return this.session.doc.setValue(S),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),S},A.prototype.getValue=function(){return this.session.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.resize=function(S){this.renderer.onResize(S)},A.prototype.setTheme=function(S,N){this.renderer.setTheme(S,N)},A.prototype.getTheme=function(){return this.renderer.getTheme()},A.prototype.setStyle=function(S,N){this.renderer.setStyle(S,N)},A.prototype.unsetStyle=function(S){this.renderer.unsetStyle(S)},A.prototype.getFontSize=function(){return this.getOption("fontSize")||x.computedStyle(this.container).fontSize},A.prototype.setFontSize=function(S){this.setOption("fontSize",S)},A.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var S=this;this.$highlightPending=!0,setTimeout(function(){S.$highlightPending=!1;var N=S.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(ue){N.removeMarker(ue)}),N.$bracketHighlight=null);var W=S.getCursorPosition(),V=S.getKeyboardHandler(),G=V&&V.$getDirectionForHighlight&&V.$getDirectionForHighlight(S),Z=N.getMatchingBracketRanges(W,G);if(!Z){var ee=new C(N,W.row,W.column),ce=ee.getCurrentToken();if(ce&&/\b(?:tag-open|tag-name)/.test(ce.type)){var ne=N.getMatchingTags(W);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&N.$mode.getMatching&&(Z=N.$mode.getMatching(S.session)),!Z){S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide();return}var he="ace_bracket";Array.isArray(Z)?Z.length==1&&(he="ace_error_bracket"):Z=[Z],Z.length==2&&(h.comparePoints(Z[0].end,Z[1].start)==0?Z=[h.fromPoints(Z[0].start,Z[1].end)]:h.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[h.fromPoints(Z[1].start,Z[0].end)])),N.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ue){return N.addMarker(ue,he,"text")})},S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide()}},50)}},A.prototype.focus=function(){this.textInput.focus()},A.prototype.isFocused=function(){return this.textInput.isFocused()},A.prototype.blur=function(){this.textInput.blur()},A.prototype.onFocus=function(S){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",S))},A.prototype.onBlur=function(S){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",S))},A.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},A.prototype.onDocumentChange=function(S){var N=this.session.$useWrapMode,W=S.start.row==S.end.row?S.end.row:1/0;this.renderer.updateLines(S.start.row,W,N),this._signal("change",S),this.$cursorChange()},A.prototype.onTokenizerUpdate=function(S){var N=S.data;this.renderer.updateLines(N.first,N.last)},A.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},A.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},A.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},A.prototype.$updateHighlightActiveLine=function(){var S=this.getSession(),N;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(N=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(N=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(N=!1)),S.$highlightLineMarker&&!N)S.removeMarker(S.$highlightLineMarker.id),S.$highlightLineMarker=null;else if(!S.$highlightLineMarker&&N){var W=new h(N.row,N.column,N.row,1/0);W.id=S.addMarker(W,"ace_active-line","screenLine"),S.$highlightLineMarker=W}else N&&(S.$highlightLineMarker.start.row=N.row,S.$highlightLineMarker.end.row=N.row,S.$highlightLineMarker.start.column=N.column,S._signal("changeBackMarker"))},A.prototype.onSelectionChange=function(S){var N=this.session;if(N.$selectionMarker&&N.removeMarker(N.$selectionMarker),N.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var W=this.selection.getRange(),V=this.getSelectionStyle();N.$selectionMarker=N.addMarker(W,"ace_selection",V)}var G=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(G),this._signal("changeSelection")},A.prototype.$getSelectionHighLightRegexp=function(){var S=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var W=N.start.column,V=N.end.column,G=S.getLine(N.start.row),Z=G.substring(W,V);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var ee=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),ce=G.substring(W-1,V+1);if(ee.test(ce))return ee}}},A.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},A.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},A.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},A.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},A.prototype.onChangeMode=function(S){this.renderer.updateText(),this._emit("changeMode",S)},A.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},A.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},A.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},A.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},A.prototype.getCopyText=function(){var S=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),W=!1;if(!S&&this.$copyWithEmptySelection){W=!0;for(var V=this.selection.getAllRanges(),G=0;G<V.length;G++){var Z=V[G];G&&V[G-1].start.row==Z.start.row||(S+=this.session.getLine(Z.start.row)+N)}}var ee={text:S};return this._signal("copy",ee),D.lineMode=W?ee.text:!1,ee.text},A.prototype.onCopy=function(){this.commands.exec("copy",this)},A.prototype.onCut=function(){this.commands.exec("cut",this)},A.prototype.onPaste=function(S,N){var W={text:S,event:N};this.commands.exec("paste",this,W)},A.prototype.$handlePaste=function(S){typeof S=="string"&&(S={text:S}),this._signal("paste",S);var N=S.text,W=N===D.lineMode,V=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)W?V.insert({row:this.selection.lead.row,column:0},N):this.insert(N);else if(W)this.selection.rangeList.ranges.forEach(function(he){V.insert({row:he.start.row,column:0},N)});else{var G=N.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,ee=G.length==2&&(!G[0]||!G[1]);if(G.length!=Z.length||ee)return this.commands.exec("insertstring",this,N);for(var ce=Z.length;ce--;){var ne=Z[ce];ne.isEmpty()||V.remove(ne),V.insert(ne.start,G[ce])}}},A.prototype.execCommand=function(S,N){return this.commands.exec(S,this,N)},A.prototype.insert=function(S,N){var W=this.session,V=W.getMode(),G=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var Z=V.transformAction(W.getState(G.row),"insertion",this,W,S);Z&&(S!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),S=Z.text)}if(S==" "&&(S=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&S.indexOf(`
|
|
211
211
|
`)==-1){var ee=h.fromPoints(G,G);ee.end.column+=S.length,this.session.remove(ee)}}else{var ee=this.getSelectionRange();G=this.session.remove(ee),this.clearSelection()}if(S==`
|
|
212
212
|
`||S==`\r
|
|
213
|
-
`){var ue=
|
|
214
|
-
`){var ee=
|
|
215
|
-
`),this.moveCursorToPosition(S)},A.prototype.setGhostText=function(S,N){this.renderer.setGhostText(S,N)},A.prototype.removeGhostText=function(){this.renderer.removeGhostText()},A.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var S=this.getCursorPosition(),N=S.column;if(N!==0){var B=this.session.getLine(S.row),V,G;N<B.length?(V=B.charAt(N)+B.charAt(N-1),G=new h(S.row,N-1,S.row,N+1)):(V=B.charAt(N-1)+B.charAt(N-2),G=new h(S.row,N-2,S.row,N)),this.session.replace(G,V),this.session.selection.moveToPosition(G.end)}}},A.prototype.toLowerCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),B=this.session.getTextRange(N);this.session.replace(N,B.toLowerCase()),this.selection.setSelectionRange(S)},A.prototype.toUpperCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),B=this.session.getTextRange(N);this.session.replace(N,B.toUpperCase()),this.selection.setSelectionRange(S)},A.prototype.indent=function(){var S=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var B=this.$getSelectedRows();S.indentRows(B.first,B.last," ");return}else if(N.start.column<N.end.column){var V=S.getTextRange(N);if(!/^\s+$/.test(V)){var B=this.$getSelectedRows();S.indentRows(B.first,B.last," ");return}}var G=S.getLine(N.start.row),Z=N.start,ee=S.getTabSize(),ce=S.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=ee-ce%ee,he=p.stringRepeat(" ",ne);else{for(var ne=ce%ee;G[N.start.column-1]==" "&≠)N.start.column--,ne--;this.selection.setSelectionRange(N),he=" "}return this.insert(he)},A.prototype.blockIndent=function(){var S=this.$getSelectedRows();this.session.indentRows(S.first,S.last," ")},A.prototype.blockOutdent=function(){var S=this.session.getSelection();this.session.outdentRows(S.getRange())},A.prototype.sortLines=function(){for(var S=this.$getSelectedRows(),N=this.session,B=[],V=S.first;V<=S.last;V++)B.push(N.getLine(V));B.sort(function(ee,ce){return ee.toLowerCase()<ce.toLowerCase()?-1:ee.toLowerCase()>ce.toLowerCase()?1:0});for(var G=new h(0,0,0,0),V=S.first;V<=S.last;V++){var Z=N.getLine(V);G.start.row=V,G.end.row=V,G.end.column=Z.length,N.replace(G,B[V-S.first])}},A.prototype.toggleCommentLines=function(){var S=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(S,this.session,N.first,N.last)},A.prototype.toggleBlockComment=function(){var S=this.getCursorPosition(),N=this.session.getState(S.row),B=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,B,S)},A.prototype.getNumberAt=function(S,N){var B=/[\-]?[0-9]+(?:\.[0-9]+)?/g;B.lastIndex=0;for(var V=this.session.getLine(S);B.lastIndex<N;){var G=B.exec(V);if(G.index<=N&&G.index+G[0].length>=N){var Z={value:G[0],start:G.index,end:G.index+G[0].length};return Z}}return null},A.prototype.modifyNumber=function(S){var N=this.selection.getCursor().row,B=this.selection.getCursor().column,V=new h(N,B-1,N,B),G=this.session.getTextRange(V);if(!isNaN(parseFloat(G))&&isFinite(G)){var Z=this.getNumberAt(N,B);if(Z){var ee=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,ce=Z.start+Z.value.length-ee,ne=parseFloat(Z.value);ne*=Math.pow(10,ce),ee!==Z.end&&B<ee?S*=Math.pow(10,Z.end-B-1):S*=Math.pow(10,Z.end-B),ne+=S,ne/=Math.pow(10,ce);var he=ne.toFixed(ce),ue=new h(N,Z.start,N,Z.end);this.session.replace(ue,he),this.moveCursorTo(N,Math.max(Z.start+1,B+he.length-Z.value.length))}}else this.toggleWord()},A.prototype.toggleWord=function(){var S=this.selection.getCursor().row,N=this.selection.getCursor().column;this.selection.selectWord();var B=this.getSelectedText(),V=this.selection.getWordRange().start.column,G=B.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Z=N-V-1;Z<0&&(Z=0);var ee=0,ce=0,ne=this;B.match(/[A-Za-z0-9_]+/)&&G.forEach(function(Ve,ot){ce=ee+Ve.length,Z>=ee&&Z<=ce&&(B=Ve,ne.selection.clearSelection(),ne.moveCursorTo(S,ee+V),ne.selection.selectTo(S,ce+V)),ee=ce});for(var he=this.$toggleWordPairs,ue,le=0;le<he.length;le++)for(var me=he[le],_e=0;_e<=1;_e++){var Ae=+!_e,Me=B.match(new RegExp("^\\s?_?("+p.escapeRegExp(me[_e])+")\\s?$","i"));if(Me){var qe=B.match(new RegExp("([_]|^|\\s)("+p.escapeRegExp(Me[1])+")($|\\s)","g"));qe&&(ue=B.replace(new RegExp(p.escapeRegExp(me[_e]),"i"),function(Ve){var ot=me[Ae];return Ve.toUpperCase()==Ve?ot=ot.toUpperCase():Ve.charAt(0).toUpperCase()==Ve.charAt(0)&&(ot=ot.substr(0,0)+me[Ae].charAt(0).toUpperCase()+ot.substr(1)),ot}),this.insert(ue),ue="")}}},A.prototype.findLinkAt=function(S,N){var B,V,G=this.session.getLine(S),Z=G.split(/((?:https?|ftp):\/\/[\S]+)/),ee=N;ee<0&&(ee=0);var ce=0,ne=0,he;try{for(var ue=b(Z),le=ue.next();!le.done;le=ue.next()){var me=le.value;if(ne=ce+me.length,ee>=ce&&ee<=ne&&me.match(/((?:https?|ftp):\/\/[\S]+)/)){he=me.replace(/[\s:.,'";}\]]+$/,"");break}ce=ne}}catch(_e){B={error:_e}}finally{try{le&&!le.done&&(V=ue.return)&&V.call(ue)}finally{if(B)throw B.error}}return he},A.prototype.openLink=function(){var S=this.selection.getCursor(),N=this.findLinkAt(S.row,S.column);return N&&window.open(N,"_blank"),N!=null},A.prototype.removeLines=function(){var S=this.$getSelectedRows();this.session.removeFullLines(S.first,S.last),this.clearSelection()},A.prototype.duplicateSelection=function(){var S=this.selection,N=this.session,B=S.getRange(),V=S.isBackwards();if(B.isEmpty()){var G=B.start.row;N.duplicateLines(G,G)}else{var Z=V?B.start:B.end,ee=N.insert(Z,N.getTextRange(B));B.start=Z,B.end=ee,S.setSelectionRange(B,V)}},A.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},A.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},A.prototype.moveText=function(S,N,B){return this.session.moveText(S,N,B)},A.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},A.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},A.prototype.$moveLines=function(S,N){var B,V,G=this.selection;if(!G.inMultiSelectMode||this.inVirtualSelectionMode){var Z=G.toOrientedRange();B=this.$getSelectedRows(Z),V=this.session.$moveLines(B.first,B.last,N?0:S),N&&S==-1&&(V=0),Z.moveBy(V,0),G.fromOrientedRange(Z)}else{var ee=G.rangeList.ranges;G.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var ce=0,ne=0,he=ee.length,ue=0;ue<he;ue++){var le=ue;ee[ue].moveBy(ce,0),B=this.$getSelectedRows(ee[ue]);for(var me=B.first,_e=B.last;++ue<he;){ne&&ee[ue].moveBy(ne,0);var Ae=this.$getSelectedRows(ee[ue]);if(N&&Ae.first!=_e)break;if(!N&&Ae.first>_e+1)break;_e=Ae.last}for(ue--,ce=this.session.$moveLines(me,_e,N?0:S),N&&S==-1&&(le=ue+1);le<=ue;)ee[le].moveBy(ce,0),le++;N||(ce=0),ne+=ce}G.fromOrientedRange(G.ranges[0]),G.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},A.prototype.$getSelectedRows=function(S){return S=(S||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(S.start.row),last:this.session.getRowFoldEnd(S.end.row)}},A.prototype.onCompositionStart=function(S){this.renderer.showComposition(S)},A.prototype.onCompositionUpdate=function(S){this.renderer.setCompositionText(S)},A.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},A.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},A.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},A.prototype.isRowVisible=function(S){return S>=this.getFirstVisibleRow()&&S<=this.getLastVisibleRow()},A.prototype.isRowFullyVisible=function(S){return S>=this.renderer.getFirstFullyVisibleRow()&&S<=this.renderer.getLastFullyVisibleRow()},A.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},A.prototype.$moveByPage=function(S,N){var B=this.renderer,V=this.renderer.layerConfig,G=S*Math.floor(V.height/V.lineHeight);N===!0?this.selection.$moveSelection(function(){this.moveCursorBy(G,0)}):N===!1&&(this.selection.moveCursorBy(G,0),this.selection.clearSelection());var Z=B.scrollTop;B.scrollBy(0,G*V.lineHeight),N!=null&&B.scrollCursorIntoView(null,.5),B.animateScrolling(Z)},A.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},A.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},A.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},A.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},A.prototype.scrollPageDown=function(){this.$moveByPage(1)},A.prototype.scrollPageUp=function(){this.$moveByPage(-1)},A.prototype.scrollToRow=function(S){this.renderer.scrollToRow(S)},A.prototype.scrollToLine=function(S,N,B,V){this.renderer.scrollToLine(S,N,B,V)},A.prototype.centerSelection=function(){var S=this.getSelectionRange(),N={row:Math.floor(S.start.row+(S.end.row-S.start.row)/2),column:Math.floor(S.start.column+(S.end.column-S.start.column)/2)};this.renderer.alignCursor(N,.5)},A.prototype.getCursorPosition=function(){return this.selection.getCursor()},A.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},A.prototype.getSelectionRange=function(){return this.selection.getRange()},A.prototype.selectAll=function(){this.selection.selectAll()},A.prototype.clearSelection=function(){this.selection.clearSelection()},A.prototype.moveCursorTo=function(S,N){this.selection.moveCursorTo(S,N)},A.prototype.moveCursorToPosition=function(S){this.selection.moveCursorToPosition(S)},A.prototype.jumpToMatching=function(S,N){var B=this.getCursorPosition(),V=new C(this.session,B.row,B.column),G=V.getCurrentToken(),Z=0;G&&G.type.indexOf("tag-name")!==-1&&(G=V.stepBackward());var ee=G||V.stepForward();if(ee){var ce,ne=!1,he={},ue=B.column-ee.start,le,me={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(ee.value.match(/[{}()\[\]]/g)){for(;ue<ee.value.length&&!ne;ue++)if(me[ee.value[ue]])switch(le=me[ee.value[ue]]+"."+ee.type.replace("rparen","lparen"),isNaN(he[le])&&(he[le]=0),ee.value[ue]){case"(":case"[":case"{":he[le]++;break;case")":case"]":case"}":he[le]--,he[le]===-1&&(ce="bracket",ne=!0);break}}else ee.type.indexOf("tag-name")!==-1&&(isNaN(he[ee.value])&&(he[ee.value]=0),G.value==="<"&&Z>1?he[ee.value]++:G.value==="</"&&he[ee.value]--,he[ee.value]===-1&&(ce="tag",ne=!0));ne||(G=ee,Z++,ee=V.stepForward(),ue=0)}while(ee&&!ne);if(ce){var _e,Ae;if(ce==="bracket")_e=this.session.getBracketRange(B),_e||(_e=new h(V.getCurrentTokenRow(),V.getCurrentTokenColumn()+ue-1,V.getCurrentTokenRow(),V.getCurrentTokenColumn()+ue-1),Ae=_e.start,(N||Ae.row===B.row&&Math.abs(Ae.column-B.column)<2)&&(_e=this.session.getBracketRange(Ae)));else if(ce==="tag"){if(!ee||ee.type.indexOf("tag-name")===-1)return;if(_e=new h(V.getCurrentTokenRow(),V.getCurrentTokenColumn()-2,V.getCurrentTokenRow(),V.getCurrentTokenColumn()-2),_e.compare(B.row,B.column)===0){var Me=this.session.getMatchingTags(B);Me&&(Me.openTag.contains(B.row,B.column)?(_e=Me.closeTag,Ae=_e.start):(_e=Me.openTag,Me.closeTag.start.row===B.row&&Me.closeTag.start.column===B.column?Ae=_e.end:Ae=_e.start))}Ae=Ae||_e.start}Ae=_e&&_e.cursor||Ae,Ae&&(S?_e&&N?this.selection.setRange(_e):_e&&_e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Ae.row,Ae.column):this.selection.moveTo(Ae.row,Ae.column))}}},A.prototype.gotoLine=function(S,N,B){this.selection.clearSelection(),this.session.unfold({row:S-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(S-1,N||0),this.isRowFullyVisible(S-1)||this.scrollToLine(S-1,!0,B)},A.prototype.navigateTo=function(S,N){this.selection.moveTo(S,N)},A.prototype.navigateUp=function(S){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-S||-1,0)},A.prototype.navigateDown=function(S){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(S||1,0)},A.prototype.navigateLeft=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},A.prototype.navigateRight=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}this.clearSelection()},A.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},A.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},A.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},A.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},A.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},A.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},A.prototype.replace=function(S,N){N&&this.$search.set(N);var B=this.$search.find(this.session),V=0;return B&&(this.$tryReplace(B,S)&&(V=1),this.selection.setSelectionRange(B),this.renderer.scrollSelectionIntoView(B.start,B.end)),V},A.prototype.replaceAll=function(S,N){N&&this.$search.set(N);var B=this.$search.findAll(this.session),V=0;if(!B.length)return V;var G=this.getSelectionRange();this.selection.moveTo(0,0);for(var Z=B.length-1;Z>=0;--Z)this.$tryReplace(B[Z],S)&&V++;return this.selection.setSelectionRange(G),V},A.prototype.$tryReplace=function(S,N){var B=this.session.getTextRange(S);return N=this.$search.replace(B,N),N!==null?(S.end=this.session.replace(S,N),S):null},A.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},A.prototype.find=function(S,N,B){N||(N={}),typeof S=="string"||S instanceof RegExp?N.needle=S:typeof S=="object"&&v.mixin(N,S);var V=this.selection.getRange();N.needle==null&&(S=this.session.getTextRange(V)||this.$search.$options.needle,S||(V=this.session.getWordRange(V.start.row,V.start.column),S=this.session.getTextRange(V)),this.$search.set({needle:S})),this.$search.set(N),N.start||this.$search.set({start:V});var G=this.$search.find(this.session);if(N.preventScroll)return G;if(G)return this.revealRange(G,B),G;N.backwards?V.start=V.end:V.end=V.start,this.selection.setRange(V)},A.prototype.findNext=function(S,N){this.find({skipCurrent:!0,backwards:!1},S,N)},A.prototype.findPrevious=function(S,N){this.find(S,{skipCurrent:!0,backwards:!0},N)},A.prototype.revealRange=function(S,N){this.session.unfold(S),this.selection.setSelectionRange(S);var B=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(S.start,S.end,.5),N!==!1&&this.renderer.animateScrolling(B)},A.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(S){S.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},A.prototype.setAutoScrollEditorIntoView=function(S){if(S){var N,B=this,V=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var G=this.$scrollAnchor;G.style.cssText="position:absolute",this.container.insertBefore(G,this.container.firstChild);var Z=this.on("changeSelection",function(){V=!0}),ee=this.renderer.on("beforeRender",function(){V&&(N=B.renderer.container.getBoundingClientRect())}),ce=this.renderer.on("afterRender",function(){if(V&&N&&(B.isFocused()||B.searchBox&&B.searchBox.isFocused())){var ne=B.renderer,he=ne.$cursorLayer.$pixelPos,ue=ne.layerConfig,le=he.top-ue.offset;he.top>=0&&le+N.top<0?V=!0:he.top<ue.height&&he.top+N.top+ue.lineHeight>window.innerHeight?V=!1:V=null,V!=null&&(G.style.top=le+"px",G.style.left=he.left+"px",G.style.height=ue.lineHeight+"px",G.scrollIntoView(V)),V=N=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Z),this.renderer.off("afterRender",ce),this.renderer.off("beforeRender",ee))}}},A.prototype.$resetCursorStyle=function(){var S=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(S)),N.isBlinking=!this.$readOnly&&S!="wide",x.setCssClass(N.element,"ace_slim-cursors",/slim/.test(S)))},A.prototype.prompt=function(S,N,B){var V=this;T.loadModule("ace/ext/prompt",function(G){G.prompt(V,S,N,B)})},A}();F.$uid=0,F.prototype.curOp=null,F.prototype.prevOp={},F.prototype.$mergeableCommands=["backspace","del","insertstring"],F.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],v.implement(F.prototype,m),T.defineOptions(F.prototype,"editor",{selectionStyle:{set:function(A){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:A})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(A){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(A){var S=this;if(this.textInput.setReadOnly(A),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(B){var V=!1;if(B&&B.type=="keydown"){if(B&&B.key&&!B.ctrlKey&&!B.metaKey&&(B.key==" "&&B.preventDefault(),V=B.key.length==1),!V)return}else B&&B.type!=="exec"&&(V=!0);if(V){S.hoverTooltip||(S.hoverTooltip=new z);var G=x.createElement("div");G.textContent=E("editor.tooltip.disable-editing","Editing is disabled"),S.hoverTooltip.isOpen||S.hoverTooltip.showForRange(S,S.getSelectionRange(),G)}else S.hoverTooltip&&S.hoverTooltip.isOpen&&S.hoverTooltip.hide()});var N=this.textInput.getElement();A?(L.addListener(N,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(L.removeListener(N,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(A){this.textInput.setCopyWithEmptySelection(A)},initialValue:!1},cursorStyle:{set:function(A){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(A){this.setAutoScrollEditorIntoView(A)}},keyboardHandler:{set:function(A){this.setKeyboardHandler(A)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(A){this.session.setValue(A)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(A){this.setSession(A)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(A){this.renderer.$gutterLayer.setShowLineNumbers(A),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),A&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(A){this.$showLineNumbers&&A?O.attach(this):O.detach(this)}},placeholder:{set:function(A){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var S=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(S&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),x.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!S&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),x.addCssClass(this.container,"ace_hasPlaceholder");var N=x.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!S&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(A){var S={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(V){V.blur(),V.renderer.scroller.focus()},readOnly:!0},N=function(V){if(V.target==this.renderer.scroller&&V.keyCode===I.enter){V.preventDefault();var G=this.getCursorPosition().row;this.isRowVisible(G)||this.scrollToLine(G,!0,!0),this.focus()}},B;A?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(d.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",E("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",E("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",N.bind(this)),this.commands.addCommand(S),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",E("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",E("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),B||(B=new w(this)),B.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",N.bind(this)),this.commands.removeCommand(S),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),B&&B.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(A){this.$textInputAriaLabel=A},initialValue:""},enableMobileMenu:{set:function(A){this.$enableMobileMenu=A},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var O={getText:function(A,S){return(Math.abs(A.selection.lead.row-S)||S+1+(S<9?"·":""))+""},getWidth:function(A,S,N){return Math.max(S.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function(A,S){S.renderer.$loop.schedule(S.renderer.CHANGE_GUTTER)},attach:function(A){A.renderer.$gutterLayer.$renderer=this,A.on("changeSelection",this.update),this.update(null,A)},detach:function(A){A.renderer.$gutterLayer.$renderer==this&&(A.renderer.$gutterLayer.$renderer=null),A.off("changeSelection",this.update),this.update(null,A)}};u.Editor=F}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,u,$){var b=e("../lib/dom"),v=function(){function x(p,d){this.element=p,this.canvasHeight=d||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return x.prototype.moveContainer=function(p){b.translate(this.element,0,-(p.firstRowScreen*p.lineHeight%this.canvasHeight)-p.offset*this.$offsetCoefficient)},x.prototype.pageChanged=function(p,d){return Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)!==Math.floor(d.firstRowScreen*d.lineHeight/this.canvasHeight)},x.prototype.computeLineTop=function(p,d,o){var a=d.firstRowScreen*d.lineHeight,s=Math.floor(a/this.canvasHeight),r=o.documentToScreenRow(p,0)*d.lineHeight;return r-s*this.canvasHeight},x.prototype.computeLineHeight=function(p,d,o){return d.lineHeight*o.getRowLineCount(p)},x.prototype.getLength=function(){return this.cells.length},x.prototype.get=function(p){return this.cells[p]},x.prototype.shift=function(){this.$cacheCell(this.cells.shift())},x.prototype.pop=function(){this.$cacheCell(this.cells.pop())},x.prototype.push=function(p){if(Array.isArray(p)){this.cells.push.apply(this.cells,p);for(var d=b.createFragment(this.element),o=0;o<p.length;o++)d.appendChild(p[o].element);this.element.appendChild(d)}else this.cells.push(p),this.element.appendChild(p.element)},x.prototype.unshift=function(p){if(Array.isArray(p)){this.cells.unshift.apply(this.cells,p);for(var d=b.createFragment(this.element),o=0;o<p.length;o++)d.appendChild(p[o].element);this.element.firstChild?this.element.insertBefore(d,this.element.firstChild):this.element.appendChild(d)}else this.cells.unshift(p),this.element.insertAdjacentElement("afterbegin",p.element)},x.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},x.prototype.$cacheCell=function(p){p&&(p.element.remove(),this.cellCache.push(p))},x.prototype.createCell=function(p,d,o,a){var s=this.cellCache.pop();if(!s){var r=b.createElement("div");a&&a(r),this.element.appendChild(r),s={element:r,text:"",row:p}}return s.row=p,s},x}();u.Lines=v}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(e,u,$){var b=e("../lib/dom"),v=e("../lib/oop"),x=e("../lib/lang"),p=e("../lib/event_emitter").EventEmitter,d=e("./lines").Lines,o=e("../config").nls,a=function(){function r(n){this.$showCursorMarker=null,this.element=b.createElement("div"),this.element.className="ace_layer ace_gutter-layer",n.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new d(this.element),this.$lines.$offsetCoefficient=1}return r.prototype.setSession=function(n){this.session&&this.session.off("change",this.$updateAnnotations),this.session=n,n&&n.on("change",this.$updateAnnotations)},r.prototype.addGutterDecoration=function(n,i){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(n,i)},r.prototype.removeGutterDecoration=function(n,i){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(n,i)},r.prototype.setAnnotations=function(n){this.$annotations=[];for(var i=0;i<n.length;i++){var h=n[i],m=h.row,y=this.$annotations[m];y||(y=this.$annotations[m]={text:[],type:[],displayText:[]});var R=h.text,T=h.text,C=h.type;R=R?x.escapeHTML(R):h.html||"",T=T||h.html||"",y.text.indexOf(R)===-1&&(y.text.push(R),y.type.push(C),y.displayText.push(T));var w=h.className;w?y.className=w:C==="error"?y.className=" ace_error":C==="security"&&!/\bace_error\b/.test(y.className)?y.className=" ace_security":C==="warning"&&!/\bace_(error|security)\b/.test(y.className)?y.className=" ace_warning":C==="info"&&!y.className?y.className=" ace_info":C==="hint"&&!y.className&&(y.className=" ace_hint")}},r.prototype.$updateAnnotations=function(n){if(this.$annotations.length){var i=n.start.row,h=n.end.row-i;if(h!==0)if(n.action=="remove")this.$annotations.splice(i,h+1,null);else{var m=new Array(h+1);m.unshift(i,1),this.$annotations.splice.apply(this.$annotations,m)}}},r.prototype.update=function(n){this.config=n;var i=this.session,h=n.firstRow,m=Math.min(n.lastRow+n.gutterOffset,i.getLength()-1);this.oldLastRow=m,this.config=n,this.$lines.moveContainer(n),this.$updateCursorRow();for(var y=i.getNextFoldLine(h),R=y?y.start.row:1/0,T=null,C=-1,w=h;;){if(w>R&&(w=y.end.row+1,y=i.getNextFoldLine(w,y),R=y?y.start.row:1/0),w>m){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}T=this.$lines.get(++C),T?T.row=w:(T=this.$lines.createCell(w,n,this.session,s),this.$lines.push(T)),this.$renderCell(T,n,y,w),w++}this._signal("afterRender"),this.$updateGutterWidth(n),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},r.prototype.$updateGutterWidth=function(n){var i=this.session,h=i.gutterRenderer||this.$renderer,m=i.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||i.$useWrapMode)&&(y=i.getLength()+m-1);var R=h?h.getWidth(i,y,n):y.toString().length*n.characterWidth,T=this.$padding||this.$computePadding();R+=T.left+T.right,R!==this.gutterWidth&&!isNaN(R)&&(this.gutterWidth=R,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",R))},r.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var n=this.session.selection.getCursor();this.$cursorRow!==n.row&&(this.$cursorRow=n.row)}},r.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var n=this.session.selection.cursor.row;if(this.$cursorRow=n,!(this.$cursorCell&&this.$cursorCell.row==n)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var i=this.$lines.cells;this.$cursorCell=null;for(var h=0;h<i.length;h++){var m=i[h];if(m.row>=this.$cursorRow){if(m.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(h>0&&y&&y.start.row==i[h-1].row)m=i[h-1];else break}m.element.className="ace_gutter-active-line "+m.element.className,this.$cursorCell=m;break}}}}},r.prototype.$updateCursorMarker=function(){if(this.session){var n=this.session;this.$highlightElement||(this.$highlightElement=b.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var i=n.selection.cursor,h=this.config,m=this.$lines,y=h.firstRowScreen*h.lineHeight,R=Math.floor(y/m.canvasHeight),T=n.documentToScreenRow(i)*h.lineHeight,C=T-R*m.canvasHeight;b.setStyle(this.$highlightElement.style,"height",h.lineHeight+"px"),b.setStyle(this.$highlightElement.style,"top",C+"px")}},r.prototype.scrollLines=function(n){var i=this.config;if(this.config=n,this.$updateCursorRow(),this.$lines.pageChanged(i,n))return this.update(n);this.$lines.moveContainer(n);var h=Math.min(n.lastRow+n.gutterOffset,this.session.getLength()-1),m=this.oldLastRow;if(this.oldLastRow=h,!i||m<n.firstRow)return this.update(n);if(h<i.firstRow)return this.update(n);if(i.firstRow<n.firstRow)for(var y=this.session.getFoldedRowCount(i.firstRow,n.firstRow-1);y>0;y--)this.$lines.shift();if(m>h)for(var y=this.session.getFoldedRowCount(h+1,m);y>0;y--)this.$lines.pop();n.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLines(n,n.firstRow,i.firstRow-1)),h>m&&this.$lines.push(this.$renderLines(n,m+1,h)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(n)},r.prototype.$renderLines=function(n,i,h){for(var m=[],y=i,R=this.session.getNextFoldLine(y),T=R?R.start.row:1/0;y>T&&(y=R.end.row+1,R=this.session.getNextFoldLine(y,R),T=R?R.start.row:1/0),!(y>h);){var C=this.$lines.createCell(y,n,this.session,s);this.$renderCell(C,n,R,y),m.push(C),y++}return m},r.prototype.$renderCell=function(n,i,h,m){var y=n.element,R=this.session,T=y.childNodes[0],C=y.childNodes[1],w=y.childNodes[2],E=y.childNodes[3],D=w.firstChild,I=R.$firstLineNumber,L=R.$breakpoints,z=R.$decorations,F=R.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&R.foldWidgets,A=h?h.start.row:Number.MAX_VALUE,S=i.lineHeight+"px",N=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",B=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",V=(F?F.getText(R,m):m+I).toString();if(this.$highlightGutterLine&&(m==this.$cursorRow||h&&m<this.$cursorRow&&m>=A&&this.$cursorRow<=h.end.row)&&(N+="ace_gutter-active-line ",this.$cursorCell!=n&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=n)),L[m]&&(N+=L[m]),z[m]&&(N+=z[m]),this.$annotations[m]&&m!==A&&(N+=this.$annotations[m].className),O){var G=O[m];G==null&&(G=O[m]=R.getFoldWidget(m))}if(G){var Z="ace_fold-widget ace_"+G,ee=G=="start"&&m==A&&m<h.end.row;if(ee){Z+=" ace_closed";for(var ce="",ne=!1,he=m+1;he<=h.end.row;he++)if(this.$annotations[he]){if(this.$annotations[he].className===" ace_error"){ne=!0,ce=" ace_error_fold";break}this.$annotations[he].className===" ace_security"?(ne=!0,ce=" ace_security_fold"):this.$annotations[he].className===" ace_warning"&&ce!==" ace_security_fold"&&(ne=!0,ce=" ace_warning_fold")}N+=ce}else Z+=" ace_open";C.className!=Z&&(C.className=Z),b.setStyle(C.style,"height",S),b.setStyle(C.style,"display","inline-block"),C.setAttribute("role","button"),C.setAttribute("tabindex","-1");var ue=R.getFoldWidgetRange(m);ue?C.setAttribute("aria-label",o("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ue.start.row+1,ue.end.row+1])):h?C.setAttribute("aria-label",o("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[h.start.row+1,h.end.row+1])):C.setAttribute("aria-label",o("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[m+1])),ee?(C.setAttribute("aria-expanded","false"),C.setAttribute("title",o("gutter.code-folding.closed.title","Unfold code"))):(C.setAttribute("aria-expanded","true"),C.setAttribute("title",o("gutter.code-folding.open.title","Fold code")))}else C&&(b.setStyle(C.style,"display","none"),C.setAttribute("tabindex","0"),C.removeAttribute("role"),C.removeAttribute("aria-label"));var le=this.session.$gutterCustomWidgets[m];if(le?this.$addCustomWidget(m,le,n):E&&this.$removeCustomWidget(m,n),ne&&this.$showFoldedAnnotations){w.className="ace_gutter_annotation",D.className=B,D.className+=ce,b.setStyle(D.style,"height",S),b.setStyle(w.style,"display","block"),b.setStyle(w.style,"height",S);var me;switch(ce){case" ace_error_fold":me=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[V]);break;case" ace_security_fold":me=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[V]);break;case" ace_warning_fold":me=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[V]);break}w.setAttribute("aria-label",me),w.setAttribute("tabindex","-1"),w.setAttribute("role","button")}else if(this.$annotations[m]){w.className="ace_gutter_annotation",D.className=B,this.$useSvgGutterIcons?D.className+=this.$annotations[m].className:y.classList.add(this.$annotations[m].className.replace(" ","")),b.setStyle(D.style,"height",S),b.setStyle(w.style,"display","block"),b.setStyle(w.style,"height",S);var me;switch(this.$annotations[m].className){case" ace_error":me=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[V]);break;case" ace_security":me=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[V]);break;case" ace_warning":me=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[V]);break;case" ace_info":me=o("gutter.annotation.aria-label.info","Info, read annotations row $0",[V]);break;case" ace_hint":me=o("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[V]);break}w.setAttribute("aria-label",me),w.setAttribute("tabindex","-1"),w.setAttribute("role","button")}else b.setStyle(w.style,"display","none"),w.removeAttribute("aria-label"),w.removeAttribute("role"),w.setAttribute("tabindex","0");return V!==T.data&&(T.data=V),y.className!=N&&(y.className=N),b.setStyle(n.element.style,"height",this.$lines.computeLineHeight(m,i,R)+"px"),b.setStyle(n.element.style,"top",this.$lines.computeLineTop(m,i,R)+"px"),n.text=V,w.style.display==="none"&&C.style.display==="none"&&!le?n.element.setAttribute("aria-hidden",!0):n.element.setAttribute("aria-hidden",!1),n},r.prototype.setHighlightGutterLine=function(n){this.$highlightGutterLine=n,!n&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},r.prototype.setShowLineNumbers=function(n){this.$renderer=!n&&{getWidth:function(){return 0},getText:function(){return""}}},r.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},r.prototype.setShowFoldWidgets=function(n){n?b.addCssClass(this.element,"ace_folding-enabled"):b.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=n,this.$padding=null},r.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},r.prototype.$hideFoldWidget=function(n,i){var h=i||this.$getGutterCell(n);if(h&&h.element){var m=h.element.childNodes[1];m&&b.setStyle(m.style,"display","none")}},r.prototype.$showFoldWidget=function(n,i){var h=i||this.$getGutterCell(n);if(h&&h.element){var m=h.element.childNodes[1];m&&this.session.foldWidgets&&this.session.foldWidgets[h.row]&&b.setStyle(m.style,"display","inline-block")}},r.prototype.$getGutterCell=function(n){var i=this.$lines.cells,h=0,m=i.length-1;if(!(n<i[0].row||n>i[m].row)){for(;h<=m;){var y=Math.floor((h+m)/2),R=i[y];if(R.row>n)m=y-1;else if(R.row<n)h=y+1;else return R}return R}},r.prototype.$addCustomWidget=function(n,i,h){var m=i.className,y=i.label,R=i.title,T=i.callbacks;this.session.$gutterCustomWidgets[n]={className:m,label:y,title:R,callbacks:T},this.$hideFoldWidget(n,h);var C=h||this.$getGutterCell(n);if(C&&C.element){var w=C.element.querySelector(".ace_custom-widget");w&&w.remove(),w=b.createElement("span"),w.className="ace_custom-widget ".concat(m),w.setAttribute("tabindex","-1"),w.setAttribute("role","button"),w.setAttribute("aria-label",y),w.setAttribute("title",R),b.setStyle(w.style,"display","inline-block"),b.setStyle(w.style,"height","inherit"),T&&T.onClick&&w.addEventListener("click",function(E){T.onClick(E,n),E.stopPropagation()}),C.element.appendChild(w)}},r.prototype.$removeCustomWidget=function(n,i){delete this.session.$gutterCustomWidgets[n],this.$showFoldWidget(n,i);var h=i||this.$getGutterCell(n);if(h&&h.element){var m=h.element.querySelector(".ace_custom-widget");m&&h.element.removeChild(m)}},r.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var n=b.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(n.borderLeftWidth)||0)+(parseInt(n.paddingLeft)||0)+1,this.$padding.right=(parseInt(n.borderRightWidth)||0)+(parseInt(n.paddingRight)||0),this.$padding},r.prototype.getRegion=function(n){var i=this.$padding||this.$computePadding(),h=this.element.getBoundingClientRect();if(n.x<i.left+h.left)return"markers";if(this.$showFoldWidgets&&n.x>h.right-i.right)return"foldWidgets"},r}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer=void 0,a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,v.implement(a.prototype,p);function s(r){var n=document.createTextNode("");r.appendChild(n);var i=b.createElement("span");r.appendChild(i);var h=b.createElement("span");r.appendChild(h);var m=b.createElement("span");return h.appendChild(m),r}u.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,u,$){var b=e("../range").Range,v=e("../lib/dom"),x=function(){function d(o){this.element=v.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return d.prototype.setPadding=function(o){this.$padding=o},d.prototype.setSession=function(o){this.session=o},d.prototype.setMarkers=function(o){this.markers=o},d.prototype.elt=function(o,a){var s=this.i!=-1&&this.element.childNodes[this.i];s?this.i++:(s=document.createElement("div"),this.element.appendChild(s),this.i=-1),s.style.cssText=a,s.className=o},d.prototype.update=function(o){if(o){this.config=o,this.i=0;var a;for(var s in this.markers){var r=this.markers[s];if(!r.range){r.update(a,this,this.session,o);continue}var n=r.range.clipRows(o.firstRow,o.lastRow);if(!n.isEmpty())if(n=n.toScreenRange(this.session),r.renderer){var i=this.$getTop(n.start.row,o),h=this.$padding+n.start.column*o.characterWidth;r.renderer(a,n,h,i,o)}else r.type=="fullLine"?this.drawFullLineMarker(a,n,r.clazz,o):r.type=="screenLine"?this.drawScreenLineMarker(a,n,r.clazz,o):n.isMultiLine()?r.type=="text"?this.drawTextMarker(a,n,r.clazz,o):this.drawMultiLineMarker(a,n,r.clazz,o):this.drawSingleLineMarker(a,n,r.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},d.prototype.$getTop=function(o,a){return(o-a.firstRowScreen)*a.lineHeight},d.prototype.drawTextMarker=function(o,a,s,r,n){for(var i=this.session,h=a.start.row,m=a.end.row,y=h,R=0,T=0,C=i.getScreenLastRowColumn(y),w=new b(y,a.start.column,y,T);y<=m;y++)w.start.row=w.end.row=y,w.start.column=y==h?a.start.column:i.getRowWrapIndent(y),w.end.column=C,R=T,T=C,C=y+1<m?i.getScreenLastRowColumn(y+1):y==m?0:a.end.column,this.drawSingleLineMarker(o,w,s+(y==h?" ace_start":"")+" ace_br"+p(y==h||y==h+1&&a.start.column,R<T,T>C,y==m),r,y==m?0:1,n)},d.prototype.drawMultiLineMarker=function(o,a,s,r,n){var i=this.$padding,h=r.lineHeight,m=this.$getTop(a.start.row,r),y=i+a.start.column*r.characterWidth;if(n=n||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var R=a.clone();R.end.row=R.start.row,R.end.column=this.session.getLine(R.start.row).length,this.drawBidiSingleLineMarker(o,R,s+" ace_br1 ace_start",r,null,n)}else this.elt(s+" ace_br1 ace_start","height:"+h+"px;right:"+i+"px;top:"+m+"px;left:"+y+"px;"+(n||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var R=a.clone();R.start.row=R.end.row,R.start.column=0,this.drawBidiSingleLineMarker(o,R,s+" ace_br12",r,null,n)}else{m=this.$getTop(a.end.row,r);var T=a.end.column*r.characterWidth;this.elt(s+" ace_br12","height:"+h+"px;width:"+T+"px;top:"+m+"px;left:"+i+"px;"+(n||""))}if(h=(a.end.row-a.start.row-1)*r.lineHeight,!(h<=0)){m=this.$getTop(a.start.row+1,r);var C=(a.start.column?1:0)|(a.end.column?0:8);this.elt(s+(C?" ace_br"+C:""),"height:"+h+"px;right:"+i+"px;top:"+m+"px;left:"+i+"px;"+(n||""))}},d.prototype.drawSingleLineMarker=function(o,a,s,r,n,i){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(o,a,s,r,n,i);var h=r.lineHeight,m=(a.end.column+(n||0)-a.start.column)*r.characterWidth,y=this.$getTop(a.start.row,r),R=this.$padding+a.start.column*r.characterWidth;this.elt(s,"height:"+h+"px;width:"+m+"px;top:"+y+"px;left:"+R+"px;"+(i||""))},d.prototype.drawBidiSingleLineMarker=function(o,a,s,r,n,i){var h=r.lineHeight,m=this.$getTop(a.start.row,r),y=this.$padding,R=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);R.forEach(function(T){this.elt(s,"height:"+h+"px;width:"+(T.width+(n||0))+"px;top:"+m+"px;left:"+(y+T.left)+"px;"+(i||""))},this)},d.prototype.drawFullLineMarker=function(o,a,s,r,n){var i=this.$getTop(a.start.row,r),h=r.lineHeight;a.start.row!=a.end.row&&(h+=this.$getTop(a.end.row,r)-i),this.elt(s,"height:"+h+"px;top:"+i+"px;left:0;right:0;"+(n||""))},d.prototype.drawScreenLineMarker=function(o,a,s,r,n){var i=this.$getTop(a.start.row,r),h=r.lineHeight;this.elt(s,"height:"+h+"px;top:"+i+"px;left:0;right:0;"+(n||""))},d}();x.prototype.$padding=0;function p(d,o,a,s){return(d?1:0)|(o?2:0)|(a?4:0)|(s?8:0)}u.Marker=x}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,u,$){var b=new Set(["text","rparen","lparen"]);u.isTextToken=function(v){return b.has(v)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,u,$){var b=e("../lib/oop"),v=e("../lib/dom"),x=e("../lib/lang"),p=e("./lines").Lines,d=e("../lib/event_emitter").EventEmitter,o=e("../config").nls,a=e("./text_util").isTextToken,s=function(){function r(n){this.dom=v,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",n.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new p(this.element)}return r.prototype.$updateEolChar=function(){var n=this.session.doc,i=n.getNewLineCharacter()==`
|
|
213
|
+
`){var ue=W.getLine(G.row);if(G.column>ue.search(/\S|$/)){var ce=ue.substr(G.column).search(/\S|$/);W.doc.removeInLine(G.row,G.column,G.column+ce)}}this.clearSelection();var ne=G.column,he=W.getState(G.row),ue=W.getLine(G.row),le=V.checkOutdent(he,ue,S);if(W.insert(G,S),Z&&Z.selection&&(Z.selection.length==2?this.selection.setSelectionRange(new h(G.row,ne+Z.selection[0],G.row,ne+Z.selection[1])):this.selection.setSelectionRange(new h(G.row+Z.selection[0],Z.selection[1],G.row+Z.selection[2],Z.selection[3]))),this.$enableAutoIndent){if(W.getDocument().isNewLine(S)){var me=V.getNextLineIndent(he,ue.slice(0,G.column),W.getTabString());W.insert({row:G.row+1,column:0},me)}le&&V.autoOutdent(he,W,G.row)}},A.prototype.autoIndent=function(){for(var S=this.session,N=S.getMode(),W=this.selection.isEmpty()?[new h(0,0,S.doc.getLength()-1,0)]:this.selection.getAllRanges(),V="",G="",Z="",ee=S.getTabString(),ce=0;ce<W.length;ce++)for(var ne=W[ce].start.row,he=W[ce].end.row,ue=ne;ue<=he;ue++){ue>0&&(V=S.getState(ue-1),G=S.getLine(ue-1),Z=N.getNextLineIndent(V,G,ee));var le=S.getLine(ue),me=N.$getIndent(le);if(Z!==me){if(me.length>0){var _e=new h(ue,0,ue,me.length);S.remove(_e)}Z.length>0&&S.insert({row:ue,column:0},Z)}N.autoOutdent(V,S,ue)}},A.prototype.onTextInput=function(S,N){if(!N)return this.keyBinding.onTextInput(S);this.startOperation({command:{name:"insertstring"}});var W=this.applyComposition.bind(this,S,N);this.selection.rangeCount?this.forEachSelection(W):W(),this.endOperation()},A.prototype.applyComposition=function(S,N){if(N.extendLeft||N.extendRight){var W=this.selection.getRange();W.start.column-=N.extendLeft,W.end.column+=N.extendRight,W.start.column<0&&(W.start.row--,W.start.column+=this.session.getLine(W.start.row).length+1),this.selection.setRange(W),!S&&!W.isEmpty()&&this.remove()}if((S||!this.selection.isEmpty())&&this.insert(S,!0),N.restoreStart||N.restoreEnd){var W=this.selection.getRange();W.start.column-=N.restoreStart,W.end.column-=N.restoreEnd,this.selection.setRange(W)}},A.prototype.onCommandKey=function(S,N,W){return this.keyBinding.onCommandKey(S,N,W)},A.prototype.setOverwrite=function(S){this.session.setOverwrite(S)},A.prototype.getOverwrite=function(){return this.session.getOverwrite()},A.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},A.prototype.setScrollSpeed=function(S){this.setOption("scrollSpeed",S)},A.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},A.prototype.setDragDelay=function(S){this.setOption("dragDelay",S)},A.prototype.getDragDelay=function(){return this.getOption("dragDelay")},A.prototype.setSelectionStyle=function(S){this.setOption("selectionStyle",S)},A.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},A.prototype.setHighlightActiveLine=function(S){this.setOption("highlightActiveLine",S)},A.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},A.prototype.setHighlightGutterLine=function(S){this.setOption("highlightGutterLine",S)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.setHighlightSelectedWord=function(S){this.setOption("highlightSelectedWord",S)},A.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},A.prototype.setAnimatedScroll=function(S){this.renderer.setAnimatedScroll(S)},A.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},A.prototype.setShowInvisibles=function(S){this.renderer.setShowInvisibles(S)},A.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},A.prototype.setDisplayIndentGuides=function(S){this.renderer.setDisplayIndentGuides(S)},A.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},A.prototype.setHighlightIndentGuides=function(S){this.renderer.setHighlightIndentGuides(S)},A.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},A.prototype.setShowPrintMargin=function(S){this.renderer.setShowPrintMargin(S)},A.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},A.prototype.setPrintMarginColumn=function(S){this.renderer.setPrintMarginColumn(S)},A.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},A.prototype.setReadOnly=function(S){this.setOption("readOnly",S)},A.prototype.getReadOnly=function(){return this.getOption("readOnly")},A.prototype.setBehavioursEnabled=function(S){this.setOption("behavioursEnabled",S)},A.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},A.prototype.setWrapBehavioursEnabled=function(S){this.setOption("wrapBehavioursEnabled",S)},A.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},A.prototype.setShowFoldWidgets=function(S){this.setOption("showFoldWidgets",S)},A.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},A.prototype.setFadeFoldWidgets=function(S){this.setOption("fadeFoldWidgets",S)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.remove=function(S){this.selection.isEmpty()&&(S=="left"?this.selection.selectLeft():this.selection.selectRight());var N=this.getSelectionRange();if(this.getBehavioursEnabled()){var W=this.session,V=W.getState(N.start.row),G=W.getMode().transformAction(V,"deletion",this,W,N);if(N.end.column===0){var Z=W.getTextRange(N);if(Z[Z.length-1]==`
|
|
214
|
+
`){var ee=W.getLine(N.end.row);/^\s+$/.test(ee)&&(N.end.column=ee.length)}}G&&(N=G)}this.session.remove(N),this.clearSelection()},A.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var S=this.getSelectionRange();S.start.column==S.end.column&&S.start.row==S.end.row&&(S.end.column=0,S.end.row++),this.session.remove(S),this.clearSelection()},A.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var S=this.getCursorPosition();this.insert(`
|
|
215
|
+
`),this.moveCursorToPosition(S)},A.prototype.setGhostText=function(S,N){this.renderer.setGhostText(S,N)},A.prototype.removeGhostText=function(){this.renderer.removeGhostText()},A.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var S=this.getCursorPosition(),N=S.column;if(N!==0){var W=this.session.getLine(S.row),V,G;N<W.length?(V=W.charAt(N)+W.charAt(N-1),G=new h(S.row,N-1,S.row,N+1)):(V=W.charAt(N-1)+W.charAt(N-2),G=new h(S.row,N-2,S.row,N)),this.session.replace(G,V),this.session.selection.moveToPosition(G.end)}}},A.prototype.toLowerCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),W=this.session.getTextRange(N);this.session.replace(N,W.toLowerCase()),this.selection.setSelectionRange(S)},A.prototype.toUpperCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),W=this.session.getTextRange(N);this.session.replace(N,W.toUpperCase()),this.selection.setSelectionRange(S)},A.prototype.indent=function(){var S=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var W=this.$getSelectedRows();S.indentRows(W.first,W.last," ");return}else if(N.start.column<N.end.column){var V=S.getTextRange(N);if(!/^\s+$/.test(V)){var W=this.$getSelectedRows();S.indentRows(W.first,W.last," ");return}}var G=S.getLine(N.start.row),Z=N.start,ee=S.getTabSize(),ce=S.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=ee-ce%ee,he=p.stringRepeat(" ",ne);else{for(var ne=ce%ee;G[N.start.column-1]==" "&≠)N.start.column--,ne--;this.selection.setSelectionRange(N),he=" "}return this.insert(he)},A.prototype.blockIndent=function(){var S=this.$getSelectedRows();this.session.indentRows(S.first,S.last," ")},A.prototype.blockOutdent=function(){var S=this.session.getSelection();this.session.outdentRows(S.getRange())},A.prototype.sortLines=function(){for(var S=this.$getSelectedRows(),N=this.session,W=[],V=S.first;V<=S.last;V++)W.push(N.getLine(V));W.sort(function(ee,ce){return ee.toLowerCase()<ce.toLowerCase()?-1:ee.toLowerCase()>ce.toLowerCase()?1:0});for(var G=new h(0,0,0,0),V=S.first;V<=S.last;V++){var Z=N.getLine(V);G.start.row=V,G.end.row=V,G.end.column=Z.length,N.replace(G,W[V-S.first])}},A.prototype.toggleCommentLines=function(){var S=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(S,this.session,N.first,N.last)},A.prototype.toggleBlockComment=function(){var S=this.getCursorPosition(),N=this.session.getState(S.row),W=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,W,S)},A.prototype.getNumberAt=function(S,N){var W=/[\-]?[0-9]+(?:\.[0-9]+)?/g;W.lastIndex=0;for(var V=this.session.getLine(S);W.lastIndex<N;){var G=W.exec(V);if(G.index<=N&&G.index+G[0].length>=N){var Z={value:G[0],start:G.index,end:G.index+G[0].length};return Z}}return null},A.prototype.modifyNumber=function(S){var N=this.selection.getCursor().row,W=this.selection.getCursor().column,V=new h(N,W-1,N,W),G=this.session.getTextRange(V);if(!isNaN(parseFloat(G))&&isFinite(G)){var Z=this.getNumberAt(N,W);if(Z){var ee=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,ce=Z.start+Z.value.length-ee,ne=parseFloat(Z.value);ne*=Math.pow(10,ce),ee!==Z.end&&W<ee?S*=Math.pow(10,Z.end-W-1):S*=Math.pow(10,Z.end-W),ne+=S,ne/=Math.pow(10,ce);var he=ne.toFixed(ce),ue=new h(N,Z.start,N,Z.end);this.session.replace(ue,he),this.moveCursorTo(N,Math.max(Z.start+1,W+he.length-Z.value.length))}}else this.toggleWord()},A.prototype.toggleWord=function(){var S=this.selection.getCursor().row,N=this.selection.getCursor().column;this.selection.selectWord();var W=this.getSelectedText(),V=this.selection.getWordRange().start.column,G=W.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Z=N-V-1;Z<0&&(Z=0);var ee=0,ce=0,ne=this;W.match(/[A-Za-z0-9_]+/)&&G.forEach(function(Ve,ot){ce=ee+Ve.length,Z>=ee&&Z<=ce&&(W=Ve,ne.selection.clearSelection(),ne.moveCursorTo(S,ee+V),ne.selection.selectTo(S,ce+V)),ee=ce});for(var he=this.$toggleWordPairs,ue,le=0;le<he.length;le++)for(var me=he[le],_e=0;_e<=1;_e++){var Ae=+!_e,Me=W.match(new RegExp("^\\s?_?("+p.escapeRegExp(me[_e])+")\\s?$","i"));if(Me){var qe=W.match(new RegExp("([_]|^|\\s)("+p.escapeRegExp(Me[1])+")($|\\s)","g"));qe&&(ue=W.replace(new RegExp(p.escapeRegExp(me[_e]),"i"),function(Ve){var ot=me[Ae];return Ve.toUpperCase()==Ve?ot=ot.toUpperCase():Ve.charAt(0).toUpperCase()==Ve.charAt(0)&&(ot=ot.substr(0,0)+me[Ae].charAt(0).toUpperCase()+ot.substr(1)),ot}),this.insert(ue),ue="")}}},A.prototype.findLinkAt=function(S,N){var W,V,G=this.session.getLine(S),Z=G.split(/((?:https?|ftp):\/\/[\S]+)/),ee=N;ee<0&&(ee=0);var ce=0,ne=0,he;try{for(var ue=b(Z),le=ue.next();!le.done;le=ue.next()){var me=le.value;if(ne=ce+me.length,ee>=ce&&ee<=ne&&me.match(/((?:https?|ftp):\/\/[\S]+)/)){he=me.replace(/[\s:.,'";}\]]+$/,"");break}ce=ne}}catch(_e){W={error:_e}}finally{try{le&&!le.done&&(V=ue.return)&&V.call(ue)}finally{if(W)throw W.error}}return he},A.prototype.openLink=function(){var S=this.selection.getCursor(),N=this.findLinkAt(S.row,S.column);return N&&window.open(N,"_blank"),N!=null},A.prototype.removeLines=function(){var S=this.$getSelectedRows();this.session.removeFullLines(S.first,S.last),this.clearSelection()},A.prototype.duplicateSelection=function(){var S=this.selection,N=this.session,W=S.getRange(),V=S.isBackwards();if(W.isEmpty()){var G=W.start.row;N.duplicateLines(G,G)}else{var Z=V?W.start:W.end,ee=N.insert(Z,N.getTextRange(W));W.start=Z,W.end=ee,S.setSelectionRange(W,V)}},A.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},A.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},A.prototype.moveText=function(S,N,W){return this.session.moveText(S,N,W)},A.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},A.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},A.prototype.$moveLines=function(S,N){var W,V,G=this.selection;if(!G.inMultiSelectMode||this.inVirtualSelectionMode){var Z=G.toOrientedRange();W=this.$getSelectedRows(Z),V=this.session.$moveLines(W.first,W.last,N?0:S),N&&S==-1&&(V=0),Z.moveBy(V,0),G.fromOrientedRange(Z)}else{var ee=G.rangeList.ranges;G.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var ce=0,ne=0,he=ee.length,ue=0;ue<he;ue++){var le=ue;ee[ue].moveBy(ce,0),W=this.$getSelectedRows(ee[ue]);for(var me=W.first,_e=W.last;++ue<he;){ne&&ee[ue].moveBy(ne,0);var Ae=this.$getSelectedRows(ee[ue]);if(N&&Ae.first!=_e)break;if(!N&&Ae.first>_e+1)break;_e=Ae.last}for(ue--,ce=this.session.$moveLines(me,_e,N?0:S),N&&S==-1&&(le=ue+1);le<=ue;)ee[le].moveBy(ce,0),le++;N||(ce=0),ne+=ce}G.fromOrientedRange(G.ranges[0]),G.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},A.prototype.$getSelectedRows=function(S){return S=(S||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(S.start.row),last:this.session.getRowFoldEnd(S.end.row)}},A.prototype.onCompositionStart=function(S){this.renderer.showComposition(S)},A.prototype.onCompositionUpdate=function(S){this.renderer.setCompositionText(S)},A.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},A.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},A.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},A.prototype.isRowVisible=function(S){return S>=this.getFirstVisibleRow()&&S<=this.getLastVisibleRow()},A.prototype.isRowFullyVisible=function(S){return S>=this.renderer.getFirstFullyVisibleRow()&&S<=this.renderer.getLastFullyVisibleRow()},A.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},A.prototype.$moveByPage=function(S,N){var W=this.renderer,V=this.renderer.layerConfig,G=S*Math.floor(V.height/V.lineHeight);N===!0?this.selection.$moveSelection(function(){this.moveCursorBy(G,0)}):N===!1&&(this.selection.moveCursorBy(G,0),this.selection.clearSelection());var Z=W.scrollTop;W.scrollBy(0,G*V.lineHeight),N!=null&&W.scrollCursorIntoView(null,.5),W.animateScrolling(Z)},A.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},A.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},A.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},A.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},A.prototype.scrollPageDown=function(){this.$moveByPage(1)},A.prototype.scrollPageUp=function(){this.$moveByPage(-1)},A.prototype.scrollToRow=function(S){this.renderer.scrollToRow(S)},A.prototype.scrollToLine=function(S,N,W,V){this.renderer.scrollToLine(S,N,W,V)},A.prototype.centerSelection=function(){var S=this.getSelectionRange(),N={row:Math.floor(S.start.row+(S.end.row-S.start.row)/2),column:Math.floor(S.start.column+(S.end.column-S.start.column)/2)};this.renderer.alignCursor(N,.5)},A.prototype.getCursorPosition=function(){return this.selection.getCursor()},A.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},A.prototype.getSelectionRange=function(){return this.selection.getRange()},A.prototype.selectAll=function(){this.selection.selectAll()},A.prototype.clearSelection=function(){this.selection.clearSelection()},A.prototype.moveCursorTo=function(S,N){this.selection.moveCursorTo(S,N)},A.prototype.moveCursorToPosition=function(S){this.selection.moveCursorToPosition(S)},A.prototype.jumpToMatching=function(S,N){var W=this.getCursorPosition(),V=new C(this.session,W.row,W.column),G=V.getCurrentToken(),Z=0;G&&G.type.indexOf("tag-name")!==-1&&(G=V.stepBackward());var ee=G||V.stepForward();if(ee){var ce,ne=!1,he={},ue=W.column-ee.start,le,me={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(ee.value.match(/[{}()\[\]]/g)){for(;ue<ee.value.length&&!ne;ue++)if(me[ee.value[ue]])switch(le=me[ee.value[ue]]+"."+ee.type.replace("rparen","lparen"),isNaN(he[le])&&(he[le]=0),ee.value[ue]){case"(":case"[":case"{":he[le]++;break;case")":case"]":case"}":he[le]--,he[le]===-1&&(ce="bracket",ne=!0);break}}else ee.type.indexOf("tag-name")!==-1&&(isNaN(he[ee.value])&&(he[ee.value]=0),G.value==="<"&&Z>1?he[ee.value]++:G.value==="</"&&he[ee.value]--,he[ee.value]===-1&&(ce="tag",ne=!0));ne||(G=ee,Z++,ee=V.stepForward(),ue=0)}while(ee&&!ne);if(ce){var _e,Ae;if(ce==="bracket")_e=this.session.getBracketRange(W),_e||(_e=new h(V.getCurrentTokenRow(),V.getCurrentTokenColumn()+ue-1,V.getCurrentTokenRow(),V.getCurrentTokenColumn()+ue-1),Ae=_e.start,(N||Ae.row===W.row&&Math.abs(Ae.column-W.column)<2)&&(_e=this.session.getBracketRange(Ae)));else if(ce==="tag"){if(!ee||ee.type.indexOf("tag-name")===-1)return;if(_e=new h(V.getCurrentTokenRow(),V.getCurrentTokenColumn()-2,V.getCurrentTokenRow(),V.getCurrentTokenColumn()-2),_e.compare(W.row,W.column)===0){var Me=this.session.getMatchingTags(W);Me&&(Me.openTag.contains(W.row,W.column)?(_e=Me.closeTag,Ae=_e.start):(_e=Me.openTag,Me.closeTag.start.row===W.row&&Me.closeTag.start.column===W.column?Ae=_e.end:Ae=_e.start))}Ae=Ae||_e.start}Ae=_e&&_e.cursor||Ae,Ae&&(S?_e&&N?this.selection.setRange(_e):_e&&_e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Ae.row,Ae.column):this.selection.moveTo(Ae.row,Ae.column))}}},A.prototype.gotoLine=function(S,N,W){this.selection.clearSelection(),this.session.unfold({row:S-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(S-1,N||0),this.isRowFullyVisible(S-1)||this.scrollToLine(S-1,!0,W)},A.prototype.navigateTo=function(S,N){this.selection.moveTo(S,N)},A.prototype.navigateUp=function(S){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-S||-1,0)},A.prototype.navigateDown=function(S){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(S||1,0)},A.prototype.navigateLeft=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},A.prototype.navigateRight=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}this.clearSelection()},A.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},A.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},A.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},A.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},A.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},A.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},A.prototype.replace=function(S,N){N&&this.$search.set(N);var W=this.$search.find(this.session),V=0;return W&&(this.$tryReplace(W,S)&&(V=1),this.selection.setSelectionRange(W),this.renderer.scrollSelectionIntoView(W.start,W.end)),V},A.prototype.replaceAll=function(S,N){N&&this.$search.set(N);var W=this.$search.findAll(this.session),V=0;if(!W.length)return V;var G=this.getSelectionRange();this.selection.moveTo(0,0);for(var Z=W.length-1;Z>=0;--Z)this.$tryReplace(W[Z],S)&&V++;return this.selection.setSelectionRange(G),V},A.prototype.$tryReplace=function(S,N){var W=this.session.getTextRange(S);return N=this.$search.replace(W,N),N!==null?(S.end=this.session.replace(S,N),S):null},A.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},A.prototype.find=function(S,N,W){N||(N={}),typeof S=="string"||S instanceof RegExp?N.needle=S:typeof S=="object"&&v.mixin(N,S);var V=this.selection.getRange();N.needle==null&&(S=this.session.getTextRange(V)||this.$search.$options.needle,S||(V=this.session.getWordRange(V.start.row,V.start.column),S=this.session.getTextRange(V)),this.$search.set({needle:S})),this.$search.set(N),N.start||this.$search.set({start:V});var G=this.$search.find(this.session);if(N.preventScroll)return G;if(G)return this.revealRange(G,W),G;N.backwards?V.start=V.end:V.end=V.start,this.selection.setRange(V)},A.prototype.findNext=function(S,N){this.find({skipCurrent:!0,backwards:!1},S,N)},A.prototype.findPrevious=function(S,N){this.find(S,{skipCurrent:!0,backwards:!0},N)},A.prototype.revealRange=function(S,N){this.session.unfold(S),this.selection.setSelectionRange(S);var W=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(S.start,S.end,.5),N!==!1&&this.renderer.animateScrolling(W)},A.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(S){S.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},A.prototype.setAutoScrollEditorIntoView=function(S){if(S){var N,W=this,V=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var G=this.$scrollAnchor;G.style.cssText="position:absolute",this.container.insertBefore(G,this.container.firstChild);var Z=this.on("changeSelection",function(){V=!0}),ee=this.renderer.on("beforeRender",function(){V&&(N=W.renderer.container.getBoundingClientRect())}),ce=this.renderer.on("afterRender",function(){if(V&&N&&(W.isFocused()||W.searchBox&&W.searchBox.isFocused())){var ne=W.renderer,he=ne.$cursorLayer.$pixelPos,ue=ne.layerConfig,le=he.top-ue.offset;he.top>=0&&le+N.top<0?V=!0:he.top<ue.height&&he.top+N.top+ue.lineHeight>window.innerHeight?V=!1:V=null,V!=null&&(G.style.top=le+"px",G.style.left=he.left+"px",G.style.height=ue.lineHeight+"px",G.scrollIntoView(V)),V=N=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Z),this.renderer.off("afterRender",ce),this.renderer.off("beforeRender",ee))}}},A.prototype.$resetCursorStyle=function(){var S=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(S)),N.isBlinking=!this.$readOnly&&S!="wide",x.setCssClass(N.element,"ace_slim-cursors",/slim/.test(S)))},A.prototype.prompt=function(S,N,W){var V=this;T.loadModule("ace/ext/prompt",function(G){G.prompt(V,S,N,W)})},A}();F.$uid=0,F.prototype.curOp=null,F.prototype.prevOp={},F.prototype.$mergeableCommands=["backspace","del","insertstring"],F.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],v.implement(F.prototype,m),T.defineOptions(F.prototype,"editor",{selectionStyle:{set:function(A){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:A})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(A){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(A){var S=this;if(this.textInput.setReadOnly(A),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(W){var V=!1;if(W&&W.type=="keydown"){if(W&&W.key&&!W.ctrlKey&&!W.metaKey&&(W.key==" "&&W.preventDefault(),V=W.key.length==1),!V)return}else W&&W.type!=="exec"&&(V=!0);if(V){S.hoverTooltip||(S.hoverTooltip=new z);var G=x.createElement("div");G.textContent=E("editor.tooltip.disable-editing","Editing is disabled"),S.hoverTooltip.isOpen||S.hoverTooltip.showForRange(S,S.getSelectionRange(),G)}else S.hoverTooltip&&S.hoverTooltip.isOpen&&S.hoverTooltip.hide()});var N=this.textInput.getElement();A?(L.addListener(N,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(L.removeListener(N,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(A){this.textInput.setCopyWithEmptySelection(A)},initialValue:!1},cursorStyle:{set:function(A){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(A){this.setAutoScrollEditorIntoView(A)}},keyboardHandler:{set:function(A){this.setKeyboardHandler(A)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(A){this.session.setValue(A)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(A){this.setSession(A)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(A){this.renderer.$gutterLayer.setShowLineNumbers(A),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),A&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(A){this.$showLineNumbers&&A?O.attach(this):O.detach(this)}},placeholder:{set:function(A){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var S=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(S&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),x.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!S&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),x.addCssClass(this.container,"ace_hasPlaceholder");var N=x.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!S&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(A){var S={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(V){V.blur(),V.renderer.scroller.focus()},readOnly:!0},N=function(V){if(V.target==this.renderer.scroller&&V.keyCode===I.enter){V.preventDefault();var G=this.getCursorPosition().row;this.isRowVisible(G)||this.scrollToLine(G,!0,!0),this.focus()}},W;A?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(d.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",E("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",E("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",N.bind(this)),this.commands.addCommand(S),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",E("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",E("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),W||(W=new w(this)),W.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",N.bind(this)),this.commands.removeCommand(S),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),W&&W.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(A){this.$textInputAriaLabel=A},initialValue:""},enableMobileMenu:{set:function(A){this.$enableMobileMenu=A},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var O={getText:function(A,S){return(Math.abs(A.selection.lead.row-S)||S+1+(S<9?"·":""))+""},getWidth:function(A,S,N){return Math.max(S.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function(A,S){S.renderer.$loop.schedule(S.renderer.CHANGE_GUTTER)},attach:function(A){A.renderer.$gutterLayer.$renderer=this,A.on("changeSelection",this.update),this.update(null,A)},detach:function(A){A.renderer.$gutterLayer.$renderer==this&&(A.renderer.$gutterLayer.$renderer=null),A.off("changeSelection",this.update),this.update(null,A)}};u.Editor=F}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,u,$){var b=e("../lib/dom"),v=function(){function x(p,d){this.element=p,this.canvasHeight=d||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return x.prototype.moveContainer=function(p){b.translate(this.element,0,-(p.firstRowScreen*p.lineHeight%this.canvasHeight)-p.offset*this.$offsetCoefficient)},x.prototype.pageChanged=function(p,d){return Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)!==Math.floor(d.firstRowScreen*d.lineHeight/this.canvasHeight)},x.prototype.computeLineTop=function(p,d,o){var a=d.firstRowScreen*d.lineHeight,s=Math.floor(a/this.canvasHeight),r=o.documentToScreenRow(p,0)*d.lineHeight;return r-s*this.canvasHeight},x.prototype.computeLineHeight=function(p,d,o){return d.lineHeight*o.getRowLineCount(p)},x.prototype.getLength=function(){return this.cells.length},x.prototype.get=function(p){return this.cells[p]},x.prototype.shift=function(){this.$cacheCell(this.cells.shift())},x.prototype.pop=function(){this.$cacheCell(this.cells.pop())},x.prototype.push=function(p){if(Array.isArray(p)){this.cells.push.apply(this.cells,p);for(var d=b.createFragment(this.element),o=0;o<p.length;o++)d.appendChild(p[o].element);this.element.appendChild(d)}else this.cells.push(p),this.element.appendChild(p.element)},x.prototype.unshift=function(p){if(Array.isArray(p)){this.cells.unshift.apply(this.cells,p);for(var d=b.createFragment(this.element),o=0;o<p.length;o++)d.appendChild(p[o].element);this.element.firstChild?this.element.insertBefore(d,this.element.firstChild):this.element.appendChild(d)}else this.cells.unshift(p),this.element.insertAdjacentElement("afterbegin",p.element)},x.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},x.prototype.$cacheCell=function(p){p&&(p.element.remove(),this.cellCache.push(p))},x.prototype.createCell=function(p,d,o,a){var s=this.cellCache.pop();if(!s){var r=b.createElement("div");a&&a(r),this.element.appendChild(r),s={element:r,text:"",row:p}}return s.row=p,s},x}();u.Lines=v}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(e,u,$){var b=e("../lib/dom"),v=e("../lib/oop"),x=e("../lib/lang"),p=e("../lib/event_emitter").EventEmitter,d=e("./lines").Lines,o=e("../config").nls,a=function(){function r(n){this.$showCursorMarker=null,this.element=b.createElement("div"),this.element.className="ace_layer ace_gutter-layer",n.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new d(this.element),this.$lines.$offsetCoefficient=1}return r.prototype.setSession=function(n){this.session&&this.session.off("change",this.$updateAnnotations),this.session=n,n&&n.on("change",this.$updateAnnotations)},r.prototype.addGutterDecoration=function(n,i){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(n,i)},r.prototype.removeGutterDecoration=function(n,i){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(n,i)},r.prototype.setAnnotations=function(n){this.$annotations=[];for(var i=0;i<n.length;i++){var h=n[i],m=h.row,y=this.$annotations[m];y||(y=this.$annotations[m]={text:[],type:[],displayText:[]});var R=h.text,T=h.text,C=h.type;R=R?x.escapeHTML(R):h.html||"",T=T||h.html||"",y.text.indexOf(R)===-1&&(y.text.push(R),y.type.push(C),y.displayText.push(T));var w=h.className;w?y.className=w:C==="error"?y.className=" ace_error":C==="security"&&!/\bace_error\b/.test(y.className)?y.className=" ace_security":C==="warning"&&!/\bace_(error|security)\b/.test(y.className)?y.className=" ace_warning":C==="info"&&!y.className?y.className=" ace_info":C==="hint"&&!y.className&&(y.className=" ace_hint")}},r.prototype.$updateAnnotations=function(n){if(this.$annotations.length){var i=n.start.row,h=n.end.row-i;if(h!==0)if(n.action=="remove")this.$annotations.splice(i,h+1,null);else{var m=new Array(h+1);m.unshift(i,1),this.$annotations.splice.apply(this.$annotations,m)}}},r.prototype.update=function(n){this.config=n;var i=this.session,h=n.firstRow,m=Math.min(n.lastRow+n.gutterOffset,i.getLength()-1);this.oldLastRow=m,this.config=n,this.$lines.moveContainer(n),this.$updateCursorRow();for(var y=i.getNextFoldLine(h),R=y?y.start.row:1/0,T=null,C=-1,w=h;;){if(w>R&&(w=y.end.row+1,y=i.getNextFoldLine(w,y),R=y?y.start.row:1/0),w>m){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}T=this.$lines.get(++C),T?T.row=w:(T=this.$lines.createCell(w,n,this.session,s),this.$lines.push(T)),this.$renderCell(T,n,y,w),w++}this._signal("afterRender"),this.$updateGutterWidth(n),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},r.prototype.$updateGutterWidth=function(n){var i=this.session,h=i.gutterRenderer||this.$renderer,m=i.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||i.$useWrapMode)&&(y=i.getLength()+m-1);var R=h?h.getWidth(i,y,n):y.toString().length*n.characterWidth,T=this.$padding||this.$computePadding();R+=T.left+T.right,R!==this.gutterWidth&&!isNaN(R)&&(this.gutterWidth=R,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",R))},r.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var n=this.session.selection.getCursor();this.$cursorRow!==n.row&&(this.$cursorRow=n.row)}},r.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var n=this.session.selection.cursor.row;if(this.$cursorRow=n,!(this.$cursorCell&&this.$cursorCell.row==n)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var i=this.$lines.cells;this.$cursorCell=null;for(var h=0;h<i.length;h++){var m=i[h];if(m.row>=this.$cursorRow){if(m.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(h>0&&y&&y.start.row==i[h-1].row)m=i[h-1];else break}m.element.className="ace_gutter-active-line "+m.element.className,this.$cursorCell=m;break}}}}},r.prototype.$updateCursorMarker=function(){if(this.session){var n=this.session;this.$highlightElement||(this.$highlightElement=b.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var i=n.selection.cursor,h=this.config,m=this.$lines,y=h.firstRowScreen*h.lineHeight,R=Math.floor(y/m.canvasHeight),T=n.documentToScreenRow(i)*h.lineHeight,C=T-R*m.canvasHeight;b.setStyle(this.$highlightElement.style,"height",h.lineHeight+"px"),b.setStyle(this.$highlightElement.style,"top",C+"px")}},r.prototype.scrollLines=function(n){var i=this.config;if(this.config=n,this.$updateCursorRow(),this.$lines.pageChanged(i,n))return this.update(n);this.$lines.moveContainer(n);var h=Math.min(n.lastRow+n.gutterOffset,this.session.getLength()-1),m=this.oldLastRow;if(this.oldLastRow=h,!i||m<n.firstRow)return this.update(n);if(h<i.firstRow)return this.update(n);if(i.firstRow<n.firstRow)for(var y=this.session.getFoldedRowCount(i.firstRow,n.firstRow-1);y>0;y--)this.$lines.shift();if(m>h)for(var y=this.session.getFoldedRowCount(h+1,m);y>0;y--)this.$lines.pop();n.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLines(n,n.firstRow,i.firstRow-1)),h>m&&this.$lines.push(this.$renderLines(n,m+1,h)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(n)},r.prototype.$renderLines=function(n,i,h){for(var m=[],y=i,R=this.session.getNextFoldLine(y),T=R?R.start.row:1/0;y>T&&(y=R.end.row+1,R=this.session.getNextFoldLine(y,R),T=R?R.start.row:1/0),!(y>h);){var C=this.$lines.createCell(y,n,this.session,s);this.$renderCell(C,n,R,y),m.push(C),y++}return m},r.prototype.$renderCell=function(n,i,h,m){var y=n.element,R=this.session,T=y.childNodes[0],C=y.childNodes[1],w=y.childNodes[2],E=y.childNodes[3],D=w.firstChild,I=R.$firstLineNumber,L=R.$breakpoints,z=R.$decorations,F=R.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&R.foldWidgets,A=h?h.start.row:Number.MAX_VALUE,S=i.lineHeight+"px",N=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",W=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",V=(F?F.getText(R,m):m+I).toString();if(this.$highlightGutterLine&&(m==this.$cursorRow||h&&m<this.$cursorRow&&m>=A&&this.$cursorRow<=h.end.row)&&(N+="ace_gutter-active-line ",this.$cursorCell!=n&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=n)),L[m]&&(N+=L[m]),z[m]&&(N+=z[m]),this.$annotations[m]&&m!==A&&(N+=this.$annotations[m].className),O){var G=O[m];G==null&&(G=O[m]=R.getFoldWidget(m))}if(G){var Z="ace_fold-widget ace_"+G,ee=G=="start"&&m==A&&m<h.end.row;if(ee){Z+=" ace_closed";for(var ce="",ne=!1,he=m+1;he<=h.end.row;he++)if(this.$annotations[he]){if(this.$annotations[he].className===" ace_error"){ne=!0,ce=" ace_error_fold";break}this.$annotations[he].className===" ace_security"?(ne=!0,ce=" ace_security_fold"):this.$annotations[he].className===" ace_warning"&&ce!==" ace_security_fold"&&(ne=!0,ce=" ace_warning_fold")}N+=ce}else Z+=" ace_open";C.className!=Z&&(C.className=Z),b.setStyle(C.style,"height",S),b.setStyle(C.style,"display","inline-block"),C.setAttribute("role","button"),C.setAttribute("tabindex","-1");var ue=R.getFoldWidgetRange(m);ue?C.setAttribute("aria-label",o("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ue.start.row+1,ue.end.row+1])):h?C.setAttribute("aria-label",o("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[h.start.row+1,h.end.row+1])):C.setAttribute("aria-label",o("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[m+1])),ee?(C.setAttribute("aria-expanded","false"),C.setAttribute("title",o("gutter.code-folding.closed.title","Unfold code"))):(C.setAttribute("aria-expanded","true"),C.setAttribute("title",o("gutter.code-folding.open.title","Fold code")))}else C&&(b.setStyle(C.style,"display","none"),C.setAttribute("tabindex","0"),C.removeAttribute("role"),C.removeAttribute("aria-label"));var le=this.session.$gutterCustomWidgets[m];if(le?this.$addCustomWidget(m,le,n):E&&this.$removeCustomWidget(m,n),ne&&this.$showFoldedAnnotations){w.className="ace_gutter_annotation",D.className=W,D.className+=ce,b.setStyle(D.style,"height",S),b.setStyle(w.style,"display","block"),b.setStyle(w.style,"height",S);var me;switch(ce){case" ace_error_fold":me=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[V]);break;case" ace_security_fold":me=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[V]);break;case" ace_warning_fold":me=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[V]);break}w.setAttribute("aria-label",me),w.setAttribute("tabindex","-1"),w.setAttribute("role","button")}else if(this.$annotations[m]){w.className="ace_gutter_annotation",D.className=W,this.$useSvgGutterIcons?D.className+=this.$annotations[m].className:y.classList.add(this.$annotations[m].className.replace(" ","")),b.setStyle(D.style,"height",S),b.setStyle(w.style,"display","block"),b.setStyle(w.style,"height",S);var me;switch(this.$annotations[m].className){case" ace_error":me=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[V]);break;case" ace_security":me=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[V]);break;case" ace_warning":me=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[V]);break;case" ace_info":me=o("gutter.annotation.aria-label.info","Info, read annotations row $0",[V]);break;case" ace_hint":me=o("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[V]);break}w.setAttribute("aria-label",me),w.setAttribute("tabindex","-1"),w.setAttribute("role","button")}else b.setStyle(w.style,"display","none"),w.removeAttribute("aria-label"),w.removeAttribute("role"),w.setAttribute("tabindex","0");return V!==T.data&&(T.data=V),y.className!=N&&(y.className=N),b.setStyle(n.element.style,"height",this.$lines.computeLineHeight(m,i,R)+"px"),b.setStyle(n.element.style,"top",this.$lines.computeLineTop(m,i,R)+"px"),n.text=V,w.style.display==="none"&&C.style.display==="none"&&!le?n.element.setAttribute("aria-hidden",!0):n.element.setAttribute("aria-hidden",!1),n},r.prototype.setHighlightGutterLine=function(n){this.$highlightGutterLine=n,!n&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},r.prototype.setShowLineNumbers=function(n){this.$renderer=!n&&{getWidth:function(){return 0},getText:function(){return""}}},r.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},r.prototype.setShowFoldWidgets=function(n){n?b.addCssClass(this.element,"ace_folding-enabled"):b.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=n,this.$padding=null},r.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},r.prototype.$hideFoldWidget=function(n,i){var h=i||this.$getGutterCell(n);if(h&&h.element){var m=h.element.childNodes[1];m&&b.setStyle(m.style,"display","none")}},r.prototype.$showFoldWidget=function(n,i){var h=i||this.$getGutterCell(n);if(h&&h.element){var m=h.element.childNodes[1];m&&this.session.foldWidgets&&this.session.foldWidgets[h.row]&&b.setStyle(m.style,"display","inline-block")}},r.prototype.$getGutterCell=function(n){var i=this.$lines.cells,h=0,m=i.length-1;if(!(n<i[0].row||n>i[m].row)){for(;h<=m;){var y=Math.floor((h+m)/2),R=i[y];if(R.row>n)m=y-1;else if(R.row<n)h=y+1;else return R}return R}},r.prototype.$addCustomWidget=function(n,i,h){var m=i.className,y=i.label,R=i.title,T=i.callbacks;this.session.$gutterCustomWidgets[n]={className:m,label:y,title:R,callbacks:T},this.$hideFoldWidget(n,h);var C=h||this.$getGutterCell(n);if(C&&C.element){var w=C.element.querySelector(".ace_custom-widget");w&&w.remove(),w=b.createElement("span"),w.className="ace_custom-widget ".concat(m),w.setAttribute("tabindex","-1"),w.setAttribute("role","button"),w.setAttribute("aria-label",y),w.setAttribute("title",R),b.setStyle(w.style,"display","inline-block"),b.setStyle(w.style,"height","inherit"),T&&T.onClick&&w.addEventListener("click",function(E){T.onClick(E,n),E.stopPropagation()}),C.element.appendChild(w)}},r.prototype.$removeCustomWidget=function(n,i){delete this.session.$gutterCustomWidgets[n],this.$showFoldWidget(n,i);var h=i||this.$getGutterCell(n);if(h&&h.element){var m=h.element.querySelector(".ace_custom-widget");m&&h.element.removeChild(m)}},r.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var n=b.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(n.borderLeftWidth)||0)+(parseInt(n.paddingLeft)||0)+1,this.$padding.right=(parseInt(n.borderRightWidth)||0)+(parseInt(n.paddingRight)||0),this.$padding},r.prototype.getRegion=function(n){var i=this.$padding||this.$computePadding(),h=this.element.getBoundingClientRect();if(n.x<i.left+h.left)return"markers";if(this.$showFoldWidgets&&n.x>h.right-i.right)return"foldWidgets"},r}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer=void 0,a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,v.implement(a.prototype,p);function s(r){var n=document.createTextNode("");r.appendChild(n);var i=b.createElement("span");r.appendChild(i);var h=b.createElement("span");r.appendChild(h);var m=b.createElement("span");return h.appendChild(m),r}u.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,u,$){var b=e("../range").Range,v=e("../lib/dom"),x=function(){function d(o){this.element=v.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return d.prototype.setPadding=function(o){this.$padding=o},d.prototype.setSession=function(o){this.session=o},d.prototype.setMarkers=function(o){this.markers=o},d.prototype.elt=function(o,a){var s=this.i!=-1&&this.element.childNodes[this.i];s?this.i++:(s=document.createElement("div"),this.element.appendChild(s),this.i=-1),s.style.cssText=a,s.className=o},d.prototype.update=function(o){if(o){this.config=o,this.i=0;var a;for(var s in this.markers){var r=this.markers[s];if(!r.range){r.update(a,this,this.session,o);continue}var n=r.range.clipRows(o.firstRow,o.lastRow);if(!n.isEmpty())if(n=n.toScreenRange(this.session),r.renderer){var i=this.$getTop(n.start.row,o),h=this.$padding+n.start.column*o.characterWidth;r.renderer(a,n,h,i,o)}else r.type=="fullLine"?this.drawFullLineMarker(a,n,r.clazz,o):r.type=="screenLine"?this.drawScreenLineMarker(a,n,r.clazz,o):n.isMultiLine()?r.type=="text"?this.drawTextMarker(a,n,r.clazz,o):this.drawMultiLineMarker(a,n,r.clazz,o):this.drawSingleLineMarker(a,n,r.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},d.prototype.$getTop=function(o,a){return(o-a.firstRowScreen)*a.lineHeight},d.prototype.drawTextMarker=function(o,a,s,r,n){for(var i=this.session,h=a.start.row,m=a.end.row,y=h,R=0,T=0,C=i.getScreenLastRowColumn(y),w=new b(y,a.start.column,y,T);y<=m;y++)w.start.row=w.end.row=y,w.start.column=y==h?a.start.column:i.getRowWrapIndent(y),w.end.column=C,R=T,T=C,C=y+1<m?i.getScreenLastRowColumn(y+1):y==m?0:a.end.column,this.drawSingleLineMarker(o,w,s+(y==h?" ace_start":"")+" ace_br"+p(y==h||y==h+1&&a.start.column,R<T,T>C,y==m),r,y==m?0:1,n)},d.prototype.drawMultiLineMarker=function(o,a,s,r,n){var i=this.$padding,h=r.lineHeight,m=this.$getTop(a.start.row,r),y=i+a.start.column*r.characterWidth;if(n=n||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var R=a.clone();R.end.row=R.start.row,R.end.column=this.session.getLine(R.start.row).length,this.drawBidiSingleLineMarker(o,R,s+" ace_br1 ace_start",r,null,n)}else this.elt(s+" ace_br1 ace_start","height:"+h+"px;right:"+i+"px;top:"+m+"px;left:"+y+"px;"+(n||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var R=a.clone();R.start.row=R.end.row,R.start.column=0,this.drawBidiSingleLineMarker(o,R,s+" ace_br12",r,null,n)}else{m=this.$getTop(a.end.row,r);var T=a.end.column*r.characterWidth;this.elt(s+" ace_br12","height:"+h+"px;width:"+T+"px;top:"+m+"px;left:"+i+"px;"+(n||""))}if(h=(a.end.row-a.start.row-1)*r.lineHeight,!(h<=0)){m=this.$getTop(a.start.row+1,r);var C=(a.start.column?1:0)|(a.end.column?0:8);this.elt(s+(C?" ace_br"+C:""),"height:"+h+"px;right:"+i+"px;top:"+m+"px;left:"+i+"px;"+(n||""))}},d.prototype.drawSingleLineMarker=function(o,a,s,r,n,i){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(o,a,s,r,n,i);var h=r.lineHeight,m=(a.end.column+(n||0)-a.start.column)*r.characterWidth,y=this.$getTop(a.start.row,r),R=this.$padding+a.start.column*r.characterWidth;this.elt(s,"height:"+h+"px;width:"+m+"px;top:"+y+"px;left:"+R+"px;"+(i||""))},d.prototype.drawBidiSingleLineMarker=function(o,a,s,r,n,i){var h=r.lineHeight,m=this.$getTop(a.start.row,r),y=this.$padding,R=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);R.forEach(function(T){this.elt(s,"height:"+h+"px;width:"+(T.width+(n||0))+"px;top:"+m+"px;left:"+(y+T.left)+"px;"+(i||""))},this)},d.prototype.drawFullLineMarker=function(o,a,s,r,n){var i=this.$getTop(a.start.row,r),h=r.lineHeight;a.start.row!=a.end.row&&(h+=this.$getTop(a.end.row,r)-i),this.elt(s,"height:"+h+"px;top:"+i+"px;left:0;right:0;"+(n||""))},d.prototype.drawScreenLineMarker=function(o,a,s,r,n){var i=this.$getTop(a.start.row,r),h=r.lineHeight;this.elt(s,"height:"+h+"px;top:"+i+"px;left:0;right:0;"+(n||""))},d}();x.prototype.$padding=0;function p(d,o,a,s){return(d?1:0)|(o?2:0)|(a?4:0)|(s?8:0)}u.Marker=x}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,u,$){var b=new Set(["text","rparen","lparen"]);u.isTextToken=function(v){return b.has(v)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,u,$){var b=e("../lib/oop"),v=e("../lib/dom"),x=e("../lib/lang"),p=e("./lines").Lines,d=e("../lib/event_emitter").EventEmitter,o=e("../config").nls,a=e("./text_util").isTextToken,s=function(){function r(n){this.dom=v,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",n.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new p(this.element)}return r.prototype.$updateEolChar=function(){var n=this.session.doc,i=n.getNewLineCharacter()==`
|
|
216
216
|
`&&n.getNewLineMode()!="windows",h=i?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=h)return this.EOL_CHAR=h,!0},r.prototype.setPadding=function(n){this.$padding=n,this.element.style.margin="0 "+n+"px"},r.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},r.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},r.prototype.$setFontMetrics=function(n){this.$fontMetrics=n,this.$fontMetrics.on("changeCharacterSize",(function(i){this._signal("changeCharacterSize",i)}).bind(this)),this.$pollSizeChanges()},r.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},r.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},r.prototype.setSession=function(n){this.session=n,n&&this.$computeTabString()},r.prototype.setShowInvisibles=function(n){return this.showInvisibles==n?!1:(this.showInvisibles=n,typeof n=="string"?(this.showSpaces=/tab/i.test(n),this.showTabs=/space/i.test(n),this.showEOL=/eol/i.test(n)):this.showSpaces=this.showTabs=this.showEOL=n,this.$computeTabString(),!0)},r.prototype.setDisplayIndentGuides=function(n){return this.displayIndentGuides==n?!1:(this.displayIndentGuides=n,this.$computeTabString(),!0)},r.prototype.setHighlightIndentGuides=function(n){return this.$highlightIndentGuides===n?!1:(this.$highlightIndentGuides=n,n)},r.prototype.$computeTabString=function(){var n=this.session.getTabSize();this.tabSize=n;for(var i=this.$tabStrings=[0],h=1;h<n+1;h++)if(this.showTabs){var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_tab",m.textContent=x.stringRepeat(this.TAB_CHAR,h),i.push(m)}else i.push(this.dom.createTextNode(x.stringRepeat(" ",h),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var y="ace_indent-guide",R=this.showSpaces?" ace_invisible ace_invisible_space":"",T=this.showSpaces?x.stringRepeat(this.SPACE_CHAR,this.tabSize):x.stringRepeat(" ",this.tabSize),C=this.showTabs?" ace_invisible ace_invisible_tab":"",w=this.showTabs?x.stringRepeat(this.TAB_CHAR,this.tabSize):T,m=this.dom.createElement("span");m.className=y+R,m.textContent=T,this.$tabStrings[" "]=m;var m=this.dom.createElement("span");m.className=y+C,m.textContent=w,this.$tabStrings[" "]=m}},r.prototype.updateLines=function(n,i,h){if(this.config.lastRow!=n.lastRow||this.config.firstRow!=n.firstRow)return this.update(n);this.config=n;for(var m=Math.max(i,n.firstRow),y=Math.min(h,n.lastRow),R=this.element.childNodes,T=0,w=n.firstRow;w<m;w++){var E=this.session.getFoldLine(w);if(E)if(E.containsRow(m)){m=E.start.row;break}else w=E.end.row;T++}for(var C=!1,w=m,E=this.session.getNextFoldLine(w),D=E?E.start.row:1/0;w>D&&(w=E.end.row+1,E=this.session.getNextFoldLine(w,E),D=E?E.start.row:1/0),!(w>y);){var I=R[T++];if(I){this.dom.removeChildren(I),this.$renderLine(I,w,w==D?E:!1),C&&(I.style.top=this.$lines.computeLineTop(w,n,this.session)+"px");var L=n.lineHeight*this.session.getRowLength(w)+"px";I.style.height!=L&&(C=!0,I.style.height=L)}w++}if(C)for(;T<this.$lines.cells.length;){var z=this.$lines.cells[T++];z.element.style.top=this.$lines.computeLineTop(z.row,n,this.session)+"px"}},r.prototype.scrollLines=function(n){var i=this.config;if(this.config=n,this.$lines.pageChanged(i,n))return this.update(n);this.$lines.moveContainer(n);var h=n.lastRow,m=i?i.lastRow:-1;if(!i||m<n.firstRow)return this.update(n);if(h<i.firstRow)return this.update(n);if(!i||i.lastRow<n.firstRow)return this.update(n);if(n.lastRow<i.firstRow)return this.update(n);if(i.firstRow<n.firstRow)for(var y=this.session.getFoldedRowCount(i.firstRow,n.firstRow-1);y>0;y--)this.$lines.shift();if(i.lastRow>n.lastRow)for(var y=this.session.getFoldedRowCount(n.lastRow+1,i.lastRow);y>0;y--)this.$lines.pop();n.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLinesFragment(n,n.firstRow,i.firstRow-1)),n.lastRow>i.lastRow&&this.$lines.push(this.$renderLinesFragment(n,i.lastRow+1,n.lastRow)),this.$highlightIndentGuide()},r.prototype.$renderLinesFragment=function(n,i,h){for(var m=[],y=i,R=this.session.getNextFoldLine(y),T=R?R.start.row:1/0;y>T&&(y=R.end.row+1,R=this.session.getNextFoldLine(y,R),T=R?R.start.row:1/0),!(y>h);){var C=this.$lines.createCell(y,n,this.session),w=C.element;this.dom.removeChildren(w),v.setStyle(w.style,"height",this.$lines.computeLineHeight(y,n,this.session)+"px"),v.setStyle(w.style,"top",this.$lines.computeLineTop(y,n,this.session)+"px"),this.$renderLine(w,y,y==T?R:!1),this.$useLineGroups()?w.className="ace_line_group":w.className="ace_line",m.push(C),y++}return m},r.prototype.update=function(n){this.$lines.moveContainer(n),this.config=n;for(var i=n.firstRow,h=n.lastRow,m=this.$lines;m.getLength();)m.pop();m.push(this.$renderLinesFragment(n,i,h))},r.prototype.$renderToken=function(n,i,h,m){for(var y=this,R=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,T=this.dom.createFragment(this.element),C,w=0;C=R.exec(m);){var E=C[1],D=C[2],I=C[3],L=C[4],z=C[5];if(!(!y.showSpaces&&D)){var F=w!=C.index?m.slice(w,C.index):"";if(w=C.index+C[0].length,F&&T.appendChild(this.dom.createTextNode(F,this.element)),E){var O=y.session.getScreenTabSize(i+C.index),A=y.$tabStrings[O].cloneNode(!0);A.charCount=1,T.appendChild(A),i+=O-1}else if(D)if(y.showSpaces){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space",S.textContent=x.stringRepeat(y.SPACE_CHAR,D.length),T.appendChild(S)}else T.appendChild(this.dom.createTextNode(D,this.element));else if(I){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space ace_invalid",S.textContent=x.stringRepeat(y.SPACE_CHAR,I.length),T.appendChild(S)}else if(L){i+=1;var S=this.dom.createElement("span");S.style.width=y.config.characterWidth*2+"px",S.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",S.textContent=y.showSpaces?y.SPACE_CHAR:L,T.appendChild(S)}else if(z){i+=1;var S=this.dom.createElement("span");S.style.width=y.config.characterWidth*2+"px",S.className="ace_cjk",S.textContent=z,T.appendChild(S)}}}if(T.appendChild(this.dom.createTextNode(w?m.slice(w):m,this.element)),a(h.type))n.appendChild(T);else{var N="ace_"+h.type.replace(/\./g," ace_"),S=this.dom.createElement("span");h.type=="fold"&&(S.style.width=h.value.length*this.config.characterWidth+"px",S.setAttribute("title",o("inline-fold.closed.title","Unfold code"))),S.className=N,S.appendChild(T),n.appendChild(S)}return i+m.length},r.prototype.renderIndentGuide=function(n,i,h){var m=i.search(this.$indentGuideRe);if(m<=0||m>=h)return i;if(i[0]==" "){m-=m%this.tabSize;for(var y=m/this.tabSize,R=0;R<y;R++)n.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),i.substr(m)}else if(i[0]==" "){for(var R=0;R<m;R++)n.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),i.substr(m)}return this.$highlightIndentGuide(),i},r.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var n=this.session.doc.$lines;if(n){var i=this.session.selection.getCursor(),h=/^\s*/.exec(this.session.doc.getLine(i.row))[0].length,m=Math.floor(h/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:m,start:i.row};var y=this.session.$bracketHighlight;if(y){for(var R=this.session.$bracketHighlight.ranges,T=0;T<R.length;T++)if(i.row!==R[T].start.row){this.$highlightIndentGuideMarker.end=R[T].start.row+1,i.row>R[T].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&n[i.row]!==""&&i.column===n[i.row].length){this.$highlightIndentGuideMarker.dir=1;for(var T=i.row+1;T<n.length;T++){var C=n[T],w=/^\s*/.exec(C)[0].length;if(C!==""&&(this.$highlightIndentGuideMarker.end=T,w<=h))break}}this.$renderHighlightIndentGuide()}}},r.prototype.$clearActiveIndentGuide=function(){for(var n=this.element.querySelectorAll(".ace_indent-guide-active"),i=0;i<n.length;i++)n[i].classList.remove("ace_indent-guide-active")},r.prototype.$setIndentGuideActive=function(n,i){var h=this.session.doc.getLine(n.row);if(h!==""){var m=n.element;if(n.element.classList&&n.element.classList.contains("ace_line_group"))if(n.element.childNodes.length>0)m=n.element.childNodes[0];else return;var y=m.childNodes;if(y){var R=y[i-1];R&&R.classList&&R.classList.contains("ace_indent-guide")&&R.classList.add("ace_indent-guide-active")}}},r.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var n=this.$lines.cells;this.$clearActiveIndentGuide();var i=this.$highlightIndentGuideMarker.indentLevel;if(i!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var h=0;h<n.length;h++){var m=n[h];if(this.$highlightIndentGuideMarker.end&&m.row>=this.$highlightIndentGuideMarker.start+1){if(m.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,i)}}else for(var h=n.length-1;h>=0;h--){var m=n[h];if(this.$highlightIndentGuideMarker.end&&m.row<this.$highlightIndentGuideMarker.start){if(m.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,i)}}}},r.prototype.$createLineElement=function(n){var i=this.dom.createElement("div");return i.className="ace_line",i.style.height=this.config.lineHeight+"px",i},r.prototype.$renderWrappedLine=function(n,i,h){var m=0,y=0,R=h[0],T=0,C=this.$createLineElement();n.appendChild(C);for(var w=0;w<i.length;w++){var E=i[w],D=E.value;if(w==0&&this.displayIndentGuides){if(m=D.length,D=this.renderIndentGuide(C,D,R),!D)continue;m-=D.length}if(m+D.length<R)T=this.$renderToken(C,T,E,D),m+=D.length;else{for(;m+D.length>=R;){T=this.$renderToken(C,T,E,D.substring(0,R-m)),D=D.substring(R-m),m=R,C=this.$createLineElement(),n.appendChild(C);var I=this.dom.createTextNode(x.stringRepeat(" ",h.indent),this.element);I.charCount=0,C.appendChild(I),y++,T=0,R=h[y]||Number.MAX_VALUE}D.length!=0&&(m+=D.length,T=this.$renderToken(C,T,E,D))}}h[h.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,T,null,"",!0)},r.prototype.$renderSimpleLine=function(n,i){for(var h=0,m=0;m<i.length;m++){var y=i[m],R=y.value;if(!(m==0&&this.displayIndentGuides&&(R=this.renderIndentGuide(n,R),!R))){if(h+R.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(n,h,y,R);h=this.$renderToken(n,h,y,R)}}},r.prototype.$renderOverflowMessage=function(n,i,h,m,y){h&&this.$renderToken(n,i,h,m.slice(0,this.MAX_LINE_LENGTH-i));var R=this.dom.createElement("span");R.className="ace_inline_button ace_keyword ace_toggle_wrap",R.textContent=y?"<hide>":"<click to see more...>",n.appendChild(R)},r.prototype.$renderLine=function(n,i,h){if(!h&&h!=!1&&(h=this.session.getFoldLine(i)),h)var m=this.$getFoldLineTokens(i,h);else var m=this.session.getTokens(i);var y=n;if(m.length){var R=this.session.getRowSplitData(i);if(R&&R.length){this.$renderWrappedLine(n,m,R);var y=n.lastChild}else{var y=n;this.$useLineGroups()&&(y=this.$createLineElement(),n.appendChild(y)),this.$renderSimpleLine(y,m)}}else this.$useLineGroups()&&(y=this.$createLineElement(),n.appendChild(y));if(this.showEOL&&y){h&&(i=h.end.row);var T=this.dom.createElement("span");T.className="ace_invisible ace_invisible_eol",T.textContent=i==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild(T)}},r.prototype.$getFoldLineTokens=function(n,i){var h=this.session,m=[];function y(T,C,w){for(var E=0,D=0;D+T[E].value.length<C;)if(D+=T[E].value.length,E++,E==T.length)return;if(D!=C){var I=T[E].value.substring(C-D);I.length>w-C&&(I=I.substring(0,w-C)),m.push({type:T[E].type,value:I}),D=C+I.length,E+=1}for(;D<w&&E<T.length;){var I=T[E].value;I.length+D>w?m.push({type:T[E].type,value:I.substring(0,w-D)}):m.push(T[E]),D+=I.length,E+=1}}var R=h.getTokens(n);return i.walk(function(T,C,w,E,D){T!=null?m.push({type:"fold",value:T}):(D&&(R=h.getTokens(C)),R.length&&y(R,E,w))},i.end.row,this.session.getLine(i.end.row).length),m},r.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},r}();s.prototype.EOF_CHAR="¶",s.prototype.EOL_CHAR_LF="¬",s.prototype.EOL_CHAR_CRLF="¤",s.prototype.EOL_CHAR=s.prototype.EOL_CHAR_LF,s.prototype.TAB_CHAR="—",s.prototype.SPACE_CHAR="·",s.prototype.$padding=0,s.prototype.MAX_LINE_LENGTH=1e4,s.prototype.showInvisibles=!1,s.prototype.showSpaces=!1,s.prototype.showTabs=!1,s.prototype.showEOL=!1,s.prototype.displayIndentGuides=!0,s.prototype.$highlightIndentGuides=!0,s.prototype.$tabStrings=[],s.prototype.destroy={},s.prototype.onChangeTabSize=s.prototype.$computeTabString,b.implement(s.prototype,d),u.Text=s}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,u,$){var b=e("../lib/dom"),v=function(){function x(p){this.element=b.createElement("div"),this.element.className="ace_layer ace_cursor-layer",p.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),b.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return x.prototype.$updateOpacity=function(p){for(var d=this.cursors,o=d.length;o--;)b.setStyle(d[o].style,"opacity",p?"":"0")},x.prototype.$startCssAnimation=function(){for(var p=this.cursors,d=p.length;d--;)p[d].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&b.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},x.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,b.removeCssClass(this.element,"ace_animate-blinking")},x.prototype.setPadding=function(p){this.$padding=p},x.prototype.setSession=function(p){this.session=p},x.prototype.setBlinking=function(p){p!=this.isBlinking&&(this.isBlinking=p,this.restartTimer())},x.prototype.setBlinkInterval=function(p){p!=this.blinkInterval&&(this.blinkInterval=p,this.restartTimer())},x.prototype.setSmoothBlinking=function(p){p!=this.smoothBlinking&&(this.smoothBlinking=p,b.setCssClass(this.element,"ace_smooth-blinking",p),this.$updateCursors(!0),this.restartTimer())},x.prototype.addCursor=function(){var p=b.createElement("div");return p.className="ace_cursor",this.element.appendChild(p),this.cursors.push(p),p},x.prototype.removeCursor=function(){if(this.cursors.length>1){var p=this.cursors.pop();return p.parentNode.removeChild(p),p}},x.prototype.hideCursor=function(){this.isVisible=!1,b.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.showCursor=function(){this.isVisible=!0,b.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.restartTimer=function(){var p=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,b.removeCssClass(this.element,"ace_smooth-blinking")),p(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&b.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),b.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var d=(function(){this.timeoutId=setTimeout(function(){p(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){p(!0),d()},this.blinkInterval),d()}},x.prototype.getPixelPosition=function(p,d){if(!this.config||!this.session)return{left:0,top:0};p||(p=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(p),a=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,p.row)?this.session.$bidiHandler.getPosLeft(o.column):o.column*this.config.characterWidth),s=(o.row-(d?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:s}},x.prototype.isCursorInView=function(p,d){return p.top>=0&&p.top<d.maxHeight},x.prototype.update=function(p){this.config=p;var d=this.session.$selectionMarkers,o=0,a=0;(d===void 0||d.length===0)&&(d=[{cursor:null}]);for(var o=0,s=d.length;o<s;o++){var r=this.getPixelPosition(d[o].cursor,!0);if(!((r.top>p.height+p.offset||r.top<0)&&o>1)){var n=this.cursors[a++]||this.addCursor(),i=n.style;this.drawCursor?this.drawCursor(n,r,p,d[o],this.session):this.isCursorInView(r,p)?(b.setStyle(i,"display","block"),b.translate(n,r.left,r.top),b.setStyle(i,"width",Math.round(p.characterWidth)+"px"),b.setStyle(i,"height",p.lineHeight+"px")):b.setStyle(i,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=r,this.restartTimer()},x.prototype.$setOverwrite=function(p){p!=this.overwrite&&(this.overwrite=p,p?b.addCssClass(this.element,"ace_overwrite-cursors"):b.removeCssClass(this.element,"ace_overwrite-cursors"))},x.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},x}();v.prototype.$padding=0,v.prototype.drawCursor=null,u.Cursor=v}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,u,$){var b=this&&this.__extends||function(){var n=function(i,h){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var R in y)Object.prototype.hasOwnProperty.call(y,R)&&(m[R]=y[R])},n(i,h)};return function(i,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");n(i,h);function m(){this.constructor=i}i.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}}(),v=e("./lib/oop"),x=e("./lib/dom"),p=e("./lib/event"),d=e("./lib/event_emitter").EventEmitter,o=32768,a=function(){function n(i,h){this.element=x.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+h,this.inner=x.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,p.addListener(this.element,"scroll",this.onScroll.bind(this)),p.addListener(this.element,"mousedown",p.preventDefault)}return n.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},n}();v.implement(a.prototype,d);var s=function(n){b(i,n);function i(h,m){var y=n.call(this,h,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,m.$scrollbarWidth=y.width=x.scrollbarWidth(h.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return i.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var h=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-h)/(this.coeff-h)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(h){this.element.style.height=h+"px"},i.prototype.setScrollHeight=function(h){this.scrollHeight=h,h>o?(this.coeff=o/h,h=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=h+"px"},i.prototype.setScrollTop=function(h){this.scrollTop!=h&&(this.skipEvent=!0,this.scrollTop=h,this.element.scrollTop=h*this.coeff)},i}(a);s.prototype.setInnerHeight=s.prototype.setScrollHeight;var r=function(n){b(i,n);function i(h,m){var y=n.call(this,h,"-h")||this;return y.scrollLeft=0,y.height=m.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return i.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.setWidth=function(h){this.element.style.width=h+"px"},i.prototype.setInnerWidth=function(h){this.inner.style.width=h+"px"},i.prototype.setScrollWidth=function(h){this.inner.style.width=h+"px"},i.prototype.setScrollLeft=function(h){this.scrollLeft!=h&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=h)},i}(a);u.ScrollBar=s,u.ScrollBarV=s,u.ScrollBarH=r,u.VScrollBar=s,u.HScrollBar=r}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,u,$){var b=this&&this.__extends||function(){var r=function(n,i){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,m){h.__proto__=m}||function(h,m){for(var y in m)Object.prototype.hasOwnProperty.call(m,y)&&(h[y]=m[y])},r(n,i)};return function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");r(n,i);function h(){this.constructor=n}n.prototype=i===null?Object.create(i):(h.prototype=i.prototype,new h)}}(),v=e("./lib/oop"),x=e("./lib/dom"),p=e("./lib/event"),d=e("./lib/event_emitter").EventEmitter;x.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
|
217
217
|
position: absolute;
|
|
218
218
|
background: rgba(128, 128, 128, 0.6);
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
.ace_editor>.ace_sb_grabbed {
|
|
252
252
|
z-index: 8;
|
|
253
253
|
background: #000;
|
|
254
|
-
}`,"ace_scrollbar.css",!1);var o=function(){function r(n,i){this.element=x.createElement("div"),this.element.className="ace_sb"+i,this.inner=x.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,p.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return r.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},r}();v.implement(o.prototype,d);var a=function(r){b(n,r);function n(i,h){var m=r.call(this,i,"-v")||this;return m.scrollTop=0,m.scrollHeight=0,m.parent=i,m.width=m.VScrollWidth,m.renderer=h,m.inner.style.width=m.element.style.width=(m.width||15)+"px",m.$minWidth=0,m}return n.prototype.onMouseDown=function(i,h){if(i==="mousedown"&&!(p.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var m=this,y=h.clientY,R=function(L){y=L.clientY},T=function(){clearInterval(D)},C=h.clientY,w=this.thumbTop,E=function(){if(y!==void 0){var L=m.scrollTopFromThumbTop(w+y-C);L!==m.scrollTop&&m._emit("scroll",{data:L})}};p.capture(this.inner,R,T);var D=setInterval(E,20);return p.preventDefault(h)}var I=h.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(I)}),p.preventDefault(h)}},n.prototype.getHeight=function(){return this.height},n.prototype.scrollTopFromThumbTop=function(i){var h=i*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return h=h>>0,h<0?h=0:h>this.pageHeight-this.viewHeight&&(h=this.pageHeight-this.viewHeight),h},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(i){this.height=Math.max(0,i),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},n.prototype.setScrollHeight=function(i,h){this.pageHeight===i&&!h||(this.pageHeight=i,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},n.prototype.setScrollTop=function(i){this.scrollTop=i,i<0&&(i=0),this.thumbTop=i*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},n}(o);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var s=function(r){b(n,r);function n(i,h){var m=r.call(this,i,"-h")||this;return m.scrollLeft=0,m.scrollWidth=0,m.height=m.HScrollHeight,m.inner.style.height=m.element.style.height=(m.height||12)+"px",m.renderer=h,m}return n.prototype.onMouseDown=function(i,h){if(i==="mousedown"&&!(p.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var m=this,y=h.clientX,R=function(L){y=L.clientX},T=function(){clearInterval(D)},C=h.clientX,w=this.thumbLeft,E=function(){if(y!==void 0){var L=m.scrollLeftFromThumbLeft(w+y-C);L!==m.scrollLeft&&m._emit("scroll",{data:L})}};p.capture(this.inner,R,T);var D=setInterval(E,20);return p.preventDefault(h)}var I=h.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(I)}),p.preventDefault(h)}},n.prototype.getHeight=function(){return this.isVisible?this.height:0},n.prototype.scrollLeftFromThumbLeft=function(i){var h=i*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return h=h>>0,h<0?h=0:h>this.pageWidth-this.viewWidth&&(h=this.pageWidth-this.viewWidth),h},n.prototype.setWidth=function(i){this.width=Math.max(0,i),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},n.prototype.setScrollWidth=function(i,h){this.pageWidth===i&&!h||(this.pageWidth=i,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},n.prototype.setScrollLeft=function(i){this.scrollLeft=i,i<0&&(i=0),this.thumbLeft=i*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},n}(o);s.prototype.setInnerWidth=s.prototype.setScrollWidth,u.ScrollBar=a,u.ScrollBarV=a,u.ScrollBarH=s,u.VScrollBar=a,u.HScrollBar=s}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,u,$){var b=e("./lib/event"),v=function(){function x(p,d){this.onRender=p,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=d||window;var o=this;this._flush=function(a){o.pending=!1;var s=o.changes;if(s&&(b.blockIdle(100),o.changes=0,o.onRender(s)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return x.prototype.schedule=function(p){this.changes=this.changes|p,this.changes&&!this.pending&&(b.nextFrame(this._flush),this.pending=!0)},x.prototype.clear=function(p){var d=this.changes;return this.changes=0,d},x}();u.RenderLoop=v}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,u,$){var b=e("../lib/oop"),v=e("../lib/dom"),x=e("../lib/lang"),p=e("../lib/event"),d=e("../lib/useragent"),o=e("../lib/event_emitter").EventEmitter,a=512,s=typeof ResizeObserver=="function",r=200,n=function(){function i(h){this.el=v.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=v.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=v.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),h.appendChild(this.el),this.$measureNode.textContent=x.stringRepeat("X",a),this.$characterSize={width:0,height:0},s?this.$addObserver():this.checkForSizeChanges()}return i.prototype.$setMeasureNodeStyles=function(h,m){h.width=h.height="auto",h.left=h.top="0px",h.visibility="hidden",h.position="absolute",h.whiteSpace="pre",d.isIE<8?h["font-family"]="inherit":h.font="inherit",h.overflow=m?"hidden":"visible"},i.prototype.checkForSizeChanges=function(h){if(h===void 0&&(h=this.$measureSizes()),h&&(this.$characterSize.width!==h.width||this.$characterSize.height!==h.height)){this.$measureNode.style.fontWeight="bold";var m=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=h,this.charSizes=Object.create(null),this.allowBoldFonts=m&&m.width===h.width&&m.height===h.height,this._emit("changeCharacterSize",{data:h})}},i.prototype.$addObserver=function(){var h=this;this.$observer=new window.ResizeObserver(function(m){h.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},i.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var h=this;return this.$pollSizeChangesTimer=p.onIdle(function m(){h.checkForSizeChanges(),p.onIdle(m,500)},500)},i.prototype.setPolling=function(h){h?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},i.prototype.$measureSizes=function(h){var m={height:(h||this.$measureNode).clientHeight,width:(h||this.$measureNode).clientWidth/a};return m.width===0||m.height===0?null:m},i.prototype.$measureCharWidth=function(h){this.$main.textContent=x.stringRepeat(h,a);var m=this.$main.getBoundingClientRect();return m.width/a},i.prototype.getCharacterWidth=function(h){var m=this.charSizes[h];return m===void 0&&(m=this.charSizes[h]=this.$measureCharWidth(h)/this.$characterSize.width),m},i.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},i.prototype.$getZoom=function(h){return!h||!h.parentElement?1:(Number(window.getComputedStyle(h).zoom)||1)*this.$getZoom(h.parentElement)},i.prototype.$initTransformMeasureNodes=function(){var h=function(m,y){return["div",{style:"position: absolute;top:"+m+"px;left:"+y+"px;"}]};this.els=v.buildDom([h(0,0),h(r,0),h(0,r),h(r,r)],this.el)},i.prototype.transformCoordinates=function(h,m){if(h){var y=this.$getZoom(this.el);h=w(1/y,h)}function R(Z,ee,ce){var ne=Z[1]*ee[0]-Z[0]*ee[1];return[(-ee[1]*ce[0]+ee[0]*ce[1])/ne,(+Z[1]*ce[0]-Z[0]*ce[1])/ne]}function T(Z,ee){return[Z[0]-ee[0],Z[1]-ee[1]]}function C(Z,ee){return[Z[0]+ee[0],Z[1]+ee[1]]}function w(Z,ee){return[Z*ee[0],Z*ee[1]]}this.els||this.$initTransformMeasureNodes();function E(Z){var ee=Z.getBoundingClientRect();return[ee.left,ee.top]}var D=E(this.els[0]),I=E(this.els[1]),L=E(this.els[2]),z=E(this.els[3]),F=R(T(z,I),T(z,L),T(C(I,L),C(z,D))),O=w(1+F[0],T(I,D)),A=w(1+F[1],T(L,D));if(m){var S=m,N=F[0]*S[0]/r+F[1]*S[1]/r+1,
|
|
254
|
+
}`,"ace_scrollbar.css",!1);var o=function(){function r(n,i){this.element=x.createElement("div"),this.element.className="ace_sb"+i,this.inner=x.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,p.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return r.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},r}();v.implement(o.prototype,d);var a=function(r){b(n,r);function n(i,h){var m=r.call(this,i,"-v")||this;return m.scrollTop=0,m.scrollHeight=0,m.parent=i,m.width=m.VScrollWidth,m.renderer=h,m.inner.style.width=m.element.style.width=(m.width||15)+"px",m.$minWidth=0,m}return n.prototype.onMouseDown=function(i,h){if(i==="mousedown"&&!(p.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var m=this,y=h.clientY,R=function(L){y=L.clientY},T=function(){clearInterval(D)},C=h.clientY,w=this.thumbTop,E=function(){if(y!==void 0){var L=m.scrollTopFromThumbTop(w+y-C);L!==m.scrollTop&&m._emit("scroll",{data:L})}};p.capture(this.inner,R,T);var D=setInterval(E,20);return p.preventDefault(h)}var I=h.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(I)}),p.preventDefault(h)}},n.prototype.getHeight=function(){return this.height},n.prototype.scrollTopFromThumbTop=function(i){var h=i*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return h=h>>0,h<0?h=0:h>this.pageHeight-this.viewHeight&&(h=this.pageHeight-this.viewHeight),h},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(i){this.height=Math.max(0,i),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},n.prototype.setScrollHeight=function(i,h){this.pageHeight===i&&!h||(this.pageHeight=i,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},n.prototype.setScrollTop=function(i){this.scrollTop=i,i<0&&(i=0),this.thumbTop=i*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},n}(o);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var s=function(r){b(n,r);function n(i,h){var m=r.call(this,i,"-h")||this;return m.scrollLeft=0,m.scrollWidth=0,m.height=m.HScrollHeight,m.inner.style.height=m.element.style.height=(m.height||12)+"px",m.renderer=h,m}return n.prototype.onMouseDown=function(i,h){if(i==="mousedown"&&!(p.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var m=this,y=h.clientX,R=function(L){y=L.clientX},T=function(){clearInterval(D)},C=h.clientX,w=this.thumbLeft,E=function(){if(y!==void 0){var L=m.scrollLeftFromThumbLeft(w+y-C);L!==m.scrollLeft&&m._emit("scroll",{data:L})}};p.capture(this.inner,R,T);var D=setInterval(E,20);return p.preventDefault(h)}var I=h.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(I)}),p.preventDefault(h)}},n.prototype.getHeight=function(){return this.isVisible?this.height:0},n.prototype.scrollLeftFromThumbLeft=function(i){var h=i*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return h=h>>0,h<0?h=0:h>this.pageWidth-this.viewWidth&&(h=this.pageWidth-this.viewWidth),h},n.prototype.setWidth=function(i){this.width=Math.max(0,i),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},n.prototype.setScrollWidth=function(i,h){this.pageWidth===i&&!h||(this.pageWidth=i,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},n.prototype.setScrollLeft=function(i){this.scrollLeft=i,i<0&&(i=0),this.thumbLeft=i*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},n}(o);s.prototype.setInnerWidth=s.prototype.setScrollWidth,u.ScrollBar=a,u.ScrollBarV=a,u.ScrollBarH=s,u.VScrollBar=a,u.HScrollBar=s}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,u,$){var b=e("./lib/event"),v=function(){function x(p,d){this.onRender=p,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=d||window;var o=this;this._flush=function(a){o.pending=!1;var s=o.changes;if(s&&(b.blockIdle(100),o.changes=0,o.onRender(s)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return x.prototype.schedule=function(p){this.changes=this.changes|p,this.changes&&!this.pending&&(b.nextFrame(this._flush),this.pending=!0)},x.prototype.clear=function(p){var d=this.changes;return this.changes=0,d},x}();u.RenderLoop=v}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,u,$){var b=e("../lib/oop"),v=e("../lib/dom"),x=e("../lib/lang"),p=e("../lib/event"),d=e("../lib/useragent"),o=e("../lib/event_emitter").EventEmitter,a=512,s=typeof ResizeObserver=="function",r=200,n=function(){function i(h){this.el=v.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=v.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=v.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),h.appendChild(this.el),this.$measureNode.textContent=x.stringRepeat("X",a),this.$characterSize={width:0,height:0},s?this.$addObserver():this.checkForSizeChanges()}return i.prototype.$setMeasureNodeStyles=function(h,m){h.width=h.height="auto",h.left=h.top="0px",h.visibility="hidden",h.position="absolute",h.whiteSpace="pre",d.isIE<8?h["font-family"]="inherit":h.font="inherit",h.overflow=m?"hidden":"visible"},i.prototype.checkForSizeChanges=function(h){if(h===void 0&&(h=this.$measureSizes()),h&&(this.$characterSize.width!==h.width||this.$characterSize.height!==h.height)){this.$measureNode.style.fontWeight="bold";var m=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=h,this.charSizes=Object.create(null),this.allowBoldFonts=m&&m.width===h.width&&m.height===h.height,this._emit("changeCharacterSize",{data:h})}},i.prototype.$addObserver=function(){var h=this;this.$observer=new window.ResizeObserver(function(m){h.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},i.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var h=this;return this.$pollSizeChangesTimer=p.onIdle(function m(){h.checkForSizeChanges(),p.onIdle(m,500)},500)},i.prototype.setPolling=function(h){h?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},i.prototype.$measureSizes=function(h){var m={height:(h||this.$measureNode).clientHeight,width:(h||this.$measureNode).clientWidth/a};return m.width===0||m.height===0?null:m},i.prototype.$measureCharWidth=function(h){this.$main.textContent=x.stringRepeat(h,a);var m=this.$main.getBoundingClientRect();return m.width/a},i.prototype.getCharacterWidth=function(h){var m=this.charSizes[h];return m===void 0&&(m=this.charSizes[h]=this.$measureCharWidth(h)/this.$characterSize.width),m},i.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},i.prototype.$getZoom=function(h){return!h||!h.parentElement?1:(Number(window.getComputedStyle(h).zoom)||1)*this.$getZoom(h.parentElement)},i.prototype.$initTransformMeasureNodes=function(){var h=function(m,y){return["div",{style:"position: absolute;top:"+m+"px;left:"+y+"px;"}]};this.els=v.buildDom([h(0,0),h(r,0),h(0,r),h(r,r)],this.el)},i.prototype.transformCoordinates=function(h,m){if(h){var y=this.$getZoom(this.el);h=w(1/y,h)}function R(Z,ee,ce){var ne=Z[1]*ee[0]-Z[0]*ee[1];return[(-ee[1]*ce[0]+ee[0]*ce[1])/ne,(+Z[1]*ce[0]-Z[0]*ce[1])/ne]}function T(Z,ee){return[Z[0]-ee[0],Z[1]-ee[1]]}function C(Z,ee){return[Z[0]+ee[0],Z[1]+ee[1]]}function w(Z,ee){return[Z*ee[0],Z*ee[1]]}this.els||this.$initTransformMeasureNodes();function E(Z){var ee=Z.getBoundingClientRect();return[ee.left,ee.top]}var D=E(this.els[0]),I=E(this.els[1]),L=E(this.els[2]),z=E(this.els[3]),F=R(T(z,I),T(z,L),T(C(I,L),C(z,D))),O=w(1+F[0],T(I,D)),A=w(1+F[1],T(L,D));if(m){var S=m,N=F[0]*S[0]/r+F[1]*S[1]/r+1,W=C(w(S[0],O),w(S[1],A));return C(w(1/N/r,W),D)}var V=T(h,D),G=R(T(O,w(F[0],V)),T(A,w(F[1],V)),V);return w(r,G)},i}();n.prototype.$characterSize={width:0,height:0},b.implement(n.prototype,o),u.FontMetrics=n}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,u,$){$.exports=`
|
|
255
255
|
.ace_br1 {border-top-left-radius : 3px;}
|
|
256
256
|
.ace_br2 {border-top-right-radius : 3px;}
|
|
257
257
|
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
|
@@ -947,9 +947,9 @@
|
|
|
947
947
|
|
|
948
948
|
.ace_hidden_token {
|
|
949
949
|
display: none;
|
|
950
|
-
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,u,$){var b=e("../lib/dom"),v=e("../lib/oop"),x=e("../lib/event_emitter").EventEmitter,p=function(){function d(o,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(o)}return d.prototype.$createCanvas=function(){this.canvas=b.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},d.prototype.setScrollBarV=function(o){this.$createCanvas(),this.scrollbarV=o,o.element.appendChild(this.canvas),this.setDimensions()},d.prototype.$updateDecorators=function(o){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(o);var s=this.canvas.getContext("2d");function r(O,A){return O.priority<A.priority?-1:O.priority>A.priority?1:0}var n=this.renderer.session.$annotations;if(s.clearRect(0,0,this.canvas.width,this.canvas.height),n){var i={info:1,warning:2,error:3};n.forEach(function(O){O.priority=i[O.type]||null}),n=n.sort(r);for(var h=0;h<n.length;h++){var m=n[h].row,y=this.getVerticalOffsetForRow(m),R=y+this.lineHeight,T=Math.round(this.heightRatio*y),C=Math.round(this.heightRatio*R),w=Math.round((T+C)/2),E=C-w;E<this.halfMinDecorationHeight&&(E=this.halfMinDecorationHeight),w-E<0&&(w=E),w+E>this.canvasHeight&&(w=this.canvasHeight-E);var D=w-E,I=w+E,L=I-D;s.fillStyle=a[n[h].type]||null,s.fillRect(0,D,Math.round(this.oneZoneWidth-1),L)}}var z=this.renderer.session.selection.getCursor();if(z){var F=Math.round(this.getVerticalOffsetForRow(z.row)*this.heightRatio);s.fillStyle="rgba(0, 0, 0, 0.5)",s.fillRect(0,F,this.canvasWidth,2)}},d.prototype.getVerticalOffsetForRow=function(o){o=o|0;var a=this.renderer.session.documentToScreenRow(o,0)*this.lineHeight;return a},d.prototype.setDimensions=function(o){o=o||this.renderer.layerConfig,this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},d.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},d.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},d}();v.implement(p.prototype,x),u.Decorator=p}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,u,$){var b=e("./lib/oop"),v=e("./lib/dom"),x=e("./lib/lang"),p=e("./config"),d=e("./layer/gutter").Gutter,o=e("./layer/marker").Marker,a=e("./layer/text").Text,s=e("./layer/cursor").Cursor,r=e("./scrollbar").HScrollBar,n=e("./scrollbar").VScrollBar,i=e("./scrollbar_custom").HScrollBar,h=e("./scrollbar_custom").VScrollBar,m=e("./renderloop").RenderLoop,y=e("./layer/font_metrics").FontMetrics,R=e("./lib/event_emitter").EventEmitter,T=e("./css/editor-css"),C=e("./layer/decorators").Decorator,w=e("./lib/useragent"),E=e("./layer/text_util").isTextToken;v.importCssString(T,"ace_editor.css",!1);var D=function(){function I(L,z){var F=this;this.container=L||v.createElement("div"),v.addCssClass(this.container,"ace_editor"),v.HI_DPI&&v.addCssClass(this.container,"ace_hidpi"),this.setTheme(z),p.get("useStrictCSP")==null&&p.set("useStrictCSP",!1),this.$gutter=v.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=v.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=v.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new d(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var O=this.$textLayer=new a(this.content);this.canvas=O.element,this.$markerFront=new o(this.content),this.$cursorLayer=new s(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new n(this.container,this),this.scrollBarH=new r(this.container,this),this.scrollBarV.on("scroll",function(A){F.$scrollAnimation||F.session.setScrollTop(A.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function(A){F.$scrollAnimation||F.session.setScrollLeft(A.data-F.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(A){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",A)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new m(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),p.resetOptions(this),p._signal("renderer",this)}return I.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),v.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},I.prototype.setSession=function(L){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=L,L&&this.scrollMargin.top&&L.getScrollTop()<=0&&L.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(L),this.$markerBack.setSession(L),this.$markerFront.setSession(L),this.$gutterLayer.setSession(L),this.$textLayer.setSession(L),L&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},I.prototype.updateLines=function(L,z,F){if(z===void 0&&(z=1/0),this.$changedLines?(this.$changedLines.firstRow>L&&(this.$changedLines.firstRow=L),this.$changedLines.lastRow<z&&(this.$changedLines.lastRow=z)):this.$changedLines={firstRow:L,lastRow:z},this.$changedLines.lastRow<this.layerConfig.firstRow)if(F)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},I.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},I.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},I.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},I.prototype.updateFull=function(L){L?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},I.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},I.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},I.prototype.onResize=function(L,z,F,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=L?1:0;var A=this.container;O||(O=A.clientHeight||A.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!A.style.height||A.style.height=="0px")&&(A.style.height="1px",O=A.clientHeight||A.scrollHeight),F||(F=A.clientWidth||A.scrollWidth);var S=this.$updateCachedSize(L,z,F,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!O)return this.resizing=0;L&&(this.$gutterLayer.$padding=null),L?this.$renderChanges(S|this.$changes,!0):this.$loop.schedule(S|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},I.prototype.$updateCachedSize=function(L,z,F,O){O-=this.$extraHeight||0;var A=0,S=this.$size,N={width:S.width,height:S.height,scrollerHeight:S.scrollerHeight,scrollerWidth:S.scrollerWidth};if(O&&(L||S.height!=O)&&(S.height=O,A|=this.CHANGE_SIZE,S.scrollerHeight=S.height,this.$horizScroll&&(S.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(S.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",A=A|this.CHANGE_SCROLL),F&&(L||S.width!=F)){A|=this.CHANGE_SIZE,S.width=F,z==null&&(z=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=z,v.setStyle(this.scrollBarH.element.style,"left",z+"px"),v.setStyle(this.scroller.style,"left",z+this.margin.left+"px"),S.scrollerWidth=Math.max(0,F-z-this.scrollBarV.getWidth()-this.margin.h),v.setStyle(this.$gutter.style,"left",this.margin.left+"px");var B=this.scrollBarV.getWidth()+"px";v.setStyle(this.scrollBarH.element.style,"right",B),v.setStyle(this.scroller.style,"right",B),v.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(S.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||L)&&(A|=this.CHANGE_FULL)}return S.$dirty=!F||!O,A&&this._signal("resize",N),A},I.prototype.onGutterResize=function(L){var z=this.$showGutter?L:0;z!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,z,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},I.prototype.adjustWrapLimit=function(){var L=this.$size.scrollerWidth-this.$padding*2,z=Math.floor(L/this.characterWidth);return this.session.adjustWrapLimit(z,this.$showPrintMargin&&this.$printMarginColumn)},I.prototype.setAnimatedScroll=function(L){this.setOption("animatedScroll",L)},I.prototype.getAnimatedScroll=function(){return this.$animatedScroll},I.prototype.setShowInvisibles=function(L){this.setOption("showInvisibles",L),this.session.$bidiHandler.setShowInvisibles(L)},I.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},I.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},I.prototype.setDisplayIndentGuides=function(L){this.setOption("displayIndentGuides",L)},I.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},I.prototype.setHighlightIndentGuides=function(L){this.setOption("highlightIndentGuides",L)},I.prototype.setShowPrintMargin=function(L){this.setOption("showPrintMargin",L)},I.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},I.prototype.setPrintMarginColumn=function(L){this.setOption("printMarginColumn",L)},I.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},I.prototype.getShowGutter=function(){return this.getOption("showGutter")},I.prototype.setShowGutter=function(L){return this.setOption("showGutter",L)},I.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},I.prototype.setFadeFoldWidgets=function(L){this.setOption("fadeFoldWidgets",L)},I.prototype.setHighlightGutterLine=function(L){this.setOption("highlightGutterLine",L)},I.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},I.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var L=v.createElement("div");L.className="ace_layer ace_print-margin-layer",this.$printMarginEl=v.createElement("div"),this.$printMarginEl.className="ace_print-margin",L.appendChild(this.$printMarginEl),this.content.insertBefore(L,this.content.firstChild)}var z=this.$printMarginEl.style;z.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",z.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},I.prototype.getContainerElement=function(){return this.container},I.prototype.getMouseEventTarget=function(){return this.scroller},I.prototype.getTextAreaContainer=function(){return this.container},I.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var L=this.textarea.style,z=this.$composition;if(!this.$keepTextAreaAtCursor&&!z){v.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){z&&z.markerRange&&(F=this.$cursorLayer.getPixelPosition(z.markerRange.start,!0));var O=this.layerConfig,A=F.top,S=F.left;A-=O.offset;var N=z&&z.useTextareaForIME||w.isMobile?this.lineHeight:1;if(A<0||A>O.height-N){v.translate(this.textarea,0,0);return}var B=1,V=this.$size.height-N;if(!z)A+=this.lineHeight;else if(z.useTextareaForIME){var G=this.textarea.value;B=this.characterWidth*this.session.$getStringScreenWidth(G)[0]}else A+=this.lineHeight+2;S-=this.scrollLeft,S>this.$size.scrollerWidth-B&&(S=this.$size.scrollerWidth-B),S+=this.gutterWidth+this.margin.left,v.setStyle(L,"height",N+"px"),v.setStyle(L,"width",B+"px"),v.translate(this.textarea,Math.min(S,this.$size.scrollerWidth-B),Math.min(A,V))}}},I.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},I.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},I.prototype.getLastFullyVisibleRow=function(){var L=this.layerConfig,z=L.lastRow,F=this.session.documentToScreenRow(z,0)*L.lineHeight;return F-this.session.getScrollTop()>L.height-L.lineHeight?z-1:z},I.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},I.prototype.setPadding=function(L){this.$padding=L,this.$textLayer.setPadding(L),this.$cursorLayer.setPadding(L),this.$markerFront.setPadding(L),this.$markerBack.setPadding(L),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},I.prototype.setScrollMargin=function(L,z,F,O){var A=this.scrollMargin;A.top=L|0,A.bottom=z|0,A.right=O|0,A.left=F|0,A.v=A.top+A.bottom,A.h=A.left+A.right,A.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-A.top),this.updateFull()},I.prototype.setMargin=function(L,z,F,O){var A=this.margin;A.top=L|0,A.bottom=z|0,A.right=O|0,A.left=F|0,A.v=A.top+A.bottom,A.h=A.left+A.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},I.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},I.prototype.setHScrollBarAlwaysVisible=function(L){this.setOption("hScrollBarAlwaysVisible",L)},I.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},I.prototype.setVScrollBarAlwaysVisible=function(L){this.setOption("vScrollBarAlwaysVisible",L)},I.prototype.$updateScrollBarV=function(){var L=this.layerConfig.maxHeight,z=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(L-=(z-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>L-z&&(L=this.scrollTop+z,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(L+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},I.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},I.prototype.freeze=function(){this.$frozen=!0},I.prototype.unfreeze=function(){this.$frozen=!1},I.prototype.$renderChanges=function(L,z){if(this.$changes&&(L|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!L&&!z){this.$changes|=L;return}if(this.$size.$dirty)return this.$changes|=L,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",L),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(L&this.CHANGE_FULL||L&this.CHANGE_SIZE||L&this.CHANGE_TEXT||L&this.CHANGE_LINES||L&this.CHANGE_SCROLL||L&this.CHANGE_H_SCROLL){if(L|=this.$computeLayerConfig()|this.$loop.clear(),F.firstRow!=this.layerConfig.firstRow&&F.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(F.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,L=L|this.CHANGE_SCROLL,L|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),L&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),v.translate(this.content,-this.scrollLeft,-F.offset);var A=F.width+2*this.$padding+"px",S=F.minHeight+"px";v.setStyle(this.content.style,"width",A),v.setStyle(this.content.style,"height",S)}if(L&this.CHANGE_H_SCROLL&&(v.translate(this.content,-this.scrollLeft,-F.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),L&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",L);return}if(L&this.CHANGE_SCROLL){this.$changedLines=null,L&this.CHANGE_TEXT||L&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(L&this.CHANGE_GUTTER||L&this.CHANGE_LINES?this.$gutterLayer.update(F):this.$gutterLayer.scrollLines(F)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",L);return}L&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):L&this.CHANGE_LINES?((this.$updateLines()||L&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):L&this.CHANGE_TEXT||L&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):L&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),L&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",L)},I.prototype.$autosize=function(){var L=this.session.getScreenLength()*this.lineHeight,z=this.$maxLines*this.lineHeight,F=Math.min(z,Math.max((this.$minLines||1)*this.lineHeight,L))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(F+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&F>this.$maxPixelHeight&&(F=this.$maxPixelHeight);var O=F<=2*this.lineHeight,A=!O&&L>z;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||A!=this.$vScroll){A!=this.$vScroll&&(this.$vScroll=A,this.scrollBarV.setVisible(A));var S=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,S,F),this.desiredHeight=F,this._signal("autosize")}},I.prototype.$computeLayerConfig=function(){var L=this.session,z=this.$size,F=z.height<=2*this.lineHeight,O=this.session.getScreenLength(),A=O*this.lineHeight,S=this.$getLongestLine(),N=!F&&(this.$hScrollBarAlwaysVisible||z.scrollerWidth-S-2*this.$padding<0),B=this.$horizScroll!==N;B&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var V=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),F=z.height<=2*this.lineHeight);var G=z.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(z.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;A+=Z;var ee=this.scrollMargin;this.session.setScrollTop(Math.max(-ee.top,Math.min(this.scrollTop,A-z.scrollerHeight+ee.bottom))),this.session.setScrollLeft(Math.max(-ee.left,Math.min(this.scrollLeft,S+2*this.$padding-z.scrollerWidth+ee.right)));var ce=!F&&(this.$vScrollBarAlwaysVisible||z.scrollerHeight-A+Z<0||this.scrollTop>ee.top),ne=V!==ce;ne&&(this.$vScroll=ce,this.scrollBarV.setVisible(ce));var he=this.scrollTop%this.lineHeight,ue=Math.ceil(G/this.lineHeight)-1,le=Math.max(0,Math.round((this.scrollTop-he)/this.lineHeight)),me=le+ue,_e,Ae,Me=this.lineHeight;le=L.screenToDocumentRow(le,0);var qe=L.getFoldLine(le);qe&&(le=qe.start.row),_e=L.documentToScreenRow(le,0),Ae=L.getRowLength(le)*Me,me=Math.min(L.screenToDocumentRow(me,0),L.getLength()-1),G=z.scrollerHeight+L.getRowLength(me)*Me+Ae,he=this.scrollTop-_e*Me,he<0&&_e>0&&(_e=Math.max(0,_e+Math.floor(he/Me)),he=this.scrollTop-_e*Me);var Ve=0;return(this.layerConfig.width!=S||B)&&(Ve=this.CHANGE_H_SCROLL),(B||ne)&&(Ve|=this.$updateCachedSize(!0,this.gutterWidth,z.width,z.height),this._signal("scrollbarVisibilityChanged"),ne&&(S=this.$getLongestLine())),this.layerConfig={width:S,padding:this.$padding,firstRow:le,firstRowScreen:_e,lastRow:me,lineHeight:Me,characterWidth:this.characterWidth,minHeight:G,maxHeight:A,offset:he,gutterOffset:Me?Math.max(0,Math.ceil((he+z.height-z.scrollerHeight)/Me)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(S-this.$padding),Ve},I.prototype.$updateLines=function(){if(this.$changedLines){var L=this.$changedLines.firstRow,z=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(L>F.lastRow+1)&&!(z<F.firstRow)){if(z===1/0){this.$showGutter&&this.$gutterLayer.update(F),this.$textLayer.update(F);return}return this.$textLayer.updateLines(F,L,z),!0}}},I.prototype.$getLongestLine=function(){var L=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(L+=1),this.$textLayer&&L>this.$textLayer.MAX_LINE_LENGTH&&(L=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(L*this.characterWidth))},I.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},I.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},I.prototype.addGutterDecoration=function(L,z){this.$gutterLayer.addGutterDecoration(L,z)},I.prototype.removeGutterDecoration=function(L,z){this.$gutterLayer.removeGutterDecoration(L,z)},I.prototype.updateBreakpoints=function(L){this._rows=L,this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.setAnnotations=function(L){this.$gutterLayer.setAnnotations(L),this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},I.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},I.prototype.showCursor=function(){this.$cursorLayer.showCursor()},I.prototype.scrollSelectionIntoView=function(L,z,F){this.scrollCursorIntoView(L,F),this.scrollCursorIntoView(z,F)},I.prototype.scrollCursorIntoView=function(L,z,F){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(L),A=O.left,S=O.top,N=F&&F.top||0,B=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var V=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;V+N>S?(z&&V+N>S+this.lineHeight&&(S-=z*this.$size.scrollerHeight),S===0&&(S=-this.scrollMargin.top),this.session.setScrollTop(S)):V+this.$size.scrollerHeight-B<S+this.lineHeight&&(z&&V+this.$size.scrollerHeight-B<S-this.lineHeight&&(S+=z*this.$size.scrollerHeight),this.session.setScrollTop(S+this.lineHeight+B-this.$size.scrollerHeight));var G=this.scrollLeft,Z=2*this.layerConfig.characterWidth;A-Z<G?(A-=Z,A<this.$padding+Z&&(A=-this.scrollMargin.left),this.session.setScrollLeft(A)):(A+=Z,G+this.$size.scrollerWidth<A+this.characterWidth?this.session.setScrollLeft(Math.round(A+this.characterWidth-this.$size.scrollerWidth)):G<=this.$padding&&A-G<this.characterWidth&&this.session.setScrollLeft(0))}},I.prototype.getScrollTop=function(){return this.session.getScrollTop()},I.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},I.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},I.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},I.prototype.scrollToRow=function(L){this.session.setScrollTop(L*this.lineHeight)},I.prototype.alignCursor=function(L,z){typeof L=="number"&&(L={row:L,column:0});var F=this.$cursorLayer.getPixelPosition(L),O=this.$size.scrollerHeight-this.lineHeight,A=F.top-O*(z||0);return this.session.setScrollTop(A),A},I.prototype.$calcSteps=function(L,z){var F=0,O=this.STEPS,A=[],S=function(N,B,V){return V*(Math.pow(N-1,3)+1)+B};for(F=0;F<O;++F)A.push(S(F/this.STEPS,L,z-L));return A},I.prototype.scrollToLine=function(L,z,F,O){var A=this.$cursorLayer.getPixelPosition({row:L,column:0}),S=A.top;z&&(S-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(S),F!==!1&&this.animateScrolling(N,O)},I.prototype.animateScrolling=function(L,z){var F=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(L==F)return;if(this.$scrollAnimation){var A=this.$scrollAnimation.steps;if(A.length&&(L=A[0],L==F))return}var S=O.$calcSteps(L,F);this.$scrollAnimation={from:L,to:F,steps:S},clearInterval(this.$timer),O.session.setScrollTop(S.shift()),O.session.$scrollTop=F;function N(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,z&&z()}this.$timer=setInterval(function(){if(O.$stopAnimation){N();return}if(!O.session)return clearInterval(O.$timer);S.length?(O.session.setScrollTop(S.shift()),O.session.$scrollTop=F):F!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(F),F=null):N()},10)},I.prototype.scrollToY=function(L){this.scrollTop!==L&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=L)},I.prototype.scrollToX=function(L){this.scrollLeft!==L&&(this.scrollLeft=L),this.$loop.schedule(this.CHANGE_H_SCROLL)},I.prototype.scrollTo=function(L,z){this.session.setScrollTop(z),this.session.setScrollLeft(L)},I.prototype.scrollBy=function(L,z){z&&this.session.setScrollTop(this.session.getScrollTop()+z),L&&this.session.setScrollLeft(this.session.getScrollLeft()+L)},I.prototype.isScrollableBy=function(L,z){if(z<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||z>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||L<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||L>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},I.prototype.pixelToScreenCoordinates=function(L,z){var F;if(this.$hasCssTransforms){F={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([L,z]);L=O[1]-this.gutterWidth-this.margin.left,z=O[0]}else F=this.scroller.getBoundingClientRect();var A=L+this.scrollLeft-F.left-this.$padding,S=A/this.characterWidth,N=Math.floor((z+this.scrollTop-F.top)/this.lineHeight),B=this.$blockCursor?Math.floor(S):Math.round(S);return{row:N,column:B,side:S-B>0?1:-1,offsetX:A}},I.prototype.screenToTextCoordinates=function(L,z){var F;if(this.$hasCssTransforms){F={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([L,z]);L=O[1]-this.gutterWidth-this.margin.left,z=O[0]}else F=this.scroller.getBoundingClientRect();var A=L+this.scrollLeft-F.left-this.$padding,S=A/this.characterWidth,N=this.$blockCursor?Math.floor(S):Math.round(S),B=Math.floor((z+this.scrollTop-F.top)/this.lineHeight);return this.session.screenToDocumentPosition(B,Math.max(N,0),A)},I.prototype.textToScreenCoordinates=function(L,z){var F=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(L,z),A=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,L)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),S=O.row*this.lineHeight;return{pageX:F.left+A-this.scrollLeft,pageY:F.top+S-this.scrollTop}},I.prototype.visualizeFocus=function(){v.addCssClass(this.container,"ace_focus")},I.prototype.visualizeBlur=function(){v.removeCssClass(this.container,"ace_focus")},I.prototype.showComposition=function(L){this.$composition=L,L.cssText||(L.cssText=this.textarea.style.cssText),L.useTextareaForIME==null&&(L.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(v.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):L.markerId=this.session.addMarker(L.markerRange,"ace_composition_marker","text")},I.prototype.setCompositionText=function(L){var z=this.session.selection.cursor;this.addToken(L,"composition_placeholder",z.row,z.column),this.$moveTextAreaToCursor()},I.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),v.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var L=this.session.selection.cursor;this.removeExtraToken(L.row,L.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},I.prototype.setGhostText=function(L,z){var F=this.session.selection.cursor,O=z||{row:F.row,column:F.column};this.removeGhostText();var A=this.$calculateWrappedTextChunks(L,O);this.addToken(A[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:L,position:{row:O.row,column:O.column}};var S=v.createElement("div");if(A.length>1){var N=this.hideTokensAfterPosition(O.row,O.column),B;A.slice(1).forEach(function(ne){var he=v.createElement("div"),ue=v.createElement("span");ue.className="ace_ghost_text",ne.wrapped&&(he.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ue.appendChild(v.createTextNode(ne.text)),he.appendChild(ue),S.appendChild(he),B=he}),N.forEach(function(ne){var he=v.createElement("span");E(ne.type)||(he.className="ace_"+ne.type.replace(/\./g," ace_")),he.appendChild(v.createTextNode(ne.value)),B.appendChild(he)}),this.$ghostTextWidget={el:S,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var V=this.$cursorLayer.getPixelPosition(O,!0),G=this.container,Z=G.getBoundingClientRect().height,ee=A.length*this.lineHeight,ce=ee<Z-V.top;if(ce)return;ee<Z?this.scrollBy(0,(A.length-1)*this.lineHeight):this.scrollToRow(O.row)}},I.prototype.$calculateWrappedTextChunks=function(L,z){var F=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(F/this.characterWidth)-2;O=O<=0?60:O;for(var A=L.split(/\r?\n/),S=[],N=0;N<A.length;N++){var B=this.session.$getDisplayTokens(A[N],z.column),V=this.session.$computeWrapSplits(B,O,this.session.$tabSize);if(V.length>0){var G=0;V.push(A[N].length);for(var Z=0;Z<V.length;Z++){var ee=A[N].slice(G,V[Z]);S.push({text:ee,wrapped:!0}),G=V[Z]}}else S.push({text:A[N],wrapped:!1})}return S},I.prototype.removeGhostText=function(){if(this.$ghostText){var L=this.$ghostText.position;this.removeExtraToken(L.row,L.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},I.prototype.addToken=function(L,z,F,O){var A=this.session;A.bgTokenizer.lines[F]=null;var S={type:z,value:L},N=A.getTokens(F);if(O==null||!N.length)N.push(S);else for(var B=0,V=0;V<N.length;V++){var G=N[V];if(B+=G.value.length,O<=B){var Z=G.value.length-(B-O),ee=G.value.slice(0,Z),ce=G.value.slice(Z);N.splice(V,1,{type:G.type,value:ee},S,{type:G.type,value:ce});break}}this.updateLines(F,F)},I.prototype.hideTokensAfterPosition=function(L,z){for(var F=this.session.getTokens(L),O=0,A=!1,S=[],N=0;N<F.length;N++){var B=F[N];if(O+=B.value.length,B.type!=="ghost_text"){if(A){S.push({type:B.type,value:B.value}),B.type="hidden_token";continue}O===z&&(A=!0)}}return this.updateLines(L,L),S},I.prototype.removeExtraToken=function(L,z){this.session.bgTokenizer.lines[L]=null,this.updateLines(L,L)},I.prototype.setTheme=function(L,z){var F=this;if(this.$themeId=L,F._dispatchEvent("themeChange",{theme:L}),!L||typeof L=="string"){var O=L||this.$options.theme.initialValue;p.loadModule(["theme",O],A)}else A(L);function A(S){if(F.$themeId!=L)return z&&z();if(!S||!S.cssClass)throw new Error("couldn't load module "+L+" or it didn't call define");S.$id&&(F.$themeId=S.$id),v.importCssString(S.cssText,S.cssClass,F.container),F.theme&&v.removeCssClass(F.container,F.theme.cssClass);var N="padding"in S?S.padding:"padding"in(F.theme||{})?4:F.$padding;if(F.$padding&&N!=F.$padding&&F.setPadding(N),F.$gutterLayer){var B=S.$showGutterCursorMarker;B&&!F.$gutterLayer.$showCursorMarker?F.$gutterLayer.$showCursorMarker="theme":!B&&F.$gutterLayer.$showCursorMarker=="theme"&&(F.$gutterLayer.$showCursorMarker=null)}F.$theme=S.cssClass,F.theme=S,v.addCssClass(F.container,S.cssClass),v.setCssClass(F.container,"ace_dark",S.isDark),F.$size&&(F.$size.width=0,F.$updateSizeAsync()),F._dispatchEvent("themeLoaded",{theme:S}),z&&z(),w.isSafari&&F.scroller&&(F.scroller.style.background="red",F.scroller.style.background="")}},I.prototype.getTheme=function(){return this.$themeId},I.prototype.setStyle=function(L,z){v.setCssClass(this.container,L,z!==!1)},I.prototype.unsetStyle=function(L){v.removeCssClass(this.container,L)},I.prototype.setCursorStyle=function(L){v.setStyle(this.scroller.style,"cursor",L)},I.prototype.setMouseCursor=function(L){v.setStyle(this.scroller.style,"cursor",L)},I.prototype.attachToShadowRoot=function(){v.importCssString(T,"ace_editor.css",this.container)},I.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},I.prototype.$updateCustomScrollbar=function(L){var z=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),L===!0?(this.scrollBarV=new h(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollTop(F.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollLeft(F.data-z.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new C(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new n(this.container,this),this.scrollBarH=new r(this.container,this),this.scrollBarV.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollTop(F.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollLeft(F.data-z.scrollMargin.left)}))},I.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var L=this;this.$resizeTimer=x.delayedCall(function(){L.destroyed||L.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(z){var F=z[0].contentRect.width,O=z[0].contentRect.height;Math.abs(L.$size.width-F)>1||Math.abs(L.$size.height-O)>1?L.$resizeTimer.delay():L.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},I}();D.prototype.CHANGE_CURSOR=1,D.prototype.CHANGE_MARKER=2,D.prototype.CHANGE_GUTTER=4,D.prototype.CHANGE_SCROLL=8,D.prototype.CHANGE_LINES=16,D.prototype.CHANGE_TEXT=32,D.prototype.CHANGE_SIZE=64,D.prototype.CHANGE_MARKER_BACK=128,D.prototype.CHANGE_MARKER_FRONT=256,D.prototype.CHANGE_FULL=512,D.prototype.CHANGE_H_SCROLL=1024,D.prototype.$changes=0,D.prototype.$padding=null,D.prototype.$frozen=!1,D.prototype.STEPS=8,b.implement(D.prototype,R),p.defineOptions(D.prototype,"renderer",{useResizeObserver:{set:function(I){!I&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):I&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(I){this.$textLayer.setShowInvisibles(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(I){typeof I=="number"&&(this.$printMarginColumn=I),this.$showPrintMargin=!!I,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(I){this.$gutter.style.display=I?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(I){this.$gutterLayer.$useSvgGutterIcons=I},initialValue:!1},showFoldedAnnotations:{set:function(I){this.$gutterLayer.$showFoldedAnnotations=I},initialValue:!1},fadeFoldWidgets:{set:function(I){v.setCssClass(this.$gutter,"ace_fade-fold-widgets",I)},initialValue:!1},showFoldWidgets:{set:function(I){this.$gutterLayer.setShowFoldWidgets(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(I){this.$textLayer.setDisplayIndentGuides(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(I){this.$textLayer.setHighlightIndentGuides(I)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(I){this.$gutterLayer.setHighlightGutterLine(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(I){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(I){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(I){typeof I=="number"&&(I=I+"px"),this.container.style.fontSize=I,this.updateFontSize()},initialValue:12},fontFamily:{set:function(I){this.container.style.fontFamily=I,this.updateFontSize()}},maxLines:{set:function(I){this.updateFull()}},minLines:{set:function(I){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(I){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(I){I=+I||0,this.$scrollPastEnd!=I&&(this.$scrollPastEnd=I,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(I){this.$gutterLayer.$fixedWidth=!!I,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(I){this.$updateCustomScrollbar(I)},initialValue:!1},theme:{set:function(I){this.setTheme(I)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),u.VirtualRenderer=D}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,u,$){var b=e("../lib/oop"),v=e("../lib/net"),x=e("../lib/event_emitter").EventEmitter,p=e("../config");function d(r){var n="importScripts('"+v.qualifyURL(r)+"');";try{return new Blob([n],{type:"application/javascript"})}catch{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,h=new i;return h.append(n),h.getBlob("application/javascript")}}function o(r){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(p.get("loadWorkerFromBlob")){var n=d(r),i=window.URL||window.webkitURL,h=i.createObjectURL(n);return new Worker(h)}return new Worker(r)}var a=function(r){r.postMessage||(r=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=r,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){b.implement(this,x),this.$createWorkerFromOldConfig=function(r,n,i,h,m){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),p.get("packaged")||!e.toUrl)h=h||p.moduleUrl(n,"worker");else{var y=this.$normalizePath;h=h||y(e.toUrl("ace/worker/worker.js",null,"_"));var R={};r.forEach(function(T){R[T]=y(e.toUrl(T,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(h),m&&this.send("importScripts",m),this.$worker.postMessage({init:!0,tlns:R,module:n,classname:i}),this.$worker},this.onMessage=function(r){var n=r.data;switch(n.type){case"event":this._signal(n.name,{data:n.data});break;case"call":var i=this.callbacks[n.id];i&&(i(n.data),delete this.callbacks[n.id]);break;case"error":this.reportError(n.data);break;case"log":window.console&&console.log&&console.log.apply(console,n.data);break}},this.reportError=function(r){window.console&&console.error&&console.error(r)},this.$normalizePath=function(r){return v.qualifyURL(r)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(r){r.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(r,n){this.$worker.postMessage({command:r,args:n})},this.call=function(r,n,i){if(i){var h=this.callbackId++;this.callbacks[h]=i,n.push(h)}this.send(r,n)},this.emit=function(r,n){try{n.data&&n.data.err&&(n.data.err={message:n.data.err.message,stack:n.data.err.stack,code:n.data.err.code}),this.$worker&&this.$worker.postMessage({event:r,data:{data:n.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(r){this.$doc&&this.terminate(),this.$doc=r,this.call("setValue",[r.getValue()]),r.on("change",this.changeListener,!0)},this.changeListener=function(r){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),r.action=="insert"?this.deltaQueue.push(r.start,r.lines):this.deltaQueue.push(r.start,r.end)},this.$sendDeltaQueue=function(){var r=this.deltaQueue;r&&(this.deltaQueue=null,r.length>50&&r.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:r}))}}).call(a.prototype);var s=function(r,n,i){var h=null,m=!1,y=Object.create(x),R=[],T=new a({messageBuffer:R,terminate:function(){},postMessage:function(w){R.push(w),h&&(m?setTimeout(C):C())}});T.setEmitSync=function(w){m=w};var C=function(){var w=R.shift();w.command?h[w.command].apply(h,w.args):w.event&&y._signal(w.event,w.data)};return y.postMessage=function(w){T.onMessage({data:w})},y.callback=function(w,E){this.postMessage({type:"call",id:E,data:w})},y.emit=function(w,E){this.postMessage({type:"event",name:w,data:E})},p.loadModule(["worker",n],function(w){for(h=new w[i](y);R.length;)C()}),T};u.UIWorkerClient=s,u.WorkerClient=a,u.createWorker=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,u,$){var b=e("./range").Range,v=e("./lib/event_emitter").EventEmitter,x=e("./lib/oop"),p=function(){function d(o,a,s,r,n,i){var h=this;this.length=a,this.session=o,this.doc=o.getDocument(),this.mainClass=n,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){h.onCursorChange()})},this.$pos=s;var m=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=m.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return d.prototype.setup=function(){var o=this,a=this.doc,s=this.session;this.selectionBefore=s.selection.toJSON(),s.selection.inMultiSelectMode&&s.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=s.addMarker(new b(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var i=a.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),o.others.push(i)}),s.setUndoSelect(!1)},d.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,a=this;this.othersActive=!0,this.others.forEach(function(s){s.markerId=o.addMarker(new b(s.row,s.column,s.row,s.column+a.length),a.othersClass,null,!1)})}},d.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o<this.others.length;o++)this.session.removeMarker(this.others[o].markerId)}},d.prototype.onUpdate=function(o){if(this.$updating)return this.updateAnchors(o);var a=o;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var s=o.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,r=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,n=a.start.column-this.pos.column;if(this.updateAnchors(o),r&&(this.length+=s),r&&!this.session.$fromUndo){if(o.action==="insert")for(var i=this.others.length-1;i>=0;i--){var h=this.others[i],m={row:h.row,column:h.column+n};this.doc.insertMergedLines(m,o.lines)}else if(o.action==="remove")for(var i=this.others.length-1;i>=0;i--){var h=this.others[i],m={row:h.row,column:h.column+n};this.doc.remove(new b(m.row,m.column,m.row,m.column-s))}}this.$updating=!1,this.updateMarkers()}},d.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var a=this.others.length;a--;)this.others[a].onChange(o);this.updateMarkers()},d.prototype.updateMarkers=function(){if(!this.$updating){var o=this,a=this.session,s=function(n,i){a.removeMarker(n.markerId),n.markerId=a.addMarker(new b(n.row,n.column,n.row,n.column+o.length),i,null,!1)};s(this.pos,this.mainClass);for(var r=this.others.length;r--;)s(this.others[r],this.othersClass)}},d.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},d.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},d.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),a=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,s=0;s<a;s++)o.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},d}();x.implement(p.prototype,v),u.PlaceHolder=p}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,u,$){var b=e("../lib/event"),v=e("../lib/useragent");function x(d,o){return d.row==o.row&&d.column==o.column}function p(d){var o=d.domEvent,a=o.altKey,s=o.shiftKey,r=o.ctrlKey,n=d.getAccelKey(),i=d.getButton();if(r&&v.isMac&&(i=o.button),d.editor.inMultiSelectMode&&i==2){d.editor.textInput.onContextMenu(d.domEvent);return}if(!r&&!a&&!n){i===0&&d.editor.inMultiSelectMode&&d.editor.exitMultiSelectMode();return}if(i===0){var h=d.editor,m=h.selection,y=h.inMultiSelectMode,R=d.getDocumentPosition(),T=m.getCursor(),C=d.inSelection()||m.isEmpty()&&x(R,T),w=d.x,E=d.y,D=function(ee){w=ee.clientX,E=ee.clientY},I=h.session,L=h.renderer.pixelToScreenCoordinates(w,E),z=L,F;if(h.$mouseHandler.$enableJumpToDef)r&&a||n&&a?F=s?"block":"add":a&&h.$blockSelectEnabled&&(F="block");else if(n&&!a){if(F="add",!y&&s)return}else a&&h.$blockSelectEnabled&&(F="block");if(F&&v.isMac&&o.ctrlKey&&h.$mouseHandler.cancelContextMenu(),F=="add"){if(!y&&C)return;if(!y){var O=m.toOrientedRange();h.addSelectionMarker(O)}var A=m.rangeList.rangeAtPoint(R);h.inVirtualSelectionMode=!0,s&&(A=null,O=m.ranges[0]||O,h.removeSelectionMarker(O)),h.once("mouseup",function(){var ee=m.toOrientedRange();A&&ee.isEmpty()&&x(A.cursor,ee.cursor)?m.substractPoint(ee.cursor):(s?m.substractPoint(O.cursor):O&&(h.removeSelectionMarker(O),m.addRange(O)),m.addRange(ee)),h.inVirtualSelectionMode=!1})}else if(F=="block"){d.stop(),h.inVirtualSelectionMode=!0;var S,N=[],B=function(){var ee=h.renderer.pixelToScreenCoordinates(w,E),ce=I.screenToDocumentPosition(ee.row,ee.column,ee.offsetX);x(z,ee)&&x(ce,m.lead)||(z=ee,h.selection.moveToPosition(ce),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(N),N=m.rectangularRangeBlock(z,L),h.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=h.$mouseHandler.$clickSelection.clone()),N.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers())};y&&!n?m.toSingleRange():!y&&n&&(S=m.toOrientedRange(),h.addSelectionMarker(S)),s?L=I.documentToScreenPosition(m.lead):m.moveToPosition(R),z={row:-1,column:-1};var V=function(ee){B(),clearInterval(Z),h.removeSelectionMarkers(N),N.length||(N=[m.toOrientedRange()]),S&&(h.removeSelectionMarker(S),m.toSingleRange(S));for(var ce=0;ce<N.length;ce++)m.addRange(N[ce]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null},G=B;b.capture(h.container,D,V);var Z=setInterval(function(){G()},20);return d.preventDefault()}}}u.onMouseDown=p}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,u,$){u.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(v){v.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(v){v.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(v){v.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(v){v.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(v){v.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(v){v.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(v){v.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(v){v.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(v){v.multiSelect.rangeCount>1?v.multiSelect.joinSelections():v.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(v){v.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(v){v.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(v){v.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],u.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(v){v.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(v){return v&&v.inMultiSelectMode}}];var b=e("../keyboard/hash_handler").HashHandler;u.keyboardHandler=new b(u.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,u,$){var b=e("./range_list").RangeList,v=e("./range").Range,x=e("./selection").Selection,p=e("./mouse/multi_select_handler").onMouseDown,d=e("./lib/event"),o=e("./lib/lang"),a=e("./commands/multi_select_commands");u.commands=a.defaultCommands.concat(a.multiSelectCommands);var s=e("./search").Search,r=new s;function n(T,C,w){return r.$options.wrap=!0,r.$options.needle=C,r.$options.backwards=w==-1,r.find(T)}var i=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(i.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(T,C){if(T){if(!this.inMultiSelectMode&&this.rangeCount===0){var w=this.toOrientedRange();if(this.rangeList.add(w),this.rangeList.add(T),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange(T);this.rangeList.removeAll(),this.rangeList.add(w),this.$onAddRange(w)}T.cursor||(T.cursor=T.end);var E=this.rangeList.add(T);return this.$onAddRange(T),E.length&&this.$onRemoveRange(E),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),C||this.fromOrientedRange(T)}},this.toSingleRange=function(T){T=T||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),T&&this.fromOrientedRange(T)},this.substractPoint=function(T){var C=this.rangeList.substractPoint(T);if(C)return this.$onRemoveRange(C),C[0]},this.mergeOverlappingRanges=function(){var T=this.rangeList.merge();T.length&&this.$onRemoveRange(T)},this.$onAddRange=function(T){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(T),this._signal("addRange",{range:T})},this.$onRemoveRange=function(T){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var C=this.rangeList.ranges.pop();T.push(C),this.rangeCount=0}for(var w=T.length;w--;){var E=this.ranges.indexOf(T[w]);this.ranges.splice(E,1)}this._signal("removeRange",{ranges:T}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new b,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var T=this.ranges.length?this.ranges:[this.getRange()],C=[],w=0;w<T.length;w++){var E=T[w],D=E.start.row,I=E.end.row;if(D===I)C.push(E.clone());else{for(C.push(new v(D,E.start.column,D,this.session.getLine(D).length));++D<I;)C.push(this.getLineRange(D,!0));C.push(new v(I,0,I,E.end.column))}w==0&&!this.isBackwards()&&(C=C.reverse())}this.toSingleRange();for(var w=C.length;w--;)this.addRange(C[w])},this.joinSelections=function(){var T=this.rangeList.ranges,C=T[T.length-1],w=v.fromPoints(T[0].start,C.end);this.toSingleRange(),this.setSelectionRange(w,C.cursor==C.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var T=this.rangeList.ranges,C=T[T.length-1],w=v.fromPoints(T[0].start,C.end);this.toSingleRange(),this.setSelectionRange(w,C.cursor==C.start)}else{var E=this.session.documentToScreenPosition(this.cursor),D=this.session.documentToScreenPosition(this.anchor),I=this.rectangularRangeBlock(E,D);I.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(T,C,w){var E=[],D=T.column<C.column;if(D)var I=T.column,L=C.column,z=T.offsetX,F=C.offsetX;else var I=C.column,L=T.column,z=C.offsetX,F=T.offsetX;var O=T.row<C.row;if(O)var A=T.row,S=C.row;else var A=C.row,S=T.row;I<0&&(I=0),A<0&&(A=0),A==S&&(w=!0);for(var N,B=A;B<=S;B++){var V=v.fromPoints(this.session.screenToDocumentPosition(B,I,z),this.session.screenToDocumentPosition(B,L,F));if(V.isEmpty()){if(N&&m(V.end,N))break;N=V.end}V.cursor=D?V.start:V.end,E.push(V)}if(O&&E.reverse(),!w){for(var G=E.length-1;E[G].isEmpty()&&G>0;)G--;if(G>0)for(var Z=0;E[Z].isEmpty();)Z++;for(var ee=G;ee>=Z;ee--)E[ee].isEmpty()&&E.splice(ee,1)}return E}}).call(x.prototype);var h=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(T){T.cursor||(T.cursor=T.end);var C=this.getSelectionStyle();return T.marker=this.session.addMarker(T,"ace_selection",C),this.session.$selectionMarkers.push(T),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,T},this.removeSelectionMarker=function(T){if(T.marker){this.session.removeMarker(T.marker);var C=this.session.$selectionMarkers.indexOf(T);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(T){for(var C=this.session.$selectionMarkers,w=T.length;w--;){var E=T[w];if(E.marker){this.session.removeMarker(E.marker);var D=C.indexOf(E);D!=-1&&C.splice(D,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function(T){this.addSelectionMarker(T.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(T){this.removeSelectionMarkers(T.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(T){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(T){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(T){var C=T.command,w=T.editor;if(w.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?E=w.forEachSelection(C,T.args):C.multiSelectAction=="forEachLine"?E=w.forEachSelection(C,T.args,!0):C.multiSelectAction=="single"?(w.exitMultiSelectMode(),E=C.exec(w,T.args||{})):E=C.multiSelectAction(w,T.args||{});else{var E=C.exec(w,T.args||{});w.multiSelect.addRange(w.multiSelect.toOrientedRange()),w.multiSelect.mergeOverlappingRanges()}return E}},this.forEachSelection=function(T,C,w){if(!this.inVirtualSelectionMode){var E=w&&w.keepOrder,D=w==!0||w&&w.$byLines,I=this.session,L=this.selection,z=L.rangeList,F=(E?L:z).ranges,O;if(!F.length)return T.exec?T.exec(this,C||{}):T(this,C||{});var A=L._eventRegistry;L._eventRegistry={};var S=new x(I);this.inVirtualSelectionMode=!0;for(var N=F.length;N--;){if(D)for(;N>0&&F[N].start.row==F[N-1].end.row;)N--;S.fromOrientedRange(F[N]),S.index=N,this.selection=I.selection=S;var B=T.exec?T.exec(this,C||{}):T(this,C||{});!O&&B!==void 0&&(O=B),S.toOrientedRange(F[N])}S.detach(),this.selection=I.selection=L,this.inVirtualSelectionMode=!1,L._eventRegistry=A,L.mergeOverlappingRanges(),L.ranges[0]&&L.fromOrientedRange(L.ranges[0]);var V=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),V&&V.from==V.to&&this.renderer.animateScrolling(V.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var T="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,w=[],E=0;E<C.length;E++)w.push(this.session.getTextRange(C[E]));var D=this.session.getDocument().getNewLineCharacter();T=w.join(D),T.length==(w.length-1)*D.length&&(T="")}else this.selection.isEmpty()||(T=this.session.getTextRange(this.getSelectionRange()));return T},this.$checkMultiselectChange=function(T,C){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var w=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&C==this.multiSelect.anchor)return;var E=C==this.multiSelect.anchor?w.cursor==w.start?w.end:w.start:w.cursor;E.row!=C.row||this.session.$clipPositionToDocument(E.row,E.column).column!=C.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(T,C,w){if(C=C||{},C.needle=T||C.needle,C.needle==null){var E=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();C.needle=this.session.getTextRange(E)}this.$search.set(C);var D=this.$search.findAll(this.session);if(!D.length)return 0;var I=this.multiSelect;w||I.toSingleRange(D[0]);for(var L=D.length;L--;)I.addRange(D[L],!0);return E&&I.rangeList.rangeAtPoint(E.start)&&I.addRange(E,!0),D.length},this.selectMoreLines=function(T,C){var w=this.selection.toOrientedRange(),E=w.cursor==w.end,D=this.session.documentToScreenPosition(w.cursor);this.selection.$desiredColumn&&(D.column=this.selection.$desiredColumn);var I=this.session.screenToDocumentPosition(D.row+T,D.column);if(w.isEmpty())var z=I;else var L=this.session.documentToScreenPosition(E?w.end:w.start),z=this.session.screenToDocumentPosition(L.row+T,L.column);if(E){var F=v.fromPoints(I,z);F.cursor=F.start}else{var F=v.fromPoints(z,I);F.cursor=F.end}if(F.desiredColumn=D.column,!this.selection.inMultiSelectMode)this.selection.addRange(w);else if(C)var O=w.cursor;this.selection.addRange(F),O&&this.selection.substractPoint(O)},this.transposeSelections=function(T){for(var C=this.session,w=C.multiSelect,E=w.ranges,D=E.length;D--;){var I=E[D];if(I.isEmpty()){var L=C.getWordRange(I.start.row,I.start.column);I.start.row=L.start.row,I.start.column=L.start.column,I.end.row=L.end.row,I.end.column=L.end.column}}w.mergeOverlappingRanges();for(var z=[],D=E.length;D--;){var I=E[D];z.unshift(C.getTextRange(I))}T<0?z.unshift(z.pop()):z.push(z.shift());for(var D=E.length;D--;){var I=E[D],F=I.clone();C.replace(I,z[D]),I.start.row=F.start.row,I.start.column=F.start.column}w.fromOrientedRange(w.ranges[0])},this.selectMore=function(T,C,w){var E=this.session,D=E.multiSelect,I=D.toOrientedRange();if(!(I.isEmpty()&&(I=E.getWordRange(I.start.row,I.start.column),I.cursor=T==-1?I.start:I.end,this.multiSelect.addRange(I),w))){var L=E.getTextRange(I),z=n(E,L,T);z&&(z.cursor=T==-1?z.start:z.end,this.session.unfold(z),this.multiSelect.addRange(z),this.renderer.scrollCursorIntoView(null,.5)),C&&this.multiSelect.substractPoint(I.cursor)}},this.alignCursors=function(){var T=this.session,C=T.multiSelect,w=C.ranges,E=-1,D=w.filter(function(G){if(G.cursor.row==E)return!0;E=G.cursor.row});if(!w.length||D.length==w.length-1){var I=this.selection.getRange(),L=I.start.row,z=I.end.row,F=L==z;if(F){var O=this.session.getLength(),A;do A=this.session.getLine(z);while(/[=:]/.test(A)&&++z<O);do A=this.session.getLine(L);while(/[=:]/.test(A)&&--L>0);L<0&&(L=0),z>=O&&(z=O-1)}var S=this.session.removeFullLines(L,z);S=this.$reAlignText(S,F),this.session.insert({row:L,column:0},S.join(`
|
|
950
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,u,$){var b=e("../lib/dom"),v=e("../lib/oop"),x=e("../lib/event_emitter").EventEmitter,p=function(){function d(o,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(o)}return d.prototype.$createCanvas=function(){this.canvas=b.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},d.prototype.setScrollBarV=function(o){this.$createCanvas(),this.scrollbarV=o,o.element.appendChild(this.canvas),this.setDimensions()},d.prototype.$updateDecorators=function(o){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(o);var s=this.canvas.getContext("2d");function r(O,A){return O.priority<A.priority?-1:O.priority>A.priority?1:0}var n=this.renderer.session.$annotations;if(s.clearRect(0,0,this.canvas.width,this.canvas.height),n){var i={info:1,warning:2,error:3};n.forEach(function(O){O.priority=i[O.type]||null}),n=n.sort(r);for(var h=0;h<n.length;h++){var m=n[h].row,y=this.getVerticalOffsetForRow(m),R=y+this.lineHeight,T=Math.round(this.heightRatio*y),C=Math.round(this.heightRatio*R),w=Math.round((T+C)/2),E=C-w;E<this.halfMinDecorationHeight&&(E=this.halfMinDecorationHeight),w-E<0&&(w=E),w+E>this.canvasHeight&&(w=this.canvasHeight-E);var D=w-E,I=w+E,L=I-D;s.fillStyle=a[n[h].type]||null,s.fillRect(0,D,Math.round(this.oneZoneWidth-1),L)}}var z=this.renderer.session.selection.getCursor();if(z){var F=Math.round(this.getVerticalOffsetForRow(z.row)*this.heightRatio);s.fillStyle="rgba(0, 0, 0, 0.5)",s.fillRect(0,F,this.canvasWidth,2)}},d.prototype.getVerticalOffsetForRow=function(o){o=o|0;var a=this.renderer.session.documentToScreenRow(o,0)*this.lineHeight;return a},d.prototype.setDimensions=function(o){o=o||this.renderer.layerConfig,this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},d.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},d.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},d}();v.implement(p.prototype,x),u.Decorator=p}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,u,$){var b=e("./lib/oop"),v=e("./lib/dom"),x=e("./lib/lang"),p=e("./config"),d=e("./layer/gutter").Gutter,o=e("./layer/marker").Marker,a=e("./layer/text").Text,s=e("./layer/cursor").Cursor,r=e("./scrollbar").HScrollBar,n=e("./scrollbar").VScrollBar,i=e("./scrollbar_custom").HScrollBar,h=e("./scrollbar_custom").VScrollBar,m=e("./renderloop").RenderLoop,y=e("./layer/font_metrics").FontMetrics,R=e("./lib/event_emitter").EventEmitter,T=e("./css/editor-css"),C=e("./layer/decorators").Decorator,w=e("./lib/useragent"),E=e("./layer/text_util").isTextToken;v.importCssString(T,"ace_editor.css",!1);var D=function(){function I(L,z){var F=this;this.container=L||v.createElement("div"),v.addCssClass(this.container,"ace_editor"),v.HI_DPI&&v.addCssClass(this.container,"ace_hidpi"),this.setTheme(z),p.get("useStrictCSP")==null&&p.set("useStrictCSP",!1),this.$gutter=v.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=v.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=v.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new d(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var O=this.$textLayer=new a(this.content);this.canvas=O.element,this.$markerFront=new o(this.content),this.$cursorLayer=new s(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new n(this.container,this),this.scrollBarH=new r(this.container,this),this.scrollBarV.on("scroll",function(A){F.$scrollAnimation||F.session.setScrollTop(A.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function(A){F.$scrollAnimation||F.session.setScrollLeft(A.data-F.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(A){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",A)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new m(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),p.resetOptions(this),p._signal("renderer",this)}return I.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),v.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},I.prototype.setSession=function(L){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=L,L&&this.scrollMargin.top&&L.getScrollTop()<=0&&L.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(L),this.$markerBack.setSession(L),this.$markerFront.setSession(L),this.$gutterLayer.setSession(L),this.$textLayer.setSession(L),L&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},I.prototype.updateLines=function(L,z,F){if(z===void 0&&(z=1/0),this.$changedLines?(this.$changedLines.firstRow>L&&(this.$changedLines.firstRow=L),this.$changedLines.lastRow<z&&(this.$changedLines.lastRow=z)):this.$changedLines={firstRow:L,lastRow:z},this.$changedLines.lastRow<this.layerConfig.firstRow)if(F)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},I.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},I.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},I.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},I.prototype.updateFull=function(L){L?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},I.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},I.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},I.prototype.onResize=function(L,z,F,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=L?1:0;var A=this.container;O||(O=A.clientHeight||A.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!A.style.height||A.style.height=="0px")&&(A.style.height="1px",O=A.clientHeight||A.scrollHeight),F||(F=A.clientWidth||A.scrollWidth);var S=this.$updateCachedSize(L,z,F,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!O)return this.resizing=0;L&&(this.$gutterLayer.$padding=null),L?this.$renderChanges(S|this.$changes,!0):this.$loop.schedule(S|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},I.prototype.$updateCachedSize=function(L,z,F,O){O-=this.$extraHeight||0;var A=0,S=this.$size,N={width:S.width,height:S.height,scrollerHeight:S.scrollerHeight,scrollerWidth:S.scrollerWidth};if(O&&(L||S.height!=O)&&(S.height=O,A|=this.CHANGE_SIZE,S.scrollerHeight=S.height,this.$horizScroll&&(S.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(S.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",A=A|this.CHANGE_SCROLL),F&&(L||S.width!=F)){A|=this.CHANGE_SIZE,S.width=F,z==null&&(z=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=z,v.setStyle(this.scrollBarH.element.style,"left",z+"px"),v.setStyle(this.scroller.style,"left",z+this.margin.left+"px"),S.scrollerWidth=Math.max(0,F-z-this.scrollBarV.getWidth()-this.margin.h),v.setStyle(this.$gutter.style,"left",this.margin.left+"px");var W=this.scrollBarV.getWidth()+"px";v.setStyle(this.scrollBarH.element.style,"right",W),v.setStyle(this.scroller.style,"right",W),v.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(S.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||L)&&(A|=this.CHANGE_FULL)}return S.$dirty=!F||!O,A&&this._signal("resize",N),A},I.prototype.onGutterResize=function(L){var z=this.$showGutter?L:0;z!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,z,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},I.prototype.adjustWrapLimit=function(){var L=this.$size.scrollerWidth-this.$padding*2,z=Math.floor(L/this.characterWidth);return this.session.adjustWrapLimit(z,this.$showPrintMargin&&this.$printMarginColumn)},I.prototype.setAnimatedScroll=function(L){this.setOption("animatedScroll",L)},I.prototype.getAnimatedScroll=function(){return this.$animatedScroll},I.prototype.setShowInvisibles=function(L){this.setOption("showInvisibles",L),this.session.$bidiHandler.setShowInvisibles(L)},I.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},I.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},I.prototype.setDisplayIndentGuides=function(L){this.setOption("displayIndentGuides",L)},I.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},I.prototype.setHighlightIndentGuides=function(L){this.setOption("highlightIndentGuides",L)},I.prototype.setShowPrintMargin=function(L){this.setOption("showPrintMargin",L)},I.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},I.prototype.setPrintMarginColumn=function(L){this.setOption("printMarginColumn",L)},I.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},I.prototype.getShowGutter=function(){return this.getOption("showGutter")},I.prototype.setShowGutter=function(L){return this.setOption("showGutter",L)},I.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},I.prototype.setFadeFoldWidgets=function(L){this.setOption("fadeFoldWidgets",L)},I.prototype.setHighlightGutterLine=function(L){this.setOption("highlightGutterLine",L)},I.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},I.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var L=v.createElement("div");L.className="ace_layer ace_print-margin-layer",this.$printMarginEl=v.createElement("div"),this.$printMarginEl.className="ace_print-margin",L.appendChild(this.$printMarginEl),this.content.insertBefore(L,this.content.firstChild)}var z=this.$printMarginEl.style;z.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",z.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},I.prototype.getContainerElement=function(){return this.container},I.prototype.getMouseEventTarget=function(){return this.scroller},I.prototype.getTextAreaContainer=function(){return this.container},I.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var L=this.textarea.style,z=this.$composition;if(!this.$keepTextAreaAtCursor&&!z){v.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){z&&z.markerRange&&(F=this.$cursorLayer.getPixelPosition(z.markerRange.start,!0));var O=this.layerConfig,A=F.top,S=F.left;A-=O.offset;var N=z&&z.useTextareaForIME||w.isMobile?this.lineHeight:1;if(A<0||A>O.height-N){v.translate(this.textarea,0,0);return}var W=1,V=this.$size.height-N;if(!z)A+=this.lineHeight;else if(z.useTextareaForIME){var G=this.textarea.value;W=this.characterWidth*this.session.$getStringScreenWidth(G)[0]}else A+=this.lineHeight+2;S-=this.scrollLeft,S>this.$size.scrollerWidth-W&&(S=this.$size.scrollerWidth-W),S+=this.gutterWidth+this.margin.left,v.setStyle(L,"height",N+"px"),v.setStyle(L,"width",W+"px"),v.translate(this.textarea,Math.min(S,this.$size.scrollerWidth-W),Math.min(A,V))}}},I.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},I.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},I.prototype.getLastFullyVisibleRow=function(){var L=this.layerConfig,z=L.lastRow,F=this.session.documentToScreenRow(z,0)*L.lineHeight;return F-this.session.getScrollTop()>L.height-L.lineHeight?z-1:z},I.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},I.prototype.setPadding=function(L){this.$padding=L,this.$textLayer.setPadding(L),this.$cursorLayer.setPadding(L),this.$markerFront.setPadding(L),this.$markerBack.setPadding(L),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},I.prototype.setScrollMargin=function(L,z,F,O){var A=this.scrollMargin;A.top=L|0,A.bottom=z|0,A.right=O|0,A.left=F|0,A.v=A.top+A.bottom,A.h=A.left+A.right,A.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-A.top),this.updateFull()},I.prototype.setMargin=function(L,z,F,O){var A=this.margin;A.top=L|0,A.bottom=z|0,A.right=O|0,A.left=F|0,A.v=A.top+A.bottom,A.h=A.left+A.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},I.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},I.prototype.setHScrollBarAlwaysVisible=function(L){this.setOption("hScrollBarAlwaysVisible",L)},I.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},I.prototype.setVScrollBarAlwaysVisible=function(L){this.setOption("vScrollBarAlwaysVisible",L)},I.prototype.$updateScrollBarV=function(){var L=this.layerConfig.maxHeight,z=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(L-=(z-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>L-z&&(L=this.scrollTop+z,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(L+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},I.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},I.prototype.freeze=function(){this.$frozen=!0},I.prototype.unfreeze=function(){this.$frozen=!1},I.prototype.$renderChanges=function(L,z){if(this.$changes&&(L|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!L&&!z){this.$changes|=L;return}if(this.$size.$dirty)return this.$changes|=L,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",L),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(L&this.CHANGE_FULL||L&this.CHANGE_SIZE||L&this.CHANGE_TEXT||L&this.CHANGE_LINES||L&this.CHANGE_SCROLL||L&this.CHANGE_H_SCROLL){if(L|=this.$computeLayerConfig()|this.$loop.clear(),F.firstRow!=this.layerConfig.firstRow&&F.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(F.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,L=L|this.CHANGE_SCROLL,L|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),L&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),v.translate(this.content,-this.scrollLeft,-F.offset);var A=F.width+2*this.$padding+"px",S=F.minHeight+"px";v.setStyle(this.content.style,"width",A),v.setStyle(this.content.style,"height",S)}if(L&this.CHANGE_H_SCROLL&&(v.translate(this.content,-this.scrollLeft,-F.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),L&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",L);return}if(L&this.CHANGE_SCROLL){this.$changedLines=null,L&this.CHANGE_TEXT||L&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(L&this.CHANGE_GUTTER||L&this.CHANGE_LINES?this.$gutterLayer.update(F):this.$gutterLayer.scrollLines(F)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",L);return}L&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):L&this.CHANGE_LINES?((this.$updateLines()||L&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):L&this.CHANGE_TEXT||L&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):L&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),L&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",L)},I.prototype.$autosize=function(){var L=this.session.getScreenLength()*this.lineHeight,z=this.$maxLines*this.lineHeight,F=Math.min(z,Math.max((this.$minLines||1)*this.lineHeight,L))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(F+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&F>this.$maxPixelHeight&&(F=this.$maxPixelHeight);var O=F<=2*this.lineHeight,A=!O&&L>z;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||A!=this.$vScroll){A!=this.$vScroll&&(this.$vScroll=A,this.scrollBarV.setVisible(A));var S=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,S,F),this.desiredHeight=F,this._signal("autosize")}},I.prototype.$computeLayerConfig=function(){var L=this.session,z=this.$size,F=z.height<=2*this.lineHeight,O=this.session.getScreenLength(),A=O*this.lineHeight,S=this.$getLongestLine(),N=!F&&(this.$hScrollBarAlwaysVisible||z.scrollerWidth-S-2*this.$padding<0),W=this.$horizScroll!==N;W&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var V=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),F=z.height<=2*this.lineHeight);var G=z.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(z.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;A+=Z;var ee=this.scrollMargin;this.session.setScrollTop(Math.max(-ee.top,Math.min(this.scrollTop,A-z.scrollerHeight+ee.bottom))),this.session.setScrollLeft(Math.max(-ee.left,Math.min(this.scrollLeft,S+2*this.$padding-z.scrollerWidth+ee.right)));var ce=!F&&(this.$vScrollBarAlwaysVisible||z.scrollerHeight-A+Z<0||this.scrollTop>ee.top),ne=V!==ce;ne&&(this.$vScroll=ce,this.scrollBarV.setVisible(ce));var he=this.scrollTop%this.lineHeight,ue=Math.ceil(G/this.lineHeight)-1,le=Math.max(0,Math.round((this.scrollTop-he)/this.lineHeight)),me=le+ue,_e,Ae,Me=this.lineHeight;le=L.screenToDocumentRow(le,0);var qe=L.getFoldLine(le);qe&&(le=qe.start.row),_e=L.documentToScreenRow(le,0),Ae=L.getRowLength(le)*Me,me=Math.min(L.screenToDocumentRow(me,0),L.getLength()-1),G=z.scrollerHeight+L.getRowLength(me)*Me+Ae,he=this.scrollTop-_e*Me,he<0&&_e>0&&(_e=Math.max(0,_e+Math.floor(he/Me)),he=this.scrollTop-_e*Me);var Ve=0;return(this.layerConfig.width!=S||W)&&(Ve=this.CHANGE_H_SCROLL),(W||ne)&&(Ve|=this.$updateCachedSize(!0,this.gutterWidth,z.width,z.height),this._signal("scrollbarVisibilityChanged"),ne&&(S=this.$getLongestLine())),this.layerConfig={width:S,padding:this.$padding,firstRow:le,firstRowScreen:_e,lastRow:me,lineHeight:Me,characterWidth:this.characterWidth,minHeight:G,maxHeight:A,offset:he,gutterOffset:Me?Math.max(0,Math.ceil((he+z.height-z.scrollerHeight)/Me)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(S-this.$padding),Ve},I.prototype.$updateLines=function(){if(this.$changedLines){var L=this.$changedLines.firstRow,z=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(L>F.lastRow+1)&&!(z<F.firstRow)){if(z===1/0){this.$showGutter&&this.$gutterLayer.update(F),this.$textLayer.update(F);return}return this.$textLayer.updateLines(F,L,z),!0}}},I.prototype.$getLongestLine=function(){var L=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(L+=1),this.$textLayer&&L>this.$textLayer.MAX_LINE_LENGTH&&(L=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(L*this.characterWidth))},I.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},I.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},I.prototype.addGutterDecoration=function(L,z){this.$gutterLayer.addGutterDecoration(L,z)},I.prototype.removeGutterDecoration=function(L,z){this.$gutterLayer.removeGutterDecoration(L,z)},I.prototype.updateBreakpoints=function(L){this._rows=L,this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.setAnnotations=function(L){this.$gutterLayer.setAnnotations(L),this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},I.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},I.prototype.showCursor=function(){this.$cursorLayer.showCursor()},I.prototype.scrollSelectionIntoView=function(L,z,F){this.scrollCursorIntoView(L,F),this.scrollCursorIntoView(z,F)},I.prototype.scrollCursorIntoView=function(L,z,F){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(L),A=O.left,S=O.top,N=F&&F.top||0,W=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var V=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;V+N>S?(z&&V+N>S+this.lineHeight&&(S-=z*this.$size.scrollerHeight),S===0&&(S=-this.scrollMargin.top),this.session.setScrollTop(S)):V+this.$size.scrollerHeight-W<S+this.lineHeight&&(z&&V+this.$size.scrollerHeight-W<S-this.lineHeight&&(S+=z*this.$size.scrollerHeight),this.session.setScrollTop(S+this.lineHeight+W-this.$size.scrollerHeight));var G=this.scrollLeft,Z=2*this.layerConfig.characterWidth;A-Z<G?(A-=Z,A<this.$padding+Z&&(A=-this.scrollMargin.left),this.session.setScrollLeft(A)):(A+=Z,G+this.$size.scrollerWidth<A+this.characterWidth?this.session.setScrollLeft(Math.round(A+this.characterWidth-this.$size.scrollerWidth)):G<=this.$padding&&A-G<this.characterWidth&&this.session.setScrollLeft(0))}},I.prototype.getScrollTop=function(){return this.session.getScrollTop()},I.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},I.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},I.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},I.prototype.scrollToRow=function(L){this.session.setScrollTop(L*this.lineHeight)},I.prototype.alignCursor=function(L,z){typeof L=="number"&&(L={row:L,column:0});var F=this.$cursorLayer.getPixelPosition(L),O=this.$size.scrollerHeight-this.lineHeight,A=F.top-O*(z||0);return this.session.setScrollTop(A),A},I.prototype.$calcSteps=function(L,z){var F=0,O=this.STEPS,A=[],S=function(N,W,V){return V*(Math.pow(N-1,3)+1)+W};for(F=0;F<O;++F)A.push(S(F/this.STEPS,L,z-L));return A},I.prototype.scrollToLine=function(L,z,F,O){var A=this.$cursorLayer.getPixelPosition({row:L,column:0}),S=A.top;z&&(S-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(S),F!==!1&&this.animateScrolling(N,O)},I.prototype.animateScrolling=function(L,z){var F=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(L==F)return;if(this.$scrollAnimation){var A=this.$scrollAnimation.steps;if(A.length&&(L=A[0],L==F))return}var S=O.$calcSteps(L,F);this.$scrollAnimation={from:L,to:F,steps:S},clearInterval(this.$timer),O.session.setScrollTop(S.shift()),O.session.$scrollTop=F;function N(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,z&&z()}this.$timer=setInterval(function(){if(O.$stopAnimation){N();return}if(!O.session)return clearInterval(O.$timer);S.length?(O.session.setScrollTop(S.shift()),O.session.$scrollTop=F):F!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(F),F=null):N()},10)},I.prototype.scrollToY=function(L){this.scrollTop!==L&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=L)},I.prototype.scrollToX=function(L){this.scrollLeft!==L&&(this.scrollLeft=L),this.$loop.schedule(this.CHANGE_H_SCROLL)},I.prototype.scrollTo=function(L,z){this.session.setScrollTop(z),this.session.setScrollLeft(L)},I.prototype.scrollBy=function(L,z){z&&this.session.setScrollTop(this.session.getScrollTop()+z),L&&this.session.setScrollLeft(this.session.getScrollLeft()+L)},I.prototype.isScrollableBy=function(L,z){if(z<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||z>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||L<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||L>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},I.prototype.pixelToScreenCoordinates=function(L,z){var F;if(this.$hasCssTransforms){F={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([L,z]);L=O[1]-this.gutterWidth-this.margin.left,z=O[0]}else F=this.scroller.getBoundingClientRect();var A=L+this.scrollLeft-F.left-this.$padding,S=A/this.characterWidth,N=Math.floor((z+this.scrollTop-F.top)/this.lineHeight),W=this.$blockCursor?Math.floor(S):Math.round(S);return{row:N,column:W,side:S-W>0?1:-1,offsetX:A}},I.prototype.screenToTextCoordinates=function(L,z){var F;if(this.$hasCssTransforms){F={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([L,z]);L=O[1]-this.gutterWidth-this.margin.left,z=O[0]}else F=this.scroller.getBoundingClientRect();var A=L+this.scrollLeft-F.left-this.$padding,S=A/this.characterWidth,N=this.$blockCursor?Math.floor(S):Math.round(S),W=Math.floor((z+this.scrollTop-F.top)/this.lineHeight);return this.session.screenToDocumentPosition(W,Math.max(N,0),A)},I.prototype.textToScreenCoordinates=function(L,z){var F=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(L,z),A=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,L)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),S=O.row*this.lineHeight;return{pageX:F.left+A-this.scrollLeft,pageY:F.top+S-this.scrollTop}},I.prototype.visualizeFocus=function(){v.addCssClass(this.container,"ace_focus")},I.prototype.visualizeBlur=function(){v.removeCssClass(this.container,"ace_focus")},I.prototype.showComposition=function(L){this.$composition=L,L.cssText||(L.cssText=this.textarea.style.cssText),L.useTextareaForIME==null&&(L.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(v.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):L.markerId=this.session.addMarker(L.markerRange,"ace_composition_marker","text")},I.prototype.setCompositionText=function(L){var z=this.session.selection.cursor;this.addToken(L,"composition_placeholder",z.row,z.column),this.$moveTextAreaToCursor()},I.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),v.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var L=this.session.selection.cursor;this.removeExtraToken(L.row,L.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},I.prototype.setGhostText=function(L,z){var F=this.session.selection.cursor,O=z||{row:F.row,column:F.column};this.removeGhostText();var A=this.$calculateWrappedTextChunks(L,O);this.addToken(A[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:L,position:{row:O.row,column:O.column}};var S=v.createElement("div");if(A.length>1){var N=this.hideTokensAfterPosition(O.row,O.column),W;A.slice(1).forEach(function(ne){var he=v.createElement("div"),ue=v.createElement("span");ue.className="ace_ghost_text",ne.wrapped&&(he.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ue.appendChild(v.createTextNode(ne.text)),he.appendChild(ue),S.appendChild(he),W=he}),N.forEach(function(ne){var he=v.createElement("span");E(ne.type)||(he.className="ace_"+ne.type.replace(/\./g," ace_")),he.appendChild(v.createTextNode(ne.value)),W.appendChild(he)}),this.$ghostTextWidget={el:S,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var V=this.$cursorLayer.getPixelPosition(O,!0),G=this.container,Z=G.getBoundingClientRect().height,ee=A.length*this.lineHeight,ce=ee<Z-V.top;if(ce)return;ee<Z?this.scrollBy(0,(A.length-1)*this.lineHeight):this.scrollToRow(O.row)}},I.prototype.$calculateWrappedTextChunks=function(L,z){var F=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(F/this.characterWidth)-2;O=O<=0?60:O;for(var A=L.split(/\r?\n/),S=[],N=0;N<A.length;N++){var W=this.session.$getDisplayTokens(A[N],z.column),V=this.session.$computeWrapSplits(W,O,this.session.$tabSize);if(V.length>0){var G=0;V.push(A[N].length);for(var Z=0;Z<V.length;Z++){var ee=A[N].slice(G,V[Z]);S.push({text:ee,wrapped:!0}),G=V[Z]}}else S.push({text:A[N],wrapped:!1})}return S},I.prototype.removeGhostText=function(){if(this.$ghostText){var L=this.$ghostText.position;this.removeExtraToken(L.row,L.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},I.prototype.addToken=function(L,z,F,O){var A=this.session;A.bgTokenizer.lines[F]=null;var S={type:z,value:L},N=A.getTokens(F);if(O==null||!N.length)N.push(S);else for(var W=0,V=0;V<N.length;V++){var G=N[V];if(W+=G.value.length,O<=W){var Z=G.value.length-(W-O),ee=G.value.slice(0,Z),ce=G.value.slice(Z);N.splice(V,1,{type:G.type,value:ee},S,{type:G.type,value:ce});break}}this.updateLines(F,F)},I.prototype.hideTokensAfterPosition=function(L,z){for(var F=this.session.getTokens(L),O=0,A=!1,S=[],N=0;N<F.length;N++){var W=F[N];if(O+=W.value.length,W.type!=="ghost_text"){if(A){S.push({type:W.type,value:W.value}),W.type="hidden_token";continue}O===z&&(A=!0)}}return this.updateLines(L,L),S},I.prototype.removeExtraToken=function(L,z){this.session.bgTokenizer.lines[L]=null,this.updateLines(L,L)},I.prototype.setTheme=function(L,z){var F=this;if(this.$themeId=L,F._dispatchEvent("themeChange",{theme:L}),!L||typeof L=="string"){var O=L||this.$options.theme.initialValue;p.loadModule(["theme",O],A)}else A(L);function A(S){if(F.$themeId!=L)return z&&z();if(!S||!S.cssClass)throw new Error("couldn't load module "+L+" or it didn't call define");S.$id&&(F.$themeId=S.$id),v.importCssString(S.cssText,S.cssClass,F.container),F.theme&&v.removeCssClass(F.container,F.theme.cssClass);var N="padding"in S?S.padding:"padding"in(F.theme||{})?4:F.$padding;if(F.$padding&&N!=F.$padding&&F.setPadding(N),F.$gutterLayer){var W=S.$showGutterCursorMarker;W&&!F.$gutterLayer.$showCursorMarker?F.$gutterLayer.$showCursorMarker="theme":!W&&F.$gutterLayer.$showCursorMarker=="theme"&&(F.$gutterLayer.$showCursorMarker=null)}F.$theme=S.cssClass,F.theme=S,v.addCssClass(F.container,S.cssClass),v.setCssClass(F.container,"ace_dark",S.isDark),F.$size&&(F.$size.width=0,F.$updateSizeAsync()),F._dispatchEvent("themeLoaded",{theme:S}),z&&z(),w.isSafari&&F.scroller&&(F.scroller.style.background="red",F.scroller.style.background="")}},I.prototype.getTheme=function(){return this.$themeId},I.prototype.setStyle=function(L,z){v.setCssClass(this.container,L,z!==!1)},I.prototype.unsetStyle=function(L){v.removeCssClass(this.container,L)},I.prototype.setCursorStyle=function(L){v.setStyle(this.scroller.style,"cursor",L)},I.prototype.setMouseCursor=function(L){v.setStyle(this.scroller.style,"cursor",L)},I.prototype.attachToShadowRoot=function(){v.importCssString(T,"ace_editor.css",this.container)},I.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},I.prototype.$updateCustomScrollbar=function(L){var z=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),L===!0?(this.scrollBarV=new h(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollTop(F.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollLeft(F.data-z.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new C(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new n(this.container,this),this.scrollBarH=new r(this.container,this),this.scrollBarV.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollTop(F.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollLeft(F.data-z.scrollMargin.left)}))},I.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var L=this;this.$resizeTimer=x.delayedCall(function(){L.destroyed||L.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(z){var F=z[0].contentRect.width,O=z[0].contentRect.height;Math.abs(L.$size.width-F)>1||Math.abs(L.$size.height-O)>1?L.$resizeTimer.delay():L.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},I}();D.prototype.CHANGE_CURSOR=1,D.prototype.CHANGE_MARKER=2,D.prototype.CHANGE_GUTTER=4,D.prototype.CHANGE_SCROLL=8,D.prototype.CHANGE_LINES=16,D.prototype.CHANGE_TEXT=32,D.prototype.CHANGE_SIZE=64,D.prototype.CHANGE_MARKER_BACK=128,D.prototype.CHANGE_MARKER_FRONT=256,D.prototype.CHANGE_FULL=512,D.prototype.CHANGE_H_SCROLL=1024,D.prototype.$changes=0,D.prototype.$padding=null,D.prototype.$frozen=!1,D.prototype.STEPS=8,b.implement(D.prototype,R),p.defineOptions(D.prototype,"renderer",{useResizeObserver:{set:function(I){!I&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):I&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(I){this.$textLayer.setShowInvisibles(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(I){typeof I=="number"&&(this.$printMarginColumn=I),this.$showPrintMargin=!!I,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(I){this.$gutter.style.display=I?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(I){this.$gutterLayer.$useSvgGutterIcons=I},initialValue:!1},showFoldedAnnotations:{set:function(I){this.$gutterLayer.$showFoldedAnnotations=I},initialValue:!1},fadeFoldWidgets:{set:function(I){v.setCssClass(this.$gutter,"ace_fade-fold-widgets",I)},initialValue:!1},showFoldWidgets:{set:function(I){this.$gutterLayer.setShowFoldWidgets(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(I){this.$textLayer.setDisplayIndentGuides(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(I){this.$textLayer.setHighlightIndentGuides(I)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(I){this.$gutterLayer.setHighlightGutterLine(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(I){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(I){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(I){typeof I=="number"&&(I=I+"px"),this.container.style.fontSize=I,this.updateFontSize()},initialValue:12},fontFamily:{set:function(I){this.container.style.fontFamily=I,this.updateFontSize()}},maxLines:{set:function(I){this.updateFull()}},minLines:{set:function(I){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(I){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(I){I=+I||0,this.$scrollPastEnd!=I&&(this.$scrollPastEnd=I,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(I){this.$gutterLayer.$fixedWidth=!!I,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(I){this.$updateCustomScrollbar(I)},initialValue:!1},theme:{set:function(I){this.setTheme(I)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),u.VirtualRenderer=D}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,u,$){var b=e("../lib/oop"),v=e("../lib/net"),x=e("../lib/event_emitter").EventEmitter,p=e("../config");function d(r){var n="importScripts('"+v.qualifyURL(r)+"');";try{return new Blob([n],{type:"application/javascript"})}catch{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,h=new i;return h.append(n),h.getBlob("application/javascript")}}function o(r){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(p.get("loadWorkerFromBlob")){var n=d(r),i=window.URL||window.webkitURL,h=i.createObjectURL(n);return new Worker(h)}return new Worker(r)}var a=function(r){r.postMessage||(r=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=r,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){b.implement(this,x),this.$createWorkerFromOldConfig=function(r,n,i,h,m){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),p.get("packaged")||!e.toUrl)h=h||p.moduleUrl(n,"worker");else{var y=this.$normalizePath;h=h||y(e.toUrl("ace/worker/worker.js",null,"_"));var R={};r.forEach(function(T){R[T]=y(e.toUrl(T,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(h),m&&this.send("importScripts",m),this.$worker.postMessage({init:!0,tlns:R,module:n,classname:i}),this.$worker},this.onMessage=function(r){var n=r.data;switch(n.type){case"event":this._signal(n.name,{data:n.data});break;case"call":var i=this.callbacks[n.id];i&&(i(n.data),delete this.callbacks[n.id]);break;case"error":this.reportError(n.data);break;case"log":window.console&&console.log&&console.log.apply(console,n.data);break}},this.reportError=function(r){window.console&&console.error&&console.error(r)},this.$normalizePath=function(r){return v.qualifyURL(r)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(r){r.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(r,n){this.$worker.postMessage({command:r,args:n})},this.call=function(r,n,i){if(i){var h=this.callbackId++;this.callbacks[h]=i,n.push(h)}this.send(r,n)},this.emit=function(r,n){try{n.data&&n.data.err&&(n.data.err={message:n.data.err.message,stack:n.data.err.stack,code:n.data.err.code}),this.$worker&&this.$worker.postMessage({event:r,data:{data:n.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(r){this.$doc&&this.terminate(),this.$doc=r,this.call("setValue",[r.getValue()]),r.on("change",this.changeListener,!0)},this.changeListener=function(r){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),r.action=="insert"?this.deltaQueue.push(r.start,r.lines):this.deltaQueue.push(r.start,r.end)},this.$sendDeltaQueue=function(){var r=this.deltaQueue;r&&(this.deltaQueue=null,r.length>50&&r.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:r}))}}).call(a.prototype);var s=function(r,n,i){var h=null,m=!1,y=Object.create(x),R=[],T=new a({messageBuffer:R,terminate:function(){},postMessage:function(w){R.push(w),h&&(m?setTimeout(C):C())}});T.setEmitSync=function(w){m=w};var C=function(){var w=R.shift();w.command?h[w.command].apply(h,w.args):w.event&&y._signal(w.event,w.data)};return y.postMessage=function(w){T.onMessage({data:w})},y.callback=function(w,E){this.postMessage({type:"call",id:E,data:w})},y.emit=function(w,E){this.postMessage({type:"event",name:w,data:E})},p.loadModule(["worker",n],function(w){for(h=new w[i](y);R.length;)C()}),T};u.UIWorkerClient=s,u.WorkerClient=a,u.createWorker=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,u,$){var b=e("./range").Range,v=e("./lib/event_emitter").EventEmitter,x=e("./lib/oop"),p=function(){function d(o,a,s,r,n,i){var h=this;this.length=a,this.session=o,this.doc=o.getDocument(),this.mainClass=n,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){h.onCursorChange()})},this.$pos=s;var m=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=m.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return d.prototype.setup=function(){var o=this,a=this.doc,s=this.session;this.selectionBefore=s.selection.toJSON(),s.selection.inMultiSelectMode&&s.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=s.addMarker(new b(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var i=a.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),o.others.push(i)}),s.setUndoSelect(!1)},d.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,a=this;this.othersActive=!0,this.others.forEach(function(s){s.markerId=o.addMarker(new b(s.row,s.column,s.row,s.column+a.length),a.othersClass,null,!1)})}},d.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o<this.others.length;o++)this.session.removeMarker(this.others[o].markerId)}},d.prototype.onUpdate=function(o){if(this.$updating)return this.updateAnchors(o);var a=o;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var s=o.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,r=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,n=a.start.column-this.pos.column;if(this.updateAnchors(o),r&&(this.length+=s),r&&!this.session.$fromUndo){if(o.action==="insert")for(var i=this.others.length-1;i>=0;i--){var h=this.others[i],m={row:h.row,column:h.column+n};this.doc.insertMergedLines(m,o.lines)}else if(o.action==="remove")for(var i=this.others.length-1;i>=0;i--){var h=this.others[i],m={row:h.row,column:h.column+n};this.doc.remove(new b(m.row,m.column,m.row,m.column-s))}}this.$updating=!1,this.updateMarkers()}},d.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var a=this.others.length;a--;)this.others[a].onChange(o);this.updateMarkers()},d.prototype.updateMarkers=function(){if(!this.$updating){var o=this,a=this.session,s=function(n,i){a.removeMarker(n.markerId),n.markerId=a.addMarker(new b(n.row,n.column,n.row,n.column+o.length),i,null,!1)};s(this.pos,this.mainClass);for(var r=this.others.length;r--;)s(this.others[r],this.othersClass)}},d.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},d.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},d.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),a=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,s=0;s<a;s++)o.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},d}();x.implement(p.prototype,v),u.PlaceHolder=p}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,u,$){var b=e("../lib/event"),v=e("../lib/useragent");function x(d,o){return d.row==o.row&&d.column==o.column}function p(d){var o=d.domEvent,a=o.altKey,s=o.shiftKey,r=o.ctrlKey,n=d.getAccelKey(),i=d.getButton();if(r&&v.isMac&&(i=o.button),d.editor.inMultiSelectMode&&i==2){d.editor.textInput.onContextMenu(d.domEvent);return}if(!r&&!a&&!n){i===0&&d.editor.inMultiSelectMode&&d.editor.exitMultiSelectMode();return}if(i===0){var h=d.editor,m=h.selection,y=h.inMultiSelectMode,R=d.getDocumentPosition(),T=m.getCursor(),C=d.inSelection()||m.isEmpty()&&x(R,T),w=d.x,E=d.y,D=function(ee){w=ee.clientX,E=ee.clientY},I=h.session,L=h.renderer.pixelToScreenCoordinates(w,E),z=L,F;if(h.$mouseHandler.$enableJumpToDef)r&&a||n&&a?F=s?"block":"add":a&&h.$blockSelectEnabled&&(F="block");else if(n&&!a){if(F="add",!y&&s)return}else a&&h.$blockSelectEnabled&&(F="block");if(F&&v.isMac&&o.ctrlKey&&h.$mouseHandler.cancelContextMenu(),F=="add"){if(!y&&C)return;if(!y){var O=m.toOrientedRange();h.addSelectionMarker(O)}var A=m.rangeList.rangeAtPoint(R);h.inVirtualSelectionMode=!0,s&&(A=null,O=m.ranges[0]||O,h.removeSelectionMarker(O)),h.once("mouseup",function(){var ee=m.toOrientedRange();A&&ee.isEmpty()&&x(A.cursor,ee.cursor)?m.substractPoint(ee.cursor):(s?m.substractPoint(O.cursor):O&&(h.removeSelectionMarker(O),m.addRange(O)),m.addRange(ee)),h.inVirtualSelectionMode=!1})}else if(F=="block"){d.stop(),h.inVirtualSelectionMode=!0;var S,N=[],W=function(){var ee=h.renderer.pixelToScreenCoordinates(w,E),ce=I.screenToDocumentPosition(ee.row,ee.column,ee.offsetX);x(z,ee)&&x(ce,m.lead)||(z=ee,h.selection.moveToPosition(ce),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(N),N=m.rectangularRangeBlock(z,L),h.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=h.$mouseHandler.$clickSelection.clone()),N.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers())};y&&!n?m.toSingleRange():!y&&n&&(S=m.toOrientedRange(),h.addSelectionMarker(S)),s?L=I.documentToScreenPosition(m.lead):m.moveToPosition(R),z={row:-1,column:-1};var V=function(ee){W(),clearInterval(Z),h.removeSelectionMarkers(N),N.length||(N=[m.toOrientedRange()]),S&&(h.removeSelectionMarker(S),m.toSingleRange(S));for(var ce=0;ce<N.length;ce++)m.addRange(N[ce]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null},G=W;b.capture(h.container,D,V);var Z=setInterval(function(){G()},20);return d.preventDefault()}}}u.onMouseDown=p}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,u,$){u.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(v){v.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(v){v.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(v){v.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(v){v.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(v){v.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(v){v.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(v){v.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(v){v.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(v){v.multiSelect.rangeCount>1?v.multiSelect.joinSelections():v.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(v){v.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(v){v.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(v){v.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],u.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(v){v.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(v){return v&&v.inMultiSelectMode}}];var b=e("../keyboard/hash_handler").HashHandler;u.keyboardHandler=new b(u.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,u,$){var b=e("./range_list").RangeList,v=e("./range").Range,x=e("./selection").Selection,p=e("./mouse/multi_select_handler").onMouseDown,d=e("./lib/event"),o=e("./lib/lang"),a=e("./commands/multi_select_commands");u.commands=a.defaultCommands.concat(a.multiSelectCommands);var s=e("./search").Search,r=new s;function n(T,C,w){return r.$options.wrap=!0,r.$options.needle=C,r.$options.backwards=w==-1,r.find(T)}var i=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(i.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(T,C){if(T){if(!this.inMultiSelectMode&&this.rangeCount===0){var w=this.toOrientedRange();if(this.rangeList.add(w),this.rangeList.add(T),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange(T);this.rangeList.removeAll(),this.rangeList.add(w),this.$onAddRange(w)}T.cursor||(T.cursor=T.end);var E=this.rangeList.add(T);return this.$onAddRange(T),E.length&&this.$onRemoveRange(E),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),C||this.fromOrientedRange(T)}},this.toSingleRange=function(T){T=T||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),T&&this.fromOrientedRange(T)},this.substractPoint=function(T){var C=this.rangeList.substractPoint(T);if(C)return this.$onRemoveRange(C),C[0]},this.mergeOverlappingRanges=function(){var T=this.rangeList.merge();T.length&&this.$onRemoveRange(T)},this.$onAddRange=function(T){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(T),this._signal("addRange",{range:T})},this.$onRemoveRange=function(T){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var C=this.rangeList.ranges.pop();T.push(C),this.rangeCount=0}for(var w=T.length;w--;){var E=this.ranges.indexOf(T[w]);this.ranges.splice(E,1)}this._signal("removeRange",{ranges:T}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new b,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var T=this.ranges.length?this.ranges:[this.getRange()],C=[],w=0;w<T.length;w++){var E=T[w],D=E.start.row,I=E.end.row;if(D===I)C.push(E.clone());else{for(C.push(new v(D,E.start.column,D,this.session.getLine(D).length));++D<I;)C.push(this.getLineRange(D,!0));C.push(new v(I,0,I,E.end.column))}w==0&&!this.isBackwards()&&(C=C.reverse())}this.toSingleRange();for(var w=C.length;w--;)this.addRange(C[w])},this.joinSelections=function(){var T=this.rangeList.ranges,C=T[T.length-1],w=v.fromPoints(T[0].start,C.end);this.toSingleRange(),this.setSelectionRange(w,C.cursor==C.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var T=this.rangeList.ranges,C=T[T.length-1],w=v.fromPoints(T[0].start,C.end);this.toSingleRange(),this.setSelectionRange(w,C.cursor==C.start)}else{var E=this.session.documentToScreenPosition(this.cursor),D=this.session.documentToScreenPosition(this.anchor),I=this.rectangularRangeBlock(E,D);I.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(T,C,w){var E=[],D=T.column<C.column;if(D)var I=T.column,L=C.column,z=T.offsetX,F=C.offsetX;else var I=C.column,L=T.column,z=C.offsetX,F=T.offsetX;var O=T.row<C.row;if(O)var A=T.row,S=C.row;else var A=C.row,S=T.row;I<0&&(I=0),A<0&&(A=0),A==S&&(w=!0);for(var N,W=A;W<=S;W++){var V=v.fromPoints(this.session.screenToDocumentPosition(W,I,z),this.session.screenToDocumentPosition(W,L,F));if(V.isEmpty()){if(N&&m(V.end,N))break;N=V.end}V.cursor=D?V.start:V.end,E.push(V)}if(O&&E.reverse(),!w){for(var G=E.length-1;E[G].isEmpty()&&G>0;)G--;if(G>0)for(var Z=0;E[Z].isEmpty();)Z++;for(var ee=G;ee>=Z;ee--)E[ee].isEmpty()&&E.splice(ee,1)}return E}}).call(x.prototype);var h=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(T){T.cursor||(T.cursor=T.end);var C=this.getSelectionStyle();return T.marker=this.session.addMarker(T,"ace_selection",C),this.session.$selectionMarkers.push(T),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,T},this.removeSelectionMarker=function(T){if(T.marker){this.session.removeMarker(T.marker);var C=this.session.$selectionMarkers.indexOf(T);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(T){for(var C=this.session.$selectionMarkers,w=T.length;w--;){var E=T[w];if(E.marker){this.session.removeMarker(E.marker);var D=C.indexOf(E);D!=-1&&C.splice(D,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function(T){this.addSelectionMarker(T.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(T){this.removeSelectionMarkers(T.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(T){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(T){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(T){var C=T.command,w=T.editor;if(w.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?E=w.forEachSelection(C,T.args):C.multiSelectAction=="forEachLine"?E=w.forEachSelection(C,T.args,!0):C.multiSelectAction=="single"?(w.exitMultiSelectMode(),E=C.exec(w,T.args||{})):E=C.multiSelectAction(w,T.args||{});else{var E=C.exec(w,T.args||{});w.multiSelect.addRange(w.multiSelect.toOrientedRange()),w.multiSelect.mergeOverlappingRanges()}return E}},this.forEachSelection=function(T,C,w){if(!this.inVirtualSelectionMode){var E=w&&w.keepOrder,D=w==!0||w&&w.$byLines,I=this.session,L=this.selection,z=L.rangeList,F=(E?L:z).ranges,O;if(!F.length)return T.exec?T.exec(this,C||{}):T(this,C||{});var A=L._eventRegistry;L._eventRegistry={};var S=new x(I);this.inVirtualSelectionMode=!0;for(var N=F.length;N--;){if(D)for(;N>0&&F[N].start.row==F[N-1].end.row;)N--;S.fromOrientedRange(F[N]),S.index=N,this.selection=I.selection=S;var W=T.exec?T.exec(this,C||{}):T(this,C||{});!O&&W!==void 0&&(O=W),S.toOrientedRange(F[N])}S.detach(),this.selection=I.selection=L,this.inVirtualSelectionMode=!1,L._eventRegistry=A,L.mergeOverlappingRanges(),L.ranges[0]&&L.fromOrientedRange(L.ranges[0]);var V=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),V&&V.from==V.to&&this.renderer.animateScrolling(V.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var T="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,w=[],E=0;E<C.length;E++)w.push(this.session.getTextRange(C[E]));var D=this.session.getDocument().getNewLineCharacter();T=w.join(D),T.length==(w.length-1)*D.length&&(T="")}else this.selection.isEmpty()||(T=this.session.getTextRange(this.getSelectionRange()));return T},this.$checkMultiselectChange=function(T,C){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var w=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&C==this.multiSelect.anchor)return;var E=C==this.multiSelect.anchor?w.cursor==w.start?w.end:w.start:w.cursor;E.row!=C.row||this.session.$clipPositionToDocument(E.row,E.column).column!=C.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(T,C,w){if(C=C||{},C.needle=T||C.needle,C.needle==null){var E=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();C.needle=this.session.getTextRange(E)}this.$search.set(C);var D=this.$search.findAll(this.session);if(!D.length)return 0;var I=this.multiSelect;w||I.toSingleRange(D[0]);for(var L=D.length;L--;)I.addRange(D[L],!0);return E&&I.rangeList.rangeAtPoint(E.start)&&I.addRange(E,!0),D.length},this.selectMoreLines=function(T,C){var w=this.selection.toOrientedRange(),E=w.cursor==w.end,D=this.session.documentToScreenPosition(w.cursor);this.selection.$desiredColumn&&(D.column=this.selection.$desiredColumn);var I=this.session.screenToDocumentPosition(D.row+T,D.column);if(w.isEmpty())var z=I;else var L=this.session.documentToScreenPosition(E?w.end:w.start),z=this.session.screenToDocumentPosition(L.row+T,L.column);if(E){var F=v.fromPoints(I,z);F.cursor=F.start}else{var F=v.fromPoints(z,I);F.cursor=F.end}if(F.desiredColumn=D.column,!this.selection.inMultiSelectMode)this.selection.addRange(w);else if(C)var O=w.cursor;this.selection.addRange(F),O&&this.selection.substractPoint(O)},this.transposeSelections=function(T){for(var C=this.session,w=C.multiSelect,E=w.ranges,D=E.length;D--;){var I=E[D];if(I.isEmpty()){var L=C.getWordRange(I.start.row,I.start.column);I.start.row=L.start.row,I.start.column=L.start.column,I.end.row=L.end.row,I.end.column=L.end.column}}w.mergeOverlappingRanges();for(var z=[],D=E.length;D--;){var I=E[D];z.unshift(C.getTextRange(I))}T<0?z.unshift(z.pop()):z.push(z.shift());for(var D=E.length;D--;){var I=E[D],F=I.clone();C.replace(I,z[D]),I.start.row=F.start.row,I.start.column=F.start.column}w.fromOrientedRange(w.ranges[0])},this.selectMore=function(T,C,w){var E=this.session,D=E.multiSelect,I=D.toOrientedRange();if(!(I.isEmpty()&&(I=E.getWordRange(I.start.row,I.start.column),I.cursor=T==-1?I.start:I.end,this.multiSelect.addRange(I),w))){var L=E.getTextRange(I),z=n(E,L,T);z&&(z.cursor=T==-1?z.start:z.end,this.session.unfold(z),this.multiSelect.addRange(z),this.renderer.scrollCursorIntoView(null,.5)),C&&this.multiSelect.substractPoint(I.cursor)}},this.alignCursors=function(){var T=this.session,C=T.multiSelect,w=C.ranges,E=-1,D=w.filter(function(G){if(G.cursor.row==E)return!0;E=G.cursor.row});if(!w.length||D.length==w.length-1){var I=this.selection.getRange(),L=I.start.row,z=I.end.row,F=L==z;if(F){var O=this.session.getLength(),A;do A=this.session.getLine(z);while(/[=:]/.test(A)&&++z<O);do A=this.session.getLine(L);while(/[=:]/.test(A)&&--L>0);L<0&&(L=0),z>=O&&(z=O-1)}var S=this.session.removeFullLines(L,z);S=this.$reAlignText(S,F),this.session.insert({row:L,column:0},S.join(`
|
|
951
951
|
`)+`
|
|
952
|
-
`),F||(I.start.column=0,I.end.column=S[S.length-1].length),this.selection.setRange(I)}else{D.forEach(function(G){C.substractPoint(G.cursor)});var N=0,
|
|
952
|
+
`),F||(I.start.column=0,I.end.column=S[S.length-1].length),this.selection.setRange(I)}else{D.forEach(function(G){C.substractPoint(G.cursor)});var N=0,W=1/0,V=w.map(function(G){var Z=G.cursor,ee=T.getLine(Z.row),ce=ee.substr(Z.column).search(/\S/g);return ce==-1&&(ce=0),Z.column>N&&(N=Z.column),ce<W&&(W=ce),ce});w.forEach(function(G,Z){var ee=G.cursor,ce=N-ee.column,ne=V[Z]-W;ce>ne?T.insert(ee,o.stringRepeat(" ",ce-ne)):T.remove(new v(ee.row,ee.column,ee.row,ee.column-ce+ne)),G.start.column=G.end.column=N,G.start.row=G.end.row=ee.row,G.cursor=G.end}),C.fromOrientedRange(w[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(T,C){var w=!0,E=!0,D,I,L;return T.map(function(S){var N=S.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?D==null?(D=N[1].length,I=N[2].length,L=N[3].length,N):(D+I+L!=N[1].length+N[2].length+N[3].length&&(E=!1),D!=N[1].length&&(w=!1),D>N[1].length&&(D=N[1].length),I<N[2].length&&(I=N[2].length),L>N[3].length&&(L=N[3].length),N):[S]}).map(C?F:w?E?O:F:A);function z(S){return o.stringRepeat(" ",S)}function F(S){return S[2]?z(D)+S[2]+z(I-S[2].length+L)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function O(S){return S[2]?z(D+I-S[2].length)+S[2]+z(L)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function A(S){return S[2]?z(D)+S[2]+z(L)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}}}).call(h.prototype);function m(T,C){return T.row==C.row&&T.column==C.column}u.onSessionChange=function(T){var C=T.session;C&&!C.multiSelect&&(C.$selectionMarkers=[],C.selection.$initRangeList(),C.multiSelect=C.selection),this.multiSelect=C&&C.multiSelect;var w=T.oldSession;w&&(w.multiSelect.off("addRange",this.$onAddRange),w.multiSelect.off("removeRange",this.$onRemoveRange),w.multiSelect.off("multiSelect",this.$onMultiSelect),w.multiSelect.off("singleSelect",this.$onSingleSelect),w.multiSelect.lead.off("change",this.$checkMultiselectChange),w.multiSelect.anchor.off("change",this.$checkMultiselectChange)),C&&(C.multiSelect.on("addRange",this.$onAddRange),C.multiSelect.on("removeRange",this.$onRemoveRange),C.multiSelect.on("multiSelect",this.$onMultiSelect),C.multiSelect.on("singleSelect",this.$onSingleSelect),C.multiSelect.lead.on("change",this.$checkMultiselectChange),C.multiSelect.anchor.on("change",this.$checkMultiselectChange)),C&&this.inMultiSelectMode!=C.selection.inMultiSelectMode&&(C.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(T){T.$multiselectOnSessionChange||(T.$onAddRange=T.$onAddRange.bind(T),T.$onRemoveRange=T.$onRemoveRange.bind(T),T.$onMultiSelect=T.$onMultiSelect.bind(T),T.$onSingleSelect=T.$onSingleSelect.bind(T),T.$multiselectOnSessionChange=u.onSessionChange.bind(T),T.$checkMultiselectChange=T.$checkMultiselectChange.bind(T),T.$multiselectOnSessionChange(T),T.on("changeSession",T.$multiselectOnSessionChange),T.on("mousedown",p),T.commands.addCommands(a.defaultCommands),R(T))}function R(T){if(!T.textInput)return;var C=T.textInput.getElement(),w=!1;d.addListener(C,"keydown",function(D){var I=D.keyCode==18&&!(D.ctrlKey||D.shiftKey||D.metaKey);T.$blockSelectEnabled&&I?w||(T.renderer.setMouseCursor("crosshair"),w=!0):w&&E()},T),d.addListener(C,"keyup",E,T),d.addListener(C,"blur",E,T);function E(D){w&&(T.renderer.setMouseCursor(""),w=!1)}}u.MultiSelect=y,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(T){y(this),T?this.on("mousedown",p):this.off("mousedown",p)},value:!0},enableBlockSelect:{set:function(T){this.$blockSelectEnabled=T},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,u,$){var b=e("../../range").Range,v=u.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(x,p,d){var o=x.getLine(d);return this.foldingStartMarker.test(o)?"start":p=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(x,p,d){return null},this.indentationBlock=function(x,p,d){var o=/\S/,a=x.getLine(p),s=a.search(o);if(s!=-1){for(var r=d||a.length,n=x.getLength(),i=p,h=p;++p<n;){var m=x.getLine(p).search(o);if(m!=-1){if(m<=s){var y=x.getTokenAt(p,0);if(!y||y.type!=="string")break}h=p}}if(h>i){var R=x.getLine(h).length;return new b(i,r,h,R)}}},this.openingBracketBlock=function(x,p,d,o,a){var s={row:d,column:o+1},r=x.$findClosingBracket(p,s,a);if(r){var n=x.foldWidgets[r.row];return n==null&&(n=x.getFoldWidget(r.row)),n=="start"&&r.row>s.row&&(r.row--,r.column=x.getLine(r.row).length),b.fromPoints(s,r)}},this.closingBracketBlock=function(x,p,d,o,a){var s={row:d,column:o},r=x.$findOpeningBracket(p,s);if(r)return r.column++,s.column--,b.fromPoints(r,s)}}).call(v.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,u,$){var b=e("../lib/dom"),v=e("../range").Range,x=e("../config").nls;function p(o,a,s){for(var r=0,n=o.length-1;r<=n;){var i=r+n>>1,h=s(a,o[i]);if(h>0)r=i+1;else if(h<0)n=i-1;else return i}return-(r+1)}function d(o,a,s){var r=o.getAnnotations().sort(v.comparePoints);if(r.length){var n=p(r,{row:a,column:-1},v.comparePoints);n<0&&(n=-n-1),n>=r.length?n=s>0?0:r.length-1:n===0&&s<0&&(n=r.length-1);var i=r[n];if(!(!i||!s)){if(i.row===a){do i=r[n+=s];while(i&&i.row===a);if(!i)return r.slice()}var h=[];a=i.row;do h[s<0?"unshift":"push"](i),i=r[n+=s];while(i&&i.row==a);return h.length&&h}}}u.showErrorMarker=function(o,a){var s=o.session,r=o.getCursorPosition(),n=r.row,i=s.widgetManager.getWidgetsAtRow(n).filter(function(D){return D.type=="errorMarker"})[0];i?i.destroy():n-=a;var h=d(s,n,a),m;if(h){var y=h[0];r.column=(y.pos&&typeof y.column!="number"?y.pos.sc:y.column)||0,r.row=y.row,m=o.renderer.$gutterLayer.$annotations[r.row]}else{if(i)return;m={displayText:[x("error-marker.good-state","Looks good!")],className:"ace_ok"}}o.session.unfold(r.row),o.selection.moveToPosition(r);var R={row:r.row,fixedWidth:!0,coverGutter:!0,el:b.createElement("div"),type:"errorMarker"},T=R.el.appendChild(b.createElement("div")),C=R.el.appendChild(b.createElement("div"));C.className="error_widget_arrow "+m.className;var w=o.renderer.$cursorLayer.getPixelPosition(r).left;C.style.left=w+o.renderer.gutterWidth-5+"px",R.el.className="error_widget_wrapper",T.className="error_widget "+m.className,m.displayText.forEach(function(D,I){T.appendChild(b.createTextNode(D)),I<m.displayText.length-1&&T.appendChild(b.createElement("br"))}),T.appendChild(b.createElement("div"));var E=function(D,I,L){if(I===0&&(L==="esc"||L==="return"))return R.destroy(),{command:"null"}};R.destroy=function(){o.$mouseHandler.isMousePressed||(o.keyBinding.removeKeyboardHandler(E),s.widgetManager.removeLineWidget(R),o.off("changeSelection",R.destroy),o.off("changeSession",R.destroy),o.off("mouseup",R.destroy),o.off("change",R.destroy))},o.keyBinding.addKeyboardHandler(E),o.on("changeSelection",R.destroy),o.on("changeSession",R.destroy),o.on("mouseup",R.destroy),o.on("change",R.destroy),o.session.widgetManager.addLineWidget(R),R.el.onmousedown=o.focus.bind(o),o.renderer.scrollCursorIntoView(null,.5,{bottom:R.el.offsetHeight})},b.importCssString(`
|
|
953
953
|
.error_widget_wrapper {
|
|
954
954
|
background: inherit;
|
|
955
955
|
color: inherit;
|
|
@@ -1122,19 +1122,19 @@
|
|
|
1122
1122
|
}
|
|
1123
1123
|
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(e,u,$){u.isDark=!0,u.cssClass="ace-twilight",u.cssText=e("./twilight-css");var b=e("../lib/dom");b.importCssString(u.cssText,u.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(e){l&&(l.exports=e)})}()}(mc)),mc.exports}Tx();var vc={exports:{}},Yd;function Lx(){return Yd||(Yd=1,function(l,c){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,u,$){function b(w){var E=new Date().toLocaleString("en-us",w);return E.length==1?"0"+E:E}var v=e("./lib/dom"),x=e("./lib/oop"),p=e("./lib/event_emitter").EventEmitter,d=e("./lib/lang"),o=e("./range").Range,a=e("./range_list").RangeList,s=e("./keyboard/hash_handler").HashHandler,r=e("./tokenizer").Tokenizer,n=e("./clipboard"),i={CURRENT_WORD:function(w){return w.session.getTextRange(w.session.getWordRange())},SELECTION:function(w,E,D){var I=w.session.getTextRange();return D?I.replace(/\n\r?([ \t]*\S)/g,`
|
|
1124
1124
|
`+D+"$1"):I},CURRENT_LINE:function(w){return w.session.getLine(w.getCursorPosition().row)},PREV_LINE:function(w){return w.session.getLine(w.getCursorPosition().row-1)},LINE_INDEX:function(w){return w.getCursorPosition().row},LINE_NUMBER:function(w){return w.getCursorPosition().row+1},SOFT_TABS:function(w){return w.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(w){return w.session.getTabSize()},CLIPBOARD:function(w){return n.getText&&n.getText()},FILENAME:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0]},FILENAME_BASE:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(w){return this.FILEPATH(w).replace(/[^/\\]*$/,"")},FILEPATH:function(w){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(w){var E=w.session.$mode||{};return E.blockComment&&E.blockComment.start||""},BLOCK_COMMENT_END:function(w){var E=w.session.$mode||{};return E.blockComment&&E.blockComment.end||""},LINE_COMMENT:function(w){var E=w.session.$mode||{};return E.lineCommentStart||""},CURRENT_YEAR:b.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:b.bind(null,{year:"2-digit"}),CURRENT_MONTH:b.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:b.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:b.bind(null,{month:"short"}),CURRENT_DATE:b.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:b.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:b.bind(null,{weekday:"short"}),CURRENT_HOUR:b.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:b.bind(null,{minute:"2-digit"}),CURRENT_SECOND:b.bind(null,{second:"2-digit"})};i.SELECTED_TEXT=i.SELECTION;var h=function(){function w(){this.snippetMap={},this.snippetNameMap={},this.variables=i}return w.prototype.getTokenizer=function(){return w.$tokenizer||this.createTokenizer()},w.prototype.createTokenizer=function(){function E(L){return L=L.substr(1),/^\d+$/.test(L)?[{tabstopId:parseInt(L,10)}]:[{text:L}]}function D(L){return"(?:[^\\\\"+L+"]|\\\\.)"}var I={regex:"/("+D("/")+"+)/",onMatch:function(L,z,F){var O=F[0];return O.fmtString=!0,O.guard=L.slice(1,-1),O.flag="",""},next:"formatString"};return w.$tokenizer=new r({start:[{regex:/\\./,onMatch:function(L,z,F){var O=L[1];return(O=="}"&&F.length||"`$\\".indexOf(O)!=-1)&&(L=O),[L]}},{regex:/}/,onMatch:function(L,z,F){return[F.length?F.shift():L]}},{regex:/\$(?:\d+|\w+)/,onMatch:E},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(L,z,F){var O=E(L.substr(1));return F.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+D("\\|")+"*\\|",onMatch:function(L,z,F){var O=L.slice(1,-1).replace(/\\[,|\\]|,/g,function(A){return A.length==2?A[1]:"\0"}).split("\0").map(function(A){return{value:A}});return F[0].choices=O,[O[0]]},next:"start"},I,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(L,z,F){return F.length&&F[0].expectElse?(F[0].expectElse=!1,F[0].ifEnd={elseEnd:F[0]},[F[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(L,z,F){var O=L[1];return O=="}"&&F.length||"`$\\".indexOf(O)!=-1?L=O:O=="n"?L=`
|
|
1125
|
-
`:O=="t"?L=" ":"ulULE".indexOf(O)!=-1&&(L={changeCase:O,local:O>"a"}),[L]}},{regex:"/\\w*}",onMatch:function(L,z,F){var O=F.shift();return O&&(O.flag=L.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||L]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(L,z,F){return[{text:L.slice(1)}]}},{regex:/\${\w+/,onMatch:function(L,z,F){var O={text:L.slice(2)};return F.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(L,z,F){var O=F.shift();return this.next=O&&O.tabstopId?"start":"",[O||L]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(L,z,F){var O=F[0];return O.formatFunction=L.slice(2,-1),[F.shift()]},next:"formatString"},I,{regex:/:[\?\-+]?/,onMatch:function(L,z,F){L[1]=="+"&&(F[0].ifEnd=F[0]),L[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),w.$tokenizer},w.prototype.tokenizeTmSnippet=function(E,D){return this.getTokenizer().getLineTokens(E,D).tokens.map(function(I){return I.value||I})},w.prototype.getVariableValue=function(E,D,I){if(/^\d+$/.test(D))return(this.variables.__||{})[D]||"";if(/^[A-Z]\d+$/.test(D))return(this.variables[D[0]+"__"]||{})[D.substr(1)]||"";if(D=D.replace(/^TM_/,""),!this.variables.hasOwnProperty(D))return"";var L=this.variables[D];return typeof L=="function"&&(L=this.variables[D](E,D,I)),L??""},w.prototype.tmStrFormat=function(E,D,I){if(!D.fmt)return E;var L=D.flag||"",z=D.guard;z=new RegExp(z,L.replace(/[^gim]/g,""));var F=typeof D.fmt=="string"?this.tokenizeTmSnippet(D.fmt,"formatString"):D.fmt,O=this,A=E.replace(z,function(){var S=O.variables.__;O.variables.__=[].slice.call(arguments);for(var N=O.resolveVariables(F,I),
|
|
1126
|
-
`?(F=!0,z=""):F&&(z=/^\t*/.exec(A)[0],F=/\S/.test(A));continue}if(A){if(F=!1,A.fmtString){var S=E.indexOf(A,O+1);S==-1&&(S=E.length),A.fmt=E.slice(O+1,S),O=S}if(A.text){var N=this.getVariableValue(D,A.text,z)+"";A.fmtString&&(N=this.tmStrFormat(N,A,D)),A.formatFunction&&(N=this.tmFormatFunction(N,A,D)),N&&!A.ifEnd?(L.push(N),I(A)):!N&&A.ifEnd&&I(A.ifEnd)}else A.elseEnd?I(A.elseEnd):(A.tabstopId!=null||A.changeCase!=null)&&L.push(A)}}return L},w.prototype.getDisplayTextForSnippet=function(E,D){var I=m.call(this,E,D);return I.text},w.prototype.insertSnippetForSelection=function(E,D,I){I===void 0&&(I={});var L=m.call(this,E,D,I),z=E.getSelectionRange(),F=E.session.replace(z,L.text),O=new y(E),A=E.inVirtualSelectionMode&&E.selection.index;O.addTabstops(L.tabstops,z.start,F,A)},w.prototype.insertSnippet=function(E,D,I){I===void 0&&(I={});var L=this;if(E.inVirtualSelectionMode)return L.insertSnippetForSelection(E,D,I);E.forEachSelection(function(){L.insertSnippetForSelection(E,D,I)},null,{keepOrder:!0}),E.tabstopManager&&E.tabstopManager.tabNext()},w.prototype.$getScope=function(E){var D=E.session.$mode.$id||"";if(D=D.split("/").pop(),D==="html"||D==="php"){D==="php"&&!E.session.$mode.inlinePhp&&(D="html");var I=E.getCursorPosition(),L=E.session.getState(I.row);typeof L=="object"&&(L=L[0]),L.substring&&(L.substring(0,3)=="js-"?D="javascript":L.substring(0,4)=="css-"?D="css":L.substring(0,4)=="php-"&&(D="php"))}return D},w.prototype.getActiveScopes=function(E){var D=this.$getScope(E),I=[D],L=this.snippetMap;return L[D]&&L[D].includeScopes&&I.push.apply(I,L[D].includeScopes),I.push("_"),I},w.prototype.expandWithTab=function(E,D){var I=this,L=E.forEachSelection(function(){return I.expandSnippetForSelection(E,D)},null,{keepOrder:!0});return L&&E.tabstopManager&&E.tabstopManager.tabNext(),L},w.prototype.expandSnippetForSelection=function(E,D){var I=E.getCursorPosition(),L=E.session.getLine(I.row),z=L.substring(0,I.column),F=L.substr(I.column),O=this.snippetMap,A;return this.getActiveScopes(E).some(function(S){var N=O[S];return N&&(A=this.findMatchingSnippet(N,z,F)),!!A},this),A?(D&&D.dryRun||(E.session.doc.removeInLine(I.row,I.column-A.replaceBefore.length,I.column+A.replaceAfter.length),this.variables.M__=A.matchBefore,this.variables.T__=A.matchAfter,this.insertSnippetForSelection(E,A.content),this.variables.M__=this.variables.T__=null),!0):!1},w.prototype.findMatchingSnippet=function(E,D,I){for(var L=E.length;L--;){var z=E[L];if(!(z.startRe&&!z.startRe.test(D))&&!(z.endRe&&!z.endRe.test(I))&&!(!z.startRe&&!z.endRe))return z.matchBefore=z.startRe?z.startRe.exec(D):[""],z.matchAfter=z.endRe?z.endRe.exec(I):[""],z.replaceBefore=z.triggerRe?z.triggerRe.exec(D)[0]:"",z.replaceAfter=z.endTriggerRe?z.endTriggerRe.exec(I)[0]:"",z}},w.prototype.register=function(E,D){function I(S){return S&&!/^\^?\(.*\)\$?$|^\\b$/.test(S)&&(S="(?:"+S+")"),S||""}function L(S,N,
|
|
1125
|
+
`:O=="t"?L=" ":"ulULE".indexOf(O)!=-1&&(L={changeCase:O,local:O>"a"}),[L]}},{regex:"/\\w*}",onMatch:function(L,z,F){var O=F.shift();return O&&(O.flag=L.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||L]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(L,z,F){return[{text:L.slice(1)}]}},{regex:/\${\w+/,onMatch:function(L,z,F){var O={text:L.slice(2)};return F.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(L,z,F){var O=F.shift();return this.next=O&&O.tabstopId?"start":"",[O||L]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(L,z,F){var O=F[0];return O.formatFunction=L.slice(2,-1),[F.shift()]},next:"formatString"},I,{regex:/:[\?\-+]?/,onMatch:function(L,z,F){L[1]=="+"&&(F[0].ifEnd=F[0]),L[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),w.$tokenizer},w.prototype.tokenizeTmSnippet=function(E,D){return this.getTokenizer().getLineTokens(E,D).tokens.map(function(I){return I.value||I})},w.prototype.getVariableValue=function(E,D,I){if(/^\d+$/.test(D))return(this.variables.__||{})[D]||"";if(/^[A-Z]\d+$/.test(D))return(this.variables[D[0]+"__"]||{})[D.substr(1)]||"";if(D=D.replace(/^TM_/,""),!this.variables.hasOwnProperty(D))return"";var L=this.variables[D];return typeof L=="function"&&(L=this.variables[D](E,D,I)),L??""},w.prototype.tmStrFormat=function(E,D,I){if(!D.fmt)return E;var L=D.flag||"",z=D.guard;z=new RegExp(z,L.replace(/[^gim]/g,""));var F=typeof D.fmt=="string"?this.tokenizeTmSnippet(D.fmt,"formatString"):D.fmt,O=this,A=E.replace(z,function(){var S=O.variables.__;O.variables.__=[].slice.call(arguments);for(var N=O.resolveVariables(F,I),W="E",V=0;V<N.length;V++){var G=N[V];if(typeof G=="object")if(N[V]="",G.changeCase&&G.local){var Z=N[V+1];Z&&typeof Z=="string"&&(G.changeCase=="u"?N[V]=Z[0].toUpperCase():N[V]=Z[0].toLowerCase(),N[V+1]=Z.substr(1))}else G.changeCase&&(W=G.changeCase);else W=="U"?N[V]=G.toUpperCase():W=="L"&&(N[V]=G.toLowerCase())}return O.variables.__=S,N.join("")});return A},w.prototype.tmFormatFunction=function(E,D,I){return D.formatFunction=="upcase"?E.toUpperCase():D.formatFunction=="downcase"?E.toLowerCase():E},w.prototype.resolveVariables=function(E,D){function I(W){var V=E.indexOf(W,O+1);V!=-1&&(O=V)}for(var L=[],z="",F=!0,O=0;O<E.length;O++){var A=E[O];if(typeof A=="string"){L.push(A),A==`
|
|
1126
|
+
`?(F=!0,z=""):F&&(z=/^\t*/.exec(A)[0],F=/\S/.test(A));continue}if(A){if(F=!1,A.fmtString){var S=E.indexOf(A,O+1);S==-1&&(S=E.length),A.fmt=E.slice(O+1,S),O=S}if(A.text){var N=this.getVariableValue(D,A.text,z)+"";A.fmtString&&(N=this.tmStrFormat(N,A,D)),A.formatFunction&&(N=this.tmFormatFunction(N,A,D)),N&&!A.ifEnd?(L.push(N),I(A)):!N&&A.ifEnd&&I(A.ifEnd)}else A.elseEnd?I(A.elseEnd):(A.tabstopId!=null||A.changeCase!=null)&&L.push(A)}}return L},w.prototype.getDisplayTextForSnippet=function(E,D){var I=m.call(this,E,D);return I.text},w.prototype.insertSnippetForSelection=function(E,D,I){I===void 0&&(I={});var L=m.call(this,E,D,I),z=E.getSelectionRange(),F=E.session.replace(z,L.text),O=new y(E),A=E.inVirtualSelectionMode&&E.selection.index;O.addTabstops(L.tabstops,z.start,F,A)},w.prototype.insertSnippet=function(E,D,I){I===void 0&&(I={});var L=this;if(E.inVirtualSelectionMode)return L.insertSnippetForSelection(E,D,I);E.forEachSelection(function(){L.insertSnippetForSelection(E,D,I)},null,{keepOrder:!0}),E.tabstopManager&&E.tabstopManager.tabNext()},w.prototype.$getScope=function(E){var D=E.session.$mode.$id||"";if(D=D.split("/").pop(),D==="html"||D==="php"){D==="php"&&!E.session.$mode.inlinePhp&&(D="html");var I=E.getCursorPosition(),L=E.session.getState(I.row);typeof L=="object"&&(L=L[0]),L.substring&&(L.substring(0,3)=="js-"?D="javascript":L.substring(0,4)=="css-"?D="css":L.substring(0,4)=="php-"&&(D="php"))}return D},w.prototype.getActiveScopes=function(E){var D=this.$getScope(E),I=[D],L=this.snippetMap;return L[D]&&L[D].includeScopes&&I.push.apply(I,L[D].includeScopes),I.push("_"),I},w.prototype.expandWithTab=function(E,D){var I=this,L=E.forEachSelection(function(){return I.expandSnippetForSelection(E,D)},null,{keepOrder:!0});return L&&E.tabstopManager&&E.tabstopManager.tabNext(),L},w.prototype.expandSnippetForSelection=function(E,D){var I=E.getCursorPosition(),L=E.session.getLine(I.row),z=L.substring(0,I.column),F=L.substr(I.column),O=this.snippetMap,A;return this.getActiveScopes(E).some(function(S){var N=O[S];return N&&(A=this.findMatchingSnippet(N,z,F)),!!A},this),A?(D&&D.dryRun||(E.session.doc.removeInLine(I.row,I.column-A.replaceBefore.length,I.column+A.replaceAfter.length),this.variables.M__=A.matchBefore,this.variables.T__=A.matchAfter,this.insertSnippetForSelection(E,A.content),this.variables.M__=this.variables.T__=null),!0):!1},w.prototype.findMatchingSnippet=function(E,D,I){for(var L=E.length;L--;){var z=E[L];if(!(z.startRe&&!z.startRe.test(D))&&!(z.endRe&&!z.endRe.test(I))&&!(!z.startRe&&!z.endRe))return z.matchBefore=z.startRe?z.startRe.exec(D):[""],z.matchAfter=z.endRe?z.endRe.exec(I):[""],z.replaceBefore=z.triggerRe?z.triggerRe.exec(D)[0]:"",z.replaceAfter=z.endTriggerRe?z.endTriggerRe.exec(I)[0]:"",z}},w.prototype.register=function(E,D){function I(S){return S&&!/^\^?\(.*\)\$?$|^\\b$/.test(S)&&(S="(?:"+S+")"),S||""}function L(S,N,W){return S=I(S),N=I(N),S=N+S,S&&S[S.length-1]!="$"&&(S+="$"),new RegExp(S)}function z(S){S.scope||(S.scope=D||"_"),D=S.scope,F[D]||(F[D]=[],O[D]={});var N=O[D];if(S.name){var W=N[S.name];W&&A.unregister(W),N[S.name]=S}F[D].push(S),S.prefix&&(S.tabTrigger=S.prefix),!S.content&&S.body&&(S.content=Array.isArray(S.body)?S.body.join(`
|
|
1127
1127
|
`):S.body),S.tabTrigger&&!S.trigger&&(!S.guard&&/^\w/.test(S.tabTrigger)&&(S.guard="\\b"),S.trigger=d.escapeRegExp(S.tabTrigger)),!(!S.trigger&&!S.guard&&!S.endTrigger&&!S.endGuard)&&(S.startRe=L(S.trigger,S.guard),S.triggerRe=new RegExp(S.trigger),S.endRe=L(S.endTrigger,S.endGuard),S.endTriggerRe=new RegExp(S.endTrigger))}var F=this.snippetMap,O=this.snippetNameMap,A=this;E||(E=[]),Array.isArray(E)?E.forEach(z):Object.keys(E).forEach(function(S){z(E[S])}),this._signal("registerSnippets",{scope:D})},w.prototype.unregister=function(E,D){function I(F){var O=z[F.scope||D];if(O&&O[F.name]){delete O[F.name];var A=L[F.scope||D],S=A&&A.indexOf(F);S>=0&&A.splice(S,1)}}var L=this.snippetMap,z=this.snippetNameMap;E.content?I(E):Array.isArray(E)&&E.forEach(I)},w.prototype.parseSnippetFile=function(E){E=E.replace(/\r/g,"");for(var D=[],I={},L=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,z;z=L.exec(E);){if(z[1])try{I=JSON.parse(z[1]),D.push(I)}catch{}if(z[4])I.content=z[4].replace(/^\t/gm,""),D.push(I),I={};else{var F=z[2],O=z[3];if(F=="regex"){var A=/\/((?:[^\/\\]|\\.)*)|$/g;I.guard=A.exec(O)[1],I.trigger=A.exec(O)[1],I.endTrigger=A.exec(O)[1],I.endGuard=A.exec(O)[1]}else F=="snippet"?(I.tabTrigger=O.match(/^\S*/)[0],I.name||(I.name=O)):F&&(I[F]=O)}}return D},w.prototype.getSnippetByName=function(E,D){var I=this.snippetNameMap,L;return this.getActiveScopes(D).some(function(z){var F=I[z];return F&&(L=F[E]),!!L},this),L},w}();x.implement(h.prototype,p);var m=function(w,E,D){function I(le){for(var me=[],_e=0;_e<le.length;_e++){var Ae=le[_e];if(typeof Ae=="object"){if(N[Ae.tabstopId])continue;var Me=le.lastIndexOf(Ae,_e-1);Ae=me[Me]||{tabstopId:Ae.tabstopId}}me[_e]=Ae}return me}D===void 0&&(D={});var L=w.getCursorPosition(),z=w.session.getLine(L.row),F=w.session.getTabString(),O=z.match(/^\s*/)[0];L.column<O.length&&(O=O.slice(0,L.column)),E=E.replace(/\r/g,"");var A=this.tokenizeTmSnippet(E);A=this.resolveVariables(A,w),A=A.map(function(le){return le==`
|
|
1128
|
-
`&&!D.excludeExtraIndent?le+O:typeof le=="string"?le.replace(/\t/g,F):le});var S=[];A.forEach(function(le,me){if(typeof le=="object"){var _e=le.tabstopId,Ae=S[_e];if(Ae||(Ae=S[_e]=[],Ae.index=_e,Ae.value="",Ae.parents={}),Ae.indexOf(le)===-1){le.choices&&!Ae.choices&&(Ae.choices=le.choices),Ae.push(le);var Me=A.indexOf(le,me+1);if(Me!==-1){var qe=A.slice(me+1,Me),Ve=qe.some(function(ot){return typeof ot=="object"});Ve&&!Ae.value?Ae.value=qe:qe.length&&(!Ae.value||typeof Ae.value!="string")&&(Ae.value=qe.join(""))}}}}),S.forEach(function(le){le.length=0});for(var N={},
|
|
1129
|
-
`);me.length>1?(he=me[me.length-1].length,ne+=me.length-1):he+=le.length,ue+=le}else le&&(le.start?le.end={row:ne,column:he}:le.start={row:ne,column:he})}),{text:ue,tabstops:S,tokens:A}},y=function(){function w(E){if(this.index=0,this.ranges=[],this.tabstops=[],E.tabstopManager)return E.tabstopManager;E.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=d.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(E)}return w.prototype.attach=function(E){this.$openTabstops=null,this.selectedTabstop=null,this.editor=E,this.session=E.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},w.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},w.prototype.onChange=function(E){for(var D=E.action[0]=="r",I=this.selectedTabstop||{},L=I.parents||{},z=this.tabstops.slice(),F=0;F<z.length;F++){var O=z[F],A=O==I||L[O.index];if(O.rangeList.$bias=A?0:1,E.action=="remove"&&O!==I){var S=O.parents&&O.parents[I.index],N=O.rangeList.pointIndex(E.start,S);N=N<0?-N-1:N+1;var
|
|
1128
|
+
`&&!D.excludeExtraIndent?le+O:typeof le=="string"?le.replace(/\t/g,F):le});var S=[];A.forEach(function(le,me){if(typeof le=="object"){var _e=le.tabstopId,Ae=S[_e];if(Ae||(Ae=S[_e]=[],Ae.index=_e,Ae.value="",Ae.parents={}),Ae.indexOf(le)===-1){le.choices&&!Ae.choices&&(Ae.choices=le.choices),Ae.push(le);var Me=A.indexOf(le,me+1);if(Me!==-1){var qe=A.slice(me+1,Me),Ve=qe.some(function(ot){return typeof ot=="object"});Ve&&!Ae.value?Ae.value=qe:qe.length&&(!Ae.value||typeof Ae.value!="string")&&(Ae.value=qe.join(""))}}}}),S.forEach(function(le){le.length=0});for(var N={},W=0;W<A.length;W++){var V=A[W];if(typeof V=="object"){var G=V.tabstopId,Z=S[G],ee=A.indexOf(V,W+1);if(N[G]){N[G]===V&&(delete N[G],Object.keys(N).forEach(function(le){Z.parents[le]=!0}));continue}N[G]=V;var ce=Z.value;typeof ce!="string"?ce=I(ce):V.fmt&&(ce=this.tmStrFormat(ce,V,w)),A.splice.apply(A,[W+1,Math.max(0,ee-W)].concat(ce,V)),Z.indexOf(V)===-1&&Z.push(V)}}var ne=0,he=0,ue="";return A.forEach(function(le){if(typeof le=="string"){var me=le.split(`
|
|
1129
|
+
`);me.length>1?(he=me[me.length-1].length,ne+=me.length-1):he+=le.length,ue+=le}else le&&(le.start?le.end={row:ne,column:he}:le.start={row:ne,column:he})}),{text:ue,tabstops:S,tokens:A}},y=function(){function w(E){if(this.index=0,this.ranges=[],this.tabstops=[],E.tabstopManager)return E.tabstopManager;E.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=d.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(E)}return w.prototype.attach=function(E){this.$openTabstops=null,this.selectedTabstop=null,this.editor=E,this.session=E.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},w.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},w.prototype.onChange=function(E){for(var D=E.action[0]=="r",I=this.selectedTabstop||{},L=I.parents||{},z=this.tabstops.slice(),F=0;F<z.length;F++){var O=z[F],A=O==I||L[O.index];if(O.rangeList.$bias=A?0:1,E.action=="remove"&&O!==I){var S=O.parents&&O.parents[I.index],N=O.rangeList.pointIndex(E.start,S);N=N<0?-N-1:N+1;var W=O.rangeList.pointIndex(E.end,S);W=W<0?-W-1:W-1;for(var V=O.rangeList.ranges.slice(N,W),G=0;G<V.length;G++)this.removeRange(V[G])}O.rangeList.$onChange(E)}var Z=this.session;!this.$inChange&&D&&Z.getLength()==1&&!Z.getValue()&&this.detach()},w.prototype.updateLinkedFields=function(){var E=this.selectedTabstop;if(!(!E||!E.hasLinkedRanges||!E.firstNonLinked)){this.$inChange=!0;for(var D=this.session,I=D.getTextRange(E.firstNonLinked),L=0;L<E.length;L++){var z=E[L];if(z.linked){var F=z.original,O=u.snippetManager.tmStrFormat(I,F,this.editor);D.replace(z,O)}}this.$inChange=!1}},w.prototype.onAfterExec=function(E){E.command&&!E.command.readOnly&&this.updateLinkedFields()},w.prototype.onChangeSelection=function(){if(this.editor){for(var E=this.editor.selection.lead,D=this.editor.selection.anchor,I=this.editor.selection.isEmpty(),L=0;L<this.ranges.length;L++)if(!this.ranges[L].linked){var z=this.ranges[L].contains(E.row,E.column),F=I||this.ranges[L].contains(D.row,D.column);if(z&&F)return}this.detach()}},w.prototype.onChangeSession=function(){this.detach()},w.prototype.tabNext=function(E){var D=this.tabstops.length,I=this.index+(E||1);I=Math.min(Math.max(I,1),D),I==D&&(I=0),this.selectTabstop(I),this.updateTabstopMarkers(),I===0&&this.detach()},w.prototype.selectTabstop=function(E){this.$openTabstops=null;var D=this.tabstops[this.index];if(D&&this.addTabstopMarkers(D),this.index=E,D=this.tabstops[this.index],!(!D||!D.length)){this.selectedTabstop=D;var I=D.firstNonLinked||D;if(D.choices&&(I.cursor=I.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(I);else{var L=this.editor.multiSelect;L.toSingleRange(I);for(var z=0;z<D.length;z++)D.hasLinkedRanges&&D[z].linked||L.addRange(D[z].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},w.prototype.addTabstops=function(E,D,I){var L=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!E[0]){var z=o.fromPoints(I,I);T(z.start,D),T(z.end,D),E[0]=[z],E[0].index=0}var F=this.index,O=[F+1,0],A=this.ranges,S=this.snippetId=(this.snippetId||0)+1;E.forEach(function(N,W){var V=this.$openTabstops[W]||N;V.snippetId=S;for(var G=0;G<N.length;G++){var Z=N[G],ee=o.fromPoints(Z.start,Z.end||Z.start);R(ee.start,D),R(ee.end,D),ee.original=Z,ee.tabstop=V,A.push(ee),V!=N?V.unshift(ee):V[G]=ee,Z.fmtString||V.firstNonLinked&&L?(ee.linked=!0,V.hasLinkedRanges=!0):V.firstNonLinked||(V.firstNonLinked=ee)}V.firstNonLinked||(V.hasLinkedRanges=!1),V===N&&(O.push(V),this.$openTabstops[W]=V),this.addTabstopMarkers(V),V.rangeList=V.rangeList||new a,V.rangeList.$bias=0,V.rangeList.addList(V)},this),O.length>2&&(this.tabstops.length&&O.push(O.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,O))},w.prototype.addTabstopMarkers=function(E){var D=this.session;E.forEach(function(I){I.markerId||(I.markerId=D.addMarker(I,"ace_snippet-marker","text"))})},w.prototype.removeTabstopMarkers=function(E){var D=this.session;E.forEach(function(I){D.removeMarker(I.markerId),I.markerId=null})},w.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var E=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&E--,this.tabstops.forEach(function(D){D.snippetId===E?this.addTabstopMarkers(D):this.removeTabstopMarkers(D)},this)}},w.prototype.removeRange=function(E){var D=E.tabstop.indexOf(E);D!=-1&&E.tabstop.splice(D,1),D=this.ranges.indexOf(E),D!=-1&&this.ranges.splice(D,1),D=E.tabstop.rangeList.ranges.indexOf(E),D!=-1&&E.tabstop.splice(D,1),this.session.removeMarker(E.markerId),E.tabstop.length||(D=this.tabstops.indexOf(E.tabstop),D!=-1&&this.tabstops.splice(D,1),this.tabstops.length||this.detach())},w}();y.prototype.keyboardHandler=new s,y.prototype.keyboardHandler.bindKeys({Tab:function(w){u.snippetManager&&u.snippetManager.expandWithTab(w)||(w.tabstopManager.tabNext(1),w.renderer.scrollCursorIntoView())},"Shift-Tab":function(w){w.tabstopManager.tabNext(-1),w.renderer.scrollCursorIntoView()},Esc:function(w){w.tabstopManager.detach()}});var R=function(w,E){w.row==0&&(w.column+=E.column),w.row+=E.row},T=function(w,E){w.row==E.row&&(w.column-=E.column),w.row-=E.row};v.importCssString(`
|
|
1130
1130
|
.ace_snippet-marker {
|
|
1131
1131
|
-moz-box-sizing: border-box;
|
|
1132
1132
|
box-sizing: border-box;
|
|
1133
1133
|
background: rgba(194, 193, 208, 0.09);
|
|
1134
1134
|
border: 1px dotted rgba(211, 208, 235, 0.62);
|
|
1135
1135
|
position: absolute;
|
|
1136
|
-
}`,"snippets.css",!1),u.snippetManager=new h;var C=e("./editor").Editor;(function(){this.insertSnippet=function(w,E){return u.snippetManager.insertSnippet(this,w,E)},this.expandSnippet=function(w){return u.snippetManager.expandWithTab(this,w)}}).call(C.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,u,$){var b=e("../virtual_renderer").VirtualRenderer,v=e("../editor").Editor,x=e("../range").Range,p=e("../lib/event"),d=e("../lib/lang"),o=e("../lib/dom"),a=e("../config").nls,s=e("./../lib/useragent"),r=function(R){return"suggest-aria-id:".concat(R)},n=s.isSafari?"menu":"listbox",i=s.isSafari?"menuitem":"option",h=s.isSafari?"aria-current":"aria-selected",m=function(R){var T=new b(R);T.$maxLines=4;var C=new v(T);return C.setHighlightActiveLine(!1),C.setShowPrintMargin(!1),C.renderer.setShowGutter(!1),C.renderer.setHighlightGutterLine(!1),C.$mouseHandler.$focusTimeout=0,C.$highlightTagPending=!0,C},y=function(){function R(T){var C=o.createElement("div"),w=m(C);T&&T.appendChild(C),C.style.display="none",w.renderer.content.style.cursor="default",w.renderer.setStyle("ace_autocomplete"),w.renderer.$textLayer.element.setAttribute("role",n),w.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),w.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),w.renderer.textarea.setAttribute("aria-hidden","true"),w.setOption("displayIndentGuides",!1),w.setOption("dragDelay",150);var E=function(){};w.focus=E,w.$isFocused=!0,w.renderer.$cursorLayer.restartTimer=E,w.renderer.$cursorLayer.element.style.opacity="0",w.renderer.$maxLines=8,w.renderer.$keepTextAreaAtCursor=!1,w.setHighlightActiveLine(!1),w.session.highlight(""),w.session.$searchHighlight.clazz="ace_highlight-marker",w.on("mousedown",function(A){var S=A.getDocumentPosition();w.selection.moveToPosition(S),L.start.row=L.end.row=S.row,A.stop()});var D,I=new x(-1,0,-1,1/0),L=new x(-1,0,-1,1/0);L.id=w.session.addMarker(L,"ace_active-line","fullLine"),w.setSelectOnHover=function(A){A?I.id&&(w.session.removeMarker(I.id),I.id=null):I.id=w.session.addMarker(I,"ace_line-hover","fullLine")},w.setSelectOnHover(!1),w.on("mousemove",function(A){if(!D){D=A;return}if(!(D.x==A.x&&D.y==A.y)){D=A,D.scrollTop=w.renderer.scrollTop,w.isMouseOver=!0;var S=D.getDocumentPosition().row;I.start.row!=S&&(I.id||w.setRow(S),F(S))}}),w.renderer.on("beforeRender",function(){if(D&&I.start.row!=-1){D.$pos=null;var A=D.getDocumentPosition().row;I.id||w.setRow(A),F(A,!0)}}),w.renderer.on("afterRender",function(){for(var A=w.renderer.$textLayer,S=A.config.firstRow,N=A.config.lastRow;S<=N;S++){var
|
|
1137
|
-
`,A.length),-1),w.data=A||[],w.setRow(0)},w.getData=function(A){return w.data[A]},w.getRow=function(){return L.start.row},w.setRow=function(A){A=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,A)),L.start.row!=A&&(w.selection.clearSelection(),L.start.row=L.end.row=A||0,w.session._emit("changeBackMarker"),w.moveCursorTo(A||0,0),w.isOpen&&w._signal("select"))},w.on("changeSelection",function(){w.isOpen&&w.setRow(w.selection.lead.row),w.renderer.scrollCursorIntoView()}),w.hide=function(){this.container.style.display="none",w.anchorPos=null,w.anchor=null,w.isOpen&&(w.isOpen=!1,this._signal("hide"))},w.tryShow=function(A,S,N,
|
|
1136
|
+
}`,"snippets.css",!1),u.snippetManager=new h;var C=e("./editor").Editor;(function(){this.insertSnippet=function(w,E){return u.snippetManager.insertSnippet(this,w,E)},this.expandSnippet=function(w){return u.snippetManager.expandWithTab(this,w)}}).call(C.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,u,$){var b=e("../virtual_renderer").VirtualRenderer,v=e("../editor").Editor,x=e("../range").Range,p=e("../lib/event"),d=e("../lib/lang"),o=e("../lib/dom"),a=e("../config").nls,s=e("./../lib/useragent"),r=function(R){return"suggest-aria-id:".concat(R)},n=s.isSafari?"menu":"listbox",i=s.isSafari?"menuitem":"option",h=s.isSafari?"aria-current":"aria-selected",m=function(R){var T=new b(R);T.$maxLines=4;var C=new v(T);return C.setHighlightActiveLine(!1),C.setShowPrintMargin(!1),C.renderer.setShowGutter(!1),C.renderer.setHighlightGutterLine(!1),C.$mouseHandler.$focusTimeout=0,C.$highlightTagPending=!0,C},y=function(){function R(T){var C=o.createElement("div"),w=m(C);T&&T.appendChild(C),C.style.display="none",w.renderer.content.style.cursor="default",w.renderer.setStyle("ace_autocomplete"),w.renderer.$textLayer.element.setAttribute("role",n),w.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),w.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),w.renderer.textarea.setAttribute("aria-hidden","true"),w.setOption("displayIndentGuides",!1),w.setOption("dragDelay",150);var E=function(){};w.focus=E,w.$isFocused=!0,w.renderer.$cursorLayer.restartTimer=E,w.renderer.$cursorLayer.element.style.opacity="0",w.renderer.$maxLines=8,w.renderer.$keepTextAreaAtCursor=!1,w.setHighlightActiveLine(!1),w.session.highlight(""),w.session.$searchHighlight.clazz="ace_highlight-marker",w.on("mousedown",function(A){var S=A.getDocumentPosition();w.selection.moveToPosition(S),L.start.row=L.end.row=S.row,A.stop()});var D,I=new x(-1,0,-1,1/0),L=new x(-1,0,-1,1/0);L.id=w.session.addMarker(L,"ace_active-line","fullLine"),w.setSelectOnHover=function(A){A?I.id&&(w.session.removeMarker(I.id),I.id=null):I.id=w.session.addMarker(I,"ace_line-hover","fullLine")},w.setSelectOnHover(!1),w.on("mousemove",function(A){if(!D){D=A;return}if(!(D.x==A.x&&D.y==A.y)){D=A,D.scrollTop=w.renderer.scrollTop,w.isMouseOver=!0;var S=D.getDocumentPosition().row;I.start.row!=S&&(I.id||w.setRow(S),F(S))}}),w.renderer.on("beforeRender",function(){if(D&&I.start.row!=-1){D.$pos=null;var A=D.getDocumentPosition().row;I.id||w.setRow(A),F(A,!0)}}),w.renderer.on("afterRender",function(){for(var A=w.renderer.$textLayer,S=A.config.firstRow,N=A.config.lastRow;S<=N;S++){var W=A.element.childNodes[S-A.config.firstRow];W.setAttribute("role",i),W.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),W.setAttribute("aria-setsize",w.data.length),W.setAttribute("aria-describedby","doc-tooltip"),W.setAttribute("aria-posinset",S+1);var V=w.getData(S);if(V){var G="".concat(V.caption||V.value).concat(V.meta?", ".concat(V.meta):"");W.setAttribute("aria-label",G)}var Z=W.querySelectorAll(".ace_completion-highlight");Z.forEach(function(ee){ee.setAttribute("role","mark")})}}),w.renderer.on("afterRender",function(){var A=w.getRow(),S=w.renderer.$textLayer,N=S.element.childNodes[A-S.config.firstRow],W=document.activeElement;if(N!==w.selectedNode&&w.selectedNode&&(o.removeCssClass(w.selectedNode,"ace_selected"),w.selectedNode.removeAttribute(h),w.selectedNode.removeAttribute("id")),W.removeAttribute("aria-activedescendant"),w.selectedNode=N,N){var V=r(A);o.addCssClass(N,"ace_selected"),N.id=V,S.element.setAttribute("aria-activedescendant",V),W.setAttribute("aria-activedescendant",V),N.setAttribute(h,"true")}});var z=function(){F(-1)},F=function(A,S){A!==I.start.row&&(I.start.row=I.end.row=A,S||w.session._emit("changeBackMarker"),w._emit("changeHoverMarker"))};w.getHoveredRow=function(){return I.start.row},p.addListener(w.container,"mouseout",function(){w.isMouseOver=!1,z()}),w.on("hide",z),w.on("changeSelection",z),w.session.doc.getLength=function(){return w.data.length},w.session.doc.getLine=function(A){var S=w.data[A];return typeof S=="string"?S:S&&S.value||""};var O=w.session.bgTokenizer;return O.$tokenizeRow=function(A){function S(le,me){le&&W.push({type:(N.className||"")+(me||""),value:le})}var N=w.data[A],W=[];if(!N)return W;typeof N=="string"&&(N={value:N});for(var V=N.caption||N.value||N.name,G=V.toLowerCase(),Z=(w.filterText||"").toLowerCase(),ee=0,ce=0,ne=0;ne<=Z.length;ne++)if(ne!=ce&&(N.matchMask&1<<ne||ne==Z.length)){var he=Z.slice(ce,ne);ce=ne;var ue=G.indexOf(he,ee);if(ue==-1)continue;S(V.slice(ee,ue),""),ee=ue+he.length,S(V.slice(ue,ee),"completion-highlight")}return S(V.slice(ee,V.length),""),W.push({type:"completion-spacer",value:" "}),N.meta&&W.push({type:"completion-meta",value:N.meta}),N.message&&W.push({type:"completion-message",value:N.message}),W},O.$updateOnChange=E,O.start=E,w.session.$computeWidth=function(){return this.screenWidth=0},w.isOpen=!1,w.isTopdown=!1,w.autoSelect=!0,w.filterText="",w.isMouseOver=!1,w.data=[],w.setData=function(A,S){w.filterText=S||"",w.setValue(d.stringRepeat(`
|
|
1137
|
+
`,A.length),-1),w.data=A||[],w.setRow(0)},w.getData=function(A){return w.data[A]},w.getRow=function(){return L.start.row},w.setRow=function(A){A=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,A)),L.start.row!=A&&(w.selection.clearSelection(),L.start.row=L.end.row=A||0,w.session._emit("changeBackMarker"),w.moveCursorTo(A||0,0),w.isOpen&&w._signal("select"))},w.on("changeSelection",function(){w.isOpen&&w.setRow(w.selection.lead.row),w.renderer.scrollCursorIntoView()}),w.hide=function(){this.container.style.display="none",w.anchorPos=null,w.anchor=null,w.isOpen&&(w.isOpen=!1,this._signal("hide"))},w.tryShow=function(A,S,N,W){if(!W&&w.isOpen&&w.anchorPos&&w.anchor&&w.anchorPos.top===A.top&&w.anchorPos.left===A.left&&w.anchor===N)return!0;var V=this.container,G=this.renderer.scrollBar.width||10,Z=window.innerHeight-G,ee=window.innerWidth-G,ce=this.renderer,ne=ce.$maxLines*S*1.4,he={top:0,bottom:0},ue=Z-A.top-3*this.$borderSize-S,le=A.top-3*this.$borderSize;N||(le<=ue||ue>=ne?N="bottom":N="top"),N==="top"?(he.bottom=A.top-this.$borderSize,he.top=he.bottom-ne):N==="bottom"&&(he.top=A.top+S+this.$borderSize,he.bottom=he.top+ne);var me=he.top>=0&&he.bottom<=Z;if(!W&&!me)return!1;me?ce.$maxPixelHeight=null:N==="top"?ce.$maxPixelHeight=le:ce.$maxPixelHeight=ue,N==="top"?(V.style.top="",V.style.bottom=Z+G-he.bottom+"px",w.isTopdown=!1):(V.style.top=he.top+"px",V.style.bottom="",w.isTopdown=!0),V.style.display="";var _e=A.left;return _e+V.offsetWidth>ee&&(_e=ee-V.offsetWidth),V.style.left=_e+"px",V.style.right="",o.$fixPositionBug(V),w.isOpen||(w.isOpen=!0,this._signal("show"),D=null),w.anchorPos=A,w.anchor=N,!0},w.show=function(A,S,N){this.tryShow(A,S,N?"bottom":void 0,!0)},w.goTo=function(A){var S=this.getRow(),N=this.session.getLength()-1;switch(A){case"up":S=S<=0?N:S-1;break;case"down":S=S>=N?-1:S+1;break;case"start":S=0;break;case"end":S=N}this.setRow(S)},w.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},w.$imageSize=0,w.$borderSize=1,w}return R}();o.importCssString(`
|
|
1138
1138
|
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
1139
1139
|
background-color: #CAD6FA;
|
|
1140
1140
|
z-index: 1;
|
|
@@ -1226,7 +1226,7 @@
|
|
|
1226
1226
|
animation: none;
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
|
-
`,"autocompletion.css",!1),u.AcePopup=y,u.$singleLineEditor=m,u.getAriaId=r}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,u,$){var b=function(){function v(x){this.editor=x,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return v.prototype.setScreenReaderContent=function(x){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var d=this.popup.getRow(),o=this.popup.renderer.$textLayer,a=o.element.childNodes[d-o.config.firstRow];if(a){for(var s="doc-tooltip ",r=0;r<this._lines.length;r++)s+="ace-inline-screenreader-line-".concat(r," ");a.setAttribute("aria-describedby",s)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=x.split(/\r\n|\r|\n/);var p=this.createCodeBlock();this.screenReaderDiv.appendChild(p)},v.prototype.destroy=function(){this.screenReaderDiv.remove()},v.prototype.createCodeBlock=function(){var x=document.createElement("pre");x.setAttribute("id","ace-inline-screenreader");for(var p=0;p<this._lines.length;p++){var d=document.createElement("code");d.setAttribute("id","ace-inline-screenreader-line-".concat(p));var o=document.createTextNode(this._lines[p]);d.appendChild(o),x.appendChild(d)}return x},v}();u.AceInlineScreenReader=b}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,u,$){var b=e("../snippets").snippetManager,v=e("./inline_screenreader").AceInlineScreenReader,x=function(){function p(){this.editor=null}return p.prototype.show=function(d,o,a){if(a=a||"",d&&this.editor&&this.editor!==d&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!d||!o)return!1;this.inlineScreenReader||(this.inlineScreenReader=new v(d));var s=o.snippet?b.getDisplayTextForSnippet(d,o.snippet):o.value;return o.hideInlinePreview||!s||!s.startsWith(a)?!1:(this.editor=d,this.inlineScreenReader.setScreenReaderContent(s),s=s.slice(a.length),s===""?d.removeGhostText():d.setGhostText(s),!0)},p.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},p.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},p.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},p}();u.AceInline=x}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,u,$){u.parForEach=function(v,x,p){var d=0,o=v.length;o===0&&p();for(var a=0;a<o;a++)x(v[a],function(s,r){d++,d===o&&p(s,r)})};var b=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;u.retrievePrecedingIdentifier=function(v,x,p){p=p||b;for(var d=[],o=x-1;o>=0&&p.test(v[o]);o--)d.push(v[o]);return d.reverse().join("")},u.retrieveFollowingIdentifier=function(v,x,p){p=p||b;for(var d=[],o=x;o<v.length&&p.test(v[o]);o++)d.push(v[o]);return d},u.getCompletionPrefix=function(v){var x=v.getCursorPosition(),p=v.session.getLine(x.row),d;return v.completers.forEach((function(o){o.identifierRegexps&&o.identifierRegexps.forEach((function(a){!d&&a&&(d=this.retrievePrecedingIdentifier(p,x.column,a))}).bind(this))}).bind(this)),d||this.retrievePrecedingIdentifier(p,x.column)},u.triggerAutocomplete=function(v,p){var p=p??v.session.getPrecedingCharacter();return v.completers.some(function(d){if(d.triggerCharacters&&Array.isArray(d.triggerCharacters))return d.triggerCharacters.includes(p)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(e,u,$){var b=e("./keyboard/hash_handler").HashHandler,v=e("./autocomplete/popup").AcePopup,x=e("./autocomplete/inline").AceInline,p=e("./autocomplete/popup").getAriaId,d=e("./autocomplete/util"),o=e("./lib/lang"),a=e("./lib/dom"),s=e("./snippets").snippetManager,r=e("./config"),n=e("./lib/event"),i=e("./lib/scroll").preventParentScroll,h=function(T,C){C.completer&&C.completer.destroy()},m=function(){function T(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new b,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=o.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=o.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=o.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=o.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=o.delayedCall((function(){var C=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!C||this.editor.completers.length===0||(this.completions=new R(T.completionsForLoading),this.openPopup(this.editor,C.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(T,"completionsForLoading",{get:function(){return[{caption:r.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),T.prototype.$init=function(){return this.popup=new v(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(C){this.insertMatch(),C.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),n.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},T.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new x,this.inlineRenderer},T.prototype.getPopup=function(){return this.popup||this.$init()},T.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},T.prototype.$seen=function(C){!this.hasSeen.has(C)&&C&&C.completer&&C.completer.onSeen&&typeof C.completer.onSeen=="function"&&(C.completer.onSeen(this.editor,C),this.hasSeen.add(C))},T.prototype.$onPopupChange=function(C){if(this.inlineRenderer&&this.inlineEnabled){var w=C?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(w),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},T.prototype.$updateGhostText=function(C){var w=this.base.row,E=this.base.column,D=this.editor.getCursorPosition().column,I=this.editor.session.getLine(w).slice(E,D);this.inlineRenderer.show(this.editor,C,I)?this.$seen(C):this.inlineRenderer.hide()},T.prototype.$onPopupRender=function(){var C=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var w=this.popup.getFirstVisibleRow();w<=this.popup.getLastVisibleRow();w++){var E=this.popup.getData(w);E&&(!C||E.hideInlinePreview)&&this.$seen(E)}},T.prototype.$onPopupShow=function(C){this.$onPopupChange(C),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},T.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var C=this.editor.container.parentNode,w=[];C;)w.push(C),C.addEventListener("scroll",this.onLayoutChange,{passive:!0}),C=C.parentNode;this.$elements=w}},T.prototype.unObserveLayoutChanges=function(){var C=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(w){w.removeEventListener("scroll",C.onLayoutChange,{passive:!0})}),this.$elements=null},T.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},T.prototype.$updatePopupPosition=function(){var C=this.editor,w=C.renderer,E=w.layerConfig.lineHeight,D=w.$cursorLayer.getPixelPosition(this.base,!0);D.left-=this.popup.getTextLeftOffset();var I=C.container.getBoundingClientRect();D.top+=I.top-w.layerConfig.offset,D.left+=I.left-C.renderer.scrollLeft,D.left+=w.gutterWidth;var L={top:D.top,left:D.left};w.$ghostText&&w.$ghostTextWidget&&this.base.row===w.$ghostText.position.row&&(L.top+=w.$ghostTextWidget.el.offsetHeight);var z=C.container.getBoundingClientRect().bottom-E,F=z<L.top?{top:z,left:L.left}:L;this.popup.tryShow(F,E,"bottom")||this.popup.tryShow(D,E,"top")||this.popup.show(D,E)},T.prototype.openPopup=function(C,w,E){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var D=this.popup.getRow(),I=this.popup.data[D];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:p(this.popup.getRow()),inline:this.inlineEnabled}),C.keyBinding.addKeyboardHandler(this.keyboardHandler);var L;this.stickySelection&&(L=this.popup.data.indexOf(I)),(!L||L===-1)&&(L=0),this.popup.setRow(this.autoSelect?L:-1),L===D&&I!==this.completions.filtered[L]&&this.$onPopupChange();var z=this.inlineRenderer&&this.inlineEnabled;if(L===D&&z){var F=this.popup.getData(this.popup.getRow());this.$updateGhostText(F)}E||(this.popup.setTheme(C.getTheme()),this.popup.setFontSize(C.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},T.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},T.prototype.changeListener=function(C){var w=this.editor.selection.lead;(w.row!=this.base.row||w.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},T.prototype.blurListener=function(C){var w=document.activeElement,E=this.editor.textInput.getElement(),D=C.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(C.relatedTarget),I=this.popup&&this.popup.container;w!=E&&w.parentNode!=I&&!D&&w!=this.tooltipNode&&C.relatedTarget!=E&&this.detach()},T.prototype.mousedownListener=function(C){this.detach()},T.prototype.mousewheelListener=function(C){this.popup&&!this.popup.isMouseOver&&this.detach()},T.prototype.mouseOutListener=function(C){this.popup.isOpen&&this.$updatePopupPosition()},T.prototype.goTo=function(C){this.popup.goTo(C)},T.prototype.insertMatch=function(C,w){if(C||(C=this.popup.getData(this.popup.getRow())),!C)return!1;if(C.value==="")return this.detach();var E=this.completions,D=this.getCompletionProvider().insertMatch(this.editor,C,E.filterText,w);return this.completions==E&&this.detach(),D},T.prototype.showPopup=function(C,w){this.editor&&this.detach(),this.activated=!0,this.editor=C,C.completer!=this&&(C.completer&&C.completer.detach(),C.completer=this),C.on("changeSelection",this.changeListener),C.on("blur",this.blurListener),C.on("mousedown",this.mousedownListener),C.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,w)},T.prototype.getCompletionProvider=function(C){return this.completionProvider||(this.completionProvider=new y(C)),this.completionProvider},T.prototype.gatherCompletions=function(C,w){return this.getCompletionProvider().gatherCompletions(C,w)},T.prototype.updateCompletions=function(C,w){if(C&&this.base&&this.completions){var D=this.editor.getCursorPosition(),I=this.editor.session.getTextRange({start:this.base,end:D});if(I==this.completions.filterText)return;if(this.completions.setFilter(I),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==I&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,I,C);return}if(w&&w.matches){var D=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(D.row,D.column),this.base.$insertRight=!0,this.completions=new R(w.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",C)}var E=this.editor.getSession(),D=this.editor.getCursorPosition(),I=d.getCompletionPrefix(this.editor);this.base=E.doc.createAnchor(D.row,D.column-I.length),this.base.$insertRight=!0;var L={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:I,pos:D}).provideCompletions(this.editor,L,(function(z,F,O){var A=F.filtered,S=d.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!A.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(S)),N){var B=[{caption:N,value:""}];this.completions=new R(B),this.openPopup(this.editor,S,C),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(A.length==1&&A[0].value==S&&!A[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&A.length==1)return this.insertMatch(A[0])}this.completions=!O&&this.showLoadingState?new R(T.completionsForLoading.concat(A),F.filterText):F,this.openPopup(this.editor,S,C),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!O)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},T.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},T.prototype.updateDocTooltip=function(){var C=this.popup,w=this.completions&&this.completions.filtered,E=w&&(w[C.getHoveredRow()]||w[C.getRow()]),D=null;if(!E||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var I=this.editor.completers.length,L=0;L<I;L++){var z=this.editor.completers[L];if(z.getDocTooltip&&E.completerId===z.id){D=z.getDocTooltip(E);break}}if(!D&&typeof E!="string"&&(D=E),typeof D=="string"&&(D={docText:D}),!D||!D.docHTML&&!D.docText)return this.hideDocTooltip();this.showDocTooltip(D)},T.prototype.showDocTooltip=function(C){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",i));var w=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(w.isDark?"ace_dark ":"")+(w.cssClass||"");var E=this.tooltipNode;C.docHTML?E.innerHTML=C.docHTML:C.docText&&(E.textContent=C.docText),E.parentNode||this.popup.container.appendChild(this.tooltipNode);var D=this.popup,I=D.container.getBoundingClientRect(),L=400,z=300,F=D.renderer.scrollBar.width||10,O=I.left,A=window.innerWidth-I.right-F,S=D.isTopdown?I.top:window.innerHeight-F-I.bottom,N=[Math.min(A/L,1),Math.min(O/L,1),Math.min(S/z*.9)],B=Math.max.apply(Math,N),V=E.style;V.display="block",B==N[0]?(V.left=I.right+1+"px",V.right="",V.maxWidth=L*B+"px",V.top=I.top+"px",V.bottom="",V.maxHeight=Math.min(window.innerHeight-F-I.top,z)+"px"):B==N[1]?(V.right=window.innerWidth-I.left+"px",V.left="",V.maxWidth=L*B+"px",V.top=I.top+"px",V.bottom="",V.maxHeight=Math.min(window.innerHeight-F-I.top,z)+"px"):B==N[2]&&(V.left=window.innerWidth-I.left+"px",V.maxWidth=Math.min(L,window.innerWidth)+"px",D.isTopdown?(V.top=I.bottom+"px",V.left=I.left+"px",V.right="",V.bottom="",V.maxHeight=Math.min(window.innerHeight-F-I.bottom,z)+"px"):(V.top=D.container.offsetTop-E.offsetHeight+"px",V.left=I.left+"px",V.right="",V.bottom="",V.maxHeight=Math.min(D.container.offsetTop,z)+"px"))},T.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var C=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==C&&this.editor.focus(),this.tooltipNode=null,C.parentNode&&C.parentNode.removeChild(C)}},T.prototype.onTooltipClick=function(C){for(var w=C.target;w&&w!=this.tooltipNode;){if(w.nodeName=="A"&&w.href){w.rel="noreferrer",w.target="_blank";break}w=w.parentNode}},T.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var C=this.popup.container;C&&C.parentNode&&C.parentNode.removeChild(C)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",h),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},T.for=function(C){return C.completer instanceof T||(C.completer&&(C.completer.destroy(),C.completer=null),r.get("sharedPopups")?(T.$sharedInstance||(T.$sharedInstance=new T),C.completer=T.$sharedInstance):(C.completer=new T,C.once("destroy",h))),C.completer},T}();m.prototype.commands={Up:function(T){T.completer.goTo("up")},Down:function(T){T.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(T){T.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(T){T.completer.goTo("end")},Esc:function(T){T.completer.detach()},Return:function(T){return T.completer.insertMatch()},"Shift-Return":function(T){T.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(T){var C=T.completer.insertMatch();if(C||T.tabstopManager)return C;T.completer.goTo("down")},Backspace:function(T){T.execCommand("backspace");var C=d.getCompletionPrefix(T);!C&&T.completer&&T.completer.detach()},PageUp:function(T){T.completer.popup.gotoPageUp()},PageDown:function(T){T.completer.popup.gotoPageDown()}},m.startCommand={name:"startAutocomplete",exec:function(T,C){var w=m.for(T);w.autoInsert=!1,w.autoSelect=!0,w.autoShown=!1,w.showPopup(T,C),w.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var y=function(){function T(C){this.initialPosition=C,this.active=!0}return T.prototype.insertByIndex=function(C,w,E){return!this.completions||!this.completions.filtered?!1:this.insertMatch(C,this.completions.filtered[w],E)},T.prototype.insertMatch=function(C,w,E){if(!w)return!1;if(C.startOperation({command:{name:"insertMatch"}}),w.completer&&w.completer.insertMatch)w.completer.insertMatch(C,w);else{if(!this.completions)return!1;var D=this.completions.filterText.length,I=0;if(w.range&&w.range.start.row===w.range.end.row&&(D-=this.initialPosition.prefix.length,D+=this.initialPosition.pos.column-w.range.start.column,I+=w.range.end.column-this.initialPosition.pos.column),D||I){var L;C.selection.getAllRanges?L=C.selection.getAllRanges():L=[C.getSelectionRange()];for(var z=0,F;F=L[z];z++)F.start.column-=D,F.end.column+=I,C.session.remove(F)}w.snippet?s.insertSnippet(C,w.snippet):this.$insertString(C,w),w.completer&&w.completer.onInsert&&typeof w.completer.onInsert=="function"&&w.completer.onInsert(C,w),w.command&&w.command==="startAutocomplete"&&C.execCommand(w.command)}return C.endOperation(),!0},T.prototype.$insertString=function(C,w){var E=w.value||w;C.execCommand("insertstring",E)},T.prototype.gatherCompletions=function(C,w){var E=C.getSession(),D=C.getCursorPosition(),I=d.getCompletionPrefix(C),L=[];this.completers=C.completers;var z=C.completers.length;return C.completers.forEach(function(F,O){F.getCompletions(C,E,D,I,function(A,S){F.hideInlinePreview&&(S=S.map(function(N){return Object.assign(N,{hideInlinePreview:F.hideInlinePreview})})),!A&&S&&(L=L.concat(S)),w(null,{prefix:d.getCompletionPrefix(C),matches:L,finished:--z===0})})}),!0},T.prototype.provideCompletions=function(C,w,E){var D=(function(F){var O=F.prefix,A=F.matches;this.completions=new R(A),w.exactMatch&&(this.completions.exactMatch=!0),w.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(F.finished||this.completions.filtered.length)&&E(null,this.completions,F.finished)}).bind(this),I=!0,L=null;if(this.gatherCompletions(C,(function(F,O){if(this.active){F&&(E(F,[],!0),this.detach());var A=O.prefix;if(A.indexOf(O.prefix)===0){if(I){L=O;return}D(O)}}}).bind(this)),I=!1,L){var z=L;L=null,D(z)}},T.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(C){typeof C.cancel=="function"&&C.cancel()})},T}(),R=function(){function T(C,w){this.all=C,this.filtered=C,this.filterText=w||"",this.exactMatch=!1,this.ignoreCaption=!1}return T.prototype.setFilter=function(C){if(C.length>this.filterText&&C.lastIndexOf(this.filterText,0)===0)var w=this.filtered;else var w=this.all;this.filterText=C,w=this.filterCompletions(w,this.filterText),w=w.sort(function(D,I){return I.exactMatch-D.exactMatch||I.$score-D.$score||(D.caption||D.value).localeCompare(I.caption||I.value)});var E=null;w=w.filter(function(D){var I=D.snippet||D.caption||D.value;return I===E?!1:(E=I,!0)}),this.filtered=w},T.prototype.filterCompletions=function(C,w){var E=[],D=w.toUpperCase(),I=w.toLowerCase();e:for(var L=0,z;z=C[L];L++){if(z.skipFilter){z.$score=z.score,E.push(z);continue}var F=!this.ignoreCaption&&z.caption||z.value||z.snippet;if(F){var O=-1,A=0,S=0,N,B;if(this.exactMatch){if(w!==F.substr(0,w.length))continue e}else{var V=F.toLowerCase().indexOf(I);if(V>-1)S=V;else for(var G=0;G<w.length;G++){var Z=F.indexOf(I[G],O+1),ee=F.indexOf(D[G],O+1);if(N=Z>=0&&(ee<0||Z<ee)?Z:ee,N<0)continue e;B=N-O-1,B>0&&(O===-1&&(S+=10),S+=B,A|=1<<G),O=N}}z.matchMask=A,z.exactMatch=S?0:1,z.$score=(z.score||0)-S,E.push(z)}}return E},T}();u.Autocomplete=m,u.CompletionProvider=y,u.FilteredList=R}),ace.define("ace/marker_group",["require","exports","module"],function(e,u,$){var b=function(){function v(x,p){p&&(this.markerType=p.markerType),this.markers=[],this.session=x,x.addDynamicMarker(this)}return v.prototype.getMarkerAtPosition=function(x){return this.markers.find(function(p){return p.range.contains(x.row,x.column)})},v.prototype.markersComparator=function(x,p){return x.range.start.row-p.range.start.row},v.prototype.setMarkers=function(x){this.markers=x.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},v.prototype.update=function(x,p,d,o){if(!(!this.markers||!this.markers.length))for(var a=o.firstRow,s=o.lastRow,r,n=0,i=0,h=0;h<this.markers.length;h++){var m=this.markers[h];if(!(m.range.end.row<a)&&!(m.range.start.row>s)&&(m.range.start.row===i?n++:(i=m.range.start.row,n=0),!(n>200))){var y=m.range.clipRows(a,s);if(!(y.start.row===y.end.row&&y.start.column===y.end.column)){var R=y.toScreenRange(d);if(R.isEmpty()){r=d.getNextFoldLine(y.end.row,r),r&&r.end.row>y.end.row&&(a=r.end.row);continue}this.markerType==="fullLine"?p.drawFullLineMarker(x,R,m.className,o):R.isMultiLine()?this.markerType==="line"?p.drawMultiLineMarker(x,R,m.className,o):p.drawTextMarker(x,R,m.className,o):p.drawSingleLineMarker(x,R,m.className+" ace_br15",o)}}}},v}();b.prototype.MAX_MARKERS=1e4,u.MarkerGroup=b}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,u,$){function b(d,o){var a=d.getTextRange(x.fromPoints({row:0,column:0},o));return a.split(p).length-1}function v(d,o){var a=b(d,o),s=d.getValue().split(p),r=Object.create(null),n=s[a];return s.forEach(function(i,h){if(!(!i||i===n)){var m=Math.abs(a-h),y=s.length-m;r[i]?r[i]=Math.max(y,r[i]):r[i]=y}}),r}var x=e("../range").Range,p=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;u.getCompletions=function(d,o,a,s,r){var n=v(o,a),i=Object.keys(n);r(null,i.map(function(h){return{caption:h,value:h,score:n[h],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,u,$){var b=e("../snippets").snippetManager,v=e("../autocomplete").Autocomplete,x=e("../config"),p=e("../lib/lang"),d=e("../autocomplete/util"),o=e("../marker_group").MarkerGroup,a=e("../autocomplete/text_completer"),s={getCompletions:function(I,L,z,F,O){if(L.$mode.completer)return L.$mode.completer.getCompletions(I,L,z,F,O);var A=I.session.getState(z.row),S=L.$mode.getCompletions(A,L,z,F);S=S.map(function(N){return N.completerId=s.id,N}),O(null,S)},id:"keywordCompleter"},r=function(I){var L={};return I.replace(/\${(\d+)(:(.*?))?}/g,function(z,F,O,A){return L[F]=A||""}).replace(/\$(\d+?)/g,function(z,F){return L[F]})},n={getCompletions:function(I,L,z,F,O){var A=[],S=L.getTokenAt(z.row,z.column);S&&S.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?A.push("html-tag"):A=b.getActiveScopes(I);var N=b.snippetMap,B=[];A.forEach(function(V){for(var G=N[V]||[],Z=G.length;Z--;){var ee=G[Z],ce=ee.name||ee.tabTrigger;ce&&B.push({caption:ce,snippet:ee.content,meta:ee.tabTrigger&&!ee.name?ee.tabTrigger+"⇥ ":"snippet",completerId:n.id})}},this),O(null,B)},getDocTooltip:function(I){I.snippet&&!I.docHTML&&(I.docHTML=["<b>",p.escapeHTML(I.caption),"</b>","<hr></hr>",p.escapeHTML(r(I.snippet))].join(""))},id:"snippetCompleter"},i=[n,a,s];u.setCompleters=function(I){i.length=0,I&&i.push.apply(i,I)},u.addCompleter=function(I){i.push(I)},u.textCompleter=a,u.keyWordCompleter=s,u.snippetCompleter=n;var h={name:"expandSnippet",exec:function(I){return b.expandWithTab(I)},bindKey:"Tab"},m=function(I,L){y(L.session.$mode)},y=function(I){typeof I=="string"&&(I=x.$modes[I]),I&&(b.files||(b.files={}),R(I.$id,I.snippetFileId),I.modes&&I.modes.forEach(y))},R=function(I,L){!L||!I||b.files[I]||(b.files[I]={},x.loadModule(L,function(z){z&&(b.files[I]=z,!z.snippets&&z.snippetText&&(z.snippets=b.parseSnippetFile(z.snippetText)),b.register(z.snippets||[],z.scope),z.includeScopes&&(b.snippetMap[z.scope].includeScopes=z.includeScopes,z.includeScopes.forEach(function(F){y("ace/mode/"+F)})))}))},T=function(I){var L=I.editor,z=L.completer&&L.completer.activated;if(I.command.name==="backspace")z&&!d.getCompletionPrefix(L)&&L.completer.detach();else if(I.command.name==="insertstring"&&!z){C=I;var F=I.editor.$liveAutocompletionDelay;F?w.delay(F):E(I)}},C,w=p.delayedCall(function(){E(C)},0),E=function(I){var L=I.editor,z=d.getCompletionPrefix(L),F=I.args,O=d.triggerAutocomplete(L,F);if(z&&z.length>=L.$liveAutocompletionThreshold||O){var A=v.for(L);A.autoShown=!0,A.showPopup(L)}},D=e("../editor").Editor;e("../config").defineOptions(D.prototype,"editor",{enableBasicAutocompletion:{set:function(I){I?(v.for(this),this.completers||(this.completers=Array.isArray(I)?I:i),this.commands.addCommand(v.startCommand)):this.commands.removeCommand(v.startCommand)},value:!1},enableLiveAutocompletion:{set:function(I){I?(this.completers||(this.completers=Array.isArray(I)?I:i),this.commands.on("afterExec",T)):this.commands.off("afterExec",T)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(I){I?(this.commands.addCommand(h),this.on("changeMode",m),m(null,this)):(this.commands.removeCommand(h),this.off("changeMode",m))},value:!1}}),u.MarkerGroup=o}),function(){ace.require(["ace/ext/language_tools"],function(e){l&&(l.exports=e)})}()}(vc)),vc.exports}Lx();var yc={exports:{}},Zd;function Ex(){return Zd||(Zd=1,function(l,c){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,u,$){$.exports=`
|
|
1229
|
+
`,"autocompletion.css",!1),u.AcePopup=y,u.$singleLineEditor=m,u.getAriaId=r}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,u,$){var b=function(){function v(x){this.editor=x,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return v.prototype.setScreenReaderContent=function(x){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var d=this.popup.getRow(),o=this.popup.renderer.$textLayer,a=o.element.childNodes[d-o.config.firstRow];if(a){for(var s="doc-tooltip ",r=0;r<this._lines.length;r++)s+="ace-inline-screenreader-line-".concat(r," ");a.setAttribute("aria-describedby",s)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=x.split(/\r\n|\r|\n/);var p=this.createCodeBlock();this.screenReaderDiv.appendChild(p)},v.prototype.destroy=function(){this.screenReaderDiv.remove()},v.prototype.createCodeBlock=function(){var x=document.createElement("pre");x.setAttribute("id","ace-inline-screenreader");for(var p=0;p<this._lines.length;p++){var d=document.createElement("code");d.setAttribute("id","ace-inline-screenreader-line-".concat(p));var o=document.createTextNode(this._lines[p]);d.appendChild(o),x.appendChild(d)}return x},v}();u.AceInlineScreenReader=b}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,u,$){var b=e("../snippets").snippetManager,v=e("./inline_screenreader").AceInlineScreenReader,x=function(){function p(){this.editor=null}return p.prototype.show=function(d,o,a){if(a=a||"",d&&this.editor&&this.editor!==d&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!d||!o)return!1;this.inlineScreenReader||(this.inlineScreenReader=new v(d));var s=o.snippet?b.getDisplayTextForSnippet(d,o.snippet):o.value;return o.hideInlinePreview||!s||!s.startsWith(a)?!1:(this.editor=d,this.inlineScreenReader.setScreenReaderContent(s),s=s.slice(a.length),s===""?d.removeGhostText():d.setGhostText(s),!0)},p.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},p.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},p.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},p}();u.AceInline=x}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,u,$){u.parForEach=function(v,x,p){var d=0,o=v.length;o===0&&p();for(var a=0;a<o;a++)x(v[a],function(s,r){d++,d===o&&p(s,r)})};var b=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;u.retrievePrecedingIdentifier=function(v,x,p){p=p||b;for(var d=[],o=x-1;o>=0&&p.test(v[o]);o--)d.push(v[o]);return d.reverse().join("")},u.retrieveFollowingIdentifier=function(v,x,p){p=p||b;for(var d=[],o=x;o<v.length&&p.test(v[o]);o++)d.push(v[o]);return d},u.getCompletionPrefix=function(v){var x=v.getCursorPosition(),p=v.session.getLine(x.row),d;return v.completers.forEach((function(o){o.identifierRegexps&&o.identifierRegexps.forEach((function(a){!d&&a&&(d=this.retrievePrecedingIdentifier(p,x.column,a))}).bind(this))}).bind(this)),d||this.retrievePrecedingIdentifier(p,x.column)},u.triggerAutocomplete=function(v,p){var p=p??v.session.getPrecedingCharacter();return v.completers.some(function(d){if(d.triggerCharacters&&Array.isArray(d.triggerCharacters))return d.triggerCharacters.includes(p)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(e,u,$){var b=e("./keyboard/hash_handler").HashHandler,v=e("./autocomplete/popup").AcePopup,x=e("./autocomplete/inline").AceInline,p=e("./autocomplete/popup").getAriaId,d=e("./autocomplete/util"),o=e("./lib/lang"),a=e("./lib/dom"),s=e("./snippets").snippetManager,r=e("./config"),n=e("./lib/event"),i=e("./lib/scroll").preventParentScroll,h=function(T,C){C.completer&&C.completer.destroy()},m=function(){function T(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new b,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=o.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=o.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=o.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=o.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=o.delayedCall((function(){var C=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!C||this.editor.completers.length===0||(this.completions=new R(T.completionsForLoading),this.openPopup(this.editor,C.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(T,"completionsForLoading",{get:function(){return[{caption:r.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),T.prototype.$init=function(){return this.popup=new v(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(C){this.insertMatch(),C.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),n.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},T.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new x,this.inlineRenderer},T.prototype.getPopup=function(){return this.popup||this.$init()},T.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},T.prototype.$seen=function(C){!this.hasSeen.has(C)&&C&&C.completer&&C.completer.onSeen&&typeof C.completer.onSeen=="function"&&(C.completer.onSeen(this.editor,C),this.hasSeen.add(C))},T.prototype.$onPopupChange=function(C){if(this.inlineRenderer&&this.inlineEnabled){var w=C?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(w),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},T.prototype.$updateGhostText=function(C){var w=this.base.row,E=this.base.column,D=this.editor.getCursorPosition().column,I=this.editor.session.getLine(w).slice(E,D);this.inlineRenderer.show(this.editor,C,I)?this.$seen(C):this.inlineRenderer.hide()},T.prototype.$onPopupRender=function(){var C=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var w=this.popup.getFirstVisibleRow();w<=this.popup.getLastVisibleRow();w++){var E=this.popup.getData(w);E&&(!C||E.hideInlinePreview)&&this.$seen(E)}},T.prototype.$onPopupShow=function(C){this.$onPopupChange(C),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},T.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var C=this.editor.container.parentNode,w=[];C;)w.push(C),C.addEventListener("scroll",this.onLayoutChange,{passive:!0}),C=C.parentNode;this.$elements=w}},T.prototype.unObserveLayoutChanges=function(){var C=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(w){w.removeEventListener("scroll",C.onLayoutChange,{passive:!0})}),this.$elements=null},T.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},T.prototype.$updatePopupPosition=function(){var C=this.editor,w=C.renderer,E=w.layerConfig.lineHeight,D=w.$cursorLayer.getPixelPosition(this.base,!0);D.left-=this.popup.getTextLeftOffset();var I=C.container.getBoundingClientRect();D.top+=I.top-w.layerConfig.offset,D.left+=I.left-C.renderer.scrollLeft,D.left+=w.gutterWidth;var L={top:D.top,left:D.left};w.$ghostText&&w.$ghostTextWidget&&this.base.row===w.$ghostText.position.row&&(L.top+=w.$ghostTextWidget.el.offsetHeight);var z=C.container.getBoundingClientRect().bottom-E,F=z<L.top?{top:z,left:L.left}:L;this.popup.tryShow(F,E,"bottom")||this.popup.tryShow(D,E,"top")||this.popup.show(D,E)},T.prototype.openPopup=function(C,w,E){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var D=this.popup.getRow(),I=this.popup.data[D];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:p(this.popup.getRow()),inline:this.inlineEnabled}),C.keyBinding.addKeyboardHandler(this.keyboardHandler);var L;this.stickySelection&&(L=this.popup.data.indexOf(I)),(!L||L===-1)&&(L=0),this.popup.setRow(this.autoSelect?L:-1),L===D&&I!==this.completions.filtered[L]&&this.$onPopupChange();var z=this.inlineRenderer&&this.inlineEnabled;if(L===D&&z){var F=this.popup.getData(this.popup.getRow());this.$updateGhostText(F)}E||(this.popup.setTheme(C.getTheme()),this.popup.setFontSize(C.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},T.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},T.prototype.changeListener=function(C){var w=this.editor.selection.lead;(w.row!=this.base.row||w.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},T.prototype.blurListener=function(C){var w=document.activeElement,E=this.editor.textInput.getElement(),D=C.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(C.relatedTarget),I=this.popup&&this.popup.container;w!=E&&w.parentNode!=I&&!D&&w!=this.tooltipNode&&C.relatedTarget!=E&&this.detach()},T.prototype.mousedownListener=function(C){this.detach()},T.prototype.mousewheelListener=function(C){this.popup&&!this.popup.isMouseOver&&this.detach()},T.prototype.mouseOutListener=function(C){this.popup.isOpen&&this.$updatePopupPosition()},T.prototype.goTo=function(C){this.popup.goTo(C)},T.prototype.insertMatch=function(C,w){if(C||(C=this.popup.getData(this.popup.getRow())),!C)return!1;if(C.value==="")return this.detach();var E=this.completions,D=this.getCompletionProvider().insertMatch(this.editor,C,E.filterText,w);return this.completions==E&&this.detach(),D},T.prototype.showPopup=function(C,w){this.editor&&this.detach(),this.activated=!0,this.editor=C,C.completer!=this&&(C.completer&&C.completer.detach(),C.completer=this),C.on("changeSelection",this.changeListener),C.on("blur",this.blurListener),C.on("mousedown",this.mousedownListener),C.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,w)},T.prototype.getCompletionProvider=function(C){return this.completionProvider||(this.completionProvider=new y(C)),this.completionProvider},T.prototype.gatherCompletions=function(C,w){return this.getCompletionProvider().gatherCompletions(C,w)},T.prototype.updateCompletions=function(C,w){if(C&&this.base&&this.completions){var D=this.editor.getCursorPosition(),I=this.editor.session.getTextRange({start:this.base,end:D});if(I==this.completions.filterText)return;if(this.completions.setFilter(I),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==I&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,I,C);return}if(w&&w.matches){var D=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(D.row,D.column),this.base.$insertRight=!0,this.completions=new R(w.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",C)}var E=this.editor.getSession(),D=this.editor.getCursorPosition(),I=d.getCompletionPrefix(this.editor);this.base=E.doc.createAnchor(D.row,D.column-I.length),this.base.$insertRight=!0;var L={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:I,pos:D}).provideCompletions(this.editor,L,(function(z,F,O){var A=F.filtered,S=d.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!A.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(S)),N){var W=[{caption:N,value:""}];this.completions=new R(W),this.openPopup(this.editor,S,C),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(A.length==1&&A[0].value==S&&!A[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&A.length==1)return this.insertMatch(A[0])}this.completions=!O&&this.showLoadingState?new R(T.completionsForLoading.concat(A),F.filterText):F,this.openPopup(this.editor,S,C),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!O)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},T.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},T.prototype.updateDocTooltip=function(){var C=this.popup,w=this.completions&&this.completions.filtered,E=w&&(w[C.getHoveredRow()]||w[C.getRow()]),D=null;if(!E||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var I=this.editor.completers.length,L=0;L<I;L++){var z=this.editor.completers[L];if(z.getDocTooltip&&E.completerId===z.id){D=z.getDocTooltip(E);break}}if(!D&&typeof E!="string"&&(D=E),typeof D=="string"&&(D={docText:D}),!D||!D.docHTML&&!D.docText)return this.hideDocTooltip();this.showDocTooltip(D)},T.prototype.showDocTooltip=function(C){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",i));var w=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(w.isDark?"ace_dark ":"")+(w.cssClass||"");var E=this.tooltipNode;C.docHTML?E.innerHTML=C.docHTML:C.docText&&(E.textContent=C.docText),E.parentNode||this.popup.container.appendChild(this.tooltipNode);var D=this.popup,I=D.container.getBoundingClientRect(),L=400,z=300,F=D.renderer.scrollBar.width||10,O=I.left,A=window.innerWidth-I.right-F,S=D.isTopdown?window.innerHeight-F-I.bottom:I.top,N=[Math.min(A/L,1),Math.min(O/L,1),Math.min(S/z,1)*.9],W=Math.max.apply(Math,N),V=E.style;V.display="block",W==N[0]||N[0]>=1?(V.left=I.right+1+"px",V.right="",V.maxWidth=L*W+"px",V.top=I.top+"px",V.bottom="",V.maxHeight=Math.min(window.innerHeight-F-I.top,z)+"px"):W==N[1]||N[1]>=1?(V.right=window.innerWidth-I.left+"px",V.left="",V.maxWidth=L*W+"px",V.top=I.top+"px",V.bottom="",V.maxHeight=Math.min(window.innerHeight-F-I.top,z)+"px"):W==N[2]&&(V.left=I.left+"px",V.right="",V.maxWidth=Math.min(L,window.innerWidth-I.left)+"px",D.isTopdown?(V.top=I.bottom+"px",V.bottom="",V.maxHeight=Math.min(window.innerHeight-F-I.bottom,z)+"px"):(V.top="",V.bottom=window.innerHeight-I.top+"px",V.maxHeight=Math.min(I.top,z)+"px")),a.$fixPositionBug(E)},T.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var C=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==C&&this.editor.focus(),this.tooltipNode=null,C.parentNode&&C.parentNode.removeChild(C)}},T.prototype.onTooltipClick=function(C){for(var w=C.target;w&&w!=this.tooltipNode;){if(w.nodeName=="A"&&w.href){w.rel="noreferrer",w.target="_blank";break}w=w.parentNode}},T.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var C=this.popup.container;C&&C.parentNode&&C.parentNode.removeChild(C)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",h),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},T.for=function(C){return C.completer instanceof T||(C.completer&&(C.completer.destroy(),C.completer=null),r.get("sharedPopups")?(T.$sharedInstance||(T.$sharedInstance=new T),C.completer=T.$sharedInstance):(C.completer=new T,C.once("destroy",h))),C.completer},T}();m.prototype.commands={Up:function(T){T.completer.goTo("up")},Down:function(T){T.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(T){T.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(T){T.completer.goTo("end")},Esc:function(T){T.completer.detach()},Return:function(T){return T.completer.insertMatch()},"Shift-Return":function(T){T.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(T){var C=T.completer.insertMatch();if(C||T.tabstopManager)return C;T.completer.goTo("down")},Backspace:function(T){T.execCommand("backspace");var C=d.getCompletionPrefix(T);!C&&T.completer&&T.completer.detach()},PageUp:function(T){T.completer.popup.gotoPageUp()},PageDown:function(T){T.completer.popup.gotoPageDown()}},m.startCommand={name:"startAutocomplete",exec:function(T,C){var w=m.for(T);w.autoInsert=!1,w.autoSelect=!0,w.autoShown=!1,w.showPopup(T,C),w.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var y=function(){function T(C){this.initialPosition=C,this.active=!0}return T.prototype.insertByIndex=function(C,w,E){return!this.completions||!this.completions.filtered?!1:this.insertMatch(C,this.completions.filtered[w],E)},T.prototype.insertMatch=function(C,w,E){if(!w)return!1;if(C.startOperation({command:{name:"insertMatch"}}),w.completer&&w.completer.insertMatch)w.completer.insertMatch(C,w);else{if(!this.completions)return!1;var D=this.completions.filterText.length,I=0;if(w.range&&w.range.start.row===w.range.end.row&&(D-=this.initialPosition.prefix.length,D+=this.initialPosition.pos.column-w.range.start.column,I+=w.range.end.column-this.initialPosition.pos.column),D||I){var L;C.selection.getAllRanges?L=C.selection.getAllRanges():L=[C.getSelectionRange()];for(var z=0,F;F=L[z];z++)F.start.column-=D,F.end.column+=I,C.session.remove(F)}w.snippet?s.insertSnippet(C,w.snippet):this.$insertString(C,w),w.completer&&w.completer.onInsert&&typeof w.completer.onInsert=="function"&&w.completer.onInsert(C,w),w.command&&w.command==="startAutocomplete"&&C.execCommand(w.command)}return C.endOperation(),!0},T.prototype.$insertString=function(C,w){var E=w.value||w;C.execCommand("insertstring",E)},T.prototype.gatherCompletions=function(C,w){var E=C.getSession(),D=C.getCursorPosition(),I=d.getCompletionPrefix(C),L=[];this.completers=C.completers;var z=C.completers.length;return C.completers.forEach(function(F,O){F.getCompletions(C,E,D,I,function(A,S){F.hideInlinePreview&&(S=S.map(function(N){return Object.assign(N,{hideInlinePreview:F.hideInlinePreview})})),!A&&S&&(L=L.concat(S)),w(null,{prefix:d.getCompletionPrefix(C),matches:L,finished:--z===0})})}),!0},T.prototype.provideCompletions=function(C,w,E){var D=(function(F){var O=F.prefix,A=F.matches;this.completions=new R(A),w.exactMatch&&(this.completions.exactMatch=!0),w.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(F.finished||this.completions.filtered.length)&&E(null,this.completions,F.finished)}).bind(this),I=!0,L=null;if(this.gatherCompletions(C,(function(F,O){if(this.active){F&&(E(F,[],!0),this.detach());var A=O.prefix;if(A.indexOf(O.prefix)===0){if(I){L=O;return}D(O)}}}).bind(this)),I=!1,L){var z=L;L=null,D(z)}},T.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(C){typeof C.cancel=="function"&&C.cancel()})},T}(),R=function(){function T(C,w){this.all=C,this.filtered=C,this.filterText=w||"",this.exactMatch=!1,this.ignoreCaption=!1}return T.prototype.setFilter=function(C){if(C.length>this.filterText&&C.lastIndexOf(this.filterText,0)===0)var w=this.filtered;else var w=this.all;this.filterText=C,w=this.filterCompletions(w,this.filterText),w=w.sort(function(D,I){return I.exactMatch-D.exactMatch||I.$score-D.$score||(D.caption||D.value).localeCompare(I.caption||I.value)});var E=null;w=w.filter(function(D){var I=D.snippet||D.caption||D.value;return I===E?!1:(E=I,!0)}),this.filtered=w},T.prototype.filterCompletions=function(C,w){var E=[],D=w.toUpperCase(),I=w.toLowerCase();e:for(var L=0,z;z=C[L];L++){if(z.skipFilter){z.$score=z.score,E.push(z);continue}var F=!this.ignoreCaption&&z.caption||z.value||z.snippet;if(F){var O=-1,A=0,S=0,N,W;if(this.exactMatch){if(w!==F.substr(0,w.length))continue e}else{var V=F.toLowerCase().indexOf(I);if(V>-1)S=V;else for(var G=0;G<w.length;G++){var Z=F.indexOf(I[G],O+1),ee=F.indexOf(D[G],O+1);if(N=Z>=0&&(ee<0||Z<ee)?Z:ee,N<0)continue e;W=N-O-1,W>0&&(O===-1&&(S+=10),S+=W,A|=1<<G),O=N}}z.matchMask=A,z.exactMatch=S?0:1,z.$score=(z.score||0)-S,E.push(z)}}return E},T}();u.Autocomplete=m,u.CompletionProvider=y,u.FilteredList=R}),ace.define("ace/marker_group",["require","exports","module"],function(e,u,$){var b=function(){function v(x,p){p&&(this.markerType=p.markerType),this.markers=[],this.session=x,x.addDynamicMarker(this)}return v.prototype.getMarkerAtPosition=function(x){return this.markers.find(function(p){return p.range.contains(x.row,x.column)})},v.prototype.markersComparator=function(x,p){return x.range.start.row-p.range.start.row},v.prototype.setMarkers=function(x){this.markers=x.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},v.prototype.update=function(x,p,d,o){if(!(!this.markers||!this.markers.length))for(var a=o.firstRow,s=o.lastRow,r,n=0,i=0,h=0;h<this.markers.length;h++){var m=this.markers[h];if(!(m.range.end.row<a)&&!(m.range.start.row>s)&&(m.range.start.row===i?n++:(i=m.range.start.row,n=0),!(n>200))){var y=m.range.clipRows(a,s);if(!(y.start.row===y.end.row&&y.start.column===y.end.column)){var R=y.toScreenRange(d);if(R.isEmpty()){r=d.getNextFoldLine(y.end.row,r),r&&r.end.row>y.end.row&&(a=r.end.row);continue}this.markerType==="fullLine"?p.drawFullLineMarker(x,R,m.className,o):R.isMultiLine()?this.markerType==="line"?p.drawMultiLineMarker(x,R,m.className,o):p.drawTextMarker(x,R,m.className,o):p.drawSingleLineMarker(x,R,m.className+" ace_br15",o)}}}},v}();b.prototype.MAX_MARKERS=1e4,u.MarkerGroup=b}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,u,$){function b(d,o){var a=d.getTextRange(x.fromPoints({row:0,column:0},o));return a.split(p).length-1}function v(d,o){var a=b(d,o),s=d.getValue().split(p),r=Object.create(null),n=s[a];return s.forEach(function(i,h){if(!(!i||i===n)){var m=Math.abs(a-h),y=s.length-m;r[i]?r[i]=Math.max(y,r[i]):r[i]=y}}),r}var x=e("../range").Range,p=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;u.getCompletions=function(d,o,a,s,r){var n=v(o,a),i=Object.keys(n);r(null,i.map(function(h){return{caption:h,value:h,score:n[h],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,u,$){var b=e("../snippets").snippetManager,v=e("../autocomplete").Autocomplete,x=e("../config"),p=e("../lib/lang"),d=e("../autocomplete/util"),o=e("../marker_group").MarkerGroup,a=e("../autocomplete/text_completer"),s={getCompletions:function(I,L,z,F,O){if(L.$mode.completer)return L.$mode.completer.getCompletions(I,L,z,F,O);var A=I.session.getState(z.row),S=L.$mode.getCompletions(A,L,z,F);S=S.map(function(N){return N.completerId=s.id,N}),O(null,S)},id:"keywordCompleter"},r=function(I){var L={};return I.replace(/\${(\d+)(:(.*?))?}/g,function(z,F,O,A){return L[F]=A||""}).replace(/\$(\d+?)/g,function(z,F){return L[F]})},n={getCompletions:function(I,L,z,F,O){var A=[],S=L.getTokenAt(z.row,z.column);S&&S.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?A.push("html-tag"):A=b.getActiveScopes(I);var N=b.snippetMap,W=[];A.forEach(function(V){for(var G=N[V]||[],Z=G.length;Z--;){var ee=G[Z],ce=ee.name||ee.tabTrigger;ce&&W.push({caption:ce,snippet:ee.content,meta:ee.tabTrigger&&!ee.name?ee.tabTrigger+"⇥ ":"snippet",completerId:n.id})}},this),O(null,W)},getDocTooltip:function(I){I.snippet&&!I.docHTML&&(I.docHTML=["<b>",p.escapeHTML(I.caption),"</b>","<hr></hr>",p.escapeHTML(r(I.snippet))].join(""))},id:"snippetCompleter"},i=[n,a,s];u.setCompleters=function(I){i.length=0,I&&i.push.apply(i,I)},u.addCompleter=function(I){i.push(I)},u.textCompleter=a,u.keyWordCompleter=s,u.snippetCompleter=n;var h={name:"expandSnippet",exec:function(I){return b.expandWithTab(I)},bindKey:"Tab"},m=function(I,L){y(L.session.$mode)},y=function(I){typeof I=="string"&&(I=x.$modes[I]),I&&(b.files||(b.files={}),R(I.$id,I.snippetFileId),I.modes&&I.modes.forEach(y))},R=function(I,L){!L||!I||b.files[I]||(b.files[I]={},x.loadModule(L,function(z){z&&(b.files[I]=z,!z.snippets&&z.snippetText&&(z.snippets=b.parseSnippetFile(z.snippetText)),b.register(z.snippets||[],z.scope),z.includeScopes&&(b.snippetMap[z.scope].includeScopes=z.includeScopes,z.includeScopes.forEach(function(F){y("ace/mode/"+F)})))}))},T=function(I){var L=I.editor,z=L.completer&&L.completer.activated;if(I.command.name==="backspace")z&&!d.getCompletionPrefix(L)&&L.completer.detach();else if(I.command.name==="insertstring"&&!z){C=I;var F=I.editor.$liveAutocompletionDelay;F?w.delay(F):E(I)}},C,w=p.delayedCall(function(){E(C)},0),E=function(I){var L=I.editor,z=d.getCompletionPrefix(L),F=I.args,O=d.triggerAutocomplete(L,F);if(z&&z.length>=L.$liveAutocompletionThreshold||O){var A=v.for(L);A.autoShown=!0,A.showPopup(L)}},D=e("../editor").Editor;e("../config").defineOptions(D.prototype,"editor",{enableBasicAutocompletion:{set:function(I){I?(v.for(this),this.completers||(this.completers=Array.isArray(I)?I:i),this.commands.addCommand(v.startCommand)):this.commands.removeCommand(v.startCommand)},value:!1},enableLiveAutocompletion:{set:function(I){I?(this.completers||(this.completers=Array.isArray(I)?I:i),this.commands.on("afterExec",T)):this.commands.off("afterExec",T)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(I){I?(this.commands.addCommand(h),this.on("changeMode",m),m(null,this)):(this.commands.removeCommand(h),this.off("changeMode",m))},value:!1}}),u.MarkerGroup=o}),function(){ace.require(["ace/ext/language_tools"],function(e){l&&(l.exports=e)})}()}(vc)),vc.exports}Lx();var yc={exports:{}},Zd;function Ex(){return Zd||(Zd=1,function(l,c){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,u,$){$.exports=`
|
|
1230
1230
|
|
|
1231
1231
|
/* ------------------------------------------------------------------------------------------
|
|
1232
1232
|
* Editor Search Form
|
|
@@ -1389,24 +1389,24 @@
|
|
|
1389
1389
|
padding: 0 8px;
|
|
1390
1390
|
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,u,$){var b=e("../lib/dom"),v=e("../lib/lang"),x=e("../lib/event"),p=e("./searchbox-css"),d=e("../keyboard/hash_handler").HashHandler,o=e("../lib/keys"),a=e("../config").nls,s=999;b.importCssString(p,"ace_searchbox",!1);var r=function(){function h(m,y,R){this.activeInput,this.element=b.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:a("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},""],["span",{action:"findNext",class:"ace_searchbtn next"},""],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},a("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:a("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},a("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},a("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:a("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:a("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:a("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:a("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:a("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(m),b.importCssString(p,"ace_searchbox",m.container),x.addListener(this.element,"touchstart",function(T){T.stopPropagation()},m)}return h.prototype.setEditor=function(m){m.searchBox=this,m.renderer.scroller.appendChild(this.element),this.editor=m},h.prototype.setSession=function(m){this.searchRange=null,this.$syncOptions(!0)},h.prototype.onEditorInput=function(){this.find(!1,!1,!0)},h.prototype.$initElements=function(m){this.searchBox=m.querySelector(".ace_search_form"),this.replaceBox=m.querySelector(".ace_replace_form"),this.searchOption=m.querySelector("[action=searchInSelection]"),this.replaceOption=m.querySelector("[action=toggleReplace]"),this.regExpOption=m.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=m.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=m.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=m.querySelector(".ace_search_counter")},h.prototype.$init=function(){var m=this.element;this.$initElements(m);var y=this;x.addListener(m,"mousedown",function(R){setTimeout(function(){y.activeInput.focus()},0),x.stopPropagation(R)}),x.addListener(m,"click",function(R){var T=R.target||R.srcElement,C=T.getAttribute("action");C&&y[C]?y[C]():y.$searchBarKb.commands[C]&&y.$searchBarKb.commands[C].exec(y),x.stopPropagation(R)}),x.addCommandKeyListener(m,function(R,T,C){var w=o.keyCodeToString(C),E=y.$searchBarKb.findKeyCommand(T,w);E&&E.exec&&(E.exec(y),x.stopEvent(R))}),this.$onChange=v.delayedCall(function(){y.find(!1,!1)}),x.addListener(this.searchInput,"input",function(){y.$onChange.schedule(20)}),x.addListener(this.searchInput,"focus",function(){y.activeInput=y.searchInput,y.searchInput.value&&y.highlight()}),x.addListener(this.replaceInput,"focus",function(){y.activeInput=y.replaceInput,y.searchInput.value&&y.highlight()})},h.prototype.setSearchRange=function(m){this.searchRange=m,m?this.searchRangeMarker=this.editor.session.addMarker(m,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},h.prototype.$syncOptions=function(m){b.setCssClass(this.replaceOption,"checked",this.searchRange),b.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",b.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),b.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),b.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var y=this.editor.getReadOnly();this.replaceOption.style.display=y?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!y?"":"none",this.find(!1,!1,m)},h.prototype.highlight=function(m){this.editor.session.highlight(m||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},h.prototype.find=function(m,y,R){if(this.editor.session){var T=this.editor.find(this.searchInput.value,{skipCurrent:m,backwards:y,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:R,range:this.searchRange}),C=!T&&this.searchInput.value;b.setCssClass(this.searchBox,"ace_nomatch",C),this.editor._emit("findSearchBox",{match:!C}),this.highlight(),this.updateCounter()}},h.prototype.updateCounter=function(){var m=this.editor,y=m.$search.$options.re,R=y.unicode,T=0,C=0;if(y){var w=this.searchRange?m.session.getTextRange(this.searchRange):m.getValue();m.$search.$isMultilineSearch(m.getLastSearchOptions())&&(w=w.replace(/\r\n|\r|\n/g,`
|
|
1391
1391
|
`),m.session.doc.$autoNewLine=`
|
|
1392
|
-
`);var E=m.session.doc.positionToIndex(m.selection.anchor);this.searchRange&&(E-=m.session.doc.positionToIndex(this.searchRange.start));for(var D=y.lastIndex=0,I;(I=y.exec(w))&&(T++,D=I.index,D<=E&&C++,!(T>s||!I[0]&&(y.lastIndex=D+=v.skipEmptyMatch(w,D,R),D>=w.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[C,T>s?s+"+":T])},h.prototype.findNext=function(){this.find(!0,!1)},h.prototype.findPrev=function(){this.find(!0,!0)},h.prototype.findAll=function(){var m=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),y=!m&&this.searchInput.value;b.setCssClass(this.searchBox,"ace_nomatch",y),this.editor._emit("findSearchBox",{match:!y}),this.highlight(),this.hide()},h.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},h.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},h.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},h.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},h.prototype.show=function(m,y){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=y,this.editor.$search.$options.regExp&&(m=v.escapeRegExp(m)),m!=null&&(this.searchInput.value=m),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},h.prototype.isFocused=function(){var m=document.activeElement;return m==this.searchInput||m==this.replaceInput},h}(),n=new d;n.bindKeys({"Ctrl-f|Command-f":function(h){var m=h.isReplace=!h.isReplace;h.replaceBox.style.display=m?"":"none",h.replaceOption.checked=!1,h.$syncOptions(),h.searchInput.focus()},"Ctrl-H|Command-Option-F":function(h){h.editor.getReadOnly()||(h.replaceOption.checked=!0,h.$syncOptions(),h.replaceInput.focus())},"Ctrl-G|Command-G":function(h){h.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(h){h.findPrev()},esc:function(h){setTimeout(function(){h.hide()})},Return:function(h){h.activeInput==h.replaceInput&&h.replace(),h.findNext()},"Shift-Return":function(h){h.activeInput==h.replaceInput&&h.replace(),h.findPrev()},"Alt-Return":function(h){h.activeInput==h.replaceInput&&h.replaceAll(),h.findAll()},Tab:function(h){(h.activeInput==h.replaceInput?h.searchInput:h.replaceInput).focus()}}),n.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(h){h.regExpOption.checked=!h.regExpOption.checked,h.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(h){h.caseSensitiveOption.checked=!h.caseSensitiveOption.checked,h.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(h){h.wholeWordOption.checked=!h.wholeWordOption.checked,h.$syncOptions()}},{name:"toggleReplace",exec:function(h){h.replaceOption.checked=!h.replaceOption.checked,h.$syncOptions()}},{name:"searchInSelection",exec:function(h){h.searchOption.checked=!h.searchRange,h.setSearchRange(h.searchOption.checked&&h.editor.getSelectionRange()),h.$syncOptions()}}]);var i=new d([{bindKey:"Esc",name:"closeSearchBar",exec:function(h){h.searchBox.hide()}}]);r.prototype.$searchBarKb=n,r.prototype.$closeSearchBarKb=i,u.SearchBox=r,u.Search=function(h,m){var y=h.searchBox||new r(h),R=h.session.selection.getRange(),T=R.isMultiLine()?"":h.session.getTextRange(R);y.show(T,m)}}),function(){ace.require(["ace/ext/searchbox"],function(e){l&&(l.exports=e)})}()}(yc)),yc.exports}Ex();var Rx=Object.defineProperty,Ix=(l,c,e)=>c in l?Rx(l,c,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[c]=e,Ar=(l,c,e)=>Ix(l,typeof c!="symbol"?c+"":c,e);function jp(l,c){return function(){return l.apply(c,arguments)}}const{toString:Ox}=Object.prototype,{getPrototypeOf:Tu}=Object,{iterator:nl,toStringTag:Kp}=Symbol,il=(l=>c=>{const e=Ox.call(c);return l[e]||(l[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),pr=l=>(l=l.toLowerCase(),c=>il(c)===l),rl=l=>c=>typeof c===l,{isArray:ys}=Array,fs=rl("undefined");function ea(l){return l!==null&&!fs(l)&&l.constructor!==null&&!fs(l.constructor)&&bi(l.constructor.isBuffer)&&l.constructor.isBuffer(l)}const Gp=pr("ArrayBuffer");function Nx(l){let c;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?c=ArrayBuffer.isView(l):c=l&&l.buffer&&Gp(l.buffer),c}const Dx=rl("string"),bi=rl("function"),qp=rl("number"),ta=l=>l!==null&&typeof l=="object",Fx=l=>l===!0||l===!1,Ga=l=>{if(il(l)!=="object")return!1;const c=Tu(l);return(c===null||c===Object.prototype||Object.getPrototypeOf(c)===null)&&!(Kp in l)&&!(nl in l)},Px=l=>{if(!ta(l)||ea(l))return!1;try{return Object.keys(l).length===0&&Object.getPrototypeOf(l)===Object.prototype}catch{return!1}},Wx=pr("Date"),Bx=pr("File"),Hx=pr("Blob"),zx=pr("FileList"),Ux=l=>ta(l)&&bi(l.pipe),Vx=l=>{let c;return l&&(typeof FormData=="function"&&l instanceof FormData||bi(l.append)&&((c=il(l))==="formdata"||c==="object"&&bi(l.toString)&&l.toString()==="[object FormData]"))},jx=pr("URLSearchParams"),[Kx,Gx,qx,Yx]=["ReadableStream","Request","Response","Headers"].map(pr),Zx=l=>l.trim?l.trim():l.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function na(l,c,{allOwnKeys:e=!1}={}){if(l===null||typeof l>"u")return;let u,$;if(typeof l!="object"&&(l=[l]),ys(l))for(u=0,$=l.length;u<$;u++)c.call(null,l[u],u,l);else{if(ea(l))return;const b=e?Object.getOwnPropertyNames(l):Object.keys(l),v=b.length;let x;for(u=0;u<v;u++)x=b[u],c.call(null,l[x],x,l)}}function Yp(l,c){if(ea(l))return null;c=c.toLowerCase();const e=Object.keys(l);let u=e.length,$;for(;u-- >0;)if($=e[u],c===$.toLowerCase())return $;return null}const Ho=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zp=l=>!fs(l)&&l!==Ho;function hu(){const{caseless:l,skipUndefined:c}=Zp(this)&&this||{},e={},u=($,b)=>{const v=l&&Yp(e,b)||b;Ga(e[v])&&Ga($)?e[v]=hu(e[v],$):Ga($)?e[v]=hu({},$):ys($)?e[v]=$.slice():(!c||!fs($))&&(e[v]=$)};for(let $=0,b=arguments.length;$<b;$++)arguments[$]&&na(arguments[$],u);return e}const Qx=(l,c,e,{allOwnKeys:u}={})=>(na(c,($,b)=>{e&&bi($)?l[b]=jp($,e):l[b]=$},{allOwnKeys:u}),l),Jx=l=>(l.charCodeAt(0)===65279&&(l=l.slice(1)),l),Xx=(l,c,e,u)=>{l.prototype=Object.create(c.prototype,u),l.prototype.constructor=l,Object.defineProperty(l,"super",{value:c.prototype}),e&&Object.assign(l.prototype,e)},e1=(l,c,e,u)=>{let $,b,v;const x={};if(c=c||{},l==null)return c;do{for($=Object.getOwnPropertyNames(l),b=$.length;b-- >0;)v=$[b],(!u||u(v,l,c))&&!x[v]&&(c[v]=l[v],x[v]=!0);l=e!==!1&&Tu(l)}while(l&&(!e||e(l,c))&&l!==Object.prototype);return c},t1=(l,c,e)=>{l=String(l),(e===void 0||e>l.length)&&(e=l.length),e-=c.length;const u=l.indexOf(c,e);return u!==-1&&u===e},n1=l=>{if(!l)return null;if(ys(l))return l;let c=l.length;if(!qp(c))return null;const e=new Array(c);for(;c-- >0;)e[c]=l[c];return e},i1=(l=>c=>l&&c instanceof l)(typeof Uint8Array<"u"&&Tu(Uint8Array)),r1=(l,c)=>{const e=(l&&l[nl]).call(l);let u;for(;(u=e.next())&&!u.done;){const $=u.value;c.call(l,$[0],$[1])}},o1=(l,c)=>{let e;const u=[];for(;(e=l.exec(c))!==null;)u.push(e);return u},s1=pr("HTMLFormElement"),a1=l=>l.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(c,e,u){return e.toUpperCase()+u}),Qd=(({hasOwnProperty:l})=>(c,e)=>l.call(c,e))(Object.prototype),l1=pr("RegExp"),Qp=(l,c)=>{const e=Object.getOwnPropertyDescriptors(l),u={};na(e,($,b)=>{let v;(v=c($,b,l))!==!1&&(u[b]=v||$)}),Object.defineProperties(l,u)},c1=l=>{Qp(l,(c,e)=>{if(bi(l)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const u=l[e];if(bi(u)){if(c.enumerable=!1,"writable"in c){c.writable=!1;return}c.set||(c.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},u1=(l,c)=>{const e={},u=$=>{$.forEach(b=>{e[b]=!0})};return ys(l)?u(l):u(String(l).split(c)),e},h1=()=>{},d1=(l,c)=>l!=null&&Number.isFinite(l=+l)?l:c;function f1(l){return!!(l&&bi(l.append)&&l[Kp]==="FormData"&&l[nl])}const p1=l=>{const c=new Array(10),e=(u,$)=>{if(ta(u)){if(c.indexOf(u)>=0)return;if(ea(u))return u;if(!("toJSON"in u)){c[$]=u;const b=ys(u)?[]:{};return na(u,(v,x)=>{const p=e(v,$+1);!fs(p)&&(b[x]=p)}),c[$]=void 0,b}}return u};return e(l,0)},g1=pr("AsyncFunction"),m1=l=>l&&(ta(l)||bi(l))&&bi(l.then)&&bi(l.catch),Jp=((l,c)=>l?setImmediate:c?((e,u)=>(Ho.addEventListener("message",({source:$,data:b})=>{$===Ho&&b===e&&u.length&&u.shift()()},!1),$=>{u.push($),Ho.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",bi(Ho.postMessage)),v1=typeof queueMicrotask<"u"?queueMicrotask.bind(Ho):typeof process<"u"&&process.nextTick||Jp,y1=l=>l!=null&&bi(l[nl]),ke={isArray:ys,isArrayBuffer:Gp,isBuffer:ea,isFormData:Vx,isArrayBufferView:Nx,isString:Dx,isNumber:qp,isBoolean:Fx,isObject:ta,isPlainObject:Ga,isEmptyObject:Px,isReadableStream:Kx,isRequest:Gx,isResponse:qx,isHeaders:Yx,isUndefined:fs,isDate:Wx,isFile:Bx,isBlob:Hx,isRegExp:l1,isFunction:bi,isStream:Ux,isURLSearchParams:jx,isTypedArray:i1,isFileList:zx,forEach:na,merge:hu,extend:Qx,trim:Zx,stripBOM:Jx,inherits:Xx,toFlatObject:e1,kindOf:il,kindOfTest:pr,endsWith:t1,toArray:n1,forEachEntry:r1,matchAll:o1,isHTMLForm:s1,hasOwnProperty:Qd,hasOwnProp:Qd,reduceDescriptors:Qp,freezeMethods:c1,toObjectSet:u1,toCamelCase:a1,noop:h1,toFiniteNumber:d1,findKey:Yp,global:Ho,isContextDefined:Zp,isSpecCompliantForm:f1,toJSONObject:p1,isAsyncFn:g1,isThenable:m1,setImmediate:Jp,asap:v1,isIterable:y1};function mt(l,c,e,u,$){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=l,this.name="AxiosError",c&&(this.code=c),e&&(this.config=e),u&&(this.request=u),$&&(this.response=$,this.status=$.status?$.status:null)}ke.inherits(mt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ke.toJSONObject(this.config),code:this.code,status:this.status}}});const Xp=mt.prototype,eg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(l=>{eg[l]={value:l}});Object.defineProperties(mt,eg);Object.defineProperty(Xp,"isAxiosError",{value:!0});mt.from=(l,c,e,u,$,b)=>{const v=Object.create(Xp);ke.toFlatObject(l,v,function(d){return d!==Error.prototype},d=>d!=="isAxiosError");const x=l&&l.message?l.message:"Error",p=c==null&&l?l.code:c;return mt.call(v,x,p,e,u,$),l&&v.cause==null&&Object.defineProperty(v,"cause",{value:l,configurable:!0}),v.name=l&&l.name||"Error",b&&Object.assign(v,b),v};const w1=null;function du(l){return ke.isPlainObject(l)||ke.isArray(l)}function tg(l){return ke.endsWith(l,"[]")?l.slice(0,-2):l}function Jd(l,c,e){return l?l.concat(c).map(function(u,$){return u=tg(u),!e&&$?"["+u+"]":u}).join(e?".":""):c}function b1(l){return ke.isArray(l)&&!l.some(du)}const x1=ke.toFlatObject(ke,{},null,function(l){return/^is[A-Z]/.test(l)});function ol(l,c,e){if(!ke.isObject(l))throw new TypeError("target must be an object");c=c||new FormData,e=ke.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(r,n){return!ke.isUndefined(n[r])});const u=e.metaTokens,$=e.visitor||d,b=e.dots,v=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&ke.isSpecCompliantForm(c);if(!ke.isFunction($))throw new TypeError("visitor must be a function");function p(r){if(r===null)return"";if(ke.isDate(r))return r.toISOString();if(ke.isBoolean(r))return r.toString();if(!x&&ke.isBlob(r))throw new mt("Blob is not supported. Use a Buffer instead.");return ke.isArrayBuffer(r)||ke.isTypedArray(r)?x&&typeof Blob=="function"?new Blob([r]):Buffer.from(r):r}function d(r,n,i){let h=r;if(r&&!i&&typeof r=="object"){if(ke.endsWith(n,"{}"))n=u?n:n.slice(0,-2),r=JSON.stringify(r);else if(ke.isArray(r)&&b1(r)||(ke.isFileList(r)||ke.endsWith(n,"[]"))&&(h=ke.toArray(r)))return n=tg(n),h.forEach(function(m,y){!(ke.isUndefined(m)||m===null)&&c.append(v===!0?Jd([n],y,b):v===null?n:n+"[]",p(m))}),!1}return du(r)?!0:(c.append(Jd(i,n,b),p(r)),!1)}const o=[],a=Object.assign(x1,{defaultVisitor:d,convertValue:p,isVisitable:du});function s(r,n){if(!ke.isUndefined(r)){if(o.indexOf(r)!==-1)throw Error("Circular reference detected in "+n.join("."));o.push(r),ke.forEach(r,function(i,h){(!(ke.isUndefined(i)||i===null)&&$.call(c,i,ke.isString(h)?h.trim():h,n,a))===!0&&s(i,n?n.concat(h):[h])}),o.pop()}}if(!ke.isObject(l))throw new TypeError("data must be an object");return s(l),c}function Xd(l){const c={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(l).replace(/[!'()~]|%20|%00/g,function(e){return c[e]})}function Lu(l,c){this._pairs=[],l&&ol(l,this,c)}const ng=Lu.prototype;ng.append=function(l,c){this._pairs.push([l,c])};ng.toString=function(l){const c=l?function(e){return l.call(this,e,Xd)}:Xd;return this._pairs.map(function(e){return c(e[0])+"="+c(e[1])},"").join("&")};function S1(l){return encodeURIComponent(l).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ig(l,c,e){if(!c)return l;const u=e&&e.encode||S1;ke.isFunction(e)&&(e={serialize:e});const $=e&&e.serialize;let b;if($?b=$(c,e):b=ke.isURLSearchParams(c)?c.toString():new Lu(c,e).toString(u),b){const v=l.indexOf("#");v!==-1&&(l=l.slice(0,v)),l+=(l.indexOf("?")===-1?"?":"&")+b}return l}class ef{constructor(){this.handlers=[]}use(c,e,u){return this.handlers.push({fulfilled:c,rejected:e,synchronous:u?u.synchronous:!1,runWhen:u?u.runWhen:null}),this.handlers.length-1}eject(c){this.handlers[c]&&(this.handlers[c]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(c){ke.forEach(this.handlers,function(e){e!==null&&c(e)})}}const rg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},k1=typeof URLSearchParams<"u"?URLSearchParams:Lu,C1=typeof FormData<"u"?FormData:null,_1=typeof Blob<"u"?Blob:null,A1={isBrowser:!0,classes:{URLSearchParams:k1,FormData:C1,Blob:_1},protocols:["http","https","file","blob","url","data"]},Eu=typeof window<"u"&&typeof document<"u",fu=typeof navigator=="object"&&navigator||void 0,$1=Eu&&(!fu||["ReactNative","NativeScript","NS"].indexOf(fu.product)<0),M1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",T1=Eu&&window.location.href||"http://localhost",L1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Eu,hasStandardBrowserEnv:$1,hasStandardBrowserWebWorkerEnv:M1,navigator:fu,origin:T1},Symbol.toStringTag,{value:"Module"})),ni={...L1,...A1};function E1(l,c){return ol(l,new ni.classes.URLSearchParams,{visitor:function(e,u,$,b){return ni.isNode&&ke.isBuffer(e)?(this.append(u,e.toString("base64")),!1):b.defaultVisitor.apply(this,arguments)},...c})}function R1(l){return ke.matchAll(/\w+|\[(\w*)]/g,l).map(c=>c[0]==="[]"?"":c[1]||c[0])}function I1(l){const c={},e=Object.keys(l);let u;const $=e.length;let b;for(u=0;u<$;u++)b=e[u],c[b]=l[b];return c}function og(l){function c(e,u,$,b){let v=e[b++];if(v==="__proto__")return!0;const x=Number.isFinite(+v),p=b>=e.length;return v=!v&&ke.isArray($)?$.length:v,p?(ke.hasOwnProp($,v)?$[v]=[$[v],u]:$[v]=u,!x):((!$[v]||!ke.isObject($[v]))&&($[v]=[]),c(e,u,$[v],b)&&ke.isArray($[v])&&($[v]=I1($[v])),!x)}if(ke.isFormData(l)&&ke.isFunction(l.entries)){const e={};return ke.forEachEntry(l,(u,$)=>{c(R1(u),$,e,0)}),e}return null}function O1(l,c,e){if(ke.isString(l))try{return(c||JSON.parse)(l),ke.trim(l)}catch(u){if(u.name!=="SyntaxError")throw u}return(e||JSON.stringify)(l)}const ia={transitional:rg,adapter:["xhr","http","fetch"],transformRequest:[function(l,c){const e=c.getContentType()||"",u=e.indexOf("application/json")>-1,$=ke.isObject(l);if($&&ke.isHTMLForm(l)&&(l=new FormData(l)),ke.isFormData(l))return u?JSON.stringify(og(l)):l;if(ke.isArrayBuffer(l)||ke.isBuffer(l)||ke.isStream(l)||ke.isFile(l)||ke.isBlob(l)||ke.isReadableStream(l))return l;if(ke.isArrayBufferView(l))return l.buffer;if(ke.isURLSearchParams(l))return c.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),l.toString();let b;if($){if(e.indexOf("application/x-www-form-urlencoded")>-1)return E1(l,this.formSerializer).toString();if((b=ke.isFileList(l))||e.indexOf("multipart/form-data")>-1){const v=this.env&&this.env.FormData;return ol(b?{"files[]":l}:l,v&&new v,this.formSerializer)}}return $||u?(c.setContentType("application/json",!1),O1(l)):l}],transformResponse:[function(l){const c=this.transitional||ia.transitional,e=c&&c.forcedJSONParsing,u=this.responseType==="json";if(ke.isResponse(l)||ke.isReadableStream(l))return l;if(l&&ke.isString(l)&&(e&&!this.responseType||u)){const $=!(c&&c.silentJSONParsing)&&u;try{return JSON.parse(l,this.parseReviver)}catch(b){if($)throw b.name==="SyntaxError"?mt.from(b,mt.ERR_BAD_RESPONSE,this,null,this.response):b}}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ni.classes.FormData,Blob:ni.classes.Blob},validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ke.forEach(["delete","get","head","post","put","patch"],l=>{ia.headers[l]={}});const N1=ke.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),D1=l=>{const c={};let e,u,$;return l&&l.split(`
|
|
1393
|
-
`).forEach(function(b){$=b.indexOf(":"),e=b.substring(0,$).trim().toLowerCase(),u=b.substring($+1).trim(),!(!e||c[e]&&N1[e])&&(e==="set-cookie"?c[e]?c[e].push(u):c[e]=[u]:c[e]=c[e]?c[e]+", "+u:u)}),c},tf=Symbol("internals");function zs(l){return l&&String(l).trim().toLowerCase()}function qa(l){return l===!1||l==null?l:ke.isArray(l)?l.map(qa):String(l)}function F1(l){const c=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let u;for(;u=e.exec(l);)c[u[1]]=u[2];return c}const P1=l=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(l.trim());function wc(l,c,e,u,$){if(ke.isFunction(u))return u.call(this,c,e);if($&&(c=e),!!ke.isString(c)){if(ke.isString(u))return c.indexOf(u)!==-1;if(ke.isRegExp(u))return u.test(c)}}function
|
|
1394
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(l){return l instanceof this?l:new this(l)}static concat(l,...c){const e=new this(l);return c.forEach(u=>e.set(u)),e}static accessor(l){const c=(this[tf]=this[tf]={accessors:{}}).accessors,e=this.prototype;function u($){const b=zs($);c[b]||(B1(e,$),c[b]=!0)}return ke.isArray(l)?l.forEach(u):u(l),this}};xi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ke.reduceDescriptors(xi.prototype,({value:l},c)=>{let e=c[0].toUpperCase()+c.slice(1);return{get:()=>l,set(u){this[e]=u}}});ke.freezeMethods(xi);function bc(l,c){const e=this||ia,u=c||e,$=xi.from(u.headers);let b=u.data;return ke.forEach(l,function(v){b=v.call(e,b,$.normalize(),c?c.status:void 0)}),$.normalize(),b}function sg(l){return!!(l&&l.__CANCEL__)}function ws(l,c,e){mt.call(this,l??"canceled",mt.ERR_CANCELED,c,e),this.name="CanceledError"}ke.inherits(ws,mt,{__CANCEL__:!0});function ag(l,c,e){const u=e.config.validateStatus;!e.status||!u||u(e.status)?l(e):c(new mt("Request failed with status code "+e.status,[mt.ERR_BAD_REQUEST,mt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function H1(l){const c=/^([-+\w]{1,25})(:?\/\/|:)/.exec(l);return c&&c[1]||""}function z1(l,c){l=l||10;const e=new Array(l),u=new Array(l);let $=0,b=0,v;return c=c!==void 0?c:1e3,function(x){const p=Date.now(),d=u[b];v||(v=p),e[$]=x,u[$]=p;let o=b,a=0;for(;o!==$;)a+=e[o++],o=o%l;if($=($+1)%l,$===b&&(b=(b+1)%l),p-v<c)return;const s=d&&p-d;return s?Math.round(a*1e3/s):void 0}}function U1(l,c){let e=0,u=1e3/c,$,b;const v=(x,p=Date.now())=>{e=p,$=null,b&&(clearTimeout(b),b=null),l(...x)};return[(...x)=>{const p=Date.now(),d=p-e;d>=u?v(x,p):($=x,b||(b=setTimeout(()=>{b=null,v($)},u-d)))},()=>$&&v($)]}const Qa=(l,c,e=3)=>{let u=0;const $=z1(50,250);return U1(b=>{const v=b.loaded,x=b.lengthComputable?b.total:void 0,p=v-u,d=$(p),o=v<=x;u=v;const a={loaded:v,total:x,progress:x?v/x:void 0,bytes:p,rate:d||void 0,estimated:d&&x&&o?(x-v)/d:void 0,event:b,lengthComputable:x!=null,[c?"download":"upload"]:!0};l(a)},e)},nf=(l,c)=>{const e=l!=null;return[u=>c[0]({lengthComputable:e,total:l,loaded:u}),c[1]]},rf=l=>(...c)=>ke.asap(()=>l(...c)),V1=ni.hasStandardBrowserEnv?((l,c)=>e=>(e=new URL(e,ni.origin),l.protocol===e.protocol&&l.host===e.host&&(c||l.port===e.port)))(new URL(ni.origin),ni.navigator&&/(msie|trident)/i.test(ni.navigator.userAgent)):()=>!0,j1=ni.hasStandardBrowserEnv?{write(l,c,e,u,$,b,v){if(typeof document>"u")return;const x=[`${l}=${encodeURIComponent(c)}`];ke.isNumber(e)&&x.push(`expires=${new Date(e).toUTCString()}`),ke.isString(u)&&x.push(`path=${u}`),ke.isString($)&&x.push(`domain=${$}`),b===!0&&x.push("secure"),ke.isString(v)&&x.push(`SameSite=${v}`),document.cookie=x.join("; ")},read(l){if(typeof document>"u")return null;const c=document.cookie.match(new RegExp("(?:^|; )"+l+"=([^;]*)"));return c?decodeURIComponent(c[1]):null},remove(l){this.write(l,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function K1(l){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(l)}function G1(l,c){return c?l.replace(/\/?\/$/,"")+"/"+c.replace(/^\/+/,""):l}function lg(l,c,e){let u=!K1(c);return l&&(u||e==!1)?G1(l,c):c}const of=l=>l instanceof xi?{...l}:l;function Vo(l,c){c=c||{};const e={};function u(d,o,a,s){return ke.isPlainObject(d)&&ke.isPlainObject(o)?ke.merge.call({caseless:s},d,o):ke.isPlainObject(o)?ke.merge({},o):ke.isArray(o)?o.slice():o}function $(d,o,a,s){if(ke.isUndefined(o)){if(!ke.isUndefined(d))return u(void 0,d,a,s)}else return u(d,o,a,s)}function b(d,o){if(!ke.isUndefined(o))return u(void 0,o)}function v(d,o){if(ke.isUndefined(o)){if(!ke.isUndefined(d))return u(void 0,d)}else return u(void 0,o)}function x(d,o,a){if(a in c)return u(d,o);if(a in l)return u(void 0,d)}const p={url:b,method:b,data:b,baseURL:v,transformRequest:v,transformResponse:v,paramsSerializer:v,timeout:v,timeoutMessage:v,withCredentials:v,withXSRFToken:v,adapter:v,responseType:v,xsrfCookieName:v,xsrfHeaderName:v,onUploadProgress:v,onDownloadProgress:v,decompress:v,maxContentLength:v,maxBodyLength:v,beforeRedirect:v,transport:v,httpAgent:v,httpsAgent:v,cancelToken:v,socketPath:v,responseEncoding:v,validateStatus:x,headers:(d,o,a)=>$(of(d),of(o),a,!0)};return ke.forEach(Object.keys({...l,...c}),function(d){const o=p[d]||$,a=o(l[d],c[d],d);ke.isUndefined(a)&&o!==x||(e[d]=a)}),e}const cg=l=>{const c=Vo({},l);let{data:e,withXSRFToken:u,xsrfHeaderName:$,xsrfCookieName:b,headers:v,auth:x}=c;if(c.headers=v=xi.from(v),c.url=ig(lg(c.baseURL,c.url,c.allowAbsoluteUrls),l.params,l.paramsSerializer),x&&v.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):""))),ke.isFormData(e)){if(ni.hasStandardBrowserEnv||ni.hasStandardBrowserWebWorkerEnv)v.setContentType(void 0);else if(ke.isFunction(e.getHeaders)){const p=e.getHeaders(),d=["content-type","content-length"];Object.entries(p).forEach(([o,a])=>{d.includes(o.toLowerCase())&&v.set(o,a)})}}if(ni.hasStandardBrowserEnv&&(u&&ke.isFunction(u)&&(u=u(c)),u||u!==!1&&V1(c.url))){const p=$&&b&&j1.read(b);p&&v.set($,p)}return c},q1=typeof XMLHttpRequest<"u",Y1=q1&&function(l){return new Promise(function(c,e){const u=cg(l);let $=u.data;const b=xi.from(u.headers).normalize();let{responseType:v,onUploadProgress:x,onDownloadProgress:p}=u,d,o,a,s,r;function n(){s&&s(),r&&r(),u.cancelToken&&u.cancelToken.unsubscribe(d),u.signal&&u.signal.removeEventListener("abort",d)}let i=new XMLHttpRequest;i.open(u.method.toUpperCase(),u.url,!0),i.timeout=u.timeout;function h(){if(!i)return;const y=xi.from("getAllResponseHeaders"in i&&i.getAllResponseHeaders()),R={data:!v||v==="text"||v==="json"?i.responseText:i.response,status:i.status,statusText:i.statusText,headers:y,config:l,request:i};ag(function(T){c(T),n()},function(T){e(T),n()},R),i=null}"onloadend"in i?i.onloadend=h:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(h)},i.onabort=function(){i&&(e(new mt("Request aborted",mt.ECONNABORTED,l,i)),i=null)},i.onerror=function(y){const R=y&&y.message?y.message:"Network Error",T=new mt(R,mt.ERR_NETWORK,l,i);T.event=y||null,e(T),i=null},i.ontimeout=function(){let y=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded";const R=u.transitional||rg;u.timeoutErrorMessage&&(y=u.timeoutErrorMessage),e(new mt(y,R.clarifyTimeoutError?mt.ETIMEDOUT:mt.ECONNABORTED,l,i)),i=null},$===void 0&&b.setContentType(null),"setRequestHeader"in i&&ke.forEach(b.toJSON(),function(y,R){i.setRequestHeader(R,y)}),ke.isUndefined(u.withCredentials)||(i.withCredentials=!!u.withCredentials),v&&v!=="json"&&(i.responseType=u.responseType),p&&([a,r]=Qa(p,!0),i.addEventListener("progress",a)),x&&i.upload&&([o,s]=Qa(x),i.upload.addEventListener("progress",o),i.upload.addEventListener("loadend",s)),(u.cancelToken||u.signal)&&(d=y=>{i&&(e(!y||y.type?new ws(null,l,i):y),i.abort(),i=null)},u.cancelToken&&u.cancelToken.subscribe(d),u.signal&&(u.signal.aborted?d():u.signal.addEventListener("abort",d)));const m=H1(u.url);if(m&&ni.protocols.indexOf(m)===-1){e(new mt("Unsupported protocol "+m+":",mt.ERR_BAD_REQUEST,l));return}i.send($||null)})},Z1=(l,c)=>{const{length:e}=l=l?l.filter(Boolean):[];if(c||e){let u=new AbortController,$;const b=function(d){if(!$){$=!0,x();const o=d instanceof Error?d:this.reason;u.abort(o instanceof mt?o:new ws(o instanceof Error?o.message:o))}};let v=c&&setTimeout(()=>{v=null,b(new mt(`timeout ${c} of ms exceeded`,mt.ETIMEDOUT))},c);const x=()=>{l&&(v&&clearTimeout(v),v=null,l.forEach(d=>{d.unsubscribe?d.unsubscribe(b):d.removeEventListener("abort",b)}),l=null)};l.forEach(d=>d.addEventListener("abort",b));const{signal:p}=u;return p.unsubscribe=()=>ke.asap(x),p}},Q1=function*(l,c){let e=l.byteLength;if(e<c){yield l;return}let u=0,$;for(;u<e;)$=u+c,yield l.slice(u,$),u=$},J1=async function*(l,c){for await(const e of X1(l))yield*Q1(e,c)},X1=async function*(l){if(l[Symbol.asyncIterator]){yield*l;return}const c=l.getReader();try{for(;;){const{done:e,value:u}=await c.read();if(e)break;yield u}}finally{await c.cancel()}},sf=(l,c,e,u)=>{const $=J1(l,c);let b=0,v,x=p=>{v||(v=!0,u&&u(p))};return new ReadableStream({async pull(p){try{const{done:d,value:o}=await $.next();if(d){x(),p.close();return}let a=o.byteLength;if(e){let s=b+=a;e(s)}p.enqueue(new Uint8Array(o))}catch(d){throw x(d),d}},cancel(p){return x(p),$.return()}},{highWaterMark:2})},af=64*1024,{isFunction:Ba}=ke,eS=(({Request:l,Response:c})=>({Request:l,Response:c}))(ke.global),{ReadableStream:lf,TextEncoder:cf}=ke.global,uf=(l,...c)=>{try{return!!l(...c)}catch{return!1}},tS=l=>{l=ke.merge.call({skipUndefined:!0},eS,l);const{fetch:c,Request:e,Response:u}=l,$=c?Ba(c):typeof fetch=="function",b=Ba(e),v=Ba(u);if(!$)return!1;const x=$&&Ba(lf),p=$&&(typeof cf=="function"?(n=>i=>n.encode(i))(new cf):async n=>new Uint8Array(await new e(n).arrayBuffer())),d=b&&x&&uf(()=>{let n=!1;const i=new e(ni.origin,{body:new lf,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!i}),o=v&&x&&uf(()=>ke.isReadableStream(new u("").body)),a={stream:o&&(n=>n.body)};$&&["text","arrayBuffer","blob","formData","stream"].forEach(n=>{!a[n]&&(a[n]=(i,h)=>{let m=i&&i[n];if(m)return m.call(i);throw new mt(`Response type '${n}' is not supported`,mt.ERR_NOT_SUPPORT,h)})});const s=async n=>{if(n==null)return 0;if(ke.isBlob(n))return n.size;if(ke.isSpecCompliantForm(n))return(await new e(ni.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(ke.isArrayBufferView(n)||ke.isArrayBuffer(n))return n.byteLength;if(ke.isURLSearchParams(n)&&(n=n+""),ke.isString(n))return(await p(n)).byteLength},r=async(n,i)=>ke.toFiniteNumber(n.getContentLength())??s(i);return async n=>{let{url:i,method:h,data:m,signal:y,cancelToken:R,timeout:T,onDownloadProgress:C,onUploadProgress:w,responseType:E,headers:D,withCredentials:I="same-origin",fetchOptions:L}=cg(n),z=c||fetch;E=E?(E+"").toLowerCase():"text";let F=Z1([y,R&&R.toAbortSignal()],T),O=null;const A=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let S;try{if(w&&d&&h!=="get"&&h!=="head"&&(S=await r(D,m))!==0){let ee=new e(i,{method:"POST",body:m,duplex:"half"}),ce;if(ke.isFormData(m)&&(ce=ee.headers.get("content-type"))&&D.setContentType(ce),ee.body){const[ne,he]=nf(S,Qa(rf(w)));m=sf(ee.body,af,ne,he)}}ke.isString(I)||(I=I?"include":"omit");const N=b&&"credentials"in e.prototype,B={...L,signal:F,method:h.toUpperCase(),headers:D.normalize().toJSON(),body:m,duplex:"half",credentials:N?I:void 0};O=b&&new e(i,B);let V=await(b?z(O,L):z(i,B));const G=o&&(E==="stream"||E==="response");if(o&&(C||G&&A)){const ee={};["status","statusText","headers"].forEach(ue=>{ee[ue]=V[ue]});const ce=ke.toFiniteNumber(V.headers.get("content-length")),[ne,he]=C&&nf(ce,Qa(rf(C),!0))||[];V=new u(sf(V.body,af,ne,()=>{he&&he(),A&&A()}),ee)}E=E||"text";let Z=await a[ke.findKey(a,E)||"text"](V,n);return!G&&A&&A(),await new Promise((ee,ce)=>{ag(ee,ce,{data:Z,headers:xi.from(V.headers),status:V.status,statusText:V.statusText,config:n,request:O})})}catch(N){throw A&&A(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new mt("Network Error",mt.ERR_NETWORK,n,O),{cause:N.cause||N}):mt.from(N,N&&N.code,n,O)}}},nS=new Map,ug=l=>{let c=l&&l.env||{};const{fetch:e,Request:u,Response:$}=c,b=[u,$,e];let v=b.length,x=v,p,d,o=nS;for(;x--;)p=b[x],d=o.get(p),d===void 0&&o.set(p,d=x?new Map:tS(c)),o=d;return d};ug();const Ru={http:w1,xhr:Y1,fetch:{get:ug}};ke.forEach(Ru,(l,c)=>{if(l){try{Object.defineProperty(l,"name",{value:c})}catch{}Object.defineProperty(l,"adapterName",{value:c})}});const hf=l=>`- ${l}`,iS=l=>ke.isFunction(l)||l===null||l===!1;function rS(l,c){l=ke.isArray(l)?l:[l];const{length:e}=l;let u,$;const b={};for(let v=0;v<e;v++){u=l[v];let x;if($=u,!iS(u)&&($=Ru[(x=String(u)).toLowerCase()],$===void 0))throw new mt(`Unknown adapter '${x}'`);if($&&(ke.isFunction($)||($=$.get(c))))break;b[x||"#"+v]=$}if(!$){const v=Object.entries(b).map(([p,d])=>`adapter ${p} `+(d===!1?"is not supported by the environment":"is not available in the build"));let x=e?v.length>1?`since :
|
|
1392
|
+
`);var E=m.session.doc.positionToIndex(m.selection.anchor);this.searchRange&&(E-=m.session.doc.positionToIndex(this.searchRange.start));for(var D=y.lastIndex=0,I;(I=y.exec(w))&&(T++,D=I.index,D<=E&&C++,!(T>s||!I[0]&&(y.lastIndex=D+=v.skipEmptyMatch(w,D,R),D>=w.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[C,T>s?s+"+":T])},h.prototype.findNext=function(){this.find(!0,!1)},h.prototype.findPrev=function(){this.find(!0,!0)},h.prototype.findAll=function(){var m=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),y=!m&&this.searchInput.value;b.setCssClass(this.searchBox,"ace_nomatch",y),this.editor._emit("findSearchBox",{match:!y}),this.highlight(),this.hide()},h.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},h.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},h.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},h.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},h.prototype.show=function(m,y){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=y,this.editor.$search.$options.regExp&&(m=v.escapeRegExp(m)),m!=null&&(this.searchInput.value=m),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},h.prototype.isFocused=function(){var m=document.activeElement;return m==this.searchInput||m==this.replaceInput},h}(),n=new d;n.bindKeys({"Ctrl-f|Command-f":function(h){var m=h.isReplace=!h.isReplace;h.replaceBox.style.display=m?"":"none",h.replaceOption.checked=!1,h.$syncOptions(),h.searchInput.focus()},"Ctrl-H|Command-Option-F":function(h){h.editor.getReadOnly()||(h.replaceOption.checked=!0,h.$syncOptions(),h.replaceInput.focus())},"Ctrl-G|Command-G":function(h){h.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(h){h.findPrev()},esc:function(h){setTimeout(function(){h.hide()})},Return:function(h){h.activeInput==h.replaceInput&&h.replace(),h.findNext()},"Shift-Return":function(h){h.activeInput==h.replaceInput&&h.replace(),h.findPrev()},"Alt-Return":function(h){h.activeInput==h.replaceInput&&h.replaceAll(),h.findAll()},Tab:function(h){(h.activeInput==h.replaceInput?h.searchInput:h.replaceInput).focus()}}),n.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(h){h.regExpOption.checked=!h.regExpOption.checked,h.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(h){h.caseSensitiveOption.checked=!h.caseSensitiveOption.checked,h.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(h){h.wholeWordOption.checked=!h.wholeWordOption.checked,h.$syncOptions()}},{name:"toggleReplace",exec:function(h){h.replaceOption.checked=!h.replaceOption.checked,h.$syncOptions()}},{name:"searchInSelection",exec:function(h){h.searchOption.checked=!h.searchRange,h.setSearchRange(h.searchOption.checked&&h.editor.getSelectionRange()),h.$syncOptions()}}]);var i=new d([{bindKey:"Esc",name:"closeSearchBar",exec:function(h){h.searchBox.hide()}}]);r.prototype.$searchBarKb=n,r.prototype.$closeSearchBarKb=i,u.SearchBox=r,u.Search=function(h,m){var y=h.searchBox||new r(h),R=h.session.selection.getRange(),T=R.isMultiLine()?"":h.session.getTextRange(R);y.show(T,m)}}),function(){ace.require(["ace/ext/searchbox"],function(e){l&&(l.exports=e)})}()}(yc)),yc.exports}Ex();var Rx=Object.defineProperty,Ix=(l,c,e)=>c in l?Rx(l,c,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[c]=e,Ar=(l,c,e)=>Ix(l,typeof c!="symbol"?c+"":c,e);function jp(l,c){return function(){return l.apply(c,arguments)}}const{toString:Ox}=Object.prototype,{getPrototypeOf:Tu}=Object,{iterator:nl,toStringTag:Kp}=Symbol,il=(l=>c=>{const e=Ox.call(c);return l[e]||(l[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),pr=l=>(l=l.toLowerCase(),c=>il(c)===l),rl=l=>c=>typeof c===l,{isArray:ys}=Array,fs=rl("undefined");function ea(l){return l!==null&&!fs(l)&&l.constructor!==null&&!fs(l.constructor)&&bi(l.constructor.isBuffer)&&l.constructor.isBuffer(l)}const Gp=pr("ArrayBuffer");function Nx(l){let c;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?c=ArrayBuffer.isView(l):c=l&&l.buffer&&Gp(l.buffer),c}const Dx=rl("string"),bi=rl("function"),qp=rl("number"),ta=l=>l!==null&&typeof l=="object",Fx=l=>l===!0||l===!1,Ga=l=>{if(il(l)!=="object")return!1;const c=Tu(l);return(c===null||c===Object.prototype||Object.getPrototypeOf(c)===null)&&!(Kp in l)&&!(nl in l)},Px=l=>{if(!ta(l)||ea(l))return!1;try{return Object.keys(l).length===0&&Object.getPrototypeOf(l)===Object.prototype}catch{return!1}},Bx=pr("Date"),Wx=pr("File"),Hx=pr("Blob"),zx=pr("FileList"),Ux=l=>ta(l)&&bi(l.pipe),Vx=l=>{let c;return l&&(typeof FormData=="function"&&l instanceof FormData||bi(l.append)&&((c=il(l))==="formdata"||c==="object"&&bi(l.toString)&&l.toString()==="[object FormData]"))},jx=pr("URLSearchParams"),[Kx,Gx,qx,Yx]=["ReadableStream","Request","Response","Headers"].map(pr),Zx=l=>l.trim?l.trim():l.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function na(l,c,{allOwnKeys:e=!1}={}){if(l===null||typeof l>"u")return;let u,$;if(typeof l!="object"&&(l=[l]),ys(l))for(u=0,$=l.length;u<$;u++)c.call(null,l[u],u,l);else{if(ea(l))return;const b=e?Object.getOwnPropertyNames(l):Object.keys(l),v=b.length;let x;for(u=0;u<v;u++)x=b[u],c.call(null,l[x],x,l)}}function Yp(l,c){if(ea(l))return null;c=c.toLowerCase();const e=Object.keys(l);let u=e.length,$;for(;u-- >0;)if($=e[u],c===$.toLowerCase())return $;return null}const Ho=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zp=l=>!fs(l)&&l!==Ho;function hu(){const{caseless:l,skipUndefined:c}=Zp(this)&&this||{},e={},u=($,b)=>{const v=l&&Yp(e,b)||b;Ga(e[v])&&Ga($)?e[v]=hu(e[v],$):Ga($)?e[v]=hu({},$):ys($)?e[v]=$.slice():(!c||!fs($))&&(e[v]=$)};for(let $=0,b=arguments.length;$<b;$++)arguments[$]&&na(arguments[$],u);return e}const Qx=(l,c,e,{allOwnKeys:u}={})=>(na(c,($,b)=>{e&&bi($)?l[b]=jp($,e):l[b]=$},{allOwnKeys:u}),l),Jx=l=>(l.charCodeAt(0)===65279&&(l=l.slice(1)),l),Xx=(l,c,e,u)=>{l.prototype=Object.create(c.prototype,u),l.prototype.constructor=l,Object.defineProperty(l,"super",{value:c.prototype}),e&&Object.assign(l.prototype,e)},e1=(l,c,e,u)=>{let $,b,v;const x={};if(c=c||{},l==null)return c;do{for($=Object.getOwnPropertyNames(l),b=$.length;b-- >0;)v=$[b],(!u||u(v,l,c))&&!x[v]&&(c[v]=l[v],x[v]=!0);l=e!==!1&&Tu(l)}while(l&&(!e||e(l,c))&&l!==Object.prototype);return c},t1=(l,c,e)=>{l=String(l),(e===void 0||e>l.length)&&(e=l.length),e-=c.length;const u=l.indexOf(c,e);return u!==-1&&u===e},n1=l=>{if(!l)return null;if(ys(l))return l;let c=l.length;if(!qp(c))return null;const e=new Array(c);for(;c-- >0;)e[c]=l[c];return e},i1=(l=>c=>l&&c instanceof l)(typeof Uint8Array<"u"&&Tu(Uint8Array)),r1=(l,c)=>{const e=(l&&l[nl]).call(l);let u;for(;(u=e.next())&&!u.done;){const $=u.value;c.call(l,$[0],$[1])}},o1=(l,c)=>{let e;const u=[];for(;(e=l.exec(c))!==null;)u.push(e);return u},s1=pr("HTMLFormElement"),a1=l=>l.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(c,e,u){return e.toUpperCase()+u}),Qd=(({hasOwnProperty:l})=>(c,e)=>l.call(c,e))(Object.prototype),l1=pr("RegExp"),Qp=(l,c)=>{const e=Object.getOwnPropertyDescriptors(l),u={};na(e,($,b)=>{let v;(v=c($,b,l))!==!1&&(u[b]=v||$)}),Object.defineProperties(l,u)},c1=l=>{Qp(l,(c,e)=>{if(bi(l)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const u=l[e];if(bi(u)){if(c.enumerable=!1,"writable"in c){c.writable=!1;return}c.set||(c.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},u1=(l,c)=>{const e={},u=$=>{$.forEach(b=>{e[b]=!0})};return ys(l)?u(l):u(String(l).split(c)),e},h1=()=>{},d1=(l,c)=>l!=null&&Number.isFinite(l=+l)?l:c;function f1(l){return!!(l&&bi(l.append)&&l[Kp]==="FormData"&&l[nl])}const p1=l=>{const c=new Array(10),e=(u,$)=>{if(ta(u)){if(c.indexOf(u)>=0)return;if(ea(u))return u;if(!("toJSON"in u)){c[$]=u;const b=ys(u)?[]:{};return na(u,(v,x)=>{const p=e(v,$+1);!fs(p)&&(b[x]=p)}),c[$]=void 0,b}}return u};return e(l,0)},g1=pr("AsyncFunction"),m1=l=>l&&(ta(l)||bi(l))&&bi(l.then)&&bi(l.catch),Jp=((l,c)=>l?setImmediate:c?((e,u)=>(Ho.addEventListener("message",({source:$,data:b})=>{$===Ho&&b===e&&u.length&&u.shift()()},!1),$=>{u.push($),Ho.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",bi(Ho.postMessage)),v1=typeof queueMicrotask<"u"?queueMicrotask.bind(Ho):typeof process<"u"&&process.nextTick||Jp,y1=l=>l!=null&&bi(l[nl]),ke={isArray:ys,isArrayBuffer:Gp,isBuffer:ea,isFormData:Vx,isArrayBufferView:Nx,isString:Dx,isNumber:qp,isBoolean:Fx,isObject:ta,isPlainObject:Ga,isEmptyObject:Px,isReadableStream:Kx,isRequest:Gx,isResponse:qx,isHeaders:Yx,isUndefined:fs,isDate:Bx,isFile:Wx,isBlob:Hx,isRegExp:l1,isFunction:bi,isStream:Ux,isURLSearchParams:jx,isTypedArray:i1,isFileList:zx,forEach:na,merge:hu,extend:Qx,trim:Zx,stripBOM:Jx,inherits:Xx,toFlatObject:e1,kindOf:il,kindOfTest:pr,endsWith:t1,toArray:n1,forEachEntry:r1,matchAll:o1,isHTMLForm:s1,hasOwnProperty:Qd,hasOwnProp:Qd,reduceDescriptors:Qp,freezeMethods:c1,toObjectSet:u1,toCamelCase:a1,noop:h1,toFiniteNumber:d1,findKey:Yp,global:Ho,isContextDefined:Zp,isSpecCompliantForm:f1,toJSONObject:p1,isAsyncFn:g1,isThenable:m1,setImmediate:Jp,asap:v1,isIterable:y1};function mt(l,c,e,u,$){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=l,this.name="AxiosError",c&&(this.code=c),e&&(this.config=e),u&&(this.request=u),$&&(this.response=$,this.status=$.status?$.status:null)}ke.inherits(mt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ke.toJSONObject(this.config),code:this.code,status:this.status}}});const Xp=mt.prototype,eg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(l=>{eg[l]={value:l}});Object.defineProperties(mt,eg);Object.defineProperty(Xp,"isAxiosError",{value:!0});mt.from=(l,c,e,u,$,b)=>{const v=Object.create(Xp);ke.toFlatObject(l,v,function(d){return d!==Error.prototype},d=>d!=="isAxiosError");const x=l&&l.message?l.message:"Error",p=c==null&&l?l.code:c;return mt.call(v,x,p,e,u,$),l&&v.cause==null&&Object.defineProperty(v,"cause",{value:l,configurable:!0}),v.name=l&&l.name||"Error",b&&Object.assign(v,b),v};const w1=null;function du(l){return ke.isPlainObject(l)||ke.isArray(l)}function tg(l){return ke.endsWith(l,"[]")?l.slice(0,-2):l}function Jd(l,c,e){return l?l.concat(c).map(function(u,$){return u=tg(u),!e&&$?"["+u+"]":u}).join(e?".":""):c}function b1(l){return ke.isArray(l)&&!l.some(du)}const x1=ke.toFlatObject(ke,{},null,function(l){return/^is[A-Z]/.test(l)});function ol(l,c,e){if(!ke.isObject(l))throw new TypeError("target must be an object");c=c||new FormData,e=ke.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(r,n){return!ke.isUndefined(n[r])});const u=e.metaTokens,$=e.visitor||d,b=e.dots,v=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&ke.isSpecCompliantForm(c);if(!ke.isFunction($))throw new TypeError("visitor must be a function");function p(r){if(r===null)return"";if(ke.isDate(r))return r.toISOString();if(ke.isBoolean(r))return r.toString();if(!x&&ke.isBlob(r))throw new mt("Blob is not supported. Use a Buffer instead.");return ke.isArrayBuffer(r)||ke.isTypedArray(r)?x&&typeof Blob=="function"?new Blob([r]):Buffer.from(r):r}function d(r,n,i){let h=r;if(r&&!i&&typeof r=="object"){if(ke.endsWith(n,"{}"))n=u?n:n.slice(0,-2),r=JSON.stringify(r);else if(ke.isArray(r)&&b1(r)||(ke.isFileList(r)||ke.endsWith(n,"[]"))&&(h=ke.toArray(r)))return n=tg(n),h.forEach(function(m,y){!(ke.isUndefined(m)||m===null)&&c.append(v===!0?Jd([n],y,b):v===null?n:n+"[]",p(m))}),!1}return du(r)?!0:(c.append(Jd(i,n,b),p(r)),!1)}const o=[],a=Object.assign(x1,{defaultVisitor:d,convertValue:p,isVisitable:du});function s(r,n){if(!ke.isUndefined(r)){if(o.indexOf(r)!==-1)throw Error("Circular reference detected in "+n.join("."));o.push(r),ke.forEach(r,function(i,h){(!(ke.isUndefined(i)||i===null)&&$.call(c,i,ke.isString(h)?h.trim():h,n,a))===!0&&s(i,n?n.concat(h):[h])}),o.pop()}}if(!ke.isObject(l))throw new TypeError("data must be an object");return s(l),c}function Xd(l){const c={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(l).replace(/[!'()~]|%20|%00/g,function(e){return c[e]})}function Lu(l,c){this._pairs=[],l&&ol(l,this,c)}const ng=Lu.prototype;ng.append=function(l,c){this._pairs.push([l,c])};ng.toString=function(l){const c=l?function(e){return l.call(this,e,Xd)}:Xd;return this._pairs.map(function(e){return c(e[0])+"="+c(e[1])},"").join("&")};function S1(l){return encodeURIComponent(l).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ig(l,c,e){if(!c)return l;const u=e&&e.encode||S1;ke.isFunction(e)&&(e={serialize:e});const $=e&&e.serialize;let b;if($?b=$(c,e):b=ke.isURLSearchParams(c)?c.toString():new Lu(c,e).toString(u),b){const v=l.indexOf("#");v!==-1&&(l=l.slice(0,v)),l+=(l.indexOf("?")===-1?"?":"&")+b}return l}class ef{constructor(){this.handlers=[]}use(c,e,u){return this.handlers.push({fulfilled:c,rejected:e,synchronous:u?u.synchronous:!1,runWhen:u?u.runWhen:null}),this.handlers.length-1}eject(c){this.handlers[c]&&(this.handlers[c]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(c){ke.forEach(this.handlers,function(e){e!==null&&c(e)})}}const rg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},k1=typeof URLSearchParams<"u"?URLSearchParams:Lu,C1=typeof FormData<"u"?FormData:null,_1=typeof Blob<"u"?Blob:null,A1={isBrowser:!0,classes:{URLSearchParams:k1,FormData:C1,Blob:_1},protocols:["http","https","file","blob","url","data"]},Eu=typeof window<"u"&&typeof document<"u",fu=typeof navigator=="object"&&navigator||void 0,$1=Eu&&(!fu||["ReactNative","NativeScript","NS"].indexOf(fu.product)<0),M1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",T1=Eu&&window.location.href||"http://localhost",L1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Eu,hasStandardBrowserEnv:$1,hasStandardBrowserWebWorkerEnv:M1,navigator:fu,origin:T1},Symbol.toStringTag,{value:"Module"})),ni={...L1,...A1};function E1(l,c){return ol(l,new ni.classes.URLSearchParams,{visitor:function(e,u,$,b){return ni.isNode&&ke.isBuffer(e)?(this.append(u,e.toString("base64")),!1):b.defaultVisitor.apply(this,arguments)},...c})}function R1(l){return ke.matchAll(/\w+|\[(\w*)]/g,l).map(c=>c[0]==="[]"?"":c[1]||c[0])}function I1(l){const c={},e=Object.keys(l);let u;const $=e.length;let b;for(u=0;u<$;u++)b=e[u],c[b]=l[b];return c}function og(l){function c(e,u,$,b){let v=e[b++];if(v==="__proto__")return!0;const x=Number.isFinite(+v),p=b>=e.length;return v=!v&&ke.isArray($)?$.length:v,p?(ke.hasOwnProp($,v)?$[v]=[$[v],u]:$[v]=u,!x):((!$[v]||!ke.isObject($[v]))&&($[v]=[]),c(e,u,$[v],b)&&ke.isArray($[v])&&($[v]=I1($[v])),!x)}if(ke.isFormData(l)&&ke.isFunction(l.entries)){const e={};return ke.forEachEntry(l,(u,$)=>{c(R1(u),$,e,0)}),e}return null}function O1(l,c,e){if(ke.isString(l))try{return(c||JSON.parse)(l),ke.trim(l)}catch(u){if(u.name!=="SyntaxError")throw u}return(e||JSON.stringify)(l)}const ia={transitional:rg,adapter:["xhr","http","fetch"],transformRequest:[function(l,c){const e=c.getContentType()||"",u=e.indexOf("application/json")>-1,$=ke.isObject(l);if($&&ke.isHTMLForm(l)&&(l=new FormData(l)),ke.isFormData(l))return u?JSON.stringify(og(l)):l;if(ke.isArrayBuffer(l)||ke.isBuffer(l)||ke.isStream(l)||ke.isFile(l)||ke.isBlob(l)||ke.isReadableStream(l))return l;if(ke.isArrayBufferView(l))return l.buffer;if(ke.isURLSearchParams(l))return c.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),l.toString();let b;if($){if(e.indexOf("application/x-www-form-urlencoded")>-1)return E1(l,this.formSerializer).toString();if((b=ke.isFileList(l))||e.indexOf("multipart/form-data")>-1){const v=this.env&&this.env.FormData;return ol(b?{"files[]":l}:l,v&&new v,this.formSerializer)}}return $||u?(c.setContentType("application/json",!1),O1(l)):l}],transformResponse:[function(l){const c=this.transitional||ia.transitional,e=c&&c.forcedJSONParsing,u=this.responseType==="json";if(ke.isResponse(l)||ke.isReadableStream(l))return l;if(l&&ke.isString(l)&&(e&&!this.responseType||u)){const $=!(c&&c.silentJSONParsing)&&u;try{return JSON.parse(l,this.parseReviver)}catch(b){if($)throw b.name==="SyntaxError"?mt.from(b,mt.ERR_BAD_RESPONSE,this,null,this.response):b}}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ni.classes.FormData,Blob:ni.classes.Blob},validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ke.forEach(["delete","get","head","post","put","patch"],l=>{ia.headers[l]={}});const N1=ke.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),D1=l=>{const c={};let e,u,$;return l&&l.split(`
|
|
1393
|
+
`).forEach(function(b){$=b.indexOf(":"),e=b.substring(0,$).trim().toLowerCase(),u=b.substring($+1).trim(),!(!e||c[e]&&N1[e])&&(e==="set-cookie"?c[e]?c[e].push(u):c[e]=[u]:c[e]=c[e]?c[e]+", "+u:u)}),c},tf=Symbol("internals");function zs(l){return l&&String(l).trim().toLowerCase()}function qa(l){return l===!1||l==null?l:ke.isArray(l)?l.map(qa):String(l)}function F1(l){const c=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let u;for(;u=e.exec(l);)c[u[1]]=u[2];return c}const P1=l=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(l.trim());function wc(l,c,e,u,$){if(ke.isFunction(u))return u.call(this,c,e);if($&&(c=e),!!ke.isString(c)){if(ke.isString(u))return c.indexOf(u)!==-1;if(ke.isRegExp(u))return u.test(c)}}function B1(l){return l.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(c,e,u)=>e.toUpperCase()+u)}function W1(l,c){const e=ke.toCamelCase(" "+c);["get","set","has"].forEach(u=>{Object.defineProperty(l,u+e,{value:function($,b,v){return this[u].call(this,c,$,b,v)},configurable:!0})})}let xi=class{constructor(l){l&&this.set(l)}set(l,c,e){const u=this;function $(v,x,p){const d=zs(x);if(!d)throw new Error("header name must be a non-empty string");const o=ke.findKey(u,d);(!o||u[o]===void 0||p===!0||p===void 0&&u[o]!==!1)&&(u[o||x]=qa(v))}const b=(v,x)=>ke.forEach(v,(p,d)=>$(p,d,x));if(ke.isPlainObject(l)||l instanceof this.constructor)b(l,c);else if(ke.isString(l)&&(l=l.trim())&&!P1(l))b(D1(l),c);else if(ke.isObject(l)&&ke.isIterable(l)){let v={},x,p;for(const d of l){if(!ke.isArray(d))throw TypeError("Object iterator must return a key-value pair");v[p=d[0]]=(x=v[p])?ke.isArray(x)?[...x,d[1]]:[x,d[1]]:d[1]}b(v,c)}else l!=null&&$(c,l,e);return this}get(l,c){if(l=zs(l),l){const e=ke.findKey(this,l);if(e){const u=this[e];if(!c)return u;if(c===!0)return F1(u);if(ke.isFunction(c))return c.call(this,u,e);if(ke.isRegExp(c))return c.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(l,c){if(l=zs(l),l){const e=ke.findKey(this,l);return!!(e&&this[e]!==void 0&&(!c||wc(this,this[e],e,c)))}return!1}delete(l,c){const e=this;let u=!1;function $(b){if(b=zs(b),b){const v=ke.findKey(e,b);v&&(!c||wc(e,e[v],v,c))&&(delete e[v],u=!0)}}return ke.isArray(l)?l.forEach($):$(l),u}clear(l){const c=Object.keys(this);let e=c.length,u=!1;for(;e--;){const $=c[e];(!l||wc(this,this[$],$,l,!0))&&(delete this[$],u=!0)}return u}normalize(l){const c=this,e={};return ke.forEach(this,(u,$)=>{const b=ke.findKey(e,$);if(b){c[b]=qa(u),delete c[$];return}const v=l?B1($):String($).trim();v!==$&&delete c[$],c[v]=qa(u),e[v]=!0}),this}concat(...l){return this.constructor.concat(this,...l)}toJSON(l){const c=Object.create(null);return ke.forEach(this,(e,u)=>{e!=null&&e!==!1&&(c[u]=l&&ke.isArray(e)?e.join(", "):e)}),c}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([l,c])=>l+": "+c).join(`
|
|
1394
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(l){return l instanceof this?l:new this(l)}static concat(l,...c){const e=new this(l);return c.forEach(u=>e.set(u)),e}static accessor(l){const c=(this[tf]=this[tf]={accessors:{}}).accessors,e=this.prototype;function u($){const b=zs($);c[b]||(W1(e,$),c[b]=!0)}return ke.isArray(l)?l.forEach(u):u(l),this}};xi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ke.reduceDescriptors(xi.prototype,({value:l},c)=>{let e=c[0].toUpperCase()+c.slice(1);return{get:()=>l,set(u){this[e]=u}}});ke.freezeMethods(xi);function bc(l,c){const e=this||ia,u=c||e,$=xi.from(u.headers);let b=u.data;return ke.forEach(l,function(v){b=v.call(e,b,$.normalize(),c?c.status:void 0)}),$.normalize(),b}function sg(l){return!!(l&&l.__CANCEL__)}function ws(l,c,e){mt.call(this,l??"canceled",mt.ERR_CANCELED,c,e),this.name="CanceledError"}ke.inherits(ws,mt,{__CANCEL__:!0});function ag(l,c,e){const u=e.config.validateStatus;!e.status||!u||u(e.status)?l(e):c(new mt("Request failed with status code "+e.status,[mt.ERR_BAD_REQUEST,mt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function H1(l){const c=/^([-+\w]{1,25})(:?\/\/|:)/.exec(l);return c&&c[1]||""}function z1(l,c){l=l||10;const e=new Array(l),u=new Array(l);let $=0,b=0,v;return c=c!==void 0?c:1e3,function(x){const p=Date.now(),d=u[b];v||(v=p),e[$]=x,u[$]=p;let o=b,a=0;for(;o!==$;)a+=e[o++],o=o%l;if($=($+1)%l,$===b&&(b=(b+1)%l),p-v<c)return;const s=d&&p-d;return s?Math.round(a*1e3/s):void 0}}function U1(l,c){let e=0,u=1e3/c,$,b;const v=(x,p=Date.now())=>{e=p,$=null,b&&(clearTimeout(b),b=null),l(...x)};return[(...x)=>{const p=Date.now(),d=p-e;d>=u?v(x,p):($=x,b||(b=setTimeout(()=>{b=null,v($)},u-d)))},()=>$&&v($)]}const Qa=(l,c,e=3)=>{let u=0;const $=z1(50,250);return U1(b=>{const v=b.loaded,x=b.lengthComputable?b.total:void 0,p=v-u,d=$(p),o=v<=x;u=v;const a={loaded:v,total:x,progress:x?v/x:void 0,bytes:p,rate:d||void 0,estimated:d&&x&&o?(x-v)/d:void 0,event:b,lengthComputable:x!=null,[c?"download":"upload"]:!0};l(a)},e)},nf=(l,c)=>{const e=l!=null;return[u=>c[0]({lengthComputable:e,total:l,loaded:u}),c[1]]},rf=l=>(...c)=>ke.asap(()=>l(...c)),V1=ni.hasStandardBrowserEnv?((l,c)=>e=>(e=new URL(e,ni.origin),l.protocol===e.protocol&&l.host===e.host&&(c||l.port===e.port)))(new URL(ni.origin),ni.navigator&&/(msie|trident)/i.test(ni.navigator.userAgent)):()=>!0,j1=ni.hasStandardBrowserEnv?{write(l,c,e,u,$,b,v){if(typeof document>"u")return;const x=[`${l}=${encodeURIComponent(c)}`];ke.isNumber(e)&&x.push(`expires=${new Date(e).toUTCString()}`),ke.isString(u)&&x.push(`path=${u}`),ke.isString($)&&x.push(`domain=${$}`),b===!0&&x.push("secure"),ke.isString(v)&&x.push(`SameSite=${v}`),document.cookie=x.join("; ")},read(l){if(typeof document>"u")return null;const c=document.cookie.match(new RegExp("(?:^|; )"+l+"=([^;]*)"));return c?decodeURIComponent(c[1]):null},remove(l){this.write(l,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function K1(l){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(l)}function G1(l,c){return c?l.replace(/\/?\/$/,"")+"/"+c.replace(/^\/+/,""):l}function lg(l,c,e){let u=!K1(c);return l&&(u||e==!1)?G1(l,c):c}const of=l=>l instanceof xi?{...l}:l;function Vo(l,c){c=c||{};const e={};function u(d,o,a,s){return ke.isPlainObject(d)&&ke.isPlainObject(o)?ke.merge.call({caseless:s},d,o):ke.isPlainObject(o)?ke.merge({},o):ke.isArray(o)?o.slice():o}function $(d,o,a,s){if(ke.isUndefined(o)){if(!ke.isUndefined(d))return u(void 0,d,a,s)}else return u(d,o,a,s)}function b(d,o){if(!ke.isUndefined(o))return u(void 0,o)}function v(d,o){if(ke.isUndefined(o)){if(!ke.isUndefined(d))return u(void 0,d)}else return u(void 0,o)}function x(d,o,a){if(a in c)return u(d,o);if(a in l)return u(void 0,d)}const p={url:b,method:b,data:b,baseURL:v,transformRequest:v,transformResponse:v,paramsSerializer:v,timeout:v,timeoutMessage:v,withCredentials:v,withXSRFToken:v,adapter:v,responseType:v,xsrfCookieName:v,xsrfHeaderName:v,onUploadProgress:v,onDownloadProgress:v,decompress:v,maxContentLength:v,maxBodyLength:v,beforeRedirect:v,transport:v,httpAgent:v,httpsAgent:v,cancelToken:v,socketPath:v,responseEncoding:v,validateStatus:x,headers:(d,o,a)=>$(of(d),of(o),a,!0)};return ke.forEach(Object.keys({...l,...c}),function(d){const o=p[d]||$,a=o(l[d],c[d],d);ke.isUndefined(a)&&o!==x||(e[d]=a)}),e}const cg=l=>{const c=Vo({},l);let{data:e,withXSRFToken:u,xsrfHeaderName:$,xsrfCookieName:b,headers:v,auth:x}=c;if(c.headers=v=xi.from(v),c.url=ig(lg(c.baseURL,c.url,c.allowAbsoluteUrls),l.params,l.paramsSerializer),x&&v.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):""))),ke.isFormData(e)){if(ni.hasStandardBrowserEnv||ni.hasStandardBrowserWebWorkerEnv)v.setContentType(void 0);else if(ke.isFunction(e.getHeaders)){const p=e.getHeaders(),d=["content-type","content-length"];Object.entries(p).forEach(([o,a])=>{d.includes(o.toLowerCase())&&v.set(o,a)})}}if(ni.hasStandardBrowserEnv&&(u&&ke.isFunction(u)&&(u=u(c)),u||u!==!1&&V1(c.url))){const p=$&&b&&j1.read(b);p&&v.set($,p)}return c},q1=typeof XMLHttpRequest<"u",Y1=q1&&function(l){return new Promise(function(c,e){const u=cg(l);let $=u.data;const b=xi.from(u.headers).normalize();let{responseType:v,onUploadProgress:x,onDownloadProgress:p}=u,d,o,a,s,r;function n(){s&&s(),r&&r(),u.cancelToken&&u.cancelToken.unsubscribe(d),u.signal&&u.signal.removeEventListener("abort",d)}let i=new XMLHttpRequest;i.open(u.method.toUpperCase(),u.url,!0),i.timeout=u.timeout;function h(){if(!i)return;const y=xi.from("getAllResponseHeaders"in i&&i.getAllResponseHeaders()),R={data:!v||v==="text"||v==="json"?i.responseText:i.response,status:i.status,statusText:i.statusText,headers:y,config:l,request:i};ag(function(T){c(T),n()},function(T){e(T),n()},R),i=null}"onloadend"in i?i.onloadend=h:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(h)},i.onabort=function(){i&&(e(new mt("Request aborted",mt.ECONNABORTED,l,i)),i=null)},i.onerror=function(y){const R=y&&y.message?y.message:"Network Error",T=new mt(R,mt.ERR_NETWORK,l,i);T.event=y||null,e(T),i=null},i.ontimeout=function(){let y=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded";const R=u.transitional||rg;u.timeoutErrorMessage&&(y=u.timeoutErrorMessage),e(new mt(y,R.clarifyTimeoutError?mt.ETIMEDOUT:mt.ECONNABORTED,l,i)),i=null},$===void 0&&b.setContentType(null),"setRequestHeader"in i&&ke.forEach(b.toJSON(),function(y,R){i.setRequestHeader(R,y)}),ke.isUndefined(u.withCredentials)||(i.withCredentials=!!u.withCredentials),v&&v!=="json"&&(i.responseType=u.responseType),p&&([a,r]=Qa(p,!0),i.addEventListener("progress",a)),x&&i.upload&&([o,s]=Qa(x),i.upload.addEventListener("progress",o),i.upload.addEventListener("loadend",s)),(u.cancelToken||u.signal)&&(d=y=>{i&&(e(!y||y.type?new ws(null,l,i):y),i.abort(),i=null)},u.cancelToken&&u.cancelToken.subscribe(d),u.signal&&(u.signal.aborted?d():u.signal.addEventListener("abort",d)));const m=H1(u.url);if(m&&ni.protocols.indexOf(m)===-1){e(new mt("Unsupported protocol "+m+":",mt.ERR_BAD_REQUEST,l));return}i.send($||null)})},Z1=(l,c)=>{const{length:e}=l=l?l.filter(Boolean):[];if(c||e){let u=new AbortController,$;const b=function(d){if(!$){$=!0,x();const o=d instanceof Error?d:this.reason;u.abort(o instanceof mt?o:new ws(o instanceof Error?o.message:o))}};let v=c&&setTimeout(()=>{v=null,b(new mt(`timeout ${c} of ms exceeded`,mt.ETIMEDOUT))},c);const x=()=>{l&&(v&&clearTimeout(v),v=null,l.forEach(d=>{d.unsubscribe?d.unsubscribe(b):d.removeEventListener("abort",b)}),l=null)};l.forEach(d=>d.addEventListener("abort",b));const{signal:p}=u;return p.unsubscribe=()=>ke.asap(x),p}},Q1=function*(l,c){let e=l.byteLength;if(e<c){yield l;return}let u=0,$;for(;u<e;)$=u+c,yield l.slice(u,$),u=$},J1=async function*(l,c){for await(const e of X1(l))yield*Q1(e,c)},X1=async function*(l){if(l[Symbol.asyncIterator]){yield*l;return}const c=l.getReader();try{for(;;){const{done:e,value:u}=await c.read();if(e)break;yield u}}finally{await c.cancel()}},sf=(l,c,e,u)=>{const $=J1(l,c);let b=0,v,x=p=>{v||(v=!0,u&&u(p))};return new ReadableStream({async pull(p){try{const{done:d,value:o}=await $.next();if(d){x(),p.close();return}let a=o.byteLength;if(e){let s=b+=a;e(s)}p.enqueue(new Uint8Array(o))}catch(d){throw x(d),d}},cancel(p){return x(p),$.return()}},{highWaterMark:2})},af=64*1024,{isFunction:Wa}=ke,eS=(({Request:l,Response:c})=>({Request:l,Response:c}))(ke.global),{ReadableStream:lf,TextEncoder:cf}=ke.global,uf=(l,...c)=>{try{return!!l(...c)}catch{return!1}},tS=l=>{l=ke.merge.call({skipUndefined:!0},eS,l);const{fetch:c,Request:e,Response:u}=l,$=c?Wa(c):typeof fetch=="function",b=Wa(e),v=Wa(u);if(!$)return!1;const x=$&&Wa(lf),p=$&&(typeof cf=="function"?(n=>i=>n.encode(i))(new cf):async n=>new Uint8Array(await new e(n).arrayBuffer())),d=b&&x&&uf(()=>{let n=!1;const i=new e(ni.origin,{body:new lf,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!i}),o=v&&x&&uf(()=>ke.isReadableStream(new u("").body)),a={stream:o&&(n=>n.body)};$&&["text","arrayBuffer","blob","formData","stream"].forEach(n=>{!a[n]&&(a[n]=(i,h)=>{let m=i&&i[n];if(m)return m.call(i);throw new mt(`Response type '${n}' is not supported`,mt.ERR_NOT_SUPPORT,h)})});const s=async n=>{if(n==null)return 0;if(ke.isBlob(n))return n.size;if(ke.isSpecCompliantForm(n))return(await new e(ni.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(ke.isArrayBufferView(n)||ke.isArrayBuffer(n))return n.byteLength;if(ke.isURLSearchParams(n)&&(n=n+""),ke.isString(n))return(await p(n)).byteLength},r=async(n,i)=>ke.toFiniteNumber(n.getContentLength())??s(i);return async n=>{let{url:i,method:h,data:m,signal:y,cancelToken:R,timeout:T,onDownloadProgress:C,onUploadProgress:w,responseType:E,headers:D,withCredentials:I="same-origin",fetchOptions:L}=cg(n),z=c||fetch;E=E?(E+"").toLowerCase():"text";let F=Z1([y,R&&R.toAbortSignal()],T),O=null;const A=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let S;try{if(w&&d&&h!=="get"&&h!=="head"&&(S=await r(D,m))!==0){let ee=new e(i,{method:"POST",body:m,duplex:"half"}),ce;if(ke.isFormData(m)&&(ce=ee.headers.get("content-type"))&&D.setContentType(ce),ee.body){const[ne,he]=nf(S,Qa(rf(w)));m=sf(ee.body,af,ne,he)}}ke.isString(I)||(I=I?"include":"omit");const N=b&&"credentials"in e.prototype,W={...L,signal:F,method:h.toUpperCase(),headers:D.normalize().toJSON(),body:m,duplex:"half",credentials:N?I:void 0};O=b&&new e(i,W);let V=await(b?z(O,L):z(i,W));const G=o&&(E==="stream"||E==="response");if(o&&(C||G&&A)){const ee={};["status","statusText","headers"].forEach(ue=>{ee[ue]=V[ue]});const ce=ke.toFiniteNumber(V.headers.get("content-length")),[ne,he]=C&&nf(ce,Qa(rf(C),!0))||[];V=new u(sf(V.body,af,ne,()=>{he&&he(),A&&A()}),ee)}E=E||"text";let Z=await a[ke.findKey(a,E)||"text"](V,n);return!G&&A&&A(),await new Promise((ee,ce)=>{ag(ee,ce,{data:Z,headers:xi.from(V.headers),status:V.status,statusText:V.statusText,config:n,request:O})})}catch(N){throw A&&A(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new mt("Network Error",mt.ERR_NETWORK,n,O),{cause:N.cause||N}):mt.from(N,N&&N.code,n,O)}}},nS=new Map,ug=l=>{let c=l&&l.env||{};const{fetch:e,Request:u,Response:$}=c,b=[u,$,e];let v=b.length,x=v,p,d,o=nS;for(;x--;)p=b[x],d=o.get(p),d===void 0&&o.set(p,d=x?new Map:tS(c)),o=d;return d};ug();const Ru={http:w1,xhr:Y1,fetch:{get:ug}};ke.forEach(Ru,(l,c)=>{if(l){try{Object.defineProperty(l,"name",{value:c})}catch{}Object.defineProperty(l,"adapterName",{value:c})}});const hf=l=>`- ${l}`,iS=l=>ke.isFunction(l)||l===null||l===!1;function rS(l,c){l=ke.isArray(l)?l:[l];const{length:e}=l;let u,$;const b={};for(let v=0;v<e;v++){u=l[v];let x;if($=u,!iS(u)&&($=Ru[(x=String(u)).toLowerCase()],$===void 0))throw new mt(`Unknown adapter '${x}'`);if($&&(ke.isFunction($)||($=$.get(c))))break;b[x||"#"+v]=$}if(!$){const v=Object.entries(b).map(([p,d])=>`adapter ${p} `+(d===!1?"is not supported by the environment":"is not available in the build"));let x=e?v.length>1?`since :
|
|
1395
1395
|
`+v.map(hf).join(`
|
|
1396
1396
|
`):" "+hf(v[0]):"as no adapter specified";throw new mt("There is no suitable adapter to dispatch the request "+x,"ERR_NOT_SUPPORT")}return $}const hg={getAdapter:rS,adapters:Ru};function xc(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new ws(null,l)}function df(l){return xc(l),l.headers=xi.from(l.headers),l.data=bc.call(l,l.transformRequest),["post","put","patch"].indexOf(l.method)!==-1&&l.headers.setContentType("application/x-www-form-urlencoded",!1),hg.getAdapter(l.adapter||ia.adapter,l)(l).then(function(c){return xc(l),c.data=bc.call(l,l.transformResponse,c),c.headers=xi.from(c.headers),c},function(c){return sg(c)||(xc(l),c&&c.response&&(c.response.data=bc.call(l,l.transformResponse,c.response),c.response.headers=xi.from(c.response.headers))),Promise.reject(c)})}const dg="1.13.2",sl={};["object","boolean","number","function","string","symbol"].forEach((l,c)=>{sl[l]=function(e){return typeof e===l||"a"+(c<1?"n ":" ")+l}});const ff={};sl.transitional=function(l,c,e){function u($,b){return"[Axios v"+dg+"] Transitional option '"+$+"'"+b+(e?". "+e:"")}return($,b,v)=>{if(l===!1)throw new mt(u(b," has been removed"+(c?" in "+c:"")),mt.ERR_DEPRECATED);return c&&!ff[b]&&(ff[b]=!0,console.warn(u(b," has been deprecated since v"+c+" and will be removed in the near future"))),l?l($,b,v):!0}};sl.spelling=function(l){return(c,e)=>(console.warn(`${e} is likely a misspelling of ${l}`),!0)};function oS(l,c,e){if(typeof l!="object")throw new mt("options must be an object",mt.ERR_BAD_OPTION_VALUE);const u=Object.keys(l);let $=u.length;for(;$-- >0;){const b=u[$],v=c[b];if(v){const x=l[b],p=x===void 0||v(x,b,l);if(p!==!0)throw new mt("option "+b+" must be "+p,mt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new mt("Unknown option "+b,mt.ERR_BAD_OPTION)}}const Ya={assertOptions:oS,validators:sl},Cr=Ya.validators;let zo=class{constructor(l){this.defaults=l||{},this.interceptors={request:new ef,response:new ef}}async request(l,c){try{return await this._request(l,c)}catch(e){if(e instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const $=u.stack?u.stack.replace(/^.+\n/,""):"";try{e.stack?$&&!String(e.stack).endsWith($.replace(/^.+\n.+\n/,""))&&(e.stack+=`
|
|
1397
|
-
`+$):e.stack=$}catch{}}throw e}}_request(l,c){typeof l=="string"?(c=c||{},c.url=l):c=l||{},c=Vo(this.defaults,c);const{transitional:e,paramsSerializer:u,headers:$}=c;e!==void 0&&Ya.assertOptions(e,{silentJSONParsing:Cr.transitional(Cr.boolean),forcedJSONParsing:Cr.transitional(Cr.boolean),clarifyTimeoutError:Cr.transitional(Cr.boolean)},!1),u!=null&&(ke.isFunction(u)?c.paramsSerializer={serialize:u}:Ya.assertOptions(u,{encode:Cr.function,serialize:Cr.function},!0)),c.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?c.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:c.allowAbsoluteUrls=!0),Ya.assertOptions(c,{baseUrl:Cr.spelling("baseURL"),withXsrfToken:Cr.spelling("withXSRFToken")},!0),c.method=(c.method||this.defaults.method||"get").toLowerCase();let b=$&&ke.merge($.common,$[c.method]);$&&ke.forEach(["delete","get","head","post","put","patch","common"],r=>{delete $[r]}),c.headers=xi.concat(b,$);const v=[];let x=!0;this.interceptors.request.forEach(function(r){typeof r.runWhen=="function"&&r.runWhen(c)===!1||(x=x&&r.synchronous,v.unshift(r.fulfilled,r.rejected))});const p=[];this.interceptors.response.forEach(function(r){p.push(r.fulfilled,r.rejected)});let d,o=0,a;if(!x){const r=[df.bind(this),void 0];for(r.unshift(...v),r.push(...p),a=r.length,d=Promise.resolve(c);o<a;)d=d.then(r[o++],r[o++]);return d}a=v.length;let s=c;for(;o<a;){const r=v[o++],n=v[o++];try{s=r(s)}catch(i){n.call(this,i);break}}try{d=df.call(this,s)}catch(r){return Promise.reject(r)}for(o=0,a=p.length;o<a;)d=d.then(p[o++],p[o++]);return d}getUri(l){l=Vo(this.defaults,l);const c=lg(l.baseURL,l.url,l.allowAbsoluteUrls);return ig(c,l.params,l.paramsSerializer)}};ke.forEach(["delete","get","head","options"],function(l){zo.prototype[l]=function(c,e){return this.request(Vo(e||{},{method:l,url:c,data:(e||{}).data}))}});ke.forEach(["post","put","patch"],function(l){function c(e){return function(u,$,b){return this.request(Vo(b||{},{method:l,headers:e?{"Content-Type":"multipart/form-data"}:{},url:u,data:$}))}}zo.prototype[l]=c(),zo.prototype[l+"Form"]=c(!0)});let sS=class fg{constructor(c){if(typeof c!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function($){e=$});const u=this;this.promise.then($=>{if(!u._listeners)return;let b=u._listeners.length;for(;b-- >0;)u._listeners[b]($);u._listeners=null}),this.promise.then=$=>{let b;const v=new Promise(x=>{u.subscribe(x),b=x}).then($);return v.cancel=function(){u.unsubscribe(b)},v},c(function($,b,v){u.reason||(u.reason=new ws($,b,v),e(u.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(c){if(this.reason){c(this.reason);return}this._listeners?this._listeners.push(c):this._listeners=[c]}unsubscribe(c){if(!this._listeners)return;const e=this._listeners.indexOf(c);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const c=new AbortController,e=u=>{c.abort(u)};return this.subscribe(e),c.signal.unsubscribe=()=>this.unsubscribe(e),c.signal}static source(){let c;return{token:new fg(function(e){c=e}),cancel:c}}};function aS(l){return function(c){return l.apply(null,c)}}function lS(l){return ke.isObject(l)&&l.isAxiosError===!0}const pu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pu).forEach(([l,c])=>{pu[c]=l});function pg(l){const c=new zo(l),e=jp(zo.prototype.request,c);return ke.extend(e,zo.prototype,c,{allOwnKeys:!0}),ke.extend(e,c,null,{allOwnKeys:!0}),e.create=function(u){return pg(Vo(l,u))},e}const kn=pg(ia);kn.Axios=zo;kn.CanceledError=ws;kn.CancelToken=sS;kn.isCancel=sg;kn.VERSION=dg;kn.toFormData=ol;kn.AxiosError=mt;kn.Cancel=kn.CanceledError;kn.all=function(l){return Promise.all(l)};kn.spread=aS;kn.isAxiosError=lS;kn.mergeConfig=Vo;kn.AxiosHeaders=xi;kn.formToJSON=l=>og(ke.isHTMLForm(l)?new FormData(l):l);kn.getAdapter=hg.getAdapter;kn.HttpStatusCode=pu;kn.default=kn;const{Axios:pA,AxiosError:gA,CanceledError:mA,isCancel:vA,CancelToken:yA,VERSION:wA,all:bA,Cancel:xA,isAxiosError:SA,spread:kA,toFormData:CA,AxiosHeaders:_A,HttpStatusCode:AA,formToJSON:$A,getAdapter:MA,mergeConfig:TA}=kn,Iu=kn.create({baseURL:location.origin,timeout:6e4,params:{}});Iu.interceptors.response.use(l=>l,l=>{var c,e,u,$,b,v,x,p,d,o,a;if(l.response){if(l.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(n){n&&OpenC3Auth.setTokens()}),l.response.config.headers["Ignore-Errors"]&&l.response.config.headers["Ignore-Errors"].includes(l.response.status.toString()))return Promise.reject(l);let s=`HTTP ${l.response.status} - `;(c=l.response)!=null&&c.statusText&&(s+=`${l.response.statusText} `),(u=(e=l.response)==null?void 0:e.config)!=null&&u.data&&(s+=`${l.response.config.data} `),(b=($=l.response)==null?void 0:$.data)!=null&&b.message?s+=`${l.response.data.message}`:(x=(v=l.response)==null?void 0:v.data)!=null&&x.exception?s+=`${l.response.data.exception}`:(o=(d=(p=l.response)==null?void 0:p.data)==null?void 0:d.error)!=null&&o.message?(l.response.data.error.class&&(s+=`${l.response.data.error.class} `),s+=`${l.response.data.error.message}`):s+=`${(a=l.response)==null?void 0:a.data}`;const{$cosmosNotify:r}=window;throw r&&r.serious({title:"Network error",body:s}),l}else throw l});const Ha=async function(l,c,{data:e,params:u={},headers:$,noAuth:b=!1,noScope:v=!1,onUploadProgress:x=!1}={}){if(!b){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}$.Authorization=localStorage.openc3Token}return $.manual=!0,!v&&!u.scope&&(u.scope=window.openc3Scope),Iu({method:l,url:c,data:e,params:u,headers:$,onUploadProgress:x})},gu={Accept:"application/json"},pf={...gu,"Content-Type":"application/json"},cS={get:function(l,{params:c,headers:e=gu,noScope:u,noAuth:$,onUploadProgress:b}={}){return Ha("get",l,{params:c,headers:e,noScope:u,noAuth:$,onUploadProgress:b})},put:function(l,{data:c,params:e,headers:u=pf,noScope:$,noAuth:b,onUploadProgress:v}={}){return Ha("put",l,{data:c,params:e,headers:u,noScope:$,noAuth:b,onUploadProgress:v})},post:function(l,{data:c,params:e,headers:u=pf,noScope:$,noAuth:b,onUploadProgress:v}={}){return Ha("post",l,{data:c,params:e,headers:u,noScope:$,noAuth:b,onUploadProgress:v})},delete:function(l,{params:c,headers:e=gu,noScope:u,noAuth:$,onUploadProgress:b}={}){return Ha("delete",l,{params:c,headers:e,noScope:u,noAuth:$,onUploadProgress:b})}};let al=()=>({emit(l,...c){for(let e=this.events[l]||[],u=0,$=e.length;u<$;u++)e[u](...c)},events:{},on(l,c){var e;return((e=this.events)[l]||(e[l]=[])).push(c),()=>{var u;this.events[l]=(u=this.events[l])==null?void 0:u.filter($=>c!==$)}}});class ra extends Error{constructor(c,e){c instanceof Error?(super(c.message),this.cause=c):super(c),this.reason=e,this.name="ReasonError"}}class Ou extends ra{constructor(c){super("Rejected",c),this.name="SubscriptionRejectedError"}}class uS extends ra{constructor(c){super(c||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class hr extends ra{constructor(c,e){e?super(c,e):super("Disconnected",c),this.name="DisconnectedError"}}class hS extends hr{constructor(c){super(c,"stale_connection"),this.name="StaleConnectionError"}}function gg(l){return l?`{${Object.keys(l).sort().filter(c=>l[c]!==void 0).map(c=>{let e=JSON.stringify(l[c]);return`${JSON.stringify(c)}:${e}`}).join(",")}}`:""}class dS{constructor(c){this.channel=c,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",c=>{if(c.type==="info"){this._state||(this._state=this.stateFromInfo(c));return}this._state&&(c.type==="join"?this._state[c.id]=c.info:c.type==="leave"&&delete this._state[c.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(c=>c()),this.listeners.length=0}async join(c,e){if(!this._info)return this._info={id:c,info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let c=await this.channel.perform("$presence:leave");return delete this._info,c}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let c=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(c),this._state}finally{delete this._promise}}stateFromInfo(c){return c.records.reduce((e,{id:u,info:$})=>(e[u]=$,e),{})}}const Do=Symbol("state");class mg{constructor(c={}){this.emitter=al(),this.params=Object.freeze(c),this.presence=new dS(this),this.initialConnect=!0,this[Do]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=gg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[Do]}attached(c){if(this.receiver){if(this.receiver!==c)throw Error("Already connected to a different receiver");return!1}return this.receiver=c,!0}connecting(){this[Do]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[Do]="connected";let c=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:c})):this.emit("connect",{reconnect:!0,restored:c})}restored(){if(this.state==="connected")throw Error("Already connected");this[Do]="connected";let c=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:c})}disconnected(c){this.state==="disconnected"||this.state==="closed"||(this[Do]="disconnected",this.presence.reset(),this.emit("disconnect",c))}closed(c){this.state!=="closed"&&(this[Do]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",c))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(c,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,c,e)}async send(c){return this.perform(void 0,c)}async whisper(c){try{await this.perform("$whisper",c)}catch(e){let u=this.receiver?this.receiver.logger:null;u&&u.warn("whisper failed: ",e)}}receive(c,e){this.emit("message",c,e)}on(c,e){return this.emitter.on(c,e)}once(c,e){let u=this.emitter.on(c,(...$)=>{u(),e(...$)});return u}emit(c,...e){return this.emitter.emit(c,...e)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((c,e)=>{let u=[()=>delete this._pendingSubscribe];u.push(this.on("connect",()=>{u.forEach($=>$()),c()})),u.push(this.on("close",$=>{u.forEach(b=>b()),e($||new ra("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class fS{constructor(c){this.id=c,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(c){this.channels.includes(c)||this.channels.push(c)}remove(c){let e=this.channels.indexOf(c);e>-1&&this.channels.splice(e,1)}notify(c,...e){this.state=c==="restored"?"connected":c,e.length===1?this.channels.forEach(u=>u[c](e[0])):this.channels.forEach(u=>u[c]())}pending(c){this._checkIntent(c);let e=this._pendings[0];return!e||e.intent!==c?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(c){this._checkIntent(c);let e,u={promise:new Promise(b=>{e=b}),intent:c,release:()=>{this._pendings.splice(this._pendings.indexOf(u),1),e(u)},canceled:!1,acquired:!1},$=this._pendingTop;return this._pendings.push(u),$&&await $.promise,this.gvl&&await this.gvl.acquire(u,c),u.acquired=!0,u}close(c){this.disposed=!0,this.intent=void 0,this.notify("closed",c)}_checkIntent(c){if(!(c==="unsubscribed"||c==="subscribed"))throw Error(`Unknown subscription intent: ${c}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(c){let e=this._pendingTop;return!e||e.acquired||e.intent!==c?!1:(this._pendings.pop(),e.canceled=!0,!0)}}class pS{constructor(){this.queue=[]}async acquire(c,e){e==="subscribed"&&(this.queue.push(c.promise.then(()=>{this.queue.splice(this.queue.indexOf(c),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class gS{constructor(c){c.concurrentSubscribes===!1&&(this.glv=new pS),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(c){return this._subscriptions[c]}create(c,{subscribe:e,unsubscribe:u}){let $=this._subscriptions[c]=new fS(c);return $.remoteId=this._localToRemote[c],$.subscriber=e,$.unsubscriber=u,$.gvl=this.glv,$}remove(c){delete this._subscriptions[c],delete this._localToRemote[c]}storeRemoteId(c,e){this._localToRemote[c]=e;let u=this.get(c);u&&(u.remoteId=e)}}class mS{constructor(c={}){this.subscriptions=new gS(c),this._pendingMessages=[],this._remoteToLocal={}}subscribe(c,e){this._remoteToLocal[e]=c,this.subscriptions.storeRemoteId(c,e),this.flush(e)}unsubscribe(c){let e=this.subscriptions.get(c);if(!e)return;let u=e.remoteId;u&&delete this._remoteToLocal[u],this.subscriptions.remove(c)}transmit(c,e,u){let $=this._remoteToLocal[c];if(!$){this._pendingMessages.push([c,e,u]);return}let b=this.subscriptions.get($);b&&b.channels.forEach(v=>{v.receive(e,u)})}notify(c,e,u){let $=this._remoteToLocal[c];if(!$)return;let b=this.subscriptions.get($);b&&b.channels.forEach(v=>v.emit(e,u))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(c=>c.channels)}flush(c){let e=[];for(let u of this._pendingMessages)u[0]===c?this.transmit(u[0],u[1],u[2]):e.push(u);this._pendingMessages=e}}const gf={debug:0,info:1,warn:2,error:3};class vg{constructor(c){this.level=c||"warn"}log(c,e,u){gf[c]<gf[this.level]||this.writeLogEntry(c,e,u)}writeLogEntry(){throw Error("Not implemented")}debug(c,e){this.log("debug",c,e)}info(c,e){this.log("info",c,e)}warn(c,e){this.log("warn",c,e)}error(c,e){this.log("error",c,e)}}class oa extends vg{writeLogEntry(){}}class vS{encode(c){return JSON.stringify(c)}decode(c){try{return JSON.parse(c)}catch{}}}let yS=0;class yg{constructor(c={}){let{logger:e}=c;this.logger=e||new oa,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=c.subscribeCooldownInterval||250,this.subscribeRetryInterval=c.subscribeRetryInterval||5e3}attached(c){this.cable=c}subscribe(c,e){let u={channel:c};e&&Object.assign(u,e);let $=gg(u);if(this.pendingUnsubscriptions[$]){let v=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${v}`,$),new Promise(x=>{setTimeout(()=>{x(this.subscribe(c,e))},v)})}if(this.pendingSubscriptions[$])return this.logger.warn("subscription is already pending, skipping",$),Promise.reject(Error("Already subscribing"));let b=this.subscribeRetryInterval;return new Promise((v,x)=>{let p=++yS;this.pendingSubscriptions[$]={resolve:v,reject:x,id:p},this.cable.send(this.buildSubscribeRequest($)),this.maybeRetrySubscribe(p,$,b)})}buildSubscribeRequest(c){return{command:"subscribe",identifier:c}}maybeRetrySubscribe(c,e,u){setTimeout(()=>{let $=this.pendingSubscriptions[e];$&&$.id===c&&(this.logger.warn(`no subscription ack received in ${u}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(c,e,u))},u)}maybeExpireSubscribe(c,e,u){setTimeout(()=>{let $=this.pendingSubscriptions[e];$&&$.id===c&&(delete this.pendingSubscriptions[e],$.reject(new uS(`Haven't received subscription ack in ${u*2}ms for ${e}`)))},u)}unsubscribe(c){return this.cable.send({command:"unsubscribe",identifier:c}),this.pendingUnsubscriptions[c]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[c]},this.subscribeCooldownInterval),Promise.resolve()}perform(c,e,u){return e==="$whisper"?this.whisper(c,u):(u||(u={}),u.action=e,this.cable.send({command:"message",identifier:c,data:JSON.stringify(u)}),Promise.resolve())}whisper(c,e){return this.cable.send({command:"whisper",identifier:c,data:e}),Promise.resolve()}receive(c){if(typeof c!="object"){this.logger.error("unsupported message format",{message:c});return}let{type:e,identifier:u,message:$,reason:b,reconnect:v}=c;if(e==="ping")return this.cable.keepalive(c.message);if(this.cable.keepalive(),e==="welcome"){let x=c.sid;return x&&this.cable.setSessionId(x),this.cable.connected()}if(e==="disconnect"){let x=new hr(b);this.reset(x),v===!1?this.cable.closed(x):this.cable.disconnected(x);return}if(e==="confirm_subscription"){let x=this.pendingSubscriptions[u];if(!x){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:u}),this.unsubscribe(u);return}return delete this.pendingSubscriptions[u],x.resolve(u)}if(e==="reject_subscription"){let x=this.pendingSubscriptions[u];return x?(delete this.pendingSubscriptions[u],x.reject(new Ou)):this.logger.error("subscription not found",{type:e,identifier:u})}if($)return{identifier:u,message:$};this.logger.warn(`unknown message type: ${e}`,{message:c})}reset(c){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(c);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const mf=()=>Date.now()/1e3|0;class wS extends yg{constructor(c={}){super(c),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=c.historyTimestamp,this.disableSessionRecovery=c.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=mf()),this.sessionId=void 0,this.sendPongs=c.pongs}reset(c){for(let e in this.pendingPresence)this.pendingPresence[e].reject(c);return this.pendingPresence={},super.reset()}receive(c){if(typeof c!="object"){this.logger.error("unsupported message format",{message:c});return}let{type:e,identifier:u,message:$}=c;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(c);if(e==="reject_subscription")return super.receive(c);if(e==="confirm_subscription")return this.subscriptionStreams[u]||(this.subscriptionStreams[u]=new Set),super.receive(c);if(e==="ping")return this.restoreSince&&(this.restoreSince=mf()),this.sendPongs&&this.sendPong(),this.cable.keepalive(c.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",c),this.cable.notify("history_received",u);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",c),this.cable.notify("history_not_found",u);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=c.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),c.restored){let b=c.restored_ids||Object.keys(this.subscriptionStreams);for(let v of b)this.cable.send({identifier:v,command:"history",history:this.historyRequestFor(v)}),this.presenceInfo[v]&&this.cable.send({identifier:v,command:"join",presence:this.presenceInfo[v]});return this.cable.restored(b)}return this.cable.connected(this.sessionId)}if(e==="presence"){let b=$.type;if(b==="info"){let v=this.pendingPresence[u];v&&(delete this.pendingPresence[u],v.resolve($))}else if(b==="error"){let v=this.pendingPresence[u];v&&(delete this.pendingPresence[u],v.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:u,message:$}}if($){let b=this.trackStreamPosition(u,c.stream_id,c.epoch,c.offset);return{identifier:u,message:$,meta:b}}this.logger.warn(`unknown message type: ${e}`,{message:c})}perform(c,e,u){switch(e){case"$presence:join":return this.join(c,u);case"$presence:leave":return this.leave(c,u);case"$presence:info":return this.presence(c,u)}return super.perform(c,e,u)}unsubscribe(c){return delete this.presenceInfo[c],super.unsubscribe(c)}buildSubscribeRequest(c){let e=super.buildSubscribeRequest(c),u=this.historyRequestFor(c);u&&(e.history=u,this.pendingHistory[c]=!0);let $=this.presenceInfo[c];return $&&(e.presence=$),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(c){let e={},u=!1;if(this.subscriptionStreams[c])for(let $ of this.subscriptionStreams[c]){let b=this.streamsPositions[$];b&&(u=!0,e[$]=b)}if(!(!u&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(c,e,u,$){if(!(!e||!u))return this.subscriptionStreams[c]||(this.subscriptionStreams[c]=new Set),this.subscriptionStreams[c].add(e),this.streamsPositions[e]={epoch:u,offset:$},{stream:e,epoch:u,offset:$}}async sendPong(){await new Promise(c=>setTimeout(c,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(c,e){return this.presenceInfo[c]=e,this.cable.send({command:"join",identifier:c,presence:e}),Promise.resolve()}async leave(c,e){return delete this.presenceInfo[c],this.cable.send({command:"leave",identifier:c,presence:e}),Promise.resolve()}presence(c,e){return this.pendingPresence[c]?(this.logger.warn("presence is already pending, skipping",c),Promise.reject(Error("presence request is already pending"))):new Promise((u,$)=>{this.pendingPresence[c]={resolve:u,reject:$},this.cable.send({command:"presence",identifier:c,data:e})})}}class bS extends ra{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Nu extends mg{constructor(c,e){super(e),this.channelId=c}set channelId(c){this._channelId=c}get channelId(){return this._channelId}}Ar(Nu,"identifier","__ghost__");const xS="$pubsub";class mu extends mg{async perform(c,e){if(c.startsWith("$"))return super.perform(c,e);throw Error("not implemented")}}Ar(mu,"identifier",xS);const Fo=Symbol("state");let SS=class{constructor({transport:l,protocol:c,encoder:e,logger:u,lazy:$,hubOptions:b,performFailures:v,transportConfigurator:x}){this.emitter=al(),this.transport=l,this.encoder=e,this.logger=u||new oa,this.protocol=c,this.performFailures=v||"throw",this.protocol.attached(this),this.hub=new mS(b||{}),this[Fo]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=x,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,$===!1&&this.connect().catch(()=>{})}get state(){return this[Fo]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let l=this.state==="idle";this[Fo]="connecting";let c=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:l}),await this.transport.open()}catch(e){this.handleClose(e)}return c}setSessionId(l){this.sessionId=l,this.transport.setParam("sid",l)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Fo]="connected",this.recovering&&this.hub.subscriptions.all().forEach(c=>c.notify("disconnected",new hr("recovery_failed"))),this.hub.subscriptions.all().forEach(c=>this._resubscribe(c));let l=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:l})):this.emit("connect",{reconnect:!0,restored:l})}restored(l){this.logger.info("connection recovered",{remoteIds:l}),this[Fo]="connected",this.hub.subscriptions.all().forEach(u=>{l&&u.remoteId&&l.includes(u.remoteId)?u.notify("restored"):(u.notify("disconnected",new hr("recovery_failed")),this._resubscribe(u))});let c=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:c,restored:e})}notify(l,c,e){c&&typeof c!="string"&&(e=c,c=void 0),c?this.hub.notify(c,"info",{type:l,data:e}):this.emit("info",{type:l,data:e})}handleClose(l){this.logger.debug("transport closed",{error:l}),this.disconnected(new hr(l,"transport_closed"))}disconnected(l){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:l}),this[Fo]="disconnected",this.recovering=this.protocol.recoverableClosure(l),this.recovering?this.hub.subscriptions.all().forEach(c=>c.notify("connecting")):this.hub.subscriptions.all().forEach(c=>{c.notify("disconnected",l)}),this.protocol.reset(l),this.hub.close(),this.transport.close(),this.emit("disconnect",l))}closed(l){if(this.state==="closed"||this.state==="idle")return;let c;l&&(c=l instanceof hr?l:new hr(l,void 0)),this.logger.info("closed",{reason:l||"user"}),this[Fo]="closed";let e=c||new hr("cable_closed");this.hub.subscriptions.all().forEach(u=>u.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",c)}disconnect(){this.closed()}handleIncoming(l){if(this.state==="closed"||this.state==="idle")return;let c=this.encoder.decode(l);if(c===void 0){this.logger.error("failed to decode message",{message:l});return}this.logger.debug("incoming data",c);let e=this.protocol.receive(c);if(e){this.logger.debug("processed incoming message",e);let{type:u,identifier:$,message:b,meta:v}=e;u?this.hub.notify($,u,b):this.hub.transmit($,b,v)}}send(l){if(this.state==="closed")throw Error("Cable is closed");let c=this.encoder.encode(l);if(c===void 0){this.logger.error("failed to encode message",{message:l});return}this.logger.debug("outgoing message",l),this.transport.send(c)}keepalive(l){this.emit("keepalive",l)}streamFrom(l){let c=new mu({stream_name:l});return this.subscribe(c)}streamFromSigned(l){let c=new mu({signed_stream_name:l});return this.subscribe(c)}subscribeTo(l,c){let e,u;return typeof l=="string"&&(u=l,l=Nu),e=u?new l(u,c):new l(c),this.subscribe(e)}subscribe(l){if(!l.attached(this))return l;let c=l.identifier;l.connecting();let e=this.hub.subscriptions.get(c)||this.hub.subscriptions.create(c,{subscribe:u=>this._subscribe(u,l.channelId,l.params),unsubscribe:u=>this._unsubscribe(u)});return e.add(l),e.intent==="subscribed"&&e.state==="connected"&&l.connected(),e.ensureSubscribed(),l}async _resubscribe(l){l.intent!=="subscribed"||!l.channels[0]||(l.notify("connecting"),l.ensureResubscribed())}async _subscribe(l,c,e){let u=l.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:u});return}this.logger.debug("acquiring subscribe lock",{identifier:u});let $=await l.acquire("subscribed");if($.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:u}),$.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:u}),l.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),$.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:u}),$.release();return}if(l.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:u}),l.notify("connected"),$.release();return}let b={identifier:c,params:e};this.logger.debug("subscribing",b);try{let v=await this.protocol.subscribe(c,e);this.hub.subscribe(u,v),this.logger.debug("subscribed",{...b,remoteId:v}),l.notify("connected")}catch(v){if(v){if(v instanceof Ou&&this.logger.warn("rejected",b),v instanceof hr){this.logger.debug("disconnected during subscription; will retry on connect",b),$.release();return}this.logger.error("failed to subscribe",{error:v,...b})}l.close(v),this.hub.unsubscribe(u)}$.release()}unsubscribe(l){let c=l.identifier,e=this.hub.subscriptions.get(c);if(!e)throw Error(`Subscription not found: ${c}`);e.remove(l),l.closed(),e.maybeUnsubscribe()}async _unsubscribe(l){let c=l.id;this.logger.debug("acquiring unsubscribe lock",{identifier:c});let e=await l.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:c}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:c}),l.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:c,intent:l.intent}),e.release();return}if(l.state==="disconnected"||l.state==="closed"){this.logger.debug(`already ${l.state} connected, skip unsubscribe command`,{identifier:c}),e.release();return}let u=l.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:u}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:c}),l.close(),this.hub.unsubscribe(c),e.release();return}try{await this.protocol.unsubscribe(u),this.logger.debug("unsubscribed remotely",{id:c})}catch($){$&&($ instanceof hr?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:c,error:$}):this.logger.error("unsubscribe failed",{id:c,error:$}))}l.intent==="unsubscribed"?(l.close(),this.hub.unsubscribe(c)):l.state="closed",e.release()}async perform(l,c,e){if(this.performFailures==="throw")return this._perform(l,c,e);try{return await this._perform(l,c,e)}catch(u){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:u});return}}async _perform(l,c,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new bS;let u=this.hub.subscriptions.get(l);if(!u)throw Error(`Subscription not found: ${l}`);if(await u.pending("subscribed"),u.intent!=="subscribed")throw Error(`Subscription is closed: ${l}`);let $=u.remoteId,b={id:$,action:c,payload:e};this.logger.debug("perform",b);try{let v=await this.protocol.perform($,c,e);return v&&this.logger.debug("perform result",{message:v,request:b}),v}catch(v){throw this.logger.error("perform failed",{error:v,request:b}),v}}on(l,c){return this.emitter.on(l,c)}once(l,c){let e=this.emitter.on(l,(...u)=>{e(),c(...u)});return e}emit(l,...c){return this.emitter.emit(l,...c)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((l,c)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(u=>u()),l()})),e.push(this.on("close",u=>{e.forEach($=>$()),c(u)})),e.push(this.on("disconnect",u=>{e.forEach($=>$()),c(u)}))}),this._pendingConnect)}};const kS={maxMissingPings:2,maxReconnectAttempts:1/0},cs=()=>Date.now(),wg=(l,c)=>{c=c||{};let{backoffRate:e,jitterRatio:u,maxInterval:$}=c;return e=e||2,u===void 0&&(u=.5),b=>{let v=l*e**b,x=v*e,p=v+(x-v)*Math.random(),d=2*(Math.random()-.5)*u;return p=p*(1+d),$&&$<p&&(p=$),p}};let bg=class{constructor({pingInterval:l,...c}){if(this.pingInterval=l,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${l}`);if(c=Object.assign({},kS,c),this.strategy=c.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=c.maxMissingPings,this.maxReconnectAttempts=c.maxReconnectAttempts,this.logger=c.logger||new oa,this.state="pending_connect",this.attempts=0,this.disconnectedAt=cs()}watch(l){this.target=l,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(l=>{this.logger.info("Failed at reconnecting: "+l)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=cs(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=cs(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=cs(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=cs()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(l=>l()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let l=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},l)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let l=cs()-this.pingedAt;l>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${l}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new hS))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let l=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${l}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),l)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class CS{constructor(c,e={}){this.transports=c,this.transport=null,this.emitter=al(),this.unbind=[],this.logger=e.logger||new oa}displayName(){return"fallbacked transport"}async open(){for(let c=0;c<this.transports.length;c++){let e=this.transports[c];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(u){this.logger.debug(`Failed to connect via ${e.displayName()}: ${u.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(c){if(!this.transport)throw new Error("No transport is open");this.transport.send(c)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(c,e){this.transports.forEach(u=>{u.setParam(c,e)})}setToken(c,e){this.transports.forEach(u=>{u.setToken(c,e)})}on(c,e){return this.emitter.on(c,e)}once(c,e){let u=this.emitter.on(c,(...$)=>{u(),e(...$)});return u}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(c=>c()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",c=>{this.emitter.emit("data",c)}),this.transport.on("close",c=>{this.emitter.emit("close",c)}),this.transport.on("error",c=>{this.emitter.emit("error",c)}))}}class _S{constructor(c,e={}){this.url=c;let u=e.websocketImplementation;if(u)this.Impl=u;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=al();let{format:$,subprotocol:b,authStrategy:v}=e;this.format=$||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=v||"param",this.authProtocol="",this.subprotocol=b}displayName(){return"WebSocket("+this.url+")"}open(){let c=this.subprotocol;return this.authStrategy==="sub-protocol"&&(c=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,c,this.connectionOptions):this.ws=new this.Impl(this.url,c),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,u)=>{let $=[];$.push(this.once("open",()=>{$.forEach(b=>b()),e()})),$.push(this.once("close",()=>{$.forEach(b=>b()),u(Error("WS connection closed"))}))})}setURL(c){this.url=c}setParam(c,e){let u=new URL(this.url);u.searchParams.set(c,e);let $=`${u.protocol}//${u.host}${u.pathname}?${u.searchParams}`;this.setURL($)}setToken(c,e="jid"){if(this.authStrategy==="param")this.setParam(e,c);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let u=`x-${e}`.toLowerCase();u=Object.keys(this.connectionOptions.headers).find($=>$.toLowerCase()===u)||u,this.connectionOptions.headers[u]=c}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${c}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(c){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(c)}close(){this.ws?this.onclose():this.connected=!1}on(c,e){return this.emitter.on(c,e)}once(c,e){let u=this.emitter.on(c,(...$)=>{u(),e(...$)});return u}initListeners(){this.ws.onerror=c=>{this.connected&&this.emitter.emit("error",c.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=c=>{let e=c.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const xg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function AS(l,c){if(typeof l=="object"&&typeof c>"u"&&(c=l,l=void 0),c=c||{},!l&&!c.transport)throw Error("URL or transport must be specified");c=Object.assign({},xg,c);let{protocol:e,websocketImplementation:u,websocketFormat:$,websocketOptions:b,websocketAuthStrategy:v,fallbacks:x,logLevel:p,logger:d,transport:o,encoder:a,lazy:s,monitor:r,pingInterval:n,reconnectStrategy:i,maxMissingPings:h,maxReconnectAttempts:m,subprotocol:y,tokenRefresher:R,historyTimestamp:T,protocolOptions:C,concurrentSubscribes:w,performFailures:E,transportConfigurator:D,auth:I}=c;if(d=d||new oa(p),typeof e=="string"){y=y||e;let F=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(C=C||{},F==="actioncable-v1")e=new yg({logger:d,...C});else if(F==="actioncable-v1-ext")e=new wS({logger:d,historyTimestamp:T,...C});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")a=a||new vS,$=$||"text";else if(O==="msgpack"){if($="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if($=$||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");o=o||new _S(l,{websocketImplementation:u,websocketOptions:b,subprotocol:y,authStrategy:v,format:$}),x&&(o=new CS([o,...x],{logger:d})),I&&I.token&&o.setToken(I.token,I.param||"jid"),i=i||wg(n),r!==!1&&(r=r||new bg({pingInterval:n,reconnectStrategy:i,maxMissingPings:h,maxReconnectAttempts:m,logger:d}));let L={concurrentSubscribes:w},z=new SS({protocol:e,transport:o,encoder:a,logger:d,lazy:s,hubOptions:L,performFailures:E,transportConfigurator:D});return r&&(r.watch(z),z.monitor=r),R&&$S(z,async()=>{try{await R(o)}catch(F){return d.error("Failed to refresh authentication token: "+F),!1}return z.connect().catch(()=>{}),!0}),z}function $S(l,c){let e=!1;l.on("connect",()=>e=!1),l.on("close",async u=>{if(u){if(e){l.logger.warn("Token auto-refresh is disabled",u);return}u.reason==="token_expired"&&(e=!0,await c())}})}class MS{constructor(c){this.channel=c}notify(c,...e){typeof this[c]=="function"&&this[c](...e)}perform(c,e={}){this.channel.perform(c,e)}send(c){this.channel.send(c)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class TS extends Nu{constructor(c,e,u){super(c,e),this.subscription=new MS(this),Object.assign(this.subscription,u),this.on("connect",({reconnect:$})=>this.subscription.notify("connected",{reconnected:$})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",$=>this.subscription.notify("received",$)),this.on("close",$=>{$&&$ instanceof Ou?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class LS{constructor(c){this.cable=c}create(c,e){let u,$;typeof c=="object"?(u=c.channel,delete c.channel,$=c):(u=c,$={});let b=new TS(u,$,e);return b.subscription.notify("initialized"),this.cable.subscribe(b),b.subscription}findAll(c){return this.cable.hub.channels.filter(e=>e.identifier===c).map(e=>e.subscription)}}class ES{constructor(c){this.cable=c,this.subscriptions=new LS(c)}}class RS extends vg{writeLogEntry(c,e,u){u?console[c](e,u):console[c](e)}}class IS extends bg{watch(c){super.watch(c),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let c=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=$=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:$})},u=()=>this.disconnect(new hr("page_frozen"));document.addEventListener("visibilitychange",c,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",u,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",c,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",u,!1)})}}disconnect(c){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:c.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(c))}}const OS=["cable","action-cable"],NS="/cable",ll=(l,c)=>{for(let e of OS){let u=l.head.querySelector(`meta[name='${e}-${c}']`);if(u)return u.getAttribute("content")}},vf=l=>l.match(/wss?:\/\//)?l:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${l}`:l,DS=()=>{if(typeof document<"u"&&document.head){let l=ll(document,"url");if(l)return vf(l)}return vf(NS)},FS=()=>{if(typeof document<"u"&&document.head){let l=ll(document,"history-timestamp");if(l)return l|0}},PS=()=>{if(typeof document<"u"&&document.head)return ll(document,"token")},WS=()=>{if(typeof document<"u"&&document.head)return ll(document,"token-param")};function BS(l,c){typeof l=="object"&&typeof c>"u"&&(c=l,l=void 0),l=l||DS(),c=c||{},c.historyTimestamp||(c.historyTimestamp=FS());let e=PS();if(e){let d=WS();c.auth=Object.assign({token:e,param:d},c.auth||{})}c=Object.assign({},xg,c);let{logLevel:u,logger:$,pingInterval:b,reconnectStrategy:v,maxMissingPings:x,maxReconnectAttempts:p}=c;return $=c.logger=c.logger||new RS(u),v=c.reconnectStrategy=c.reconnectStrategy||wg(b),c.monitor!==!1&&(c.monitor=c.monitor||new IS({pingInterval:b,reconnectStrategy:v,maxMissingPings:x,maxReconnectAttempts:p,logger:$})),AS(l,c)}function HS(l,c){let e=BS(l,c);return new ES(e)}class zS{constructor(c="/openc3-api/cable"){this._cable=null,this._url=c}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(c,e,u={},$={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(b=>{if(b&&OpenC3Auth.setTokens(),this._cable==null){let v=this._url+"?scope="+encodeURIComponent(e)+"&authorization="+encodeURIComponent(localStorage.openc3Token);v=new URL(v,document.baseURI).href,this._cable=HS(v)}return this._cable.subscriptions.create({channel:c,...$},u)})}recordPing(){}}class vu{constructor(c,e,u="",$=""){this.keyword=c.keyword,this.parameters=c.parameters,this.filename=c.filename,this.line=c.line,this.lineNumber=c.lineNumber,this.message=e,this.usage=u,this.url=$}}class US{constructor(){Ar(this,"keyword",null),Ar(this,"parameters",[]),Ar(this,"filename",""),Ar(this,"line",""),Ar(this,"lineNumber",0),Ar(this,"url","https://docs.openc3.com/docs/configuration")}verify_num_parameters(c,e,u=""){for(let $=1;$<=c;$++)if(this.parameters[$-1]===void 0)throw new vu(this,`Not enough parameters for ${this.keyword}.`,u,this.url);if(e&&this.parameters[e]!==void 0)throw new vu(this,`Too many parameters for ${this.keyword}.`,u,this.url)}remove_quotes(c){if(c.length<2)return c;let e=c.charAt(0);if(e!=='"'&&e!=="'")return c;let u=c.charAt(c.length-1);return e!==u?c:c.substring(1,c.length-1)}scan_string(c,e){if(!e.global)throw"rx must have 'global' flag set";let u=[];return c.replace(e,function($){return u.push($),$}),u}parse_string(c,e,u,$,b){let v=!1;this.line="",this.keyword=null,this.parameters=[],this.filename=e;let x=c.split(`
|
|
1397
|
+
`+$):e.stack=$}catch{}}throw e}}_request(l,c){typeof l=="string"?(c=c||{},c.url=l):c=l||{},c=Vo(this.defaults,c);const{transitional:e,paramsSerializer:u,headers:$}=c;e!==void 0&&Ya.assertOptions(e,{silentJSONParsing:Cr.transitional(Cr.boolean),forcedJSONParsing:Cr.transitional(Cr.boolean),clarifyTimeoutError:Cr.transitional(Cr.boolean)},!1),u!=null&&(ke.isFunction(u)?c.paramsSerializer={serialize:u}:Ya.assertOptions(u,{encode:Cr.function,serialize:Cr.function},!0)),c.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?c.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:c.allowAbsoluteUrls=!0),Ya.assertOptions(c,{baseUrl:Cr.spelling("baseURL"),withXsrfToken:Cr.spelling("withXSRFToken")},!0),c.method=(c.method||this.defaults.method||"get").toLowerCase();let b=$&&ke.merge($.common,$[c.method]);$&&ke.forEach(["delete","get","head","post","put","patch","common"],r=>{delete $[r]}),c.headers=xi.concat(b,$);const v=[];let x=!0;this.interceptors.request.forEach(function(r){typeof r.runWhen=="function"&&r.runWhen(c)===!1||(x=x&&r.synchronous,v.unshift(r.fulfilled,r.rejected))});const p=[];this.interceptors.response.forEach(function(r){p.push(r.fulfilled,r.rejected)});let d,o=0,a;if(!x){const r=[df.bind(this),void 0];for(r.unshift(...v),r.push(...p),a=r.length,d=Promise.resolve(c);o<a;)d=d.then(r[o++],r[o++]);return d}a=v.length;let s=c;for(;o<a;){const r=v[o++],n=v[o++];try{s=r(s)}catch(i){n.call(this,i);break}}try{d=df.call(this,s)}catch(r){return Promise.reject(r)}for(o=0,a=p.length;o<a;)d=d.then(p[o++],p[o++]);return d}getUri(l){l=Vo(this.defaults,l);const c=lg(l.baseURL,l.url,l.allowAbsoluteUrls);return ig(c,l.params,l.paramsSerializer)}};ke.forEach(["delete","get","head","options"],function(l){zo.prototype[l]=function(c,e){return this.request(Vo(e||{},{method:l,url:c,data:(e||{}).data}))}});ke.forEach(["post","put","patch"],function(l){function c(e){return function(u,$,b){return this.request(Vo(b||{},{method:l,headers:e?{"Content-Type":"multipart/form-data"}:{},url:u,data:$}))}}zo.prototype[l]=c(),zo.prototype[l+"Form"]=c(!0)});let sS=class fg{constructor(c){if(typeof c!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function($){e=$});const u=this;this.promise.then($=>{if(!u._listeners)return;let b=u._listeners.length;for(;b-- >0;)u._listeners[b]($);u._listeners=null}),this.promise.then=$=>{let b;const v=new Promise(x=>{u.subscribe(x),b=x}).then($);return v.cancel=function(){u.unsubscribe(b)},v},c(function($,b,v){u.reason||(u.reason=new ws($,b,v),e(u.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(c){if(this.reason){c(this.reason);return}this._listeners?this._listeners.push(c):this._listeners=[c]}unsubscribe(c){if(!this._listeners)return;const e=this._listeners.indexOf(c);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const c=new AbortController,e=u=>{c.abort(u)};return this.subscribe(e),c.signal.unsubscribe=()=>this.unsubscribe(e),c.signal}static source(){let c;return{token:new fg(function(e){c=e}),cancel:c}}};function aS(l){return function(c){return l.apply(null,c)}}function lS(l){return ke.isObject(l)&&l.isAxiosError===!0}const pu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pu).forEach(([l,c])=>{pu[c]=l});function pg(l){const c=new zo(l),e=jp(zo.prototype.request,c);return ke.extend(e,zo.prototype,c,{allOwnKeys:!0}),ke.extend(e,c,null,{allOwnKeys:!0}),e.create=function(u){return pg(Vo(l,u))},e}const kn=pg(ia);kn.Axios=zo;kn.CanceledError=ws;kn.CancelToken=sS;kn.isCancel=sg;kn.VERSION=dg;kn.toFormData=ol;kn.AxiosError=mt;kn.Cancel=kn.CanceledError;kn.all=function(l){return Promise.all(l)};kn.spread=aS;kn.isAxiosError=lS;kn.mergeConfig=Vo;kn.AxiosHeaders=xi;kn.formToJSON=l=>og(ke.isHTMLForm(l)?new FormData(l):l);kn.getAdapter=hg.getAdapter;kn.HttpStatusCode=pu;kn.default=kn;const{Axios:pA,AxiosError:gA,CanceledError:mA,isCancel:vA,CancelToken:yA,VERSION:wA,all:bA,Cancel:xA,isAxiosError:SA,spread:kA,toFormData:CA,AxiosHeaders:_A,HttpStatusCode:AA,formToJSON:$A,getAdapter:MA,mergeConfig:TA}=kn,Iu=kn.create({baseURL:location.origin,timeout:6e4,params:{}});Iu.interceptors.response.use(l=>l,l=>{var c,e,u,$,b,v,x,p,d,o,a;if(l.response){if(l.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(n){n&&OpenC3Auth.setTokens()}),l.response.config.headers["Ignore-Errors"]&&l.response.config.headers["Ignore-Errors"].includes(l.response.status.toString()))return Promise.reject(l);let s=`HTTP ${l.response.status} - `;(c=l.response)!=null&&c.statusText&&(s+=`${l.response.statusText} `),(u=(e=l.response)==null?void 0:e.config)!=null&&u.data&&(s+=`${l.response.config.data} `),(b=($=l.response)==null?void 0:$.data)!=null&&b.message?s+=`${l.response.data.message}`:(x=(v=l.response)==null?void 0:v.data)!=null&&x.exception?s+=`${l.response.data.exception}`:(o=(d=(p=l.response)==null?void 0:p.data)==null?void 0:d.error)!=null&&o.message?(l.response.data.error.class&&(s+=`${l.response.data.error.class} `),s+=`${l.response.data.error.message}`):s+=`${(a=l.response)==null?void 0:a.data}`;const{$cosmosNotify:r}=window;throw r&&r.serious({title:"Network error",body:s}),l}else throw l});const Ha=async function(l,c,{data:e,params:u={},headers:$,noAuth:b=!1,noScope:v=!1,onUploadProgress:x=!1}={}){if(!b){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}$.Authorization=localStorage.openc3Token}return $.manual=!0,!v&&!u.scope&&(u.scope=window.openc3Scope),Iu({method:l,url:c,data:e,params:u,headers:$,onUploadProgress:x})},gu={Accept:"application/json"},pf={...gu,"Content-Type":"application/json"},cS={get:function(l,{params:c,headers:e=gu,noScope:u,noAuth:$,onUploadProgress:b}={}){return Ha("get",l,{params:c,headers:e,noScope:u,noAuth:$,onUploadProgress:b})},put:function(l,{data:c,params:e,headers:u=pf,noScope:$,noAuth:b,onUploadProgress:v}={}){return Ha("put",l,{data:c,params:e,headers:u,noScope:$,noAuth:b,onUploadProgress:v})},post:function(l,{data:c,params:e,headers:u=pf,noScope:$,noAuth:b,onUploadProgress:v}={}){return Ha("post",l,{data:c,params:e,headers:u,noScope:$,noAuth:b,onUploadProgress:v})},delete:function(l,{params:c,headers:e=gu,noScope:u,noAuth:$,onUploadProgress:b}={}){return Ha("delete",l,{params:c,headers:e,noScope:u,noAuth:$,onUploadProgress:b})}};let al=()=>({emit(l,...c){for(let e=this.events[l]||[],u=0,$=e.length;u<$;u++)e[u](...c)},events:{},on(l,c){var e;return((e=this.events)[l]||(e[l]=[])).push(c),()=>{var u;this.events[l]=(u=this.events[l])==null?void 0:u.filter($=>c!==$)}}});class ra extends Error{constructor(c,e){c instanceof Error?(super(c.message),this.cause=c):super(c),this.reason=e,this.name="ReasonError"}}class Ou extends ra{constructor(c){super("Rejected",c),this.name="SubscriptionRejectedError"}}class uS extends ra{constructor(c){super(c||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class hr extends ra{constructor(c,e){e?super(c,e):super("Disconnected",c),this.name="DisconnectedError"}}class hS extends hr{constructor(c){super(c,"stale_connection"),this.name="StaleConnectionError"}}function gg(l){return l?`{${Object.keys(l).sort().filter(c=>l[c]!==void 0).map(c=>{let e=JSON.stringify(l[c]);return`${JSON.stringify(c)}:${e}`}).join(",")}}`:""}class dS{constructor(c){this.channel=c,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",c=>{if(c.type==="info"){this._state||(this._state=this.stateFromInfo(c));return}this._state&&(c.type==="join"?this._state[c.id]=c.info:c.type==="leave"&&delete this._state[c.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(c=>c()),this.listeners.length=0}async join(c,e){if(!this._info)return this._info={id:c,info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let c=await this.channel.perform("$presence:leave");return delete this._info,c}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let c=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(c),this._state}finally{delete this._promise}}stateFromInfo(c){return c.records.reduce((e,{id:u,info:$})=>(e[u]=$,e),{})}}const Do=Symbol("state");class mg{constructor(c={}){this.emitter=al(),this.params=Object.freeze(c),this.presence=new dS(this),this.initialConnect=!0,this[Do]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=gg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[Do]}attached(c){if(this.receiver){if(this.receiver!==c)throw Error("Already connected to a different receiver");return!1}return this.receiver=c,!0}connecting(){this[Do]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[Do]="connected";let c=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:c})):this.emit("connect",{reconnect:!0,restored:c})}restored(){if(this.state==="connected")throw Error("Already connected");this[Do]="connected";let c=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:c})}disconnected(c){this.state==="disconnected"||this.state==="closed"||(this[Do]="disconnected",this.presence.reset(),this.emit("disconnect",c))}closed(c){this.state!=="closed"&&(this[Do]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",c))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(c,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,c,e)}async send(c){return this.perform(void 0,c)}async whisper(c){try{await this.perform("$whisper",c)}catch(e){let u=this.receiver?this.receiver.logger:null;u&&u.warn("whisper failed: ",e)}}receive(c,e){this.emit("message",c,e)}on(c,e){return this.emitter.on(c,e)}once(c,e){let u=this.emitter.on(c,(...$)=>{u(),e(...$)});return u}emit(c,...e){return this.emitter.emit(c,...e)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((c,e)=>{let u=[()=>delete this._pendingSubscribe];u.push(this.on("connect",()=>{u.forEach($=>$()),c()})),u.push(this.on("close",$=>{u.forEach(b=>b()),e($||new ra("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class fS{constructor(c){this.id=c,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(c){this.channels.includes(c)||this.channels.push(c)}remove(c){let e=this.channels.indexOf(c);e>-1&&this.channels.splice(e,1)}notify(c,...e){this.state=c==="restored"?"connected":c,e.length===1?this.channels.forEach(u=>u[c](e[0])):this.channels.forEach(u=>u[c]())}pending(c){this._checkIntent(c);let e=this._pendings[0];return!e||e.intent!==c?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(c){this._checkIntent(c);let e,u={promise:new Promise(b=>{e=b}),intent:c,release:()=>{this._pendings.splice(this._pendings.indexOf(u),1),e(u)},canceled:!1,acquired:!1},$=this._pendingTop;return this._pendings.push(u),$&&await $.promise,this.gvl&&await this.gvl.acquire(u,c),u.acquired=!0,u}close(c){this.disposed=!0,this.intent=void 0,this.notify("closed",c)}_checkIntent(c){if(!(c==="unsubscribed"||c==="subscribed"))throw Error(`Unknown subscription intent: ${c}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(c){let e=this._pendingTop;return!e||e.acquired||e.intent!==c?!1:(this._pendings.pop(),e.canceled=!0,!0)}}class pS{constructor(){this.queue=[]}async acquire(c,e){e==="subscribed"&&(this.queue.push(c.promise.then(()=>{this.queue.splice(this.queue.indexOf(c),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class gS{constructor(c){c.concurrentSubscribes===!1&&(this.glv=new pS),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(c){return this._subscriptions[c]}create(c,{subscribe:e,unsubscribe:u}){let $=this._subscriptions[c]=new fS(c);return $.remoteId=this._localToRemote[c],$.subscriber=e,$.unsubscriber=u,$.gvl=this.glv,$}remove(c){delete this._subscriptions[c],delete this._localToRemote[c]}storeRemoteId(c,e){this._localToRemote[c]=e;let u=this.get(c);u&&(u.remoteId=e)}}class mS{constructor(c={}){this.subscriptions=new gS(c),this._pendingMessages=[],this._remoteToLocal={}}subscribe(c,e){this._remoteToLocal[e]=c,this.subscriptions.storeRemoteId(c,e),this.flush(e)}unsubscribe(c){let e=this.subscriptions.get(c);if(!e)return;let u=e.remoteId;u&&delete this._remoteToLocal[u],this.subscriptions.remove(c)}transmit(c,e,u){let $=this._remoteToLocal[c];if(!$){this._pendingMessages.push([c,e,u]);return}let b=this.subscriptions.get($);b&&b.channels.forEach(v=>{v.receive(e,u)})}notify(c,e,u){let $=this._remoteToLocal[c];if(!$)return;let b=this.subscriptions.get($);b&&b.channels.forEach(v=>v.emit(e,u))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(c=>c.channels)}flush(c){let e=[];for(let u of this._pendingMessages)u[0]===c?this.transmit(u[0],u[1],u[2]):e.push(u);this._pendingMessages=e}}const gf={debug:0,info:1,warn:2,error:3};class vg{constructor(c){this.level=c||"warn"}log(c,e,u){gf[c]<gf[this.level]||this.writeLogEntry(c,e,u)}writeLogEntry(){throw Error("Not implemented")}debug(c,e){this.log("debug",c,e)}info(c,e){this.log("info",c,e)}warn(c,e){this.log("warn",c,e)}error(c,e){this.log("error",c,e)}}class oa extends vg{writeLogEntry(){}}class vS{encode(c){return JSON.stringify(c)}decode(c){try{return JSON.parse(c)}catch{}}}let yS=0;class yg{constructor(c={}){let{logger:e}=c;this.logger=e||new oa,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=c.subscribeCooldownInterval||250,this.subscribeRetryInterval=c.subscribeRetryInterval||5e3}attached(c){this.cable=c}subscribe(c,e){let u={channel:c};e&&Object.assign(u,e);let $=gg(u);if(this.pendingUnsubscriptions[$]){let v=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${v}`,$),new Promise(x=>{setTimeout(()=>{x(this.subscribe(c,e))},v)})}if(this.pendingSubscriptions[$])return this.logger.warn("subscription is already pending, skipping",$),Promise.reject(Error("Already subscribing"));let b=this.subscribeRetryInterval;return new Promise((v,x)=>{let p=++yS;this.pendingSubscriptions[$]={resolve:v,reject:x,id:p},this.cable.send(this.buildSubscribeRequest($)),this.maybeRetrySubscribe(p,$,b)})}buildSubscribeRequest(c){return{command:"subscribe",identifier:c}}maybeRetrySubscribe(c,e,u){setTimeout(()=>{let $=this.pendingSubscriptions[e];$&&$.id===c&&(this.logger.warn(`no subscription ack received in ${u}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(c,e,u))},u)}maybeExpireSubscribe(c,e,u){setTimeout(()=>{let $=this.pendingSubscriptions[e];$&&$.id===c&&(delete this.pendingSubscriptions[e],$.reject(new uS(`Haven't received subscription ack in ${u*2}ms for ${e}`)))},u)}unsubscribe(c){return this.cable.send({command:"unsubscribe",identifier:c}),this.pendingUnsubscriptions[c]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[c]},this.subscribeCooldownInterval),Promise.resolve()}perform(c,e,u){return e==="$whisper"?this.whisper(c,u):(u||(u={}),u.action=e,this.cable.send({command:"message",identifier:c,data:JSON.stringify(u)}),Promise.resolve())}whisper(c,e){return this.cable.send({command:"whisper",identifier:c,data:e}),Promise.resolve()}receive(c){if(typeof c!="object"){this.logger.error("unsupported message format",{message:c});return}let{type:e,identifier:u,message:$,reason:b,reconnect:v}=c;if(e==="ping")return this.cable.keepalive(c.message);if(this.cable.keepalive(),e==="welcome"){let x=c.sid;return x&&this.cable.setSessionId(x),this.cable.connected()}if(e==="disconnect"){let x=new hr(b);this.reset(x),v===!1?this.cable.closed(x):this.cable.disconnected(x);return}if(e==="confirm_subscription"){let x=this.pendingSubscriptions[u];if(!x){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:u}),this.unsubscribe(u);return}return delete this.pendingSubscriptions[u],x.resolve(u)}if(e==="reject_subscription"){let x=this.pendingSubscriptions[u];return x?(delete this.pendingSubscriptions[u],x.reject(new Ou)):this.logger.error("subscription not found",{type:e,identifier:u})}if($)return{identifier:u,message:$};this.logger.warn(`unknown message type: ${e}`,{message:c})}reset(c){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(c);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const mf=()=>Date.now()/1e3|0;class wS extends yg{constructor(c={}){super(c),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=c.historyTimestamp,this.disableSessionRecovery=c.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=mf()),this.sessionId=void 0,this.sendPongs=c.pongs}reset(c){for(let e in this.pendingPresence)this.pendingPresence[e].reject(c);return this.pendingPresence={},super.reset()}receive(c){if(typeof c!="object"){this.logger.error("unsupported message format",{message:c});return}let{type:e,identifier:u,message:$}=c;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(c);if(e==="reject_subscription")return super.receive(c);if(e==="confirm_subscription")return this.subscriptionStreams[u]||(this.subscriptionStreams[u]=new Set),super.receive(c);if(e==="ping")return this.restoreSince&&(this.restoreSince=mf()),this.sendPongs&&this.sendPong(),this.cable.keepalive(c.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",c),this.cable.notify("history_received",u);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",c),this.cable.notify("history_not_found",u);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=c.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),c.restored){let b=c.restored_ids||Object.keys(this.subscriptionStreams);for(let v of b)this.cable.send({identifier:v,command:"history",history:this.historyRequestFor(v)}),this.presenceInfo[v]&&this.cable.send({identifier:v,command:"join",presence:this.presenceInfo[v]});return this.cable.restored(b)}return this.cable.connected(this.sessionId)}if(e==="presence"){let b=$.type;if(b==="info"){let v=this.pendingPresence[u];v&&(delete this.pendingPresence[u],v.resolve($))}else if(b==="error"){let v=this.pendingPresence[u];v&&(delete this.pendingPresence[u],v.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:u,message:$}}if($){let b=this.trackStreamPosition(u,c.stream_id,c.epoch,c.offset);return{identifier:u,message:$,meta:b}}this.logger.warn(`unknown message type: ${e}`,{message:c})}perform(c,e,u){switch(e){case"$presence:join":return this.join(c,u);case"$presence:leave":return this.leave(c,u);case"$presence:info":return this.presence(c,u)}return super.perform(c,e,u)}unsubscribe(c){return delete this.presenceInfo[c],super.unsubscribe(c)}buildSubscribeRequest(c){let e=super.buildSubscribeRequest(c),u=this.historyRequestFor(c);u&&(e.history=u,this.pendingHistory[c]=!0);let $=this.presenceInfo[c];return $&&(e.presence=$),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(c){let e={},u=!1;if(this.subscriptionStreams[c])for(let $ of this.subscriptionStreams[c]){let b=this.streamsPositions[$];b&&(u=!0,e[$]=b)}if(!(!u&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(c,e,u,$){if(!(!e||!u))return this.subscriptionStreams[c]||(this.subscriptionStreams[c]=new Set),this.subscriptionStreams[c].add(e),this.streamsPositions[e]={epoch:u,offset:$},{stream:e,epoch:u,offset:$}}async sendPong(){await new Promise(c=>setTimeout(c,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(c,e){return this.presenceInfo[c]=e,this.cable.send({command:"join",identifier:c,presence:e}),Promise.resolve()}async leave(c,e){return delete this.presenceInfo[c],this.cable.send({command:"leave",identifier:c,presence:e}),Promise.resolve()}presence(c,e){return this.pendingPresence[c]?(this.logger.warn("presence is already pending, skipping",c),Promise.reject(Error("presence request is already pending"))):new Promise((u,$)=>{this.pendingPresence[c]={resolve:u,reject:$},this.cable.send({command:"presence",identifier:c,data:e})})}}class bS extends ra{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Nu extends mg{constructor(c,e){super(e),this.channelId=c}set channelId(c){this._channelId=c}get channelId(){return this._channelId}}Ar(Nu,"identifier","__ghost__");const xS="$pubsub";class mu extends mg{async perform(c,e){if(c.startsWith("$"))return super.perform(c,e);throw Error("not implemented")}}Ar(mu,"identifier",xS);const Fo=Symbol("state");let SS=class{constructor({transport:l,protocol:c,encoder:e,logger:u,lazy:$,hubOptions:b,performFailures:v,transportConfigurator:x}){this.emitter=al(),this.transport=l,this.encoder=e,this.logger=u||new oa,this.protocol=c,this.performFailures=v||"throw",this.protocol.attached(this),this.hub=new mS(b||{}),this[Fo]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=x,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,$===!1&&this.connect().catch(()=>{})}get state(){return this[Fo]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let l=this.state==="idle";this[Fo]="connecting";let c=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:l}),await this.transport.open()}catch(e){this.handleClose(e)}return c}setSessionId(l){this.sessionId=l,this.transport.setParam("sid",l)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Fo]="connected",this.recovering&&this.hub.subscriptions.all().forEach(c=>c.notify("disconnected",new hr("recovery_failed"))),this.hub.subscriptions.all().forEach(c=>this._resubscribe(c));let l=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:l})):this.emit("connect",{reconnect:!0,restored:l})}restored(l){this.logger.info("connection recovered",{remoteIds:l}),this[Fo]="connected",this.hub.subscriptions.all().forEach(u=>{l&&u.remoteId&&l.includes(u.remoteId)?u.notify("restored"):(u.notify("disconnected",new hr("recovery_failed")),this._resubscribe(u))});let c=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:c,restored:e})}notify(l,c,e){c&&typeof c!="string"&&(e=c,c=void 0),c?this.hub.notify(c,"info",{type:l,data:e}):this.emit("info",{type:l,data:e})}handleClose(l){this.logger.debug("transport closed",{error:l}),this.disconnected(new hr(l,"transport_closed"))}disconnected(l){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:l}),this[Fo]="disconnected",this.recovering=this.protocol.recoverableClosure(l),this.recovering?this.hub.subscriptions.all().forEach(c=>c.notify("connecting")):this.hub.subscriptions.all().forEach(c=>{c.notify("disconnected",l)}),this.protocol.reset(l),this.hub.close(),this.transport.close(),this.emit("disconnect",l))}closed(l){if(this.state==="closed"||this.state==="idle")return;let c;l&&(c=l instanceof hr?l:new hr(l,void 0)),this.logger.info("closed",{reason:l||"user"}),this[Fo]="closed";let e=c||new hr("cable_closed");this.hub.subscriptions.all().forEach(u=>u.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",c)}disconnect(){this.closed()}handleIncoming(l){if(this.state==="closed"||this.state==="idle")return;let c=this.encoder.decode(l);if(c===void 0){this.logger.error("failed to decode message",{message:l});return}this.logger.debug("incoming data",c);let e=this.protocol.receive(c);if(e){this.logger.debug("processed incoming message",e);let{type:u,identifier:$,message:b,meta:v}=e;u?this.hub.notify($,u,b):this.hub.transmit($,b,v)}}send(l){if(this.state==="closed")throw Error("Cable is closed");let c=this.encoder.encode(l);if(c===void 0){this.logger.error("failed to encode message",{message:l});return}this.logger.debug("outgoing message",l),this.transport.send(c)}keepalive(l){this.emit("keepalive",l)}streamFrom(l){let c=new mu({stream_name:l});return this.subscribe(c)}streamFromSigned(l){let c=new mu({signed_stream_name:l});return this.subscribe(c)}subscribeTo(l,c){let e,u;return typeof l=="string"&&(u=l,l=Nu),e=u?new l(u,c):new l(c),this.subscribe(e)}subscribe(l){if(!l.attached(this))return l;let c=l.identifier;l.connecting();let e=this.hub.subscriptions.get(c)||this.hub.subscriptions.create(c,{subscribe:u=>this._subscribe(u,l.channelId,l.params),unsubscribe:u=>this._unsubscribe(u)});return e.add(l),e.intent==="subscribed"&&e.state==="connected"&&l.connected(),e.ensureSubscribed(),l}async _resubscribe(l){l.intent!=="subscribed"||!l.channels[0]||(l.notify("connecting"),l.ensureResubscribed())}async _subscribe(l,c,e){let u=l.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:u});return}this.logger.debug("acquiring subscribe lock",{identifier:u});let $=await l.acquire("subscribed");if($.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:u}),$.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:u}),l.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),$.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:u}),$.release();return}if(l.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:u}),l.notify("connected"),$.release();return}let b={identifier:c,params:e};this.logger.debug("subscribing",b);try{let v=await this.protocol.subscribe(c,e);this.hub.subscribe(u,v),this.logger.debug("subscribed",{...b,remoteId:v}),l.notify("connected")}catch(v){if(v){if(v instanceof Ou&&this.logger.warn("rejected",b),v instanceof hr){this.logger.debug("disconnected during subscription; will retry on connect",b),$.release();return}this.logger.error("failed to subscribe",{error:v,...b})}l.close(v),this.hub.unsubscribe(u)}$.release()}unsubscribe(l){let c=l.identifier,e=this.hub.subscriptions.get(c);if(!e)throw Error(`Subscription not found: ${c}`);e.remove(l),l.closed(),e.maybeUnsubscribe()}async _unsubscribe(l){let c=l.id;this.logger.debug("acquiring unsubscribe lock",{identifier:c});let e=await l.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:c}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:c}),l.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:c,intent:l.intent}),e.release();return}if(l.state==="disconnected"||l.state==="closed"){this.logger.debug(`already ${l.state} connected, skip unsubscribe command`,{identifier:c}),e.release();return}let u=l.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:u}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:c}),l.close(),this.hub.unsubscribe(c),e.release();return}try{await this.protocol.unsubscribe(u),this.logger.debug("unsubscribed remotely",{id:c})}catch($){$&&($ instanceof hr?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:c,error:$}):this.logger.error("unsubscribe failed",{id:c,error:$}))}l.intent==="unsubscribed"?(l.close(),this.hub.unsubscribe(c)):l.state="closed",e.release()}async perform(l,c,e){if(this.performFailures==="throw")return this._perform(l,c,e);try{return await this._perform(l,c,e)}catch(u){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:u});return}}async _perform(l,c,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new bS;let u=this.hub.subscriptions.get(l);if(!u)throw Error(`Subscription not found: ${l}`);if(await u.pending("subscribed"),u.intent!=="subscribed")throw Error(`Subscription is closed: ${l}`);let $=u.remoteId,b={id:$,action:c,payload:e};this.logger.debug("perform",b);try{let v=await this.protocol.perform($,c,e);return v&&this.logger.debug("perform result",{message:v,request:b}),v}catch(v){throw this.logger.error("perform failed",{error:v,request:b}),v}}on(l,c){return this.emitter.on(l,c)}once(l,c){let e=this.emitter.on(l,(...u)=>{e(),c(...u)});return e}emit(l,...c){return this.emitter.emit(l,...c)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((l,c)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(u=>u()),l()})),e.push(this.on("close",u=>{e.forEach($=>$()),c(u)})),e.push(this.on("disconnect",u=>{e.forEach($=>$()),c(u)}))}),this._pendingConnect)}};const kS={maxMissingPings:2,maxReconnectAttempts:1/0},cs=()=>Date.now(),wg=(l,c)=>{c=c||{};let{backoffRate:e,jitterRatio:u,maxInterval:$}=c;return e=e||2,u===void 0&&(u=.5),b=>{let v=l*e**b,x=v*e,p=v+(x-v)*Math.random(),d=2*(Math.random()-.5)*u;return p=p*(1+d),$&&$<p&&(p=$),p}};let bg=class{constructor({pingInterval:l,...c}){if(this.pingInterval=l,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${l}`);if(c=Object.assign({},kS,c),this.strategy=c.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=c.maxMissingPings,this.maxReconnectAttempts=c.maxReconnectAttempts,this.logger=c.logger||new oa,this.state="pending_connect",this.attempts=0,this.disconnectedAt=cs()}watch(l){this.target=l,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(l=>{this.logger.info("Failed at reconnecting: "+l)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=cs(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=cs(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=cs(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=cs()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(l=>l()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let l=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},l)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let l=cs()-this.pingedAt;l>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${l}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new hS))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let l=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${l}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),l)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class CS{constructor(c,e={}){this.transports=c,this.transport=null,this.emitter=al(),this.unbind=[],this.logger=e.logger||new oa}displayName(){return"fallbacked transport"}async open(){for(let c=0;c<this.transports.length;c++){let e=this.transports[c];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(u){this.logger.debug(`Failed to connect via ${e.displayName()}: ${u.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(c){if(!this.transport)throw new Error("No transport is open");this.transport.send(c)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(c,e){this.transports.forEach(u=>{u.setParam(c,e)})}setToken(c,e){this.transports.forEach(u=>{u.setToken(c,e)})}on(c,e){return this.emitter.on(c,e)}once(c,e){let u=this.emitter.on(c,(...$)=>{u(),e(...$)});return u}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(c=>c()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",c=>{this.emitter.emit("data",c)}),this.transport.on("close",c=>{this.emitter.emit("close",c)}),this.transport.on("error",c=>{this.emitter.emit("error",c)}))}}class _S{constructor(c,e={}){this.url=c;let u=e.websocketImplementation;if(u)this.Impl=u;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=al();let{format:$,subprotocol:b,authStrategy:v}=e;this.format=$||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=v||"param",this.authProtocol="",this.subprotocol=b}displayName(){return"WebSocket("+this.url+")"}open(){let c=this.subprotocol;return this.authStrategy==="sub-protocol"&&(c=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,c,this.connectionOptions):this.ws=new this.Impl(this.url,c),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,u)=>{let $=[];$.push(this.once("open",()=>{$.forEach(b=>b()),e()})),$.push(this.once("close",()=>{$.forEach(b=>b()),u(Error("WS connection closed"))}))})}setURL(c){this.url=c}setParam(c,e){let u=new URL(this.url);u.searchParams.set(c,e);let $=`${u.protocol}//${u.host}${u.pathname}?${u.searchParams}`;this.setURL($)}setToken(c,e="jid"){if(this.authStrategy==="param")this.setParam(e,c);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let u=`x-${e}`.toLowerCase();u=Object.keys(this.connectionOptions.headers).find($=>$.toLowerCase()===u)||u,this.connectionOptions.headers[u]=c}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${c}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(c){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(c)}close(){this.ws?this.onclose():this.connected=!1}on(c,e){return this.emitter.on(c,e)}once(c,e){let u=this.emitter.on(c,(...$)=>{u(),e(...$)});return u}initListeners(){this.ws.onerror=c=>{this.connected&&this.emitter.emit("error",c.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=c=>{let e=c.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const xg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function AS(l,c){if(typeof l=="object"&&typeof c>"u"&&(c=l,l=void 0),c=c||{},!l&&!c.transport)throw Error("URL or transport must be specified");c=Object.assign({},xg,c);let{protocol:e,websocketImplementation:u,websocketFormat:$,websocketOptions:b,websocketAuthStrategy:v,fallbacks:x,logLevel:p,logger:d,transport:o,encoder:a,lazy:s,monitor:r,pingInterval:n,reconnectStrategy:i,maxMissingPings:h,maxReconnectAttempts:m,subprotocol:y,tokenRefresher:R,historyTimestamp:T,protocolOptions:C,concurrentSubscribes:w,performFailures:E,transportConfigurator:D,auth:I}=c;if(d=d||new oa(p),typeof e=="string"){y=y||e;let F=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(C=C||{},F==="actioncable-v1")e=new yg({logger:d,...C});else if(F==="actioncable-v1-ext")e=new wS({logger:d,historyTimestamp:T,...C});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")a=a||new vS,$=$||"text";else if(O==="msgpack"){if($="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if($=$||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");o=o||new _S(l,{websocketImplementation:u,websocketOptions:b,subprotocol:y,authStrategy:v,format:$}),x&&(o=new CS([o,...x],{logger:d})),I&&I.token&&o.setToken(I.token,I.param||"jid"),i=i||wg(n),r!==!1&&(r=r||new bg({pingInterval:n,reconnectStrategy:i,maxMissingPings:h,maxReconnectAttempts:m,logger:d}));let L={concurrentSubscribes:w},z=new SS({protocol:e,transport:o,encoder:a,logger:d,lazy:s,hubOptions:L,performFailures:E,transportConfigurator:D});return r&&(r.watch(z),z.monitor=r),R&&$S(z,async()=>{try{await R(o)}catch(F){return d.error("Failed to refresh authentication token: "+F),!1}return z.connect().catch(()=>{}),!0}),z}function $S(l,c){let e=!1;l.on("connect",()=>e=!1),l.on("close",async u=>{if(u){if(e){l.logger.warn("Token auto-refresh is disabled",u);return}u.reason==="token_expired"&&(e=!0,await c())}})}class MS{constructor(c){this.channel=c}notify(c,...e){typeof this[c]=="function"&&this[c](...e)}perform(c,e={}){this.channel.perform(c,e)}send(c){this.channel.send(c)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class TS extends Nu{constructor(c,e,u){super(c,e),this.subscription=new MS(this),Object.assign(this.subscription,u),this.on("connect",({reconnect:$})=>this.subscription.notify("connected",{reconnected:$})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",$=>this.subscription.notify("received",$)),this.on("close",$=>{$&&$ instanceof Ou?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class LS{constructor(c){this.cable=c}create(c,e){let u,$;typeof c=="object"?(u=c.channel,delete c.channel,$=c):(u=c,$={});let b=new TS(u,$,e);return b.subscription.notify("initialized"),this.cable.subscribe(b),b.subscription}findAll(c){return this.cable.hub.channels.filter(e=>e.identifier===c).map(e=>e.subscription)}}class ES{constructor(c){this.cable=c,this.subscriptions=new LS(c)}}class RS extends vg{writeLogEntry(c,e,u){u?console[c](e,u):console[c](e)}}class IS extends bg{watch(c){super.watch(c),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let c=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=$=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:$})},u=()=>this.disconnect(new hr("page_frozen"));document.addEventListener("visibilitychange",c,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",u,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",c,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",u,!1)})}}disconnect(c){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:c.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(c))}}const OS=["cable","action-cable"],NS="/cable",ll=(l,c)=>{for(let e of OS){let u=l.head.querySelector(`meta[name='${e}-${c}']`);if(u)return u.getAttribute("content")}},vf=l=>l.match(/wss?:\/\//)?l:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${l}`:l,DS=()=>{if(typeof document<"u"&&document.head){let l=ll(document,"url");if(l)return vf(l)}return vf(NS)},FS=()=>{if(typeof document<"u"&&document.head){let l=ll(document,"history-timestamp");if(l)return l|0}},PS=()=>{if(typeof document<"u"&&document.head)return ll(document,"token")},BS=()=>{if(typeof document<"u"&&document.head)return ll(document,"token-param")};function WS(l,c){typeof l=="object"&&typeof c>"u"&&(c=l,l=void 0),l=l||DS(),c=c||{},c.historyTimestamp||(c.historyTimestamp=FS());let e=PS();if(e){let d=BS();c.auth=Object.assign({token:e,param:d},c.auth||{})}c=Object.assign({},xg,c);let{logLevel:u,logger:$,pingInterval:b,reconnectStrategy:v,maxMissingPings:x,maxReconnectAttempts:p}=c;return $=c.logger=c.logger||new RS(u),v=c.reconnectStrategy=c.reconnectStrategy||wg(b),c.monitor!==!1&&(c.monitor=c.monitor||new IS({pingInterval:b,reconnectStrategy:v,maxMissingPings:x,maxReconnectAttempts:p,logger:$})),AS(l,c)}function HS(l,c){let e=WS(l,c);return new ES(e)}class zS{constructor(c="/openc3-api/cable"){this._cable=null,this._url=c}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(c,e,u={},$={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(b=>{if(b&&OpenC3Auth.setTokens(),this._cable==null){let v=this._url+"?scope="+encodeURIComponent(e)+"&authorization="+encodeURIComponent(localStorage.openc3Token);v=new URL(v,document.baseURI).href,this._cable=HS(v)}return this._cable.subscriptions.create({channel:c,...$},u)})}recordPing(){}}class vu{constructor(c,e,u="",$=""){this.keyword=c.keyword,this.parameters=c.parameters,this.filename=c.filename,this.line=c.line,this.lineNumber=c.lineNumber,this.message=e,this.usage=u,this.url=$}}class US{constructor(){Ar(this,"keyword",null),Ar(this,"parameters",[]),Ar(this,"filename",""),Ar(this,"line",""),Ar(this,"lineNumber",0),Ar(this,"url","https://docs.openc3.com/docs/configuration")}verify_num_parameters(c,e,u=""){for(let $=1;$<=c;$++)if(this.parameters[$-1]===void 0)throw new vu(this,`Not enough parameters for ${this.keyword}.`,u,this.url);if(e&&this.parameters[e]!==void 0)throw new vu(this,`Too many parameters for ${this.keyword}.`,u,this.url)}remove_quotes(c){if(c.length<2)return c;let e=c.charAt(0);if(e!=='"'&&e!=="'")return c;let u=c.charAt(c.length-1);return e!==u?c:c.substring(1,c.length-1)}scan_string(c,e){if(!e.global)throw"rx must have 'global' flag set";let u=[];return c.replace(e,function($){return u.push($),$}),u}parse_string(c,e,u,$,b){let v=!1;this.line="",this.keyword=null,this.parameters=[],this.filename=e;let x=c.split(`
|
|
1398
1398
|
`),p=x.length;for(let d=0;d<p;d++){this.lineNumber=d+1;let o=x[d].trim();if(o.length===0){u&&b(null,[],this.line,this.lineNumber);continue}if(v===!0){if(o[0]==="#")continue;o=o.substring(1,o.length)}let a=o.charAt(o.length-1),s=!1;switch(a){case"+":s=!0;case"\\":let m=o.substring(0,o.length-1).trim();this.line+=m.substring(0,m.length-1),s&&(this.line+=`
|
|
1399
|
-
`),v=!0;continue;case"&":this.line+=o.substring(0,o.length-1);continue;default:this.line+=o}v=!1;let r=/("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g,n=this.scan_string(this.line,r),i="";if(n.length>0&&(i=i+n[0]),i.length===0||i.charAt(0)==="#"?this.keyword=null:this.keyword=i.toUpperCase(),this.parameters=[],this.keyword===null){u&&b(this.keyword,this.parameters,this.line,this.lineNumber),this.line="";continue}let h=n.length;if(h>1)for(let m=1;m<h;m++){let y=n[m];if(y.length>0&&y.charAt(0)==="#")break;$?this.parameters.push(this.remove_quotes(y)):this.parameters.push(y)}b(this.keyword,this.parameters,this.line,this.lineNumber),this.line=""}}}function Js(l){return VS.test(l)}const VS=/^-?[0-9]+$/;function Sg(l){return jS.test(l)}const jS=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function kg(l,c){if(Js(l))return Number.isSafeInteger(Number.parseInt(l,10));const e=Number.parseFloat(l),u=String(e);if(l===u)return!0;const $=yf(l),b=yf(u);return!!($===b||(c==null?void 0:c.approx)===!0&&!Js(l)&&b.length>=14&&$.startsWith(b.substring(0,14)))}let js=function(l){return l.underflow="underflow",l.overflow="overflow",l.truncate_integer="truncate_integer",l.truncate_float="truncate_float",l}({});function KS(l){if(kg(l,{approx:!1}))return;if(Js(l))return js.truncate_integer;const c=Number.parseFloat(l);return Number.isFinite(c)?c===0?js.underflow:js.truncate_float:js.overflow}function yf(l){const{start:c,end:e}=GS(l),u=l.substring(c,e),$=u.indexOf(".");return $===-1?u:u.substring(0,$)+u.substring($+1)}function GS(l){let c=0;for(l[0]==="-"&&c++;l[c]==="0"||l[c]===".";)c++;let e=l.lastIndexOf("e");for(e===-1&&(e=l.lastIndexOf("E")),e===-1&&(e=l.length);(l[e-1]==="0"||l[e-1]===".")&&e>c;)e--;return{start:c,end:e}}class qS{constructor(c){if(Ar(this,"isLosslessNumber",!0),!Sg(c))throw new Error(`Invalid number (value: "${c}")`);this.value=c}valueOf(){const c=KS(this.value);if(c===void 0||c===js.truncate_float)return Number.parseFloat(this.value);if(Js(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${c} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function YS(l){return l&&typeof l=="object"&&l.isLosslessNumber||!1}function ZS(l){return new qS(l)}function QS(l,c){return Du({"":l},"",l,c)}function Du(l,c,e,u){return Array.isArray(e)?u.call(l,c,XS(e,u)):e&&typeof e=="object"&&!YS(e)?u.call(l,c,JS(e,u)):u.call(l,c,e)}function JS(l,c){for(const e of Object.keys(l)){const u=Du(l,e,l[e],c);u!==void 0?l[e]=u:delete l[e]}return l}function XS(l,c){for(let e=0;e<l.length;e++)l[e]=Du(l,String(e),l[e],c);return l}function ek(l,c,e){const u=typeof e=="function"?{parseNumber:e}:e,$=(u==null?void 0:u.parseNumber)??ZS,b=(u==null?void 0:u.onDuplicateKey)??E;let v=0;const x=o();return m(x),R(),c?QS(x,c):x;function p(){if(l.charCodeAt(v)===sk){v++,s();const
|
|
1400
|
-
`,r:"\r",t:" "},ok=92,sk=123,bf=125,ak=91,xf=93,lk=32,ck=10,uk=9,hk=13,Sc=34,dk=43,Sf=45,Fu=48,fk=49,Pu=57,pk=44,gk=46,mk=58,vk=65,yk=97,wk=69,bk=101,xk=70,Sk=102;function Cg(l,c,e,u){return b(l);function b(d,o){if(Array.isArray(u)){const a=u.find(s=>s.test(d));if(a){const s=a.stringify(d);if(typeof s!="string"||!Sg(s))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${s})`);return s}}if(typeof d=="boolean"||typeof d=="number"||typeof d=="string"||d===null||d instanceof Date||d instanceof Boolean||d instanceof Number||d instanceof String)return JSON.stringify(d);if(d!=null&&d.isLosslessNumber||typeof d=="bigint")return d.toString();if(Array.isArray(d))return v(d);if(d&&typeof d=="object")return x(d)}function v(d,o){if(d.length===0)return"[]";let a="[";for(let s=0;s<d.length;s++){const r=d[s];typeof r<"u"&&typeof r!="function"?a+=b(r):a+="null",s<d.length-1&&(a+=",")}return a+="]",a}function x(d,o){if(typeof d.toJSON=="function")return Cg(d.toJSON(),c,e,void 0);const a=Array.isArray(c)?c.map(String):Object.keys(d);if(a.length===0)return"{}";let s=!0,r="{";for(const n of a){const i=d[n];if(p(n,i)){s?s=!1:r+=",";const h=JSON.stringify(n);r+=`${h}:`,r+=b(i)}}return r+="}",r}function p(d,o){return typeof o<"u"&&typeof o!="function"&&typeof o!="symbol"}}function kk(l){return Js(l)&&!kg(l)?BigInt(l):parseFloat(l)}class Ck{constructor(){Ar(this,"id",1)}async exec(c,e,u={},$={},b=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return u.scope=window.openc3Scope,$.manual=!0,(await Iu.post("/openc3-api/api",{jsonrpc:"2.0",method:c,params:e,id:this.id,keyword_params:u},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...$},timeout:b,transformRequest:[(v,x)=>Cg(v)],transformResponse:[v=>ek(v,void 0,kk)]})).data.result}catch(v){let x=new Error;throw v.response?(x.name=v.response.data.error.data.class,x.message=v.response.data.error.data.message,x.object=v.response.data.error):v.request?(x.name="Request error",x.message="Request error, no response received"):x=v,x}}decode_openc3_type(c){if(c!==null&&typeof c=="object"&&c.json_class=="Float"&&c.raw){if(c.raw=="NaN")return NaN;if(c.raw=="Infinity")return 1/0;if(c.raw=="-Infinity")return-1/0}return null}encode_openc3_type(c){return Number.isNaN(c)?{json_class:"Float",raw:"NaN"}:c==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:c==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(c=>{c&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(c){return this.exec("set_offline_access",[c])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(c,e,u,$,b){return this.exec("map_target_to_interface",[c,e],{cmd_only:u,tlm_only:$,unmap_old:b})}unmap_target_from_interface(c,e,u,$){return this.exec("unmap_target_from_interface",[c,e],{cmd_only:u,tlm_only:$})}connect_interface(c,...e){return e.length>0?this.exec("connect_interface",[c,...e]):this.exec("connect_interface",[c])}disconnect_interface(c){return this.exec("disconnect_interface",[c])}interface_cmd(c,e,...u){return this.exec("interface_cmd",[c,e,...u])}interface_target_enable(c,e,u=!1,$=!1){return this.exec("interface_target_enable",[c,e],{cmd_only:u,tlm_only:$})}interface_target_disable(c,e,u=!1,$=!1){return this.exec("interface_target_disable",[c,e],{cmd_only:u,tlm_only:$})}interface_details(c){return this.exec("interface_details",[c])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(c,e,u,$,b){return this.exec("map_target_to_router",[c,e],{cmd_only:u,tlm_only:$,unmap_old:b})}unmap_target_from_router(c,e,u,$){return this.exec("unmap_target_from_router",[c,e],{cmd_only:u,tlm_only:$})}connect_router(c){return this.exec("connect_router",[c])}disconnect_router(c){return this.exec("disconnect_router",[c])}router_target_enable(c,e,u=!1,$=!1){return this.exec("router_target_enable",[c,e],{cmd_only:u,tlm_only:$})}router_target_disable(c,e,u=!1,$=!1){return this.exec("router_target_disable",[c,e],{cmd_only:u,tlm_only:$})}router_details(c){return this.exec("router_details",[c])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(c){return this.exec("get_tlm_cnts",[c])}get_item(c,e,u){return this.exec("get_item",[c,e,u])}get_param(c,e,u){return this.exec("get_param",[c,e,u])}get_parameter(c,e,u){return this.exec("get_param",[c,e,u])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(c){return this.exec("set_limits_set",[c])}get_target(c){return this.exec("get_target",[c])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(c,e){return this.exec("get_tlm",[c,e])}get_telemetry(c,e){return this.exec("get_tlm",[c,e])}get_all_tlm(c){return this.exec("get_all_tlm",[c])}get_all_telemetry(c){return this.exec("get_all_tlm",[c])}get_all_tlm_names(c,e=!1){return this.exec("get_all_tlm_names",[c],{hidden:e})}get_all_telemetry_names(c){return this.exec("get_all_tlm_names",[c])}get_all_tlm_item_names(c){return this.exec("get_all_tlm_item_names",[c])}async get_tlm_packet(c,e,u,$=30){const b=await this.exec("get_tlm_packet",[c,e],{type:u,stale_time:$});if(b!=null){let v=b.length,x=null;for(let p=0;p<v;p++)x=this.decode_openc3_type(b[p][1]),x!==null&&(b[p][1]=x)}return b}get_packet_derived_items(c,e){return this.exec("get_packet_derived_items",[c,e])}get_tlm_buffer(c,e){return this.exec("get_tlm_buffer",[c,e])}get_tlm_available(c){return this.exec("get_tlm_available",[c])}async get_tlm_values(c,e=30,u=null,$=null,b=null){let v={stale_time:e};u!==null&&(v.cache_timeout=u),$!==null&&(v.start_time=$.toISOString()),b!==null&&(v.end_time=b.toISOString());const x=await this.exec("get_tlm_values",[c],v,{},1e4);if(x&&x.length>0){let p=x.length,d=null;for(let o=0;o<p;o++)d=this.decode_openc3_type(x[o][0]),d!==null&&(x[o][0]=d)}return x}get_limits(c,e,u){return this.exec("get_limits",[c,e,u])}async tlm(c,e,u,$="CONVERTED"){let b=null;if(e===void 0)b=await this.exec("tlm",[c]);else if(u===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(e))b=await this.exec("tlm",[c],{type:e});else{let x=new Error;throw x.name="TypeError",x.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,x}else b=await this.exec("tlm",[c,e,u],{type:$});let v=this.decode_openc3_type(b);return v!==null&&(b=v),b}async inject_tlm(c,e,u=null,$="CONVERTED"){await this.exec("inject_tlm",[c,e,u],{type:$})}set_tlm(c,e,u,$){return this.exec("set_tlm",[c,e,u],{type:$})}override_tlm(c,e,u,$){return this.exec("override_tlm",[c,e,u],{type:$})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(c,e,u,$){return this.exec("normalize_tlm",[c,e,u],{type:$})}get_all_cmds(c){return this.exec("get_all_cmds",[c])}get_all_commands(c){return this.exec("get_all_cmds",[c])}get_all_cmd_names(c,e=!1){return this.exec("get_all_cmd_names",[c],{hidden:e})}get_all_command_names(c){return this.exec("get_all_cmd_names",[c])}get_cmd(c,e){return this.exec("get_cmd",[c,e])}get_command(c,e){return this.exec("get_cmd",[c,e])}get_cmd_cnts(c){return this.exec("get_cmd_cnts",[c])}get_cmd_value(c,e,u,$="CONVERTED"){return this.exec("get_cmd_value",[c,e,u,$])}get_cmd_buffer(c,e){return this.exec("get_cmd_buffer",[c,e])}_cmd(c,e,u,$,b,v={}){let x=null;for(let p in $)Object.prototype.hasOwnProperty.call($,p)&&(x=this.encode_openc3_type($[p]),x!==null&&($[p]=x));return this.exec(c,[e,u,$],v,b)}get_cmd_hazardous(c,e,u,$={}){return e===void 0?this.exec("get_cmd_hazardous",c,{},$):this._cmd("get_cmd_hazardous",c,e,u,$)}cmd(c,e,u,$={},b={}){return e===void 0?this.exec("cmd",c,b,$):this._cmd("cmd",c,e,u,$,b)}cmd_no_range_check(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_no_range_check",c,b,$):this._cmd("cmd_no_range_check",c,e,u,$,b)}cmd_raw(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_raw",c,b,$):this._cmd("cmd_raw",c,e,u,$,b)}cmd_raw_no_range_check(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_raw_no_range_check",c,b,$):this._cmd("cmd_raw_no_range_check",c,e,u,$,b)}cmd_no_hazardous_check(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_no_hazardous_check",c,b,$):this._cmd("cmd_no_hazardous_check",c,e,u,$,b)}cmd_no_checks(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_no_checks",c,b,$):this._cmd("cmd_no_checks",c,e,u,$,b)}cmd_raw_no_hazardous_check(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",c,b,$):this._cmd("cmd_raw_no_hazardous_check",c,e,u,$,b)}cmd_raw_no_checks(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_raw_no_checks",c,b,$):this._cmd("cmd_raw_no_checks",c,e,u,$,b)}build_cmd(c,e,u,$={},b={}){return e===void 0?this.exec("build_cmd",c,b,$):this._cmd("build_cmd",c,e,u,$,b)}build_command(c,e,u,$={},b={}){return e===void 0?this.exec("build_cmd",c,b,$):this._cmd("build_cmd",c,e,u,$,b)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(c,e){return this.exec("send_raw",[c,e])}list_configs(c){return this.exec("list_configs",[c])}load_config(c,e){return this.exec("load_config",[c,e])}save_config(c,e,u){return this.exec("save_config",[c,e,u])}delete_config(c,e){return this.exec("delete_config",[c,e])}enable_limits(c,e,u){return this.exec("enable_limits",[c,e,u])}disable_limits(c,e,u){return this.exec("disable_limits",[c,e,u])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(c){return this.exec("get_overall_limits_state",[c])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(c,e){return this.exec("get_setting",[c],e)}get_settings(c,e){return this.exec("get_settings",c,e)}set_setting(c,e){return this.exec("set_setting",[c,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(c,e){return this.exec("set_setting",[c,e])}get_metrics(){return this.exec("get_metrics",[])}async hashString(c){if(window.isSecureContext){const e=new TextEncoder().encode(c),u=await crypto.subtle.digest("SHA-256",e),$=new Uint8Array(u);return Array.from($).map(b=>b.toString(16).padStart(2,"0")).join("")}}}var kc={exports:{}},kf;function _k(){return kf||(kf=1,function(l,c){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,u,$){function b(d,o){function a(I,L,z){if(!(I.length<L)){var F=I.slice(0,L),O=I.slice(L),A=/^(?:(\s+)|(\S+)(\s+))/.exec(O),S=/(?:(\s+)|(\s+)(\S+))$/.exec(F),N=0,B=0;if(S&&!S[2]&&(N=L-S[1].length,B=L),A&&!A[2]&&(N||(N=L),B=L+A[1].length),N)return{start:N,end:B};if(S&&S[2]&&S.index>z)return{start:S.index,end:S.index+S[2].length};if(A&&A[2])return N=L+A[2].length,{start:N,end:N+A[3].length}}}for(var s=o.column||d.getOption("printMarginColumn"),r=o.allowMerge!=0,n=Math.min(o.startRow,o.endRow),i=Math.max(o.startRow,o.endRow),h=d.session;n<=i;){var m=h.getLine(n);if(m.length>s){var y=a(m,s,5);if(y){var R=/^\s*/.exec(m)[0];h.replace(new x(n,y.start,n,y.end),`
|
|
1401
|
-
`+R)}i++}else if(r&&/\S/.test(m)&&n!=i){var T=h.getLine(n+1);if(T&&/\S/.test(T)){var C=m.replace(/\s+$/,""),w=T.replace(/^\s+/,""),E=C+" "+w,y=a(E,s,5);if(y&&y.start>C.length||E.length<s){var D=new x(n,C.length,n+1,T.length-w.length);h.replace(D," "),n--,i--}else C.length<m.length&&h.remove(new x(n,C.length,n,m.length))}}n++}}function v(d){if(d.command.name=="insertstring"&&/\S/.test(d.args)){var o=d.editor,a=o.selection.cursor;if(a.column<=o.renderer.$printMarginColumn)return;var s=o.session.$undoManager.$lastDelta;b(o,{startRow:a.row,endRow:a.row,allowMerge:!1}),s!=o.session.$undoManager.$lastDelta&&o.session.markUndoGroup()}}var x=e("../range").Range,p=e("../editor").Editor;e("../config").defineOptions(p.prototype,"editor",{hardWrap:{set:function(d){d?this.commands.on("afterExec",v):this.commands.off("afterExec",v)},value:!1}}),u.hardWrap=b}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,u,$){function b(g){return{row:g.line,column:g.ch}}function v(g){return new Ie(g.row,g.column)}function x(g,_,k){if(_.line===k.line&&_.ch>=k.ch-1){var P=g.getLine(_.line),
|
|
1402
|
-
`;else if(zi[k]){var
|
|
1403
|
-
`){var K=Xt;Xt=null,K.onClose&&K.onClose(K.value)}else Xt.value=(Xt.value||"")+g}function L(g,_,k){var P=Vt;if(k){if(si.indexOf(k)!=-1)return;si.push(k),Vt=k.noremap!=0}try{for(var
|
|
1404
|
-
`;else{if(zi.hasOwnProperty(se)){Y=zi[se],io(g,Y);continue}Y=Y[0],H.lastIndex=K.index+1}}g.replaceSelection(Y)}}}finally{if(si.pop(),Vt=si.length?P:!1,!si.length&&Xt){var Se=Xt;Xt=null,Qn(g,Se)}}}function z(g,_){var k=g.key;if(!ai[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=An[k]||k;var P="";if(g.ctrlKey&&(P+="C-"),g.altKey&&(P+="A-"),g.metaKey&&(P+="M-"),De.isMac&&g.altKey&&!g.metaKey&&!g.ctrlKey&&(P=P.slice(2)),(P||k.length>1)&&g.shiftKey&&(P+="S-"),_&&!_.expectLiteralNext&&k.length==1){if(bn.keymap&&k in bn.keymap)(bn.remapCtrl!=0||!P)&&(k=bn.keymap[k]);else if(k.charCodeAt(0)>255){var
|
|
1405
|
-
`;break;case"<Space>":k=" ";break;default:k=""}return k}function qe(g,_,k){return function(){for(var P=0;P<k;P++)_(g)}}function Ve(g){return new Ie(g.line,g.ch)}function ot(g,_){return g.ch==_.ch&&g.line==_.line}function Je(g,_){return g.line<_.line?!0:g.line==_.line&&g.ch<_.ch}function lt(g,_){return arguments.length>2&&(_=lt.apply(void 0,Array.prototype.slice.call(arguments,1))),Je(g,_)?g:_}function Ht(g,_){return arguments.length>2&&(_=Ht.apply(void 0,Array.prototype.slice.call(arguments,1))),Je(g,_)?_:g}function vn(g,_,k){var P=Je(g,_),
|
|
1406
|
-
`);W.pop();for(var H,H=W.pop();W.length>0&&H&&h(H);H=W.pop())k.line--,k.ch=0;H?(k.line--,k.ch=Pt(g,k.line)):k.ch=0}}function Pn(g,_,k){_.ch=0,k.ch=0,k.line++}function zt(g){if(!g)return 0;var _=g.search(/\S/);return _==-1?g.length:_}function Ln(g,_,k){var P=_.inclusive,W=_.innerWord,H=_.bigWord,K=_.noSymbol,Y=_.multiline,J=k||qn(g),ie=g.getLine(J.line),se=ie,ye=J.line,Se=ye,de=J.ch,we,Re=K?Fr[0]:Bi[0];if(W&&/\s/.test(ie.charAt(de)))Re=function(jt){return/\s/.test(jt)};else{for(;!Re(ie.charAt(de));)if(de++,de>=ie.length){if(!Y)return null;de--,we=Mr(g,J,!0,H,!0);break}H?Re=Bi[0]:(Re=Fr[0],Re(ie.charAt(de))||(Re=Fr[1]))}for(var Le=de,We=de;Re(ie.charAt(We))&&We>=0;)We--;if(We++,we)Le=we.to,Se=we.line,se=g.getLine(Se),!se&&Le==0&&Le++;else for(;Re(ie.charAt(Le))&&Le<ie.length;)Le++;if(P){var Xe=Le,Ze=J.ch<=We&&/\s/.test(ie.charAt(J.ch));if(!Ze)for(;/\s/.test(se.charAt(Le))&&Le<se.length;)Le++;if(Xe==Le||Ze){for(var Ke=We;/\s/.test(ie.charAt(We-1))&&We>0;)We--;!We&&!Ze&&(We=Ke)}}return{start:new Ie(ye,We),end:new Ie(Se,Le)}}function $r(g,_,k){var P=_;if(!De.findMatchingTag||!De.findEnclosingTag)return{start:P,end:P};var W=De.findMatchingTag(g,_)||De.findEnclosingTag(g,_);return!W||!W.open||!W.close?{start:P,end:P}:k?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function Ji(g,_,k){ot(_,k)||Pe.jumpList.add(g,_,k)}function Xi(g,_){Pe.lastCharacterSearch.increment=g,Pe.lastCharacterSearch.forward=_.forward,Pe.lastCharacterSearch.selectedCharacter=_.selectedCharacter}function er(g,_,k,P){var W=Ve(g.getCursor()),H=k?1:-1,K=k?g.lineCount():-1,Y=W.ch,J=W.line,ie=g.getLine(J),se={lineText:ie,nextCh:ie.charAt(Y),lastCh:null,index:Y,symb:P,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:k,depth:0,curMoveThrough:!1},ye=Ai[P];if(!ye)return W;var Se=$i[ye].init,de=$i[ye].isComplete;for(Se&&Se(se);J!==K&&_;){if(se.index+=H,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(J+=H,se.lineText=g.getLine(J)||"",H>0)se.index=0;else{var we=se.lineText.length;se.index=we>0?we-1:0}se.nextCh=se.lineText.charAt(se.index)}de(se)&&(W.line=J,W.ch=se.index,_--)}return se.nextCh||se.curMoveThrough?new Ie(J,se.index):W}function Mr(g,_,k,P,W){var H=_.line,K=_.ch,Y=g.getLine(H),J=k?1:-1,ie=P?Bi:Fr;if(W&&Y==""){if(H+=J,Y=g.getLine(H),!a(g,H))return null;K=k?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:H};for(var se=J>0?Y.length:-1,ye=se,Se=se;K!=se;){for(var de=!1,we=0;we<ie.length&&!de;++we)if(ie[we](Y.charAt(K))){for(ye=K;K!=se&&ie[we](Y.charAt(K));)K+=J;if(Se=K,de=ye!=Se,ye==_.ch&&H==_.line&&Se==ye+J)continue;return{from:Math.min(ye,Se+1),to:Math.max(ye,Se),line:H}}de||(K+=J)}if(H+=J,!a(g,H))return null;Y=g.getLine(H),K=J>0?0:Y.length}}function Vn(g,_,k,P,W,H){var K=Ve(_),Y=[];(P&&!W||!P&&W)&&k++;for(var J=!P||!W,ie=0;ie<k;ie++){var se=Mr(g,_,P,H,J);if(!se){var ye=Pt(g,g.lastLine());Y.push(P?{line:g.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),_=new Ie(se.line,P?se.to-1:se.from)}var Se=Y.length!=k,de=Y[0],we=Y.pop();return P&&!W?(!Se&&(de.from!=K.ch||de.line!=K.line)&&(we=Y.pop()),new Ie(we.line,we.from)):P&&W?new Ie(we.line,we.to-1):!P&&W?(!Se&&(de.to!=K.ch||de.line!=K.line)&&(we=Y.pop()),new Ie(we.line,we.to)):new Ie(we.line,we.from)}function Tr(g,_,k,P,W){var H=_,K=new Ie(H.line+k.repeat-1,1/0),Y=g.clipPos(K);return Y.ch--,W||(P.lastHPos=1/0,P.lastHSPos=g.charCoords(Y,"div").left),K}function Zr(g,_,k,P,W){for(var H=W||g.getCursor(),K=H.ch,Y,J=0;J<_;J++){var ie=g.getLine(H.line);if(Y=Cs(K,ie,P,k),Y==-1)return null;K=Y}return new Ie(g.getCursor().line,Y)}function ks(g,_){var k=g.getCursor().line;return ue(g,new Ie(k,_-1))}function ki(g,_,k,P){!y(k,br)&&!Rt.test(k)||(_.marks[k]&&_.marks[k].clear(),_.marks[k]=g.setBookmark(P))}function Cs(g,_,k,P,W){var H;return P?(H=_.indexOf(k,g+1),H!=-1):(H=_.lastIndexOf(k,g-1),H!=-1),H}function yo(g,_,k,P,W){function H(We){return!/\S/.test(g.getLine(We))}function K(We,Xe,Ze){return Ze?H(We)!=H(We+Xe):!H(We)&&H(We+Xe)}function Y(We){P=P>0?1:-1;var Xe=g.ace.session.getFoldLine(We);Xe&&We+P>Xe.start.row&&We+P<Xe.end.row&&(P=(P>0?Xe.end.row:Xe.start.row)-We)}var J=_.line,ie=g.firstLine(),se=g.lastLine(),ye,Se,de=J;if(P){for(;ie<=de&&de<=se&&k>0;)Y(de),K(de,P)&&k--,de+=P;return new Ie(de,0)}var we=g.state.vim;if(we.visualLine&&K(J,1,!0)){var Re=we.sel.anchor;K(Re.line,-1,!0)&&(!W||Re.line!=J)&&(J+=1)}var Le=H(J);for(de=J;de<=se&&k;de++)K(de,1,!0)&&(!W||H(de)!=Le)&&k--;for(Se=new Ie(de,0),de>se&&!Le?Le=!0:W=!1,de=J;de>ie&&!((!W||H(de)==Le||de==J)&&K(de,-1,!0));de--);return ye=new Ie(de,0),{start:ye,end:Se}}function Go(g,_,k,P,W){function H(ie){ie.pos+ie.dir<0||ie.pos+ie.dir>=ie.line.length?ie.line=null:ie.pos+=ie.dir}function K(ie,se,ye,Se){var de=ie.getLine(se),we={line:de,ln:se,pos:ye,dir:Se};if(we.line==="")return{ln:we.ln,pos:we.pos};var Re=we.pos;for(H(we);we.line!==null;){if(Re=we.pos,m(we.line[we.pos])){if(!W)return{ln:we.ln,pos:we.pos+1};for(H(we);we.line!==null&&h(we.line[we.pos]);)Re=we.pos,H(we);return{ln:we.ln,pos:Re+1}}H(we)}return{ln:we.ln,pos:Re+1}}function Y(ie,se,ye,Se){var de=ie.getLine(se),we={line:de,ln:se,pos:ye,dir:Se};if(we.line==="")return{ln:we.ln,pos:we.pos};var Re=we.pos;for(H(we);we.line!==null;){if(!h(we.line[we.pos])&&!m(we.line[we.pos]))Re=we.pos;else if(m(we.line[we.pos]))return W?h(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Re}:{ln:we.ln,pos:Re};H(we)}return we.line=de,W&&h(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Re}}for(var J={ln:_.line,pos:_.ch};k>0;)P<0?J=Y(g,J.ln,J.pos,P):J=K(g,J.ln,J.pos,P),k--;return new Ie(J.ln,J.pos)}function tr(g,_,k,P){function W(J,ie){if(ie.pos+ie.dir<0||ie.pos+ie.dir>=ie.line.length){if(ie.ln+=ie.dir,!a(J,ie.ln)){ie.line=null,ie.ln=null,ie.pos=null;return}ie.line=J.getLine(ie.ln),ie.pos=ie.dir>0?0:ie.line.length-1}else ie.pos+=ie.dir}function H(J,ie,se,ye){var Le=J.getLine(ie),Se=Le==="",de={line:Le,ln:ie,pos:se,dir:ye},we={ln:de.ln,pos:de.pos},Re=de.line==="";for(W(J,de);de.line!==null;){if(we.ln=de.ln,we.pos=de.pos,de.line===""&&!Re)return{ln:de.ln,pos:de.pos};if(Se&&de.line!==""&&!h(de.line[de.pos]))return{ln:de.ln,pos:de.pos};m(de.line[de.pos])&&!Se&&(de.pos===de.line.length-1||h(de.line[de.pos+1]))&&(Se=!0),W(J,de)}var Le=J.getLine(we.ln);we.pos=0;for(var We=Le.length-1;We>=0;--We)if(!h(Le[We])){we.pos=We;break}return we}function K(J,ie,se,ye){var Re=J.getLine(ie),Se={line:Re,ln:ie,pos:se,dir:ye},de={ln:Se.ln,pos:null},we=Se.line==="";for(W(J,Se);Se.line!==null;){if(Se.line===""&&!we)return de.pos!==null?de:{ln:Se.ln,pos:Se.pos};if(!(!m(Se.line[Se.pos])||de.pos===null||Se.ln===de.ln&&Se.pos+1===de.pos))return de;Se.line!==""&&!h(Se.line[Se.pos])&&(we=!1,de={ln:Se.ln,pos:Se.pos}),W(J,Se)}var Re=J.getLine(de.ln);de.pos=0;for(var Le=0;Le<Re.length;++Le)if(!h(Re[Le])){de.pos=Le;break}return de}for(var Y={ln:_.line,pos:_.ch};k>0;)P<0?Y=K(g,Y.ln,Y.pos,P):Y=H(g,Y.ln,Y.pos,P),k--;return new Ie(Y.ln,Y.pos)}function yn(g,_,k,P){var W=_,H,K,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],J={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],ie=g.getLine(W.line).charAt(W.ch),se=ie===J?1:0;if(H=g.scanForBracket(new Ie(W.line,W.ch+se),-1,void 0,{bracketRegex:Y}),K=g.scanForBracket(new Ie(W.line,W.ch+se),1,void 0,{bracketRegex:Y}),!H||!K)return null;if(H=H.pos,K=K.pos,H.line==K.line&&H.ch>K.ch||H.line>K.line){var ye=H;H=K,K=ye}return P?K.ch+=1:H.ch+=1,{start:H,end:K}}function Yn(g,_,k,P){var W=Ve(_),H=g.getLine(W.line),K=H.split(""),Y,J,ie,se,ye=K.indexOf(k);if(W.ch<ye)W.ch=ye;else if(ye<W.ch&&K[W.ch]==k){var Se=/string/.test(g.getTokenTypeAt(me(_,0,1))),de=/string/.test(g.getTokenTypeAt(_)),we=Se&&!de;we||(J=W.ch,--W.ch)}if(K[W.ch]==k&&!J)Y=W.ch+1;else for(ie=W.ch;ie>-1&&!Y;ie--)K[ie]==k&&(Y=ie+1);if(Y&&!J)for(ie=Y,se=K.length;ie<se&&!J;ie++)K[ie]==k&&(J=ie);return!Y||!J?{start:W,end:W}:(P&&(--Y,++J),{start:new Ie(W.line,Y),end:new Ie(W.line,J)})}function nr(){}function an(g){var _=g.state.vim;return _.searchState_||(_.searchState_=new nr)}function Zn(g){return ir(g,"/")}function gr(g){return wo(g,"/")}function ir(g,_){var k=wo(g,_)||[];if(!k.length)return[];var P=[];if(k[0]===0){for(var W=0;W<k.length;W++)typeof k[W]=="number"&&P.push(g.substring(k[W]+1,k[W+1]));return P}}function wo(g,_){_||(_="/");for(var k=!1,P=[],W=0;W<g.length;W++){var H=g.charAt(W);!k&&H==_&&P.push(W),k=!k&&H=="\\"}return P}function qo(g){for(var _="|(){",k="}",P=!1,W=[],H=-1;H<g.length;H++){var K=g.charAt(H)||"",Y=g.charAt(H+1)||"",J=Y&&_.indexOf(Y)!=-1;P?((K!=="\\"||!J)&&W.push(K),P=!1):K==="\\"?(P=!0,Y&&k.indexOf(Y)!=-1&&(J=!0),(!J||Y==="\\")&&W.push(K)):(W.push(K),J&&Y!=="\\"&&W.push("\\"))}return W.join("")}function _s(g){for(var _=!1,k=[],P=-1;P<g.length;P++){var W=g.charAt(P)||"",H=g.charAt(P+1)||"";Ui[W+H]?(k.push(Ui[W+H]),P++):_?(k.push(W),_=!1):W==="\\"?(_=!0,n(H)||H==="$"?k.push("$"):H!=="/"&&H!=="\\"&&k.push("\\")):(W==="$"&&k.push("$"),k.push(W),H==="/"&&k.push("\\"))}return k.join("")}function As(g){for(var _=new De.StringStream(g),k=[];!_.eol();){for(;_.peek()&&_.peek()!="\\";)k.push(_.next());var P=!1;for(var W in Wn)if(_.match(W,!0)){P=!0,k.push(Wn[W]);break}P||k.push(_.next())}return k.join("")}function rr(g,_,k){var P=Pe.registerController.getRegister("/");if(P.setText(g),g instanceof RegExp)return g;var W=gr(g),H,K;if(!W.length)H=g;else{H=g.substring(0,W[0]);var Y=g.substring(W[0]);K=Y.indexOf("i")!=-1}if(!H)return null;C("pcre")||(H=qo(H)),k&&(_=/^[^A-Z]*$/.test(H));var J=new RegExp(H,_||K?"im":"m");return J}function Ci(g){typeof g=="string"&&(g=document.createElement(g));for(var _,k=1;k<arguments.length;k++)if(_=arguments[k])if(typeof _!="object"&&(_=document.createTextNode(_)),_.nodeType)g.appendChild(_);else for(var P in _)Object.prototype.hasOwnProperty.call(_,P)&&(P[0]==="$"?g.style[P.slice(1)]=_[P]:g.setAttribute(P,_[P]));return g}function _t(g,_){var k=Ci("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},_);g.openNotification?g.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function Yo(g,_){return Ci("div",{$display:"flex"},Ci("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},g,Ci("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),_&&Ci("span",{$color:"#888"},_))}function Qn(g,_){if(si.length){_.value||(_.value=""),Xt=_;return}var k=Yo(_.prefix,_.desc);if(g.openDialog)g.openDialog(k,_.onClose,{onKeyDown:_.onKeyDown,onKeyUp:_.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:_.value});else{var P="";typeof _.prefix!="string"&&_.prefix&&(P+=_.prefix.textContent),_.desc&&(P+=" "+_.desc),_.onClose(prompt(P,""))}}function wn(g,_){if(g instanceof RegExp&&_ instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],P=0;P<k.length;P++){var W=k[P];if(g[W]!==_[W])return!1}return!0}return!1}function Qt(g,_,k,P){if(_){var W=an(g),H=rr(_,!!k,!!P);if(H)return Fi(g,H),wn(H,W.getQuery())||W.setQuery(H),H}}function un(g){if(g.source.charAt(0)=="^")var _=!0;return{token:function(k){if(_&&!k.sol()){k.skipToEnd();return}var P=k.match(g,!1);if(P)return P[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!g.exec(k.next()+P[0]))?(k.next(),null):(k.match(g),"searching");for(;!k.eol()&&(k.next(),!k.match(g,!1)););},query:g}}function Fi(g,_){clearTimeout(Bn);var k=an(g);k.highlightTimeout=Bn,Bn=setTimeout(function(){if(g.state.vim){var P=an(g);P.highlightTimeout=null;var W=P.getOverlay();(!W||_!=W.query)&&(W&&g.removeOverlay(W),W=un(_),g.addOverlay(W),g.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(g.showMatchesOnScrollbar(_))),P.setOverlay(W))}},50)}function Jn(g,_,k,P){return P===void 0&&(P=1),g.operation(function(){for(var W=g.getCursor(),H=g.getSearchCursor(k,W),K=0;K<P;K++){var Y=H.find(_);if(K==0&&Y&&ot(H.from(),W)){var J=_?H.from():H.to();Y=H.find(_),Y&&!Y[0]&&ot(H.from(),J)&&g.getLine(J.line).length==J.ch&&(Y=H.find(_))}if(!Y&&(H=g.getSearchCursor(k,_?new Ie(g.lastLine()):new Ie(g.firstLine(),0)),!H.find(_)))return}return H.from()})}function Pi(g,_,k,P,W){return P===void 0&&(P=1),g.operation(function(){var H=g.getCursor(),K=g.getSearchCursor(k,H),Y=K.find(!_);!W.visualMode&&Y&&ot(K.from(),H)&&K.find(!_);for(var J=0;J<P;J++)if(Y=K.find(_),!Y&&(K=g.getSearchCursor(k,_?new Ie(g.lastLine()):new Ie(g.firstLine(),0)),!K.find(_)))return;return[K.from(),K.to()]})}function Qr(g){var _=an(g);_.highlightTimeout&&(clearTimeout(_.highlightTimeout),_.highlightTimeout=null),g.removeOverlay(an(g).getOverlay()),_.setOverlay(null),_.getScrollbarAnnotate()&&(_.getScrollbarAnnotate().clear(),_.setScrollbarAnnotate(null))}function bo(g,_,k){return typeof g!="number"&&(g=g.line),_ instanceof Array?y(g,_):typeof k=="number"?g>=_&&g<=k:g==_}function mr(g){var _=g.ace.renderer;return{top:_.getFirstFullyVisibleRow(),bottom:_.getLastFullyVisibleRow()}}function fi(g,_,k){if(k=="'"||k=="`")return Pe.jumpList.find(g,-1)||new Ie(0,0);if(k==".")return Lr(g);var P=_.marks[k];return P&&P.find()}function Lr(g){if(g.getLastEditEnd)return g.getLastEditEnd();for(var _=g.doc.history.done,k=_.length;k--;)if(_[k].changes)return Ve(_[k].changes[0].to)}function Jr(g,_,k,P,W,H,K,Y,J){function ie(){g.operation(function(){for(;!Re;)se(),Se();de()})}function se(){var Ze=g.getRange(H.from(),H.to()),Ke=Ze.replace(K,Y),jt=H.to().line;H.replace(Ke),We=H.to().line,W+=We-jt,Xe=We<jt}function ye(){var Ze=Le&&Ve(H.to()),Ke=H.findNext();return Ke&&!Ke[0]&&Ze&&ot(H.from(),Ze)&&(Ke=H.findNext()),Ke}function Se(){for(;ye()&&bo(H.from(),P,W);)if(!(!k&&H.from().line==We&&!Xe)){g.scrollIntoView(H.from(),30),g.setSelection(H.from(),H.to()),Le=H.from(),Re=!1;return}Re=!0}function de(Ze){if(Ze&&Ze(),g.focus(),Le){g.setCursor(Le);var Ke=g.state.vim;Ke.exMode=!1,Ke.lastHPos=Ke.lastHSPos=Le.ch}J&&J()}function we(Ze,Ke,jt){De.e_stop(Ze);var tt=z(Ze);switch(tt){case"y":se(),Se();break;case"n":Se();break;case"a":var tn=J;J=void 0,g.operation(ie),J=tn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":de(jt)}return Re&&de(jt),!0}g.state.vim.exMode=!0;var Re=!1,Le,We,Xe;if(Se(),Re){_t(g,"No matches for "+K.source);return}if(!_){ie(),J&&J();return}Qn(g,{prefix:Ci("span","replace with ",Ci("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function pi(g,_){var k=g.state.vim,P=Pe.macroModeState,W=Pe.registerController.getRegister("."),H=P.isPlaying,K=P.lastInsertModeChanges;H||(g.off("change",Er),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,De.off(g.getInputField(),"keydown",Co)),!H&&k.insertModeRepeat>1&&(Zo(g,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,_||g.setCursor(g.getCursor().line,g.getCursor().ch-1),g.setOption("keyMap","vim"),g.setOption("disableInput",!0),g.toggleOverwrite(!1),W.setText(K.changes.join("")),De.signal(g,"vim-mode-change",{mode:"normal"}),P.isRecording&&En(P)}function Xr(g){ln.unshift(g)}function xo(g,_,k,P,W){var H={keys:g,type:_};H[_]=k,H[_+"Args"]=P;for(var K in W)H[K]=W[K];Xr(H)}function So(g,_,k,P){var W=Pe.registerController.getRegister(P);if(P==":"){W.keyBuffer[0]&&Kn.processCommand(g,W.keyBuffer[0]),k.isPlaying=!1;return}var H=W.keyBuffer,K=0;k.isPlaying=!0,k.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<H.length;Y++)for(var J=H[Y],ie,se;J;)if(ie=/<\w+-.+?>|<\w+>|./.exec(J),se=ie[0],J=J.substring(ie.index+se.length),ct.handleKey(g,se,"macro"),_.insertMode){var ye=W.insertModeChanges[K++].changes;Pe.macroModeState.lastInsertModeChanges.changes=ye,ro(g,ye,1),pi(g)}k.isPlaying=!1}function eo(g,_){if(!g.isPlaying){var k=g.latestRegister,P=Pe.registerController.getRegister(k);P&&P.pushText(_)}}function En(g){if(!g.isPlaying){var _=g.latestRegister,k=Pe.registerController.getRegister(_);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(g.lastInsertModeChanges)}}function ko(g,_){if(!g.isPlaying){var k=g.latestRegister,P=Pe.registerController.getRegister(k);P&&P.pushSearchQuery&&P.pushSearchQuery(_)}}function Er(g,_){var k=Pe.macroModeState,P=k.lastInsertModeChanges;if(!k.isPlaying)for(var W=g.state.vim;_;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if(_.origin=="+input"||_.origin=="paste"||_.origin===void 0){var H=g.listSelections().length;H>1&&(P.ignoreCount=H);var K=_.text.join(`
|
|
1407
|
-
`);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),K)if(g.state.overwrite&&!/\n/.test(K))P.changes.push([K]);else{if(K.length>1){var Y=
|
|
1408
|
-
`)},goLineLeft:function(g){g.ace.selection.moveCursorLineStart()},goLineRight:function(g){g.ace.selection.moveCursorLineEnd()}},De.keyMap={},De.addClass=De.rmClass=function(){},De.e_stop=De.e_preventDefault=Ir.stopEvent,De.keyName=function(g){var _=$s[g.keyCode]||g.key||"";return _.length==1&&(_=_.toUpperCase()),_=Ir.getModifierString(g).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+_,_},De.keyMap.default=function(g){return function(_){var k=_.ace.commands.commandKeyBinding[g.toLowerCase()];return k&&_.ace.execCommand(k)!==!1}},De.lookupKey=function g(_,k,P){k||(k="default"),typeof k=="string"&&(k=De.keyMap[k]||De.keyMap.default);var
|
|
1409
|
-
`,K=!1);var Y=new sr;P.ch==null&&(P.ch=Number.MAX_VALUE);var J={row:P.line,column:P.ch},ie=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:k,caseSensitive:H,wrap:!1,backwards:ye,regExp:K,start:se||J});var Se=Y.find(ie.ace.session);return se=Se,se&&[!se.isEmpty()]},from:function(){return se&&v(se.start)},to:function(){return se&&v(se.end)},replace:function(ye){se&&(se.end=ie.ace.session.doc.replace(se,ye))}}},this.scrollTo=function(k,P){var
|
|
1399
|
+
`),v=!0;continue;case"&":this.line+=o.substring(0,o.length-1);continue;default:this.line+=o}v=!1;let r=/("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g,n=this.scan_string(this.line,r),i="";if(n.length>0&&(i=i+n[0]),i.length===0||i.charAt(0)==="#"?this.keyword=null:this.keyword=i.toUpperCase(),this.parameters=[],this.keyword===null){u&&b(this.keyword,this.parameters,this.line,this.lineNumber),this.line="";continue}let h=n.length;if(h>1)for(let m=1;m<h;m++){let y=n[m];if(y.length>0&&y.charAt(0)==="#")break;$?this.parameters.push(this.remove_quotes(y)):this.parameters.push(y)}b(this.keyword,this.parameters,this.line,this.lineNumber),this.line=""}}}function Js(l){return VS.test(l)}const VS=/^-?[0-9]+$/;function Sg(l){return jS.test(l)}const jS=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function kg(l,c){if(Js(l))return Number.isSafeInteger(Number.parseInt(l,10));const e=Number.parseFloat(l),u=String(e);if(l===u)return!0;const $=yf(l),b=yf(u);return!!($===b||(c==null?void 0:c.approx)===!0&&!Js(l)&&b.length>=14&&$.startsWith(b.substring(0,14)))}let js=function(l){return l.underflow="underflow",l.overflow="overflow",l.truncate_integer="truncate_integer",l.truncate_float="truncate_float",l}({});function KS(l){if(kg(l,{approx:!1}))return;if(Js(l))return js.truncate_integer;const c=Number.parseFloat(l);return Number.isFinite(c)?c===0?js.underflow:js.truncate_float:js.overflow}function yf(l){const{start:c,end:e}=GS(l),u=l.substring(c,e),$=u.indexOf(".");return $===-1?u:u.substring(0,$)+u.substring($+1)}function GS(l){let c=0;for(l[0]==="-"&&c++;l[c]==="0"||l[c]===".";)c++;let e=l.lastIndexOf("e");for(e===-1&&(e=l.lastIndexOf("E")),e===-1&&(e=l.length);(l[e-1]==="0"||l[e-1]===".")&&e>c;)e--;return{start:c,end:e}}class qS{constructor(c){if(Ar(this,"isLosslessNumber",!0),!Sg(c))throw new Error(`Invalid number (value: "${c}")`);this.value=c}valueOf(){const c=KS(this.value);if(c===void 0||c===js.truncate_float)return Number.parseFloat(this.value);if(Js(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${c} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function YS(l){return l&&typeof l=="object"&&l.isLosslessNumber||!1}function ZS(l){return new qS(l)}function QS(l,c){return Du({"":l},"",l,c)}function Du(l,c,e,u){return Array.isArray(e)?u.call(l,c,XS(e,u)):e&&typeof e=="object"&&!YS(e)?u.call(l,c,JS(e,u)):u.call(l,c,e)}function JS(l,c){for(const e of Object.keys(l)){const u=Du(l,e,l[e],c);u!==void 0?l[e]=u:delete l[e]}return l}function XS(l,c){for(let e=0;e<l.length;e++)l[e]=Du(l,String(e),l[e],c);return l}function ek(l,c,e){const u=typeof e=="function"?{parseNumber:e}:e,$=(u==null?void 0:u.parseNumber)??ZS,b=(u==null?void 0:u.onDuplicateKey)??E;let v=0;const x=o();return m(x),R(),c?QS(x,c):x;function p(){if(l.charCodeAt(v)===sk){v++,s();const W={};let V=!0;for(;v<l.length&&l.charCodeAt(v)!==bf;){V?V=!1:(i(),s());const G=v,Z=r();if(Z===void 0){w();return}s(),h();const ee=o();if(ee===void 0){F();return}if(Object.prototype.hasOwnProperty.call(W,Z)&&!yu(ee,W[Z])){const ce=b({key:Z,position:G+1,oldValue:W[Z],newValue:ee});ce!==void 0&&(W[Z]=ce)}else W[Z]=ee}return l.charCodeAt(v)!==bf&&D(),v++,W}}function d(){if(l.charCodeAt(v)===ak){v++,s();const W=[];let V=!0;for(;v<l.length&&l.charCodeAt(v)!==xf;){V?V=!1:i();const G=o();y(G),W.push(G)}return l.charCodeAt(v)!==xf&&I(),v++,W}}function o(){s();const W=r()??n()??p()??d()??a("true",!0)??a("false",!1)??a("null",null);return s(),W}function a(W,V){if(l.slice(v,v+W.length)===W)return v+=W.length,V}function s(){for(;tk(l.charCodeAt(v));)v++}function r(){if(l.charCodeAt(v)===Sc){v++;let W="";for(;v<l.length&&l.charCodeAt(v)!==Sc;){if(l.charCodeAt(v)===ok){const V=l[v+1],G=rk[V];G!==void 0?(W+=G,v++):V==="u"?za(l.charCodeAt(v+2))&&za(l.charCodeAt(v+3))&&za(l.charCodeAt(v+4))&&za(l.charCodeAt(v+5))?(W+=String.fromCharCode(Number.parseInt(l.slice(v+2,v+6),16)),v+=5):O(v):z(v)}else ik(l.charCodeAt(v))?W+=l[v]:L(l[v]);v++}return C(),v++,W}}function n(){const W=v;if(l.charCodeAt(v)===Sf&&(v++,T(W)),l.charCodeAt(v)===Fu)v++;else if(nk(l.charCodeAt(v)))for(v++;Ua(l.charCodeAt(v));)v++;if(l.charCodeAt(v)===gk)for(v++,T(W);Ua(l.charCodeAt(v));)v++;if(l.charCodeAt(v)===bk||l.charCodeAt(v)===wk)for(v++,(l.charCodeAt(v)===Sf||l.charCodeAt(v)===dk)&&v++,T(W);Ua(l.charCodeAt(v));)v++;if(v>W)return $(l.slice(W,v))}function i(){if(l.charCodeAt(v)!==pk)throw new SyntaxError(`Comma ',' expected after value ${N()}`);v++}function h(){if(l.charCodeAt(v)!==mk)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);v++}function m(W){if(W===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function y(W){if(W===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function R(){if(v<l.length)throw new SyntaxError(`Expected end of input ${N()}`)}function T(W){if(!Ua(l.charCodeAt(v))){const V=l.slice(W,v);throw new SyntaxError(`Invalid number '${V}', expecting a digit ${N()}`)}}function C(){if(l.charCodeAt(v)!==Sc)throw new SyntaxError(`End of string '"' expected ${N()}`)}function w(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function E(W){let{key:V,position:G}=W;throw new SyntaxError(`Duplicate key '${V}' encountered at position ${G}`)}function D(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function I(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function L(W){throw new SyntaxError(`Invalid character '${W}' ${A()}`)}function z(W){const V=l.slice(W,W+2);throw new SyntaxError(`Invalid escape character '${V}' ${A()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${A()}`)}function O(W){const V=l.slice(W,W+6);throw new SyntaxError(`Invalid unicode character '${V}' ${A()}`)}function A(){return`at position ${v}`}function S(){return v<l.length?`but got '${l[v]}'`:"but reached end of input"}function N(){return`${S()} ${A()}`}}function tk(l){return l===lk||l===ck||l===uk||l===hk}function za(l){return l>=Fu&&l<=Pu||l>=vk&&l<=xk||l>=yk&&l<=Sk}function Ua(l){return l>=Fu&&l<=Pu}function nk(l){return l>=fk&&l<=Pu}function ik(l){return l>=32&&l<=1114111}function yu(l,c){return l===c?!0:Array.isArray(l)&&Array.isArray(c)?l.length===c.length&&l.every((e,u)=>yu(e,c[u])):wf(l)&&wf(c)?[...new Set([...Object.keys(l),...Object.keys(c)])].every(e=>yu(l[e],c[e])):!1}function wf(l){return typeof l=="object"&&l!==null}const rk={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
1400
|
+
`,r:"\r",t:" "},ok=92,sk=123,bf=125,ak=91,xf=93,lk=32,ck=10,uk=9,hk=13,Sc=34,dk=43,Sf=45,Fu=48,fk=49,Pu=57,pk=44,gk=46,mk=58,vk=65,yk=97,wk=69,bk=101,xk=70,Sk=102;function Cg(l,c,e,u){return b(l);function b(d,o){if(Array.isArray(u)){const a=u.find(s=>s.test(d));if(a){const s=a.stringify(d);if(typeof s!="string"||!Sg(s))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${s})`);return s}}if(typeof d=="boolean"||typeof d=="number"||typeof d=="string"||d===null||d instanceof Date||d instanceof Boolean||d instanceof Number||d instanceof String)return JSON.stringify(d);if(d!=null&&d.isLosslessNumber||typeof d=="bigint")return d.toString();if(Array.isArray(d))return v(d);if(d&&typeof d=="object")return x(d)}function v(d,o){if(d.length===0)return"[]";let a="[";for(let s=0;s<d.length;s++){const r=d[s];typeof r<"u"&&typeof r!="function"?a+=b(r):a+="null",s<d.length-1&&(a+=",")}return a+="]",a}function x(d,o){if(typeof d.toJSON=="function")return Cg(d.toJSON(),c,e,void 0);const a=Array.isArray(c)?c.map(String):Object.keys(d);if(a.length===0)return"{}";let s=!0,r="{";for(const n of a){const i=d[n];if(p(n,i)){s?s=!1:r+=",";const h=JSON.stringify(n);r+=`${h}:`,r+=b(i)}}return r+="}",r}function p(d,o){return typeof o<"u"&&typeof o!="function"&&typeof o!="symbol"}}function kk(l){return Js(l)&&!kg(l)?BigInt(l):parseFloat(l)}class Ck{constructor(){Ar(this,"id",1)}async exec(c,e,u={},$={},b=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return u.scope=window.openc3Scope,$.manual=!0,(await Iu.post("/openc3-api/api",{jsonrpc:"2.0",method:c,params:e,id:this.id,keyword_params:u},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...$},timeout:b,transformRequest:[(v,x)=>Cg(v)],transformResponse:[v=>ek(v,void 0,kk)]})).data.result}catch(v){let x=new Error;throw v.response?(x.name=v.response.data.error.data.class,x.message=v.response.data.error.data.message,x.object=v.response.data.error):v.request?(x.name="Request error",x.message="Request error, no response received"):x=v,x}}decode_openc3_type(c){if(c!==null&&typeof c=="object"&&c.json_class=="Float"&&c.raw){if(c.raw=="NaN")return NaN;if(c.raw=="Infinity")return 1/0;if(c.raw=="-Infinity")return-1/0}return null}encode_openc3_type(c){return Number.isNaN(c)?{json_class:"Float",raw:"NaN"}:c==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:c==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(c=>{c&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(c){return this.exec("set_offline_access",[c])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(c,e,u,$,b){return this.exec("map_target_to_interface",[c,e],{cmd_only:u,tlm_only:$,unmap_old:b})}unmap_target_from_interface(c,e,u,$){return this.exec("unmap_target_from_interface",[c,e],{cmd_only:u,tlm_only:$})}connect_interface(c,...e){return e.length>0?this.exec("connect_interface",[c,...e]):this.exec("connect_interface",[c])}disconnect_interface(c){return this.exec("disconnect_interface",[c])}interface_cmd(c,e,...u){return this.exec("interface_cmd",[c,e,...u])}interface_target_enable(c,e,u=!1,$=!1){return this.exec("interface_target_enable",[c,e],{cmd_only:u,tlm_only:$})}interface_target_disable(c,e,u=!1,$=!1){return this.exec("interface_target_disable",[c,e],{cmd_only:u,tlm_only:$})}interface_details(c){return this.exec("interface_details",[c])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(c,e,u,$,b){return this.exec("map_target_to_router",[c,e],{cmd_only:u,tlm_only:$,unmap_old:b})}unmap_target_from_router(c,e,u,$){return this.exec("unmap_target_from_router",[c,e],{cmd_only:u,tlm_only:$})}connect_router(c){return this.exec("connect_router",[c])}disconnect_router(c){return this.exec("disconnect_router",[c])}router_target_enable(c,e,u=!1,$=!1){return this.exec("router_target_enable",[c,e],{cmd_only:u,tlm_only:$})}router_target_disable(c,e,u=!1,$=!1){return this.exec("router_target_disable",[c,e],{cmd_only:u,tlm_only:$})}router_details(c){return this.exec("router_details",[c])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(c){return this.exec("get_tlm_cnts",[c])}get_item(c,e,u){return this.exec("get_item",[c,e,u])}get_param(c,e,u){return this.exec("get_param",[c,e,u])}get_parameter(c,e,u){return this.exec("get_param",[c,e,u])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(c){return this.exec("set_limits_set",[c])}get_target(c){return this.exec("get_target",[c])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(c,e){return this.exec("get_tlm",[c,e])}get_telemetry(c,e){return this.exec("get_tlm",[c,e])}get_all_tlm(c){return this.exec("get_all_tlm",[c])}get_all_telemetry(c){return this.exec("get_all_tlm",[c])}get_all_tlm_names(c,e=!1){return this.exec("get_all_tlm_names",[c],{hidden:e})}get_all_telemetry_names(c){return this.exec("get_all_tlm_names",[c])}get_all_tlm_item_names(c){return this.exec("get_all_tlm_item_names",[c])}async get_tlm_packet(c,e,u,$=30){const b=await this.exec("get_tlm_packet",[c,e],{type:u,stale_time:$});if(b!=null){let v=b.length,x=null;for(let p=0;p<v;p++)x=this.decode_openc3_type(b[p][1]),x!==null&&(b[p][1]=x)}return b}get_packet_derived_items(c,e){return this.exec("get_packet_derived_items",[c,e])}get_tlm_buffer(c,e){return this.exec("get_tlm_buffer",[c,e])}get_tlm_available(c){return this.exec("get_tlm_available",[c])}async get_tlm_values(c,e=30,u=null,$=null,b=null){let v={stale_time:e};u!==null&&(v.cache_timeout=u),$!==null&&(v.start_time=$.toISOString()),b!==null&&(v.end_time=b.toISOString());const x=await this.exec("get_tlm_values",[c],v,{},1e4);if(x&&x.length>0){let p=x.length,d=null;for(let o=0;o<p;o++)d=this.decode_openc3_type(x[o][0]),d!==null&&(x[o][0]=d)}return x}get_limits(c,e,u){return this.exec("get_limits",[c,e,u])}async tlm(c,e,u,$="CONVERTED"){let b=null;if(e===void 0)b=await this.exec("tlm",[c]);else if(u===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(e))b=await this.exec("tlm",[c],{type:e});else{let x=new Error;throw x.name="TypeError",x.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,x}else b=await this.exec("tlm",[c,e,u],{type:$});let v=this.decode_openc3_type(b);return v!==null&&(b=v),b}async inject_tlm(c,e,u=null,$="CONVERTED"){await this.exec("inject_tlm",[c,e,u],{type:$})}set_tlm(c,e,u,$){return this.exec("set_tlm",[c,e,u],{type:$})}override_tlm(c,e,u,$){return this.exec("override_tlm",[c,e,u],{type:$})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(c,e,u,$){return this.exec("normalize_tlm",[c,e,u],{type:$})}get_all_cmds(c){return this.exec("get_all_cmds",[c])}get_all_commands(c){return this.exec("get_all_cmds",[c])}get_all_cmd_names(c,e=!1){return this.exec("get_all_cmd_names",[c],{hidden:e})}get_all_command_names(c){return this.exec("get_all_cmd_names",[c])}get_cmd(c,e){return this.exec("get_cmd",[c,e])}get_command(c,e){return this.exec("get_cmd",[c,e])}get_cmd_cnts(c){return this.exec("get_cmd_cnts",[c])}get_cmd_value(c,e,u,$="CONVERTED"){return this.exec("get_cmd_value",[c,e,u,$])}get_cmd_buffer(c,e){return this.exec("get_cmd_buffer",[c,e])}_cmd(c,e,u,$,b,v={}){let x=null;for(let p in $)Object.prototype.hasOwnProperty.call($,p)&&(x=this.encode_openc3_type($[p]),x!==null&&($[p]=x));return this.exec(c,[e,u,$],v,b)}get_cmd_hazardous(c,e,u,$={}){return e===void 0?this.exec("get_cmd_hazardous",c,{},$):this._cmd("get_cmd_hazardous",c,e,u,$)}cmd(c,e,u,$={},b={}){return e===void 0?this.exec("cmd",c,b,$):this._cmd("cmd",c,e,u,$,b)}cmd_no_range_check(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_no_range_check",c,b,$):this._cmd("cmd_no_range_check",c,e,u,$,b)}cmd_raw(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_raw",c,b,$):this._cmd("cmd_raw",c,e,u,$,b)}cmd_raw_no_range_check(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_raw_no_range_check",c,b,$):this._cmd("cmd_raw_no_range_check",c,e,u,$,b)}cmd_no_hazardous_check(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_no_hazardous_check",c,b,$):this._cmd("cmd_no_hazardous_check",c,e,u,$,b)}cmd_no_checks(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_no_checks",c,b,$):this._cmd("cmd_no_checks",c,e,u,$,b)}cmd_raw_no_hazardous_check(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",c,b,$):this._cmd("cmd_raw_no_hazardous_check",c,e,u,$,b)}cmd_raw_no_checks(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_raw_no_checks",c,b,$):this._cmd("cmd_raw_no_checks",c,e,u,$,b)}build_cmd(c,e,u,$={},b={}){return e===void 0?this.exec("build_cmd",c,b,$):this._cmd("build_cmd",c,e,u,$,b)}build_command(c,e,u,$={},b={}){return e===void 0?this.exec("build_cmd",c,b,$):this._cmd("build_cmd",c,e,u,$,b)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(c,e){return this.exec("send_raw",[c,e])}list_configs(c){return this.exec("list_configs",[c])}load_config(c,e){return this.exec("load_config",[c,e])}save_config(c,e,u){return this.exec("save_config",[c,e,u])}delete_config(c,e){return this.exec("delete_config",[c,e])}enable_limits(c,e,u){return this.exec("enable_limits",[c,e,u])}disable_limits(c,e,u){return this.exec("disable_limits",[c,e,u])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(c){return this.exec("get_overall_limits_state",[c])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(c,e){return this.exec("get_setting",[c],e)}get_settings(c,e){return this.exec("get_settings",c,e)}set_setting(c,e){return this.exec("set_setting",[c,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(c,e){return this.exec("set_setting",[c,e])}get_metrics(){return this.exec("get_metrics",[])}async hashString(c){if(window.isSecureContext){const e=new TextEncoder().encode(c),u=await crypto.subtle.digest("SHA-256",e),$=new Uint8Array(u);return Array.from($).map(b=>b.toString(16).padStart(2,"0")).join("")}}}var kc={exports:{}},kf;function _k(){return kf||(kf=1,function(l,c){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,u,$){function b(d,o){function a(I,L,z){if(!(I.length<L)){var F=I.slice(0,L),O=I.slice(L),A=/^(?:(\s+)|(\S+)(\s+))/.exec(O),S=/(?:(\s+)|(\s+)(\S+))$/.exec(F),N=0,W=0;if(S&&!S[2]&&(N=L-S[1].length,W=L),A&&!A[2]&&(N||(N=L),W=L+A[1].length),N)return{start:N,end:W};if(S&&S[2]&&S.index>z)return{start:S.index,end:S.index+S[2].length};if(A&&A[2])return N=L+A[2].length,{start:N,end:N+A[3].length}}}for(var s=o.column||d.getOption("printMarginColumn"),r=o.allowMerge!=0,n=Math.min(o.startRow,o.endRow),i=Math.max(o.startRow,o.endRow),h=d.session;n<=i;){var m=h.getLine(n);if(m.length>s){var y=a(m,s,5);if(y){var R=/^\s*/.exec(m)[0];h.replace(new x(n,y.start,n,y.end),`
|
|
1401
|
+
`+R)}i++}else if(r&&/\S/.test(m)&&n!=i){var T=h.getLine(n+1);if(T&&/\S/.test(T)){var C=m.replace(/\s+$/,""),w=T.replace(/^\s+/,""),E=C+" "+w,y=a(E,s,5);if(y&&y.start>C.length||E.length<s){var D=new x(n,C.length,n+1,T.length-w.length);h.replace(D," "),n--,i--}else C.length<m.length&&h.remove(new x(n,C.length,n,m.length))}}n++}}function v(d){if(d.command.name=="insertstring"&&/\S/.test(d.args)){var o=d.editor,a=o.selection.cursor;if(a.column<=o.renderer.$printMarginColumn)return;var s=o.session.$undoManager.$lastDelta;b(o,{startRow:a.row,endRow:a.row,allowMerge:!1}),s!=o.session.$undoManager.$lastDelta&&o.session.markUndoGroup()}}var x=e("../range").Range,p=e("../editor").Editor;e("../config").defineOptions(p.prototype,"editor",{hardWrap:{set:function(d){d?this.commands.on("afterExec",v):this.commands.off("afterExec",v)},value:!1}}),u.hardWrap=b}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,u,$){function b(g){return{row:g.line,column:g.ch}}function v(g){return new Ie(g.row,g.column)}function x(g,_,k){if(_.line===k.line&&_.ch>=k.ch-1){var P=g.getLine(_.line),B=P.charCodeAt(_.ch);55296<=B&&B<=55551&&(k.ch+=1)}return{start:_,end:k}}function p(g){g.setOption("disableInput",!0),g.setOption("showCursorWhenSelecting",!1),De.signal(g,"vim-mode-change",{mode:"normal"}),g.on("cursorActivity",to),E(g),De.on(g.getInputField(),"paste",o(g))}function d(g){g.setOption("disableInput",!1),g.off("cursorActivity",to),De.off(g.getInputField(),"paste",o(g)),g.state.vim=null,Wn&&clearTimeout(Wn)}function o(g){var _=g.state.vim;return _.onPasteFn||(_.onPasteFn=function(){_.insertMode||(g.setCursor(me(g.getCursor(),0,1)),fn.enterInsertMode(g,{},_))}),_.onPasteFn}function a(g,_){return _>=g.firstLine()&&_<=g.lastLine()}function s(g){return/^[a-z]$/.test(g)}function r(g){return"()[]{}".indexOf(g)!=-1}function n(g){return es.test(g)}function i(g){return Dt.test(g)}function h(g){return/^\s*$/.test(g)}function m(g){return".?!".indexOf(g)!=-1}function y(g,_){for(var k=0;k<_.length;k++)if(_[k]==g)return!0;return!1}function R(g,_,k,P,B){if(_===void 0&&!B)throw Error("defaultValue is required unless callback is provided");if(k||(k="string"),At[g]={type:k,defaultValue:_,callback:B},P)for(var H=0;H<P.length;H++)At[P[H]]=At[g];_&&T(g,_)}function T(g,_,k,P){var B=At[g];P=P||{};var H=P.scope;if(!B)return new Error("Unknown option: "+g);if(B.type=="boolean"){if(_&&_!==!0)return new Error("Invalid argument: "+g+"="+_);_!==!1&&(_=!0)}B.callback?(H!=="local"&&B.callback(_,void 0),H!=="global"&&k&&B.callback(_,k)):(H!=="local"&&(B.value=B.type=="boolean"?!!_:_),H!=="global"&&k&&(k.state.vim.options[g]={value:_}))}function C(g,_,k){var P=At[g];k=k||{};var B=k.scope;if(!P)return new Error("Unknown option: "+g);if(P.callback){var H=_&&P.callback(void 0,_);return B!=="global"&&H!==void 0?H:B!=="local"?P.callback():void 0}var H=B!=="global"&&_&&_.state.vim.options[g];return(H||B!=="local"&&P||{}).value}function w(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=hn()}function E(g){return g.state.vim||(g.state.vim={inputState:new A,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),g.state.vim}function D(){Pe={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Hi(),macroModeState:new w,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new G({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var g in At){var _=At[g];_.value=_.defaultValue}}function I(g){function _(Y){typeof Y=="string"?Xt.value=Y:Xt=null}if(g[0]=="<"){var k=g.toLowerCase().slice(1,-1),P=k.split("-");if(k=P.pop()||"",k=="lt")g="<";else if(k=="space")g=" ";else if(k=="cr")g=`
|
|
1402
|
+
`;else if(zi[k]){var B=Xt.value,H={key:zi[k],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};Xt.onKeyDown&&Xt.onKeyDown(H,Xt.value,_),Xt&&Xt.onKeyUp&&Xt.onKeyUp(H,Xt.value,_);return}}if(g==`
|
|
1403
|
+
`){var K=Xt;Xt=null,K.onClose&&K.onClose(K.value)}else Xt.value=(Xt.value||"")+g}function L(g,_,k){var P=Vt;if(k){if(si.indexOf(k)!=-1)return;si.push(k),Vt=k.noremap!=0}try{for(var B=E(g),H=/<(?:[CSMA]-)*\w+>|./gi,K;K=H.exec(_);){var Y=K[0],J=B.insertMode;if(Xt){I(Y);continue}var ie=ct.handleKey(g,Y,"mapping");if(!ie&&J&&B.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ye=se.split("-");if(se=ye.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
|
|
1404
|
+
`;else{if(zi.hasOwnProperty(se)){Y=zi[se],io(g,Y);continue}Y=Y[0],H.lastIndex=K.index+1}}g.replaceSelection(Y)}}}finally{if(si.pop(),Vt=si.length?P:!1,!si.length&&Xt){var Se=Xt;Xt=null,Qn(g,Se)}}}function z(g,_){var k=g.key;if(!ai[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=An[k]||k;var P="";if(g.ctrlKey&&(P+="C-"),g.altKey&&(P+="A-"),g.metaKey&&(P+="M-"),De.isMac&&g.altKey&&!g.metaKey&&!g.ctrlKey&&(P=P.slice(2)),(P||k.length>1)&&g.shiftKey&&(P+="S-"),_&&!_.expectLiteralNext&&k.length==1){if(bn.keymap&&k in bn.keymap)(bn.remapCtrl!=0||!P)&&(k=bn.keymap[k]);else if(k.charCodeAt(0)>255){var B=g.code&&g.code.slice(-1)||"";g.shiftKey||(B=B.toLowerCase()),B&&(k=B)}}return P+=k,P.length>1&&(P="<"+P+">"),P}}function F(g,_){bn.string!==g&&(bn=O(g)),bn.remapCtrl=_}function O(g){function _(P){return P.split(/\\?(.)/).filter(Boolean)}var k={};return g?(g.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var B=P.split(/((?:[^\\;]|\\.)+);/);if(B.length==3){var H=_(B[1]),K=_(B[2]);if(H.length!==K.length)return;for(var Y=0;Y<H.length;++Y)k[H[Y]]=K[Y]}else if(B.length==1){var J=_(P);if(J.length%2!==0)return;for(var Y=0;Y<J.length;Y+=2)k[J[Y]]=J[Y+1]}}}),{keymap:k,string:g}):{keymap:k,string:""}}function A(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function S(g,_){g.state.vim.inputState=new A,g.state.vim.expectLiteralNext=!1,De.signal(g,"vim-command-done",_)}function N(){this.removed=[],this.inserted=""}function W(g,_,k){this.clear(),this.keyBuffer=[g||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!_,this.blockwise=!!k}function V(g,_){var k=Pe.registerController.registers;if(!g||g.length!=1)throw Error("Register name must be 1 character");k[g]=_,Nt.push(g)}function G(g){this.registers=g,this.unnamedRegister=g['"']=new W,g["."]=new W,g[":"]=new W,g["/"]=new W,g["+"]=new W}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function ee(g,_){gi[g]=_}function ce(g,_){for(var k=[],P=0;P<_;P++)k.push(g);return k}function ne(g,_){ao[g]=_}function he(g,_){fn[g]=_}function ue(g,_,k){var P=g.state.vim,B=P.insertMode||P.visualMode,H=Math.min(Math.max(g.firstLine(),_.line),g.lastLine()),K=g.getLine(H),Y=K.length-1+ +!!B,J=Math.min(Math.max(0,_.ch),Y),ie=K.charCodeAt(J);if(56320<=ie&&ie<=57343){var se=1;k&&k.line==H&&k.ch>J&&(se=-1),J+=se,J>Y&&(J-=2)}return new Ie(H,J)}function le(g){var _={};for(var k in g)g.hasOwnProperty(k)&&(_[k]=g[k]);return _}function me(g,_,k){return typeof _=="object"&&(k=_.ch,_=_.line),new Ie(g.line+_,g.ch+k)}function _e(g,_,k,P){P.operator&&(k="operatorPending");for(var B,H=[],K=[],Y=Vt?_.length-Dr:0,J=Y;J<_.length;J++){var ie=_[J];k=="insert"&&ie.context!="insert"||ie.context&&ie.context!=k||P.operator&&ie.type=="action"||!(B=Ae(g,ie.keys))||(B=="partial"&&H.push(ie),B=="full"&&K.push(ie))}return{partial:H.length&&H,full:K.length&&K}}function Ae(g,_){var k=_.slice(-11)=="<character>",P=_.slice(-10)=="<register>";if(k||P){var B=_.length-(k?11:10),H=g.slice(0,B),K=_.slice(0,B);return H==K&&g.length>B?"full":K.indexOf(H)==0?"partial":!1}return g==_?"full":_.indexOf(g)==0?"partial":!1}function Me(g){var _=/^.*(<[^>]+>)$/.exec(g),k=_?_[1]:g.slice(-1);if(k.length>1)switch(k){case"<CR>":k=`
|
|
1405
|
+
`;break;case"<Space>":k=" ";break;default:k=""}return k}function qe(g,_,k){return function(){for(var P=0;P<k;P++)_(g)}}function Ve(g){return new Ie(g.line,g.ch)}function ot(g,_){return g.ch==_.ch&&g.line==_.line}function Je(g,_){return g.line<_.line?!0:g.line==_.line&&g.ch<_.ch}function lt(g,_){return arguments.length>2&&(_=lt.apply(void 0,Array.prototype.slice.call(arguments,1))),Je(g,_)?g:_}function Ht(g,_){return arguments.length>2&&(_=Ht.apply(void 0,Array.prototype.slice.call(arguments,1))),Je(g,_)?_:g}function vn(g,_,k){var P=Je(g,_),B=Je(_,k);return P&&B}function Pt(g,_){return g.getLine(_).length}function Si(g){return g.trim?g.trim():g.replace(/^\s+|\s+$/g,"")}function on(g){return g.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Cn(g,_,k){var P=Pt(g,_),B=new Array(k-P+1).join(" ");g.setCursor(new Ie(_,P)),g.replaceRange(B,g.getCursor())}function Fn(g,_){var k=[],P=g.listSelections(),B=Ve(g.clipPos(_)),H=!ot(_,B),K=g.getCursor("head"),Y=dt(P,K),J=ot(P[Y].head,P[Y].anchor),ie=P.length-1,se=ie-Y>Y?ie:0,ye=P[se].anchor,Se=Math.min(ye.line,B.line),de=Math.max(ye.line,B.line),we=ye.ch,Re=B.ch,Le=P[se].head.ch-we,Be=Re-we;Le>0&&Be<=0?(we++,H||Re--):Le<0&&Be>=0?(we--,J||Re++):Le<0&&Be==-1&&(we--,Re++);for(var Xe=Se;Xe<=de;Xe++){var Ze={anchor:new Ie(Xe,we),head:new Ie(Xe,Re)};k.push(Ze)}return g.setSelections(k),_.ch=Re,ye.ch=we,ye}function ri(g,_,k){for(var P=[],B=0;B<k;B++){var H=me(_,B,0);P.push({anchor:H,head:H})}g.setSelections(P,0)}function dt(g,_,k){for(var P=0;P<g.length;P++){var B=ot(g[P].anchor,_),H=ot(g[P].head,_);if(B||H)return P}return-1}function ze(g,_){var k=_.lastSelection,P=function(){var H=g.listSelections(),K=H[0],Y=H[H.length-1],J=Je(K.anchor,K.head)?K.anchor:K.head,ie=Je(Y.anchor,Y.head)?Y.head:Y.anchor;return[J,ie]},B=function(){var H=g.getCursor(),K=g.getCursor(),Y=k.visualBlock;if(Y){var J=Y.width,ie=Y.height;K=new Ie(H.line+ie,H.ch+J);for(var se=[],ye=H.line;ye<K.line;ye++){var Se=new Ie(ye,H.ch),de=new Ie(ye,K.ch),we={anchor:Se,head:de};se.push(we)}g.setSelections(se)}else{var Re=k.anchorMark.find(),Le=k.headMark.find(),Be=Le.line-Re.line,Xe=Le.ch-Re.ch;K={line:K.line+Be,ch:Be?K.ch:Xe+K.ch},k.visualLine&&(H=new Ie(H.line,0),K=new Ie(K.line,Pt(g,K.line))),g.setSelection(H,K)}return[H,K]};return _.visualMode?P():B()}function Ot(g,_){var k=_.sel.anchor,P=_.sel.head;_.lastPastedText&&(P=g.posFromIndex(g.indexFromPos(k)+_.lastPastedText.length),_.lastPastedText=null),_.lastSelection={anchorMark:g.setBookmark(k),headMark:g.setBookmark(P),anchor:Ve(k),head:Ve(P),visualMode:_.visualMode,visualLine:_.visualLine,visualBlock:_.visualBlock}}function Gt(g,_,k,P){var B=g.state.vim.sel,H=P?_:B.head,K=P?_:B.anchor,Y;return Je(k,_)&&(Y=k,k=_,_=Y),Je(H,K)?(H=lt(_,H),K=Ht(K,k)):(K=lt(_,K),H=Ht(H,k),H=me(H,0,-1),H.ch==-1&&H.line!=g.firstLine()&&(H=new Ie(H.line-1,Pt(g,H.line-1)))),[K,H]}function _n(g,_,B){var P=g.state.vim;_=_||P.sel;var B=B||P.visualLine?"line":P.visualBlock?"block":"char",H=oi(g,_,B);g.setSelections(H.ranges,H.primary)}function oi(g,_,k,P){var B=Ve(_.head),H=Ve(_.anchor);if(k=="char"){var K=!P&&!Je(_.head,_.anchor)?1:0,Y=Je(_.head,_.anchor)?1:0;return B=me(_.head,0,K),H=me(_.anchor,0,Y),{ranges:[{anchor:H,head:B}],primary:0}}if(k=="line"){if(Je(_.head,_.anchor))B.ch=0,H.ch=Pt(g,H.line);else{H.ch=0;var J=g.lastLine();B.line>J&&(B.line=J),B.ch=Pt(g,B.line)}return{ranges:[{anchor:H,head:B}],primary:0}}if(k=="block"){var ie=Math.min(H.line,B.line),se=H.ch,ye=Math.max(H.line,B.line),Se=B.ch;se<Se?Se+=1:se+=1;for(var de=ye-ie+1,we=B.line==ie?0:de-1,Re=[],Le=0;Le<de;Le++)Re.push({anchor:new Ie(ie+Le,se),head:new Ie(ie+Le,Se)});return{ranges:Re,primary:we}}}function qn(g){var _=g.getCursor("head");return g.getSelection().length==1&&(_=lt(_,g.getCursor("anchor"))),_}function sn(g,_){var k=g.state.vim;_!==!1&&g.setCursor(ue(g,k.sel.head)),Ot(g,k),k.visualMode=!1,k.visualLine=!1,k.visualBlock=!1,k.insertMode||De.signal(g,"vim-mode-change",{mode:"normal"})}function Tn(g,_,k){var P=g.getRange(_,k);if(/\n\s*$/.test(P)){var B=P.split(`
|
|
1406
|
+
`);B.pop();for(var H,H=B.pop();B.length>0&&H&&h(H);H=B.pop())k.line--,k.ch=0;H?(k.line--,k.ch=Pt(g,k.line)):k.ch=0}}function Pn(g,_,k){_.ch=0,k.ch=0,k.line++}function zt(g){if(!g)return 0;var _=g.search(/\S/);return _==-1?g.length:_}function Ln(g,_,k){var P=_.inclusive,B=_.innerWord,H=_.bigWord,K=_.noSymbol,Y=_.multiline,J=k||qn(g),ie=g.getLine(J.line),se=ie,ye=J.line,Se=ye,de=J.ch,we,Re=K?Fr[0]:Wi[0];if(B&&/\s/.test(ie.charAt(de)))Re=function(jt){return/\s/.test(jt)};else{for(;!Re(ie.charAt(de));)if(de++,de>=ie.length){if(!Y)return null;de--,we=Mr(g,J,!0,H,!0);break}H?Re=Wi[0]:(Re=Fr[0],Re(ie.charAt(de))||(Re=Fr[1]))}for(var Le=de,Be=de;Re(ie.charAt(Be))&&Be>=0;)Be--;if(Be++,we)Le=we.to,Se=we.line,se=g.getLine(Se),!se&&Le==0&&Le++;else for(;Re(ie.charAt(Le))&&Le<ie.length;)Le++;if(P){var Xe=Le,Ze=J.ch<=Be&&/\s/.test(ie.charAt(J.ch));if(!Ze)for(;/\s/.test(se.charAt(Le))&&Le<se.length;)Le++;if(Xe==Le||Ze){for(var Ke=Be;/\s/.test(ie.charAt(Be-1))&&Be>0;)Be--;!Be&&!Ze&&(Be=Ke)}}return{start:new Ie(ye,Be),end:new Ie(Se,Le)}}function $r(g,_,k){var P=_;if(!De.findMatchingTag||!De.findEnclosingTag)return{start:P,end:P};var B=De.findMatchingTag(g,_)||De.findEnclosingTag(g,_);return!B||!B.open||!B.close?{start:P,end:P}:k?{start:B.open.from,end:B.close.to}:{start:B.open.to,end:B.close.from}}function Ji(g,_,k){ot(_,k)||Pe.jumpList.add(g,_,k)}function Xi(g,_){Pe.lastCharacterSearch.increment=g,Pe.lastCharacterSearch.forward=_.forward,Pe.lastCharacterSearch.selectedCharacter=_.selectedCharacter}function er(g,_,k,P){var B=Ve(g.getCursor()),H=k?1:-1,K=k?g.lineCount():-1,Y=B.ch,J=B.line,ie=g.getLine(J),se={lineText:ie,nextCh:ie.charAt(Y),lastCh:null,index:Y,symb:P,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:k,depth:0,curMoveThrough:!1},ye=Ai[P];if(!ye)return B;var Se=$i[ye].init,de=$i[ye].isComplete;for(Se&&Se(se);J!==K&&_;){if(se.index+=H,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(J+=H,se.lineText=g.getLine(J)||"",H>0)se.index=0;else{var we=se.lineText.length;se.index=we>0?we-1:0}se.nextCh=se.lineText.charAt(se.index)}de(se)&&(B.line=J,B.ch=se.index,_--)}return se.nextCh||se.curMoveThrough?new Ie(J,se.index):B}function Mr(g,_,k,P,B){var H=_.line,K=_.ch,Y=g.getLine(H),J=k?1:-1,ie=P?Wi:Fr;if(B&&Y==""){if(H+=J,Y=g.getLine(H),!a(g,H))return null;K=k?0:Y.length}for(;;){if(B&&Y=="")return{from:0,to:0,line:H};for(var se=J>0?Y.length:-1,ye=se,Se=se;K!=se;){for(var de=!1,we=0;we<ie.length&&!de;++we)if(ie[we](Y.charAt(K))){for(ye=K;K!=se&&ie[we](Y.charAt(K));)K+=J;if(Se=K,de=ye!=Se,ye==_.ch&&H==_.line&&Se==ye+J)continue;return{from:Math.min(ye,Se+1),to:Math.max(ye,Se),line:H}}de||(K+=J)}if(H+=J,!a(g,H))return null;Y=g.getLine(H),K=J>0?0:Y.length}}function Vn(g,_,k,P,B,H){var K=Ve(_),Y=[];(P&&!B||!P&&B)&&k++;for(var J=!P||!B,ie=0;ie<k;ie++){var se=Mr(g,_,P,H,J);if(!se){var ye=Pt(g,g.lastLine());Y.push(P?{line:g.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),_=new Ie(se.line,P?se.to-1:se.from)}var Se=Y.length!=k,de=Y[0],we=Y.pop();return P&&!B?(!Se&&(de.from!=K.ch||de.line!=K.line)&&(we=Y.pop()),new Ie(we.line,we.from)):P&&B?new Ie(we.line,we.to-1):!P&&B?(!Se&&(de.to!=K.ch||de.line!=K.line)&&(we=Y.pop()),new Ie(we.line,we.to)):new Ie(we.line,we.from)}function Tr(g,_,k,P,B){var H=_,K=new Ie(H.line+k.repeat-1,1/0),Y=g.clipPos(K);return Y.ch--,B||(P.lastHPos=1/0,P.lastHSPos=g.charCoords(Y,"div").left),K}function Zr(g,_,k,P,B){for(var H=B||g.getCursor(),K=H.ch,Y,J=0;J<_;J++){var ie=g.getLine(H.line);if(Y=Cs(K,ie,P,k),Y==-1)return null;K=Y}return new Ie(g.getCursor().line,Y)}function ks(g,_){var k=g.getCursor().line;return ue(g,new Ie(k,_-1))}function ki(g,_,k,P){!y(k,br)&&!Rt.test(k)||(_.marks[k]&&_.marks[k].clear(),_.marks[k]=g.setBookmark(P))}function Cs(g,_,k,P,B){var H;return P?(H=_.indexOf(k,g+1),H!=-1):(H=_.lastIndexOf(k,g-1),H!=-1),H}function yo(g,_,k,P,B){function H(Be){return!/\S/.test(g.getLine(Be))}function K(Be,Xe,Ze){return Ze?H(Be)!=H(Be+Xe):!H(Be)&&H(Be+Xe)}function Y(Be){P=P>0?1:-1;var Xe=g.ace.session.getFoldLine(Be);Xe&&Be+P>Xe.start.row&&Be+P<Xe.end.row&&(P=(P>0?Xe.end.row:Xe.start.row)-Be)}var J=_.line,ie=g.firstLine(),se=g.lastLine(),ye,Se,de=J;if(P){for(;ie<=de&&de<=se&&k>0;)Y(de),K(de,P)&&k--,de+=P;return new Ie(de,0)}var we=g.state.vim;if(we.visualLine&&K(J,1,!0)){var Re=we.sel.anchor;K(Re.line,-1,!0)&&(!B||Re.line!=J)&&(J+=1)}var Le=H(J);for(de=J;de<=se&&k;de++)K(de,1,!0)&&(!B||H(de)!=Le)&&k--;for(Se=new Ie(de,0),de>se&&!Le?Le=!0:B=!1,de=J;de>ie&&!((!B||H(de)==Le||de==J)&&K(de,-1,!0));de--);return ye=new Ie(de,0),{start:ye,end:Se}}function Go(g,_,k,P,B){function H(ie){ie.pos+ie.dir<0||ie.pos+ie.dir>=ie.line.length?ie.line=null:ie.pos+=ie.dir}function K(ie,se,ye,Se){var de=ie.getLine(se),we={line:de,ln:se,pos:ye,dir:Se};if(we.line==="")return{ln:we.ln,pos:we.pos};var Re=we.pos;for(H(we);we.line!==null;){if(Re=we.pos,m(we.line[we.pos])){if(!B)return{ln:we.ln,pos:we.pos+1};for(H(we);we.line!==null&&h(we.line[we.pos]);)Re=we.pos,H(we);return{ln:we.ln,pos:Re+1}}H(we)}return{ln:we.ln,pos:Re+1}}function Y(ie,se,ye,Se){var de=ie.getLine(se),we={line:de,ln:se,pos:ye,dir:Se};if(we.line==="")return{ln:we.ln,pos:we.pos};var Re=we.pos;for(H(we);we.line!==null;){if(!h(we.line[we.pos])&&!m(we.line[we.pos]))Re=we.pos;else if(m(we.line[we.pos]))return B?h(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Re}:{ln:we.ln,pos:Re};H(we)}return we.line=de,B&&h(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Re}}for(var J={ln:_.line,pos:_.ch};k>0;)P<0?J=Y(g,J.ln,J.pos,P):J=K(g,J.ln,J.pos,P),k--;return new Ie(J.ln,J.pos)}function tr(g,_,k,P){function B(J,ie){if(ie.pos+ie.dir<0||ie.pos+ie.dir>=ie.line.length){if(ie.ln+=ie.dir,!a(J,ie.ln)){ie.line=null,ie.ln=null,ie.pos=null;return}ie.line=J.getLine(ie.ln),ie.pos=ie.dir>0?0:ie.line.length-1}else ie.pos+=ie.dir}function H(J,ie,se,ye){var Le=J.getLine(ie),Se=Le==="",de={line:Le,ln:ie,pos:se,dir:ye},we={ln:de.ln,pos:de.pos},Re=de.line==="";for(B(J,de);de.line!==null;){if(we.ln=de.ln,we.pos=de.pos,de.line===""&&!Re)return{ln:de.ln,pos:de.pos};if(Se&&de.line!==""&&!h(de.line[de.pos]))return{ln:de.ln,pos:de.pos};m(de.line[de.pos])&&!Se&&(de.pos===de.line.length-1||h(de.line[de.pos+1]))&&(Se=!0),B(J,de)}var Le=J.getLine(we.ln);we.pos=0;for(var Be=Le.length-1;Be>=0;--Be)if(!h(Le[Be])){we.pos=Be;break}return we}function K(J,ie,se,ye){var Re=J.getLine(ie),Se={line:Re,ln:ie,pos:se,dir:ye},de={ln:Se.ln,pos:null},we=Se.line==="";for(B(J,Se);Se.line!==null;){if(Se.line===""&&!we)return de.pos!==null?de:{ln:Se.ln,pos:Se.pos};if(!(!m(Se.line[Se.pos])||de.pos===null||Se.ln===de.ln&&Se.pos+1===de.pos))return de;Se.line!==""&&!h(Se.line[Se.pos])&&(we=!1,de={ln:Se.ln,pos:Se.pos}),B(J,Se)}var Re=J.getLine(de.ln);de.pos=0;for(var Le=0;Le<Re.length;++Le)if(!h(Re[Le])){de.pos=Le;break}return de}for(var Y={ln:_.line,pos:_.ch};k>0;)P<0?Y=K(g,Y.ln,Y.pos,P):Y=H(g,Y.ln,Y.pos,P),k--;return new Ie(Y.ln,Y.pos)}function yn(g,_,k,P){var B=_,H,K,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],J={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],ie=g.getLine(B.line).charAt(B.ch),se=ie===J?1:0;if(H=g.scanForBracket(new Ie(B.line,B.ch+se),-1,void 0,{bracketRegex:Y}),K=g.scanForBracket(new Ie(B.line,B.ch+se),1,void 0,{bracketRegex:Y}),!H||!K)return null;if(H=H.pos,K=K.pos,H.line==K.line&&H.ch>K.ch||H.line>K.line){var ye=H;H=K,K=ye}return P?K.ch+=1:H.ch+=1,{start:H,end:K}}function Yn(g,_,k,P){var B=Ve(_),H=g.getLine(B.line),K=H.split(""),Y,J,ie,se,ye=K.indexOf(k);if(B.ch<ye)B.ch=ye;else if(ye<B.ch&&K[B.ch]==k){var Se=/string/.test(g.getTokenTypeAt(me(_,0,1))),de=/string/.test(g.getTokenTypeAt(_)),we=Se&&!de;we||(J=B.ch,--B.ch)}if(K[B.ch]==k&&!J)Y=B.ch+1;else for(ie=B.ch;ie>-1&&!Y;ie--)K[ie]==k&&(Y=ie+1);if(Y&&!J)for(ie=Y,se=K.length;ie<se&&!J;ie++)K[ie]==k&&(J=ie);return!Y||!J?{start:B,end:B}:(P&&(--Y,++J),{start:new Ie(B.line,Y),end:new Ie(B.line,J)})}function nr(){}function an(g){var _=g.state.vim;return _.searchState_||(_.searchState_=new nr)}function Zn(g){return ir(g,"/")}function gr(g){return wo(g,"/")}function ir(g,_){var k=wo(g,_)||[];if(!k.length)return[];var P=[];if(k[0]===0){for(var B=0;B<k.length;B++)typeof k[B]=="number"&&P.push(g.substring(k[B]+1,k[B+1]));return P}}function wo(g,_){_||(_="/");for(var k=!1,P=[],B=0;B<g.length;B++){var H=g.charAt(B);!k&&H==_&&P.push(B),k=!k&&H=="\\"}return P}function qo(g){for(var _="|(){",k="}",P=!1,B=[],H=-1;H<g.length;H++){var K=g.charAt(H)||"",Y=g.charAt(H+1)||"",J=Y&&_.indexOf(Y)!=-1;P?((K!=="\\"||!J)&&B.push(K),P=!1):K==="\\"?(P=!0,Y&&k.indexOf(Y)!=-1&&(J=!0),(!J||Y==="\\")&&B.push(K)):(B.push(K),J&&Y!=="\\"&&B.push("\\"))}return B.join("")}function _s(g){for(var _=!1,k=[],P=-1;P<g.length;P++){var B=g.charAt(P)||"",H=g.charAt(P+1)||"";Ui[B+H]?(k.push(Ui[B+H]),P++):_?(k.push(B),_=!1):B==="\\"?(_=!0,n(H)||H==="$"?k.push("$"):H!=="/"&&H!=="\\"&&k.push("\\")):(B==="$"&&k.push("$"),k.push(B),H==="/"&&k.push("\\"))}return k.join("")}function As(g){for(var _=new De.StringStream(g),k=[];!_.eol();){for(;_.peek()&&_.peek()!="\\";)k.push(_.next());var P=!1;for(var B in Bn)if(_.match(B,!0)){P=!0,k.push(Bn[B]);break}P||k.push(_.next())}return k.join("")}function rr(g,_,k){var P=Pe.registerController.getRegister("/");if(P.setText(g),g instanceof RegExp)return g;var B=gr(g),H,K;if(!B.length)H=g;else{H=g.substring(0,B[0]);var Y=g.substring(B[0]);K=Y.indexOf("i")!=-1}if(!H)return null;C("pcre")||(H=qo(H)),k&&(_=/^[^A-Z]*$/.test(H));var J=new RegExp(H,_||K?"im":"m");return J}function Ci(g){typeof g=="string"&&(g=document.createElement(g));for(var _,k=1;k<arguments.length;k++)if(_=arguments[k])if(typeof _!="object"&&(_=document.createTextNode(_)),_.nodeType)g.appendChild(_);else for(var P in _)Object.prototype.hasOwnProperty.call(_,P)&&(P[0]==="$"?g.style[P.slice(1)]=_[P]:g.setAttribute(P,_[P]));return g}function _t(g,_){var k=Ci("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},_);g.openNotification?g.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function Yo(g,_){return Ci("div",{$display:"flex"},Ci("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},g,Ci("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),_&&Ci("span",{$color:"#888"},_))}function Qn(g,_){if(si.length){_.value||(_.value=""),Xt=_;return}var k=Yo(_.prefix,_.desc);if(g.openDialog)g.openDialog(k,_.onClose,{onKeyDown:_.onKeyDown,onKeyUp:_.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:_.value});else{var P="";typeof _.prefix!="string"&&_.prefix&&(P+=_.prefix.textContent),_.desc&&(P+=" "+_.desc),_.onClose(prompt(P,""))}}function wn(g,_){if(g instanceof RegExp&&_ instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],P=0;P<k.length;P++){var B=k[P];if(g[B]!==_[B])return!1}return!0}return!1}function Qt(g,_,k,P){if(_){var B=an(g),H=rr(_,!!k,!!P);if(H)return Fi(g,H),wn(H,B.getQuery())||B.setQuery(H),H}}function un(g){if(g.source.charAt(0)=="^")var _=!0;return{token:function(k){if(_&&!k.sol()){k.skipToEnd();return}var P=k.match(g,!1);if(P)return P[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!g.exec(k.next()+P[0]))?(k.next(),null):(k.match(g),"searching");for(;!k.eol()&&(k.next(),!k.match(g,!1)););},query:g}}function Fi(g,_){clearTimeout(Wn);var k=an(g);k.highlightTimeout=Wn,Wn=setTimeout(function(){if(g.state.vim){var P=an(g);P.highlightTimeout=null;var B=P.getOverlay();(!B||_!=B.query)&&(B&&g.removeOverlay(B),B=un(_),g.addOverlay(B),g.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(g.showMatchesOnScrollbar(_))),P.setOverlay(B))}},50)}function Jn(g,_,k,P){return P===void 0&&(P=1),g.operation(function(){for(var B=g.getCursor(),H=g.getSearchCursor(k,B),K=0;K<P;K++){var Y=H.find(_);if(K==0&&Y&&ot(H.from(),B)){var J=_?H.from():H.to();Y=H.find(_),Y&&!Y[0]&&ot(H.from(),J)&&g.getLine(J.line).length==J.ch&&(Y=H.find(_))}if(!Y&&(H=g.getSearchCursor(k,_?new Ie(g.lastLine()):new Ie(g.firstLine(),0)),!H.find(_)))return}return H.from()})}function Pi(g,_,k,P,B){return P===void 0&&(P=1),g.operation(function(){var H=g.getCursor(),K=g.getSearchCursor(k,H),Y=K.find(!_);!B.visualMode&&Y&&ot(K.from(),H)&&K.find(!_);for(var J=0;J<P;J++)if(Y=K.find(_),!Y&&(K=g.getSearchCursor(k,_?new Ie(g.lastLine()):new Ie(g.firstLine(),0)),!K.find(_)))return;return[K.from(),K.to()]})}function Qr(g){var _=an(g);_.highlightTimeout&&(clearTimeout(_.highlightTimeout),_.highlightTimeout=null),g.removeOverlay(an(g).getOverlay()),_.setOverlay(null),_.getScrollbarAnnotate()&&(_.getScrollbarAnnotate().clear(),_.setScrollbarAnnotate(null))}function bo(g,_,k){return typeof g!="number"&&(g=g.line),_ instanceof Array?y(g,_):typeof k=="number"?g>=_&&g<=k:g==_}function mr(g){var _=g.ace.renderer;return{top:_.getFirstFullyVisibleRow(),bottom:_.getLastFullyVisibleRow()}}function fi(g,_,k){if(k=="'"||k=="`")return Pe.jumpList.find(g,-1)||new Ie(0,0);if(k==".")return Lr(g);var P=_.marks[k];return P&&P.find()}function Lr(g){if(g.getLastEditEnd)return g.getLastEditEnd();for(var _=g.doc.history.done,k=_.length;k--;)if(_[k].changes)return Ve(_[k].changes[0].to)}function Jr(g,_,k,P,B,H,K,Y,J){function ie(){g.operation(function(){for(;!Re;)se(),Se();de()})}function se(){var Ze=g.getRange(H.from(),H.to()),Ke=Ze.replace(K,Y),jt=H.to().line;H.replace(Ke),Be=H.to().line,B+=Be-jt,Xe=Be<jt}function ye(){var Ze=Le&&Ve(H.to()),Ke=H.findNext();return Ke&&!Ke[0]&&Ze&&ot(H.from(),Ze)&&(Ke=H.findNext()),Ke}function Se(){for(;ye()&&bo(H.from(),P,B);)if(!(!k&&H.from().line==Be&&!Xe)){g.scrollIntoView(H.from(),30),g.setSelection(H.from(),H.to()),Le=H.from(),Re=!1;return}Re=!0}function de(Ze){if(Ze&&Ze(),g.focus(),Le){g.setCursor(Le);var Ke=g.state.vim;Ke.exMode=!1,Ke.lastHPos=Ke.lastHSPos=Le.ch}J&&J()}function we(Ze,Ke,jt){De.e_stop(Ze);var tt=z(Ze);switch(tt){case"y":se(),Se();break;case"n":Se();break;case"a":var tn=J;J=void 0,g.operation(ie),J=tn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":de(jt)}return Re&&de(jt),!0}g.state.vim.exMode=!0;var Re=!1,Le,Be,Xe;if(Se(),Re){_t(g,"No matches for "+K.source);return}if(!_){ie(),J&&J();return}Qn(g,{prefix:Ci("span","replace with ",Ci("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function pi(g,_){var k=g.state.vim,P=Pe.macroModeState,B=Pe.registerController.getRegister("."),H=P.isPlaying,K=P.lastInsertModeChanges;H||(g.off("change",Er),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,De.off(g.getInputField(),"keydown",Co)),!H&&k.insertModeRepeat>1&&(Zo(g,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,_||g.setCursor(g.getCursor().line,g.getCursor().ch-1),g.setOption("keyMap","vim"),g.setOption("disableInput",!0),g.toggleOverwrite(!1),B.setText(K.changes.join("")),De.signal(g,"vim-mode-change",{mode:"normal"}),P.isRecording&&En(P)}function Xr(g){ln.unshift(g)}function xo(g,_,k,P,B){var H={keys:g,type:_};H[_]=k,H[_+"Args"]=P;for(var K in B)H[K]=B[K];Xr(H)}function So(g,_,k,P){var B=Pe.registerController.getRegister(P);if(P==":"){B.keyBuffer[0]&&Kn.processCommand(g,B.keyBuffer[0]),k.isPlaying=!1;return}var H=B.keyBuffer,K=0;k.isPlaying=!0,k.replaySearchQueries=B.searchQueries.slice(0);for(var Y=0;Y<H.length;Y++)for(var J=H[Y],ie,se;J;)if(ie=/<\w+-.+?>|<\w+>|./.exec(J),se=ie[0],J=J.substring(ie.index+se.length),ct.handleKey(g,se,"macro"),_.insertMode){var ye=B.insertModeChanges[K++].changes;Pe.macroModeState.lastInsertModeChanges.changes=ye,ro(g,ye,1),pi(g)}k.isPlaying=!1}function eo(g,_){if(!g.isPlaying){var k=g.latestRegister,P=Pe.registerController.getRegister(k);P&&P.pushText(_)}}function En(g){if(!g.isPlaying){var _=g.latestRegister,k=Pe.registerController.getRegister(_);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(g.lastInsertModeChanges)}}function ko(g,_){if(!g.isPlaying){var k=g.latestRegister,P=Pe.registerController.getRegister(k);P&&P.pushSearchQuery&&P.pushSearchQuery(_)}}function Er(g,_){var k=Pe.macroModeState,P=k.lastInsertModeChanges;if(!k.isPlaying)for(var B=g.state.vim;_;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if(_.origin=="+input"||_.origin=="paste"||_.origin===void 0){var H=g.listSelections().length;H>1&&(P.ignoreCount=H);var K=_.text.join(`
|
|
1407
|
+
`);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),K)if(g.state.overwrite&&!/\n/.test(K))P.changes.push([K]);else{if(K.length>1){var Y=B&&B.insertEnd&&B.insertEnd.find(),J=g.getCursor();if(Y&&Y.line==J.line){var ie=Y.ch-J.ch;ie>0&&ie<K.length&&(P.changes.push([K,ie]),K="")}}K&&P.changes.push(K)}}_=_.next}}function to(g){var _=g.state.vim;if(_.insertMode){var k=Pe.macroModeState;if(k.isPlaying)return;var P=k.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,_.insertEnd&&_.insertEnd.clear(),_.insertEnd=g.setBookmark(g.getCursor(),{insertLeft:!0}))}else g.curOp.isVimOp||no(g,_)}function no(g,_,k){var P=g.getCursor("anchor"),B=g.getCursor("head");if(_.visualMode&&!g.somethingSelected()?sn(g,!1):!_.visualMode&&!_.insertMode&&g.somethingSelected()&&(_.visualMode=!0,_.visualLine=!1,De.signal(g,"vim-mode-change",{mode:"visual"})),_.visualMode){var H=Je(B,P)?0:-1,K=Je(B,P)?-1:0;B=me(B,0,H),P=me(P,0,K),_.sel={anchor:P,head:B},ki(g,_,"<",lt(B,P)),ki(g,_,">",Ht(B,P))}else!_.insertMode&&!k&&(_.lastHPos=g.getCursor().ch)}function vr(g,_){this.keyName=g,this.key=_.key,this.ctrlKey=_.ctrlKey,this.altKey=_.altKey,this.metaKey=_.metaKey,this.shiftKey=_.shiftKey}function Co(g){var _=Pe.macroModeState,k=_.lastInsertModeChanges,P=De.keyName?De.keyName(g):g.key;P&&(P.indexOf("Delete")!=-1||P.indexOf("Backspace")!=-1)&&(k.maybeReset&&(k.changes=[],k.maybeReset=!1),k.changes.push(new vr(P,g)))}function Zo(g,_,k,P){function B(){Y?dn.processAction(g,_,_.lastEditActionCommand):dn.evalInput(g,_)}function H(se){if(K.lastInsertModeChanges.changes.length>0){se=_.lastEditActionCommand?se:1;var ye=K.lastInsertModeChanges;ro(g,ye.changes,se)}}var K=Pe.macroModeState;K.isPlaying=!0;var Y=!!_.lastEditActionCommand,J=_.inputState;if(_.inputState=_.lastEditInputState,Y&&_.lastEditActionCommand.interlaceInsertRepeat)for(var ie=0;ie<k;ie++)B(),H(1);else P||B(),H(k);_.inputState=J,_.insertMode&&!P&&pi(g),K.isPlaying=!1}function io(g,_){De.lookupKey(_,"vim-insert",function(k){return typeof k=="string"?De.commands[k](g):k(g),!0})}function ro(g,_,k){var P=g.getCursor("head"),B=Pe.macroModeState.lastInsertModeChanges.visualBlock;B&&(ri(g,P,B+1),k=g.listSelections().length,g.setCursor(P));for(var H=0;H<k;H++){B&&g.setCursor(me(P,H,0));for(var K=0;K<_.length;K++){var Y=_[K];if(Y instanceof vr)io(g,Y.keyName);else if(typeof Y=="string")g.replaceSelection(Y);else{var J=g.getCursor(),ie=me(J,0,Y[0].length-(Y[1]||0));g.replaceRange(Y[0],J,Y[1]?J:ie),g.setCursor(ie)}}}B&&g.setCursor(me(P,0,1))}function _o(g,_,k,P){_.length>1&&_[0]=="n"&&(_=_.replace("numpad","")),_=Xn[_]||_;var B="";if(k.ctrlKey&&(B+="C-"),k.altKey&&(B+="A-"),(B||_.length>1)&&k.shiftKey&&(B+="S-"),P&&!P.expectLiteralNext&&_.length==1){if(bn.keymap&&_ in bn.keymap)(bn.remapCtrl!==!1||!B)&&(_=bn.keymap[_]);else if(_.charCodeAt(0)>255){var H=k.code&&k.code.slice(-1)||"";k.shiftKey||(H=H.toLowerCase()),H&&(_=H)}}return B+=_,B.length>1&&(B="<"+B+">"),B}function oo(g){var _=new g.constructor;return Object.keys(g).forEach(function(k){if(k!="insertEnd"){var P=g[k];Array.isArray(P)?P=P.slice():P&&typeof P=="object"&&P.constructor!=Object&&(P=oo(P)),_[k]=P}}),g.sel&&(_.sel={head:g.sel.head&&Ve(g.sel.head),anchor:g.sel.anchor&&Ve(g.sel.anchor)}),_}function Rr(g,_,k){var P=!1,B=ct.maybeInitVimState_(g),H=B.visualBlock||B.wasInVisualBlock,K=g.ace.inMultiSelectMode;if(B.wasInVisualBlock&&!K?B.wasInVisualBlock=!1:K&&B.visualBlock&&(B.wasInVisualBlock=!0),_=="<Esc>"&&!B.insertMode&&!B.visualMode&&K)g.ace.exitMultiSelectMode();else if(H||!K||g.ace.inVirtualSelectionMode)P=ct.handleKey(g,_,k);else{var Y=oo(B),J=B.inputState.changeQueueList||[];g.operation(function(){g.curOp.isVimOp=!0;var ie=0;g.ace.forEachSelection(function(){var se=g.ace.selection;g.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,g.state.vim.inputState.changeQueue=J[ie];var ye=g.getCursor("head"),Se=g.getCursor("anchor"),de=Je(ye,Se)?0:-1,we=Je(ye,Se)?-1:0;ye=me(ye,0,de),Se=me(Se,0,we),g.state.vim.sel.head=ye,g.state.vim.sel.anchor=Se,P=Mi(g,_,k),se.$desiredColumn=g.state.vim.lastHPos==-1?null:g.state.vim.lastHPos,g.ace.inVirtualSelectionMode&&(J[ie]=g.state.vim.inputState.changeQueue),g.virtualSelectionMode()&&(g.state.vim=oo(Y)),ie++}),g.curOp.cursorActivity&&!P&&(g.curOp.cursorActivity=!1),B.status=g.state.vim.status,g.state.vim=B,B.inputState.changeQueueList=J,B.inputState.changeQueue=null},!0)}return P&&!B.visualMode&&!B.insert&&B.visualMode!=g.somethingSelected()&&no(g,B,!0),P}function Bi(g,_){_.off("beforeEndOperation",Bi);var k=_.state.cm.vimCmd;k&&_.execCommand(k.exec?k:k.name,k.args),_.curOp=_.prevOp}var Rn=e("../range").Range,yr=e("../lib/event_emitter").EventEmitter,or=e("../lib/dom"),Qo=e("../lib/oop"),$s=e("../lib/keys"),Ir=e("../lib/event"),sr=e("../search").Search,Or=e("../lib/useragent"),so=e("../search_highlight").SearchHighlight,Nr=e("../commands/multi_select_commands"),Jo=e("../mode/text").Mode.prototype.tokenRe,wr=e("../ext/hardwrap").hardWrap;e("../multi_select");var De=function(g){this.ace=g,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};De.Pos=function(g,_){if(!(this instanceof Ie))return new Ie(g,_);this.line=g,this.ch=_},De.defineOption=function(g,_,k){},De.commands={redo:function(g){g.ace.redo()},undo:function(g){g.ace.undo()},newlineAndIndent:function(g){g.ace.insert(`
|
|
1408
|
+
`)},goLineLeft:function(g){g.ace.selection.moveCursorLineStart()},goLineRight:function(g){g.ace.selection.moveCursorLineEnd()}},De.keyMap={},De.addClass=De.rmClass=function(){},De.e_stop=De.e_preventDefault=Ir.stopEvent,De.keyName=function(g){var _=$s[g.keyCode]||g.key||"";return _.length==1&&(_=_.toUpperCase()),_=Ir.getModifierString(g).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+_,_},De.keyMap.default=function(g){return function(_){var k=_.ace.commands.commandKeyBinding[g.toLowerCase()];return k&&_.ace.execCommand(k)!==!1}},De.lookupKey=function g(_,k,P){k||(k="default"),typeof k=="string"&&(k=De.keyMap[k]||De.keyMap.default);var B=typeof k=="function"?k(_):k[_];if(B===!1)return"nothing";if(B==="...")return"multi";if(B!=null&&P(B))return"handled";if(k.fallthrough){if(!Array.isArray(k.fallthrough))return g(_,k.fallthrough,P);for(var H=0;H<k.fallthrough.length;H++){var K=g(_,k.fallthrough[H],P);if(K)return K}}},De.findMatchingTag=function(g,_){return g.findMatchingTag(_)},De.findEnclosingTag=function(g,_){},De.signal=function(g,_,k){return g._signal(_,k)},De.on=Ir.addListener,De.off=Ir.removeListener,De.isWordChar=function(g){return g<""?/^\w$/.test(g):(Jo.lastIndex=0,Jo.test(g))},(function(){Qo.implement(De.prototype,yr),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(k){this.$lineHandleChanges&&this.$lineHandleChanges.push(k);var P={text:k.action[0]=="i"?k.lines:[]},B=this.curOp=this.curOp||{};B.changeHandlers||(B.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),B.lastChange?B.lastChange.next=B.lastChange=P:B.lastChange=B.change=P,this.$updateMarkers(k)},this.onSelectionChange=function(){var k=this.curOp=this.curOp||{};k.cursorActivityHandlers||(k.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(Nr.keyboardHandler)},this.operation=function(k,P){if(!P&&this.curOp||P&&this.curOp&&this.curOp.force)return k();if((P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var B=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var H=this.curOp=this.curOp||{};this.curOp.force=P;var K=k();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!H.cursorActivity&&!H.lastChange&&B&&(this.ace.prevOp=B)),(P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),K},this.onBeforeEndOperation=function(){var k=this.curOp;k&&(k.change&&this.signal("change",k.change,k),k&&k.cursorActivity&&this.signal("cursorActivity",null,k),this.curOp=null)},this.signal=function(k,P,B){var H=B?B[k+"Handlers"]:(this._eventRegistry||{})[k];if(H){H=H.slice();for(var K=0;K<H.length;K++)H[K](this,P)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(k,P){typeof k=="object"&&(P=k.ch,k=k.line);var B=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:k,column:P}),this.ace.selection.moveTo(k,P),B&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(k){var P=this.ace.selection,B=k=="anchor"?P.isEmpty()?P.lead:P.anchor:k=="head"||!k?P.lead:P.getRange()[k];return v(B)},this.listSelections=function(k){var P=this.ace.multiSelect.rangeList.ranges;return!P.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:P.map(function(B){return{anchor:this.clipPos(v(B.cursor==B.end?B.start:B.end)),head:this.clipPos(v(B.cursor))}},this)},this.setSelections=function(k,P){var B=this.ace.multiSelect,H=k.map(function(ie){var se=b(ie.anchor),ye=b(ie.head),Se=Rn.comparePoints(se,ye)<0?new Rn.fromPoints(se,ye):new Rn.fromPoints(ye,se);return Se.cursor=Rn.comparePoints(Se.start,ye)?Se.end:Se.start,Se});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(H[0]);return}P?H[P]&&H.push(H.splice(P,1)[0]):H=H.reverse(),B.toSingleRange(H[0].clone());for(var K=this.ace.session,Y=0;Y<H.length;Y++){var J=K.$clipRangeToDocument(H[Y]);B.addRange(J)}},this.setSelection=function(k,P,B){var H=this.ace.selection;H.moveTo(k.line,k.ch),H.selectTo(P.line,P.ch),B&&B.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(k){return!this.ace.selection.isEmpty()},this.clipPos=function(k){var P=this.ace.session.$clipPositionToDocument(k.line,k.ch);return v(P)},this.foldCode=function(k){this.ace.session.$toggleFoldWidget(k.line,{})},this.markText=function(k){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(k){var P=k.action=="insert",B=k.start,H=k.end,K=(H.row-B.row)*(P?1:-1),Y=(H.column-B.column)*(P?1:-1);P&&(H=B);for(var J in this.marks){var ie=this.marks[J],se=Rn.comparePoints(ie,B);if(!(se<0)){if(se===0&&P)if(!ie.$insertRight)se=1;else{if(ie.bias!=1){ie.bias=-1;continue}se=1}var ye=P?se:Rn.comparePoints(ie,H);if(ye>0){ie.row+=K,ie.column+=ie.row==H.row?Y:0;continue}!P&&ye<=0&&(ie.row=B.row,ie.column=B.column,ye===0&&(ie.bias=1))}}};var g=function(k,P,B,H){this.cm=k,this.id=P,this.row=B,this.column=H,k.marks[this.id]=this};g.prototype.clear=function(){delete this.cm.marks[this.id]},g.prototype.find=function(){return v(this)},this.setBookmark=function(k,P){var B=new g(this,this.$uid++,k.line,k.ch);return(!P||!P.insertLeft)&&(B.$insertRight=!0),this.marks[B.id]=B,B},this.moveH=function(k,P){if(P=="char"){var B=this.ace.selection;B.clearSelection(),B.moveCursorBy(0,k)}},this.findPosV=function(k,P,B,H){if(B=="page"){var K=this.ace.renderer,Y=K.layerConfig;P*=Math.floor(Y.height/Y.lineHeight),B="line"}if(B=="line"){var J=this.ace.session.documentToScreenPosition(k.line,k.ch);H!=null&&(J.column=H),J.row+=P,J.row=Math.min(Math.max(0,J.row),this.ace.session.getScreenLength()-1);var ie=this.ace.session.screenToDocumentPosition(J.row,J.column);return v(ie)}debugger},this.charCoords=function(k,P){if(P=="div"||!P){var B=this.ace.session.documentToScreenPosition(k.line,k.ch);return{left:B.column,top:B.row}}if(P=="local"){var H=this.ace.renderer,B=this.ace.session.documentToScreenPosition(k.line,k.ch),K=H.layerConfig.lineHeight,Y=H.layerConfig.characterWidth,J=K*B.row;return{left:B.column*Y,top:J,bottom:J+K}}},this.coordsChar=function(k,P){var B=this.ace.renderer;if(P=="local"){var H=Math.max(0,Math.floor(k.top/B.lineHeight)),K=Math.max(0,Math.floor(k.left/B.characterWidth)),Y=B.session.screenToDocumentPosition(H,K);return v(Y)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(k,P,B){var H=!1,K=!1;k instanceof RegExp&&!k.global&&(H=!k.ignoreCase,k=k.source,K=!0),k=="\\n"&&(k=`
|
|
1409
|
+
`,K=!1);var Y=new sr;P.ch==null&&(P.ch=Number.MAX_VALUE);var J={row:P.line,column:P.ch},ie=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:k,caseSensitive:H,wrap:!1,backwards:ye,regExp:K,start:se||J});var Se=Y.find(ie.ace.session);return se=Se,se&&[!se.isEmpty()]},from:function(){return se&&v(se.start)},to:function(){return se&&v(se.end)},replace:function(ye){se&&(se.end=ie.ace.session.doc.replace(se,ye))}}},this.scrollTo=function(k,P){var B=this.ace.renderer,H=B.layerConfig,K=H.maxHeight;K-=(B.$size.scrollerHeight-B.lineHeight)*B.$scrollPastEnd,P!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(P,K))),k!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(k,H.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(k,P){if(k){var B=this.ace.renderer,H={top:0,bottom:P};B.scrollCursorIntoView(b(k),B.lineHeight*2/B.$size.scrollerHeight,H)}},this.getLine=function(k){return this.ace.session.getLine(k)},this.getRange=function(k,P){return this.ace.session.getTextRange(new Rn(k.line,k.ch,P.line,P.ch))},this.replaceRange=function(k,P,B){B||(B=P);var H=new Rn(P.line,P.ch,B.line,B.ch);return this.ace.session.$clipRangeToDocument(H),this.ace.session.replace(H,k)},this.replaceSelection=this.replaceSelections=function(k){var P=Array.isArray(k)&&k,B=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(B.getRange(),P?k[0]||"":k);return}B.inVirtualSelectionMode=!0;var H=B.rangeList.ranges;H.length||(H=[this.ace.multiSelect.getRange()]);for(var K=H.length;K--;)this.ace.session.replace(H[K],P?k[K]||"":k);B.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(k){return this.getRange(k.anchor,k.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var _={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(k,P){switch(this.state[k]=P,k){case"indentWithTabs":k=_[k],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:k=_[k]}k&&this.ace.setOption(k,P)},this.getOption=function(k){var P,B=_[k];switch(B&&(P=this.ace.getOption(B)),k){case"indentWithTabs":return k=_[k],!P;case"keyMap":return this.state.$keyMap||"vim"}return B?P:this.state[k]},this.toggleOverwrite=function(k){return this.state.overwrite=k,this.ace.setOverwrite(k)},this.addOverlay=function(k){if(!this.$searchHighlight||!this.$searchHighlight.session){var P=new so(null,"ace_highlight-marker","text"),B=this.ace.session.addDynamicMarker(P);P.id=B.id,P.session=this.ace.session,P.destroy=function(K){P.session.off("change",P.updateOnChange),P.session.off("changeEditor",P.destroy),P.session.removeMarker(P.id),P.session=null},P.updateOnChange=function(K){var Y=K.start.row;Y==K.end.row?P.cache[Y]=void 0:P.cache.splice(Y,P.cache.length)},P.session.on("changeEditor",P.destroy),P.session.on("change",P.updateOnChange)}var H=new RegExp(k.query.source,"gmi");this.$searchHighlight=k.highlight=P,this.$searchHighlight.setRegexp(H),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(k){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var k=this.ace.renderer,P=k.layerConfig;return{left:k.scrollLeft,top:k.scrollTop,height:P.maxHeight,width:P.width,clientHeight:P.height,clientWidth:P.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(k){return this.ace.setValue(k,-1)},this.getTokenTypeAt=function(k){var P=this.ace.session.getTokenAt(k.line,k.ch);return P&&/comment|string/.test(P.type)?"string":""},this.findMatchingBracket=function(k){var P=this.ace.session.findMatchingBracket(b(k));return{to:P&&v(P)}},this.findMatchingTag=function(k){var P=this.ace.session.getMatchingTags(b(k));if(P)return{open:{from:v(P.openTag.start),to:v(P.openTag.end)},close:{from:v(P.closeTag.start),to:v(P.closeTag.end)}}},this.indentLine=function(k,P){P===!0?this.ace.session.indentRows(k,k," "):P===!1&&this.ace.session.outdentRows(new Rn(k,0,k,0))},this.indexFromPos=function(k){return this.ace.session.doc.positionToIndex(b(k))},this.posFromIndex=function(k){return v(this.ace.session.doc.indexToPosition(k))},this.focus=function(k){return this.ace.textInput.focus()},this.blur=function(k){return this.ace.blur()},this.defaultTextHeight=function(k){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(k,P,B,H){var K=H.bracketRegex.source,Y=/paren|text|operator|tag/;if(P==1)var J=this.ace.session.$findClosingBracket(K.slice(1,2),b(k),Y);else{var J=this.ace.session.$findOpeningBracket(K.slice(-2,-1),{row:k.line,column:k.ch+1},Y);!J&&H.bracketRegex&&H.bracketRegex.test(this.getLine(k.line)[k.ch-1])&&(J={row:k.line,column:k.ch-1})}return J&&{pos:v(J)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(k){if(De.commands.hasOwnProperty(k))return De.commands[k](this);if(k=="indentAuto")return this.ace.execCommand("autoindent");console.log(k+" is not implemented")},this.getLineNumber=function(k){var P=this.$lineHandleChanges;if(!P)return null;for(var B=k.row,H=0;H<P.length;H++){var K=P[H];if(K.start.row!=K.end.row){if(K.action[0]=="i")K.start.row<B&&(B+=K.end.row-K.start.row);else if(K.start.row<B){if(B<K.end.row||B==K.end.row&&K.start.column>0)return null;B-=K.end.row-K.start.row}}}return B},this.getLineHandle=function(k){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(k),row:k}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var k=this.ace.session.$undoManager;if(k&&k.$lastDelta)return v(k.$lastDelta.end)}}).call(De.prototype);var Xo=De.StringStream=function(g,_){this.pos=this.start=0,this.string=g,this.tabSize=_||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Xo.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(g){var _=this.string.charAt(this.pos);if(typeof g=="string")var k=_==g;else var k=_&&(g.test?g.test(_):g(_));if(k)return++this.pos,_},eatWhile:function(g){for(var _=this.pos;this.eat(g););return this.pos>_},eatSpace:function(){for(var g=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>g},skipToEnd:function(){this.pos=this.string.length},skipTo:function(g){var _=this.string.indexOf(g,this.pos);if(_>-1)return this.pos=_,!0},backUp:function(g){this.pos-=g},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(g,_,k){if(typeof g!="string"){var P=this.string.slice(this.pos).match(g);return P&&P.index>0?null:(P&&_!==!1&&(this.pos+=P[0].length),P)}var B=function(K){return k?K.toLowerCase():K},H=this.string.substr(this.pos,g.length);if(B(H)==B(g))return _!==!1&&(this.pos+=g.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(g,_){this.lineStart+=g;try{return _()}finally{this.lineStart-=g}}},De.defineExtension=function(g,_){De.prototype[g]=_},or.importCssString(`.normal-mode .ace_cursor{
|
|
1410
1410
|
border: none;
|
|
1411
1411
|
background-color: rgba(255,0,0,0.5);
|
|
1412
1412
|
}
|
|
@@ -1439,38 +1439,38 @@
|
|
|
1439
1439
|
width: 20em;
|
|
1440
1440
|
color: inherit;
|
|
1441
1441
|
font-family: monospace;
|
|
1442
|
-
}`,"vimMode",!1),function(){function g(k,P,W){var H=k.ace.container,K;return K=H.appendChild(document.createElement("div")),W?K.className="ace_dialog ace_dialog-bottom":K.className="ace_dialog ace_dialog-top",typeof P=="string"?K.innerHTML=P:K.appendChild(P),K}function _(k,P){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=P}De.defineExtension("openDialog",function(k,P,W){function H(ye){if(typeof ye=="string")ie.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===ie)return;J.state.dialog==K&&(J.state.dialog=null,J.focus()),Y=!0,K.remove(),W.onClose&&W.onClose(K);var Se=J;Se.state.vim&&(Se.state.vim.status=null,Se.ace._signal("changeStatus"),Se.ace.renderer.$loop.schedule(Se.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){W||(W={}),_(this,null);var K=g(this,k,W.bottom),Y=!1,J=this;this.state.dialog=K;var ie=K.getElementsByTagName("input")[0],se;return ie?(W.value&&(ie.value=W.value,W.selectValueOnOpen!==!1&&ie.select()),W.onInput&&De.on(ie,"input",function(ye){W.onInput(ye,ie.value,H)}),W.onKeyUp&&De.on(ie,"keyup",function(ye){W.onKeyUp(ye,ie.value,H)}),De.on(ie,"keydown",function(ye){W&&W.onKeyDown&&W.onKeyDown(ye,ie.value,H)||(ye.keyCode==13&&P(ie.value),(ye.keyCode==27||W.closeOnEnter!==!1&&ye.keyCode==13)&&(De.e_stop(ye),H()))}),W.closeOnBlur!==!1&&De.on(ie,"blur",H),ie.focus()):(se=K.getElementsByTagName("button")[0])&&(De.on(se,"click",function(){H(),J.focus()}),W.closeOnBlur!==!1&&De.on(se,"blur",H),se.focus()),H}}),De.defineExtension("openNotification",function(k,P){function W(){K||(K=!0,clearTimeout(Y),H.remove())}if(!this.virtualSelectionMode()){_(this,W);var H=g(this,k,P&&P.bottom),K=!1,Y,J=P&&typeof P.duration<"u"?P.duration:5e3;return De.on(H,"click",function(ie){De.e_preventDefault(ie),W()}),J&&(Y=setTimeout(W,J)),W}})}();var Ie=De.Pos,ln=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Dr=ln.length,_i=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],bn=O(""),es=/[\d]/,Fr=[De.isWordChar,function(g){return g&&!De.isWordChar(g)&&!/\s/.test(g)}],Bi=[function(g){return/\S/.test(g)}],br=["<",">"],Nt=["-",'"',".",":","_","/","+"],Rt=/^\w$/,Dt;try{Dt=new RegExp("^[\\p{Lu}]$","u")}catch{Dt=/^[A-Z]$/}var At={};R("filetype",void 0,"string",["ft"],function(g,_){if(_!==void 0){if(g===void 0){var k=_.getOption("mode");return k=="null"?"":k}var k=g==""?"null":g;_.setOption("mode",k)}}),R("textwidth",80,"number",["tw"],function(g,_){if(_!==void 0){if(g===void 0){var k=_.getOption("textwidth");return k}var P=Math.round(g);P>1&&_.setOption("textwidth",P)}});var Hi=function(){function g(J,ie,se){function ye(Re){var Le=++W%P,We=Y[Le];We&&We.clear(),Y[Le]=J.setBookmark(Re)}var Se=W%P,de=Y[Se];if(de){var we=de.find();we&&!ot(we,ie)&&ye(ie)}else ye(ie);ye(se),H=W,K=W-P+1,K<0&&(K=0)}function _(J,ie){W+=ie,W>H?W=H:W<K&&(W=K);var se=Y[(P+W)%P];if(se&&!se.find()){var ye=ie>0?1:-1,Se,de=J.getCursor();do if(W+=ye,se=Y[(P+W)%P],se&&(Se=se.find())&&!ot(de,Se))break;while(W<H&&W>K)}return se}function k(J,ie){var se=W,ye=_(J,ie);return W=se,ye&&ye.find()}var P=100,W=-1,H=0,K=0,Y=new Array(P);return{cachedCursor:void 0,add:g,find:k,move:_}},hn=function(g){return g?{changes:g.changes,expectCursorActivityForChange:g.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};w.prototype={exitMacroRecordMode:function(){var g=Pe.macroModeState;g.onRecordingDone&&g.onRecordingDone(),g.onRecordingDone=void 0,g.isRecording=!1},enterMacroRecordMode:function(g,_){var k=Pe.registerController.getRegister(_);if(k){if(k.clear(),this.latestRegister=_,g.openDialog){var P=Ci("span",{class:"cm-vim-message"},"recording @"+_);this.onRecordingDone=g.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var Pe,Jt,ct={enterVimMode:p,leaveVimMode:d,buildKeyMap:function(){},getRegisterController:function(){return Pe.registerController},resetVimGlobalState_:D,getVimGlobalState_:function(){return Pe},maybeInitVimState_:E,suppressErrorLogging:!1,InsertModeKey:vr,map:function(g,_,k){Kn.map(g,_,k)},unmap:function(g,_){return Kn.unmap(g,_)},noremap:function(g,_,k){Kn.map(g,_,k,!0)},mapclear:function(g){var _=ln.length,k=Dr,P=ln.slice(0,_-k);if(ln=ln.slice(_-k),g)for(var W=P.length-1;W>=0;W--){var H=P[W];if(g!==H.context)if(H.context)this._mapCommand(H);else{var K=["normal","insert","visual"];for(var Y in K)if(K[Y]!==g){var J={};for(var ie in H)J[ie]=H[ie];J.context=K[Y],this._mapCommand(J)}}}},langmap:F,vimKeyFromEvent:z,setOption:T,getOption:C,defineOption:R,defineEx:function(g,_,k){if(!_)_=g;else if(g.indexOf(_)!==0)throw new Error('(Vim.defineEx) "'+_+'" is not a prefix of "'+g+'", command not registered');Ao[g]=k,Kn.commandMap_[_]={name:g,shortName:_,type:"api"}},handleKey:function(g,_,k){var P=this.findKey(g,_,k);if(typeof P=="function")return P()},multiSelectHandleKey:Rr,findKey:function(g,_,k){function P(){var ie=Pe.macroModeState;if(ie.isRecording){if(_=="q")return ie.exitMacroRecordMode(),S(g),!0;k!="mapping"&&eo(ie,_)}}function W(){if(_=="<Esc>"){if(Y.visualMode)sn(g);else{if(!Y.insertMode)return;pi(g)}return S(g),!0}}function H(){if(W())return!0;Y.inputState.keyBuffer.push(_);var ie=Y.inputState.keyBuffer.join(""),se=_.length==1,ye=dn.matchCommand(ie,ln,Y.inputState,"insert"),Se=Y.inputState.changeQueue;if(ye.type=="none")return S(g),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),Jt&&window.clearTimeout(Jt),Jt=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&S(g)},C("insertModeEscKeysTimeout")),se){var de=g.listSelections();(!Se||Se.removed.length!=de.length)&&(Se=Y.inputState.changeQueue=new N),Se.inserted+=_;for(var we=0;we<de.length;we++){var Re=lt(de[we].anchor,de[we].head),Le=Ht(de[we].anchor,de[we].head),We=g.getRange(Re,g.state.overwrite?me(Le,0,1):Le);Se.removed[we]=(Se.removed[we]||"")+We}}return!se}if(Y.expectLiteralNext=!1,Jt&&window.clearTimeout(Jt),ye.command&&Se){for(var de=g.listSelections(),we=0;we<de.length;we++){var Xe=de[we].head;g.replaceRange(Se.removed[we]||"",me(Xe,0,-Se.inserted.length),Xe,"+input")}Pe.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||S(g),ye.command}function K(){if(P()||W())return!0;Y.inputState.keyBuffer.push(_);var ie=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(ie))return!0;var se=/^(\d*)(.*)$/.exec(ie);if(!se)return S(g),!1;var ye=Y.visualMode?"visual":"normal",Se=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Se&&(Se=Y.inputState.operatorShortcut);var de=dn.matchCommand(Se,ln,Y.inputState,ye);return de.type=="none"?(S(g),!1):de.type=="partial"?(de.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):de.type=="clear"?(S(g),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(ie),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),de.command)}var Y=E(g),J;return Y.insertMode?J=H():J=K(),J===!1?!Y.insertMode&&_.length===1?function(){return!0}:void 0:J===!0?function(){return!0}:function(){if(!((J.operator||J.isEdit)&&g.getOption("readOnly")))return g.operation(function(){g.curOp.isVimOp=!0;try{J.type=="keyToKey"?L(g,J.toKeys,J):dn.processCommand(g,Y,J)}catch(ie){throw g.state.vim=void 0,E(g),ct.suppressErrorLogging||console.log(ie),ie}return!0})}},handleEx:function(g,_){Kn.processCommand(g,_)},defineMotion:ee,defineAction:he,defineOperator:ne,mapCommand:xo,_mapCommand:Xr,defineRegister:V,exitVisualMode:sn,exitInsertMode:pi},si=[],Vt=!1,Xt,An={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},ai={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},zi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(An)).forEach(function(g){zi[(An[g]||"").toLowerCase()]=zi[g.toLowerCase()]=g}),R("langmap",void 0,"string",["lmap"],function(g,_){if(g===void 0)return bn.string;F(g)}),A.prototype.pushRepeatDigit=function(g){this.operator?this.motionRepeat=this.motionRepeat.concat(g):this.prefixRepeat=this.prefixRepeat.concat(g)},A.prototype.getRepeat=function(){var g=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(g=1,this.prefixRepeat.length>0&&(g*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(g*=parseInt(this.motionRepeat.join(""),10))),g},B.prototype={setText:function(g,_,k){this.keyBuffer=[g||""],this.linewise=!!_,this.blockwise=!!k},pushText:function(g,_){_&&(this.linewise||this.keyBuffer.push(`
|
|
1443
|
-
`),this.linewise=!0),this.keyBuffer.push(g)},pushInsertModeChanges:function(g){this.insertModeChanges.push(hn(g))},pushSearchQuery:function(g){this.searchQueries.push(g)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},G.prototype={pushText:function(g,_,k,P,
|
|
1442
|
+
}`,"vimMode",!1),function(){function g(k,P,B){var H=k.ace.container,K;return K=H.appendChild(document.createElement("div")),B?K.className="ace_dialog ace_dialog-bottom":K.className="ace_dialog ace_dialog-top",typeof P=="string"?K.innerHTML=P:K.appendChild(P),K}function _(k,P){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=P}De.defineExtension("openDialog",function(k,P,B){function H(ye){if(typeof ye=="string")ie.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===ie)return;J.state.dialog==K&&(J.state.dialog=null,J.focus()),Y=!0,K.remove(),B.onClose&&B.onClose(K);var Se=J;Se.state.vim&&(Se.state.vim.status=null,Se.ace._signal("changeStatus"),Se.ace.renderer.$loop.schedule(Se.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){B||(B={}),_(this,null);var K=g(this,k,B.bottom),Y=!1,J=this;this.state.dialog=K;var ie=K.getElementsByTagName("input")[0],se;return ie?(B.value&&(ie.value=B.value,B.selectValueOnOpen!==!1&&ie.select()),B.onInput&&De.on(ie,"input",function(ye){B.onInput(ye,ie.value,H)}),B.onKeyUp&&De.on(ie,"keyup",function(ye){B.onKeyUp(ye,ie.value,H)}),De.on(ie,"keydown",function(ye){B&&B.onKeyDown&&B.onKeyDown(ye,ie.value,H)||(ye.keyCode==13&&P(ie.value),(ye.keyCode==27||B.closeOnEnter!==!1&&ye.keyCode==13)&&(De.e_stop(ye),H()))}),B.closeOnBlur!==!1&&De.on(ie,"blur",H),ie.focus()):(se=K.getElementsByTagName("button")[0])&&(De.on(se,"click",function(){H(),J.focus()}),B.closeOnBlur!==!1&&De.on(se,"blur",H),se.focus()),H}}),De.defineExtension("openNotification",function(k,P){function B(){K||(K=!0,clearTimeout(Y),H.remove())}if(!this.virtualSelectionMode()){_(this,B);var H=g(this,k,P&&P.bottom),K=!1,Y,J=P&&typeof P.duration<"u"?P.duration:5e3;return De.on(H,"click",function(ie){De.e_preventDefault(ie),B()}),J&&(Y=setTimeout(B,J)),B}})}();var Ie=De.Pos,ln=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Dr=ln.length,_i=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],bn=O(""),es=/[\d]/,Fr=[De.isWordChar,function(g){return g&&!De.isWordChar(g)&&!/\s/.test(g)}],Wi=[function(g){return/\S/.test(g)}],br=["<",">"],Nt=["-",'"',".",":","_","/","+"],Rt=/^\w$/,Dt;try{Dt=new RegExp("^[\\p{Lu}]$","u")}catch{Dt=/^[A-Z]$/}var At={};R("filetype",void 0,"string",["ft"],function(g,_){if(_!==void 0){if(g===void 0){var k=_.getOption("mode");return k=="null"?"":k}var k=g==""?"null":g;_.setOption("mode",k)}}),R("textwidth",80,"number",["tw"],function(g,_){if(_!==void 0){if(g===void 0){var k=_.getOption("textwidth");return k}var P=Math.round(g);P>1&&_.setOption("textwidth",P)}});var Hi=function(){function g(J,ie,se){function ye(Re){var Le=++B%P,Be=Y[Le];Be&&Be.clear(),Y[Le]=J.setBookmark(Re)}var Se=B%P,de=Y[Se];if(de){var we=de.find();we&&!ot(we,ie)&&ye(ie)}else ye(ie);ye(se),H=B,K=B-P+1,K<0&&(K=0)}function _(J,ie){B+=ie,B>H?B=H:B<K&&(B=K);var se=Y[(P+B)%P];if(se&&!se.find()){var ye=ie>0?1:-1,Se,de=J.getCursor();do if(B+=ye,se=Y[(P+B)%P],se&&(Se=se.find())&&!ot(de,Se))break;while(B<H&&B>K)}return se}function k(J,ie){var se=B,ye=_(J,ie);return B=se,ye&&ye.find()}var P=100,B=-1,H=0,K=0,Y=new Array(P);return{cachedCursor:void 0,add:g,find:k,move:_}},hn=function(g){return g?{changes:g.changes,expectCursorActivityForChange:g.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};w.prototype={exitMacroRecordMode:function(){var g=Pe.macroModeState;g.onRecordingDone&&g.onRecordingDone(),g.onRecordingDone=void 0,g.isRecording=!1},enterMacroRecordMode:function(g,_){var k=Pe.registerController.getRegister(_);if(k){if(k.clear(),this.latestRegister=_,g.openDialog){var P=Ci("span",{class:"cm-vim-message"},"recording @"+_);this.onRecordingDone=g.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var Pe,Jt,ct={enterVimMode:p,leaveVimMode:d,buildKeyMap:function(){},getRegisterController:function(){return Pe.registerController},resetVimGlobalState_:D,getVimGlobalState_:function(){return Pe},maybeInitVimState_:E,suppressErrorLogging:!1,InsertModeKey:vr,map:function(g,_,k){Kn.map(g,_,k)},unmap:function(g,_){return Kn.unmap(g,_)},noremap:function(g,_,k){Kn.map(g,_,k,!0)},mapclear:function(g){var _=ln.length,k=Dr,P=ln.slice(0,_-k);if(ln=ln.slice(_-k),g)for(var B=P.length-1;B>=0;B--){var H=P[B];if(g!==H.context)if(H.context)this._mapCommand(H);else{var K=["normal","insert","visual"];for(var Y in K)if(K[Y]!==g){var J={};for(var ie in H)J[ie]=H[ie];J.context=K[Y],this._mapCommand(J)}}}},langmap:F,vimKeyFromEvent:z,setOption:T,getOption:C,defineOption:R,defineEx:function(g,_,k){if(!_)_=g;else if(g.indexOf(_)!==0)throw new Error('(Vim.defineEx) "'+_+'" is not a prefix of "'+g+'", command not registered');Ao[g]=k,Kn.commandMap_[_]={name:g,shortName:_,type:"api"}},handleKey:function(g,_,k){var P=this.findKey(g,_,k);if(typeof P=="function")return P()},multiSelectHandleKey:Rr,findKey:function(g,_,k){function P(){var ie=Pe.macroModeState;if(ie.isRecording){if(_=="q")return ie.exitMacroRecordMode(),S(g),!0;k!="mapping"&&eo(ie,_)}}function B(){if(_=="<Esc>"){if(Y.visualMode)sn(g);else{if(!Y.insertMode)return;pi(g)}return S(g),!0}}function H(){if(B())return!0;Y.inputState.keyBuffer.push(_);var ie=Y.inputState.keyBuffer.join(""),se=_.length==1,ye=dn.matchCommand(ie,ln,Y.inputState,"insert"),Se=Y.inputState.changeQueue;if(ye.type=="none")return S(g),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),Jt&&window.clearTimeout(Jt),Jt=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&S(g)},C("insertModeEscKeysTimeout")),se){var de=g.listSelections();(!Se||Se.removed.length!=de.length)&&(Se=Y.inputState.changeQueue=new N),Se.inserted+=_;for(var we=0;we<de.length;we++){var Re=lt(de[we].anchor,de[we].head),Le=Ht(de[we].anchor,de[we].head),Be=g.getRange(Re,g.state.overwrite?me(Le,0,1):Le);Se.removed[we]=(Se.removed[we]||"")+Be}}return!se}if(Y.expectLiteralNext=!1,Jt&&window.clearTimeout(Jt),ye.command&&Se){for(var de=g.listSelections(),we=0;we<de.length;we++){var Xe=de[we].head;g.replaceRange(Se.removed[we]||"",me(Xe,0,-Se.inserted.length),Xe,"+input")}Pe.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||S(g),ye.command}function K(){if(P()||B())return!0;Y.inputState.keyBuffer.push(_);var ie=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(ie))return!0;var se=/^(\d*)(.*)$/.exec(ie);if(!se)return S(g),!1;var ye=Y.visualMode?"visual":"normal",Se=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Se&&(Se=Y.inputState.operatorShortcut);var de=dn.matchCommand(Se,ln,Y.inputState,ye);return de.type=="none"?(S(g),!1):de.type=="partial"?(de.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):de.type=="clear"?(S(g),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(ie),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),de.command)}var Y=E(g),J;return Y.insertMode?J=H():J=K(),J===!1?!Y.insertMode&&_.length===1?function(){return!0}:void 0:J===!0?function(){return!0}:function(){if(!((J.operator||J.isEdit)&&g.getOption("readOnly")))return g.operation(function(){g.curOp.isVimOp=!0;try{J.type=="keyToKey"?L(g,J.toKeys,J):dn.processCommand(g,Y,J)}catch(ie){throw g.state.vim=void 0,E(g),ct.suppressErrorLogging||console.log(ie),ie}return!0})}},handleEx:function(g,_){Kn.processCommand(g,_)},defineMotion:ee,defineAction:he,defineOperator:ne,mapCommand:xo,_mapCommand:Xr,defineRegister:V,exitVisualMode:sn,exitInsertMode:pi},si=[],Vt=!1,Xt,An={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},ai={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},zi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(An)).forEach(function(g){zi[(An[g]||"").toLowerCase()]=zi[g.toLowerCase()]=g}),R("langmap",void 0,"string",["lmap"],function(g,_){if(g===void 0)return bn.string;F(g)}),A.prototype.pushRepeatDigit=function(g){this.operator?this.motionRepeat=this.motionRepeat.concat(g):this.prefixRepeat=this.prefixRepeat.concat(g)},A.prototype.getRepeat=function(){var g=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(g=1,this.prefixRepeat.length>0&&(g*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(g*=parseInt(this.motionRepeat.join(""),10))),g},W.prototype={setText:function(g,_,k){this.keyBuffer=[g||""],this.linewise=!!_,this.blockwise=!!k},pushText:function(g,_){_&&(this.linewise||this.keyBuffer.push(`
|
|
1443
|
+
`),this.linewise=!0),this.keyBuffer.push(g)},pushInsertModeChanges:function(g){this.insertModeChanges.push(hn(g))},pushSearchQuery:function(g){this.searchQueries.push(g)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},G.prototype={pushText:function(g,_,k,P,B){if(g!=="_"){P&&k.charAt(k.length-1)!==`
|
|
1444
1444
|
`&&(k+=`
|
|
1445
|
-
`);var H=this.isValidRegister(g)?this.getRegister(g):null;if(!H){switch(_){case"yank":this.registers[0]=new
|
|
1446
|
-
`)==-1?this.registers["-"]=new B(k,P):(this.shiftNumericRegisters_(),this.registers[1]=new B(k,P))}this.unnamedRegister.setText(k,P,W);return}var K=i(g);K?H.pushText(k,P):H.setText(k,P,W),g==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(H.toString(),P)}},getRegister:function(g){return this.isValidRegister(g)?(g=g.toLowerCase(),this.registers[g]||(this.registers[g]=new B),this.registers[g]):this.unnamedRegister},isValidRegister:function(g){return g&&(y(g,Nt)||Rt.test(g))},shiftNumericRegisters_:function(){for(var g=9;g>=2;g--)this.registers[g]=this.getRegister(""+(g-1))}},Z.prototype={nextMatch:function(g,_){var k=this.historyBuffer,P=_?-1:1;this.initialPrefix===null&&(this.initialPrefix=g);for(var W=this.iterator+P;_?W>=0:W<k.length;W+=P)for(var H=k[W],K=0;K<=H.length;K++)if(this.initialPrefix==H.substring(0,K))return this.iterator=W,H;if(W>=k.length)return this.iterator=k.length,this.initialPrefix;if(W<0)return g},pushInput:function(g){var _=this.historyBuffer.indexOf(g);_>-1&&this.historyBuffer.splice(_,1),g.length&&this.historyBuffer.push(g)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var dn={matchCommand:function(g,_,k,P){var W=_e(g,_,P,k);if(!W.full&&!W.partial)return{type:"none"};if(!W.full&&W.partial)return{type:"partial",expectLiteralNext:W.partial.length==1&&W.partial[0].keys.slice(-11)=="<character>"};for(var H,K=0;K<W.full.length;K++){var Y=W.full[K];H||(H=Y)}if(H.keys.slice(-11)=="<character>"||H.keys.slice(-10)=="<register>"){var J=Me(g);if(!J||J.length>1)return{type:"clear"};k.selectedCharacter=J}return{type:"full",command:H}},processCommand:function(g,_,k){switch(_.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(g,_,k);break;case"operator":this.processOperator(g,_,k);break;case"operatorMotion":this.processOperatorMotion(g,_,k);break;case"action":this.processAction(g,_,k);break;case"search":this.processSearch(g,_,k);break;case"ex":case"keyToEx":this.processEx(g,_,k);break}},processMotion:function(g,_,k){_.inputState.motion=k.motion,_.inputState.motionArgs=le(k.motionArgs),this.evalInput(g,_)},processOperator:function(g,_,k){var P=_.inputState;if(P.operator){if(P.operator==k.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(g,_);return}S(g)}P.operator=k.operator,P.operatorArgs=le(k.operatorArgs),k.keys.length>1&&(P.operatorShortcut=k.keys),k.exitVisualBlock&&(_.visualBlock=!1,_n(g)),_.visualMode&&this.evalInput(g,_)},processOperatorMotion:function(g,_,k){var P=_.visualMode,W=le(k.operatorMotionArgs);W&&P&&W.visualLine&&(_.visualLine=!0),this.processOperator(g,_,k),P||this.processMotion(g,_,k)},processAction:function(g,_,k){var P=_.inputState,W=P.getRepeat(),H=!!W,K=le(k.actionArgs)||{};P.selectedCharacter&&(K.selectedCharacter=P.selectedCharacter),k.operator&&this.processOperator(g,_,k),k.motion&&this.processMotion(g,_,k),(k.motion||k.operator)&&this.evalInput(g,_),K.repeat=W||1,K.repeatIsExplicit=H,K.registerName=P.registerName,S(g),_.lastMotion=null,k.isEdit&&this.recordLastEdit(_,P,k),fn[k.action](g,K,_)},processSearch:function(g,_,k){function P(Le,We,Xe){Pe.searchHistoryController.pushInput(Le),Pe.searchHistoryController.reset();try{Qt(g,Le,We,Xe)}catch{_t(g,"Invalid regex: "+Le),S(g);return}dn.processMotion(g,_,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function W(Le){P(Le,!0,!0);var We=Pe.macroModeState;We.isRecording&&ko(We,Le)}function H(Le,We,Xe){var Ze=z(Le),Ke,jt;Ze=="<Up>"||Ze=="<Down>"?(Ke=Ze=="<Up>",jt=Le.target?Le.target.selectionEnd:0,We=Pe.searchHistoryController.nextMatch(We,Ke)||"",Xe(We),jt&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(jt,Le.target.value.length))):Ze&&Ze!="<Left>"&&Ze!="<Right>"&&Pe.searchHistoryController.reset();var tt;try{tt=Qt(g,We,!0,!0)}catch{}tt?g.scrollIntoView(Jn(g,!Y,tt),30):(Qr(g),g.scrollTo(ye.left,ye.top))}function K(Le,We,Xe){var Ze=z(Le);Ze=="<Esc>"||Ze=="<C-c>"||Ze=="<C-[>"||Ze=="<BS>"&&We==""?(Pe.searchHistoryController.pushInput(We),Pe.searchHistoryController.reset(),Qt(g,se),Qr(g),g.scrollTo(ye.left,ye.top),De.e_stop(Le),S(g),Xe(),g.focus()):Ze=="<Up>"||Ze=="<Down>"?De.e_stop(Le):Ze=="<C-u>"&&(De.e_stop(Le),Xe(""))}if(g.getSearchCursor){var Y=k.searchArgs.forward,J=k.searchArgs.wholeWordOnly;an(g).setReversed(!Y);var ie=Y?"/":"?",se=an(g).getQuery(),ye=g.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var Se=Pe.macroModeState;if(Se.isPlaying){var Re=Se.replaySearchQueries.shift();P(Re,!0,!1)}else Qn(g,{onClose:W,prefix:ie,desc:"(JavaScript regexp)",onKeyUp:H,onKeyDown:K});break;case"wordUnderCursor":var de=Ln(g,{noSymbol:!0}),we=!0;if(de||(de=Ln(g,{noSymbol:!1}),we=!1),!de){_t(g,"No word under cursor"),S(g);return}var Re=g.getLine(de.start.line).substring(de.start.ch,de.end.ch);we&&J?Re="\\b"+Re+"\\b":Re=on(Re),Pe.jumpList.cachedCursor=g.getCursor(),g.setCursor(de.start),P(Re,!0,!1)}}},processEx:function(g,_,k){function P(H){Pe.exCommandHistoryController.pushInput(H),Pe.exCommandHistoryController.reset(),Kn.processCommand(g,H),g.state.vim&&S(g)}function W(H,K,Y){var J=z(H),ie,se;(J=="<Esc>"||J=="<C-c>"||J=="<C-[>"||J=="<BS>"&&K=="")&&(Pe.exCommandHistoryController.pushInput(K),Pe.exCommandHistoryController.reset(),De.e_stop(H),S(g),Y(),g.focus()),J=="<Up>"||J=="<Down>"?(De.e_stop(H),ie=J=="<Up>",se=H.target?H.target.selectionEnd:0,K=Pe.exCommandHistoryController.nextMatch(K,ie)||"",Y(K),se&&H.target&&(H.target.selectionEnd=H.target.selectionStart=Math.min(se,H.target.value.length))):J=="<C-u>"?(De.e_stop(H),Y("")):J&&J!="<Left>"&&J!="<Right>"&&Pe.exCommandHistoryController.reset()}k.type=="keyToEx"?Kn.processCommand(g,k.exArgs.input):_.visualMode?Qn(g,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):Qn(g,{onClose:P,prefix:":",onKeyDown:W})},evalInput:function(g,_){var k=_.inputState,P=k.motion,W=k.motionArgs||{},H=k.operator,K=k.operatorArgs||{},Y=k.registerName,J=_.sel,ie=Ve(_.visualMode?ue(g,J.head):g.getCursor("head")),se=Ve(_.visualMode?ue(g,J.anchor):g.getCursor("anchor")),ye=Ve(ie),Se=Ve(se),de,we,Re;if(H&&this.recordLastEdit(_,k),k.repeatOverride!==void 0?Re=k.repeatOverride:Re=k.getRepeat(),Re>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Re===0)&&(Re=1,W.repeatIsExplicit=!1),k.selectedCharacter&&(W.selectedCharacter=K.selectedCharacter=k.selectedCharacter),W.repeat=Re,S(g),P){var Le=gi[P](g,ie,W,_,k);if(_.lastMotion=gi[P],!Le)return;if(W.toJumplist){!H&&g.ace.curOp!=null&&(g.ace.curOp.command.scrollIntoView="center-animate");var We=Pe.jumpList,Xe=We.cachedCursor;Xe?(Ji(g,Xe,Le),delete We.cachedCursor):Ji(g,ie,Le)}Le instanceof Array?(we=Le[0],de=Le[1]):de=Le,de||(de=Ve(ie)),_.visualMode?((!_.visualBlock||de.ch!==1/0)&&(de=ue(g,de,ye)),we&&(we=ue(g,we)),we=we||Se,J.anchor=we,J.head=de,_n(g),ki(g,_,"<",Je(we,de)?we:de),ki(g,_,">",Je(we,de)?de:we)):H||(g.ace.curOp&&(g.ace.curOp.vimDialogScroll="center-animate"),de=ue(g,de,ye),g.setCursor(de.line,de.ch))}if(H){if(K.lastSel){we=Se;var Ze=K.lastSel,Ke=Math.abs(Ze.head.line-Ze.anchor.line),jt=Math.abs(Ze.head.ch-Ze.anchor.ch);Ze.visualLine?de=new Ie(Se.line+Ke,Se.ch):Ze.visualBlock?de=new Ie(Se.line+Ke,Se.ch+jt):Ze.head.line==Ze.anchor.line?de=new Ie(Se.line,Se.ch+jt):de=new Ie(Se.line+Ke,Se.ch),_.visualMode=!0,_.visualLine=Ze.visualLine,_.visualBlock=Ze.visualBlock,J=_.sel={anchor:we,head:de},_n(g)}else _.visualMode&&(K.lastSel={anchor:Ve(J.anchor),head:Ve(J.head),visualBlock:_.visualBlock,visualLine:_.visualLine});var tt,tn,xt,ut,pn;if(_.visualMode){tt=lt(J.head,J.anchor),tn=Ht(J.head,J.anchor),xt=_.visualLine||K.linewise,ut=_.visualBlock?"block":xt?"line":"char";var Hn=x(g,tt,tn);if(pn=oi(g,{anchor:Hn.start,head:Hn.end},ut),xt){var nn=pn.ranges;if(ut=="block")for(var j=0;j<nn.length;j++)nn[j].head.ch=Pt(g,nn[j].head.line);else ut=="line"&&(nn[0].head=new Ie(nn[0].head.line+1,0))}}else{if(tt=Ve(we||Se),tn=Ve(de||ye),Je(tn,tt)){var Q=tt;tt=tn,tn=Q}xt=W.linewise||K.linewise,xt?Pn(g,tt,tn):W.forward&&Tn(g,tt,tn),ut="char";var re=!W.inclusive||xt,Hn=x(g,tt,tn);pn=oi(g,{anchor:Hn.start,head:Hn.end},ut,re)}g.setSelections(pn.ranges,pn.primary),_.lastMotion=null,K.repeat=Re,K.registerName=Y,K.linewise=xt;var oe=ao[H](g,K,pn.ranges,Se,de);_.visualMode&&sn(g,oe!=null),oe&&g.setCursor(oe)}},recordLastEdit:function(g,_,k){var P=Pe.macroModeState;P.isPlaying||(g.lastEditInputState=_,g.lastEditActionCommand=k,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=g.visualBlock?g.sel.head.line-g.sel.anchor.line:0)}},gi={moveToTopLine:function(g,_,k){var P=mr(g).top+k.repeat-1;return new Ie(P,zt(g.getLine(P)))},moveToMiddleLine:function(g){var _=mr(g),k=Math.floor((_.top+_.bottom)*.5);return new Ie(k,zt(g.getLine(k)))},moveToBottomLine:function(g,_,k){var P=mr(g).bottom-k.repeat+1;return new Ie(P,zt(g.getLine(P)))},expandToLine:function(g,_,k){var P=_;return new Ie(P.line+k.repeat-1,1/0)},findNext:function(g,_,k){var P=an(g),W=P.getQuery();if(W){var H=!k.forward;return H=P.isReversed()?!H:H,Fi(g,W),Jn(g,H,W,k.repeat)}},findAndSelectNextInclusive:function(g,_,k,P,W){var H=an(g),K=H.getQuery();if(K){var Y=!k.forward;Y=H.isReversed()?!Y:Y;var J=Pi(g,Y,K,k.repeat,P);if(J){if(W.operator)return J;var ie=J[0],se=new Ie(J[1].line,J[1].ch-1);if(P.visualMode){(P.visualLine||P.visualBlock)&&(P.visualLine=!1,P.visualBlock=!1,De.signal(g,"vim-mode-change",{mode:"visual",subMode:""}));var ye=P.sel.anchor;if(ye)return H.isReversed()?k.forward?[ye,ie]:[ye,se]:k.forward?[ye,se]:[ye,ie]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,De.signal(g,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,ie]:[ie,se]}}},goToMark:function(g,_,k,P){var W=fi(g,P,k.selectedCharacter);return W?k.linewise?{line:W.line,ch:zt(g.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(g,_,k,P){if(P.visualBlock&&k.sameLine){var W=P.sel;return[ue(g,new Ie(W.anchor.line,W.head.ch)),ue(g,new Ie(W.head.line,W.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(g,_,k,P){for(var W=_,H=0;H<k.repeat;H++){var K=W;for(var Y in P.marks)if(s(Y)){var J=P.marks[Y].find(),ie=k.forward?Je(J,K):Je(K,J);if(!ie&&!(k.linewise&&J.line==K.line)){var se=ot(K,W),ye=k.forward?vn(K,J,W):vn(W,J,K);(se||ye)&&(W=J)}}}return k.linewise&&(W=new Ie(W.line,zt(g.getLine(W.line)))),W},moveByCharacters:function(g,_,k){var P=_,W=k.repeat,H=k.forward?P.ch+W:P.ch-W;return new Ie(P.line,H)},moveByLines:function(g,_,k,P){var W=_,H=W.ch;switch(P.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:H=P.lastHPos;break;default:P.lastHPos=H}var K=k.repeat+(k.repeatOffset||0),Y=k.forward?W.line+K:W.line-K,J=g.firstLine(),ie=g.lastLine();if(Y<J&&W.line==J)return this.moveToStartOfLine(g,_,k,P);if(Y>ie&&W.line==ie)return Tr(g,_,k,P,!0);var se=g.ace.session.getFoldLine(Y);return se&&(k.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),k.toFirstChar&&(H=zt(g.getLine(Y)),P.lastHPos=H),P.lastHSPos=g.charCoords(new Ie(Y,H),"div").left,new Ie(Y,H)},moveByDisplayLines:function(g,_,k,P){var W=_;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=g.charCoords(W,"div").left}var H=k.repeat,J=g.findPosV(W,k.forward?H:-H,"line",P.lastHSPos);if(J.hitSide)if(k.forward)var K=g.charCoords(J,"div"),Y={top:K.top+8,left:P.lastHSPos},J=g.coordsChar(Y,"div");else{var ie=g.charCoords(new Ie(g.firstLine(),0),"div");ie.left=P.lastHSPos,J=g.coordsChar(ie,"div")}return P.lastHPos=J.ch,J},moveByPage:function(g,_,k){var P=_,W=k.repeat;return g.findPosV(P,k.forward?W:-W,"page")},moveByParagraph:function(g,_,k){var P=k.forward?1:-1;return yo(g,_,k.repeat,P)},moveBySentence:function(g,_,k){var P=k.forward?1:-1;return tr(g,_,k.repeat,P)},moveByScroll:function(g,_,k,P){var W=g.getScrollInfo(),H=null,K=k.repeat;K||(K=W.clientHeight/(2*g.defaultTextHeight()));var Y=g.charCoords(_,"local");if(k.repeat=K,H=gi.moveByDisplayLines(g,_,k,P),!H)return null;var J=g.charCoords(H,"local");return g.scrollTo(null,W.top+J.top-Y.top),H},moveByWords:function(g,_,k){return Vn(g,_,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(g,_,k){var P=k.repeat,W=Zr(g,P,k.forward,k.selectedCharacter,_),H=k.forward?-1:1;return Xi(H,k),W?(W.ch+=H,W):null},moveToCharacter:function(g,_,k){var P=k.repeat;return Xi(0,k),Zr(g,P,k.forward,k.selectedCharacter,_)||_},moveToSymbol:function(g,_,k){var P=k.repeat;return er(g,P,k.forward,k.selectedCharacter)||_},moveToColumn:function(g,_,k,P){var W=k.repeat;return P.lastHPos=W-1,P.lastHSPos=g.charCoords(_,"div").left,ks(g,W)},moveToEol:function(g,_,k,P){return Tr(g,_,k,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(g,_){var k=_;return new Ie(k.line,zt(g.getLine(k.line)))},moveToMatchedSymbol:function(g,_){for(var k=_,P=k.line,W=k.ch,H=g.getLine(P),K;W<H.length;W++)if(K=H.charAt(W),K&&r(K)){var Y=g.getTokenTypeAt(new Ie(P,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<H.length){var J=/[<>]/.test(H[W])?/[(){}[\]<>]/:/[(){}[\]]/,ie=g.findMatchingBracket(new Ie(P,W+1),{bracketRegex:J});return ie.to}return k},moveToStartOfLine:function(g,_){return new Ie(_.line,0)},moveToLineOrEdgeOfDocument:function(g,_,k){var P=k.forward?g.lastLine():g.firstLine();return k.repeatIsExplicit&&(P=k.repeat-g.getOption("firstLineNumber")),new Ie(P,zt(g.getLine(P)))},moveToStartOfDisplayLine:function(g){return g.execCommand("goLineLeft"),g.getCursor()},moveToEndOfDisplayLine:function(g){g.execCommand("goLineRight");var _=g.getCursor();return _.sticky=="before"&&_.ch--,_},textObjectManipulation:function(g,_,k,P){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},H={"'":!0,'"':!0,"`":!0},K=k.selectedCharacter;K=="b"?K="(":K=="B"&&(K="{");var Y=!k.textObjectInner,J,ie;if(W[K]){if(ie=!0,J=yn(g,_,K,Y),!J){var se=g.getSearchCursor(new RegExp("\\"+K,"g"),_);se.find()&&(J=yn(g,se.from(),K,Y))}}else if(H[K])ie=!0,J=Yn(g,_,K,Y);else if(K==="W"||K==="w")for(var ye=k.repeat||1;ye-- >0;){var Se=Ln(g,{inclusive:Y,innerWord:!Y,bigWord:K==="W",noSymbol:K==="W",multiline:!0},J&&J.end);Se&&(J||(J=Se),J.end=Se.end)}else if(K==="p")if(J=yo(g,_,k.repeat,0,Y),k.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var de=P.inputState.operatorArgs;de&&(de.linewise=!0),J.end.line--}else if(K==="t")J=$r(g,_,Y);else if(K==="s"){var we=g.getLine(_.line);_.ch>0&&m(we[_.ch])&&(_.ch-=1);var Re=Go(g,_,k.repeat,1,Y),Le=Go(g,_,k.repeat,-1,Y);h(g.getLine(Le.line)[Le.ch])&&h(g.getLine(Re.line)[Re.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),J={start:Le,end:Re}}return J?g.state.vim.visualMode?Gt(g,J.start,J.end,ie):[J.start,J.end]:null},repeatLastCharacterSearch:function(g,_,k){var P=Pe.lastCharacterSearch,W=k.repeat,H=k.forward===P.forward,K=(P.increment?1:0)*(H?-1:1);g.moveH(-K,"char"),k.inclusive=!!H;var Y=Zr(g,W,H,P.selectedCharacter);return Y?(Y.ch+=K,Y):(g.moveH(K,"char"),_)}},ao={change:function(g,_,k){var P,W,H=g.state.vim,K=k[0].anchor,Y=k[0].head;if(H.visualMode)if(_.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,g.setSelection(K,Y),W=g.getSelection(),g.replaceSelection(""),P=K;else{W=g.getSelection();var se=ce("",k.length);g.replaceSelections(se),P=lt(k[0].head,k[0].anchor)}else{W=g.getRange(K,Y);var J=H.lastEditInputState||{};if(J.motion=="moveByWords"&&!h(W)){var ie=/\s+$/.exec(W);ie&&J.motionArgs&&J.motionArgs.forward&&(Y=me(Y,0,-ie[0].length),W=W.slice(0,-ie[0].length))}_.linewise&&(K=new Ie(K.line,zt(g.getLine(K.line))),Y.line>K.line&&(Y=new Ie(Y.line-1,Number.MAX_VALUE))),g.replaceRange("",K,Y),P=K}Pe.registerController.pushText(_.registerName,"change",W,_.linewise,k.length>1),fn.enterInsertMode(g,{head:P},g.state.vim)},delete:function(g,_,k){var P,W,H=g.state.vim;if(H.visualBlock){W=g.getSelection();var J=ce("",k.length);g.replaceSelections(J),P=lt(k[0].head,k[0].anchor)}else{var K=k[0].anchor,Y=k[0].head;_.linewise&&Y.line!=g.firstLine()&&K.line==g.lastLine()&&K.line==Y.line-1&&(K.line==g.firstLine()?K.ch=0:K=new Ie(K.line-1,Pt(g,K.line-1))),W=g.getRange(K,Y),g.replaceRange("",K,Y),P=K,_.linewise&&(P=gi.moveToFirstNonWhiteSpaceCharacter(g,K))}return Pe.registerController.pushText(_.registerName,"delete",W,_.linewise,H.visualBlock),ue(g,P)},indent:function(g,_,k){var P=g.state.vim,W=P.visualMode?_.repeat:1;if(P.visualBlock){for(var H=g.getOption("tabSize"),K=g.getOption("indentWithTabs")?" ":" ".repeat(H),Y,J=k.length-1;J>=0;J--)if(Y=lt(k[J].anchor,k[J].head),_.indentRight)g.replaceRange(K.repeat(W),Y,Y);else{for(var ie=g.getLine(Y.line),se=0,ye=0;ye<W;ye++){var Se=ie[Y.ch+se];if(Se==" ")se++;else{if(Se!=" ")break;se++;for(var de=1;de<K.length&&(Se=ie[Y.ch+se],Se===" ");de++)se++}}g.replaceRange("",Y,me(Y,0,se))}return Y}if(g.indentMore)for(var ye=0;ye<W;ye++)_.indentRight?g.indentMore():g.indentLess();else{var we=k[0].anchor.line,Re=P.visualBlock?k[k.length-1].anchor.line:k[0].head.line;_.linewise&&Re--;for(var J=we;J<=Re;J++)for(var ye=0;ye<W;ye++)g.indentLine(J,_.indentRight)}return gi.moveToFirstNonWhiteSpaceCharacter(g,k[0].anchor)},indentAuto:function(g,_,k){return g.execCommand("indentAuto"),gi.moveToFirstNonWhiteSpaceCharacter(g,k[0].anchor)},hardWrap:function(g,_,k,P,W){if(g.hardWrap){var H=k[0].anchor.line,K=k[0].head.line;_.linewise&&K--;var Y=g.hardWrap({from:H,to:K});return Y>H&&_.linewise&&Y--,_.keepCursor?P:new Ie(Y,0)}},changeCase:function(g,_,k,P,W){for(var H=g.getSelections(),K=[],Y=_.toLower,J=0;J<H.length;J++){var ie=H[J],se="";if(Y===!0)se=ie.toLowerCase();else if(Y===!1)se=ie.toUpperCase();else for(var ye=0;ye<ie.length;ye++){var Se=ie.charAt(ye);se+=i(Se)?Se.toLowerCase():Se.toUpperCase()}K.push(se)}return g.replaceSelections(K),_.shouldMoveCursor?W:!g.state.vim.visualMode&&_.linewise&&k[0].anchor.line+1==k[0].head.line?gi.moveToFirstNonWhiteSpaceCharacter(g,P):_.linewise?P:lt(k[0].anchor,k[0].head)},yank:function(g,_,k,P){var W=g.state.vim,H=g.getSelection(),K=W.visualMode?lt(W.sel.anchor,W.sel.head,k[0].head,k[0].anchor):P;return Pe.registerController.pushText(_.registerName,"yank",H,_.linewise,W.visualBlock),K}},fn={jumpListWalk:function(g,_,k){if(!k.visualMode){var P=_.repeat,W=_.forward,H=Pe.jumpList,K=H.move(g,W?P:-P),Y=K?K.find():void 0;Y=Y||g.getCursor(),g.setCursor(Y),g.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(g,_,k){if(!k.visualMode){var P=_.repeat||1,W=g.defaultTextHeight(),H=g.getScrollInfo().top,K=W*P,Y=_.forward?H+K:H-K,J=Ve(g.getCursor()),ie=g.charCoords(J,"local");if(_.forward)Y>ie.top?(J.line+=(Y-ie.top)/W,J.line=Math.ceil(J.line),g.setCursor(J),ie=g.charCoords(J,"local"),g.scrollTo(null,ie.top)):g.scrollTo(null,Y);else{var se=Y+g.getScrollInfo().clientHeight;se<ie.bottom?(J.line-=(ie.bottom-se)/W,J.line=Math.floor(J.line),g.setCursor(J),ie=g.charCoords(J,"local"),g.scrollTo(null,ie.bottom-g.getScrollInfo().clientHeight)):g.scrollTo(null,Y)}}},scrollToCursor:function(g,_){var k=g.getCursor().line,P=g.charCoords(new Ie(k,0),"local"),W=g.getScrollInfo().clientHeight,H=P.top;switch(_.position){case"center":H=P.bottom-W/2;break;case"bottom":var K=new Ie(k,g.getLine(k).length-1),Y=g.charCoords(K,"local"),J=Y.bottom-H;H=H-W+J}g.scrollTo(null,H)},replayMacro:function(g,_,k){var P=_.selectedCharacter,W=_.repeat,H=Pe.macroModeState;for(P=="@"?P=H.latestRegister:H.latestRegister=P;W--;)So(g,k,H,P)},enterMacroRecordMode:function(g,_){var k=Pe.macroModeState,P=_.selectedCharacter;Pe.registerController.isValidRegister(P)&&k.enterMacroRecordMode(g,P)},toggleOverwrite:function(g){g.state.overwrite?(g.toggleOverwrite(!1),g.setOption("keyMap","vim-insert"),De.signal(g,"vim-mode-change",{mode:"insert"})):(g.toggleOverwrite(!0),g.setOption("keyMap","vim-replace"),De.signal(g,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(g,_,k){if(!g.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=_&&_.repeat||1;var P=_?_.insertAt:null,W=k.sel,H=_.head||g.getCursor("head"),K=g.listSelections().length;if(P=="eol")H=new Ie(H.line,Pt(g,H.line));else if(P=="bol")H=new Ie(H.line,0);else if(P=="charAfter"){var Y=x(g,H,me(H,0,1));H=Y.end}else if(P=="firstNonBlank"){var Y=x(g,H,gi.moveToFirstNonWhiteSpaceCharacter(g,H));H=Y.end}else if(P=="startOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(H=new Ie(Math.min(W.head.line,W.anchor.line),Math.min(W.head.ch,W.anchor.ch)),K=Math.abs(W.head.line-W.anchor.line)+1):W.head.line<W.anchor.line?H=W.head:H=new Ie(W.anchor.line,0)}else if(P=="endOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(H=new Ie(Math.min(W.head.line,W.anchor.line),Math.max(W.head.ch,W.anchor.ch)+1),K=Math.abs(W.head.line-W.anchor.line)+1):W.head.line>=W.anchor.line?H=me(W.head,0,1):H=new Ie(W.anchor.line,0)}else if(P=="inplace"){if(k.visualMode)return}else P=="lastEdit"&&(H=Lr(g)||H);g.setOption("disableInput",!1),_&&_.replace?(g.toggleOverwrite(!0),g.setOption("keyMap","vim-replace"),De.signal(g,"vim-mode-change",{mode:"replace"})):(g.toggleOverwrite(!1),g.setOption("keyMap","vim-insert"),De.signal(g,"vim-mode-change",{mode:"insert"})),Pe.macroModeState.isPlaying||(g.on("change",Er),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=g.setBookmark(H,{insertLeft:!0}),De.on(g.getInputField(),"keydown",Co)),k.visualMode&&sn(g),ri(g,H,K)}},toggleVisualMode:function(g,_,k){var P=_.repeat,W=g.getCursor(),H;if(k.visualMode)k.visualLine^_.linewise||k.visualBlock^_.blockwise?(k.visualLine=!!_.linewise,k.visualBlock=!!_.blockwise,De.signal(g,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),_n(g)):sn(g);else{k.visualMode=!0,k.visualLine=!!_.linewise,k.visualBlock=!!_.blockwise,H=ue(g,new Ie(W.line,W.ch+P-1));var K=x(g,W,H);k.sel={anchor:K.start,head:K.end},De.signal(g,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),_n(g),ki(g,k,"<",lt(W,H)),ki(g,k,">",Ht(W,H))}},reselectLastSelection:function(g,_,k){var P=k.lastSelection;if(k.visualMode&&Ot(g,k),P){var W=P.anchorMark.find(),H=P.headMark.find();if(!W||!H)return;k.sel={anchor:W,head:H},k.visualMode=!0,k.visualLine=P.visualLine,k.visualBlock=P.visualBlock,_n(g),ki(g,k,"<",lt(W,H)),ki(g,k,">",Ht(W,H)),De.signal(g,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(g,_,k){var P,W;if(k.visualMode){if(P=g.getCursor("anchor"),W=g.getCursor("head"),Je(W,P)){var H=W;W=P,P=H}W.ch=Pt(g,W.line)-1}else{var K=Math.max(_.repeat,2);P=g.getCursor(),W=ue(g,new Ie(P.line+K-1,1/0))}for(var Y=0,J=P.line;J<W.line;J++){Y=Pt(g,P.line);var ie="",se=0;if(!_.keepSpaces){var ye=g.getLine(P.line+1);se=ye.search(/\S/),se==-1?se=ye.length:ie=" "}g.replaceRange(ie,new Ie(P.line,Y),new Ie(P.line+1,se))}var Se=ue(g,new Ie(P.line,Y));k.visualMode&&sn(g,!1),g.setCursor(Se)},newLineAndEnterInsertMode:function(g,_,k){k.insertMode=!0;var P=Ve(g.getCursor());if(P.line===g.firstLine()&&!_.after)g.replaceRange(`
|
|
1447
|
-
`,new Ie(g.firstLine(),0)),g.setCursor(g.firstLine(),0);else{P.line=_.after?P.line:P.line-1,P.ch=Pt(g,P.line),g.setCursor(P);var
|
|
1448
|
-
`:""}if(_.repeat>1)var de=Array(_.repeat+1).join(de);var we=
|
|
1445
|
+
`);var H=this.isValidRegister(g)?this.getRegister(g):null;if(!H){switch(_){case"yank":this.registers[0]=new W(k,P,B);break;case"delete":case"change":k.indexOf(`
|
|
1446
|
+
`)==-1?this.registers["-"]=new W(k,P):(this.shiftNumericRegisters_(),this.registers[1]=new W(k,P))}this.unnamedRegister.setText(k,P,B);return}var K=i(g);K?H.pushText(k,P):H.setText(k,P,B),g==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(H.toString(),P)}},getRegister:function(g){return this.isValidRegister(g)?(g=g.toLowerCase(),this.registers[g]||(this.registers[g]=new W),this.registers[g]):this.unnamedRegister},isValidRegister:function(g){return g&&(y(g,Nt)||Rt.test(g))},shiftNumericRegisters_:function(){for(var g=9;g>=2;g--)this.registers[g]=this.getRegister(""+(g-1))}},Z.prototype={nextMatch:function(g,_){var k=this.historyBuffer,P=_?-1:1;this.initialPrefix===null&&(this.initialPrefix=g);for(var B=this.iterator+P;_?B>=0:B<k.length;B+=P)for(var H=k[B],K=0;K<=H.length;K++)if(this.initialPrefix==H.substring(0,K))return this.iterator=B,H;if(B>=k.length)return this.iterator=k.length,this.initialPrefix;if(B<0)return g},pushInput:function(g){var _=this.historyBuffer.indexOf(g);_>-1&&this.historyBuffer.splice(_,1),g.length&&this.historyBuffer.push(g)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var dn={matchCommand:function(g,_,k,P){var B=_e(g,_,P,k);if(!B.full&&!B.partial)return{type:"none"};if(!B.full&&B.partial)return{type:"partial",expectLiteralNext:B.partial.length==1&&B.partial[0].keys.slice(-11)=="<character>"};for(var H,K=0;K<B.full.length;K++){var Y=B.full[K];H||(H=Y)}if(H.keys.slice(-11)=="<character>"||H.keys.slice(-10)=="<register>"){var J=Me(g);if(!J||J.length>1)return{type:"clear"};k.selectedCharacter=J}return{type:"full",command:H}},processCommand:function(g,_,k){switch(_.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(g,_,k);break;case"operator":this.processOperator(g,_,k);break;case"operatorMotion":this.processOperatorMotion(g,_,k);break;case"action":this.processAction(g,_,k);break;case"search":this.processSearch(g,_,k);break;case"ex":case"keyToEx":this.processEx(g,_,k);break}},processMotion:function(g,_,k){_.inputState.motion=k.motion,_.inputState.motionArgs=le(k.motionArgs),this.evalInput(g,_)},processOperator:function(g,_,k){var P=_.inputState;if(P.operator){if(P.operator==k.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(g,_);return}S(g)}P.operator=k.operator,P.operatorArgs=le(k.operatorArgs),k.keys.length>1&&(P.operatorShortcut=k.keys),k.exitVisualBlock&&(_.visualBlock=!1,_n(g)),_.visualMode&&this.evalInput(g,_)},processOperatorMotion:function(g,_,k){var P=_.visualMode,B=le(k.operatorMotionArgs);B&&P&&B.visualLine&&(_.visualLine=!0),this.processOperator(g,_,k),P||this.processMotion(g,_,k)},processAction:function(g,_,k){var P=_.inputState,B=P.getRepeat(),H=!!B,K=le(k.actionArgs)||{};P.selectedCharacter&&(K.selectedCharacter=P.selectedCharacter),k.operator&&this.processOperator(g,_,k),k.motion&&this.processMotion(g,_,k),(k.motion||k.operator)&&this.evalInput(g,_),K.repeat=B||1,K.repeatIsExplicit=H,K.registerName=P.registerName,S(g),_.lastMotion=null,k.isEdit&&this.recordLastEdit(_,P,k),fn[k.action](g,K,_)},processSearch:function(g,_,k){function P(Le,Be,Xe){Pe.searchHistoryController.pushInput(Le),Pe.searchHistoryController.reset();try{Qt(g,Le,Be,Xe)}catch{_t(g,"Invalid regex: "+Le),S(g);return}dn.processMotion(g,_,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function B(Le){P(Le,!0,!0);var Be=Pe.macroModeState;Be.isRecording&&ko(Be,Le)}function H(Le,Be,Xe){var Ze=z(Le),Ke,jt;Ze=="<Up>"||Ze=="<Down>"?(Ke=Ze=="<Up>",jt=Le.target?Le.target.selectionEnd:0,Be=Pe.searchHistoryController.nextMatch(Be,Ke)||"",Xe(Be),jt&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(jt,Le.target.value.length))):Ze&&Ze!="<Left>"&&Ze!="<Right>"&&Pe.searchHistoryController.reset();var tt;try{tt=Qt(g,Be,!0,!0)}catch{}tt?g.scrollIntoView(Jn(g,!Y,tt),30):(Qr(g),g.scrollTo(ye.left,ye.top))}function K(Le,Be,Xe){var Ze=z(Le);Ze=="<Esc>"||Ze=="<C-c>"||Ze=="<C-[>"||Ze=="<BS>"&&Be==""?(Pe.searchHistoryController.pushInput(Be),Pe.searchHistoryController.reset(),Qt(g,se),Qr(g),g.scrollTo(ye.left,ye.top),De.e_stop(Le),S(g),Xe(),g.focus()):Ze=="<Up>"||Ze=="<Down>"?De.e_stop(Le):Ze=="<C-u>"&&(De.e_stop(Le),Xe(""))}if(g.getSearchCursor){var Y=k.searchArgs.forward,J=k.searchArgs.wholeWordOnly;an(g).setReversed(!Y);var ie=Y?"/":"?",se=an(g).getQuery(),ye=g.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var Se=Pe.macroModeState;if(Se.isPlaying){var Re=Se.replaySearchQueries.shift();P(Re,!0,!1)}else Qn(g,{onClose:B,prefix:ie,desc:"(JavaScript regexp)",onKeyUp:H,onKeyDown:K});break;case"wordUnderCursor":var de=Ln(g,{noSymbol:!0}),we=!0;if(de||(de=Ln(g,{noSymbol:!1}),we=!1),!de){_t(g,"No word under cursor"),S(g);return}var Re=g.getLine(de.start.line).substring(de.start.ch,de.end.ch);we&&J?Re="\\b"+Re+"\\b":Re=on(Re),Pe.jumpList.cachedCursor=g.getCursor(),g.setCursor(de.start),P(Re,!0,!1)}}},processEx:function(g,_,k){function P(H){Pe.exCommandHistoryController.pushInput(H),Pe.exCommandHistoryController.reset(),Kn.processCommand(g,H),g.state.vim&&S(g)}function B(H,K,Y){var J=z(H),ie,se;(J=="<Esc>"||J=="<C-c>"||J=="<C-[>"||J=="<BS>"&&K=="")&&(Pe.exCommandHistoryController.pushInput(K),Pe.exCommandHistoryController.reset(),De.e_stop(H),S(g),Y(),g.focus()),J=="<Up>"||J=="<Down>"?(De.e_stop(H),ie=J=="<Up>",se=H.target?H.target.selectionEnd:0,K=Pe.exCommandHistoryController.nextMatch(K,ie)||"",Y(K),se&&H.target&&(H.target.selectionEnd=H.target.selectionStart=Math.min(se,H.target.value.length))):J=="<C-u>"?(De.e_stop(H),Y("")):J&&J!="<Left>"&&J!="<Right>"&&Pe.exCommandHistoryController.reset()}k.type=="keyToEx"?Kn.processCommand(g,k.exArgs.input):_.visualMode?Qn(g,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:B,selectValueOnOpen:!1}):Qn(g,{onClose:P,prefix:":",onKeyDown:B})},evalInput:function(g,_){var k=_.inputState,P=k.motion,B=k.motionArgs||{},H=k.operator,K=k.operatorArgs||{},Y=k.registerName,J=_.sel,ie=Ve(_.visualMode?ue(g,J.head):g.getCursor("head")),se=Ve(_.visualMode?ue(g,J.anchor):g.getCursor("anchor")),ye=Ve(ie),Se=Ve(se),de,we,Re;if(H&&this.recordLastEdit(_,k),k.repeatOverride!==void 0?Re=k.repeatOverride:Re=k.getRepeat(),Re>0&&B.explicitRepeat?B.repeatIsExplicit=!0:(B.noRepeat||!B.explicitRepeat&&Re===0)&&(Re=1,B.repeatIsExplicit=!1),k.selectedCharacter&&(B.selectedCharacter=K.selectedCharacter=k.selectedCharacter),B.repeat=Re,S(g),P){var Le=gi[P](g,ie,B,_,k);if(_.lastMotion=gi[P],!Le)return;if(B.toJumplist){!H&&g.ace.curOp!=null&&(g.ace.curOp.command.scrollIntoView="center-animate");var Be=Pe.jumpList,Xe=Be.cachedCursor;Xe?(Ji(g,Xe,Le),delete Be.cachedCursor):Ji(g,ie,Le)}Le instanceof Array?(we=Le[0],de=Le[1]):de=Le,de||(de=Ve(ie)),_.visualMode?((!_.visualBlock||de.ch!==1/0)&&(de=ue(g,de,ye)),we&&(we=ue(g,we)),we=we||Se,J.anchor=we,J.head=de,_n(g),ki(g,_,"<",Je(we,de)?we:de),ki(g,_,">",Je(we,de)?de:we)):H||(g.ace.curOp&&(g.ace.curOp.vimDialogScroll="center-animate"),de=ue(g,de,ye),g.setCursor(de.line,de.ch))}if(H){if(K.lastSel){we=Se;var Ze=K.lastSel,Ke=Math.abs(Ze.head.line-Ze.anchor.line),jt=Math.abs(Ze.head.ch-Ze.anchor.ch);Ze.visualLine?de=new Ie(Se.line+Ke,Se.ch):Ze.visualBlock?de=new Ie(Se.line+Ke,Se.ch+jt):Ze.head.line==Ze.anchor.line?de=new Ie(Se.line,Se.ch+jt):de=new Ie(Se.line+Ke,Se.ch),_.visualMode=!0,_.visualLine=Ze.visualLine,_.visualBlock=Ze.visualBlock,J=_.sel={anchor:we,head:de},_n(g)}else _.visualMode&&(K.lastSel={anchor:Ve(J.anchor),head:Ve(J.head),visualBlock:_.visualBlock,visualLine:_.visualLine});var tt,tn,xt,ut,pn;if(_.visualMode){tt=lt(J.head,J.anchor),tn=Ht(J.head,J.anchor),xt=_.visualLine||K.linewise,ut=_.visualBlock?"block":xt?"line":"char";var Hn=x(g,tt,tn);if(pn=oi(g,{anchor:Hn.start,head:Hn.end},ut),xt){var nn=pn.ranges;if(ut=="block")for(var j=0;j<nn.length;j++)nn[j].head.ch=Pt(g,nn[j].head.line);else ut=="line"&&(nn[0].head=new Ie(nn[0].head.line+1,0))}}else{if(tt=Ve(we||Se),tn=Ve(de||ye),Je(tn,tt)){var Q=tt;tt=tn,tn=Q}xt=B.linewise||K.linewise,xt?Pn(g,tt,tn):B.forward&&Tn(g,tt,tn),ut="char";var re=!B.inclusive||xt,Hn=x(g,tt,tn);pn=oi(g,{anchor:Hn.start,head:Hn.end},ut,re)}g.setSelections(pn.ranges,pn.primary),_.lastMotion=null,K.repeat=Re,K.registerName=Y,K.linewise=xt;var oe=ao[H](g,K,pn.ranges,Se,de);_.visualMode&&sn(g,oe!=null),oe&&g.setCursor(oe)}},recordLastEdit:function(g,_,k){var P=Pe.macroModeState;P.isPlaying||(g.lastEditInputState=_,g.lastEditActionCommand=k,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=g.visualBlock?g.sel.head.line-g.sel.anchor.line:0)}},gi={moveToTopLine:function(g,_,k){var P=mr(g).top+k.repeat-1;return new Ie(P,zt(g.getLine(P)))},moveToMiddleLine:function(g){var _=mr(g),k=Math.floor((_.top+_.bottom)*.5);return new Ie(k,zt(g.getLine(k)))},moveToBottomLine:function(g,_,k){var P=mr(g).bottom-k.repeat+1;return new Ie(P,zt(g.getLine(P)))},expandToLine:function(g,_,k){var P=_;return new Ie(P.line+k.repeat-1,1/0)},findNext:function(g,_,k){var P=an(g),B=P.getQuery();if(B){var H=!k.forward;return H=P.isReversed()?!H:H,Fi(g,B),Jn(g,H,B,k.repeat)}},findAndSelectNextInclusive:function(g,_,k,P,B){var H=an(g),K=H.getQuery();if(K){var Y=!k.forward;Y=H.isReversed()?!Y:Y;var J=Pi(g,Y,K,k.repeat,P);if(J){if(B.operator)return J;var ie=J[0],se=new Ie(J[1].line,J[1].ch-1);if(P.visualMode){(P.visualLine||P.visualBlock)&&(P.visualLine=!1,P.visualBlock=!1,De.signal(g,"vim-mode-change",{mode:"visual",subMode:""}));var ye=P.sel.anchor;if(ye)return H.isReversed()?k.forward?[ye,ie]:[ye,se]:k.forward?[ye,se]:[ye,ie]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,De.signal(g,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,ie]:[ie,se]}}},goToMark:function(g,_,k,P){var B=fi(g,P,k.selectedCharacter);return B?k.linewise?{line:B.line,ch:zt(g.getLine(B.line))}:B:null},moveToOtherHighlightedEnd:function(g,_,k,P){if(P.visualBlock&&k.sameLine){var B=P.sel;return[ue(g,new Ie(B.anchor.line,B.head.ch)),ue(g,new Ie(B.head.line,B.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(g,_,k,P){for(var B=_,H=0;H<k.repeat;H++){var K=B;for(var Y in P.marks)if(s(Y)){var J=P.marks[Y].find(),ie=k.forward?Je(J,K):Je(K,J);if(!ie&&!(k.linewise&&J.line==K.line)){var se=ot(K,B),ye=k.forward?vn(K,J,B):vn(B,J,K);(se||ye)&&(B=J)}}}return k.linewise&&(B=new Ie(B.line,zt(g.getLine(B.line)))),B},moveByCharacters:function(g,_,k){var P=_,B=k.repeat,H=k.forward?P.ch+B:P.ch-B;return new Ie(P.line,H)},moveByLines:function(g,_,k,P){var B=_,H=B.ch;switch(P.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:H=P.lastHPos;break;default:P.lastHPos=H}var K=k.repeat+(k.repeatOffset||0),Y=k.forward?B.line+K:B.line-K,J=g.firstLine(),ie=g.lastLine();if(Y<J&&B.line==J)return this.moveToStartOfLine(g,_,k,P);if(Y>ie&&B.line==ie)return Tr(g,_,k,P,!0);var se=g.ace.session.getFoldLine(Y);return se&&(k.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),k.toFirstChar&&(H=zt(g.getLine(Y)),P.lastHPos=H),P.lastHSPos=g.charCoords(new Ie(Y,H),"div").left,new Ie(Y,H)},moveByDisplayLines:function(g,_,k,P){var B=_;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=g.charCoords(B,"div").left}var H=k.repeat,J=g.findPosV(B,k.forward?H:-H,"line",P.lastHSPos);if(J.hitSide)if(k.forward)var K=g.charCoords(J,"div"),Y={top:K.top+8,left:P.lastHSPos},J=g.coordsChar(Y,"div");else{var ie=g.charCoords(new Ie(g.firstLine(),0),"div");ie.left=P.lastHSPos,J=g.coordsChar(ie,"div")}return P.lastHPos=J.ch,J},moveByPage:function(g,_,k){var P=_,B=k.repeat;return g.findPosV(P,k.forward?B:-B,"page")},moveByParagraph:function(g,_,k){var P=k.forward?1:-1;return yo(g,_,k.repeat,P)},moveBySentence:function(g,_,k){var P=k.forward?1:-1;return tr(g,_,k.repeat,P)},moveByScroll:function(g,_,k,P){var B=g.getScrollInfo(),H=null,K=k.repeat;K||(K=B.clientHeight/(2*g.defaultTextHeight()));var Y=g.charCoords(_,"local");if(k.repeat=K,H=gi.moveByDisplayLines(g,_,k,P),!H)return null;var J=g.charCoords(H,"local");return g.scrollTo(null,B.top+J.top-Y.top),H},moveByWords:function(g,_,k){return Vn(g,_,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(g,_,k){var P=k.repeat,B=Zr(g,P,k.forward,k.selectedCharacter,_),H=k.forward?-1:1;return Xi(H,k),B?(B.ch+=H,B):null},moveToCharacter:function(g,_,k){var P=k.repeat;return Xi(0,k),Zr(g,P,k.forward,k.selectedCharacter,_)||_},moveToSymbol:function(g,_,k){var P=k.repeat;return er(g,P,k.forward,k.selectedCharacter)||_},moveToColumn:function(g,_,k,P){var B=k.repeat;return P.lastHPos=B-1,P.lastHSPos=g.charCoords(_,"div").left,ks(g,B)},moveToEol:function(g,_,k,P){return Tr(g,_,k,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(g,_){var k=_;return new Ie(k.line,zt(g.getLine(k.line)))},moveToMatchedSymbol:function(g,_){for(var k=_,P=k.line,B=k.ch,H=g.getLine(P),K;B<H.length;B++)if(K=H.charAt(B),K&&r(K)){var Y=g.getTokenTypeAt(new Ie(P,B+1));if(Y!=="string"&&Y!=="comment")break}if(B<H.length){var J=/[<>]/.test(H[B])?/[(){}[\]<>]/:/[(){}[\]]/,ie=g.findMatchingBracket(new Ie(P,B+1),{bracketRegex:J});return ie.to}return k},moveToStartOfLine:function(g,_){return new Ie(_.line,0)},moveToLineOrEdgeOfDocument:function(g,_,k){var P=k.forward?g.lastLine():g.firstLine();return k.repeatIsExplicit&&(P=k.repeat-g.getOption("firstLineNumber")),new Ie(P,zt(g.getLine(P)))},moveToStartOfDisplayLine:function(g){return g.execCommand("goLineLeft"),g.getCursor()},moveToEndOfDisplayLine:function(g){g.execCommand("goLineRight");var _=g.getCursor();return _.sticky=="before"&&_.ch--,_},textObjectManipulation:function(g,_,k,P){var B={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},H={"'":!0,'"':!0,"`":!0},K=k.selectedCharacter;K=="b"?K="(":K=="B"&&(K="{");var Y=!k.textObjectInner,J,ie;if(B[K]){if(ie=!0,J=yn(g,_,K,Y),!J){var se=g.getSearchCursor(new RegExp("\\"+K,"g"),_);se.find()&&(J=yn(g,se.from(),K,Y))}}else if(H[K])ie=!0,J=Yn(g,_,K,Y);else if(K==="W"||K==="w")for(var ye=k.repeat||1;ye-- >0;){var Se=Ln(g,{inclusive:Y,innerWord:!Y,bigWord:K==="W",noSymbol:K==="W",multiline:!0},J&&J.end);Se&&(J||(J=Se),J.end=Se.end)}else if(K==="p")if(J=yo(g,_,k.repeat,0,Y),k.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var de=P.inputState.operatorArgs;de&&(de.linewise=!0),J.end.line--}else if(K==="t")J=$r(g,_,Y);else if(K==="s"){var we=g.getLine(_.line);_.ch>0&&m(we[_.ch])&&(_.ch-=1);var Re=Go(g,_,k.repeat,1,Y),Le=Go(g,_,k.repeat,-1,Y);h(g.getLine(Le.line)[Le.ch])&&h(g.getLine(Re.line)[Re.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),J={start:Le,end:Re}}return J?g.state.vim.visualMode?Gt(g,J.start,J.end,ie):[J.start,J.end]:null},repeatLastCharacterSearch:function(g,_,k){var P=Pe.lastCharacterSearch,B=k.repeat,H=k.forward===P.forward,K=(P.increment?1:0)*(H?-1:1);g.moveH(-K,"char"),k.inclusive=!!H;var Y=Zr(g,B,H,P.selectedCharacter);return Y?(Y.ch+=K,Y):(g.moveH(K,"char"),_)}},ao={change:function(g,_,k){var P,B,H=g.state.vim,K=k[0].anchor,Y=k[0].head;if(H.visualMode)if(_.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,g.setSelection(K,Y),B=g.getSelection(),g.replaceSelection(""),P=K;else{B=g.getSelection();var se=ce("",k.length);g.replaceSelections(se),P=lt(k[0].head,k[0].anchor)}else{B=g.getRange(K,Y);var J=H.lastEditInputState||{};if(J.motion=="moveByWords"&&!h(B)){var ie=/\s+$/.exec(B);ie&&J.motionArgs&&J.motionArgs.forward&&(Y=me(Y,0,-ie[0].length),B=B.slice(0,-ie[0].length))}_.linewise&&(K=new Ie(K.line,zt(g.getLine(K.line))),Y.line>K.line&&(Y=new Ie(Y.line-1,Number.MAX_VALUE))),g.replaceRange("",K,Y),P=K}Pe.registerController.pushText(_.registerName,"change",B,_.linewise,k.length>1),fn.enterInsertMode(g,{head:P},g.state.vim)},delete:function(g,_,k){var P,B,H=g.state.vim;if(H.visualBlock){B=g.getSelection();var J=ce("",k.length);g.replaceSelections(J),P=lt(k[0].head,k[0].anchor)}else{var K=k[0].anchor,Y=k[0].head;_.linewise&&Y.line!=g.firstLine()&&K.line==g.lastLine()&&K.line==Y.line-1&&(K.line==g.firstLine()?K.ch=0:K=new Ie(K.line-1,Pt(g,K.line-1))),B=g.getRange(K,Y),g.replaceRange("",K,Y),P=K,_.linewise&&(P=gi.moveToFirstNonWhiteSpaceCharacter(g,K))}return Pe.registerController.pushText(_.registerName,"delete",B,_.linewise,H.visualBlock),ue(g,P)},indent:function(g,_,k){var P=g.state.vim,B=P.visualMode?_.repeat:1;if(P.visualBlock){for(var H=g.getOption("tabSize"),K=g.getOption("indentWithTabs")?" ":" ".repeat(H),Y,J=k.length-1;J>=0;J--)if(Y=lt(k[J].anchor,k[J].head),_.indentRight)g.replaceRange(K.repeat(B),Y,Y);else{for(var ie=g.getLine(Y.line),se=0,ye=0;ye<B;ye++){var Se=ie[Y.ch+se];if(Se==" ")se++;else{if(Se!=" ")break;se++;for(var de=1;de<K.length&&(Se=ie[Y.ch+se],Se===" ");de++)se++}}g.replaceRange("",Y,me(Y,0,se))}return Y}if(g.indentMore)for(var ye=0;ye<B;ye++)_.indentRight?g.indentMore():g.indentLess();else{var we=k[0].anchor.line,Re=P.visualBlock?k[k.length-1].anchor.line:k[0].head.line;_.linewise&&Re--;for(var J=we;J<=Re;J++)for(var ye=0;ye<B;ye++)g.indentLine(J,_.indentRight)}return gi.moveToFirstNonWhiteSpaceCharacter(g,k[0].anchor)},indentAuto:function(g,_,k){return g.execCommand("indentAuto"),gi.moveToFirstNonWhiteSpaceCharacter(g,k[0].anchor)},hardWrap:function(g,_,k,P,B){if(g.hardWrap){var H=k[0].anchor.line,K=k[0].head.line;_.linewise&&K--;var Y=g.hardWrap({from:H,to:K});return Y>H&&_.linewise&&Y--,_.keepCursor?P:new Ie(Y,0)}},changeCase:function(g,_,k,P,B){for(var H=g.getSelections(),K=[],Y=_.toLower,J=0;J<H.length;J++){var ie=H[J],se="";if(Y===!0)se=ie.toLowerCase();else if(Y===!1)se=ie.toUpperCase();else for(var ye=0;ye<ie.length;ye++){var Se=ie.charAt(ye);se+=i(Se)?Se.toLowerCase():Se.toUpperCase()}K.push(se)}return g.replaceSelections(K),_.shouldMoveCursor?B:!g.state.vim.visualMode&&_.linewise&&k[0].anchor.line+1==k[0].head.line?gi.moveToFirstNonWhiteSpaceCharacter(g,P):_.linewise?P:lt(k[0].anchor,k[0].head)},yank:function(g,_,k,P){var B=g.state.vim,H=g.getSelection(),K=B.visualMode?lt(B.sel.anchor,B.sel.head,k[0].head,k[0].anchor):P;return Pe.registerController.pushText(_.registerName,"yank",H,_.linewise,B.visualBlock),K}},fn={jumpListWalk:function(g,_,k){if(!k.visualMode){var P=_.repeat,B=_.forward,H=Pe.jumpList,K=H.move(g,B?P:-P),Y=K?K.find():void 0;Y=Y||g.getCursor(),g.setCursor(Y),g.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(g,_,k){if(!k.visualMode){var P=_.repeat||1,B=g.defaultTextHeight(),H=g.getScrollInfo().top,K=B*P,Y=_.forward?H+K:H-K,J=Ve(g.getCursor()),ie=g.charCoords(J,"local");if(_.forward)Y>ie.top?(J.line+=(Y-ie.top)/B,J.line=Math.ceil(J.line),g.setCursor(J),ie=g.charCoords(J,"local"),g.scrollTo(null,ie.top)):g.scrollTo(null,Y);else{var se=Y+g.getScrollInfo().clientHeight;se<ie.bottom?(J.line-=(ie.bottom-se)/B,J.line=Math.floor(J.line),g.setCursor(J),ie=g.charCoords(J,"local"),g.scrollTo(null,ie.bottom-g.getScrollInfo().clientHeight)):g.scrollTo(null,Y)}}},scrollToCursor:function(g,_){var k=g.getCursor().line,P=g.charCoords(new Ie(k,0),"local"),B=g.getScrollInfo().clientHeight,H=P.top;switch(_.position){case"center":H=P.bottom-B/2;break;case"bottom":var K=new Ie(k,g.getLine(k).length-1),Y=g.charCoords(K,"local"),J=Y.bottom-H;H=H-B+J}g.scrollTo(null,H)},replayMacro:function(g,_,k){var P=_.selectedCharacter,B=_.repeat,H=Pe.macroModeState;for(P=="@"?P=H.latestRegister:H.latestRegister=P;B--;)So(g,k,H,P)},enterMacroRecordMode:function(g,_){var k=Pe.macroModeState,P=_.selectedCharacter;Pe.registerController.isValidRegister(P)&&k.enterMacroRecordMode(g,P)},toggleOverwrite:function(g){g.state.overwrite?(g.toggleOverwrite(!1),g.setOption("keyMap","vim-insert"),De.signal(g,"vim-mode-change",{mode:"insert"})):(g.toggleOverwrite(!0),g.setOption("keyMap","vim-replace"),De.signal(g,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(g,_,k){if(!g.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=_&&_.repeat||1;var P=_?_.insertAt:null,B=k.sel,H=_.head||g.getCursor("head"),K=g.listSelections().length;if(P=="eol")H=new Ie(H.line,Pt(g,H.line));else if(P=="bol")H=new Ie(H.line,0);else if(P=="charAfter"){var Y=x(g,H,me(H,0,1));H=Y.end}else if(P=="firstNonBlank"){var Y=x(g,H,gi.moveToFirstNonWhiteSpaceCharacter(g,H));H=Y.end}else if(P=="startOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(H=new Ie(Math.min(B.head.line,B.anchor.line),Math.min(B.head.ch,B.anchor.ch)),K=Math.abs(B.head.line-B.anchor.line)+1):B.head.line<B.anchor.line?H=B.head:H=new Ie(B.anchor.line,0)}else if(P=="endOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(H=new Ie(Math.min(B.head.line,B.anchor.line),Math.max(B.head.ch,B.anchor.ch)+1),K=Math.abs(B.head.line-B.anchor.line)+1):B.head.line>=B.anchor.line?H=me(B.head,0,1):H=new Ie(B.anchor.line,0)}else if(P=="inplace"){if(k.visualMode)return}else P=="lastEdit"&&(H=Lr(g)||H);g.setOption("disableInput",!1),_&&_.replace?(g.toggleOverwrite(!0),g.setOption("keyMap","vim-replace"),De.signal(g,"vim-mode-change",{mode:"replace"})):(g.toggleOverwrite(!1),g.setOption("keyMap","vim-insert"),De.signal(g,"vim-mode-change",{mode:"insert"})),Pe.macroModeState.isPlaying||(g.on("change",Er),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=g.setBookmark(H,{insertLeft:!0}),De.on(g.getInputField(),"keydown",Co)),k.visualMode&&sn(g),ri(g,H,K)}},toggleVisualMode:function(g,_,k){var P=_.repeat,B=g.getCursor(),H;if(k.visualMode)k.visualLine^_.linewise||k.visualBlock^_.blockwise?(k.visualLine=!!_.linewise,k.visualBlock=!!_.blockwise,De.signal(g,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),_n(g)):sn(g);else{k.visualMode=!0,k.visualLine=!!_.linewise,k.visualBlock=!!_.blockwise,H=ue(g,new Ie(B.line,B.ch+P-1));var K=x(g,B,H);k.sel={anchor:K.start,head:K.end},De.signal(g,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),_n(g),ki(g,k,"<",lt(B,H)),ki(g,k,">",Ht(B,H))}},reselectLastSelection:function(g,_,k){var P=k.lastSelection;if(k.visualMode&&Ot(g,k),P){var B=P.anchorMark.find(),H=P.headMark.find();if(!B||!H)return;k.sel={anchor:B,head:H},k.visualMode=!0,k.visualLine=P.visualLine,k.visualBlock=P.visualBlock,_n(g),ki(g,k,"<",lt(B,H)),ki(g,k,">",Ht(B,H)),De.signal(g,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(g,_,k){var P,B;if(k.visualMode){if(P=g.getCursor("anchor"),B=g.getCursor("head"),Je(B,P)){var H=B;B=P,P=H}B.ch=Pt(g,B.line)-1}else{var K=Math.max(_.repeat,2);P=g.getCursor(),B=ue(g,new Ie(P.line+K-1,1/0))}for(var Y=0,J=P.line;J<B.line;J++){Y=Pt(g,P.line);var ie="",se=0;if(!_.keepSpaces){var ye=g.getLine(P.line+1);se=ye.search(/\S/),se==-1?se=ye.length:ie=" "}g.replaceRange(ie,new Ie(P.line,Y),new Ie(P.line+1,se))}var Se=ue(g,new Ie(P.line,Y));k.visualMode&&sn(g,!1),g.setCursor(Se)},newLineAndEnterInsertMode:function(g,_,k){k.insertMode=!0;var P=Ve(g.getCursor());if(P.line===g.firstLine()&&!_.after)g.replaceRange(`
|
|
1447
|
+
`,new Ie(g.firstLine(),0)),g.setCursor(g.firstLine(),0);else{P.line=_.after?P.line:P.line-1,P.ch=Pt(g,P.line),g.setCursor(P);var B=De.commands.newlineAndIndentContinueComment||De.commands.newlineAndIndent;B(g)}this.enterInsertMode(g,{repeat:_.repeat},k)},paste:function(g,_,k){var P=this,B=Pe.registerController.getRegister(_.registerName),H=function(){var K=B.toString();P.continuePaste(g,_,k,K,B)};_.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(K){P.continuePaste(g,_,k,K,B)},function(){H()}):H()},continuePaste:function(g,_,k,de,B){var H=Ve(g.getCursor());if(de){if(_.matchIndent){var K=g.getOption("tabSize"),Y=function(nn){var j=nn.split(" ").length-1,Q=nn.split(" ").length-1;return j*K+Q*1},J=g.getLine(g.getCursor().line),ie=Y(J.match(/^\s*/)[0]),se=de.replace(/\n$/,""),ye=de!==se,Se=Y(de.match(/^\s*/)[0]),de=se.replace(/^\s*/gm,function(nn){var j=ie+(Y(nn)-Se);if(j<0)return"";if(g.getOption("indentWithTabs")){var Q=Math.floor(j/K);return Array(Q+1).join(" ")}return Array(j+1).join(" ")});de+=ye?`
|
|
1448
|
+
`:""}if(_.repeat>1)var de=Array(_.repeat+1).join(de);var we=B.linewise,Re=B.blockwise;if(Re){de=de.split(`
|
|
1449
1449
|
`),we&&de.pop();for(var Le=0;Le<de.length;Le++)de[Le]=de[Le]==""?" ":de[Le];H.ch+=_.after?1:0,H.ch=Math.min(Pt(g,H.line),H.ch)}else we?k.visualMode?de=k.visualLine?de.slice(0,-1):`
|
|
1450
1450
|
`+de.slice(0,de.length-1)+`
|
|
1451
1451
|
`:_.after?(de=`
|
|
1452
|
-
`+de.slice(0,de.length-1),H.ch=Pt(g,H.line)):H.ch=0:H.ch+=_.after?1:0;var
|
|
1453
|
-
`,new Ie(ut,0));var pn=Pt(g,ut);pn<H.ch&&Cn(g,ut,H.ch)}g.setCursor(H),Fn(g,new Ie(H.line+de.length-1,H.ch)),g.replaceSelections(de),
|
|
1454
|
-
`)k.visualMode||g.replaceRange("",
|
|
1455
|
-
`),g.replaceSelections(se)}else g.replaceRange(se,
|
|
1456
|
-
`,"\\r":"\r","\\t":" "},
|
|
1457
|
-
`,"\\r":"\r","\\t":" ","\\&":"&"},
|
|
1458
|
-
|
|
1459
|
-
`;if(k){var H;k=k.join("");for(var Y=0;Y<k.length;Y++)if(H=k.charAt(Y),!!Pe.registerController.isValidRegister(H)){var J=P[H]||new B
|
|
1460
|
-
`}}else for(var H in P){var K=P[H].toString();K.length&&(
|
|
1461
|
-
`)}_t(g,
|
|
1462
|
-
`),Le=ie||(J=="decimal"?/(-?)([\d]+)/:J=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:J=="octal"?/([0-7]+)/:null),
|
|
1463
|
-
`),de,we)}},vglobal:function(g,_){this.global(g,_)},normal:function(g,_){var k=_.argString;if(k&&k[0]=="!"&&(k=k.slice(1),Vt=!0),k=k.trimStart(),!k){_t(g,"Argument is required.");return}var P=_.line;if(typeof P=="number")for(var
|
|
1464
|
-
`));return}var we=0,Re=function(){if(we<se.length){var Le=se[we++],We=g.getLineNumber(Le);if(We==null){Re();return}var Xe=We+1+J;Kn.processCommand(g,Xe,{callback:Re})}else g.releaseLineHandles&&g.releaseLineHandles()};Re()},substitute:function(g,_){if(!g.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=_.argString,P=k?ir(k,k[0]):[],W,H="",K,Y,J,ie=!1,se=!1;if(P.length)W=P[0],C("pcre")&&W!==""&&(W=new RegExp(W).source),H=P[1],H!==void 0&&(C("pcre")?H=As(H.replace(/([^\\])&/g,"$1$$&")):H=_s(H),Pe.lastSubstituteReplacePart=H),K=P[2]?P[2].split(" "):[];else if(k&&k.length){_t(g,"Substitutions should be of the form :s/pattern/replace/");return}if(K&&(Y=K[0],J=parseInt(K[1]),Y&&(Y.indexOf("c")!=-1&&(ie=!0),Y.indexOf("g")!=-1&&(se=!0),C("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{Qt(g,W,!0,!0)}catch{_t(g,"Invalid regex: "+W);return}if(H=H||Pe.lastSubstituteReplacePart,H===void 0){_t(g,"No previous substitute regular expression");return}var ye=an(g),Se=ye.getQuery(),de=_.line!==void 0?_.line:g.getCursor().line,we=_.lineEnd||de;de==g.firstLine()&&we==g.lastLine()&&(we=1/0),J&&(de=we,we=de+J-1);var Re=ue(g,new Ie(de,0)),Le=g.getSearchCursor(Se,Re);Jr(g,ie,se,de,we,Le,Se,H,_.callback)},startinsert:function(g,_){L(g,_.argString=="!"?"A":"i",{})},redo:De.commands.redo,undo:De.commands.undo,write:function(g){De.commands.save?De.commands.save(g):g.save&&g.save()},nohlsearch:function(g){Qr(g)},yank:function(g){var _=Ve(g.getCursor()),k=_.line,P=g.getLine(k);Pe.registerController.pushText("0","yank",P,!0,!0)},delete:function(g,_){var k=_.selectionLine,P=isNaN(_.selectionLineEnd)?k:_.selectionLineEnd;ao.delete(g,{linewise:!0},[{anchor:new Ie(k,0),head:new Ie(P+1,0)}])},join:function(g,_){var k=_.selectionLine,P=isNaN(_.selectionLineEnd)?k:_.selectionLineEnd;g.setCursor(new Ie(k,0)),fn.joinLines(g,{repeat:P-k},g.state.vim)},delmarks:function(g,_){if(!_.argString||!Si(_.argString)){_t(g,"Argument required");return}for(var k=g.state.vim,P=new De.StringStream(Si(_.argString));!P.eol();){P.eatSpace();var W=P.pos;if(!P.match(/[a-zA-Z]/,!1)){_t(g,"Invalid argument: "+_.argString.substring(W));return}var H=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){_t(g,"Invalid argument: "+_.argString.substring(W));return}var K=H,Y=P.next();if(!(s(K)&&s(Y)||i(K)&&i(Y))){_t(g,"Invalid argument: "+K+"-");return}var J=K.charCodeAt(0),ie=Y.charCodeAt(0);if(J>=ie){_t(g,"Invalid argument: "+_.argString.substring(W));return}for(var se=0;se<=ie-J;se++){var ye=String.fromCharCode(J+se);delete k.marks[ye]}}else delete k.marks[H]}}},Kn=new jn;R("insertModeEscKeysTimeout",200,"number"),De.Vim=ct;var Xn={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",insert:"Ins",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},Mi=ct.handleKey.bind(ct);ct.handleKey=function(g,_,k){return g.operation(function(){return Mi(g,_,k)},!0)},D(),u.CodeMirror=De;var Ti=ct.maybeInitVimState_;u.handler={$id:"ace/keyboard/vim",drawCursor:function(g,_,k,P,W){var H=this.state.vim||{},K=k.characterWidth,Y=k.lineHeight,J=_.top,ie=_.left;if(!H.insertMode){var se=P.cursor?Rn.comparePoints(P.cursor,P.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!se&&ie>K&&(ie-=K)}!H.insertMode&&H.status&&(Y/=2,J+=Y),or.translate(g,ie,J),or.setStyle(g.style,"width",K+"px"),or.setStyle(g.style,"height",Y+"px")},$getDirectionForHighlight:function(g){var _=g.state.cm,k=Ti(_);if(!k.insertMode)return g.session.selection.isBackwards()||g.session.selection.isEmpty()},handleKeyboard:function(g,_,k,P,W){var H=g.editor,K=H.state.cm,Y=Ti(K);if(P!=-1){if(Y.insertMode||(_==-1?(k.charCodeAt(0)>255&&g.inputKey&&(k=g.inputKey,k&&g.inputHash==4&&(k=k.toUpperCase())),g.inputChar=k):_==4||_==0?g.inputKey==k&&g.inputHash==_&&g.inputChar?(k=g.inputChar,_=-1):(g.inputChar=null,g.inputKey=k,g.inputHash=_):g.inputChar=g.inputKey=null),K.state.overwrite&&Y.insertMode&&k=="backspace"&&_==0)return{command:"gotoleft"};if(k=="c"&&_==1&&!Or.isMac&&H.getCopyText())return H.once("copy",function(){Y.insertMode?H.selection.clearSelection():K.operation(function(){sn(K)})}),{command:"null",passEvent:!0};if(k=="esc"&&!Y.insertMode&&!Y.visualMode&&!K.ace.inMultiSelectMode){var J=an(K),ie=J.getOverlay();ie&&K.removeOverlay(ie)}if(_==-1||_&1||_===0&&k.length>1){var se=Y.insertMode,ye=_o(_,k,W||{},Y);Y.status==null&&(Y.status="");var Se=Rr(K,ye,"user");return Y=Ti(K),Se&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),K._signal("changeStatus"),!Se&&(_!=-1||se)?void 0:{command:"null",passEvent:!Se}}}},attach:function(g){function _(){var P=Ti(k).insertMode;k.ace.renderer.setStyle("normal-mode",!P),g.textInput.setCommandMode(!P),g.renderer.$keepTextAreaAtCursor=P,g.renderer.$blockCursor=!P}g.state||(g.state={});var k=new De(g);g.state.cm=k,g.$vimModeHandler=this,p(k),Ti(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(Ti(k).status=null,k.ace._signal("changeStatus"),k.ace.session.markUndoGroup())}),k.on("changeStatus",function(){k.ace.renderer.updateCursor(),k.ace._signal("changeStatus")}),k.on("vim-mode-change",function(){k.virtualSelectionMode()||(_(),k._signal("changeStatus"))}),_(),g.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},detach:function(g){var _=g.state.cm;d(_),_.destroy(),g.state.cm=null,g.$vimModeHandler=null,g.renderer.$cursorLayer.drawCursor=null,g.renderer.setStyle("normal-mode",!1),g.textInput.setCommandMode(!1),g.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(g){var _=g.state.cm,k=Ti(_);if(k.insertMode)return"INSERT";var P="";return k.visualMode&&(P+="VISUAL",k.visualLine&&(P+=" LINE"),k.visualBlock&&(P+=" BLOCK")),k.status&&(P+=(P?" ":"")+k.status),P}},ct.defineOption({name:"wrap",set:function(g,_){_&&_.ace.setOption("wrap",g)},type:"boolean"},!1),ct.defineEx("write","w",function(){console.log(":write is not implemented")}),ln.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),ln.push({keys:"gq",type:"operator",operator:"hardWrap"}),ct.defineOperator("hardWrap",function(g,_,k,P,W){var H=k[0].anchor.line,K=k[0].head.line;return _.linewise&&K--,wr(g.ace,{startRow:H,endRow:K}),Ie(K,0)}),R("textwidth",void 0,"number",["tw"],function(g,_){if(_!==void 0){if(g===void 0){var k=_.ace.getOption("printMarginColumn");return k}var P=Math.round(g);P>1&&_.ace.setOption("printMarginColumn",P)}}),fn.aceCommand=function(g,_,k){g.vimCmd=_,g.ace.inVirtualSelectionMode?g.ace.on("beforeEndOperation",Wi):Wi(null,g.ace)},fn.fold=function(g,_,k){g.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(_.all?2:0)+(_.open?1:0)])},Dr=ln.length,u.handler.defaultKeymap=ln,u.handler.actions=fn,u.Vim=ct}),function(){ace.require(["ace/keyboard/vim"],function(e){l&&(l.exports=e)})}()}(kc)),kc.exports}_k();var Cc={},Cf;function Ak(){return Cf||(Cf=1,function(l){(function(){var c={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(x){return $(v(x),arguments)}function u(x,p){return e.apply(null,[x].concat(p||[]))}function $(x,p){var d=1,o=x.length,a,s="",r,n,i,h,m,y,R,T;for(r=0;r<o;r++)if(typeof x[r]=="string")s+=x[r];else if(typeof x[r]=="object"){if(i=x[r],i.keys)for(a=p[d],n=0;n<i.keys.length;n++){if(a==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',i.keys[n],i.keys[n-1]));a=a[i.keys[n]]}else i.param_no?a=p[i.param_no]:a=p[d++];if(c.not_type.test(i.type)&&c.not_primitive.test(i.type)&&a instanceof Function&&(a=a()),c.numeric_arg.test(i.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(e("[sprintf] expecting number but found %T",a));switch(c.number.test(i.type)&&(R=a>=0),i.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,i.width?parseInt(i.width):0);break;case"e":a=i.precision?parseFloat(a).toExponential(i.precision):parseFloat(a).toExponential();break;case"f":a=i.precision?parseFloat(a).toFixed(i.precision):parseFloat(a);break;case"g":a=i.precision?String(Number(a.toPrecision(i.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=i.precision?a.substring(0,i.precision):a;break;case"t":a=String(!!a),a=i.precision?a.substring(0,i.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=i.precision?a.substring(0,i.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=i.precision?a.substring(0,i.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}c.json.test(i.type)?s+=a:(c.number.test(i.type)&&(!R||i.sign)?(T=R?"+":"-",a=a.toString().replace(c.sign,"")):T="",m=i.pad_char?i.pad_char==="0"?"0":i.pad_char.charAt(1):" ",y=i.width-(T+a).length,h=i.width&&y>0?m.repeat(y):"",s+=i.align?T+a+h:m==="0"?T+h+a:h+T+a)}return s}var b=Object.create(null);function v(x){if(b[x])return b[x];for(var p=x,d,o=[],a=0;p;){if((d=c.text.exec(p))!==null)o.push(d[0]);else if((d=c.modulo.exec(p))!==null)o.push("%");else if((d=c.placeholder.exec(p))!==null){if(d[2]){a|=1;var s=[],r=d[2],n=[];if((n=c.key.exec(r))!==null)for(s.push(n[1]);(r=r.substring(n[0].length))!=="";)if((n=c.key_access.exec(r))!==null)s.push(n[1]);else if((n=c.index_access.exec(r))!==null)s.push(n[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");d[2]=s}else a|=2;if(a===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:d[0],param_no:d[1],keys:d[2],sign:d[3],pad_char:d[4],align:d[5],width:d[6],precision:d[7],type:d[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");p=p.substring(d[0].length)}return b[x]=o}l.sprintf=e,l.vsprintf=u,typeof window<"u"&&(window.sprintf=e,window.vsprintf=u)})()}(Cc)),Cc}Ak();const _g={props:{config:{type:Object},packets:{type:Array}},data:function(){return{currentConfig:{},currentPackets:[],latestData:null}},computed:{hasRaw:function(){for(let l=0;l<this.currentPackets.length;l++)if(this.currentPackets[l].mode==="RAW")return!0;return!1},hasDecom:function(){for(let l=0;l<this.currentPackets.length;l++)if(this.currentPackets[l].mode==="DECOM")return!0;return!1}},watch:{currentConfig:{deep:!0,handler:function(l){this.$emit("config",l)}}},created:function(){this.config&&(this.currentConfig={...this.config}),this.packets&&(this.currentPackets=[...this.packets])},methods:{receive:function(l){this.latestData=l}}};var Ks={exports:{}};/**
|
|
1452
|
+
`+de.slice(0,de.length-1),H.ch=Pt(g,H.line)):H.ch=0:H.ch+=_.after?1:0;var Be;if(k.visualMode){k.lastPastedText=de;var Xe,Ze=ze(g,k),Ke=Ze[0],jt=Ze[1],tt=g.getSelection(),tn=g.listSelections(),xt=new Array(tn.length).join("1").split("1");k.lastSelection&&(Xe=k.lastSelection.headMark.find()),Pe.registerController.unnamedRegister.setText(tt),Re?(g.replaceSelections(xt),jt=new Ie(Ke.line+de.length-1,Ke.ch),g.setCursor(Ke),Fn(g,jt),g.replaceSelections(de),Be=Ke):k.visualBlock?(g.replaceSelections(xt),g.setCursor(Ke),g.replaceRange(de,Ke,Ke),Be=Ke):(g.replaceRange(de,Ke,jt),Be=g.posFromIndex(g.indexFromPos(Ke)+de.length-1)),Xe&&(k.lastSelection.headMark=g.setBookmark(Xe)),we&&(Be.ch=0)}else if(Re){g.setCursor(H);for(var Le=0;Le<de.length;Le++){var ut=H.line+Le;ut>g.lastLine()&&g.replaceRange(`
|
|
1453
|
+
`,new Ie(ut,0));var pn=Pt(g,ut);pn<H.ch&&Cn(g,ut,H.ch)}g.setCursor(H),Fn(g,new Ie(H.line+de.length-1,H.ch)),g.replaceSelections(de),Be=H}else if(g.replaceRange(de,H),we){var ut=_.after?H.line+1:H.line;Be=new Ie(ut,zt(g.getLine(ut)))}else Be=Ve(H),/\n/.test(de)||(Be.ch+=de.length-(_.after?1:0));k.visualMode&&sn(g,!1),g.setCursor(Be)}},undo:function(g,_){g.operation(function(){qe(g,De.commands.undo,_.repeat)(),g.setCursor(ue(g,g.getCursor("start")))})},redo:function(g,_){qe(g,De.commands.redo,_.repeat)()},setRegister:function(g,_,k){k.inputState.registerName=_.selectedCharacter},insertRegister:function(g,_,k){var P=_.selectedCharacter,B=Pe.registerController.getRegister(P),H=B&&B.toString();H&&g.replaceSelection(H)},oneNormalCommand:function(g,_,k){pi(g,!0),k.insertModeReturn=!0,De.on(g,"vim-command-done",function P(){k.visualMode||(k.insertModeReturn&&(k.insertModeReturn=!1,k.insertMode||fn.enterInsertMode(g,{},k)),De.off(g,"vim-command-done",P))})},setMark:function(g,_,k){var P=_.selectedCharacter;ki(g,k,P,g.getCursor())},replace:function(g,_,k){var P=_.selectedCharacter,B=g.getCursor(),H,K,Y=g.listSelections();if(k.visualMode)B=g.getCursor("start"),K=g.getCursor("end");else{var J=g.getLine(B.line);H=B.ch+_.repeat,H>J.length&&(H=J.length),K=new Ie(B.line,H)}var ie=x(g,B,K);if(B=ie.start,K=ie.end,P==`
|
|
1454
|
+
`)k.visualMode||g.replaceRange("",B,K),(De.commands.newlineAndIndentContinueComment||De.commands.newlineAndIndent)(g);else{var se=g.getRange(B,K);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),se=se.replace(/[^\n]/g,P),k.visualBlock){var ye=new Array(g.getOption("tabSize")+1).join(" ");se=g.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),se=se.replace(/\t/g,ye).replace(/[^\n]/g,P).split(`
|
|
1455
|
+
`),g.replaceSelections(se)}else g.replaceRange(se,B,K);k.visualMode?(B=Je(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,g.setCursor(B),sn(g,!1)):g.setCursor(me(K,0,-1))}},incrementNumberToken:function(g,_){for(var k=g.getCursor(),P=g.getLine(k.line),B=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,H,K,Y,J;(H=B.exec(P))!==null&&(K=H.index,Y=K+H[0].length,!(k.ch<Y)););if(!(!_.backtrack&&Y<=k.ch)&&H){var ie=H[2]||H[4],se=H[3]||H[5],ye=_.increase?1:-1,Se={"0b":2,0:8,"":10,"0x":16}[ie.toLowerCase()],de=parseInt(H[1]+se,Se)+ye*_.repeat;J=de.toString(Se);var we=ie?new Array(se.length-J.length+1+H[1].length).join("0"):"";J.charAt(0)==="-"?J="-"+ie+we+J.substr(1):J=ie+we+J;var Re=new Ie(k.line,K),Le=new Ie(k.line,Y);g.replaceRange(J,Re,Le),g.setCursor(new Ie(k.line,K+J.length-1))}},repeatLastEdit:function(g,_,k){var P=k.lastEditInputState;if(P){var B=_.repeat;B&&_.repeatIsExplicit?k.lastEditInputState.repeatOverride=B:B=k.lastEditInputState.repeatOverride||B,Zo(g,k,B,!1)}},indent:function(g,_){g.indentLine(g.getCursor().line,_.indentRight)},exitInsertMode:pi},Ai={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},$i={bracket:{isComplete:function(g){if(g.nextCh===g.symb){if(g.depth++,g.depth>=1)return!0}else g.nextCh===g.reverseSymb&&g.depth--;return!1}},section:{init:function(g){g.curMoveThrough=!0,g.symb=(g.forward?"]":"[")===g.symb?"{":"}"},isComplete:function(g){return g.index===0&&g.nextCh===g.symb}},comment:{isComplete:function(g){var _=g.lastCh==="*"&&g.nextCh==="/";return g.lastCh=g.nextCh,_}},method:{init:function(g){g.symb=g.symb==="m"?"{":"}",g.reverseSymb=g.symb==="{"?"}":"{"},isComplete:function(g){return g.nextCh===g.symb}},preprocess:{init:function(g){g.index=0},isComplete:function(g){if(g.nextCh==="#"){var _=g.lineText.match(/^#(\w+)/)[1];if(_==="endif"){if(g.forward&&g.depth===0)return!0;g.depth++}else if(_==="if"){if(!g.forward&&g.depth===0)return!0;g.depth--}if(_==="else"&&g.depth===0)return!0}return!1}}};R("pcre",!0,"boolean"),nr.prototype={getQuery:function(){return Pe.query},setQuery:function(g){Pe.query=g},getOverlay:function(){return this.searchOverlay},setOverlay:function(g){this.searchOverlay=g},isReversed:function(){return Pe.isReversed},setReversed:function(g){Pe.isReversed=g},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(g){this.annotate=g}};var Ui={"\\n":`
|
|
1456
|
+
`,"\\r":"\r","\\t":" "},Bn={"\\/":"/","\\\\":"\\","\\n":`
|
|
1457
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},Wn=0,jn=function(){this.buildCommandMap_()};jn.prototype={processCommand:function(g,_,k){var P=this;g.operation(function(){g.curOp.isVimOp=!0,P._processCommand(g,_,k)})},_processCommand:function(g,_,k){var P=g.state.vim,B=Pe.registerController.getRegister(":"),H=B.toString(),K=new De.StringStream(_);B.setText(_);var Y=k||{};Y.input=_;try{this.parseInput_(g,K,Y)}catch(se){throw _t(g,se.toString()),se}P.visualMode&&sn(g);var J,ie;if(!Y.commandName)Y.line!==void 0&&(ie="move");else if(J=this.matchCommand_(Y.commandName),J){if(ie=J.name,J.excludeFromCommandHistory&&B.setText(H),this.parseCommandArgs_(K,Y,J),J.type=="exToKey"){L(g,J.toKeys,J);return}if(J.type=="exToEx"){this.processCommand(g,J.toInput);return}}if(!ie){_t(g,'Not an editor command ":'+_+'"');return}try{Ao[ie](g,Y),(!J||!J.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw _t(g,se.toString()),se}},parseInput_:function(g,_,k){if(_.eatWhile(":"),_.eat("%")?(k.line=g.firstLine(),k.lineEnd=g.lastLine()):(k.line=this.parseLineSpec_(g,_),k.line!==void 0&&_.eat(",")&&(k.lineEnd=this.parseLineSpec_(g,_))),k.line==null)if(g.state.vim.visualMode){var P=fi(g,g.state.vim,"<");k.selectionLine=P&&P.line,P=fi(g,g.state.vim,">"),k.selectionLineEnd=P&&P.line}else k.selectionLine=g.getCursor().line;else k.selectionLine=k.line,k.selectionLineEnd=k.lineEnd;var B=_.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return B?k.commandName=B[1]:k.commandName=_.match(/.*/)[0],k},parseLineSpec_:function(g,_){var k=_.match(/^(\d+)/);if(k)return parseInt(k[1],10)-1;switch(_.next()){case".":return this.parseLineSpecOffset_(_,g.getCursor().line);case"$":return this.parseLineSpecOffset_(_,g.lastLine());case"'":var P=_.next(),B=fi(g,g.state.vim,P);if(!B)throw new Error("Mark not set");return this.parseLineSpecOffset_(_,B.line);case"-":case"+":return _.backUp(1),this.parseLineSpecOffset_(_,g.getCursor().line);default:return _.backUp(1),void 0}},parseLineSpecOffset_:function(g,_){var k=g.match(/^([+-])?(\d+)/);if(k){var P=parseInt(k[2],10);k[1]=="-"?_-=P:_+=P}return _},parseCommandArgs_:function(g,_,k){if(!g.eol()){_.argString=g.match(/.*/)[0];var P=k.argDelimiter||/\s+/,B=Si(_.argString).split(P);B.length&&B[0]&&(_.args=B)}},matchCommand_:function(g){for(var _=g.length;_>0;_--){var k=g.substring(0,_);if(this.commandMap_[k]){var P=this.commandMap_[k];if(P.name.indexOf(g)===0)return P}}return null},buildCommandMap_:function(){this.commandMap_={};for(var g=0;g<_i.length;g++){var _=_i[g],k=_.shortName||_.name;this.commandMap_[k]=_}},map:function(g,_,k,P){if(g!=":"&&g.charAt(0)==":"){if(k)throw Error("Mode not supported for ex mappings");var B=g.substring(1);_!=":"&&_.charAt(0)==":"?this.commandMap_[B]={name:B,type:"exToEx",toInput:_.substring(1),user:!0}:this.commandMap_[B]={name:B,type:"exToKey",toKeys:_,user:!0}}else{var H={keys:g,type:"keyToKey",toKeys:_,noremap:!!P};k&&(H.context=k),ln.unshift(H)}},unmap:function(g,_){if(g!=":"&&g.charAt(0)==":"){if(_)throw Error("Mode not supported for ex mappings");var k=g.substring(1);if(this.commandMap_[k]&&this.commandMap_[k].user)return delete this.commandMap_[k],!0}else for(var P=g,B=0;B<ln.length;B++)if(P==ln[B].keys&&ln[B].context===_)return ln.splice(B,1),!0}};var Ao={colorscheme:function(g,_){if(!_.args||_.args.length<1){_t(g,g.getOption("theme"));return}g.setOption("theme",_.args[0])},map:function(g,_,k,P){var B=_.args;if(!B||B.length<2){g&&_t(g,"Invalid mapping: "+_.input);return}Kn.map(B[0],B[1],k,P)},imap:function(g,_){this.map(g,_,"insert")},nmap:function(g,_){this.map(g,_,"normal")},vmap:function(g,_){this.map(g,_,"visual")},omap:function(g,_){this.map(g,_,"operatorPending")},noremap:function(g,_){this.map(g,_,void 0,!0)},inoremap:function(g,_){this.map(g,_,"insert",!0)},nnoremap:function(g,_){this.map(g,_,"normal",!0)},vnoremap:function(g,_){this.map(g,_,"visual",!0)},onoremap:function(g,_){this.map(g,_,"operatorPending",!0)},unmap:function(g,_,k){var P=_.args;(!P||P.length<1||!Kn.unmap(P[0],k))&&g&&_t(g,"No such mapping: "+_.input)},mapclear:function(g,_){ct.mapclear()},imapclear:function(g,_){ct.mapclear("insert")},nmapclear:function(g,_){ct.mapclear("normal")},vmapclear:function(g,_){ct.mapclear("visual")},omapclear:function(g,_){ct.mapclear("operatorPending")},move:function(g,_){dn.processCommand(g,g.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:_.line+1})},set:function(g,_){var k=_.args,P=_.setCfg||{};if(!k||k.length<1){g&&_t(g,"Invalid mapping: "+_.input);return}var B=k[0].split("="),H=B[0],K=B[1],Y=!1,J=!1;if(H.charAt(H.length-1)=="?"){if(K)throw Error("Trailing characters: "+_.argString);H=H.substring(0,H.length-1),Y=!0}else H.charAt(H.length-1)=="!"&&(H=H.substring(0,H.length-1),J=!0);K===void 0&&H.substring(0,2)=="no"&&(H=H.substring(2),K=!1);var ie=At[H]&&At[H].type=="boolean";if(ie&&(J?K=!C(H,g,P):K==null&&(K=!0)),!ie&&K===void 0||Y){var se=C(H,g,P);se instanceof Error?_t(g,se.message):se===!0||se===!1?_t(g," "+(se?"":"no")+H):_t(g," "+H+"="+se)}else{var ye=T(H,K,g,P);ye instanceof Error&&_t(g,ye.message)}},setlocal:function(g,_){_.setCfg={scope:"local"},this.set(g,_)},setglobal:function(g,_){_.setCfg={scope:"global"},this.set(g,_)},registers:function(g,_){var k=_.args,P=Pe.registerController.registers,B=`----------Registers----------
|
|
1458
|
+
|
|
1459
|
+
`;if(k){var H;k=k.join("");for(var Y=0;Y<k.length;Y++)if(H=k.charAt(Y),!!Pe.registerController.isValidRegister(H)){var J=P[H]||new W;B+='"'+H+" "+J.toString()+`
|
|
1460
|
+
`}}else for(var H in P){var K=P[H].toString();K.length&&(B+='"'+H+" "+K+`
|
|
1461
|
+
`)}_t(g,B)},sort:function(g,_){function k(){if(_.argString){var xt=new De.StringStream(_.argString);if(xt.eat("!")&&(H=!0),xt.eol())return;if(!xt.eatSpace())return"Invalid arguments";var ut=xt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!ut&&!xt.eol())return"Invalid arguments";if(ut[1]){K=ut[1].indexOf("i")!=-1,Y=ut[1].indexOf("u")!=-1;var pn=ut[1].indexOf("d")!=-1||ut[1].indexOf("n")!=-1&&1,Hn=ut[1].indexOf("x")!=-1&&1,nn=ut[1].indexOf("o")!=-1&&1;if(pn+Hn+nn>1)return"Invalid arguments";J=pn&&"decimal"||Hn&&"hex"||nn&&"octal"}ut[2]&&(ie=new RegExp(ut[2].substr(1,ut[2].length-2),K?"i":""))}}function P(xt,ut){if(H){var pn;pn=xt,xt=ut,ut=pn}K&&(xt=xt.toLowerCase(),ut=ut.toLowerCase());var Hn=J&&Le.exec(xt),nn=J&&Le.exec(ut);return Hn?(Hn=parseInt((Hn[1]+Hn[2]).toLowerCase(),Be),nn=parseInt((nn[1]+nn[2]).toLowerCase(),Be),Hn-nn):xt<ut?-1:1}function B(xt,ut){if(H){var pn;pn=xt,xt=ut,ut=pn}return K&&(xt[0]=xt[0].toLowerCase(),ut[0]=ut[0].toLowerCase()),xt[0]<ut[0]?-1:1}var H,K,Y,J,ie,se=k();if(se){_t(g,se+": "+_.argString);return}var ye=_.line||g.firstLine(),Se=_.lineEnd||_.line||g.lastLine();if(ye!=Se){var de=new Ie(ye,0),we=new Ie(Se,Pt(g,Se)),Re=g.getRange(de,we).split(`
|
|
1462
|
+
`),Le=ie||(J=="decimal"?/(-?)([\d]+)/:J=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:J=="octal"?/([0-7]+)/:null),Be=J=="decimal"?10:J=="hex"?16:J=="octal"?8:null,Xe=[],Ze=[];if(J||ie)for(var Ke=0;Ke<Re.length;Ke++){var jt=ie?Re[Ke].match(ie):null;jt&&jt[0]!=""?Xe.push(jt):!ie&&Le.exec(Re[Ke])?Xe.push(Re[Ke]):Ze.push(Re[Ke])}else Ze=Re;if(Xe.sort(ie?B:P),ie)for(var Ke=0;Ke<Xe.length;Ke++)Xe[Ke]=Xe[Ke].input;else J||Ze.sort(P);if(Re=H?Xe.concat(Ze):Ze.concat(Xe),Y){var tt=Re,tn;Re=[];for(var Ke=0;Ke<tt.length;Ke++)tt[Ke]!=tn&&Re.push(tt[Ke]),tn=tt[Ke]}g.replaceRange(Re.join(`
|
|
1463
|
+
`),de,we)}},vglobal:function(g,_){this.global(g,_)},normal:function(g,_){var k=_.argString;if(k&&k[0]=="!"&&(k=k.slice(1),Vt=!0),k=k.trimStart(),!k){_t(g,"Argument is required.");return}var P=_.line;if(typeof P=="number")for(var B=isNaN(_.lineEnd)?P:_.lineEnd,H=P;H<=B;H++)g.setCursor(H,0),L(g,_.argString.trimStart()),g.state.vim.insertMode&&pi(g,!0);else L(g,_.argString.trimStart()),g.state.vim.insertMode&&pi(g,!0)},global:function(g,_){var k=_.argString;if(!k){_t(g,"Regular Expression missing from global");return}var P=_.commandName[0]==="v";k[0]==="!"&&_.commandName[0]==="g"&&(P=!0,k=k.slice(1));var B=_.line!==void 0?_.line:g.firstLine(),H=_.lineEnd||_.line||g.lastLine(),K=Zn(k),Y=k,J;if(K.length&&(Y=K[0],J=K.slice(1,K.length).join("/")),Y)try{Qt(g,Y,!0,!0)}catch{_t(g,"Invalid regex: "+Y);return}for(var ie=an(g).getQuery(),se=[],ye=B;ye<=H;ye++){var Se=g.getLine(ye),de=ie.test(Se);de!==P&&se.push(J?g.getLineHandle(ye):Se)}if(!J){_t(g,se.join(`
|
|
1464
|
+
`));return}var we=0,Re=function(){if(we<se.length){var Le=se[we++],Be=g.getLineNumber(Le);if(Be==null){Re();return}var Xe=Be+1+J;Kn.processCommand(g,Xe,{callback:Re})}else g.releaseLineHandles&&g.releaseLineHandles()};Re()},substitute:function(g,_){if(!g.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=_.argString,P=k?ir(k,k[0]):[],B,H="",K,Y,J,ie=!1,se=!1;if(P.length)B=P[0],C("pcre")&&B!==""&&(B=new RegExp(B).source),H=P[1],H!==void 0&&(C("pcre")?H=As(H.replace(/([^\\])&/g,"$1$$&")):H=_s(H),Pe.lastSubstituteReplacePart=H),K=P[2]?P[2].split(" "):[];else if(k&&k.length){_t(g,"Substitutions should be of the form :s/pattern/replace/");return}if(K&&(Y=K[0],J=parseInt(K[1]),Y&&(Y.indexOf("c")!=-1&&(ie=!0),Y.indexOf("g")!=-1&&(se=!0),C("pcre")?B=B+"/"+Y:B=B.replace(/\//g,"\\/")+"/"+Y)),B)try{Qt(g,B,!0,!0)}catch{_t(g,"Invalid regex: "+B);return}if(H=H||Pe.lastSubstituteReplacePart,H===void 0){_t(g,"No previous substitute regular expression");return}var ye=an(g),Se=ye.getQuery(),de=_.line!==void 0?_.line:g.getCursor().line,we=_.lineEnd||de;de==g.firstLine()&&we==g.lastLine()&&(we=1/0),J&&(de=we,we=de+J-1);var Re=ue(g,new Ie(de,0)),Le=g.getSearchCursor(Se,Re);Jr(g,ie,se,de,we,Le,Se,H,_.callback)},startinsert:function(g,_){L(g,_.argString=="!"?"A":"i",{})},redo:De.commands.redo,undo:De.commands.undo,write:function(g){De.commands.save?De.commands.save(g):g.save&&g.save()},nohlsearch:function(g){Qr(g)},yank:function(g){var _=Ve(g.getCursor()),k=_.line,P=g.getLine(k);Pe.registerController.pushText("0","yank",P,!0,!0)},delete:function(g,_){var k=_.selectionLine,P=isNaN(_.selectionLineEnd)?k:_.selectionLineEnd;ao.delete(g,{linewise:!0},[{anchor:new Ie(k,0),head:new Ie(P+1,0)}])},join:function(g,_){var k=_.selectionLine,P=isNaN(_.selectionLineEnd)?k:_.selectionLineEnd;g.setCursor(new Ie(k,0)),fn.joinLines(g,{repeat:P-k},g.state.vim)},delmarks:function(g,_){if(!_.argString||!Si(_.argString)){_t(g,"Argument required");return}for(var k=g.state.vim,P=new De.StringStream(Si(_.argString));!P.eol();){P.eatSpace();var B=P.pos;if(!P.match(/[a-zA-Z]/,!1)){_t(g,"Invalid argument: "+_.argString.substring(B));return}var H=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){_t(g,"Invalid argument: "+_.argString.substring(B));return}var K=H,Y=P.next();if(!(s(K)&&s(Y)||i(K)&&i(Y))){_t(g,"Invalid argument: "+K+"-");return}var J=K.charCodeAt(0),ie=Y.charCodeAt(0);if(J>=ie){_t(g,"Invalid argument: "+_.argString.substring(B));return}for(var se=0;se<=ie-J;se++){var ye=String.fromCharCode(J+se);delete k.marks[ye]}}else delete k.marks[H]}}},Kn=new jn;R("insertModeEscKeysTimeout",200,"number"),De.Vim=ct;var Xn={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",insert:"Ins",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},Mi=ct.handleKey.bind(ct);ct.handleKey=function(g,_,k){return g.operation(function(){return Mi(g,_,k)},!0)},D(),u.CodeMirror=De;var Ti=ct.maybeInitVimState_;u.handler={$id:"ace/keyboard/vim",drawCursor:function(g,_,k,P,B){var H=this.state.vim||{},K=k.characterWidth,Y=k.lineHeight,J=_.top,ie=_.left;if(!H.insertMode){var se=P.cursor?Rn.comparePoints(P.cursor,P.start)<=0:B.selection.isBackwards()||B.selection.isEmpty();!se&&ie>K&&(ie-=K)}!H.insertMode&&H.status&&(Y/=2,J+=Y),or.translate(g,ie,J),or.setStyle(g.style,"width",K+"px"),or.setStyle(g.style,"height",Y+"px")},$getDirectionForHighlight:function(g){var _=g.state.cm,k=Ti(_);if(!k.insertMode)return g.session.selection.isBackwards()||g.session.selection.isEmpty()},handleKeyboard:function(g,_,k,P,B){var H=g.editor,K=H.state.cm,Y=Ti(K);if(P!=-1){if(Y.insertMode||(_==-1?(k.charCodeAt(0)>255&&g.inputKey&&(k=g.inputKey,k&&g.inputHash==4&&(k=k.toUpperCase())),g.inputChar=k):_==4||_==0?g.inputKey==k&&g.inputHash==_&&g.inputChar?(k=g.inputChar,_=-1):(g.inputChar=null,g.inputKey=k,g.inputHash=_):g.inputChar=g.inputKey=null),K.state.overwrite&&Y.insertMode&&k=="backspace"&&_==0)return{command:"gotoleft"};if(k=="c"&&_==1&&!Or.isMac&&H.getCopyText())return H.once("copy",function(){Y.insertMode?H.selection.clearSelection():K.operation(function(){sn(K)})}),{command:"null",passEvent:!0};if(k=="esc"&&!Y.insertMode&&!Y.visualMode&&!K.ace.inMultiSelectMode){var J=an(K),ie=J.getOverlay();ie&&K.removeOverlay(ie)}if(_==-1||_&1||_===0&&k.length>1){var se=Y.insertMode,ye=_o(_,k,B||{},Y);Y.status==null&&(Y.status="");var Se=Rr(K,ye,"user");return Y=Ti(K),Se&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),K._signal("changeStatus"),!Se&&(_!=-1||se)?void 0:{command:"null",passEvent:!Se}}}},attach:function(g){function _(){var P=Ti(k).insertMode;k.ace.renderer.setStyle("normal-mode",!P),g.textInput.setCommandMode(!P),g.renderer.$keepTextAreaAtCursor=P,g.renderer.$blockCursor=!P}g.state||(g.state={});var k=new De(g);g.state.cm=k,g.$vimModeHandler=this,p(k),Ti(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(Ti(k).status=null,k.ace._signal("changeStatus"),k.ace.session.markUndoGroup())}),k.on("changeStatus",function(){k.ace.renderer.updateCursor(),k.ace._signal("changeStatus")}),k.on("vim-mode-change",function(){k.virtualSelectionMode()||(_(),k._signal("changeStatus"))}),_(),g.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},detach:function(g){var _=g.state.cm;d(_),_.destroy(),g.state.cm=null,g.$vimModeHandler=null,g.renderer.$cursorLayer.drawCursor=null,g.renderer.setStyle("normal-mode",!1),g.textInput.setCommandMode(!1),g.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(g){var _=g.state.cm,k=Ti(_);if(k.insertMode)return"INSERT";var P="";return k.visualMode&&(P+="VISUAL",k.visualLine&&(P+=" LINE"),k.visualBlock&&(P+=" BLOCK")),k.status&&(P+=(P?" ":"")+k.status),P}},ct.defineOption({name:"wrap",set:function(g,_){_&&_.ace.setOption("wrap",g)},type:"boolean"},!1),ct.defineEx("write","w",function(){console.log(":write is not implemented")}),ln.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),ln.push({keys:"gq",type:"operator",operator:"hardWrap"}),ct.defineOperator("hardWrap",function(g,_,k,P,B){var H=k[0].anchor.line,K=k[0].head.line;return _.linewise&&K--,wr(g.ace,{startRow:H,endRow:K}),Ie(K,0)}),R("textwidth",void 0,"number",["tw"],function(g,_){if(_!==void 0){if(g===void 0){var k=_.ace.getOption("printMarginColumn");return k}var P=Math.round(g);P>1&&_.ace.setOption("printMarginColumn",P)}}),fn.aceCommand=function(g,_,k){g.vimCmd=_,g.ace.inVirtualSelectionMode?g.ace.on("beforeEndOperation",Bi):Bi(null,g.ace)},fn.fold=function(g,_,k){g.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(_.all?2:0)+(_.open?1:0)])},Dr=ln.length,u.handler.defaultKeymap=ln,u.handler.actions=fn,u.Vim=ct}),function(){ace.require(["ace/keyboard/vim"],function(e){l&&(l.exports=e)})}()}(kc)),kc.exports}_k();var Cc={},Cf;function Ak(){return Cf||(Cf=1,function(l){(function(){var c={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(x){return $(v(x),arguments)}function u(x,p){return e.apply(null,[x].concat(p||[]))}function $(x,p){var d=1,o=x.length,a,s="",r,n,i,h,m,y,R,T;for(r=0;r<o;r++)if(typeof x[r]=="string")s+=x[r];else if(typeof x[r]=="object"){if(i=x[r],i.keys)for(a=p[d],n=0;n<i.keys.length;n++){if(a==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',i.keys[n],i.keys[n-1]));a=a[i.keys[n]]}else i.param_no?a=p[i.param_no]:a=p[d++];if(c.not_type.test(i.type)&&c.not_primitive.test(i.type)&&a instanceof Function&&(a=a()),c.numeric_arg.test(i.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(e("[sprintf] expecting number but found %T",a));switch(c.number.test(i.type)&&(R=a>=0),i.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,i.width?parseInt(i.width):0);break;case"e":a=i.precision?parseFloat(a).toExponential(i.precision):parseFloat(a).toExponential();break;case"f":a=i.precision?parseFloat(a).toFixed(i.precision):parseFloat(a);break;case"g":a=i.precision?String(Number(a.toPrecision(i.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=i.precision?a.substring(0,i.precision):a;break;case"t":a=String(!!a),a=i.precision?a.substring(0,i.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=i.precision?a.substring(0,i.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=i.precision?a.substring(0,i.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}c.json.test(i.type)?s+=a:(c.number.test(i.type)&&(!R||i.sign)?(T=R?"+":"-",a=a.toString().replace(c.sign,"")):T="",m=i.pad_char?i.pad_char==="0"?"0":i.pad_char.charAt(1):" ",y=i.width-(T+a).length,h=i.width&&y>0?m.repeat(y):"",s+=i.align?T+a+h:m==="0"?T+h+a:h+T+a)}return s}var b=Object.create(null);function v(x){if(b[x])return b[x];for(var p=x,d,o=[],a=0;p;){if((d=c.text.exec(p))!==null)o.push(d[0]);else if((d=c.modulo.exec(p))!==null)o.push("%");else if((d=c.placeholder.exec(p))!==null){if(d[2]){a|=1;var s=[],r=d[2],n=[];if((n=c.key.exec(r))!==null)for(s.push(n[1]);(r=r.substring(n[0].length))!=="";)if((n=c.key_access.exec(r))!==null)s.push(n[1]);else if((n=c.index_access.exec(r))!==null)s.push(n[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");d[2]=s}else a|=2;if(a===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:d[0],param_no:d[1],keys:d[2],sign:d[3],pad_char:d[4],align:d[5],width:d[6],precision:d[7],type:d[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");p=p.substring(d[0].length)}return b[x]=o}l.sprintf=e,l.vsprintf=u,typeof window<"u"&&(window.sprintf=e,window.vsprintf=u)})()}(Cc)),Cc}Ak();const _g={props:{config:{type:Object},packets:{type:Array}},data:function(){return{currentConfig:{},currentPackets:[],latestData:null}},computed:{hasRaw:function(){for(let l=0;l<this.currentPackets.length;l++)if(this.currentPackets[l].mode==="RAW")return!0;return!1},hasDecom:function(){for(let l=0;l<this.currentPackets.length;l++)if(this.currentPackets[l].mode==="DECOM")return!0;return!1}},watch:{currentConfig:{deep:!0,handler:function(l){this.$emit("config",l)}}},created:function(){this.config&&(this.currentConfig={...this.config}),this.packets&&(this.currentPackets=[...this.packets])},methods:{receive:function(l){this.latestData=l}}};var Ks={exports:{}};/**
|
|
1465
1465
|
* @license
|
|
1466
1466
|
* Lodash <https://lodash.com/>
|
|
1467
1467
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
1468
1468
|
* Released under MIT license <https://lodash.com/license>
|
|
1469
1469
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
1470
1470
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
1471
|
-
*/var $k=Ks.exports,_f;function Mk(){return _f||(_f=1,function(l,c){(function(){var e,u="4.17.21",$=200,b="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",x="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",d=500,o="__lodash_placeholder__",a=1,s=2,r=4,n=1,i=2,h=1,m=2,y=4,R=8,T=16,C=32,w=64,E=128,D=256,I=512,L=30,z="...",F=800,O=16,A=1,S=2,N=3,B=1/0,V=9007199254740991,G=17976931348623157e292,Z=NaN,ee=4294967295,ce=ee-1,ne=ee>>>1,he=[["ary",E],["bind",h],["bindKey",m],["curry",R],["curryRight",T],["flip",I],["partial",C],["partialRight",w],["rearg",D]],ue="[object Arguments]",le="[object Array]",me="[object AsyncFunction]",_e="[object Boolean]",Ae="[object Date]",Me="[object DOMException]",qe="[object Error]",Ve="[object Function]",ot="[object GeneratorFunction]",Je="[object Map]",lt="[object Number]",Ht="[object Null]",vn="[object Object]",Pt="[object Promise]",Si="[object Proxy]",on="[object RegExp]",Cn="[object Set]",Fn="[object String]",ri="[object Symbol]",dt="[object Undefined]",ze="[object WeakMap]",Ot="[object WeakSet]",Gt="[object ArrayBuffer]",_n="[object DataView]",oi="[object Float32Array]",qn="[object Float64Array]",sn="[object Int8Array]",Tn="[object Int16Array]",Pn="[object Int32Array]",zt="[object Uint8Array]",Ln="[object Uint8ClampedArray]",$r="[object Uint16Array]",Ji="[object Uint32Array]",Xi=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,Mr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vn=/&(?:amp|lt|gt|quot|#39);/g,Tr=/[&<>"']/g,Zr=RegExp(Vn.source),ks=RegExp(Tr.source),ki=/<%-([\s\S]+?)%>/g,Cs=/<%([\s\S]+?)%>/g,yo=/<%=([\s\S]+?)%>/g,Go=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tr=/^\w*$/,yn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yn=/[\\^$.*+?()[\]{}|]/g,nr=RegExp(Yn.source),an=/^\s+/,Zn=/\s/,gr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ir=/\{\n\/\* \[wrapped with (.+)\] \*/,wo=/,? & /,qo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_s=/[()=,{}\[\]\/\s]/,As=/\\(\\)?/g,rr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ci=/\w*$/,_t=/^[-+]0x[0-9a-f]+$/i,Yo=/^0b[01]+$/i,Qn=/^\[object .+?Constructor\]$/,wn=/^0o[0-7]+$/i,Qt=/^(?:0|[1-9]\d*)$/,un=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Fi=/($^)/,Jn=/['\n\r\u2028\u2029\\]/g,Pi="\\ud800-\\udfff",Qr="\\u0300-\\u036f",bo="\\ufe20-\\ufe2f",mr="\\u20d0-\\u20ff",fi=Qr+bo+mr,Lr="\\u2700-\\u27bf",Jr="a-z\\xdf-\\xf6\\xf8-\\xff",pi="\\xac\\xb1\\xd7\\xf7",Xr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xo="\\u2000-\\u206f",So=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",eo="A-Z\\xc0-\\xd6\\xd8-\\xde",En="\\ufe0e\\ufe0f",ko=pi+Xr+xo+So,Er="['’]",to="["+Pi+"]",no="["+ko+"]",vr="["+fi+"]",Co="\\d+",Zo="["+Lr+"]",io="["+Jr+"]",ro="[^"+Pi+ko+Co+Lr+Jr+eo+"]",_o="\\ud83c[\\udffb-\\udfff]",oo="(?:"+vr+"|"+_o+")",Rr="[^"+Pi+"]",Wi="(?:\\ud83c[\\udde6-\\uddff]){2}",Rn="[\\ud800-\\udbff][\\udc00-\\udfff]",yr="["+eo+"]",or="\\u200d",Qo="(?:"+io+"|"+ro+")",$s="(?:"+yr+"|"+ro+")",Ir="(?:"+Er+"(?:d|ll|m|re|s|t|ve))?",sr="(?:"+Er+"(?:D|LL|M|RE|S|T|VE))?",Or=oo+"?",so="["+En+"]?",Nr="(?:"+or+"(?:"+[Rr,Wi,Rn].join("|")+")"+so+Or+")*",Jo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",De=so+Or+Nr,Xo="(?:"+[Zo,Wi,Rn].join("|")+")"+De,Ie="(?:"+[Rr+vr+"?",vr,Wi,Rn,to].join("|")+")",ln=RegExp(Er,"g"),Dr=RegExp(vr,"g"),_i=RegExp(_o+"(?="+_o+")|"+Ie+De,"g"),bn=RegExp([yr+"?"+io+"+"+Ir+"(?="+[no,yr,"$"].join("|")+")",$s+"+"+sr+"(?="+[no,yr+Qo,"$"].join("|")+")",yr+"?"+Qo+"+"+Ir,yr+"+"+sr,wr,Jo,Co,Xo].join("|"),"g"),es=RegExp("["+or+Pi+fi+En+"]"),Fr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bi=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],br=-1,Nt={};Nt[oi]=Nt[qn]=Nt[sn]=Nt[Tn]=Nt[Pn]=Nt[zt]=Nt[Ln]=Nt[$r]=Nt[Ji]=!0,Nt[ue]=Nt[le]=Nt[Gt]=Nt[_e]=Nt[_n]=Nt[Ae]=Nt[qe]=Nt[Ve]=Nt[Je]=Nt[lt]=Nt[vn]=Nt[on]=Nt[Cn]=Nt[Fn]=Nt[ze]=!1;var Rt={};Rt[ue]=Rt[le]=Rt[Gt]=Rt[_n]=Rt[_e]=Rt[Ae]=Rt[oi]=Rt[qn]=Rt[sn]=Rt[Tn]=Rt[Pn]=Rt[Je]=Rt[lt]=Rt[vn]=Rt[on]=Rt[Cn]=Rt[Fn]=Rt[ri]=Rt[zt]=Rt[Ln]=Rt[$r]=Rt[Ji]=!0,Rt[qe]=Rt[Ve]=Rt[ze]=!1;var Dt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},At={"&":"&","<":"<",">":">",'"':""","'":"'"},Hi={"&":"&","<":"<",">":">",""":'"',"'":"'"},hn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pe=parseFloat,Jt=parseInt,ct=typeof mo=="object"&&mo&&mo.Object===Object&&mo,si=typeof self=="object"&&self&&self.Object===Object&&self,Vt=ct||si||Function("return this")(),Xt=c&&!c.nodeType&&c,An=Xt&&!0&&l&&!l.nodeType&&l,ai=An&&An.exports===Xt,zi=ai&&ct.process,dn=function(){try{var pe=An&&An.require&&An.require("util").types;return pe||zi&&zi.binding&&zi.binding("util")}catch{}}(),gi=dn&&dn.isArrayBuffer,ao=dn&&dn.isDate,fn=dn&&dn.isMap,Ai=dn&&dn.isRegExp,$i=dn&&dn.isSet,Ui=dn&&dn.isTypedArray;function Wn(pe,Ce,xe){switch(xe.length){case 0:return pe.call(Ce);case 1:return pe.call(Ce,xe[0]);case 2:return pe.call(Ce,xe[0],xe[1]);case 3:return pe.call(Ce,xe[0],xe[1],xe[2])}return pe.apply(Ce,xe)}function Bn(pe,Ce,xe,Be){for(var nt=-1,gt=pe==null?0:pe.length;++nt<gt;){var Et=pe[nt];Ce(Be,Et,xe(Et),pe)}return Be}function jn(pe,Ce){for(var xe=-1,Be=pe==null?0:pe.length;++xe<Be&&Ce(pe[xe],xe,pe)!==!1;);return pe}function Ao(pe,Ce){for(var xe=pe==null?0:pe.length;xe--&&Ce(pe[xe],xe,pe)!==!1;);return pe}function Kn(pe,Ce){for(var xe=-1,Be=pe==null?0:pe.length;++xe<Be;)if(!Ce(pe[xe],xe,pe))return!1;return!0}function Xn(pe,Ce){for(var xe=-1,Be=pe==null?0:pe.length,nt=0,gt=[];++xe<Be;){var Et=pe[xe];Ce(Et,xe,pe)&&(gt[nt++]=Et)}return gt}function Mi(pe,Ce){var xe=pe==null?0:pe.length;return!!xe&&se(pe,Ce,0)>-1}function Ti(pe,Ce,xe){for(var Be=-1,nt=pe==null?0:pe.length;++Be<nt;)if(xe(Ce,pe[Be]))return!0;return!1}function g(pe,Ce){for(var xe=-1,Be=pe==null?0:pe.length,nt=Array(Be);++xe<Be;)nt[xe]=Ce(pe[xe],xe,pe);return nt}function _(pe,Ce){for(var xe=-1,Be=Ce.length,nt=pe.length;++xe<Be;)pe[nt+xe]=Ce[xe];return pe}function k(pe,Ce,xe,Be){var nt=-1,gt=pe==null?0:pe.length;for(Be&>&&(xe=pe[++nt]);++nt<gt;)xe=Ce(xe,pe[nt],nt,pe);return xe}function P(pe,Ce,xe,Be){var nt=pe==null?0:pe.length;for(Be&&nt&&(xe=pe[--nt]);nt--;)xe=Ce(xe,pe[nt],nt,pe);return xe}function W(pe,Ce){for(var xe=-1,Be=pe==null?0:pe.length;++xe<Be;)if(Ce(pe[xe],xe,pe))return!0;return!1}var H=we("length");function K(pe){return pe.split("")}function Y(pe){return pe.match(qo)||[]}function J(pe,Ce,xe){var Be;return xe(pe,function(nt,gt,Et){if(Ce(nt,gt,Et))return Be=gt,!1}),Be}function ie(pe,Ce,xe,Be){for(var nt=pe.length,gt=xe+(Be?1:-1);Be?gt--:++gt<nt;)if(Ce(pe[gt],gt,pe))return gt;return-1}function se(pe,Ce,xe){return Ce===Ce?Ye(pe,Ce,xe):ie(pe,Se,xe)}function ye(pe,Ce,xe,Be){for(var nt=xe-1,gt=pe.length;++nt<gt;)if(Be(pe[nt],Ce))return nt;return-1}function Se(pe){return pe!==pe}function de(pe,Ce){var xe=pe==null?0:pe.length;return xe?Xe(pe,Ce)/xe:Z}function we(pe){return function(Ce){return Ce==null?e:Ce[pe]}}function Re(pe){return function(Ce){return pe==null?e:pe[Ce]}}function Le(pe,Ce,xe,Be,nt){return nt(pe,function(gt,Et,wt){xe=Be?(Be=!1,gt):Ce(xe,gt,Et,wt)}),xe}function We(pe,Ce){var xe=pe.length;for(pe.sort(Ce);xe--;)pe[xe]=pe[xe].value;return pe}function Xe(pe,Ce){for(var xe,Be=-1,nt=pe.length;++Be<nt;){var gt=Ce(pe[Be]);gt!==e&&(xe=xe===e?gt:xe+gt)}return xe}function Ze(pe,Ce){for(var xe=-1,Be=Array(pe);++xe<pe;)Be[xe]=Ce(xe);return Be}function Ke(pe,Ce){return g(Ce,function(xe){return[xe,pe[xe]]})}function jt(pe){return pe&&pe.slice(0,yt(pe)+1).replace(an,"")}function tt(pe){return function(Ce){return pe(Ce)}}function tn(pe,Ce){return g(Ce,function(xe){return pe[xe]})}function xt(pe,Ce){return pe.has(Ce)}function ut(pe,Ce){for(var xe=-1,Be=pe.length;++xe<Be&&se(Ce,pe[xe],0)>-1;);return xe}function pn(pe,Ce){for(var xe=pe.length;xe--&&se(Ce,pe[xe],0)>-1;);return xe}function Hn(pe,Ce){for(var xe=pe.length,Be=0;xe--;)pe[xe]===Ce&&++Be;return Be}var nn=Re(Dt),j=Re(At);function Q(pe){return"\\"+hn[pe]}function re(pe,Ce){return pe==null?e:pe[Ce]}function oe(pe){return es.test(pe)}function ge(pe){return Fr.test(pe)}function be(pe){for(var Ce,xe=[];!(Ce=pe.next()).done;)xe.push(Ce.value);return xe}function $e(pe){var Ce=-1,xe=Array(pe.size);return pe.forEach(function(Be,nt){xe[++Ce]=[nt,Be]}),xe}function Ne(pe,Ce){return function(xe){return pe(Ce(xe))}}function Fe(pe,Ce){for(var xe=-1,Be=pe.length,nt=0,gt=[];++xe<Be;){var Et=pe[xe];(Et===Ce||Et===o)&&(pe[xe]=o,gt[nt++]=xe)}return gt}function He(pe){var Ce=-1,xe=Array(pe.size);return pe.forEach(function(Be){xe[++Ce]=Be}),xe}function je(pe){var Ce=-1,xe=Array(pe.size);return pe.forEach(function(Be){xe[++Ce]=[Be,Be]}),xe}function Ye(pe,Ce,xe){for(var Be=xe-1,nt=pe.length;++Be<nt;)if(pe[Be]===Ce)return Be;return-1}function ht(pe,Ce,xe){for(var Be=xe+1;Be--;)if(pe[Be]===Ce)return Be;return Be}function kt(pe){return oe(pe)?et(pe):H(pe)}function ft(pe){return oe(pe)?qt(pe):K(pe)}function yt(pe){for(var Ce=pe.length;Ce--&&Zn.test(pe.charAt(Ce)););return Ce}var it=Re(Hi);function et(pe){for(var Ce=_i.lastIndex=0;_i.test(pe);)++Ce;return Ce}function qt(pe){return pe.match(_i)||[]}function rn(pe){return pe.match(bn)||[]}var $n=function pe(Ce){Ce=Ce==null?Vt:Tt.defaults(Vt.Object(),Ce,Tt.pick(Vt,Bi));var xe=Ce.Array,Be=Ce.Date,nt=Ce.Error,gt=Ce.Function,Et=Ce.Math,wt=Ce.Object,li=Ce.RegExp,Vi=Ce.String,Kt=Ce.TypeError,zn=xe.prototype,Pr=gt.prototype,gn=wt.prototype,$o=Ce["__core-js_shared__"],sa=Pr.toString,Ut=gn.hasOwnProperty,mm=0,eh=function(){var t=/[^.]+$/.exec($o&&$o.keys&&$o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),aa=gn.toString,vm=sa.call(wt),ym=Vt._,wm=li("^"+sa.call(Ut).replace(Yn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),la=ai?Ce.Buffer:e,lo=Ce.Symbol,ca=Ce.Uint8Array,th=la?la.allocUnsafe:e,ua=Ne(wt.getPrototypeOf,wt),nh=wt.create,ih=gn.propertyIsEnumerable,ha=zn.splice,rh=lo?lo.isConcatSpreadable:e,Ms=lo?lo.iterator:e,Mo=lo?lo.toStringTag:e,da=function(){try{var t=Io(wt,"defineProperty");return t({},"",{}),t}catch{}}(),bm=Ce.clearTimeout!==Vt.clearTimeout&&Ce.clearTimeout,xm=Be&&Be.now!==Vt.Date.now&&Be.now,Sm=Ce.setTimeout!==Vt.setTimeout&&Ce.setTimeout,fa=Et.ceil,pa=Et.floor,yl=wt.getOwnPropertySymbols,km=la?la.isBuffer:e,oh=Ce.isFinite,Cm=zn.join,_m=Ne(wt.keys,wt),In=Et.max,ei=Et.min,Am=Be.now,$m=Ce.parseInt,sh=Et.random,Mm=zn.reverse,wl=Io(Ce,"DataView"),Ts=Io(Ce,"Map"),bl=Io(Ce,"Promise"),ts=Io(Ce,"Set"),Ls=Io(Ce,"WeakMap"),Es=Io(wt,"create"),ga=Ls&&new Ls,ns={},Tm=Oo(wl),Lm=Oo(Ts),Em=Oo(bl),Rm=Oo(ts),Im=Oo(Ls),ma=lo?lo.prototype:e,Rs=ma?ma.valueOf:e,ah=ma?ma.toString:e;function X(t){if(mn(t)&&!pt(t)&&!(t instanceof $t)){if(t instanceof ji)return t;if(Ut.call(t,"__wrapped__"))return ld(t)}return new ji(t)}var is=function(){function t(){}return function(f){if(!cn(f))return{};if(nh)return nh(f);t.prototype=f;var M=new t;return t.prototype=e,M}}();function va(){}function ji(t,f){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=e}X.templateSettings={escape:ki,evaluate:Cs,interpolate:yo,variable:"",imports:{_:X}},X.prototype=va.prototype,X.prototype.constructor=X,ji.prototype=is(va.prototype),ji.prototype.constructor=ji;function $t(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ee,this.__views__=[]}function Om(){var t=new $t(this.__wrapped__);return t.__actions__=mi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=mi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=mi(this.__views__),t}function Nm(){if(this.__filtered__){var t=new $t(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Dm(){var t=this.__wrapped__.value(),f=this.__dir__,M=pt(t),U=f<0,q=M?t.length:0,te=qv(0,q,this.__views__),ae=te.start,fe=te.end,ve=fe-ae,Te=U?fe:ae-1,Ee=this.__iteratees__,Oe=Ee.length,Ue=0,Qe=ei(ve,this.__takeCount__);if(!M||!U&&q==ve&&Qe==ve)return Eh(t,this.__actions__);var st=[];e:for(;ve--&&Ue<Qe;){Te+=f;for(var bt=-1,at=t[Te];++bt<Oe;){var Ct=Ee[bt],Lt=Ct.iteratee,Ri=Ct.type,hi=Lt(at);if(Ri==S)at=hi;else if(!hi){if(Ri==A)continue e;break e}}st[Ue++]=at}return st}$t.prototype=is(va.prototype),$t.prototype.constructor=$t;function To(t){var f=-1,M=t==null?0:t.length;for(this.clear();++f<M;){var U=t[f];this.set(U[0],U[1])}}function Fm(){this.__data__=Es?Es(null):{},this.size=0}function Pm(t){var f=this.has(t)&&delete this.__data__[t];return this.size-=f?1:0,f}function Wm(t){var f=this.__data__;if(Es){var M=f[t];return M===p?e:M}return Ut.call(f,t)?f[t]:e}function Bm(t){var f=this.__data__;return Es?f[t]!==e:Ut.call(f,t)}function Hm(t,f){var M=this.__data__;return this.size+=this.has(t)?0:1,M[t]=Es&&f===e?p:f,this}To.prototype.clear=Fm,To.prototype.delete=Pm,To.prototype.get=Wm,To.prototype.has=Bm,To.prototype.set=Hm;function Wr(t){var f=-1,M=t==null?0:t.length;for(this.clear();++f<M;){var U=t[f];this.set(U[0],U[1])}}function zm(){this.__data__=[],this.size=0}function Um(t){var f=this.__data__,M=ya(f,t);if(M<0)return!1;var U=f.length-1;return M==U?f.pop():ha.call(f,M,1),--this.size,!0}function Vm(t){var f=this.__data__,M=ya(f,t);return M<0?e:f[M][1]}function jm(t){return ya(this.__data__,t)>-1}function Km(t,f){var M=this.__data__,U=ya(M,t);return U<0?(++this.size,M.push([t,f])):M[U][1]=f,this}Wr.prototype.clear=zm,Wr.prototype.delete=Um,Wr.prototype.get=Vm,Wr.prototype.has=jm,Wr.prototype.set=Km;function Br(t){var f=-1,M=t==null?0:t.length;for(this.clear();++f<M;){var U=t[f];this.set(U[0],U[1])}}function Gm(){this.size=0,this.__data__={hash:new To,map:new(Ts||Wr),string:new To}}function qm(t){var f=La(this,t).delete(t);return this.size-=f?1:0,f}function Ym(t){return La(this,t).get(t)}function Zm(t){return La(this,t).has(t)}function Qm(t,f){var M=La(this,t),U=M.size;return M.set(t,f),this.size+=M.size==U?0:1,this}Br.prototype.clear=Gm,Br.prototype.delete=qm,Br.prototype.get=Ym,Br.prototype.has=Zm,Br.prototype.set=Qm;function Lo(t){var f=-1,M=t==null?0:t.length;for(this.__data__=new Br;++f<M;)this.add(t[f])}function Jm(t){return this.__data__.set(t,p),this}function Xm(t){return this.__data__.has(t)}Lo.prototype.add=Lo.prototype.push=Jm,Lo.prototype.has=Xm;function ar(t){var f=this.__data__=new Wr(t);this.size=f.size}function ev(){this.__data__=new Wr,this.size=0}function tv(t){var f=this.__data__,M=f.delete(t);return this.size=f.size,M}function nv(t){return this.__data__.get(t)}function iv(t){return this.__data__.has(t)}function rv(t,f){var M=this.__data__;if(M instanceof Wr){var U=M.__data__;if(!Ts||U.length<$-1)return U.push([t,f]),this.size=++M.size,this;M=this.__data__=new Br(U)}return M.set(t,f),this.size=M.size,this}ar.prototype.clear=ev,ar.prototype.delete=tv,ar.prototype.get=nv,ar.prototype.has=iv,ar.prototype.set=rv;function lh(t,f){var M=pt(t),U=!M&&No(t),q=!M&&!U&&po(t),te=!M&&!U&&!q&&as(t),ae=M||U||q||te,fe=ae?Ze(t.length,Vi):[],ve=fe.length;for(var Te in t)(f||Ut.call(t,Te))&&!(ae&&(Te=="length"||q&&(Te=="offset"||Te=="parent")||te&&(Te=="buffer"||Te=="byteLength"||Te=="byteOffset")||Vr(Te,ve)))&&fe.push(Te);return fe}function ch(t){var f=t.length;return f?t[El(0,f-1)]:e}function ov(t,f){return Ea(mi(t),Eo(f,0,t.length))}function sv(t){return Ea(mi(t))}function xl(t,f,M){(M!==e&&!lr(t[f],M)||M===e&&!(f in t))&&Hr(t,f,M)}function Is(t,f,M){var U=t[f];(!(Ut.call(t,f)&&lr(U,M))||M===e&&!(f in t))&&Hr(t,f,M)}function ya(t,f){for(var M=t.length;M--;)if(lr(t[M][0],f))return M;return-1}function av(t,f,M,U){return co(t,function(q,te,ae){f(U,q,M(q),ae)}),U}function uh(t,f){return t&&Sr(f,Un(f),t)}function lv(t,f){return t&&Sr(f,yi(f),t)}function Hr(t,f,M){f=="__proto__"&&da?da(t,f,{configurable:!0,enumerable:!0,value:M,writable:!0}):t[f]=M}function Sl(t,f){for(var M=-1,U=f.length,q=xe(U),te=t==null;++M<U;)q[M]=te?e:nc(t,f[M]);return q}function Eo(t,f,M){return t===t&&(M!==e&&(t=t<=M?t:M),f!==e&&(t=t>=f?t:f)),t}function Ki(t,f,M,U,q,te){var ae,fe=f&a,ve=f&s,Te=f&r;if(M&&(ae=q?M(t,U,q,te):M(t)),ae!==e)return ae;if(!cn(t))return t;var Ee=pt(t);if(Ee){if(ae=Zv(t),!fe)return mi(t,ae)}else{var Oe=ti(t),Ue=Oe==Ve||Oe==ot;if(po(t))return Oh(t,fe);if(Oe==vn||Oe==ue||Ue&&!q){if(ae=ve||Ue?{}:Xh(t),!fe)return ve?Wv(t,lv(ae,t)):Pv(t,uh(ae,t))}else{if(!Rt[Oe])return q?t:{};ae=Qv(t,Oe,fe)}}te||(te=new ar);var Qe=te.get(t);if(Qe)return Qe;te.set(t,ae),Md(t)?t.forEach(function(at){ae.add(Ki(at,f,M,at,t,te))}):Ad(t)&&t.forEach(function(at,Ct){ae.set(Ct,Ki(at,f,M,Ct,t,te))});var st=Te?ve?zl:Hl:ve?yi:Un,bt=Ee?e:st(t);return jn(bt||t,function(at,Ct){bt&&(Ct=at,at=t[Ct]),Is(ae,Ct,Ki(at,f,M,Ct,t,te))}),ae}function cv(t){var f=Un(t);return function(M){return hh(M,t,f)}}function hh(t,f,M){var U=M.length;if(t==null)return!U;for(t=wt(t);U--;){var q=M[U],te=f[q],ae=t[q];if(ae===e&&!(q in t)||!te(ae))return!1}return!0}function dh(t,f,M){if(typeof t!="function")throw new Kt(v);return Bs(function(){t.apply(e,M)},f)}function Os(t,f,M,U){var q=-1,te=Mi,ae=!0,fe=t.length,ve=[],Te=f.length;if(!fe)return ve;M&&(f=g(f,tt(M))),U?(te=Ti,ae=!1):f.length>=$&&(te=xt,ae=!1,f=new Lo(f));e:for(;++q<fe;){var Ee=t[q],Oe=M==null?Ee:M(Ee);if(Ee=U||Ee!==0?Ee:0,ae&&Oe===Oe){for(var Ue=Te;Ue--;)if(f[Ue]===Oe)continue e;ve.push(Ee)}else te(f,Oe,U)||ve.push(Ee)}return ve}var co=Wh(xr),fh=Wh(Cl,!0);function uv(t,f){var M=!0;return co(t,function(U,q,te){return M=!!f(U,q,te),M}),M}function wa(t,f,M){for(var U=-1,q=t.length;++U<q;){var te=t[U],ae=f(te);if(ae!=null&&(fe===e?ae===ae&&!Ei(ae):M(ae,fe)))var fe=ae,ve=te}return ve}function hv(t,f,M,U){var q=t.length;for(M=vt(M),M<0&&(M=-M>q?0:q+M),U=U===e||U>q?q:vt(U),U<0&&(U+=q),U=M>U?0:Ld(U);M<U;)t[M++]=f;return t}function ph(t,f){var M=[];return co(t,function(U,q,te){f(U,q,te)&&M.push(U)}),M}function Gn(t,f,M,U,q){var te=-1,ae=t.length;for(M||(M=Xv),q||(q=[]);++te<ae;){var fe=t[te];f>0&&M(fe)?f>1?Gn(fe,f-1,M,U,q):_(q,fe):U||(q[q.length]=fe)}return q}var kl=Bh(),gh=Bh(!0);function xr(t,f){return t&&kl(t,f,Un)}function Cl(t,f){return t&&gh(t,f,Un)}function ba(t,f){return Xn(f,function(M){return jr(t[M])})}function Ro(t,f){f=ho(f,t);for(var M=0,U=f.length;t!=null&&M<U;)t=t[kr(f[M++])];return M&&M==U?t:e}function mh(t,f,M){var U=f(t);return pt(t)?U:_(U,M(t))}function ci(t){return t==null?t===e?dt:Ht:Mo&&Mo in wt(t)?Gv(t):sy(t)}function _l(t,f){return t>f}function dv(t,f){return t!=null&&Ut.call(t,f)}function fv(t,f){return t!=null&&f in wt(t)}function pv(t,f,M){return t>=ei(f,M)&&t<In(f,M)}function Al(t,f,M){for(var U=M?Ti:Mi,q=t[0].length,te=t.length,ae=te,fe=xe(te),ve=1/0,Te=[];ae--;){var Ee=t[ae];ae&&f&&(Ee=g(Ee,tt(f))),ve=ei(Ee.length,ve),fe[ae]=!M&&(f||q>=120&&Ee.length>=120)?new Lo(ae&&Ee):e}Ee=t[0];var Oe=-1,Ue=fe[0];e:for(;++Oe<q&&Te.length<ve;){var Qe=Ee[Oe],st=f?f(Qe):Qe;if(Qe=M||Qe!==0?Qe:0,!(Ue?xt(Ue,st):U(Te,st,M))){for(ae=te;--ae;){var bt=fe[ae];if(!(bt?xt(bt,st):U(t[ae],st,M)))continue e}Ue&&Ue.push(st),Te.push(Qe)}}return Te}function gv(t,f,M,U){return xr(t,function(q,te,ae){f(U,M(q),te,ae)}),U}function Ns(t,f,M){f=ho(f,t),t=id(t,f);var U=t==null?t:t[kr(qi(f))];return U==null?e:Wn(U,t,M)}function vh(t){return mn(t)&&ci(t)==ue}function mv(t){return mn(t)&&ci(t)==Gt}function vv(t){return mn(t)&&ci(t)==Ae}function Ds(t,f,M,U,q){return t===f?!0:t==null||f==null||!mn(t)&&!mn(f)?t!==t&&f!==f:yv(t,f,M,U,Ds,q)}function yv(t,f,M,U,q,te){var ae=pt(t),fe=pt(f),ve=ae?le:ti(t),Te=fe?le:ti(f);ve=ve==ue?vn:ve,Te=Te==ue?vn:Te;var Ee=ve==vn,Oe=Te==vn,Ue=ve==Te;if(Ue&&po(t)){if(!po(f))return!1;ae=!0,Ee=!1}if(Ue&&!Ee)return te||(te=new ar),ae||as(t)?Zh(t,f,M,U,q,te):jv(t,f,ve,M,U,q,te);if(!(M&n)){var Qe=Ee&&Ut.call(t,"__wrapped__"),st=Oe&&Ut.call(f,"__wrapped__");if(Qe||st){var bt=Qe?t.value():t,at=st?f.value():f;return te||(te=new ar),q(bt,at,M,U,te)}}return Ue?(te||(te=new ar),Kv(t,f,M,U,q,te)):!1}function wv(t){return mn(t)&&ti(t)==Je}function $l(t,f,M,U){var q=M.length,te=q,ae=!U;if(t==null)return!te;for(t=wt(t);q--;){var fe=M[q];if(ae&&fe[2]?fe[1]!==t[fe[0]]:!(fe[0]in t))return!1}for(;++q<te;){fe=M[q];var ve=fe[0],Te=t[ve],Ee=fe[1];if(ae&&fe[2]){if(Te===e&&!(ve in t))return!1}else{var Oe=new ar;if(U)var Ue=U(Te,Ee,ve,t,f,Oe);if(!(Ue===e?Ds(Ee,Te,n|i,U,Oe):Ue))return!1}}return!0}function yh(t){if(!cn(t)||ty(t))return!1;var f=jr(t)?wm:Qn;return f.test(Oo(t))}function bv(t){return mn(t)&&ci(t)==on}function xv(t){return mn(t)&&ti(t)==Cn}function Sv(t){return mn(t)&&Fa(t.length)&&!!Nt[ci(t)]}function wh(t){return typeof t=="function"?t:t==null?wi:typeof t=="object"?pt(t)?Sh(t[0],t[1]):xh(t):Hd(t)}function Ml(t){if(!Ws(t))return _m(t);var f=[];for(var M in wt(t))Ut.call(t,M)&&M!="constructor"&&f.push(M);return f}function kv(t){if(!cn(t))return oy(t);var f=Ws(t),M=[];for(var U in t)U=="constructor"&&(f||!Ut.call(t,U))||M.push(U);return M}function Tl(t,f){return t<f}function bh(t,f){var M=-1,U=vi(t)?xe(t.length):[];return co(t,function(q,te,ae){U[++M]=f(q,te,ae)}),U}function xh(t){var f=Vl(t);return f.length==1&&f[0][2]?td(f[0][0],f[0][1]):function(M){return M===t||$l(M,t,f)}}function Sh(t,f){return Kl(t)&&ed(f)?td(kr(t),f):function(M){var U=nc(M,t);return U===e&&U===f?ic(M,t):Ds(f,U,n|i)}}function xa(t,f,M,U,q){t!==f&&kl(f,function(te,ae){if(q||(q=new ar),cn(te))Cv(t,f,ae,M,xa,U,q);else{var fe=U?U(ql(t,ae),te,ae+"",t,f,q):e;fe===e&&(fe=te),xl(t,ae,fe)}},yi)}function Cv(t,f,M,U,q,te,ae){var fe=ql(t,M),ve=ql(f,M),Te=ae.get(ve);if(Te){xl(t,M,Te);return}var Ee=te?te(fe,ve,M+"",t,f,ae):e,Oe=Ee===e;if(Oe){var Ue=pt(ve),Qe=!Ue&&po(ve),st=!Ue&&!Qe&&as(ve);Ee=ve,Ue||Qe||st?pt(fe)?Ee=fe:xn(fe)?Ee=mi(fe):Qe?(Oe=!1,Ee=Oh(ve,!0)):st?(Oe=!1,Ee=Nh(ve,!0)):Ee=[]:Hs(ve)||No(ve)?(Ee=fe,No(fe)?Ee=Ed(fe):(!cn(fe)||jr(fe))&&(Ee=Xh(ve))):Oe=!1}Oe&&(ae.set(ve,Ee),q(Ee,ve,U,te,ae),ae.delete(ve)),xl(t,M,Ee)}function kh(t,f){var M=t.length;if(M)return f+=f<0?M:0,Vr(f,M)?t[f]:e}function Ch(t,f,M){f.length?f=g(f,function(te){return pt(te)?function(ae){return Ro(ae,te.length===1?te[0]:te)}:te}):f=[wi];var U=-1;f=g(f,tt(rt()));var q=bh(t,function(te,ae,fe){var ve=g(f,function(Te){return Te(te)});return{criteria:ve,index:++U,value:te}});return We(q,function(te,ae){return Fv(te,ae,M)})}function _v(t,f){return _h(t,f,function(M,U){return ic(t,U)})}function _h(t,f,M){for(var U=-1,q=f.length,te={};++U<q;){var ae=f[U],fe=Ro(t,ae);M(fe,ae)&&Fs(te,ho(ae,t),fe)}return te}function Av(t){return function(f){return Ro(f,t)}}function Ll(t,f,M,U){var q=U?ye:se,te=-1,ae=f.length,fe=t;for(t===f&&(f=mi(f)),M&&(fe=g(t,tt(M)));++te<ae;)for(var ve=0,Te=f[te],Ee=M?M(Te):Te;(ve=q(fe,Ee,ve,U))>-1;)fe!==t&&ha.call(fe,ve,1),ha.call(t,ve,1);return t}function Ah(t,f){for(var M=t?f.length:0,U=M-1;M--;){var q=f[M];if(M==U||q!==te){var te=q;Vr(q)?ha.call(t,q,1):Ol(t,q)}}return t}function El(t,f){return t+pa(sh()*(f-t+1))}function $v(t,f,M,U){for(var q=-1,te=In(fa((f-t)/(M||1)),0),ae=xe(te);te--;)ae[U?te:++q]=t,t+=M;return ae}function Rl(t,f){var M="";if(!t||f<1||f>V)return M;do f%2&&(M+=t),f=pa(f/2),f&&(t+=t);while(f);return M}function St(t,f){return Yl(nd(t,f,wi),t+"")}function Mv(t){return ch(ls(t))}function Tv(t,f){var M=ls(t);return Ea(M,Eo(f,0,M.length))}function Fs(t,f,M,U){if(!cn(t))return t;f=ho(f,t);for(var q=-1,te=f.length,ae=te-1,fe=t;fe!=null&&++q<te;){var ve=kr(f[q]),Te=M;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return t;if(q!=ae){var Ee=fe[ve];Te=U?U(Ee,ve,fe):e,Te===e&&(Te=cn(Ee)?Ee:Vr(f[q+1])?[]:{})}Is(fe,ve,Te),fe=fe[ve]}return t}var $h=ga?function(t,f){return ga.set(t,f),t}:wi,Lv=da?function(t,f){return da(t,"toString",{configurable:!0,enumerable:!1,value:oc(f),writable:!0})}:wi;function Ev(t){return Ea(ls(t))}function Gi(t,f,M){var U=-1,q=t.length;f<0&&(f=-f>q?0:q+f),M=M>q?q:M,M<0&&(M+=q),q=f>M?0:M-f>>>0,f>>>=0;for(var te=xe(q);++U<q;)te[U]=t[U+f];return te}function Rv(t,f){var M;return co(t,function(U,q,te){return M=f(U,q,te),!M}),!!M}function Sa(t,f,M){var U=0,q=t==null?U:t.length;if(typeof f=="number"&&f===f&&q<=ne){for(;U<q;){var te=U+q>>>1,ae=t[te];ae!==null&&!Ei(ae)&&(M?ae<=f:ae<f)?U=te+1:q=te}return q}return Il(t,f,wi,M)}function Il(t,f,M,U){var q=0,te=t==null?0:t.length;if(te===0)return 0;f=M(f);for(var ae=f!==f,fe=f===null,ve=Ei(f),Te=f===e;q<te;){var Ee=pa((q+te)/2),Oe=M(t[Ee]),Ue=Oe!==e,Qe=Oe===null,st=Oe===Oe,bt=Ei(Oe);if(ae)var at=U||st;else Te?at=st&&(U||Ue):fe?at=st&&Ue&&(U||!Qe):ve?at=st&&Ue&&!Qe&&(U||!bt):Qe||bt?at=!1:at=U?Oe<=f:Oe<f;at?q=Ee+1:te=Ee}return ei(te,ce)}function Mh(t,f){for(var M=-1,U=t.length,q=0,te=[];++M<U;){var ae=t[M],fe=f?f(ae):ae;if(!M||!lr(fe,ve)){var ve=fe;te[q++]=ae===0?0:ae}}return te}function Th(t){return typeof t=="number"?t:Ei(t)?Z:+t}function Li(t){if(typeof t=="string")return t;if(pt(t))return g(t,Li)+"";if(Ei(t))return ah?ah.call(t):"";var f=t+"";return f=="0"&&1/t==-B?"-0":f}function uo(t,f,M){var U=-1,q=Mi,te=t.length,ae=!0,fe=[],ve=fe;if(M)ae=!1,q=Ti;else if(te>=$){var Te=f?null:Uv(t);if(Te)return He(Te);ae=!1,q=xt,ve=new Lo}else ve=f?[]:fe;e:for(;++U<te;){var Ee=t[U],Oe=f?f(Ee):Ee;if(Ee=M||Ee!==0?Ee:0,ae&&Oe===Oe){for(var Ue=ve.length;Ue--;)if(ve[Ue]===Oe)continue e;f&&ve.push(Oe),fe.push(Ee)}else q(ve,Oe,M)||(ve!==fe&&ve.push(Oe),fe.push(Ee))}return fe}function Ol(t,f){return f=ho(f,t),t=id(t,f),t==null||delete t[kr(qi(f))]}function Lh(t,f,M,U){return Fs(t,f,M(Ro(t,f)),U)}function ka(t,f,M,U){for(var q=t.length,te=U?q:-1;(U?te--:++te<q)&&f(t[te],te,t););return M?Gi(t,U?0:te,U?te+1:q):Gi(t,U?te+1:0,U?q:te)}function Eh(t,f){var M=t;return M instanceof $t&&(M=M.value()),k(f,function(U,q){return q.func.apply(q.thisArg,_([U],q.args))},M)}function Nl(t,f,M){var U=t.length;if(U<2)return U?uo(t[0]):[];for(var q=-1,te=xe(U);++q<U;)for(var ae=t[q],fe=-1;++fe<U;)fe!=q&&(te[q]=Os(te[q]||ae,t[fe],f,M));return uo(Gn(te,1),f,M)}function Rh(t,f,M){for(var U=-1,q=t.length,te=f.length,ae={};++U<q;){var fe=U<te?f[U]:e;M(ae,t[U],fe)}return ae}function Dl(t){return xn(t)?t:[]}function Fl(t){return typeof t=="function"?t:wi}function ho(t,f){return pt(t)?t:Kl(t,f)?[t]:ad(Wt(t))}var Iv=St;function fo(t,f,M){var U=t.length;return M=M===e?U:M,!f&&M>=U?t:Gi(t,f,M)}var Ih=bm||function(t){return Vt.clearTimeout(t)};function Oh(t,f){if(f)return t.slice();var M=t.length,U=th?th(M):new t.constructor(M);return t.copy(U),U}function Pl(t){var f=new t.constructor(t.byteLength);return new ca(f).set(new ca(t)),f}function Ov(t,f){var M=f?Pl(t.buffer):t.buffer;return new t.constructor(M,t.byteOffset,t.byteLength)}function Nv(t){var f=new t.constructor(t.source,Ci.exec(t));return f.lastIndex=t.lastIndex,f}function Dv(t){return Rs?wt(Rs.call(t)):{}}function Nh(t,f){var M=f?Pl(t.buffer):t.buffer;return new t.constructor(M,t.byteOffset,t.length)}function Dh(t,f){if(t!==f){var M=t!==e,U=t===null,q=t===t,te=Ei(t),ae=f!==e,fe=f===null,ve=f===f,Te=Ei(f);if(!fe&&!Te&&!te&&t>f||te&&ae&&ve&&!fe&&!Te||U&&ae&&ve||!M&&ve||!q)return 1;if(!U&&!te&&!Te&&t<f||Te&&M&&q&&!U&&!te||fe&&M&&q||!ae&&q||!ve)return-1}return 0}function Fv(t,f,M){for(var U=-1,q=t.criteria,te=f.criteria,ae=q.length,fe=M.length;++U<ae;){var ve=Dh(q[U],te[U]);if(ve){if(U>=fe)return ve;var Te=M[U];return ve*(Te=="desc"?-1:1)}}return t.index-f.index}function Fh(t,f,M,U){for(var q=-1,te=t.length,ae=M.length,fe=-1,ve=f.length,Te=In(te-ae,0),Ee=xe(ve+Te),Oe=!U;++fe<ve;)Ee[fe]=f[fe];for(;++q<ae;)(Oe||q<te)&&(Ee[M[q]]=t[q]);for(;Te--;)Ee[fe++]=t[q++];return Ee}function Ph(t,f,M,U){for(var q=-1,te=t.length,ae=-1,fe=M.length,ve=-1,Te=f.length,Ee=In(te-fe,0),Oe=xe(Ee+Te),Ue=!U;++q<Ee;)Oe[q]=t[q];for(var Qe=q;++ve<Te;)Oe[Qe+ve]=f[ve];for(;++ae<fe;)(Ue||q<te)&&(Oe[Qe+M[ae]]=t[q++]);return Oe}function mi(t,f){var M=-1,U=t.length;for(f||(f=xe(U));++M<U;)f[M]=t[M];return f}function Sr(t,f,M,U){var q=!M;M||(M={});for(var te=-1,ae=f.length;++te<ae;){var fe=f[te],ve=U?U(M[fe],t[fe],fe,M,t):e;ve===e&&(ve=t[fe]),q?Hr(M,fe,ve):Is(M,fe,ve)}return M}function Pv(t,f){return Sr(t,jl(t),f)}function Wv(t,f){return Sr(t,Qh(t),f)}function Ca(t,f){return function(M,U){var q=pt(M)?Bn:av,te=f?f():{};return q(M,t,rt(U,2),te)}}function rs(t){return St(function(f,M){var U=-1,q=M.length,te=q>1?M[q-1]:e,ae=q>2?M[2]:e;for(te=t.length>3&&typeof te=="function"?(q--,te):e,ae&&ui(M[0],M[1],ae)&&(te=q<3?e:te,q=1),f=wt(f);++U<q;){var fe=M[U];fe&&t(f,fe,U,te)}return f})}function Wh(t,f){return function(M,U){if(M==null)return M;if(!vi(M))return t(M,U);for(var q=M.length,te=f?q:-1,ae=wt(M);(f?te--:++te<q)&&U(ae[te],te,ae)!==!1;);return M}}function Bh(t){return function(f,M,U){for(var q=-1,te=wt(f),ae=U(f),fe=ae.length;fe--;){var ve=ae[t?fe:++q];if(M(te[ve],ve,te)===!1)break}return f}}function Bv(t,f,M){var U=f&h,q=Ps(t);function te(){var ae=this&&this!==Vt&&this instanceof te?q:t;return ae.apply(U?M:this,arguments)}return te}function Hh(t){return function(f){f=Wt(f);var M=oe(f)?ft(f):e,U=M?M[0]:f.charAt(0),q=M?fo(M,1).join(""):f.slice(1);return U[t]()+q}}function os(t){return function(f){return k(Wd(Pd(f).replace(ln,"")),t,"")}}function Ps(t){return function(){var f=arguments;switch(f.length){case 0:return new t;case 1:return new t(f[0]);case 2:return new t(f[0],f[1]);case 3:return new t(f[0],f[1],f[2]);case 4:return new t(f[0],f[1],f[2],f[3]);case 5:return new t(f[0],f[1],f[2],f[3],f[4]);case 6:return new t(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new t(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var M=is(t.prototype),U=t.apply(M,f);return cn(U)?U:M}}function Hv(t,f,M){var U=Ps(t);function q(){for(var te=arguments.length,ae=xe(te),fe=te,ve=ss(q);fe--;)ae[fe]=arguments[fe];var Te=te<3&&ae[0]!==ve&&ae[te-1]!==ve?[]:Fe(ae,ve);if(te-=Te.length,te<M)return Kh(t,f,_a,q.placeholder,e,ae,Te,e,e,M-te);var Ee=this&&this!==Vt&&this instanceof q?U:t;return Wn(Ee,this,ae)}return q}function zh(t){return function(f,M,U){var q=wt(f);if(!vi(f)){var te=rt(M,3);f=Un(f),M=function(fe){return te(q[fe],fe,q)}}var ae=t(f,M,U);return ae>-1?q[te?f[ae]:ae]:e}}function Uh(t){return Ur(function(f){var M=f.length,U=M,q=ji.prototype.thru;for(t&&f.reverse();U--;){var te=f[U];if(typeof te!="function")throw new Kt(v);if(q&&!ae&&Ta(te)=="wrapper")var ae=new ji([],!0)}for(U=ae?U:M;++U<M;){te=f[U];var fe=Ta(te),ve=fe=="wrapper"?Ul(te):e;ve&&Gl(ve[0])&&ve[1]==(E|R|C|D)&&!ve[4].length&&ve[9]==1?ae=ae[Ta(ve[0])].apply(ae,ve[3]):ae=te.length==1&&Gl(te)?ae[fe]():ae.thru(te)}return function(){var Te=arguments,Ee=Te[0];if(ae&&Te.length==1&&pt(Ee))return ae.plant(Ee).value();for(var Oe=0,Ue=M?f[Oe].apply(this,Te):Ee;++Oe<M;)Ue=f[Oe].call(this,Ue);return Ue}})}function _a(t,f,M,U,q,te,ae,fe,ve,Te){var Ee=f&E,Oe=f&h,Ue=f&m,Qe=f&(R|T),st=f&I,bt=Ue?e:Ps(t);function at(){for(var Ct=arguments.length,Lt=xe(Ct),Ri=Ct;Ri--;)Lt[Ri]=arguments[Ri];if(Qe)var hi=ss(at),Ii=Hn(Lt,hi);if(U&&(Lt=Fh(Lt,U,q,Qe)),te&&(Lt=Ph(Lt,te,ae,Qe)),Ct-=Ii,Qe&&Ct<Te){var Sn=Fe(Lt,hi);return Kh(t,f,_a,at.placeholder,M,Lt,Sn,fe,ve,Te-Ct)}var cr=Oe?M:this,Gr=Ue?cr[t]:t;return Ct=Lt.length,fe?Lt=ay(Lt,fe):st&&Ct>1&&Lt.reverse(),Ee&&ve<Ct&&(Lt.length=ve),this&&this!==Vt&&this instanceof at&&(Gr=bt||Ps(Gr)),Gr.apply(cr,Lt)}return at}function Vh(t,f){return function(M,U){return gv(M,t,f(U),{})}}function Aa(t,f){return function(M,U){var q;if(M===e&&U===e)return f;if(M!==e&&(q=M),U!==e){if(q===e)return U;typeof M=="string"||typeof U=="string"?(M=Li(M),U=Li(U)):(M=Th(M),U=Th(U)),q=t(M,U)}return q}}function Wl(t){return Ur(function(f){return f=g(f,tt(rt())),St(function(M){var U=this;return t(f,function(q){return Wn(q,U,M)})})})}function $a(t,f){f=f===e?" ":Li(f);var M=f.length;if(M<2)return M?Rl(f,t):f;var U=Rl(f,fa(t/kt(f)));return oe(f)?fo(ft(U),0,t).join(""):U.slice(0,t)}function zv(t,f,M,U){var q=f&h,te=Ps(t);function ae(){for(var fe=-1,ve=arguments.length,Te=-1,Ee=U.length,Oe=xe(Ee+ve),Ue=this&&this!==Vt&&this instanceof ae?te:t;++Te<Ee;)Oe[Te]=U[Te];for(;ve--;)Oe[Te++]=arguments[++fe];return Wn(Ue,q?M:this,Oe)}return ae}function jh(t){return function(f,M,U){return U&&typeof U!="number"&&ui(f,M,U)&&(M=U=e),f=Kr(f),M===e?(M=f,f=0):M=Kr(M),U=U===e?f<M?1:-1:Kr(U),$v(f,M,U,t)}}function Ma(t){return function(f,M){return typeof f=="string"&&typeof M=="string"||(f=Yi(f),M=Yi(M)),t(f,M)}}function Kh(t,f,M,U,q,te,ae,fe,ve,Te){var Ee=f&R,Oe=Ee?ae:e,Ue=Ee?e:ae,Qe=Ee?te:e,st=Ee?e:te;f|=Ee?C:w,f&=~(Ee?w:C),f&y||(f&=-4);var bt=[t,f,q,Qe,Oe,st,Ue,fe,ve,Te],at=M.apply(e,bt);return Gl(t)&&rd(at,bt),at.placeholder=U,od(at,t,f)}function Bl(t){var f=Et[t];return function(M,U){if(M=Yi(M),U=U==null?0:ei(vt(U),292),U&&oh(M)){var q=(Wt(M)+"e").split("e"),te=f(q[0]+"e"+(+q[1]+U));return q=(Wt(te)+"e").split("e"),+(q[0]+"e"+(+q[1]-U))}return f(M)}}var Uv=ts&&1/He(new ts([,-0]))[1]==B?function(t){return new ts(t)}:lc;function Gh(t){return function(f){var M=ti(f);return M==Je?$e(f):M==Cn?je(f):Ke(f,t(f))}}function zr(t,f,M,U,q,te,ae,fe){var ve=f&m;if(!ve&&typeof t!="function")throw new Kt(v);var Te=U?U.length:0;if(Te||(f&=-97,U=q=e),ae=ae===e?ae:In(vt(ae),0),fe=fe===e?fe:vt(fe),Te-=q?q.length:0,f&w){var Ee=U,Oe=q;U=q=e}var Ue=ve?e:Ul(t),Qe=[t,f,M,U,q,Ee,Oe,te,ae,fe];if(Ue&&ry(Qe,Ue),t=Qe[0],f=Qe[1],M=Qe[2],U=Qe[3],q=Qe[4],fe=Qe[9]=Qe[9]===e?ve?0:t.length:In(Qe[9]-Te,0),!fe&&f&(R|T)&&(f&=-25),!f||f==h)var st=Bv(t,f,M);else f==R||f==T?st=Hv(t,f,fe):(f==C||f==(h|C))&&!q.length?st=zv(t,f,M,U):st=_a.apply(e,Qe);var bt=Ue?$h:rd;return od(bt(st,Qe),t,f)}function qh(t,f,M,U){return t===e||lr(t,gn[M])&&!Ut.call(U,M)?f:t}function Yh(t,f,M,U,q,te){return cn(t)&&cn(f)&&(te.set(f,t),xa(t,f,e,Yh,te),te.delete(f)),t}function Vv(t){return Hs(t)?e:t}function Zh(t,f,M,U,q,te){var ae=M&n,fe=t.length,ve=f.length;if(fe!=ve&&!(ae&&ve>fe))return!1;var Te=te.get(t),Ee=te.get(f);if(Te&&Ee)return Te==f&&Ee==t;var Oe=-1,Ue=!0,Qe=M&i?new Lo:e;for(te.set(t,f),te.set(f,t);++Oe<fe;){var st=t[Oe],bt=f[Oe];if(U)var at=ae?U(bt,st,Oe,f,t,te):U(st,bt,Oe,t,f,te);if(at!==e){if(at)continue;Ue=!1;break}if(Qe){if(!W(f,function(Ct,Lt){if(!xt(Qe,Lt)&&(st===Ct||q(st,Ct,M,U,te)))return Qe.push(Lt)})){Ue=!1;break}}else if(!(st===bt||q(st,bt,M,U,te))){Ue=!1;break}}return te.delete(t),te.delete(f),Ue}function jv(t,f,M,U,q,te,ae){switch(M){case _n:if(t.byteLength!=f.byteLength||t.byteOffset!=f.byteOffset)return!1;t=t.buffer,f=f.buffer;case Gt:return!(t.byteLength!=f.byteLength||!te(new ca(t),new ca(f)));case _e:case Ae:case lt:return lr(+t,+f);case qe:return t.name==f.name&&t.message==f.message;case on:case Fn:return t==f+"";case Je:var fe=$e;case Cn:var ve=U&n;if(fe||(fe=He),t.size!=f.size&&!ve)return!1;var Te=ae.get(t);if(Te)return Te==f;U|=i,ae.set(t,f);var Ee=Zh(fe(t),fe(f),U,q,te,ae);return ae.delete(t),Ee;case ri:if(Rs)return Rs.call(t)==Rs.call(f)}return!1}function Kv(t,f,M,U,q,te){var ae=M&n,fe=Hl(t),ve=fe.length,Te=Hl(f),Ee=Te.length;if(ve!=Ee&&!ae)return!1;for(var Oe=ve;Oe--;){var Ue=fe[Oe];if(!(ae?Ue in f:Ut.call(f,Ue)))return!1}var Qe=te.get(t),st=te.get(f);if(Qe&&st)return Qe==f&&st==t;var bt=!0;te.set(t,f),te.set(f,t);for(var at=ae;++Oe<ve;){Ue=fe[Oe];var Ct=t[Ue],Lt=f[Ue];if(U)var Ri=ae?U(Lt,Ct,Ue,f,t,te):U(Ct,Lt,Ue,t,f,te);if(!(Ri===e?Ct===Lt||q(Ct,Lt,M,U,te):Ri)){bt=!1;break}at||(at=Ue=="constructor")}if(bt&&!at){var hi=t.constructor,Ii=f.constructor;hi!=Ii&&"constructor"in t&&"constructor"in f&&!(typeof hi=="function"&&hi instanceof hi&&typeof Ii=="function"&&Ii instanceof Ii)&&(bt=!1)}return te.delete(t),te.delete(f),bt}function Ur(t){return Yl(nd(t,e,hd),t+"")}function Hl(t){return mh(t,Un,jl)}function zl(t){return mh(t,yi,Qh)}var Ul=ga?function(t){return ga.get(t)}:lc;function Ta(t){for(var f=t.name+"",M=ns[f],U=Ut.call(ns,f)?M.length:0;U--;){var q=M[U],te=q.func;if(te==null||te==t)return q.name}return f}function ss(t){var f=Ut.call(X,"placeholder")?X:t;return f.placeholder}function rt(){var t=X.iteratee||sc;return t=t===sc?wh:t,arguments.length?t(arguments[0],arguments[1]):t}function La(t,f){var M=t.__data__;return ey(f)?M[typeof f=="string"?"string":"hash"]:M.map}function Vl(t){for(var f=Un(t),M=f.length;M--;){var U=f[M],q=t[U];f[M]=[U,q,ed(q)]}return f}function Io(t,f){var M=re(t,f);return yh(M)?M:e}function Gv(t){var f=Ut.call(t,Mo),M=t[Mo];try{t[Mo]=e;var U=!0}catch{}var q=aa.call(t);return U&&(f?t[Mo]=M:delete t[Mo]),q}var jl=yl?function(t){return t==null?[]:(t=wt(t),Xn(yl(t),function(f){return ih.call(t,f)}))}:cc,Qh=yl?function(t){for(var f=[];t;)_(f,jl(t)),t=ua(t);return f}:cc,ti=ci;(wl&&ti(new wl(new ArrayBuffer(1)))!=_n||Ts&&ti(new Ts)!=Je||bl&&ti(bl.resolve())!=Pt||ts&&ti(new ts)!=Cn||Ls&&ti(new Ls)!=ze)&&(ti=function(t){var f=ci(t),M=f==vn?t.constructor:e,U=M?Oo(M):"";if(U)switch(U){case Tm:return _n;case Lm:return Je;case Em:return Pt;case Rm:return Cn;case Im:return ze}return f});function qv(t,f,M){for(var U=-1,q=M.length;++U<q;){var te=M[U],ae=te.size;switch(te.type){case"drop":t+=ae;break;case"dropRight":f-=ae;break;case"take":f=ei(f,t+ae);break;case"takeRight":t=In(t,f-ae);break}}return{start:t,end:f}}function Yv(t){var f=t.match(ir);return f?f[1].split(wo):[]}function Jh(t,f,M){f=ho(f,t);for(var U=-1,q=f.length,te=!1;++U<q;){var ae=kr(f[U]);if(!(te=t!=null&&M(t,ae)))break;t=t[ae]}return te||++U!=q?te:(q=t==null?0:t.length,!!q&&Fa(q)&&Vr(ae,q)&&(pt(t)||No(t)))}function Zv(t){var f=t.length,M=new t.constructor(f);return f&&typeof t[0]=="string"&&Ut.call(t,"index")&&(M.index=t.index,M.input=t.input),M}function Xh(t){return typeof t.constructor=="function"&&!Ws(t)?is(ua(t)):{}}function Qv(t,f,M){var U=t.constructor;switch(f){case Gt:return Pl(t);case _e:case Ae:return new U(+t);case _n:return Ov(t,M);case oi:case qn:case sn:case Tn:case Pn:case zt:case Ln:case $r:case Ji:return Nh(t,M);case Je:return new U;case lt:case Fn:return new U(t);case on:return Nv(t);case Cn:return new U;case ri:return Dv(t)}}function Jv(t,f){var M=f.length;if(!M)return t;var U=M-1;return f[U]=(M>1?"& ":"")+f[U],f=f.join(M>2?", ":" "),t.replace(gr,`{
|
|
1471
|
+
*/var $k=Ks.exports,_f;function Mk(){return _f||(_f=1,function(l,c){(function(){var e,u="4.17.21",$=200,b="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",x="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",d=500,o="__lodash_placeholder__",a=1,s=2,r=4,n=1,i=2,h=1,m=2,y=4,R=8,T=16,C=32,w=64,E=128,D=256,I=512,L=30,z="...",F=800,O=16,A=1,S=2,N=3,W=1/0,V=9007199254740991,G=17976931348623157e292,Z=NaN,ee=4294967295,ce=ee-1,ne=ee>>>1,he=[["ary",E],["bind",h],["bindKey",m],["curry",R],["curryRight",T],["flip",I],["partial",C],["partialRight",w],["rearg",D]],ue="[object Arguments]",le="[object Array]",me="[object AsyncFunction]",_e="[object Boolean]",Ae="[object Date]",Me="[object DOMException]",qe="[object Error]",Ve="[object Function]",ot="[object GeneratorFunction]",Je="[object Map]",lt="[object Number]",Ht="[object Null]",vn="[object Object]",Pt="[object Promise]",Si="[object Proxy]",on="[object RegExp]",Cn="[object Set]",Fn="[object String]",ri="[object Symbol]",dt="[object Undefined]",ze="[object WeakMap]",Ot="[object WeakSet]",Gt="[object ArrayBuffer]",_n="[object DataView]",oi="[object Float32Array]",qn="[object Float64Array]",sn="[object Int8Array]",Tn="[object Int16Array]",Pn="[object Int32Array]",zt="[object Uint8Array]",Ln="[object Uint8ClampedArray]",$r="[object Uint16Array]",Ji="[object Uint32Array]",Xi=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,Mr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vn=/&(?:amp|lt|gt|quot|#39);/g,Tr=/[&<>"']/g,Zr=RegExp(Vn.source),ks=RegExp(Tr.source),ki=/<%-([\s\S]+?)%>/g,Cs=/<%([\s\S]+?)%>/g,yo=/<%=([\s\S]+?)%>/g,Go=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tr=/^\w*$/,yn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yn=/[\\^$.*+?()[\]{}|]/g,nr=RegExp(Yn.source),an=/^\s+/,Zn=/\s/,gr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ir=/\{\n\/\* \[wrapped with (.+)\] \*/,wo=/,? & /,qo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_s=/[()=,{}\[\]\/\s]/,As=/\\(\\)?/g,rr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ci=/\w*$/,_t=/^[-+]0x[0-9a-f]+$/i,Yo=/^0b[01]+$/i,Qn=/^\[object .+?Constructor\]$/,wn=/^0o[0-7]+$/i,Qt=/^(?:0|[1-9]\d*)$/,un=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Fi=/($^)/,Jn=/['\n\r\u2028\u2029\\]/g,Pi="\\ud800-\\udfff",Qr="\\u0300-\\u036f",bo="\\ufe20-\\ufe2f",mr="\\u20d0-\\u20ff",fi=Qr+bo+mr,Lr="\\u2700-\\u27bf",Jr="a-z\\xdf-\\xf6\\xf8-\\xff",pi="\\xac\\xb1\\xd7\\xf7",Xr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xo="\\u2000-\\u206f",So=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",eo="A-Z\\xc0-\\xd6\\xd8-\\xde",En="\\ufe0e\\ufe0f",ko=pi+Xr+xo+So,Er="['’]",to="["+Pi+"]",no="["+ko+"]",vr="["+fi+"]",Co="\\d+",Zo="["+Lr+"]",io="["+Jr+"]",ro="[^"+Pi+ko+Co+Lr+Jr+eo+"]",_o="\\ud83c[\\udffb-\\udfff]",oo="(?:"+vr+"|"+_o+")",Rr="[^"+Pi+"]",Bi="(?:\\ud83c[\\udde6-\\uddff]){2}",Rn="[\\ud800-\\udbff][\\udc00-\\udfff]",yr="["+eo+"]",or="\\u200d",Qo="(?:"+io+"|"+ro+")",$s="(?:"+yr+"|"+ro+")",Ir="(?:"+Er+"(?:d|ll|m|re|s|t|ve))?",sr="(?:"+Er+"(?:D|LL|M|RE|S|T|VE))?",Or=oo+"?",so="["+En+"]?",Nr="(?:"+or+"(?:"+[Rr,Bi,Rn].join("|")+")"+so+Or+")*",Jo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",De=so+Or+Nr,Xo="(?:"+[Zo,Bi,Rn].join("|")+")"+De,Ie="(?:"+[Rr+vr+"?",vr,Bi,Rn,to].join("|")+")",ln=RegExp(Er,"g"),Dr=RegExp(vr,"g"),_i=RegExp(_o+"(?="+_o+")|"+Ie+De,"g"),bn=RegExp([yr+"?"+io+"+"+Ir+"(?="+[no,yr,"$"].join("|")+")",$s+"+"+sr+"(?="+[no,yr+Qo,"$"].join("|")+")",yr+"?"+Qo+"+"+Ir,yr+"+"+sr,wr,Jo,Co,Xo].join("|"),"g"),es=RegExp("["+or+Pi+fi+En+"]"),Fr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wi=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],br=-1,Nt={};Nt[oi]=Nt[qn]=Nt[sn]=Nt[Tn]=Nt[Pn]=Nt[zt]=Nt[Ln]=Nt[$r]=Nt[Ji]=!0,Nt[ue]=Nt[le]=Nt[Gt]=Nt[_e]=Nt[_n]=Nt[Ae]=Nt[qe]=Nt[Ve]=Nt[Je]=Nt[lt]=Nt[vn]=Nt[on]=Nt[Cn]=Nt[Fn]=Nt[ze]=!1;var Rt={};Rt[ue]=Rt[le]=Rt[Gt]=Rt[_n]=Rt[_e]=Rt[Ae]=Rt[oi]=Rt[qn]=Rt[sn]=Rt[Tn]=Rt[Pn]=Rt[Je]=Rt[lt]=Rt[vn]=Rt[on]=Rt[Cn]=Rt[Fn]=Rt[ri]=Rt[zt]=Rt[Ln]=Rt[$r]=Rt[Ji]=!0,Rt[qe]=Rt[Ve]=Rt[ze]=!1;var Dt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},At={"&":"&","<":"<",">":">",'"':""","'":"'"},Hi={"&":"&","<":"<",">":">",""":'"',"'":"'"},hn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pe=parseFloat,Jt=parseInt,ct=typeof mo=="object"&&mo&&mo.Object===Object&&mo,si=typeof self=="object"&&self&&self.Object===Object&&self,Vt=ct||si||Function("return this")(),Xt=c&&!c.nodeType&&c,An=Xt&&!0&&l&&!l.nodeType&&l,ai=An&&An.exports===Xt,zi=ai&&ct.process,dn=function(){try{var pe=An&&An.require&&An.require("util").types;return pe||zi&&zi.binding&&zi.binding("util")}catch{}}(),gi=dn&&dn.isArrayBuffer,ao=dn&&dn.isDate,fn=dn&&dn.isMap,Ai=dn&&dn.isRegExp,$i=dn&&dn.isSet,Ui=dn&&dn.isTypedArray;function Bn(pe,Ce,xe){switch(xe.length){case 0:return pe.call(Ce);case 1:return pe.call(Ce,xe[0]);case 2:return pe.call(Ce,xe[0],xe[1]);case 3:return pe.call(Ce,xe[0],xe[1],xe[2])}return pe.apply(Ce,xe)}function Wn(pe,Ce,xe,We){for(var nt=-1,gt=pe==null?0:pe.length;++nt<gt;){var Et=pe[nt];Ce(We,Et,xe(Et),pe)}return We}function jn(pe,Ce){for(var xe=-1,We=pe==null?0:pe.length;++xe<We&&Ce(pe[xe],xe,pe)!==!1;);return pe}function Ao(pe,Ce){for(var xe=pe==null?0:pe.length;xe--&&Ce(pe[xe],xe,pe)!==!1;);return pe}function Kn(pe,Ce){for(var xe=-1,We=pe==null?0:pe.length;++xe<We;)if(!Ce(pe[xe],xe,pe))return!1;return!0}function Xn(pe,Ce){for(var xe=-1,We=pe==null?0:pe.length,nt=0,gt=[];++xe<We;){var Et=pe[xe];Ce(Et,xe,pe)&&(gt[nt++]=Et)}return gt}function Mi(pe,Ce){var xe=pe==null?0:pe.length;return!!xe&&se(pe,Ce,0)>-1}function Ti(pe,Ce,xe){for(var We=-1,nt=pe==null?0:pe.length;++We<nt;)if(xe(Ce,pe[We]))return!0;return!1}function g(pe,Ce){for(var xe=-1,We=pe==null?0:pe.length,nt=Array(We);++xe<We;)nt[xe]=Ce(pe[xe],xe,pe);return nt}function _(pe,Ce){for(var xe=-1,We=Ce.length,nt=pe.length;++xe<We;)pe[nt+xe]=Ce[xe];return pe}function k(pe,Ce,xe,We){var nt=-1,gt=pe==null?0:pe.length;for(We&>&&(xe=pe[++nt]);++nt<gt;)xe=Ce(xe,pe[nt],nt,pe);return xe}function P(pe,Ce,xe,We){var nt=pe==null?0:pe.length;for(We&&nt&&(xe=pe[--nt]);nt--;)xe=Ce(xe,pe[nt],nt,pe);return xe}function B(pe,Ce){for(var xe=-1,We=pe==null?0:pe.length;++xe<We;)if(Ce(pe[xe],xe,pe))return!0;return!1}var H=we("length");function K(pe){return pe.split("")}function Y(pe){return pe.match(qo)||[]}function J(pe,Ce,xe){var We;return xe(pe,function(nt,gt,Et){if(Ce(nt,gt,Et))return We=gt,!1}),We}function ie(pe,Ce,xe,We){for(var nt=pe.length,gt=xe+(We?1:-1);We?gt--:++gt<nt;)if(Ce(pe[gt],gt,pe))return gt;return-1}function se(pe,Ce,xe){return Ce===Ce?Ye(pe,Ce,xe):ie(pe,Se,xe)}function ye(pe,Ce,xe,We){for(var nt=xe-1,gt=pe.length;++nt<gt;)if(We(pe[nt],Ce))return nt;return-1}function Se(pe){return pe!==pe}function de(pe,Ce){var xe=pe==null?0:pe.length;return xe?Xe(pe,Ce)/xe:Z}function we(pe){return function(Ce){return Ce==null?e:Ce[pe]}}function Re(pe){return function(Ce){return pe==null?e:pe[Ce]}}function Le(pe,Ce,xe,We,nt){return nt(pe,function(gt,Et,wt){xe=We?(We=!1,gt):Ce(xe,gt,Et,wt)}),xe}function Be(pe,Ce){var xe=pe.length;for(pe.sort(Ce);xe--;)pe[xe]=pe[xe].value;return pe}function Xe(pe,Ce){for(var xe,We=-1,nt=pe.length;++We<nt;){var gt=Ce(pe[We]);gt!==e&&(xe=xe===e?gt:xe+gt)}return xe}function Ze(pe,Ce){for(var xe=-1,We=Array(pe);++xe<pe;)We[xe]=Ce(xe);return We}function Ke(pe,Ce){return g(Ce,function(xe){return[xe,pe[xe]]})}function jt(pe){return pe&&pe.slice(0,yt(pe)+1).replace(an,"")}function tt(pe){return function(Ce){return pe(Ce)}}function tn(pe,Ce){return g(Ce,function(xe){return pe[xe]})}function xt(pe,Ce){return pe.has(Ce)}function ut(pe,Ce){for(var xe=-1,We=pe.length;++xe<We&&se(Ce,pe[xe],0)>-1;);return xe}function pn(pe,Ce){for(var xe=pe.length;xe--&&se(Ce,pe[xe],0)>-1;);return xe}function Hn(pe,Ce){for(var xe=pe.length,We=0;xe--;)pe[xe]===Ce&&++We;return We}var nn=Re(Dt),j=Re(At);function Q(pe){return"\\"+hn[pe]}function re(pe,Ce){return pe==null?e:pe[Ce]}function oe(pe){return es.test(pe)}function ge(pe){return Fr.test(pe)}function be(pe){for(var Ce,xe=[];!(Ce=pe.next()).done;)xe.push(Ce.value);return xe}function $e(pe){var Ce=-1,xe=Array(pe.size);return pe.forEach(function(We,nt){xe[++Ce]=[nt,We]}),xe}function Ne(pe,Ce){return function(xe){return pe(Ce(xe))}}function Fe(pe,Ce){for(var xe=-1,We=pe.length,nt=0,gt=[];++xe<We;){var Et=pe[xe];(Et===Ce||Et===o)&&(pe[xe]=o,gt[nt++]=xe)}return gt}function He(pe){var Ce=-1,xe=Array(pe.size);return pe.forEach(function(We){xe[++Ce]=We}),xe}function je(pe){var Ce=-1,xe=Array(pe.size);return pe.forEach(function(We){xe[++Ce]=[We,We]}),xe}function Ye(pe,Ce,xe){for(var We=xe-1,nt=pe.length;++We<nt;)if(pe[We]===Ce)return We;return-1}function ht(pe,Ce,xe){for(var We=xe+1;We--;)if(pe[We]===Ce)return We;return We}function kt(pe){return oe(pe)?et(pe):H(pe)}function ft(pe){return oe(pe)?qt(pe):K(pe)}function yt(pe){for(var Ce=pe.length;Ce--&&Zn.test(pe.charAt(Ce)););return Ce}var it=Re(Hi);function et(pe){for(var Ce=_i.lastIndex=0;_i.test(pe);)++Ce;return Ce}function qt(pe){return pe.match(_i)||[]}function rn(pe){return pe.match(bn)||[]}var $n=function pe(Ce){Ce=Ce==null?Vt:Tt.defaults(Vt.Object(),Ce,Tt.pick(Vt,Wi));var xe=Ce.Array,We=Ce.Date,nt=Ce.Error,gt=Ce.Function,Et=Ce.Math,wt=Ce.Object,li=Ce.RegExp,Vi=Ce.String,Kt=Ce.TypeError,zn=xe.prototype,Pr=gt.prototype,gn=wt.prototype,$o=Ce["__core-js_shared__"],sa=Pr.toString,Ut=gn.hasOwnProperty,mm=0,eh=function(){var t=/[^.]+$/.exec($o&&$o.keys&&$o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),aa=gn.toString,vm=sa.call(wt),ym=Vt._,wm=li("^"+sa.call(Ut).replace(Yn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),la=ai?Ce.Buffer:e,lo=Ce.Symbol,ca=Ce.Uint8Array,th=la?la.allocUnsafe:e,ua=Ne(wt.getPrototypeOf,wt),nh=wt.create,ih=gn.propertyIsEnumerable,ha=zn.splice,rh=lo?lo.isConcatSpreadable:e,Ms=lo?lo.iterator:e,Mo=lo?lo.toStringTag:e,da=function(){try{var t=Io(wt,"defineProperty");return t({},"",{}),t}catch{}}(),bm=Ce.clearTimeout!==Vt.clearTimeout&&Ce.clearTimeout,xm=We&&We.now!==Vt.Date.now&&We.now,Sm=Ce.setTimeout!==Vt.setTimeout&&Ce.setTimeout,fa=Et.ceil,pa=Et.floor,yl=wt.getOwnPropertySymbols,km=la?la.isBuffer:e,oh=Ce.isFinite,Cm=zn.join,_m=Ne(wt.keys,wt),In=Et.max,ei=Et.min,Am=We.now,$m=Ce.parseInt,sh=Et.random,Mm=zn.reverse,wl=Io(Ce,"DataView"),Ts=Io(Ce,"Map"),bl=Io(Ce,"Promise"),ts=Io(Ce,"Set"),Ls=Io(Ce,"WeakMap"),Es=Io(wt,"create"),ga=Ls&&new Ls,ns={},Tm=Oo(wl),Lm=Oo(Ts),Em=Oo(bl),Rm=Oo(ts),Im=Oo(Ls),ma=lo?lo.prototype:e,Rs=ma?ma.valueOf:e,ah=ma?ma.toString:e;function X(t){if(mn(t)&&!pt(t)&&!(t instanceof $t)){if(t instanceof ji)return t;if(Ut.call(t,"__wrapped__"))return ld(t)}return new ji(t)}var is=function(){function t(){}return function(f){if(!cn(f))return{};if(nh)return nh(f);t.prototype=f;var M=new t;return t.prototype=e,M}}();function va(){}function ji(t,f){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=e}X.templateSettings={escape:ki,evaluate:Cs,interpolate:yo,variable:"",imports:{_:X}},X.prototype=va.prototype,X.prototype.constructor=X,ji.prototype=is(va.prototype),ji.prototype.constructor=ji;function $t(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ee,this.__views__=[]}function Om(){var t=new $t(this.__wrapped__);return t.__actions__=mi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=mi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=mi(this.__views__),t}function Nm(){if(this.__filtered__){var t=new $t(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Dm(){var t=this.__wrapped__.value(),f=this.__dir__,M=pt(t),U=f<0,q=M?t.length:0,te=qv(0,q,this.__views__),ae=te.start,fe=te.end,ve=fe-ae,Te=U?fe:ae-1,Ee=this.__iteratees__,Oe=Ee.length,Ue=0,Qe=ei(ve,this.__takeCount__);if(!M||!U&&q==ve&&Qe==ve)return Eh(t,this.__actions__);var st=[];e:for(;ve--&&Ue<Qe;){Te+=f;for(var bt=-1,at=t[Te];++bt<Oe;){var Ct=Ee[bt],Lt=Ct.iteratee,Ri=Ct.type,hi=Lt(at);if(Ri==S)at=hi;else if(!hi){if(Ri==A)continue e;break e}}st[Ue++]=at}return st}$t.prototype=is(va.prototype),$t.prototype.constructor=$t;function To(t){var f=-1,M=t==null?0:t.length;for(this.clear();++f<M;){var U=t[f];this.set(U[0],U[1])}}function Fm(){this.__data__=Es?Es(null):{},this.size=0}function Pm(t){var f=this.has(t)&&delete this.__data__[t];return this.size-=f?1:0,f}function Bm(t){var f=this.__data__;if(Es){var M=f[t];return M===p?e:M}return Ut.call(f,t)?f[t]:e}function Wm(t){var f=this.__data__;return Es?f[t]!==e:Ut.call(f,t)}function Hm(t,f){var M=this.__data__;return this.size+=this.has(t)?0:1,M[t]=Es&&f===e?p:f,this}To.prototype.clear=Fm,To.prototype.delete=Pm,To.prototype.get=Bm,To.prototype.has=Wm,To.prototype.set=Hm;function Br(t){var f=-1,M=t==null?0:t.length;for(this.clear();++f<M;){var U=t[f];this.set(U[0],U[1])}}function zm(){this.__data__=[],this.size=0}function Um(t){var f=this.__data__,M=ya(f,t);if(M<0)return!1;var U=f.length-1;return M==U?f.pop():ha.call(f,M,1),--this.size,!0}function Vm(t){var f=this.__data__,M=ya(f,t);return M<0?e:f[M][1]}function jm(t){return ya(this.__data__,t)>-1}function Km(t,f){var M=this.__data__,U=ya(M,t);return U<0?(++this.size,M.push([t,f])):M[U][1]=f,this}Br.prototype.clear=zm,Br.prototype.delete=Um,Br.prototype.get=Vm,Br.prototype.has=jm,Br.prototype.set=Km;function Wr(t){var f=-1,M=t==null?0:t.length;for(this.clear();++f<M;){var U=t[f];this.set(U[0],U[1])}}function Gm(){this.size=0,this.__data__={hash:new To,map:new(Ts||Br),string:new To}}function qm(t){var f=La(this,t).delete(t);return this.size-=f?1:0,f}function Ym(t){return La(this,t).get(t)}function Zm(t){return La(this,t).has(t)}function Qm(t,f){var M=La(this,t),U=M.size;return M.set(t,f),this.size+=M.size==U?0:1,this}Wr.prototype.clear=Gm,Wr.prototype.delete=qm,Wr.prototype.get=Ym,Wr.prototype.has=Zm,Wr.prototype.set=Qm;function Lo(t){var f=-1,M=t==null?0:t.length;for(this.__data__=new Wr;++f<M;)this.add(t[f])}function Jm(t){return this.__data__.set(t,p),this}function Xm(t){return this.__data__.has(t)}Lo.prototype.add=Lo.prototype.push=Jm,Lo.prototype.has=Xm;function ar(t){var f=this.__data__=new Br(t);this.size=f.size}function ev(){this.__data__=new Br,this.size=0}function tv(t){var f=this.__data__,M=f.delete(t);return this.size=f.size,M}function nv(t){return this.__data__.get(t)}function iv(t){return this.__data__.has(t)}function rv(t,f){var M=this.__data__;if(M instanceof Br){var U=M.__data__;if(!Ts||U.length<$-1)return U.push([t,f]),this.size=++M.size,this;M=this.__data__=new Wr(U)}return M.set(t,f),this.size=M.size,this}ar.prototype.clear=ev,ar.prototype.delete=tv,ar.prototype.get=nv,ar.prototype.has=iv,ar.prototype.set=rv;function lh(t,f){var M=pt(t),U=!M&&No(t),q=!M&&!U&&po(t),te=!M&&!U&&!q&&as(t),ae=M||U||q||te,fe=ae?Ze(t.length,Vi):[],ve=fe.length;for(var Te in t)(f||Ut.call(t,Te))&&!(ae&&(Te=="length"||q&&(Te=="offset"||Te=="parent")||te&&(Te=="buffer"||Te=="byteLength"||Te=="byteOffset")||Vr(Te,ve)))&&fe.push(Te);return fe}function ch(t){var f=t.length;return f?t[El(0,f-1)]:e}function ov(t,f){return Ea(mi(t),Eo(f,0,t.length))}function sv(t){return Ea(mi(t))}function xl(t,f,M){(M!==e&&!lr(t[f],M)||M===e&&!(f in t))&&Hr(t,f,M)}function Is(t,f,M){var U=t[f];(!(Ut.call(t,f)&&lr(U,M))||M===e&&!(f in t))&&Hr(t,f,M)}function ya(t,f){for(var M=t.length;M--;)if(lr(t[M][0],f))return M;return-1}function av(t,f,M,U){return co(t,function(q,te,ae){f(U,q,M(q),ae)}),U}function uh(t,f){return t&&Sr(f,Un(f),t)}function lv(t,f){return t&&Sr(f,yi(f),t)}function Hr(t,f,M){f=="__proto__"&&da?da(t,f,{configurable:!0,enumerable:!0,value:M,writable:!0}):t[f]=M}function Sl(t,f){for(var M=-1,U=f.length,q=xe(U),te=t==null;++M<U;)q[M]=te?e:nc(t,f[M]);return q}function Eo(t,f,M){return t===t&&(M!==e&&(t=t<=M?t:M),f!==e&&(t=t>=f?t:f)),t}function Ki(t,f,M,U,q,te){var ae,fe=f&a,ve=f&s,Te=f&r;if(M&&(ae=q?M(t,U,q,te):M(t)),ae!==e)return ae;if(!cn(t))return t;var Ee=pt(t);if(Ee){if(ae=Zv(t),!fe)return mi(t,ae)}else{var Oe=ti(t),Ue=Oe==Ve||Oe==ot;if(po(t))return Oh(t,fe);if(Oe==vn||Oe==ue||Ue&&!q){if(ae=ve||Ue?{}:Xh(t),!fe)return ve?Bv(t,lv(ae,t)):Pv(t,uh(ae,t))}else{if(!Rt[Oe])return q?t:{};ae=Qv(t,Oe,fe)}}te||(te=new ar);var Qe=te.get(t);if(Qe)return Qe;te.set(t,ae),Md(t)?t.forEach(function(at){ae.add(Ki(at,f,M,at,t,te))}):Ad(t)&&t.forEach(function(at,Ct){ae.set(Ct,Ki(at,f,M,Ct,t,te))});var st=Te?ve?zl:Hl:ve?yi:Un,bt=Ee?e:st(t);return jn(bt||t,function(at,Ct){bt&&(Ct=at,at=t[Ct]),Is(ae,Ct,Ki(at,f,M,Ct,t,te))}),ae}function cv(t){var f=Un(t);return function(M){return hh(M,t,f)}}function hh(t,f,M){var U=M.length;if(t==null)return!U;for(t=wt(t);U--;){var q=M[U],te=f[q],ae=t[q];if(ae===e&&!(q in t)||!te(ae))return!1}return!0}function dh(t,f,M){if(typeof t!="function")throw new Kt(v);return Ws(function(){t.apply(e,M)},f)}function Os(t,f,M,U){var q=-1,te=Mi,ae=!0,fe=t.length,ve=[],Te=f.length;if(!fe)return ve;M&&(f=g(f,tt(M))),U?(te=Ti,ae=!1):f.length>=$&&(te=xt,ae=!1,f=new Lo(f));e:for(;++q<fe;){var Ee=t[q],Oe=M==null?Ee:M(Ee);if(Ee=U||Ee!==0?Ee:0,ae&&Oe===Oe){for(var Ue=Te;Ue--;)if(f[Ue]===Oe)continue e;ve.push(Ee)}else te(f,Oe,U)||ve.push(Ee)}return ve}var co=Bh(xr),fh=Bh(Cl,!0);function uv(t,f){var M=!0;return co(t,function(U,q,te){return M=!!f(U,q,te),M}),M}function wa(t,f,M){for(var U=-1,q=t.length;++U<q;){var te=t[U],ae=f(te);if(ae!=null&&(fe===e?ae===ae&&!Ei(ae):M(ae,fe)))var fe=ae,ve=te}return ve}function hv(t,f,M,U){var q=t.length;for(M=vt(M),M<0&&(M=-M>q?0:q+M),U=U===e||U>q?q:vt(U),U<0&&(U+=q),U=M>U?0:Ld(U);M<U;)t[M++]=f;return t}function ph(t,f){var M=[];return co(t,function(U,q,te){f(U,q,te)&&M.push(U)}),M}function Gn(t,f,M,U,q){var te=-1,ae=t.length;for(M||(M=Xv),q||(q=[]);++te<ae;){var fe=t[te];f>0&&M(fe)?f>1?Gn(fe,f-1,M,U,q):_(q,fe):U||(q[q.length]=fe)}return q}var kl=Wh(),gh=Wh(!0);function xr(t,f){return t&&kl(t,f,Un)}function Cl(t,f){return t&&gh(t,f,Un)}function ba(t,f){return Xn(f,function(M){return jr(t[M])})}function Ro(t,f){f=ho(f,t);for(var M=0,U=f.length;t!=null&&M<U;)t=t[kr(f[M++])];return M&&M==U?t:e}function mh(t,f,M){var U=f(t);return pt(t)?U:_(U,M(t))}function ci(t){return t==null?t===e?dt:Ht:Mo&&Mo in wt(t)?Gv(t):sy(t)}function _l(t,f){return t>f}function dv(t,f){return t!=null&&Ut.call(t,f)}function fv(t,f){return t!=null&&f in wt(t)}function pv(t,f,M){return t>=ei(f,M)&&t<In(f,M)}function Al(t,f,M){for(var U=M?Ti:Mi,q=t[0].length,te=t.length,ae=te,fe=xe(te),ve=1/0,Te=[];ae--;){var Ee=t[ae];ae&&f&&(Ee=g(Ee,tt(f))),ve=ei(Ee.length,ve),fe[ae]=!M&&(f||q>=120&&Ee.length>=120)?new Lo(ae&&Ee):e}Ee=t[0];var Oe=-1,Ue=fe[0];e:for(;++Oe<q&&Te.length<ve;){var Qe=Ee[Oe],st=f?f(Qe):Qe;if(Qe=M||Qe!==0?Qe:0,!(Ue?xt(Ue,st):U(Te,st,M))){for(ae=te;--ae;){var bt=fe[ae];if(!(bt?xt(bt,st):U(t[ae],st,M)))continue e}Ue&&Ue.push(st),Te.push(Qe)}}return Te}function gv(t,f,M,U){return xr(t,function(q,te,ae){f(U,M(q),te,ae)}),U}function Ns(t,f,M){f=ho(f,t),t=id(t,f);var U=t==null?t:t[kr(qi(f))];return U==null?e:Bn(U,t,M)}function vh(t){return mn(t)&&ci(t)==ue}function mv(t){return mn(t)&&ci(t)==Gt}function vv(t){return mn(t)&&ci(t)==Ae}function Ds(t,f,M,U,q){return t===f?!0:t==null||f==null||!mn(t)&&!mn(f)?t!==t&&f!==f:yv(t,f,M,U,Ds,q)}function yv(t,f,M,U,q,te){var ae=pt(t),fe=pt(f),ve=ae?le:ti(t),Te=fe?le:ti(f);ve=ve==ue?vn:ve,Te=Te==ue?vn:Te;var Ee=ve==vn,Oe=Te==vn,Ue=ve==Te;if(Ue&&po(t)){if(!po(f))return!1;ae=!0,Ee=!1}if(Ue&&!Ee)return te||(te=new ar),ae||as(t)?Zh(t,f,M,U,q,te):jv(t,f,ve,M,U,q,te);if(!(M&n)){var Qe=Ee&&Ut.call(t,"__wrapped__"),st=Oe&&Ut.call(f,"__wrapped__");if(Qe||st){var bt=Qe?t.value():t,at=st?f.value():f;return te||(te=new ar),q(bt,at,M,U,te)}}return Ue?(te||(te=new ar),Kv(t,f,M,U,q,te)):!1}function wv(t){return mn(t)&&ti(t)==Je}function $l(t,f,M,U){var q=M.length,te=q,ae=!U;if(t==null)return!te;for(t=wt(t);q--;){var fe=M[q];if(ae&&fe[2]?fe[1]!==t[fe[0]]:!(fe[0]in t))return!1}for(;++q<te;){fe=M[q];var ve=fe[0],Te=t[ve],Ee=fe[1];if(ae&&fe[2]){if(Te===e&&!(ve in t))return!1}else{var Oe=new ar;if(U)var Ue=U(Te,Ee,ve,t,f,Oe);if(!(Ue===e?Ds(Ee,Te,n|i,U,Oe):Ue))return!1}}return!0}function yh(t){if(!cn(t)||ty(t))return!1;var f=jr(t)?wm:Qn;return f.test(Oo(t))}function bv(t){return mn(t)&&ci(t)==on}function xv(t){return mn(t)&&ti(t)==Cn}function Sv(t){return mn(t)&&Fa(t.length)&&!!Nt[ci(t)]}function wh(t){return typeof t=="function"?t:t==null?wi:typeof t=="object"?pt(t)?Sh(t[0],t[1]):xh(t):Hd(t)}function Ml(t){if(!Bs(t))return _m(t);var f=[];for(var M in wt(t))Ut.call(t,M)&&M!="constructor"&&f.push(M);return f}function kv(t){if(!cn(t))return oy(t);var f=Bs(t),M=[];for(var U in t)U=="constructor"&&(f||!Ut.call(t,U))||M.push(U);return M}function Tl(t,f){return t<f}function bh(t,f){var M=-1,U=vi(t)?xe(t.length):[];return co(t,function(q,te,ae){U[++M]=f(q,te,ae)}),U}function xh(t){var f=Vl(t);return f.length==1&&f[0][2]?td(f[0][0],f[0][1]):function(M){return M===t||$l(M,t,f)}}function Sh(t,f){return Kl(t)&&ed(f)?td(kr(t),f):function(M){var U=nc(M,t);return U===e&&U===f?ic(M,t):Ds(f,U,n|i)}}function xa(t,f,M,U,q){t!==f&&kl(f,function(te,ae){if(q||(q=new ar),cn(te))Cv(t,f,ae,M,xa,U,q);else{var fe=U?U(ql(t,ae),te,ae+"",t,f,q):e;fe===e&&(fe=te),xl(t,ae,fe)}},yi)}function Cv(t,f,M,U,q,te,ae){var fe=ql(t,M),ve=ql(f,M),Te=ae.get(ve);if(Te){xl(t,M,Te);return}var Ee=te?te(fe,ve,M+"",t,f,ae):e,Oe=Ee===e;if(Oe){var Ue=pt(ve),Qe=!Ue&&po(ve),st=!Ue&&!Qe&&as(ve);Ee=ve,Ue||Qe||st?pt(fe)?Ee=fe:xn(fe)?Ee=mi(fe):Qe?(Oe=!1,Ee=Oh(ve,!0)):st?(Oe=!1,Ee=Nh(ve,!0)):Ee=[]:Hs(ve)||No(ve)?(Ee=fe,No(fe)?Ee=Ed(fe):(!cn(fe)||jr(fe))&&(Ee=Xh(ve))):Oe=!1}Oe&&(ae.set(ve,Ee),q(Ee,ve,U,te,ae),ae.delete(ve)),xl(t,M,Ee)}function kh(t,f){var M=t.length;if(M)return f+=f<0?M:0,Vr(f,M)?t[f]:e}function Ch(t,f,M){f.length?f=g(f,function(te){return pt(te)?function(ae){return Ro(ae,te.length===1?te[0]:te)}:te}):f=[wi];var U=-1;f=g(f,tt(rt()));var q=bh(t,function(te,ae,fe){var ve=g(f,function(Te){return Te(te)});return{criteria:ve,index:++U,value:te}});return Be(q,function(te,ae){return Fv(te,ae,M)})}function _v(t,f){return _h(t,f,function(M,U){return ic(t,U)})}function _h(t,f,M){for(var U=-1,q=f.length,te={};++U<q;){var ae=f[U],fe=Ro(t,ae);M(fe,ae)&&Fs(te,ho(ae,t),fe)}return te}function Av(t){return function(f){return Ro(f,t)}}function Ll(t,f,M,U){var q=U?ye:se,te=-1,ae=f.length,fe=t;for(t===f&&(f=mi(f)),M&&(fe=g(t,tt(M)));++te<ae;)for(var ve=0,Te=f[te],Ee=M?M(Te):Te;(ve=q(fe,Ee,ve,U))>-1;)fe!==t&&ha.call(fe,ve,1),ha.call(t,ve,1);return t}function Ah(t,f){for(var M=t?f.length:0,U=M-1;M--;){var q=f[M];if(M==U||q!==te){var te=q;Vr(q)?ha.call(t,q,1):Ol(t,q)}}return t}function El(t,f){return t+pa(sh()*(f-t+1))}function $v(t,f,M,U){for(var q=-1,te=In(fa((f-t)/(M||1)),0),ae=xe(te);te--;)ae[U?te:++q]=t,t+=M;return ae}function Rl(t,f){var M="";if(!t||f<1||f>V)return M;do f%2&&(M+=t),f=pa(f/2),f&&(t+=t);while(f);return M}function St(t,f){return Yl(nd(t,f,wi),t+"")}function Mv(t){return ch(ls(t))}function Tv(t,f){var M=ls(t);return Ea(M,Eo(f,0,M.length))}function Fs(t,f,M,U){if(!cn(t))return t;f=ho(f,t);for(var q=-1,te=f.length,ae=te-1,fe=t;fe!=null&&++q<te;){var ve=kr(f[q]),Te=M;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return t;if(q!=ae){var Ee=fe[ve];Te=U?U(Ee,ve,fe):e,Te===e&&(Te=cn(Ee)?Ee:Vr(f[q+1])?[]:{})}Is(fe,ve,Te),fe=fe[ve]}return t}var $h=ga?function(t,f){return ga.set(t,f),t}:wi,Lv=da?function(t,f){return da(t,"toString",{configurable:!0,enumerable:!1,value:oc(f),writable:!0})}:wi;function Ev(t){return Ea(ls(t))}function Gi(t,f,M){var U=-1,q=t.length;f<0&&(f=-f>q?0:q+f),M=M>q?q:M,M<0&&(M+=q),q=f>M?0:M-f>>>0,f>>>=0;for(var te=xe(q);++U<q;)te[U]=t[U+f];return te}function Rv(t,f){var M;return co(t,function(U,q,te){return M=f(U,q,te),!M}),!!M}function Sa(t,f,M){var U=0,q=t==null?U:t.length;if(typeof f=="number"&&f===f&&q<=ne){for(;U<q;){var te=U+q>>>1,ae=t[te];ae!==null&&!Ei(ae)&&(M?ae<=f:ae<f)?U=te+1:q=te}return q}return Il(t,f,wi,M)}function Il(t,f,M,U){var q=0,te=t==null?0:t.length;if(te===0)return 0;f=M(f);for(var ae=f!==f,fe=f===null,ve=Ei(f),Te=f===e;q<te;){var Ee=pa((q+te)/2),Oe=M(t[Ee]),Ue=Oe!==e,Qe=Oe===null,st=Oe===Oe,bt=Ei(Oe);if(ae)var at=U||st;else Te?at=st&&(U||Ue):fe?at=st&&Ue&&(U||!Qe):ve?at=st&&Ue&&!Qe&&(U||!bt):Qe||bt?at=!1:at=U?Oe<=f:Oe<f;at?q=Ee+1:te=Ee}return ei(te,ce)}function Mh(t,f){for(var M=-1,U=t.length,q=0,te=[];++M<U;){var ae=t[M],fe=f?f(ae):ae;if(!M||!lr(fe,ve)){var ve=fe;te[q++]=ae===0?0:ae}}return te}function Th(t){return typeof t=="number"?t:Ei(t)?Z:+t}function Li(t){if(typeof t=="string")return t;if(pt(t))return g(t,Li)+"";if(Ei(t))return ah?ah.call(t):"";var f=t+"";return f=="0"&&1/t==-W?"-0":f}function uo(t,f,M){var U=-1,q=Mi,te=t.length,ae=!0,fe=[],ve=fe;if(M)ae=!1,q=Ti;else if(te>=$){var Te=f?null:Uv(t);if(Te)return He(Te);ae=!1,q=xt,ve=new Lo}else ve=f?[]:fe;e:for(;++U<te;){var Ee=t[U],Oe=f?f(Ee):Ee;if(Ee=M||Ee!==0?Ee:0,ae&&Oe===Oe){for(var Ue=ve.length;Ue--;)if(ve[Ue]===Oe)continue e;f&&ve.push(Oe),fe.push(Ee)}else q(ve,Oe,M)||(ve!==fe&&ve.push(Oe),fe.push(Ee))}return fe}function Ol(t,f){return f=ho(f,t),t=id(t,f),t==null||delete t[kr(qi(f))]}function Lh(t,f,M,U){return Fs(t,f,M(Ro(t,f)),U)}function ka(t,f,M,U){for(var q=t.length,te=U?q:-1;(U?te--:++te<q)&&f(t[te],te,t););return M?Gi(t,U?0:te,U?te+1:q):Gi(t,U?te+1:0,U?q:te)}function Eh(t,f){var M=t;return M instanceof $t&&(M=M.value()),k(f,function(U,q){return q.func.apply(q.thisArg,_([U],q.args))},M)}function Nl(t,f,M){var U=t.length;if(U<2)return U?uo(t[0]):[];for(var q=-1,te=xe(U);++q<U;)for(var ae=t[q],fe=-1;++fe<U;)fe!=q&&(te[q]=Os(te[q]||ae,t[fe],f,M));return uo(Gn(te,1),f,M)}function Rh(t,f,M){for(var U=-1,q=t.length,te=f.length,ae={};++U<q;){var fe=U<te?f[U]:e;M(ae,t[U],fe)}return ae}function Dl(t){return xn(t)?t:[]}function Fl(t){return typeof t=="function"?t:wi}function ho(t,f){return pt(t)?t:Kl(t,f)?[t]:ad(Bt(t))}var Iv=St;function fo(t,f,M){var U=t.length;return M=M===e?U:M,!f&&M>=U?t:Gi(t,f,M)}var Ih=bm||function(t){return Vt.clearTimeout(t)};function Oh(t,f){if(f)return t.slice();var M=t.length,U=th?th(M):new t.constructor(M);return t.copy(U),U}function Pl(t){var f=new t.constructor(t.byteLength);return new ca(f).set(new ca(t)),f}function Ov(t,f){var M=f?Pl(t.buffer):t.buffer;return new t.constructor(M,t.byteOffset,t.byteLength)}function Nv(t){var f=new t.constructor(t.source,Ci.exec(t));return f.lastIndex=t.lastIndex,f}function Dv(t){return Rs?wt(Rs.call(t)):{}}function Nh(t,f){var M=f?Pl(t.buffer):t.buffer;return new t.constructor(M,t.byteOffset,t.length)}function Dh(t,f){if(t!==f){var M=t!==e,U=t===null,q=t===t,te=Ei(t),ae=f!==e,fe=f===null,ve=f===f,Te=Ei(f);if(!fe&&!Te&&!te&&t>f||te&&ae&&ve&&!fe&&!Te||U&&ae&&ve||!M&&ve||!q)return 1;if(!U&&!te&&!Te&&t<f||Te&&M&&q&&!U&&!te||fe&&M&&q||!ae&&q||!ve)return-1}return 0}function Fv(t,f,M){for(var U=-1,q=t.criteria,te=f.criteria,ae=q.length,fe=M.length;++U<ae;){var ve=Dh(q[U],te[U]);if(ve){if(U>=fe)return ve;var Te=M[U];return ve*(Te=="desc"?-1:1)}}return t.index-f.index}function Fh(t,f,M,U){for(var q=-1,te=t.length,ae=M.length,fe=-1,ve=f.length,Te=In(te-ae,0),Ee=xe(ve+Te),Oe=!U;++fe<ve;)Ee[fe]=f[fe];for(;++q<ae;)(Oe||q<te)&&(Ee[M[q]]=t[q]);for(;Te--;)Ee[fe++]=t[q++];return Ee}function Ph(t,f,M,U){for(var q=-1,te=t.length,ae=-1,fe=M.length,ve=-1,Te=f.length,Ee=In(te-fe,0),Oe=xe(Ee+Te),Ue=!U;++q<Ee;)Oe[q]=t[q];for(var Qe=q;++ve<Te;)Oe[Qe+ve]=f[ve];for(;++ae<fe;)(Ue||q<te)&&(Oe[Qe+M[ae]]=t[q++]);return Oe}function mi(t,f){var M=-1,U=t.length;for(f||(f=xe(U));++M<U;)f[M]=t[M];return f}function Sr(t,f,M,U){var q=!M;M||(M={});for(var te=-1,ae=f.length;++te<ae;){var fe=f[te],ve=U?U(M[fe],t[fe],fe,M,t):e;ve===e&&(ve=t[fe]),q?Hr(M,fe,ve):Is(M,fe,ve)}return M}function Pv(t,f){return Sr(t,jl(t),f)}function Bv(t,f){return Sr(t,Qh(t),f)}function Ca(t,f){return function(M,U){var q=pt(M)?Wn:av,te=f?f():{};return q(M,t,rt(U,2),te)}}function rs(t){return St(function(f,M){var U=-1,q=M.length,te=q>1?M[q-1]:e,ae=q>2?M[2]:e;for(te=t.length>3&&typeof te=="function"?(q--,te):e,ae&&ui(M[0],M[1],ae)&&(te=q<3?e:te,q=1),f=wt(f);++U<q;){var fe=M[U];fe&&t(f,fe,U,te)}return f})}function Bh(t,f){return function(M,U){if(M==null)return M;if(!vi(M))return t(M,U);for(var q=M.length,te=f?q:-1,ae=wt(M);(f?te--:++te<q)&&U(ae[te],te,ae)!==!1;);return M}}function Wh(t){return function(f,M,U){for(var q=-1,te=wt(f),ae=U(f),fe=ae.length;fe--;){var ve=ae[t?fe:++q];if(M(te[ve],ve,te)===!1)break}return f}}function Wv(t,f,M){var U=f&h,q=Ps(t);function te(){var ae=this&&this!==Vt&&this instanceof te?q:t;return ae.apply(U?M:this,arguments)}return te}function Hh(t){return function(f){f=Bt(f);var M=oe(f)?ft(f):e,U=M?M[0]:f.charAt(0),q=M?fo(M,1).join(""):f.slice(1);return U[t]()+q}}function os(t){return function(f){return k(Bd(Pd(f).replace(ln,"")),t,"")}}function Ps(t){return function(){var f=arguments;switch(f.length){case 0:return new t;case 1:return new t(f[0]);case 2:return new t(f[0],f[1]);case 3:return new t(f[0],f[1],f[2]);case 4:return new t(f[0],f[1],f[2],f[3]);case 5:return new t(f[0],f[1],f[2],f[3],f[4]);case 6:return new t(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new t(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var M=is(t.prototype),U=t.apply(M,f);return cn(U)?U:M}}function Hv(t,f,M){var U=Ps(t);function q(){for(var te=arguments.length,ae=xe(te),fe=te,ve=ss(q);fe--;)ae[fe]=arguments[fe];var Te=te<3&&ae[0]!==ve&&ae[te-1]!==ve?[]:Fe(ae,ve);if(te-=Te.length,te<M)return Kh(t,f,_a,q.placeholder,e,ae,Te,e,e,M-te);var Ee=this&&this!==Vt&&this instanceof q?U:t;return Bn(Ee,this,ae)}return q}function zh(t){return function(f,M,U){var q=wt(f);if(!vi(f)){var te=rt(M,3);f=Un(f),M=function(fe){return te(q[fe],fe,q)}}var ae=t(f,M,U);return ae>-1?q[te?f[ae]:ae]:e}}function Uh(t){return Ur(function(f){var M=f.length,U=M,q=ji.prototype.thru;for(t&&f.reverse();U--;){var te=f[U];if(typeof te!="function")throw new Kt(v);if(q&&!ae&&Ta(te)=="wrapper")var ae=new ji([],!0)}for(U=ae?U:M;++U<M;){te=f[U];var fe=Ta(te),ve=fe=="wrapper"?Ul(te):e;ve&&Gl(ve[0])&&ve[1]==(E|R|C|D)&&!ve[4].length&&ve[9]==1?ae=ae[Ta(ve[0])].apply(ae,ve[3]):ae=te.length==1&&Gl(te)?ae[fe]():ae.thru(te)}return function(){var Te=arguments,Ee=Te[0];if(ae&&Te.length==1&&pt(Ee))return ae.plant(Ee).value();for(var Oe=0,Ue=M?f[Oe].apply(this,Te):Ee;++Oe<M;)Ue=f[Oe].call(this,Ue);return Ue}})}function _a(t,f,M,U,q,te,ae,fe,ve,Te){var Ee=f&E,Oe=f&h,Ue=f&m,Qe=f&(R|T),st=f&I,bt=Ue?e:Ps(t);function at(){for(var Ct=arguments.length,Lt=xe(Ct),Ri=Ct;Ri--;)Lt[Ri]=arguments[Ri];if(Qe)var hi=ss(at),Ii=Hn(Lt,hi);if(U&&(Lt=Fh(Lt,U,q,Qe)),te&&(Lt=Ph(Lt,te,ae,Qe)),Ct-=Ii,Qe&&Ct<Te){var Sn=Fe(Lt,hi);return Kh(t,f,_a,at.placeholder,M,Lt,Sn,fe,ve,Te-Ct)}var cr=Oe?M:this,Gr=Ue?cr[t]:t;return Ct=Lt.length,fe?Lt=ay(Lt,fe):st&&Ct>1&&Lt.reverse(),Ee&&ve<Ct&&(Lt.length=ve),this&&this!==Vt&&this instanceof at&&(Gr=bt||Ps(Gr)),Gr.apply(cr,Lt)}return at}function Vh(t,f){return function(M,U){return gv(M,t,f(U),{})}}function Aa(t,f){return function(M,U){var q;if(M===e&&U===e)return f;if(M!==e&&(q=M),U!==e){if(q===e)return U;typeof M=="string"||typeof U=="string"?(M=Li(M),U=Li(U)):(M=Th(M),U=Th(U)),q=t(M,U)}return q}}function Bl(t){return Ur(function(f){return f=g(f,tt(rt())),St(function(M){var U=this;return t(f,function(q){return Bn(q,U,M)})})})}function $a(t,f){f=f===e?" ":Li(f);var M=f.length;if(M<2)return M?Rl(f,t):f;var U=Rl(f,fa(t/kt(f)));return oe(f)?fo(ft(U),0,t).join(""):U.slice(0,t)}function zv(t,f,M,U){var q=f&h,te=Ps(t);function ae(){for(var fe=-1,ve=arguments.length,Te=-1,Ee=U.length,Oe=xe(Ee+ve),Ue=this&&this!==Vt&&this instanceof ae?te:t;++Te<Ee;)Oe[Te]=U[Te];for(;ve--;)Oe[Te++]=arguments[++fe];return Bn(Ue,q?M:this,Oe)}return ae}function jh(t){return function(f,M,U){return U&&typeof U!="number"&&ui(f,M,U)&&(M=U=e),f=Kr(f),M===e?(M=f,f=0):M=Kr(M),U=U===e?f<M?1:-1:Kr(U),$v(f,M,U,t)}}function Ma(t){return function(f,M){return typeof f=="string"&&typeof M=="string"||(f=Yi(f),M=Yi(M)),t(f,M)}}function Kh(t,f,M,U,q,te,ae,fe,ve,Te){var Ee=f&R,Oe=Ee?ae:e,Ue=Ee?e:ae,Qe=Ee?te:e,st=Ee?e:te;f|=Ee?C:w,f&=~(Ee?w:C),f&y||(f&=-4);var bt=[t,f,q,Qe,Oe,st,Ue,fe,ve,Te],at=M.apply(e,bt);return Gl(t)&&rd(at,bt),at.placeholder=U,od(at,t,f)}function Wl(t){var f=Et[t];return function(M,U){if(M=Yi(M),U=U==null?0:ei(vt(U),292),U&&oh(M)){var q=(Bt(M)+"e").split("e"),te=f(q[0]+"e"+(+q[1]+U));return q=(Bt(te)+"e").split("e"),+(q[0]+"e"+(+q[1]-U))}return f(M)}}var Uv=ts&&1/He(new ts([,-0]))[1]==W?function(t){return new ts(t)}:lc;function Gh(t){return function(f){var M=ti(f);return M==Je?$e(f):M==Cn?je(f):Ke(f,t(f))}}function zr(t,f,M,U,q,te,ae,fe){var ve=f&m;if(!ve&&typeof t!="function")throw new Kt(v);var Te=U?U.length:0;if(Te||(f&=-97,U=q=e),ae=ae===e?ae:In(vt(ae),0),fe=fe===e?fe:vt(fe),Te-=q?q.length:0,f&w){var Ee=U,Oe=q;U=q=e}var Ue=ve?e:Ul(t),Qe=[t,f,M,U,q,Ee,Oe,te,ae,fe];if(Ue&&ry(Qe,Ue),t=Qe[0],f=Qe[1],M=Qe[2],U=Qe[3],q=Qe[4],fe=Qe[9]=Qe[9]===e?ve?0:t.length:In(Qe[9]-Te,0),!fe&&f&(R|T)&&(f&=-25),!f||f==h)var st=Wv(t,f,M);else f==R||f==T?st=Hv(t,f,fe):(f==C||f==(h|C))&&!q.length?st=zv(t,f,M,U):st=_a.apply(e,Qe);var bt=Ue?$h:rd;return od(bt(st,Qe),t,f)}function qh(t,f,M,U){return t===e||lr(t,gn[M])&&!Ut.call(U,M)?f:t}function Yh(t,f,M,U,q,te){return cn(t)&&cn(f)&&(te.set(f,t),xa(t,f,e,Yh,te),te.delete(f)),t}function Vv(t){return Hs(t)?e:t}function Zh(t,f,M,U,q,te){var ae=M&n,fe=t.length,ve=f.length;if(fe!=ve&&!(ae&&ve>fe))return!1;var Te=te.get(t),Ee=te.get(f);if(Te&&Ee)return Te==f&&Ee==t;var Oe=-1,Ue=!0,Qe=M&i?new Lo:e;for(te.set(t,f),te.set(f,t);++Oe<fe;){var st=t[Oe],bt=f[Oe];if(U)var at=ae?U(bt,st,Oe,f,t,te):U(st,bt,Oe,t,f,te);if(at!==e){if(at)continue;Ue=!1;break}if(Qe){if(!B(f,function(Ct,Lt){if(!xt(Qe,Lt)&&(st===Ct||q(st,Ct,M,U,te)))return Qe.push(Lt)})){Ue=!1;break}}else if(!(st===bt||q(st,bt,M,U,te))){Ue=!1;break}}return te.delete(t),te.delete(f),Ue}function jv(t,f,M,U,q,te,ae){switch(M){case _n:if(t.byteLength!=f.byteLength||t.byteOffset!=f.byteOffset)return!1;t=t.buffer,f=f.buffer;case Gt:return!(t.byteLength!=f.byteLength||!te(new ca(t),new ca(f)));case _e:case Ae:case lt:return lr(+t,+f);case qe:return t.name==f.name&&t.message==f.message;case on:case Fn:return t==f+"";case Je:var fe=$e;case Cn:var ve=U&n;if(fe||(fe=He),t.size!=f.size&&!ve)return!1;var Te=ae.get(t);if(Te)return Te==f;U|=i,ae.set(t,f);var Ee=Zh(fe(t),fe(f),U,q,te,ae);return ae.delete(t),Ee;case ri:if(Rs)return Rs.call(t)==Rs.call(f)}return!1}function Kv(t,f,M,U,q,te){var ae=M&n,fe=Hl(t),ve=fe.length,Te=Hl(f),Ee=Te.length;if(ve!=Ee&&!ae)return!1;for(var Oe=ve;Oe--;){var Ue=fe[Oe];if(!(ae?Ue in f:Ut.call(f,Ue)))return!1}var Qe=te.get(t),st=te.get(f);if(Qe&&st)return Qe==f&&st==t;var bt=!0;te.set(t,f),te.set(f,t);for(var at=ae;++Oe<ve;){Ue=fe[Oe];var Ct=t[Ue],Lt=f[Ue];if(U)var Ri=ae?U(Lt,Ct,Ue,f,t,te):U(Ct,Lt,Ue,t,f,te);if(!(Ri===e?Ct===Lt||q(Ct,Lt,M,U,te):Ri)){bt=!1;break}at||(at=Ue=="constructor")}if(bt&&!at){var hi=t.constructor,Ii=f.constructor;hi!=Ii&&"constructor"in t&&"constructor"in f&&!(typeof hi=="function"&&hi instanceof hi&&typeof Ii=="function"&&Ii instanceof Ii)&&(bt=!1)}return te.delete(t),te.delete(f),bt}function Ur(t){return Yl(nd(t,e,hd),t+"")}function Hl(t){return mh(t,Un,jl)}function zl(t){return mh(t,yi,Qh)}var Ul=ga?function(t){return ga.get(t)}:lc;function Ta(t){for(var f=t.name+"",M=ns[f],U=Ut.call(ns,f)?M.length:0;U--;){var q=M[U],te=q.func;if(te==null||te==t)return q.name}return f}function ss(t){var f=Ut.call(X,"placeholder")?X:t;return f.placeholder}function rt(){var t=X.iteratee||sc;return t=t===sc?wh:t,arguments.length?t(arguments[0],arguments[1]):t}function La(t,f){var M=t.__data__;return ey(f)?M[typeof f=="string"?"string":"hash"]:M.map}function Vl(t){for(var f=Un(t),M=f.length;M--;){var U=f[M],q=t[U];f[M]=[U,q,ed(q)]}return f}function Io(t,f){var M=re(t,f);return yh(M)?M:e}function Gv(t){var f=Ut.call(t,Mo),M=t[Mo];try{t[Mo]=e;var U=!0}catch{}var q=aa.call(t);return U&&(f?t[Mo]=M:delete t[Mo]),q}var jl=yl?function(t){return t==null?[]:(t=wt(t),Xn(yl(t),function(f){return ih.call(t,f)}))}:cc,Qh=yl?function(t){for(var f=[];t;)_(f,jl(t)),t=ua(t);return f}:cc,ti=ci;(wl&&ti(new wl(new ArrayBuffer(1)))!=_n||Ts&&ti(new Ts)!=Je||bl&&ti(bl.resolve())!=Pt||ts&&ti(new ts)!=Cn||Ls&&ti(new Ls)!=ze)&&(ti=function(t){var f=ci(t),M=f==vn?t.constructor:e,U=M?Oo(M):"";if(U)switch(U){case Tm:return _n;case Lm:return Je;case Em:return Pt;case Rm:return Cn;case Im:return ze}return f});function qv(t,f,M){for(var U=-1,q=M.length;++U<q;){var te=M[U],ae=te.size;switch(te.type){case"drop":t+=ae;break;case"dropRight":f-=ae;break;case"take":f=ei(f,t+ae);break;case"takeRight":t=In(t,f-ae);break}}return{start:t,end:f}}function Yv(t){var f=t.match(ir);return f?f[1].split(wo):[]}function Jh(t,f,M){f=ho(f,t);for(var U=-1,q=f.length,te=!1;++U<q;){var ae=kr(f[U]);if(!(te=t!=null&&M(t,ae)))break;t=t[ae]}return te||++U!=q?te:(q=t==null?0:t.length,!!q&&Fa(q)&&Vr(ae,q)&&(pt(t)||No(t)))}function Zv(t){var f=t.length,M=new t.constructor(f);return f&&typeof t[0]=="string"&&Ut.call(t,"index")&&(M.index=t.index,M.input=t.input),M}function Xh(t){return typeof t.constructor=="function"&&!Bs(t)?is(ua(t)):{}}function Qv(t,f,M){var U=t.constructor;switch(f){case Gt:return Pl(t);case _e:case Ae:return new U(+t);case _n:return Ov(t,M);case oi:case qn:case sn:case Tn:case Pn:case zt:case Ln:case $r:case Ji:return Nh(t,M);case Je:return new U;case lt:case Fn:return new U(t);case on:return Nv(t);case Cn:return new U;case ri:return Dv(t)}}function Jv(t,f){var M=f.length;if(!M)return t;var U=M-1;return f[U]=(M>1?"& ":"")+f[U],f=f.join(M>2?", ":" "),t.replace(gr,`{
|
|
1472
1472
|
/* [wrapped with `+f+`] */
|
|
1473
|
-
`)}function Xv(t){return pt(t)||No(t)||!!(rh&&t&&t[rh])}function Vr(t,f){var M=typeof t;return f=f??V,!!f&&(M=="number"||M!="symbol"&&Qt.test(t))&&t>-1&&t%1==0&&t<f}function ui(t,f,M){if(!cn(M))return!1;var U=typeof f;return(U=="number"?vi(M)&&Vr(f,M.length):U=="string"&&f in M)?lr(M[f],t):!1}function Kl(t,f){if(pt(t))return!1;var M=typeof t;return M=="number"||M=="symbol"||M=="boolean"||t==null||Ei(t)?!0:tr.test(t)||!Go.test(t)||f!=null&&t in wt(f)}function ey(t){var f=typeof t;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?t!=="__proto__":t===null}function Gl(t){var f=Ta(t),M=X[f];if(typeof M!="function"||!(f in $t.prototype))return!1;if(t===M)return!0;var U=Ul(M);return!!U&&t===U[0]}function ty(t){return!!eh&&eh in t}var ny=$o?jr:uc;function Ws(t){var f=t&&t.constructor,M=typeof f=="function"&&f.prototype||gn;return t===M}function ed(t){return t===t&&!cn(t)}function td(t,f){return function(M){return M==null?!1:M[t]===f&&(f!==e||t in wt(M))}}function iy(t){var f=Na(t,function(U){return M.size===d&&M.clear(),U}),M=f.cache;return f}function ry(t,f){var M=t[1],U=f[1],q=M|U,te=q<(h|m|E),ae=U==E&&M==R||U==E&&M==D&&t[7].length<=f[8]||U==(E|D)&&f[7].length<=f[8]&&M==R;if(!(te||ae))return t;U&h&&(t[2]=f[2],q|=M&h?0:y);var fe=f[3];if(fe){var ve=t[3];t[3]=ve?Fh(ve,fe,f[4]):fe,t[4]=ve?Fe(t[3],o):f[4]}return fe=f[5],fe&&(ve=t[5],t[5]=ve?Ph(ve,fe,f[6]):fe,t[6]=ve?Fe(t[5],o):f[6]),fe=f[7],fe&&(t[7]=fe),U&E&&(t[8]=t[8]==null?f[8]:ei(t[8],f[8])),t[9]==null&&(t[9]=f[9]),t[0]=f[0],t[1]=q,t}function oy(t){var f=[];if(t!=null)for(var M in wt(t))f.push(M);return f}function sy(t){return aa.call(t)}function nd(t,f,M){return f=In(f===e?t.length-1:f,0),function(){for(var U=arguments,q=-1,te=In(U.length-f,0),ae=xe(te);++q<te;)ae[q]=U[f+q];q=-1;for(var fe=xe(f+1);++q<f;)fe[q]=U[q];return fe[f]=M(ae),Wn(t,this,fe)}}function id(t,f){return f.length<2?t:Ro(t,Gi(f,0,-1))}function ay(t,f){for(var M=t.length,U=ei(f.length,M),q=mi(t);U--;){var te=f[U];t[U]=Vr(te,M)?q[te]:e}return t}function ql(t,f){if(!(f==="constructor"&&typeof t[f]=="function")&&f!="__proto__")return t[f]}var rd=sd($h),Bs=Sm||function(t,f){return Vt.setTimeout(t,f)},Yl=sd(Lv);function od(t,f,M){var U=f+"";return Yl(t,Jv(U,ly(Yv(U),M)))}function sd(t){var f=0,M=0;return function(){var U=Am(),q=O-(U-M);if(M=U,q>0){if(++f>=F)return arguments[0]}else f=0;return t.apply(e,arguments)}}function Ea(t,f){var M=-1,U=t.length,q=U-1;for(f=f===e?U:f;++M<f;){var te=El(M,q),ae=t[te];t[te]=t[M],t[M]=ae}return t.length=f,t}var ad=iy(function(t){var f=[];return t.charCodeAt(0)===46&&f.push(""),t.replace(yn,function(M,U,q,te){f.push(q?te.replace(As,"$1"):U||M)}),f});function kr(t){if(typeof t=="string"||Ei(t))return t;var f=t+"";return f=="0"&&1/t==-B?"-0":f}function Oo(t){if(t!=null){try{return sa.call(t)}catch{}try{return t+""}catch{}}return""}function ly(t,f){return jn(he,function(M){var U="_."+M[0];f&M[1]&&!Mi(t,U)&&t.push(U)}),t.sort()}function ld(t){if(t instanceof $t)return t.clone();var f=new ji(t.__wrapped__,t.__chain__);return f.__actions__=mi(t.__actions__),f.__index__=t.__index__,f.__values__=t.__values__,f}function cy(t,f,M){(M?ui(t,f,M):f===e)?f=1:f=In(vt(f),0);var U=t==null?0:t.length;if(!U||f<1)return[];for(var q=0,te=0,ae=xe(fa(U/f));q<U;)ae[te++]=Gi(t,q,q+=f);return ae}function uy(t){for(var f=-1,M=t==null?0:t.length,U=0,q=[];++f<M;){var te=t[f];te&&(q[U++]=te)}return q}function hy(){var t=arguments.length;if(!t)return[];for(var f=xe(t-1),M=arguments[0],U=t;U--;)f[U-1]=arguments[U];return _(pt(M)?mi(M):[M],Gn(f,1))}var dy=St(function(t,f){return xn(t)?Os(t,Gn(f,1,xn,!0)):[]}),fy=St(function(t,f){var M=qi(f);return xn(M)&&(M=e),xn(t)?Os(t,Gn(f,1,xn,!0),rt(M,2)):[]}),py=St(function(t,f){var M=qi(f);return xn(M)&&(M=e),xn(t)?Os(t,Gn(f,1,xn,!0),e,M):[]});function gy(t,f,M){var U=t==null?0:t.length;return U?(f=M||f===e?1:vt(f),Gi(t,f<0?0:f,U)):[]}function my(t,f,M){var U=t==null?0:t.length;return U?(f=M||f===e?1:vt(f),f=U-f,Gi(t,0,f<0?0:f)):[]}function vy(t,f){return t&&t.length?ka(t,rt(f,3),!0,!0):[]}function yy(t,f){return t&&t.length?ka(t,rt(f,3),!0):[]}function wy(t,f,M,U){var q=t==null?0:t.length;return q?(M&&typeof M!="number"&&ui(t,f,M)&&(M=0,U=q),hv(t,f,M,U)):[]}function cd(t,f,M){var U=t==null?0:t.length;if(!U)return-1;var q=M==null?0:vt(M);return q<0&&(q=In(U+q,0)),ie(t,rt(f,3),q)}function ud(t,f,M){var U=t==null?0:t.length;if(!U)return-1;var q=U-1;return M!==e&&(q=vt(M),q=M<0?In(U+q,0):ei(q,U-1)),ie(t,rt(f,3),q,!0)}function hd(t){var f=t==null?0:t.length;return f?Gn(t,1):[]}function by(t){var f=t==null?0:t.length;return f?Gn(t,B):[]}function xy(t,f){var M=t==null?0:t.length;return M?(f=f===e?1:vt(f),Gn(t,f)):[]}function Sy(t){for(var f=-1,M=t==null?0:t.length,U={};++f<M;){var q=t[f];U[q[0]]=q[1]}return U}function dd(t){return t&&t.length?t[0]:e}function ky(t,f,M){var U=t==null?0:t.length;if(!U)return-1;var q=M==null?0:vt(M);return q<0&&(q=In(U+q,0)),se(t,f,q)}function Cy(t){var f=t==null?0:t.length;return f?Gi(t,0,-1):[]}var _y=St(function(t){var f=g(t,Dl);return f.length&&f[0]===t[0]?Al(f):[]}),Ay=St(function(t){var f=qi(t),M=g(t,Dl);return f===qi(M)?f=e:M.pop(),M.length&&M[0]===t[0]?Al(M,rt(f,2)):[]}),$y=St(function(t){var f=qi(t),M=g(t,Dl);return f=typeof f=="function"?f:e,f&&M.pop(),M.length&&M[0]===t[0]?Al(M,e,f):[]});function My(t,f){return t==null?"":Cm.call(t,f)}function qi(t){var f=t==null?0:t.length;return f?t[f-1]:e}function Ty(t,f,M){var U=t==null?0:t.length;if(!U)return-1;var q=U;return M!==e&&(q=vt(M),q=q<0?In(U+q,0):ei(q,U-1)),f===f?ht(t,f,q):ie(t,Se,q,!0)}function Ly(t,f){return t&&t.length?kh(t,vt(f)):e}var Ey=St(fd);function fd(t,f){return t&&t.length&&f&&f.length?Ll(t,f):t}function Ry(t,f,M){return t&&t.length&&f&&f.length?Ll(t,f,rt(M,2)):t}function Iy(t,f,M){return t&&t.length&&f&&f.length?Ll(t,f,e,M):t}var Oy=Ur(function(t,f){var M=t==null?0:t.length,U=Sl(t,f);return Ah(t,g(f,function(q){return Vr(q,M)?+q:q}).sort(Dh)),U});function Ny(t,f){var M=[];if(!(t&&t.length))return M;var U=-1,q=[],te=t.length;for(f=rt(f,3);++U<te;){var ae=t[U];f(ae,U,t)&&(M.push(ae),q.push(U))}return Ah(t,q),M}function Zl(t){return t==null?t:Mm.call(t)}function Dy(t,f,M){var U=t==null?0:t.length;return U?(M&&typeof M!="number"&&ui(t,f,M)?(f=0,M=U):(f=f==null?0:vt(f),M=M===e?U:vt(M)),Gi(t,f,M)):[]}function Fy(t,f){return Sa(t,f)}function Py(t,f,M){return Il(t,f,rt(M,2))}function Wy(t,f){var M=t==null?0:t.length;if(M){var U=Sa(t,f);if(U<M&&lr(t[U],f))return U}return-1}function By(t,f){return Sa(t,f,!0)}function Hy(t,f,M){return Il(t,f,rt(M,2),!0)}function zy(t,f){var M=t==null?0:t.length;if(M){var U=Sa(t,f,!0)-1;if(lr(t[U],f))return U}return-1}function Uy(t){return t&&t.length?Mh(t):[]}function Vy(t,f){return t&&t.length?Mh(t,rt(f,2)):[]}function jy(t){var f=t==null?0:t.length;return f?Gi(t,1,f):[]}function Ky(t,f,M){return t&&t.length?(f=M||f===e?1:vt(f),Gi(t,0,f<0?0:f)):[]}function Gy(t,f,M){var U=t==null?0:t.length;return U?(f=M||f===e?1:vt(f),f=U-f,Gi(t,f<0?0:f,U)):[]}function qy(t,f){return t&&t.length?ka(t,rt(f,3),!1,!0):[]}function Yy(t,f){return t&&t.length?ka(t,rt(f,3)):[]}var Zy=St(function(t){return uo(Gn(t,1,xn,!0))}),Qy=St(function(t){var f=qi(t);return xn(f)&&(f=e),uo(Gn(t,1,xn,!0),rt(f,2))}),Jy=St(function(t){var f=qi(t);return f=typeof f=="function"?f:e,uo(Gn(t,1,xn,!0),e,f)});function Xy(t){return t&&t.length?uo(t):[]}function ew(t,f){return t&&t.length?uo(t,rt(f,2)):[]}function tw(t,f){return f=typeof f=="function"?f:e,t&&t.length?uo(t,e,f):[]}function Ql(t){if(!(t&&t.length))return[];var f=0;return t=Xn(t,function(M){if(xn(M))return f=In(M.length,f),!0}),Ze(f,function(M){return g(t,we(M))})}function pd(t,f){if(!(t&&t.length))return[];var M=Ql(t);return f==null?M:g(M,function(U){return Wn(f,e,U)})}var nw=St(function(t,f){return xn(t)?Os(t,f):[]}),iw=St(function(t){return Nl(Xn(t,xn))}),rw=St(function(t){var f=qi(t);return xn(f)&&(f=e),Nl(Xn(t,xn),rt(f,2))}),ow=St(function(t){var f=qi(t);return f=typeof f=="function"?f:e,Nl(Xn(t,xn),e,f)}),sw=St(Ql);function aw(t,f){return Rh(t||[],f||[],Is)}function lw(t,f){return Rh(t||[],f||[],Fs)}var cw=St(function(t){var f=t.length,M=f>1?t[f-1]:e;return M=typeof M=="function"?(t.pop(),M):e,pd(t,M)});function gd(t){var f=X(t);return f.__chain__=!0,f}function uw(t,f){return f(t),t}function Ra(t,f){return f(t)}var hw=Ur(function(t){var f=t.length,M=f?t[0]:0,U=this.__wrapped__,q=function(te){return Sl(te,t)};return f>1||this.__actions__.length||!(U instanceof $t)||!Vr(M)?this.thru(q):(U=U.slice(M,+M+(f?1:0)),U.__actions__.push({func:Ra,args:[q],thisArg:e}),new ji(U,this.__chain__).thru(function(te){return f&&!te.length&&te.push(e),te}))});function dw(){return gd(this)}function fw(){return new ji(this.value(),this.__chain__)}function pw(){this.__values__===e&&(this.__values__=Td(this.value()));var t=this.__index__>=this.__values__.length,f=t?e:this.__values__[this.__index__++];return{done:t,value:f}}function gw(){return this}function mw(t){for(var f,M=this;M instanceof va;){var U=ld(M);U.__index__=0,U.__values__=e,f?q.__wrapped__=U:f=U;var q=U;M=M.__wrapped__}return q.__wrapped__=t,f}function vw(){var t=this.__wrapped__;if(t instanceof $t){var f=t;return this.__actions__.length&&(f=new $t(this)),f=f.reverse(),f.__actions__.push({func:Ra,args:[Zl],thisArg:e}),new ji(f,this.__chain__)}return this.thru(Zl)}function yw(){return Eh(this.__wrapped__,this.__actions__)}var ww=Ca(function(t,f,M){Ut.call(t,M)?++t[M]:Hr(t,M,1)});function bw(t,f,M){var U=pt(t)?Kn:uv;return M&&ui(t,f,M)&&(f=e),U(t,rt(f,3))}function xw(t,f){var M=pt(t)?Xn:ph;return M(t,rt(f,3))}var Sw=zh(cd),kw=zh(ud);function Cw(t,f){return Gn(Ia(t,f),1)}function _w(t,f){return Gn(Ia(t,f),B)}function Aw(t,f,M){return M=M===e?1:vt(M),Gn(Ia(t,f),M)}function md(t,f){var M=pt(t)?jn:co;return M(t,rt(f,3))}function vd(t,f){var M=pt(t)?Ao:fh;return M(t,rt(f,3))}var $w=Ca(function(t,f,M){Ut.call(t,M)?t[M].push(f):Hr(t,M,[f])});function Mw(t,f,M,U){t=vi(t)?t:ls(t),M=M&&!U?vt(M):0;var q=t.length;return M<0&&(M=In(q+M,0)),Pa(t)?M<=q&&t.indexOf(f,M)>-1:!!q&&se(t,f,M)>-1}var Tw=St(function(t,f,M){var U=-1,q=typeof f=="function",te=vi(t)?xe(t.length):[];return co(t,function(ae){te[++U]=q?Wn(f,ae,M):Ns(ae,f,M)}),te}),Lw=Ca(function(t,f,M){Hr(t,M,f)});function Ia(t,f){var M=pt(t)?g:bh;return M(t,rt(f,3))}function Ew(t,f,M,U){return t==null?[]:(pt(f)||(f=f==null?[]:[f]),M=U?e:M,pt(M)||(M=M==null?[]:[M]),Ch(t,f,M))}var Rw=Ca(function(t,f,M){t[M?0:1].push(f)},function(){return[[],[]]});function Iw(t,f,M){var U=pt(t)?k:Le,q=arguments.length<3;return U(t,rt(f,4),M,q,co)}function Ow(t,f,M){var U=pt(t)?P:Le,q=arguments.length<3;return U(t,rt(f,4),M,q,fh)}function Nw(t,f){var M=pt(t)?Xn:ph;return M(t,Da(rt(f,3)))}function Dw(t){var f=pt(t)?ch:Mv;return f(t)}function Fw(t,f,M){(M?ui(t,f,M):f===e)?f=1:f=vt(f);var U=pt(t)?ov:Tv;return U(t,f)}function Pw(t){var f=pt(t)?sv:Ev;return f(t)}function Ww(t){if(t==null)return 0;if(vi(t))return Pa(t)?kt(t):t.length;var f=ti(t);return f==Je||f==Cn?t.size:Ml(t).length}function Bw(t,f,M){var U=pt(t)?W:Rv;return M&&ui(t,f,M)&&(f=e),U(t,rt(f,3))}var Hw=St(function(t,f){if(t==null)return[];var M=f.length;return M>1&&ui(t,f[0],f[1])?f=[]:M>2&&ui(f[0],f[1],f[2])&&(f=[f[0]]),Ch(t,Gn(f,1),[])}),Oa=xm||function(){return Vt.Date.now()};function zw(t,f){if(typeof f!="function")throw new Kt(v);return t=vt(t),function(){if(--t<1)return f.apply(this,arguments)}}function yd(t,f,M){return f=M?e:f,f=t&&f==null?t.length:f,zr(t,E,e,e,e,e,f)}function wd(t,f){var M;if(typeof f!="function")throw new Kt(v);return t=vt(t),function(){return--t>0&&(M=f.apply(this,arguments)),t<=1&&(f=e),M}}var Jl=St(function(t,f,M){var U=h;if(M.length){var q=Fe(M,ss(Jl));U|=C}return zr(t,U,f,M,q)}),bd=St(function(t,f,M){var U=h|m;if(M.length){var q=Fe(M,ss(bd));U|=C}return zr(f,U,t,M,q)});function xd(t,f,M){f=M?e:f;var U=zr(t,R,e,e,e,e,e,f);return U.placeholder=xd.placeholder,U}function Sd(t,f,M){f=M?e:f;var U=zr(t,T,e,e,e,e,e,f);return U.placeholder=Sd.placeholder,U}function kd(t,f,M){var U,q,te,ae,fe,ve,Te=0,Ee=!1,Oe=!1,Ue=!0;if(typeof t!="function")throw new Kt(v);f=Yi(f)||0,cn(M)&&(Ee=!!M.leading,Oe="maxWait"in M,te=Oe?In(Yi(M.maxWait)||0,f):te,Ue="trailing"in M?!!M.trailing:Ue);function Qe(Sn){var cr=U,Gr=q;return U=q=e,Te=Sn,ae=t.apply(Gr,cr),ae}function st(Sn){return Te=Sn,fe=Bs(Ct,f),Ee?Qe(Sn):ae}function bt(Sn){var cr=Sn-ve,Gr=Sn-Te,zd=f-cr;return Oe?ei(zd,te-Gr):zd}function at(Sn){var cr=Sn-ve,Gr=Sn-Te;return ve===e||cr>=f||cr<0||Oe&&Gr>=te}function Ct(){var Sn=Oa();if(at(Sn))return Lt(Sn);fe=Bs(Ct,bt(Sn))}function Lt(Sn){return fe=e,Ue&&U?Qe(Sn):(U=q=e,ae)}function Ri(){fe!==e&&Ih(fe),Te=0,U=ve=q=fe=e}function hi(){return fe===e?ae:Lt(Oa())}function Ii(){var Sn=Oa(),cr=at(Sn);if(U=arguments,q=this,ve=Sn,cr){if(fe===e)return st(ve);if(Oe)return Ih(fe),fe=Bs(Ct,f),Qe(ve)}return fe===e&&(fe=Bs(Ct,f)),ae}return Ii.cancel=Ri,Ii.flush=hi,Ii}var Uw=St(function(t,f){return dh(t,1,f)}),Vw=St(function(t,f,M){return dh(t,Yi(f)||0,M)});function jw(t){return zr(t,I)}function Na(t,f){if(typeof t!="function"||f!=null&&typeof f!="function")throw new Kt(v);var M=function(){var U=arguments,q=f?f.apply(this,U):U[0],te=M.cache;if(te.has(q))return te.get(q);var ae=t.apply(this,U);return M.cache=te.set(q,ae)||te,ae};return M.cache=new(Na.Cache||Br),M}Na.Cache=Br;function Da(t){if(typeof t!="function")throw new Kt(v);return function(){var f=arguments;switch(f.length){case 0:return!t.call(this);case 1:return!t.call(this,f[0]);case 2:return!t.call(this,f[0],f[1]);case 3:return!t.call(this,f[0],f[1],f[2])}return!t.apply(this,f)}}function Kw(t){return wd(2,t)}var Gw=Iv(function(t,f){f=f.length==1&&pt(f[0])?g(f[0],tt(rt())):g(Gn(f,1),tt(rt()));var M=f.length;return St(function(U){for(var q=-1,te=ei(U.length,M);++q<te;)U[q]=f[q].call(this,U[q]);return Wn(t,this,U)})}),Xl=St(function(t,f){var M=Fe(f,ss(Xl));return zr(t,C,e,f,M)}),Cd=St(function(t,f){var M=Fe(f,ss(Cd));return zr(t,w,e,f,M)}),qw=Ur(function(t,f){return zr(t,D,e,e,e,f)});function Yw(t,f){if(typeof t!="function")throw new Kt(v);return f=f===e?f:vt(f),St(t,f)}function Zw(t,f){if(typeof t!="function")throw new Kt(v);return f=f==null?0:In(vt(f),0),St(function(M){var U=M[f],q=fo(M,0,f);return U&&_(q,U),Wn(t,this,q)})}function Qw(t,f,M){var U=!0,q=!0;if(typeof t!="function")throw new Kt(v);return cn(M)&&(U="leading"in M?!!M.leading:U,q="trailing"in M?!!M.trailing:q),kd(t,f,{leading:U,maxWait:f,trailing:q})}function Jw(t){return yd(t,1)}function Xw(t,f){return Xl(Fl(f),t)}function eb(){if(!arguments.length)return[];var t=arguments[0];return pt(t)?t:[t]}function tb(t){return Ki(t,r)}function nb(t,f){return f=typeof f=="function"?f:e,Ki(t,r,f)}function ib(t){return Ki(t,a|r)}function rb(t,f){return f=typeof f=="function"?f:e,Ki(t,a|r,f)}function ob(t,f){return f==null||hh(t,f,Un(f))}function lr(t,f){return t===f||t!==t&&f!==f}var sb=Ma(_l),ab=Ma(function(t,f){return t>=f}),No=vh(function(){return arguments}())?vh:function(t){return mn(t)&&Ut.call(t,"callee")&&!ih.call(t,"callee")},pt=xe.isArray,lb=gi?tt(gi):mv;function vi(t){return t!=null&&Fa(t.length)&&!jr(t)}function xn(t){return mn(t)&&vi(t)}function cb(t){return t===!0||t===!1||mn(t)&&ci(t)==_e}var po=km||uc,ub=ao?tt(ao):vv;function hb(t){return mn(t)&&t.nodeType===1&&!Hs(t)}function db(t){if(t==null)return!0;if(vi(t)&&(pt(t)||typeof t=="string"||typeof t.splice=="function"||po(t)||as(t)||No(t)))return!t.length;var f=ti(t);if(f==Je||f==Cn)return!t.size;if(Ws(t))return!Ml(t).length;for(var M in t)if(Ut.call(t,M))return!1;return!0}function fb(t,f){return Ds(t,f)}function pb(t,f,M){M=typeof M=="function"?M:e;var U=M?M(t,f):e;return U===e?Ds(t,f,e,M):!!U}function ec(t){if(!mn(t))return!1;var f=ci(t);return f==qe||f==Me||typeof t.message=="string"&&typeof t.name=="string"&&!Hs(t)}function gb(t){return typeof t=="number"&&oh(t)}function jr(t){if(!cn(t))return!1;var f=ci(t);return f==Ve||f==ot||f==me||f==Si}function _d(t){return typeof t=="number"&&t==vt(t)}function Fa(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=V}function cn(t){var f=typeof t;return t!=null&&(f=="object"||f=="function")}function mn(t){return t!=null&&typeof t=="object"}var Ad=fn?tt(fn):wv;function mb(t,f){return t===f||$l(t,f,Vl(f))}function vb(t,f,M){return M=typeof M=="function"?M:e,$l(t,f,Vl(f),M)}function yb(t){return $d(t)&&t!=+t}function wb(t){if(ny(t))throw new nt(b);return yh(t)}function bb(t){return t===null}function xb(t){return t==null}function $d(t){return typeof t=="number"||mn(t)&&ci(t)==lt}function Hs(t){if(!mn(t)||ci(t)!=vn)return!1;var f=ua(t);if(f===null)return!0;var M=Ut.call(f,"constructor")&&f.constructor;return typeof M=="function"&&M instanceof M&&sa.call(M)==vm}var tc=Ai?tt(Ai):bv;function Sb(t){return _d(t)&&t>=-V&&t<=V}var Md=$i?tt($i):xv;function Pa(t){return typeof t=="string"||!pt(t)&&mn(t)&&ci(t)==Fn}function Ei(t){return typeof t=="symbol"||mn(t)&&ci(t)==ri}var as=Ui?tt(Ui):Sv;function kb(t){return t===e}function Cb(t){return mn(t)&&ti(t)==ze}function _b(t){return mn(t)&&ci(t)==Ot}var Ab=Ma(Tl),$b=Ma(function(t,f){return t<=f});function Td(t){if(!t)return[];if(vi(t))return Pa(t)?ft(t):mi(t);if(Ms&&t[Ms])return be(t[Ms]());var f=ti(t),M=f==Je?$e:f==Cn?He:ls;return M(t)}function Kr(t){if(!t)return t===0?t:0;if(t=Yi(t),t===B||t===-B){var f=t<0?-1:1;return f*G}return t===t?t:0}function vt(t){var f=Kr(t),M=f%1;return f===f?M?f-M:f:0}function Ld(t){return t?Eo(vt(t),0,ee):0}function Yi(t){if(typeof t=="number")return t;if(Ei(t))return Z;if(cn(t)){var f=typeof t.valueOf=="function"?t.valueOf():t;t=cn(f)?f+"":f}if(typeof t!="string")return t===0?t:+t;t=jt(t);var M=Yo.test(t);return M||wn.test(t)?Jt(t.slice(2),M?2:8):_t.test(t)?Z:+t}function Ed(t){return Sr(t,yi(t))}function Mb(t){return t?Eo(vt(t),-V,V):t===0?t:0}function Wt(t){return t==null?"":Li(t)}var Tb=rs(function(t,f){if(Ws(f)||vi(f)){Sr(f,Un(f),t);return}for(var M in f)Ut.call(f,M)&&Is(t,M,f[M])}),Rd=rs(function(t,f){Sr(f,yi(f),t)}),Wa=rs(function(t,f,M,U){Sr(f,yi(f),t,U)}),Lb=rs(function(t,f,M,U){Sr(f,Un(f),t,U)}),Eb=Ur(Sl);function Rb(t,f){var M=is(t);return f==null?M:uh(M,f)}var Ib=St(function(t,f){t=wt(t);var M=-1,U=f.length,q=U>2?f[2]:e;for(q&&ui(f[0],f[1],q)&&(U=1);++M<U;)for(var te=f[M],ae=yi(te),fe=-1,ve=ae.length;++fe<ve;){var Te=ae[fe],Ee=t[Te];(Ee===e||lr(Ee,gn[Te])&&!Ut.call(t,Te))&&(t[Te]=te[Te])}return t}),Ob=St(function(t){return t.push(e,Yh),Wn(Id,e,t)});function Nb(t,f){return J(t,rt(f,3),xr)}function Db(t,f){return J(t,rt(f,3),Cl)}function Fb(t,f){return t==null?t:kl(t,rt(f,3),yi)}function Pb(t,f){return t==null?t:gh(t,rt(f,3),yi)}function Wb(t,f){return t&&xr(t,rt(f,3))}function Bb(t,f){return t&&Cl(t,rt(f,3))}function Hb(t){return t==null?[]:ba(t,Un(t))}function zb(t){return t==null?[]:ba(t,yi(t))}function nc(t,f,M){var U=t==null?e:Ro(t,f);return U===e?M:U}function Ub(t,f){return t!=null&&Jh(t,f,dv)}function ic(t,f){return t!=null&&Jh(t,f,fv)}var Vb=Vh(function(t,f,M){f!=null&&typeof f.toString!="function"&&(f=aa.call(f)),t[f]=M},oc(wi)),jb=Vh(function(t,f,M){f!=null&&typeof f.toString!="function"&&(f=aa.call(f)),Ut.call(t,f)?t[f].push(M):t[f]=[M]},rt),Kb=St(Ns);function Un(t){return vi(t)?lh(t):Ml(t)}function yi(t){return vi(t)?lh(t,!0):kv(t)}function Gb(t,f){var M={};return f=rt(f,3),xr(t,function(U,q,te){Hr(M,f(U,q,te),U)}),M}function qb(t,f){var M={};return f=rt(f,3),xr(t,function(U,q,te){Hr(M,q,f(U,q,te))}),M}var Yb=rs(function(t,f,M){xa(t,f,M)}),Id=rs(function(t,f,M,U){xa(t,f,M,U)}),Zb=Ur(function(t,f){var M={};if(t==null)return M;var U=!1;f=g(f,function(te){return te=ho(te,t),U||(U=te.length>1),te}),Sr(t,zl(t),M),U&&(M=Ki(M,a|s|r,Vv));for(var q=f.length;q--;)Ol(M,f[q]);return M});function Qb(t,f){return Od(t,Da(rt(f)))}var Jb=Ur(function(t,f){return t==null?{}:_v(t,f)});function Od(t,f){if(t==null)return{};var M=g(zl(t),function(U){return[U]});return f=rt(f),_h(t,M,function(U,q){return f(U,q[0])})}function Xb(t,f,M){f=ho(f,t);var U=-1,q=f.length;for(q||(q=1,t=e);++U<q;){var te=t==null?e:t[kr(f[U])];te===e&&(U=q,te=M),t=jr(te)?te.call(t):te}return t}function e0(t,f,M){return t==null?t:Fs(t,f,M)}function t0(t,f,M,U){return U=typeof U=="function"?U:e,t==null?t:Fs(t,f,M,U)}var Nd=Gh(Un),Dd=Gh(yi);function n0(t,f,M){var U=pt(t),q=U||po(t)||as(t);if(f=rt(f,4),M==null){var te=t&&t.constructor;q?M=U?new te:[]:cn(t)?M=jr(te)?is(ua(t)):{}:M={}}return(q?jn:xr)(t,function(ae,fe,ve){return f(M,ae,fe,ve)}),M}function i0(t,f){return t==null?!0:Ol(t,f)}function r0(t,f,M){return t==null?t:Lh(t,f,Fl(M))}function o0(t,f,M,U){return U=typeof U=="function"?U:e,t==null?t:Lh(t,f,Fl(M),U)}function ls(t){return t==null?[]:tn(t,Un(t))}function s0(t){return t==null?[]:tn(t,yi(t))}function a0(t,f,M){return M===e&&(M=f,f=e),M!==e&&(M=Yi(M),M=M===M?M:0),f!==e&&(f=Yi(f),f=f===f?f:0),Eo(Yi(t),f,M)}function l0(t,f,M){return f=Kr(f),M===e?(M=f,f=0):M=Kr(M),t=Yi(t),pv(t,f,M)}function c0(t,f,M){if(M&&typeof M!="boolean"&&ui(t,f,M)&&(f=M=e),M===e&&(typeof f=="boolean"?(M=f,f=e):typeof t=="boolean"&&(M=t,t=e)),t===e&&f===e?(t=0,f=1):(t=Kr(t),f===e?(f=t,t=0):f=Kr(f)),t>f){var U=t;t=f,f=U}if(M||t%1||f%1){var q=sh();return ei(t+q*(f-t+Pe("1e-"+((q+"").length-1))),f)}return El(t,f)}var u0=os(function(t,f,M){return f=f.toLowerCase(),t+(M?Fd(f):f)});function Fd(t){return rc(Wt(t).toLowerCase())}function Pd(t){return t=Wt(t),t&&t.replace(un,nn).replace(Dr,"")}function h0(t,f,M){t=Wt(t),f=Li(f);var U=t.length;M=M===e?U:Eo(vt(M),0,U);var q=M;return M-=f.length,M>=0&&t.slice(M,q)==f}function d0(t){return t=Wt(t),t&&ks.test(t)?t.replace(Tr,j):t}function f0(t){return t=Wt(t),t&&nr.test(t)?t.replace(Yn,"\\$&"):t}var p0=os(function(t,f,M){return t+(M?"-":"")+f.toLowerCase()}),g0=os(function(t,f,M){return t+(M?" ":"")+f.toLowerCase()}),m0=Hh("toLowerCase");function v0(t,f,M){t=Wt(t),f=vt(f);var U=f?kt(t):0;if(!f||U>=f)return t;var q=(f-U)/2;return $a(pa(q),M)+t+$a(fa(q),M)}function y0(t,f,M){t=Wt(t),f=vt(f);var U=f?kt(t):0;return f&&U<f?t+$a(f-U,M):t}function w0(t,f,M){t=Wt(t),f=vt(f);var U=f?kt(t):0;return f&&U<f?$a(f-U,M)+t:t}function b0(t,f,M){return M||f==null?f=0:f&&(f=+f),$m(Wt(t).replace(an,""),f||0)}function x0(t,f,M){return(M?ui(t,f,M):f===e)?f=1:f=vt(f),Rl(Wt(t),f)}function S0(){var t=arguments,f=Wt(t[0]);return t.length<3?f:f.replace(t[1],t[2])}var k0=os(function(t,f,M){return t+(M?"_":"")+f.toLowerCase()});function C0(t,f,M){return M&&typeof M!="number"&&ui(t,f,M)&&(f=M=e),M=M===e?ee:M>>>0,M?(t=Wt(t),t&&(typeof f=="string"||f!=null&&!tc(f))&&(f=Li(f),!f&&oe(t))?fo(ft(t),0,M):t.split(f,M)):[]}var _0=os(function(t,f,M){return t+(M?" ":"")+rc(f)});function A0(t,f,M){return t=Wt(t),M=M==null?0:Eo(vt(M),0,t.length),f=Li(f),t.slice(M,M+f.length)==f}function $0(t,f,M){var U=X.templateSettings;M&&ui(t,f,M)&&(f=e),t=Wt(t),f=Wa({},f,U,qh);var q=Wa({},f.imports,U.imports,qh),te=Un(q),ae=tn(q,te),fe,ve,Te=0,Ee=f.interpolate||Fi,Oe="__p += '",Ue=li((f.escape||Fi).source+"|"+Ee.source+"|"+(Ee===yo?rr:Fi).source+"|"+(f.evaluate||Fi).source+"|$","g"),Qe="//# sourceURL="+(Ut.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++br+"]")+`
|
|
1473
|
+
`)}function Xv(t){return pt(t)||No(t)||!!(rh&&t&&t[rh])}function Vr(t,f){var M=typeof t;return f=f??V,!!f&&(M=="number"||M!="symbol"&&Qt.test(t))&&t>-1&&t%1==0&&t<f}function ui(t,f,M){if(!cn(M))return!1;var U=typeof f;return(U=="number"?vi(M)&&Vr(f,M.length):U=="string"&&f in M)?lr(M[f],t):!1}function Kl(t,f){if(pt(t))return!1;var M=typeof t;return M=="number"||M=="symbol"||M=="boolean"||t==null||Ei(t)?!0:tr.test(t)||!Go.test(t)||f!=null&&t in wt(f)}function ey(t){var f=typeof t;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?t!=="__proto__":t===null}function Gl(t){var f=Ta(t),M=X[f];if(typeof M!="function"||!(f in $t.prototype))return!1;if(t===M)return!0;var U=Ul(M);return!!U&&t===U[0]}function ty(t){return!!eh&&eh in t}var ny=$o?jr:uc;function Bs(t){var f=t&&t.constructor,M=typeof f=="function"&&f.prototype||gn;return t===M}function ed(t){return t===t&&!cn(t)}function td(t,f){return function(M){return M==null?!1:M[t]===f&&(f!==e||t in wt(M))}}function iy(t){var f=Na(t,function(U){return M.size===d&&M.clear(),U}),M=f.cache;return f}function ry(t,f){var M=t[1],U=f[1],q=M|U,te=q<(h|m|E),ae=U==E&&M==R||U==E&&M==D&&t[7].length<=f[8]||U==(E|D)&&f[7].length<=f[8]&&M==R;if(!(te||ae))return t;U&h&&(t[2]=f[2],q|=M&h?0:y);var fe=f[3];if(fe){var ve=t[3];t[3]=ve?Fh(ve,fe,f[4]):fe,t[4]=ve?Fe(t[3],o):f[4]}return fe=f[5],fe&&(ve=t[5],t[5]=ve?Ph(ve,fe,f[6]):fe,t[6]=ve?Fe(t[5],o):f[6]),fe=f[7],fe&&(t[7]=fe),U&E&&(t[8]=t[8]==null?f[8]:ei(t[8],f[8])),t[9]==null&&(t[9]=f[9]),t[0]=f[0],t[1]=q,t}function oy(t){var f=[];if(t!=null)for(var M in wt(t))f.push(M);return f}function sy(t){return aa.call(t)}function nd(t,f,M){return f=In(f===e?t.length-1:f,0),function(){for(var U=arguments,q=-1,te=In(U.length-f,0),ae=xe(te);++q<te;)ae[q]=U[f+q];q=-1;for(var fe=xe(f+1);++q<f;)fe[q]=U[q];return fe[f]=M(ae),Bn(t,this,fe)}}function id(t,f){return f.length<2?t:Ro(t,Gi(f,0,-1))}function ay(t,f){for(var M=t.length,U=ei(f.length,M),q=mi(t);U--;){var te=f[U];t[U]=Vr(te,M)?q[te]:e}return t}function ql(t,f){if(!(f==="constructor"&&typeof t[f]=="function")&&f!="__proto__")return t[f]}var rd=sd($h),Ws=Sm||function(t,f){return Vt.setTimeout(t,f)},Yl=sd(Lv);function od(t,f,M){var U=f+"";return Yl(t,Jv(U,ly(Yv(U),M)))}function sd(t){var f=0,M=0;return function(){var U=Am(),q=O-(U-M);if(M=U,q>0){if(++f>=F)return arguments[0]}else f=0;return t.apply(e,arguments)}}function Ea(t,f){var M=-1,U=t.length,q=U-1;for(f=f===e?U:f;++M<f;){var te=El(M,q),ae=t[te];t[te]=t[M],t[M]=ae}return t.length=f,t}var ad=iy(function(t){var f=[];return t.charCodeAt(0)===46&&f.push(""),t.replace(yn,function(M,U,q,te){f.push(q?te.replace(As,"$1"):U||M)}),f});function kr(t){if(typeof t=="string"||Ei(t))return t;var f=t+"";return f=="0"&&1/t==-W?"-0":f}function Oo(t){if(t!=null){try{return sa.call(t)}catch{}try{return t+""}catch{}}return""}function ly(t,f){return jn(he,function(M){var U="_."+M[0];f&M[1]&&!Mi(t,U)&&t.push(U)}),t.sort()}function ld(t){if(t instanceof $t)return t.clone();var f=new ji(t.__wrapped__,t.__chain__);return f.__actions__=mi(t.__actions__),f.__index__=t.__index__,f.__values__=t.__values__,f}function cy(t,f,M){(M?ui(t,f,M):f===e)?f=1:f=In(vt(f),0);var U=t==null?0:t.length;if(!U||f<1)return[];for(var q=0,te=0,ae=xe(fa(U/f));q<U;)ae[te++]=Gi(t,q,q+=f);return ae}function uy(t){for(var f=-1,M=t==null?0:t.length,U=0,q=[];++f<M;){var te=t[f];te&&(q[U++]=te)}return q}function hy(){var t=arguments.length;if(!t)return[];for(var f=xe(t-1),M=arguments[0],U=t;U--;)f[U-1]=arguments[U];return _(pt(M)?mi(M):[M],Gn(f,1))}var dy=St(function(t,f){return xn(t)?Os(t,Gn(f,1,xn,!0)):[]}),fy=St(function(t,f){var M=qi(f);return xn(M)&&(M=e),xn(t)?Os(t,Gn(f,1,xn,!0),rt(M,2)):[]}),py=St(function(t,f){var M=qi(f);return xn(M)&&(M=e),xn(t)?Os(t,Gn(f,1,xn,!0),e,M):[]});function gy(t,f,M){var U=t==null?0:t.length;return U?(f=M||f===e?1:vt(f),Gi(t,f<0?0:f,U)):[]}function my(t,f,M){var U=t==null?0:t.length;return U?(f=M||f===e?1:vt(f),f=U-f,Gi(t,0,f<0?0:f)):[]}function vy(t,f){return t&&t.length?ka(t,rt(f,3),!0,!0):[]}function yy(t,f){return t&&t.length?ka(t,rt(f,3),!0):[]}function wy(t,f,M,U){var q=t==null?0:t.length;return q?(M&&typeof M!="number"&&ui(t,f,M)&&(M=0,U=q),hv(t,f,M,U)):[]}function cd(t,f,M){var U=t==null?0:t.length;if(!U)return-1;var q=M==null?0:vt(M);return q<0&&(q=In(U+q,0)),ie(t,rt(f,3),q)}function ud(t,f,M){var U=t==null?0:t.length;if(!U)return-1;var q=U-1;return M!==e&&(q=vt(M),q=M<0?In(U+q,0):ei(q,U-1)),ie(t,rt(f,3),q,!0)}function hd(t){var f=t==null?0:t.length;return f?Gn(t,1):[]}function by(t){var f=t==null?0:t.length;return f?Gn(t,W):[]}function xy(t,f){var M=t==null?0:t.length;return M?(f=f===e?1:vt(f),Gn(t,f)):[]}function Sy(t){for(var f=-1,M=t==null?0:t.length,U={};++f<M;){var q=t[f];U[q[0]]=q[1]}return U}function dd(t){return t&&t.length?t[0]:e}function ky(t,f,M){var U=t==null?0:t.length;if(!U)return-1;var q=M==null?0:vt(M);return q<0&&(q=In(U+q,0)),se(t,f,q)}function Cy(t){var f=t==null?0:t.length;return f?Gi(t,0,-1):[]}var _y=St(function(t){var f=g(t,Dl);return f.length&&f[0]===t[0]?Al(f):[]}),Ay=St(function(t){var f=qi(t),M=g(t,Dl);return f===qi(M)?f=e:M.pop(),M.length&&M[0]===t[0]?Al(M,rt(f,2)):[]}),$y=St(function(t){var f=qi(t),M=g(t,Dl);return f=typeof f=="function"?f:e,f&&M.pop(),M.length&&M[0]===t[0]?Al(M,e,f):[]});function My(t,f){return t==null?"":Cm.call(t,f)}function qi(t){var f=t==null?0:t.length;return f?t[f-1]:e}function Ty(t,f,M){var U=t==null?0:t.length;if(!U)return-1;var q=U;return M!==e&&(q=vt(M),q=q<0?In(U+q,0):ei(q,U-1)),f===f?ht(t,f,q):ie(t,Se,q,!0)}function Ly(t,f){return t&&t.length?kh(t,vt(f)):e}var Ey=St(fd);function fd(t,f){return t&&t.length&&f&&f.length?Ll(t,f):t}function Ry(t,f,M){return t&&t.length&&f&&f.length?Ll(t,f,rt(M,2)):t}function Iy(t,f,M){return t&&t.length&&f&&f.length?Ll(t,f,e,M):t}var Oy=Ur(function(t,f){var M=t==null?0:t.length,U=Sl(t,f);return Ah(t,g(f,function(q){return Vr(q,M)?+q:q}).sort(Dh)),U});function Ny(t,f){var M=[];if(!(t&&t.length))return M;var U=-1,q=[],te=t.length;for(f=rt(f,3);++U<te;){var ae=t[U];f(ae,U,t)&&(M.push(ae),q.push(U))}return Ah(t,q),M}function Zl(t){return t==null?t:Mm.call(t)}function Dy(t,f,M){var U=t==null?0:t.length;return U?(M&&typeof M!="number"&&ui(t,f,M)?(f=0,M=U):(f=f==null?0:vt(f),M=M===e?U:vt(M)),Gi(t,f,M)):[]}function Fy(t,f){return Sa(t,f)}function Py(t,f,M){return Il(t,f,rt(M,2))}function By(t,f){var M=t==null?0:t.length;if(M){var U=Sa(t,f);if(U<M&&lr(t[U],f))return U}return-1}function Wy(t,f){return Sa(t,f,!0)}function Hy(t,f,M){return Il(t,f,rt(M,2),!0)}function zy(t,f){var M=t==null?0:t.length;if(M){var U=Sa(t,f,!0)-1;if(lr(t[U],f))return U}return-1}function Uy(t){return t&&t.length?Mh(t):[]}function Vy(t,f){return t&&t.length?Mh(t,rt(f,2)):[]}function jy(t){var f=t==null?0:t.length;return f?Gi(t,1,f):[]}function Ky(t,f,M){return t&&t.length?(f=M||f===e?1:vt(f),Gi(t,0,f<0?0:f)):[]}function Gy(t,f,M){var U=t==null?0:t.length;return U?(f=M||f===e?1:vt(f),f=U-f,Gi(t,f<0?0:f,U)):[]}function qy(t,f){return t&&t.length?ka(t,rt(f,3),!1,!0):[]}function Yy(t,f){return t&&t.length?ka(t,rt(f,3)):[]}var Zy=St(function(t){return uo(Gn(t,1,xn,!0))}),Qy=St(function(t){var f=qi(t);return xn(f)&&(f=e),uo(Gn(t,1,xn,!0),rt(f,2))}),Jy=St(function(t){var f=qi(t);return f=typeof f=="function"?f:e,uo(Gn(t,1,xn,!0),e,f)});function Xy(t){return t&&t.length?uo(t):[]}function ew(t,f){return t&&t.length?uo(t,rt(f,2)):[]}function tw(t,f){return f=typeof f=="function"?f:e,t&&t.length?uo(t,e,f):[]}function Ql(t){if(!(t&&t.length))return[];var f=0;return t=Xn(t,function(M){if(xn(M))return f=In(M.length,f),!0}),Ze(f,function(M){return g(t,we(M))})}function pd(t,f){if(!(t&&t.length))return[];var M=Ql(t);return f==null?M:g(M,function(U){return Bn(f,e,U)})}var nw=St(function(t,f){return xn(t)?Os(t,f):[]}),iw=St(function(t){return Nl(Xn(t,xn))}),rw=St(function(t){var f=qi(t);return xn(f)&&(f=e),Nl(Xn(t,xn),rt(f,2))}),ow=St(function(t){var f=qi(t);return f=typeof f=="function"?f:e,Nl(Xn(t,xn),e,f)}),sw=St(Ql);function aw(t,f){return Rh(t||[],f||[],Is)}function lw(t,f){return Rh(t||[],f||[],Fs)}var cw=St(function(t){var f=t.length,M=f>1?t[f-1]:e;return M=typeof M=="function"?(t.pop(),M):e,pd(t,M)});function gd(t){var f=X(t);return f.__chain__=!0,f}function uw(t,f){return f(t),t}function Ra(t,f){return f(t)}var hw=Ur(function(t){var f=t.length,M=f?t[0]:0,U=this.__wrapped__,q=function(te){return Sl(te,t)};return f>1||this.__actions__.length||!(U instanceof $t)||!Vr(M)?this.thru(q):(U=U.slice(M,+M+(f?1:0)),U.__actions__.push({func:Ra,args:[q],thisArg:e}),new ji(U,this.__chain__).thru(function(te){return f&&!te.length&&te.push(e),te}))});function dw(){return gd(this)}function fw(){return new ji(this.value(),this.__chain__)}function pw(){this.__values__===e&&(this.__values__=Td(this.value()));var t=this.__index__>=this.__values__.length,f=t?e:this.__values__[this.__index__++];return{done:t,value:f}}function gw(){return this}function mw(t){for(var f,M=this;M instanceof va;){var U=ld(M);U.__index__=0,U.__values__=e,f?q.__wrapped__=U:f=U;var q=U;M=M.__wrapped__}return q.__wrapped__=t,f}function vw(){var t=this.__wrapped__;if(t instanceof $t){var f=t;return this.__actions__.length&&(f=new $t(this)),f=f.reverse(),f.__actions__.push({func:Ra,args:[Zl],thisArg:e}),new ji(f,this.__chain__)}return this.thru(Zl)}function yw(){return Eh(this.__wrapped__,this.__actions__)}var ww=Ca(function(t,f,M){Ut.call(t,M)?++t[M]:Hr(t,M,1)});function bw(t,f,M){var U=pt(t)?Kn:uv;return M&&ui(t,f,M)&&(f=e),U(t,rt(f,3))}function xw(t,f){var M=pt(t)?Xn:ph;return M(t,rt(f,3))}var Sw=zh(cd),kw=zh(ud);function Cw(t,f){return Gn(Ia(t,f),1)}function _w(t,f){return Gn(Ia(t,f),W)}function Aw(t,f,M){return M=M===e?1:vt(M),Gn(Ia(t,f),M)}function md(t,f){var M=pt(t)?jn:co;return M(t,rt(f,3))}function vd(t,f){var M=pt(t)?Ao:fh;return M(t,rt(f,3))}var $w=Ca(function(t,f,M){Ut.call(t,M)?t[M].push(f):Hr(t,M,[f])});function Mw(t,f,M,U){t=vi(t)?t:ls(t),M=M&&!U?vt(M):0;var q=t.length;return M<0&&(M=In(q+M,0)),Pa(t)?M<=q&&t.indexOf(f,M)>-1:!!q&&se(t,f,M)>-1}var Tw=St(function(t,f,M){var U=-1,q=typeof f=="function",te=vi(t)?xe(t.length):[];return co(t,function(ae){te[++U]=q?Bn(f,ae,M):Ns(ae,f,M)}),te}),Lw=Ca(function(t,f,M){Hr(t,M,f)});function Ia(t,f){var M=pt(t)?g:bh;return M(t,rt(f,3))}function Ew(t,f,M,U){return t==null?[]:(pt(f)||(f=f==null?[]:[f]),M=U?e:M,pt(M)||(M=M==null?[]:[M]),Ch(t,f,M))}var Rw=Ca(function(t,f,M){t[M?0:1].push(f)},function(){return[[],[]]});function Iw(t,f,M){var U=pt(t)?k:Le,q=arguments.length<3;return U(t,rt(f,4),M,q,co)}function Ow(t,f,M){var U=pt(t)?P:Le,q=arguments.length<3;return U(t,rt(f,4),M,q,fh)}function Nw(t,f){var M=pt(t)?Xn:ph;return M(t,Da(rt(f,3)))}function Dw(t){var f=pt(t)?ch:Mv;return f(t)}function Fw(t,f,M){(M?ui(t,f,M):f===e)?f=1:f=vt(f);var U=pt(t)?ov:Tv;return U(t,f)}function Pw(t){var f=pt(t)?sv:Ev;return f(t)}function Bw(t){if(t==null)return 0;if(vi(t))return Pa(t)?kt(t):t.length;var f=ti(t);return f==Je||f==Cn?t.size:Ml(t).length}function Ww(t,f,M){var U=pt(t)?B:Rv;return M&&ui(t,f,M)&&(f=e),U(t,rt(f,3))}var Hw=St(function(t,f){if(t==null)return[];var M=f.length;return M>1&&ui(t,f[0],f[1])?f=[]:M>2&&ui(f[0],f[1],f[2])&&(f=[f[0]]),Ch(t,Gn(f,1),[])}),Oa=xm||function(){return Vt.Date.now()};function zw(t,f){if(typeof f!="function")throw new Kt(v);return t=vt(t),function(){if(--t<1)return f.apply(this,arguments)}}function yd(t,f,M){return f=M?e:f,f=t&&f==null?t.length:f,zr(t,E,e,e,e,e,f)}function wd(t,f){var M;if(typeof f!="function")throw new Kt(v);return t=vt(t),function(){return--t>0&&(M=f.apply(this,arguments)),t<=1&&(f=e),M}}var Jl=St(function(t,f,M){var U=h;if(M.length){var q=Fe(M,ss(Jl));U|=C}return zr(t,U,f,M,q)}),bd=St(function(t,f,M){var U=h|m;if(M.length){var q=Fe(M,ss(bd));U|=C}return zr(f,U,t,M,q)});function xd(t,f,M){f=M?e:f;var U=zr(t,R,e,e,e,e,e,f);return U.placeholder=xd.placeholder,U}function Sd(t,f,M){f=M?e:f;var U=zr(t,T,e,e,e,e,e,f);return U.placeholder=Sd.placeholder,U}function kd(t,f,M){var U,q,te,ae,fe,ve,Te=0,Ee=!1,Oe=!1,Ue=!0;if(typeof t!="function")throw new Kt(v);f=Yi(f)||0,cn(M)&&(Ee=!!M.leading,Oe="maxWait"in M,te=Oe?In(Yi(M.maxWait)||0,f):te,Ue="trailing"in M?!!M.trailing:Ue);function Qe(Sn){var cr=U,Gr=q;return U=q=e,Te=Sn,ae=t.apply(Gr,cr),ae}function st(Sn){return Te=Sn,fe=Ws(Ct,f),Ee?Qe(Sn):ae}function bt(Sn){var cr=Sn-ve,Gr=Sn-Te,zd=f-cr;return Oe?ei(zd,te-Gr):zd}function at(Sn){var cr=Sn-ve,Gr=Sn-Te;return ve===e||cr>=f||cr<0||Oe&&Gr>=te}function Ct(){var Sn=Oa();if(at(Sn))return Lt(Sn);fe=Ws(Ct,bt(Sn))}function Lt(Sn){return fe=e,Ue&&U?Qe(Sn):(U=q=e,ae)}function Ri(){fe!==e&&Ih(fe),Te=0,U=ve=q=fe=e}function hi(){return fe===e?ae:Lt(Oa())}function Ii(){var Sn=Oa(),cr=at(Sn);if(U=arguments,q=this,ve=Sn,cr){if(fe===e)return st(ve);if(Oe)return Ih(fe),fe=Ws(Ct,f),Qe(ve)}return fe===e&&(fe=Ws(Ct,f)),ae}return Ii.cancel=Ri,Ii.flush=hi,Ii}var Uw=St(function(t,f){return dh(t,1,f)}),Vw=St(function(t,f,M){return dh(t,Yi(f)||0,M)});function jw(t){return zr(t,I)}function Na(t,f){if(typeof t!="function"||f!=null&&typeof f!="function")throw new Kt(v);var M=function(){var U=arguments,q=f?f.apply(this,U):U[0],te=M.cache;if(te.has(q))return te.get(q);var ae=t.apply(this,U);return M.cache=te.set(q,ae)||te,ae};return M.cache=new(Na.Cache||Wr),M}Na.Cache=Wr;function Da(t){if(typeof t!="function")throw new Kt(v);return function(){var f=arguments;switch(f.length){case 0:return!t.call(this);case 1:return!t.call(this,f[0]);case 2:return!t.call(this,f[0],f[1]);case 3:return!t.call(this,f[0],f[1],f[2])}return!t.apply(this,f)}}function Kw(t){return wd(2,t)}var Gw=Iv(function(t,f){f=f.length==1&&pt(f[0])?g(f[0],tt(rt())):g(Gn(f,1),tt(rt()));var M=f.length;return St(function(U){for(var q=-1,te=ei(U.length,M);++q<te;)U[q]=f[q].call(this,U[q]);return Bn(t,this,U)})}),Xl=St(function(t,f){var M=Fe(f,ss(Xl));return zr(t,C,e,f,M)}),Cd=St(function(t,f){var M=Fe(f,ss(Cd));return zr(t,w,e,f,M)}),qw=Ur(function(t,f){return zr(t,D,e,e,e,f)});function Yw(t,f){if(typeof t!="function")throw new Kt(v);return f=f===e?f:vt(f),St(t,f)}function Zw(t,f){if(typeof t!="function")throw new Kt(v);return f=f==null?0:In(vt(f),0),St(function(M){var U=M[f],q=fo(M,0,f);return U&&_(q,U),Bn(t,this,q)})}function Qw(t,f,M){var U=!0,q=!0;if(typeof t!="function")throw new Kt(v);return cn(M)&&(U="leading"in M?!!M.leading:U,q="trailing"in M?!!M.trailing:q),kd(t,f,{leading:U,maxWait:f,trailing:q})}function Jw(t){return yd(t,1)}function Xw(t,f){return Xl(Fl(f),t)}function eb(){if(!arguments.length)return[];var t=arguments[0];return pt(t)?t:[t]}function tb(t){return Ki(t,r)}function nb(t,f){return f=typeof f=="function"?f:e,Ki(t,r,f)}function ib(t){return Ki(t,a|r)}function rb(t,f){return f=typeof f=="function"?f:e,Ki(t,a|r,f)}function ob(t,f){return f==null||hh(t,f,Un(f))}function lr(t,f){return t===f||t!==t&&f!==f}var sb=Ma(_l),ab=Ma(function(t,f){return t>=f}),No=vh(function(){return arguments}())?vh:function(t){return mn(t)&&Ut.call(t,"callee")&&!ih.call(t,"callee")},pt=xe.isArray,lb=gi?tt(gi):mv;function vi(t){return t!=null&&Fa(t.length)&&!jr(t)}function xn(t){return mn(t)&&vi(t)}function cb(t){return t===!0||t===!1||mn(t)&&ci(t)==_e}var po=km||uc,ub=ao?tt(ao):vv;function hb(t){return mn(t)&&t.nodeType===1&&!Hs(t)}function db(t){if(t==null)return!0;if(vi(t)&&(pt(t)||typeof t=="string"||typeof t.splice=="function"||po(t)||as(t)||No(t)))return!t.length;var f=ti(t);if(f==Je||f==Cn)return!t.size;if(Bs(t))return!Ml(t).length;for(var M in t)if(Ut.call(t,M))return!1;return!0}function fb(t,f){return Ds(t,f)}function pb(t,f,M){M=typeof M=="function"?M:e;var U=M?M(t,f):e;return U===e?Ds(t,f,e,M):!!U}function ec(t){if(!mn(t))return!1;var f=ci(t);return f==qe||f==Me||typeof t.message=="string"&&typeof t.name=="string"&&!Hs(t)}function gb(t){return typeof t=="number"&&oh(t)}function jr(t){if(!cn(t))return!1;var f=ci(t);return f==Ve||f==ot||f==me||f==Si}function _d(t){return typeof t=="number"&&t==vt(t)}function Fa(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=V}function cn(t){var f=typeof t;return t!=null&&(f=="object"||f=="function")}function mn(t){return t!=null&&typeof t=="object"}var Ad=fn?tt(fn):wv;function mb(t,f){return t===f||$l(t,f,Vl(f))}function vb(t,f,M){return M=typeof M=="function"?M:e,$l(t,f,Vl(f),M)}function yb(t){return $d(t)&&t!=+t}function wb(t){if(ny(t))throw new nt(b);return yh(t)}function bb(t){return t===null}function xb(t){return t==null}function $d(t){return typeof t=="number"||mn(t)&&ci(t)==lt}function Hs(t){if(!mn(t)||ci(t)!=vn)return!1;var f=ua(t);if(f===null)return!0;var M=Ut.call(f,"constructor")&&f.constructor;return typeof M=="function"&&M instanceof M&&sa.call(M)==vm}var tc=Ai?tt(Ai):bv;function Sb(t){return _d(t)&&t>=-V&&t<=V}var Md=$i?tt($i):xv;function Pa(t){return typeof t=="string"||!pt(t)&&mn(t)&&ci(t)==Fn}function Ei(t){return typeof t=="symbol"||mn(t)&&ci(t)==ri}var as=Ui?tt(Ui):Sv;function kb(t){return t===e}function Cb(t){return mn(t)&&ti(t)==ze}function _b(t){return mn(t)&&ci(t)==Ot}var Ab=Ma(Tl),$b=Ma(function(t,f){return t<=f});function Td(t){if(!t)return[];if(vi(t))return Pa(t)?ft(t):mi(t);if(Ms&&t[Ms])return be(t[Ms]());var f=ti(t),M=f==Je?$e:f==Cn?He:ls;return M(t)}function Kr(t){if(!t)return t===0?t:0;if(t=Yi(t),t===W||t===-W){var f=t<0?-1:1;return f*G}return t===t?t:0}function vt(t){var f=Kr(t),M=f%1;return f===f?M?f-M:f:0}function Ld(t){return t?Eo(vt(t),0,ee):0}function Yi(t){if(typeof t=="number")return t;if(Ei(t))return Z;if(cn(t)){var f=typeof t.valueOf=="function"?t.valueOf():t;t=cn(f)?f+"":f}if(typeof t!="string")return t===0?t:+t;t=jt(t);var M=Yo.test(t);return M||wn.test(t)?Jt(t.slice(2),M?2:8):_t.test(t)?Z:+t}function Ed(t){return Sr(t,yi(t))}function Mb(t){return t?Eo(vt(t),-V,V):t===0?t:0}function Bt(t){return t==null?"":Li(t)}var Tb=rs(function(t,f){if(Bs(f)||vi(f)){Sr(f,Un(f),t);return}for(var M in f)Ut.call(f,M)&&Is(t,M,f[M])}),Rd=rs(function(t,f){Sr(f,yi(f),t)}),Ba=rs(function(t,f,M,U){Sr(f,yi(f),t,U)}),Lb=rs(function(t,f,M,U){Sr(f,Un(f),t,U)}),Eb=Ur(Sl);function Rb(t,f){var M=is(t);return f==null?M:uh(M,f)}var Ib=St(function(t,f){t=wt(t);var M=-1,U=f.length,q=U>2?f[2]:e;for(q&&ui(f[0],f[1],q)&&(U=1);++M<U;)for(var te=f[M],ae=yi(te),fe=-1,ve=ae.length;++fe<ve;){var Te=ae[fe],Ee=t[Te];(Ee===e||lr(Ee,gn[Te])&&!Ut.call(t,Te))&&(t[Te]=te[Te])}return t}),Ob=St(function(t){return t.push(e,Yh),Bn(Id,e,t)});function Nb(t,f){return J(t,rt(f,3),xr)}function Db(t,f){return J(t,rt(f,3),Cl)}function Fb(t,f){return t==null?t:kl(t,rt(f,3),yi)}function Pb(t,f){return t==null?t:gh(t,rt(f,3),yi)}function Bb(t,f){return t&&xr(t,rt(f,3))}function Wb(t,f){return t&&Cl(t,rt(f,3))}function Hb(t){return t==null?[]:ba(t,Un(t))}function zb(t){return t==null?[]:ba(t,yi(t))}function nc(t,f,M){var U=t==null?e:Ro(t,f);return U===e?M:U}function Ub(t,f){return t!=null&&Jh(t,f,dv)}function ic(t,f){return t!=null&&Jh(t,f,fv)}var Vb=Vh(function(t,f,M){f!=null&&typeof f.toString!="function"&&(f=aa.call(f)),t[f]=M},oc(wi)),jb=Vh(function(t,f,M){f!=null&&typeof f.toString!="function"&&(f=aa.call(f)),Ut.call(t,f)?t[f].push(M):t[f]=[M]},rt),Kb=St(Ns);function Un(t){return vi(t)?lh(t):Ml(t)}function yi(t){return vi(t)?lh(t,!0):kv(t)}function Gb(t,f){var M={};return f=rt(f,3),xr(t,function(U,q,te){Hr(M,f(U,q,te),U)}),M}function qb(t,f){var M={};return f=rt(f,3),xr(t,function(U,q,te){Hr(M,q,f(U,q,te))}),M}var Yb=rs(function(t,f,M){xa(t,f,M)}),Id=rs(function(t,f,M,U){xa(t,f,M,U)}),Zb=Ur(function(t,f){var M={};if(t==null)return M;var U=!1;f=g(f,function(te){return te=ho(te,t),U||(U=te.length>1),te}),Sr(t,zl(t),M),U&&(M=Ki(M,a|s|r,Vv));for(var q=f.length;q--;)Ol(M,f[q]);return M});function Qb(t,f){return Od(t,Da(rt(f)))}var Jb=Ur(function(t,f){return t==null?{}:_v(t,f)});function Od(t,f){if(t==null)return{};var M=g(zl(t),function(U){return[U]});return f=rt(f),_h(t,M,function(U,q){return f(U,q[0])})}function Xb(t,f,M){f=ho(f,t);var U=-1,q=f.length;for(q||(q=1,t=e);++U<q;){var te=t==null?e:t[kr(f[U])];te===e&&(U=q,te=M),t=jr(te)?te.call(t):te}return t}function e0(t,f,M){return t==null?t:Fs(t,f,M)}function t0(t,f,M,U){return U=typeof U=="function"?U:e,t==null?t:Fs(t,f,M,U)}var Nd=Gh(Un),Dd=Gh(yi);function n0(t,f,M){var U=pt(t),q=U||po(t)||as(t);if(f=rt(f,4),M==null){var te=t&&t.constructor;q?M=U?new te:[]:cn(t)?M=jr(te)?is(ua(t)):{}:M={}}return(q?jn:xr)(t,function(ae,fe,ve){return f(M,ae,fe,ve)}),M}function i0(t,f){return t==null?!0:Ol(t,f)}function r0(t,f,M){return t==null?t:Lh(t,f,Fl(M))}function o0(t,f,M,U){return U=typeof U=="function"?U:e,t==null?t:Lh(t,f,Fl(M),U)}function ls(t){return t==null?[]:tn(t,Un(t))}function s0(t){return t==null?[]:tn(t,yi(t))}function a0(t,f,M){return M===e&&(M=f,f=e),M!==e&&(M=Yi(M),M=M===M?M:0),f!==e&&(f=Yi(f),f=f===f?f:0),Eo(Yi(t),f,M)}function l0(t,f,M){return f=Kr(f),M===e?(M=f,f=0):M=Kr(M),t=Yi(t),pv(t,f,M)}function c0(t,f,M){if(M&&typeof M!="boolean"&&ui(t,f,M)&&(f=M=e),M===e&&(typeof f=="boolean"?(M=f,f=e):typeof t=="boolean"&&(M=t,t=e)),t===e&&f===e?(t=0,f=1):(t=Kr(t),f===e?(f=t,t=0):f=Kr(f)),t>f){var U=t;t=f,f=U}if(M||t%1||f%1){var q=sh();return ei(t+q*(f-t+Pe("1e-"+((q+"").length-1))),f)}return El(t,f)}var u0=os(function(t,f,M){return f=f.toLowerCase(),t+(M?Fd(f):f)});function Fd(t){return rc(Bt(t).toLowerCase())}function Pd(t){return t=Bt(t),t&&t.replace(un,nn).replace(Dr,"")}function h0(t,f,M){t=Bt(t),f=Li(f);var U=t.length;M=M===e?U:Eo(vt(M),0,U);var q=M;return M-=f.length,M>=0&&t.slice(M,q)==f}function d0(t){return t=Bt(t),t&&ks.test(t)?t.replace(Tr,j):t}function f0(t){return t=Bt(t),t&&nr.test(t)?t.replace(Yn,"\\$&"):t}var p0=os(function(t,f,M){return t+(M?"-":"")+f.toLowerCase()}),g0=os(function(t,f,M){return t+(M?" ":"")+f.toLowerCase()}),m0=Hh("toLowerCase");function v0(t,f,M){t=Bt(t),f=vt(f);var U=f?kt(t):0;if(!f||U>=f)return t;var q=(f-U)/2;return $a(pa(q),M)+t+$a(fa(q),M)}function y0(t,f,M){t=Bt(t),f=vt(f);var U=f?kt(t):0;return f&&U<f?t+$a(f-U,M):t}function w0(t,f,M){t=Bt(t),f=vt(f);var U=f?kt(t):0;return f&&U<f?$a(f-U,M)+t:t}function b0(t,f,M){return M||f==null?f=0:f&&(f=+f),$m(Bt(t).replace(an,""),f||0)}function x0(t,f,M){return(M?ui(t,f,M):f===e)?f=1:f=vt(f),Rl(Bt(t),f)}function S0(){var t=arguments,f=Bt(t[0]);return t.length<3?f:f.replace(t[1],t[2])}var k0=os(function(t,f,M){return t+(M?"_":"")+f.toLowerCase()});function C0(t,f,M){return M&&typeof M!="number"&&ui(t,f,M)&&(f=M=e),M=M===e?ee:M>>>0,M?(t=Bt(t),t&&(typeof f=="string"||f!=null&&!tc(f))&&(f=Li(f),!f&&oe(t))?fo(ft(t),0,M):t.split(f,M)):[]}var _0=os(function(t,f,M){return t+(M?" ":"")+rc(f)});function A0(t,f,M){return t=Bt(t),M=M==null?0:Eo(vt(M),0,t.length),f=Li(f),t.slice(M,M+f.length)==f}function $0(t,f,M){var U=X.templateSettings;M&&ui(t,f,M)&&(f=e),t=Bt(t),f=Ba({},f,U,qh);var q=Ba({},f.imports,U.imports,qh),te=Un(q),ae=tn(q,te),fe,ve,Te=0,Ee=f.interpolate||Fi,Oe="__p += '",Ue=li((f.escape||Fi).source+"|"+Ee.source+"|"+(Ee===yo?rr:Fi).source+"|"+(f.evaluate||Fi).source+"|$","g"),Qe="//# sourceURL="+(Ut.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++br+"]")+`
|
|
1474
1474
|
`;t.replace(Ue,function(at,Ct,Lt,Ri,hi,Ii){return Lt||(Lt=Ri),Oe+=t.slice(Te,Ii).replace(Jn,Q),Ct&&(fe=!0,Oe+=`' +
|
|
1475
1475
|
__e(`+Ct+`) +
|
|
1476
1476
|
'`),hi&&(ve=!0,Oe+=`';
|
|
@@ -1487,12 +1487,12 @@ __p += '`),Lt&&(Oe+=`' +
|
|
|
1487
1487
|
function print() { __p += __j.call(arguments, '') }
|
|
1488
1488
|
`:`;
|
|
1489
1489
|
`)+Oe+`return __p
|
|
1490
|
-
}`;var bt=Bd(function(){return gt(te,Qe+"return "+Oe).apply(e,ae)});if(bt.source=Oe,ec(bt))throw bt;return bt}function M0(t){return Wt(t).toLowerCase()}function T0(t){return Wt(t).toUpperCase()}function L0(t,f,M){if(t=Wt(t),t&&(M||f===e))return jt(t);if(!t||!(f=Li(f)))return t;var U=ft(t),q=ft(f),te=ut(U,q),ae=pn(U,q)+1;return fo(U,te,ae).join("")}function E0(t,f,M){if(t=Wt(t),t&&(M||f===e))return t.slice(0,yt(t)+1);if(!t||!(f=Li(f)))return t;var U=ft(t),q=pn(U,ft(f))+1;return fo(U,0,q).join("")}function R0(t,f,M){if(t=Wt(t),t&&(M||f===e))return t.replace(an,"");if(!t||!(f=Li(f)))return t;var U=ft(t),q=ut(U,ft(f));return fo(U,q).join("")}function I0(t,f){var M=L,U=z;if(cn(f)){var q="separator"in f?f.separator:q;M="length"in f?vt(f.length):M,U="omission"in f?Li(f.omission):U}t=Wt(t);var te=t.length;if(oe(t)){var ae=ft(t);te=ae.length}if(M>=te)return t;var fe=M-kt(U);if(fe<1)return U;var ve=ae?fo(ae,0,fe).join(""):t.slice(0,fe);if(q===e)return ve+U;if(ae&&(fe+=ve.length-fe),tc(q)){if(t.slice(fe).search(q)){var Te,Ee=ve;for(q.global||(q=li(q.source,Wt(Ci.exec(q))+"g")),q.lastIndex=0;Te=q.exec(Ee);)var Oe=Te.index;ve=ve.slice(0,Oe===e?fe:Oe)}}else if(t.indexOf(Li(q),fe)!=fe){var Ue=ve.lastIndexOf(q);Ue>-1&&(ve=ve.slice(0,Ue))}return ve+U}function O0(t){return t=Wt(t),t&&Zr.test(t)?t.replace(Vn,it):t}var N0=os(function(t,f,M){return t+(M?" ":"")+f.toUpperCase()}),rc=Hh("toUpperCase");function Wd(t,f,M){return t=Wt(t),f=M?e:f,f===e?ge(t)?rn(t):Y(t):t.match(f)||[]}var Bd=St(function(t,f){try{return Wn(t,e,f)}catch(M){return ec(M)?M:new nt(M)}}),D0=Ur(function(t,f){return jn(f,function(M){M=kr(M),Hr(t,M,Jl(t[M],t))}),t});function F0(t){var f=t==null?0:t.length,M=rt();return t=f?g(t,function(U){if(typeof U[1]!="function")throw new Kt(v);return[M(U[0]),U[1]]}):[],St(function(U){for(var q=-1;++q<f;){var te=t[q];if(Wn(te[0],this,U))return Wn(te[1],this,U)}})}function P0(t){return cv(Ki(t,a))}function oc(t){return function(){return t}}function W0(t,f){return t==null||t!==t?f:t}var B0=Uh(),H0=Uh(!0);function wi(t){return t}function sc(t){return wh(typeof t=="function"?t:Ki(t,a))}function z0(t){return xh(Ki(t,a))}function U0(t,f){return Sh(t,Ki(f,a))}var V0=St(function(t,f){return function(M){return Ns(M,t,f)}}),j0=St(function(t,f){return function(M){return Ns(t,M,f)}});function ac(t,f,M){var U=Un(f),q=ba(f,U);M==null&&!(cn(f)&&(q.length||!U.length))&&(M=f,f=t,t=this,q=ba(f,Un(f)));var te=!(cn(M)&&"chain"in M)||!!M.chain,ae=jr(t);return jn(q,function(fe){var ve=f[fe];t[fe]=ve,ae&&(t.prototype[fe]=function(){var Te=this.__chain__;if(te||Te){var Ee=t(this.__wrapped__),Oe=Ee.__actions__=mi(this.__actions__);return Oe.push({func:ve,args:arguments,thisArg:t}),Ee.__chain__=Te,Ee}return ve.apply(t,_([this.value()],arguments))})}),t}function K0(){return Vt._===this&&(Vt._=ym),this}function lc(){}function G0(t){return t=vt(t),St(function(f){return kh(f,t)})}var q0=Wl(g),Y0=Wl(Kn),Z0=Wl(W);function Hd(t){return Kl(t)?we(kr(t)):Av(t)}function Q0(t){return function(f){return t==null?e:Ro(t,f)}}var J0=jh(),X0=jh(!0);function cc(){return[]}function uc(){return!1}function ex(){return{}}function tx(){return""}function nx(){return!0}function ix(t,f){if(t=vt(t),t<1||t>V)return[];var M=ee,U=ei(t,ee);f=rt(f),t-=ee;for(var q=Ze(U,f);++M<t;)f(M);return q}function rx(t){return pt(t)?g(t,kr):Ei(t)?[t]:mi(ad(Wt(t)))}function ox(t){var f=++mm;return Wt(t)+f}var sx=Aa(function(t,f){return t+f},0),ax=Bl("ceil"),lx=Aa(function(t,f){return t/f},1),cx=Bl("floor");function ux(t){return t&&t.length?wa(t,wi,_l):e}function hx(t,f){return t&&t.length?wa(t,rt(f,2),_l):e}function dx(t){return de(t,wi)}function fx(t,f){return de(t,rt(f,2))}function px(t){return t&&t.length?wa(t,wi,Tl):e}function gx(t,f){return t&&t.length?wa(t,rt(f,2),Tl):e}var mx=Aa(function(t,f){return t*f},1),vx=Bl("round"),yx=Aa(function(t,f){return t-f},0);function wx(t){return t&&t.length?Xe(t,wi):0}function bx(t,f){return t&&t.length?Xe(t,rt(f,2)):0}return X.after=zw,X.ary=yd,X.assign=Tb,X.assignIn=Rd,X.assignInWith=Wa,X.assignWith=Lb,X.at=Eb,X.before=wd,X.bind=Jl,X.bindAll=D0,X.bindKey=bd,X.castArray=eb,X.chain=gd,X.chunk=cy,X.compact=uy,X.concat=hy,X.cond=F0,X.conforms=P0,X.constant=oc,X.countBy=ww,X.create=Rb,X.curry=xd,X.curryRight=Sd,X.debounce=kd,X.defaults=Ib,X.defaultsDeep=Ob,X.defer=Uw,X.delay=Vw,X.difference=dy,X.differenceBy=fy,X.differenceWith=py,X.drop=gy,X.dropRight=my,X.dropRightWhile=vy,X.dropWhile=yy,X.fill=wy,X.filter=xw,X.flatMap=Cw,X.flatMapDeep=_w,X.flatMapDepth=Aw,X.flatten=hd,X.flattenDeep=by,X.flattenDepth=xy,X.flip=jw,X.flow=B0,X.flowRight=H0,X.fromPairs=Sy,X.functions=Hb,X.functionsIn=zb,X.groupBy=$w,X.initial=Cy,X.intersection=_y,X.intersectionBy=Ay,X.intersectionWith=$y,X.invert=Vb,X.invertBy=jb,X.invokeMap=Tw,X.iteratee=sc,X.keyBy=Lw,X.keys=Un,X.keysIn=yi,X.map=Ia,X.mapKeys=Gb,X.mapValues=qb,X.matches=z0,X.matchesProperty=U0,X.memoize=Na,X.merge=Yb,X.mergeWith=Id,X.method=V0,X.methodOf=j0,X.mixin=ac,X.negate=Da,X.nthArg=G0,X.omit=Zb,X.omitBy=Qb,X.once=Kw,X.orderBy=Ew,X.over=q0,X.overArgs=Gw,X.overEvery=Y0,X.overSome=Z0,X.partial=Xl,X.partialRight=Cd,X.partition=Rw,X.pick=Jb,X.pickBy=Od,X.property=Hd,X.propertyOf=Q0,X.pull=Ey,X.pullAll=fd,X.pullAllBy=Ry,X.pullAllWith=Iy,X.pullAt=Oy,X.range=J0,X.rangeRight=X0,X.rearg=qw,X.reject=Nw,X.remove=Ny,X.rest=Yw,X.reverse=Zl,X.sampleSize=Fw,X.set=e0,X.setWith=t0,X.shuffle=Pw,X.slice=Dy,X.sortBy=Hw,X.sortedUniq=Uy,X.sortedUniqBy=Vy,X.split=C0,X.spread=Zw,X.tail=jy,X.take=Ky,X.takeRight=Gy,X.takeRightWhile=qy,X.takeWhile=Yy,X.tap=uw,X.throttle=Qw,X.thru=Ra,X.toArray=Td,X.toPairs=Nd,X.toPairsIn=Dd,X.toPath=rx,X.toPlainObject=Ed,X.transform=n0,X.unary=Jw,X.union=Zy,X.unionBy=Qy,X.unionWith=Jy,X.uniq=Xy,X.uniqBy=ew,X.uniqWith=tw,X.unset=i0,X.unzip=Ql,X.unzipWith=pd,X.update=r0,X.updateWith=o0,X.values=ls,X.valuesIn=s0,X.without=nw,X.words=Wd,X.wrap=Xw,X.xor=iw,X.xorBy=rw,X.xorWith=ow,X.zip=sw,X.zipObject=aw,X.zipObjectDeep=lw,X.zipWith=cw,X.entries=Nd,X.entriesIn=Dd,X.extend=Rd,X.extendWith=Wa,ac(X,X),X.add=sx,X.attempt=Bd,X.camelCase=u0,X.capitalize=Fd,X.ceil=ax,X.clamp=a0,X.clone=tb,X.cloneDeep=ib,X.cloneDeepWith=rb,X.cloneWith=nb,X.conformsTo=ob,X.deburr=Pd,X.defaultTo=W0,X.divide=lx,X.endsWith=h0,X.eq=lr,X.escape=d0,X.escapeRegExp=f0,X.every=bw,X.find=Sw,X.findIndex=cd,X.findKey=Nb,X.findLast=kw,X.findLastIndex=ud,X.findLastKey=Db,X.floor=cx,X.forEach=md,X.forEachRight=vd,X.forIn=Fb,X.forInRight=Pb,X.forOwn=Wb,X.forOwnRight=Bb,X.get=nc,X.gt=sb,X.gte=ab,X.has=Ub,X.hasIn=ic,X.head=dd,X.identity=wi,X.includes=Mw,X.indexOf=ky,X.inRange=l0,X.invoke=Kb,X.isArguments=No,X.isArray=pt,X.isArrayBuffer=lb,X.isArrayLike=vi,X.isArrayLikeObject=xn,X.isBoolean=cb,X.isBuffer=po,X.isDate=ub,X.isElement=hb,X.isEmpty=db,X.isEqual=fb,X.isEqualWith=pb,X.isError=ec,X.isFinite=gb,X.isFunction=jr,X.isInteger=_d,X.isLength=Fa,X.isMap=Ad,X.isMatch=mb,X.isMatchWith=vb,X.isNaN=yb,X.isNative=wb,X.isNil=xb,X.isNull=bb,X.isNumber=$d,X.isObject=cn,X.isObjectLike=mn,X.isPlainObject=Hs,X.isRegExp=tc,X.isSafeInteger=Sb,X.isSet=Md,X.isString=Pa,X.isSymbol=Ei,X.isTypedArray=as,X.isUndefined=kb,X.isWeakMap=Cb,X.isWeakSet=_b,X.join=My,X.kebabCase=p0,X.last=qi,X.lastIndexOf=Ty,X.lowerCase=g0,X.lowerFirst=m0,X.lt=Ab,X.lte=$b,X.max=ux,X.maxBy=hx,X.mean=dx,X.meanBy=fx,X.min=px,X.minBy=gx,X.stubArray=cc,X.stubFalse=uc,X.stubObject=ex,X.stubString=tx,X.stubTrue=nx,X.multiply=mx,X.nth=Ly,X.noConflict=K0,X.noop=lc,X.now=Oa,X.pad=v0,X.padEnd=y0,X.padStart=w0,X.parseInt=b0,X.random=c0,X.reduce=Iw,X.reduceRight=Ow,X.repeat=x0,X.replace=S0,X.result=Xb,X.round=vx,X.runInContext=pe,X.sample=Dw,X.size=Ww,X.snakeCase=k0,X.some=Bw,X.sortedIndex=Fy,X.sortedIndexBy=Py,X.sortedIndexOf=Wy,X.sortedLastIndex=By,X.sortedLastIndexBy=Hy,X.sortedLastIndexOf=zy,X.startCase=_0,X.startsWith=A0,X.subtract=yx,X.sum=wx,X.sumBy=bx,X.template=$0,X.times=ix,X.toFinite=Kr,X.toInteger=vt,X.toLength=Ld,X.toLower=M0,X.toNumber=Yi,X.toSafeInteger=Mb,X.toString=Wt,X.toUpper=T0,X.trim=L0,X.trimEnd=E0,X.trimStart=R0,X.truncate=I0,X.unescape=O0,X.uniqueId=ox,X.upperCase=N0,X.upperFirst=rc,X.each=md,X.eachRight=vd,X.first=dd,ac(X,function(){var t={};return xr(X,function(f,M){Ut.call(X.prototype,M)||(t[M]=f)}),t}(),{chain:!1}),X.VERSION=u,jn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){X[t].placeholder=X}),jn(["drop","take"],function(t,f){$t.prototype[t]=function(M){M=M===e?1:In(vt(M),0);var U=this.__filtered__&&!f?new $t(this):this.clone();return U.__filtered__?U.__takeCount__=ei(M,U.__takeCount__):U.__views__.push({size:ei(M,ee),type:t+(U.__dir__<0?"Right":"")}),U},$t.prototype[t+"Right"]=function(M){return this.reverse()[t](M).reverse()}}),jn(["filter","map","takeWhile"],function(t,f){var M=f+1,U=M==A||M==N;$t.prototype[t]=function(q){var te=this.clone();return te.__iteratees__.push({iteratee:rt(q,3),type:M}),te.__filtered__=te.__filtered__||U,te}}),jn(["head","last"],function(t,f){var M="take"+(f?"Right":"");$t.prototype[t]=function(){return this[M](1).value()[0]}}),jn(["initial","tail"],function(t,f){var M="drop"+(f?"":"Right");$t.prototype[t]=function(){return this.__filtered__?new $t(this):this[M](1)}}),$t.prototype.compact=function(){return this.filter(wi)},$t.prototype.find=function(t){return this.filter(t).head()},$t.prototype.findLast=function(t){return this.reverse().find(t)},$t.prototype.invokeMap=St(function(t,f){return typeof t=="function"?new $t(this):this.map(function(M){return Ns(M,t,f)})}),$t.prototype.reject=function(t){return this.filter(Da(rt(t)))},$t.prototype.slice=function(t,f){t=vt(t);var M=this;return M.__filtered__&&(t>0||f<0)?new $t(M):(t<0?M=M.takeRight(-t):t&&(M=M.drop(t)),f!==e&&(f=vt(f),M=f<0?M.dropRight(-f):M.take(f-t)),M)},$t.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},$t.prototype.toArray=function(){return this.take(ee)},xr($t.prototype,function(t,f){var M=/^(?:filter|find|map|reject)|While$/.test(f),U=/^(?:head|last)$/.test(f),q=X[U?"take"+(f=="last"?"Right":""):f],te=U||/^find/.test(f);q&&(X.prototype[f]=function(){var ae=this.__wrapped__,fe=U?[1]:arguments,ve=ae instanceof $t,Te=fe[0],Ee=ve||pt(ae),Oe=function(Ct){var Lt=q.apply(X,_([Ct],fe));return U&&Ue?Lt[0]:Lt};Ee&&M&&typeof Te=="function"&&Te.length!=1&&(ve=Ee=!1);var Ue=this.__chain__,Qe=!!this.__actions__.length,st=te&&!Ue,bt=ve&&!Qe;if(!te&&Ee){ae=bt?ae:new $t(this);var at=t.apply(ae,fe);return at.__actions__.push({func:Ra,args:[Oe],thisArg:e}),new ji(at,Ue)}return st&&bt?t.apply(this,fe):(at=this.thru(Oe),st?U?at.value()[0]:at.value():at)})}),jn(["pop","push","shift","sort","splice","unshift"],function(t){var f=zn[t],M=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",U=/^(?:pop|shift)$/.test(t);X.prototype[t]=function(){var q=arguments;if(U&&!this.__chain__){var te=this.value();return f.apply(pt(te)?te:[],q)}return this[M](function(ae){return f.apply(pt(ae)?ae:[],q)})}}),xr($t.prototype,function(t,f){var M=X[f];if(M){var U=M.name+"";Ut.call(ns,U)||(ns[U]=[]),ns[U].push({name:f,func:M})}}),ns[_a(e,m).name]=[{name:"wrapper",func:e}],$t.prototype.clone=Om,$t.prototype.reverse=Nm,$t.prototype.value=Dm,X.prototype.at=hw,X.prototype.chain=dw,X.prototype.commit=fw,X.prototype.next=pw,X.prototype.plant=mw,X.prototype.reverse=vw,X.prototype.toJSON=X.prototype.valueOf=X.prototype.value=yw,X.prototype.first=X.prototype.head,Ms&&(X.prototype[Ms]=gw),X},Tt=$n();An?((An.exports=Tt)._=Tt,Xt._=Tt):Vt._=Tt}).call($k)}(Ks,Ks.exports)),Ks.exports}var Ag=Mk();const $g=tl(Ag),Tk={mixins:[_g],props:{calculatePacketText:{type:Function,default:l=>`${l}`}},data:function(){return{history:[],historyPointer:-1,filterText:null,paused:!1,pausedAt:0,pauseOffset:0,pausedHistory:[],rows:1,textarea:null,displayText:"",rules:{required:l=>!!l||"Required.",min:l=>l>=1||"Minimum: 1",max:l=>parseInt(l)<=this.currentConfig.history||`Maximum: ${this.currentConfig.history}`}}},computed:{allInstantSettings:function(){return`${this.currentConfig.showLineAddress}|${this.currentConfig.showTimestamp}|${this.currentConfig.showAscii}|${this.currentConfig.newestAtTop}|${this.pauseOffset}`},allDebouncedSettings:function(){return`${this.currentConfig.bytesPerLine}|${this.currentConfig.packetsToShow}|${this.filterText}`}},watch:{latestData:function(l){l.forEach(c=>{"buffer"in c&&(c.buffer=atob(c.buffer)),this.historyPointer=++this.historyPointer%this.currentConfig.history,isNaN(this.historyPointer)&&(this.historyPointer=0),this.history[this.historyPointer]=c,this.paused||this.rebuildDisplayText()})},paused:function(l){l?(this.pausedAt=this.historyPointer,this.pausedHistory=this.history.slice()):(this.pauseOffset=0,this.rebuildDisplayText())},allInstantSettings:function(){this.rebuildDisplayText()},allDebouncedSettings:$g.debounce(function(){this.rebuildDisplayText()},300)},created:function(){const l={history:300,showTimestamp:!0,showAscii:!0,showLineAddress:!0,packetsToShow:1,bytesPerLine:16,newestAtTop:!0};this.currentConfig={...l,...this.currentConfig}},methods:{rebuildDisplayText:function(){let l=this.paused?this.pausedHistory:this.history;const c=this.paused?this.pausedAt:this.historyPointer;if(l=l.filter($=>$).slice(c+1,this.currentConfig.history).concat(l.slice(0,c+1)).map(this.calculatePacketText).map(this.matchesSearch),this.paused){const $=Math.max(l.length+this.pauseOffset,1);l=l.slice(0,$)}const e=Math.max(this.currentConfig.packetsToShow,1);l=l.slice(-e),this.currentConfig.newestAtTop&&(l=l.reverse());let u=`
|
|
1490
|
+
}`;var bt=Wd(function(){return gt(te,Qe+"return "+Oe).apply(e,ae)});if(bt.source=Oe,ec(bt))throw bt;return bt}function M0(t){return Bt(t).toLowerCase()}function T0(t){return Bt(t).toUpperCase()}function L0(t,f,M){if(t=Bt(t),t&&(M||f===e))return jt(t);if(!t||!(f=Li(f)))return t;var U=ft(t),q=ft(f),te=ut(U,q),ae=pn(U,q)+1;return fo(U,te,ae).join("")}function E0(t,f,M){if(t=Bt(t),t&&(M||f===e))return t.slice(0,yt(t)+1);if(!t||!(f=Li(f)))return t;var U=ft(t),q=pn(U,ft(f))+1;return fo(U,0,q).join("")}function R0(t,f,M){if(t=Bt(t),t&&(M||f===e))return t.replace(an,"");if(!t||!(f=Li(f)))return t;var U=ft(t),q=ut(U,ft(f));return fo(U,q).join("")}function I0(t,f){var M=L,U=z;if(cn(f)){var q="separator"in f?f.separator:q;M="length"in f?vt(f.length):M,U="omission"in f?Li(f.omission):U}t=Bt(t);var te=t.length;if(oe(t)){var ae=ft(t);te=ae.length}if(M>=te)return t;var fe=M-kt(U);if(fe<1)return U;var ve=ae?fo(ae,0,fe).join(""):t.slice(0,fe);if(q===e)return ve+U;if(ae&&(fe+=ve.length-fe),tc(q)){if(t.slice(fe).search(q)){var Te,Ee=ve;for(q.global||(q=li(q.source,Bt(Ci.exec(q))+"g")),q.lastIndex=0;Te=q.exec(Ee);)var Oe=Te.index;ve=ve.slice(0,Oe===e?fe:Oe)}}else if(t.indexOf(Li(q),fe)!=fe){var Ue=ve.lastIndexOf(q);Ue>-1&&(ve=ve.slice(0,Ue))}return ve+U}function O0(t){return t=Bt(t),t&&Zr.test(t)?t.replace(Vn,it):t}var N0=os(function(t,f,M){return t+(M?" ":"")+f.toUpperCase()}),rc=Hh("toUpperCase");function Bd(t,f,M){return t=Bt(t),f=M?e:f,f===e?ge(t)?rn(t):Y(t):t.match(f)||[]}var Wd=St(function(t,f){try{return Bn(t,e,f)}catch(M){return ec(M)?M:new nt(M)}}),D0=Ur(function(t,f){return jn(f,function(M){M=kr(M),Hr(t,M,Jl(t[M],t))}),t});function F0(t){var f=t==null?0:t.length,M=rt();return t=f?g(t,function(U){if(typeof U[1]!="function")throw new Kt(v);return[M(U[0]),U[1]]}):[],St(function(U){for(var q=-1;++q<f;){var te=t[q];if(Bn(te[0],this,U))return Bn(te[1],this,U)}})}function P0(t){return cv(Ki(t,a))}function oc(t){return function(){return t}}function B0(t,f){return t==null||t!==t?f:t}var W0=Uh(),H0=Uh(!0);function wi(t){return t}function sc(t){return wh(typeof t=="function"?t:Ki(t,a))}function z0(t){return xh(Ki(t,a))}function U0(t,f){return Sh(t,Ki(f,a))}var V0=St(function(t,f){return function(M){return Ns(M,t,f)}}),j0=St(function(t,f){return function(M){return Ns(t,M,f)}});function ac(t,f,M){var U=Un(f),q=ba(f,U);M==null&&!(cn(f)&&(q.length||!U.length))&&(M=f,f=t,t=this,q=ba(f,Un(f)));var te=!(cn(M)&&"chain"in M)||!!M.chain,ae=jr(t);return jn(q,function(fe){var ve=f[fe];t[fe]=ve,ae&&(t.prototype[fe]=function(){var Te=this.__chain__;if(te||Te){var Ee=t(this.__wrapped__),Oe=Ee.__actions__=mi(this.__actions__);return Oe.push({func:ve,args:arguments,thisArg:t}),Ee.__chain__=Te,Ee}return ve.apply(t,_([this.value()],arguments))})}),t}function K0(){return Vt._===this&&(Vt._=ym),this}function lc(){}function G0(t){return t=vt(t),St(function(f){return kh(f,t)})}var q0=Bl(g),Y0=Bl(Kn),Z0=Bl(B);function Hd(t){return Kl(t)?we(kr(t)):Av(t)}function Q0(t){return function(f){return t==null?e:Ro(t,f)}}var J0=jh(),X0=jh(!0);function cc(){return[]}function uc(){return!1}function ex(){return{}}function tx(){return""}function nx(){return!0}function ix(t,f){if(t=vt(t),t<1||t>V)return[];var M=ee,U=ei(t,ee);f=rt(f),t-=ee;for(var q=Ze(U,f);++M<t;)f(M);return q}function rx(t){return pt(t)?g(t,kr):Ei(t)?[t]:mi(ad(Bt(t)))}function ox(t){var f=++mm;return Bt(t)+f}var sx=Aa(function(t,f){return t+f},0),ax=Wl("ceil"),lx=Aa(function(t,f){return t/f},1),cx=Wl("floor");function ux(t){return t&&t.length?wa(t,wi,_l):e}function hx(t,f){return t&&t.length?wa(t,rt(f,2),_l):e}function dx(t){return de(t,wi)}function fx(t,f){return de(t,rt(f,2))}function px(t){return t&&t.length?wa(t,wi,Tl):e}function gx(t,f){return t&&t.length?wa(t,rt(f,2),Tl):e}var mx=Aa(function(t,f){return t*f},1),vx=Wl("round"),yx=Aa(function(t,f){return t-f},0);function wx(t){return t&&t.length?Xe(t,wi):0}function bx(t,f){return t&&t.length?Xe(t,rt(f,2)):0}return X.after=zw,X.ary=yd,X.assign=Tb,X.assignIn=Rd,X.assignInWith=Ba,X.assignWith=Lb,X.at=Eb,X.before=wd,X.bind=Jl,X.bindAll=D0,X.bindKey=bd,X.castArray=eb,X.chain=gd,X.chunk=cy,X.compact=uy,X.concat=hy,X.cond=F0,X.conforms=P0,X.constant=oc,X.countBy=ww,X.create=Rb,X.curry=xd,X.curryRight=Sd,X.debounce=kd,X.defaults=Ib,X.defaultsDeep=Ob,X.defer=Uw,X.delay=Vw,X.difference=dy,X.differenceBy=fy,X.differenceWith=py,X.drop=gy,X.dropRight=my,X.dropRightWhile=vy,X.dropWhile=yy,X.fill=wy,X.filter=xw,X.flatMap=Cw,X.flatMapDeep=_w,X.flatMapDepth=Aw,X.flatten=hd,X.flattenDeep=by,X.flattenDepth=xy,X.flip=jw,X.flow=W0,X.flowRight=H0,X.fromPairs=Sy,X.functions=Hb,X.functionsIn=zb,X.groupBy=$w,X.initial=Cy,X.intersection=_y,X.intersectionBy=Ay,X.intersectionWith=$y,X.invert=Vb,X.invertBy=jb,X.invokeMap=Tw,X.iteratee=sc,X.keyBy=Lw,X.keys=Un,X.keysIn=yi,X.map=Ia,X.mapKeys=Gb,X.mapValues=qb,X.matches=z0,X.matchesProperty=U0,X.memoize=Na,X.merge=Yb,X.mergeWith=Id,X.method=V0,X.methodOf=j0,X.mixin=ac,X.negate=Da,X.nthArg=G0,X.omit=Zb,X.omitBy=Qb,X.once=Kw,X.orderBy=Ew,X.over=q0,X.overArgs=Gw,X.overEvery=Y0,X.overSome=Z0,X.partial=Xl,X.partialRight=Cd,X.partition=Rw,X.pick=Jb,X.pickBy=Od,X.property=Hd,X.propertyOf=Q0,X.pull=Ey,X.pullAll=fd,X.pullAllBy=Ry,X.pullAllWith=Iy,X.pullAt=Oy,X.range=J0,X.rangeRight=X0,X.rearg=qw,X.reject=Nw,X.remove=Ny,X.rest=Yw,X.reverse=Zl,X.sampleSize=Fw,X.set=e0,X.setWith=t0,X.shuffle=Pw,X.slice=Dy,X.sortBy=Hw,X.sortedUniq=Uy,X.sortedUniqBy=Vy,X.split=C0,X.spread=Zw,X.tail=jy,X.take=Ky,X.takeRight=Gy,X.takeRightWhile=qy,X.takeWhile=Yy,X.tap=uw,X.throttle=Qw,X.thru=Ra,X.toArray=Td,X.toPairs=Nd,X.toPairsIn=Dd,X.toPath=rx,X.toPlainObject=Ed,X.transform=n0,X.unary=Jw,X.union=Zy,X.unionBy=Qy,X.unionWith=Jy,X.uniq=Xy,X.uniqBy=ew,X.uniqWith=tw,X.unset=i0,X.unzip=Ql,X.unzipWith=pd,X.update=r0,X.updateWith=o0,X.values=ls,X.valuesIn=s0,X.without=nw,X.words=Bd,X.wrap=Xw,X.xor=iw,X.xorBy=rw,X.xorWith=ow,X.zip=sw,X.zipObject=aw,X.zipObjectDeep=lw,X.zipWith=cw,X.entries=Nd,X.entriesIn=Dd,X.extend=Rd,X.extendWith=Ba,ac(X,X),X.add=sx,X.attempt=Wd,X.camelCase=u0,X.capitalize=Fd,X.ceil=ax,X.clamp=a0,X.clone=tb,X.cloneDeep=ib,X.cloneDeepWith=rb,X.cloneWith=nb,X.conformsTo=ob,X.deburr=Pd,X.defaultTo=B0,X.divide=lx,X.endsWith=h0,X.eq=lr,X.escape=d0,X.escapeRegExp=f0,X.every=bw,X.find=Sw,X.findIndex=cd,X.findKey=Nb,X.findLast=kw,X.findLastIndex=ud,X.findLastKey=Db,X.floor=cx,X.forEach=md,X.forEachRight=vd,X.forIn=Fb,X.forInRight=Pb,X.forOwn=Bb,X.forOwnRight=Wb,X.get=nc,X.gt=sb,X.gte=ab,X.has=Ub,X.hasIn=ic,X.head=dd,X.identity=wi,X.includes=Mw,X.indexOf=ky,X.inRange=l0,X.invoke=Kb,X.isArguments=No,X.isArray=pt,X.isArrayBuffer=lb,X.isArrayLike=vi,X.isArrayLikeObject=xn,X.isBoolean=cb,X.isBuffer=po,X.isDate=ub,X.isElement=hb,X.isEmpty=db,X.isEqual=fb,X.isEqualWith=pb,X.isError=ec,X.isFinite=gb,X.isFunction=jr,X.isInteger=_d,X.isLength=Fa,X.isMap=Ad,X.isMatch=mb,X.isMatchWith=vb,X.isNaN=yb,X.isNative=wb,X.isNil=xb,X.isNull=bb,X.isNumber=$d,X.isObject=cn,X.isObjectLike=mn,X.isPlainObject=Hs,X.isRegExp=tc,X.isSafeInteger=Sb,X.isSet=Md,X.isString=Pa,X.isSymbol=Ei,X.isTypedArray=as,X.isUndefined=kb,X.isWeakMap=Cb,X.isWeakSet=_b,X.join=My,X.kebabCase=p0,X.last=qi,X.lastIndexOf=Ty,X.lowerCase=g0,X.lowerFirst=m0,X.lt=Ab,X.lte=$b,X.max=ux,X.maxBy=hx,X.mean=dx,X.meanBy=fx,X.min=px,X.minBy=gx,X.stubArray=cc,X.stubFalse=uc,X.stubObject=ex,X.stubString=tx,X.stubTrue=nx,X.multiply=mx,X.nth=Ly,X.noConflict=K0,X.noop=lc,X.now=Oa,X.pad=v0,X.padEnd=y0,X.padStart=w0,X.parseInt=b0,X.random=c0,X.reduce=Iw,X.reduceRight=Ow,X.repeat=x0,X.replace=S0,X.result=Xb,X.round=vx,X.runInContext=pe,X.sample=Dw,X.size=Bw,X.snakeCase=k0,X.some=Ww,X.sortedIndex=Fy,X.sortedIndexBy=Py,X.sortedIndexOf=By,X.sortedLastIndex=Wy,X.sortedLastIndexBy=Hy,X.sortedLastIndexOf=zy,X.startCase=_0,X.startsWith=A0,X.subtract=yx,X.sum=wx,X.sumBy=bx,X.template=$0,X.times=ix,X.toFinite=Kr,X.toInteger=vt,X.toLength=Ld,X.toLower=M0,X.toNumber=Yi,X.toSafeInteger=Mb,X.toString=Bt,X.toUpper=T0,X.trim=L0,X.trimEnd=E0,X.trimStart=R0,X.truncate=I0,X.unescape=O0,X.uniqueId=ox,X.upperCase=N0,X.upperFirst=rc,X.each=md,X.eachRight=vd,X.first=dd,ac(X,function(){var t={};return xr(X,function(f,M){Ut.call(X.prototype,M)||(t[M]=f)}),t}(),{chain:!1}),X.VERSION=u,jn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){X[t].placeholder=X}),jn(["drop","take"],function(t,f){$t.prototype[t]=function(M){M=M===e?1:In(vt(M),0);var U=this.__filtered__&&!f?new $t(this):this.clone();return U.__filtered__?U.__takeCount__=ei(M,U.__takeCount__):U.__views__.push({size:ei(M,ee),type:t+(U.__dir__<0?"Right":"")}),U},$t.prototype[t+"Right"]=function(M){return this.reverse()[t](M).reverse()}}),jn(["filter","map","takeWhile"],function(t,f){var M=f+1,U=M==A||M==N;$t.prototype[t]=function(q){var te=this.clone();return te.__iteratees__.push({iteratee:rt(q,3),type:M}),te.__filtered__=te.__filtered__||U,te}}),jn(["head","last"],function(t,f){var M="take"+(f?"Right":"");$t.prototype[t]=function(){return this[M](1).value()[0]}}),jn(["initial","tail"],function(t,f){var M="drop"+(f?"":"Right");$t.prototype[t]=function(){return this.__filtered__?new $t(this):this[M](1)}}),$t.prototype.compact=function(){return this.filter(wi)},$t.prototype.find=function(t){return this.filter(t).head()},$t.prototype.findLast=function(t){return this.reverse().find(t)},$t.prototype.invokeMap=St(function(t,f){return typeof t=="function"?new $t(this):this.map(function(M){return Ns(M,t,f)})}),$t.prototype.reject=function(t){return this.filter(Da(rt(t)))},$t.prototype.slice=function(t,f){t=vt(t);var M=this;return M.__filtered__&&(t>0||f<0)?new $t(M):(t<0?M=M.takeRight(-t):t&&(M=M.drop(t)),f!==e&&(f=vt(f),M=f<0?M.dropRight(-f):M.take(f-t)),M)},$t.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},$t.prototype.toArray=function(){return this.take(ee)},xr($t.prototype,function(t,f){var M=/^(?:filter|find|map|reject)|While$/.test(f),U=/^(?:head|last)$/.test(f),q=X[U?"take"+(f=="last"?"Right":""):f],te=U||/^find/.test(f);q&&(X.prototype[f]=function(){var ae=this.__wrapped__,fe=U?[1]:arguments,ve=ae instanceof $t,Te=fe[0],Ee=ve||pt(ae),Oe=function(Ct){var Lt=q.apply(X,_([Ct],fe));return U&&Ue?Lt[0]:Lt};Ee&&M&&typeof Te=="function"&&Te.length!=1&&(ve=Ee=!1);var Ue=this.__chain__,Qe=!!this.__actions__.length,st=te&&!Ue,bt=ve&&!Qe;if(!te&&Ee){ae=bt?ae:new $t(this);var at=t.apply(ae,fe);return at.__actions__.push({func:Ra,args:[Oe],thisArg:e}),new ji(at,Ue)}return st&&bt?t.apply(this,fe):(at=this.thru(Oe),st?U?at.value()[0]:at.value():at)})}),jn(["pop","push","shift","sort","splice","unshift"],function(t){var f=zn[t],M=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",U=/^(?:pop|shift)$/.test(t);X.prototype[t]=function(){var q=arguments;if(U&&!this.__chain__){var te=this.value();return f.apply(pt(te)?te:[],q)}return this[M](function(ae){return f.apply(pt(ae)?ae:[],q)})}}),xr($t.prototype,function(t,f){var M=X[f];if(M){var U=M.name+"";Ut.call(ns,U)||(ns[U]=[]),ns[U].push({name:f,func:M})}}),ns[_a(e,m).name]=[{name:"wrapper",func:e}],$t.prototype.clone=Om,$t.prototype.reverse=Nm,$t.prototype.value=Dm,X.prototype.at=hw,X.prototype.chain=dw,X.prototype.commit=fw,X.prototype.next=pw,X.prototype.plant=mw,X.prototype.reverse=vw,X.prototype.toJSON=X.prototype.valueOf=X.prototype.value=yw,X.prototype.first=X.prototype.head,Ms&&(X.prototype[Ms]=gw),X},Tt=$n();An?((An.exports=Tt)._=Tt,Xt._=Tt):Vt._=Tt}).call($k)}(Ks,Ks.exports)),Ks.exports}var Ag=Mk();const $g=tl(Ag),Tk={mixins:[_g],props:{calculatePacketText:{type:Function,default:l=>`${l}`}},data:function(){return{history:[],historyPointer:-1,filterText:null,paused:!1,pausedAt:0,pauseOffset:0,pausedHistory:[],rows:1,textarea:null,displayText:"",rules:{required:l=>!!l||"Required.",min:l=>l>=1||"Minimum: 1",max:l=>parseInt(l)<=this.currentConfig.history||`Maximum: ${this.currentConfig.history}`}}},computed:{allInstantSettings:function(){return`${this.currentConfig.showLineAddress}|${this.currentConfig.showTimestamp}|${this.currentConfig.showAscii}|${this.currentConfig.newestAtTop}|${this.pauseOffset}`},allDebouncedSettings:function(){return`${this.currentConfig.bytesPerLine}|${this.currentConfig.packetsToShow}|${this.filterText}`}},watch:{latestData:function(l){l.forEach(c=>{"buffer"in c&&(c.buffer=atob(c.buffer)),this.historyPointer=++this.historyPointer%this.currentConfig.history,isNaN(this.historyPointer)&&(this.historyPointer=0),this.history[this.historyPointer]=c,this.paused||this.rebuildDisplayText()})},paused:function(l){l?(this.pausedAt=this.historyPointer,this.pausedHistory=this.history.slice()):(this.pauseOffset=0,this.rebuildDisplayText())},allInstantSettings:function(){this.rebuildDisplayText()},allDebouncedSettings:$g.debounce(function(){this.rebuildDisplayText()},300)},created:function(){const l={history:300,showTimestamp:!0,showAscii:!0,showLineAddress:!0,packetsToShow:1,bytesPerLine:16,newestAtTop:!0};this.currentConfig={...l,...this.currentConfig}},methods:{rebuildDisplayText:function(){let l=this.paused?this.pausedHistory:this.history;const c=this.paused?this.pausedAt:this.historyPointer;if(l=l.filter($=>$).slice(c+1,this.currentConfig.history).concat(l.slice(0,c+1)).map(this.calculatePacketText).map(this.matchesSearch),this.paused){const $=Math.max(l.length+this.pauseOffset,1);l=l.slice(0,$)}const e=Math.max(this.currentConfig.packetsToShow,1);l=l.slice(-e),this.currentConfig.newestAtTop&&(l=l.reverse());let u=`
|
|
1491
1491
|
`;this.filterText!==null&&(u+=`
|
|
1492
1492
|
`),this.displayText=l.join(u),this.rows=this.displayText.split(`
|
|
1493
1493
|
`).length},matchesSearch:function(l){return this.filterText===null?l:l.split(`
|
|
1494
1494
|
`).filter(c=>c.toLowerCase().includes(this.filterText.toLowerCase())).join(`
|
|
1495
|
-
`)},download:function(){const l=new Blob([this.displayText],{type:"text/plain"}),c=document.createElement("a");let e=URL.createObjectURL(l);c.href=e,c.setAttribute("download",`${Sx.format(new Date,"yyyy_MM_dd_HH_mm_ss")}.txt`),c.click(),window.URL.revokeObjectURL(e)},pause:function(){this.paused=!0},togglePlayPause:function(){this.paused=!this.paused},stepBackward:function(){this.pause(),this.pauseOffset--},stepForward:function(){this.pause(),this.pauseOffset++}}},Lk={class:"pa-2"},Ek={class:"text-area-container"},Rk={class:"floating-buttons"};function Ik(l,c,e,u,$,b){const v=Ge.resolveComponent("v-text-field"),x=Ge.resolveComponent("v-col"),p=Ge.resolveComponent("v-slider"),d=Ge.resolveComponent("v-row"),o=Ge.resolveComponent("v-textarea"),a=Ge.resolveComponent("v-btn"),s=Ge.resolveComponent("v-card-title"),r=Ge.resolveComponent("v-switch"),n=Ge.resolveComponent("v-radio"),i=Ge.resolveComponent("v-radio-group"),h=Ge.resolveComponent("v-card-text"),m=Ge.resolveComponent("v-card"),y=Ge.resolveComponent("v-menu");return Ge.openBlock(),Ge.createElementBlock("div",Lk,[Ge.createVNode(d,{dense:"",class:"mb-2"},{default:Ge.withCtx(()=>[Ge.createVNode(x,{cols:"4"},{default:Ge.withCtx(()=>[Ge.createVNode(v,{modelValue:l.filterText,"onUpdate:modelValue":c[0]||(c[0]=R=>l.filterText=R),label:"Search",class:"search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"","data-test":"history-component-search"},null,8,["modelValue"])]),_:1}),Ge.createVNode(x,{cols:"8",class:"mt-1"},{default:Ge.withCtx(()=>[Ge.createVNode(p,{modelValue:l.pauseOffset,"onUpdate:modelValue":c[1]||(c[1]=R=>l.pauseOffset=R),"prepend-icon":"mdi-step-backward","append-icon":"mdi-step-forward",min:1-l.currentConfig.history,max:0,"hide-details":"",onMousedown:b.pause,"onClick:prepend":b.stepBackward,"onClick:append":b.stepForward},null,8,["modelValue","min","onMousedown","onClick:prepend","onClick:append"])]),_:1})]),_:1}),Ge.createVNode(d,{dense:"","no-gutters":""},{default:Ge.withCtx(()=>[Ge.createVNode(x,null,{default:Ge.withCtx(()=>[Ge.createElementVNode("div",Ek,[Ge.createVNode(o,{"model-value":l.displayText,rows:l.rows,"no-resize":"",readonly:"",variant:"solo",flat:"","hide-details":"","data-test":"history-component-text-area"},null,8,["model-value","rows"]),Ge.createElementVNode("div",Rk,[Ge.createVNode(y,{"close-on-content-click":!1,"min-width":700},{activator:Ge.withCtx(({props:R})=>[Ge.createVNode(a,Ge.mergeProps({class:"ml-2",color:"secondary"},R,{icon:"astro:settings",size:"small","aria-label":"Settings","data-test":"history-component-open-settings"}),null,16)]),default:Ge.withCtx(()=>[Ge.createVNode(m,null,{default:Ge.withCtx(()=>[Ge.createVNode(s,{"data-test":"display-settings-card"},{default:Ge.withCtx(()=>[...c[9]||(c[9]=[Ge.createTextVNode(" Display settings ",-1)])]),_:1}),Ge.createVNode(h,null,{default:Ge.withCtx(()=>[Ge.createVNode(d,null,{default:Ge.withCtx(()=>[Ge.createVNode(x,null,{default:Ge.withCtx(()=>[Ge.createVNode(r,{modelValue:l.currentConfig.showTimestamp,"onUpdate:modelValue":c[2]||(c[2]=R=>l.currentConfig.showTimestamp=R),label:"Show timestamp",density:"compact",color:"primary","hide-details":"","data-test":"history-component-settings-show-timestamp"},null,8,["modelValue"]),l.hasRaw?(Ge.openBlock(),Ge.createBlock(r,{key:0,modelValue:l.currentConfig.showAscii,"onUpdate:modelValue":c[3]||(c[3]=R=>l.currentConfig.showAscii=R),label:"Show ASCII",density:"compact",color:"primary","hide-details":"","data-test":"history-component-settings-show-ascii"},null,8,["modelValue"])):Ge.createCommentVNode("",!0),l.hasRaw?(Ge.openBlock(),Ge.createBlock(r,{key:1,modelValue:l.currentConfig.showLineAddress,"onUpdate:modelValue":c[4]||(c[4]=R=>l.currentConfig.showLineAddress=R),label:"Show line address",density:"compact",color:"primary","hide-details":"","data-test":"history-component-settings-show-address"},null,8,["modelValue"])):Ge.createCommentVNode("",!0)]),_:1}),Ge.createVNode(x,null,{default:Ge.withCtx(()=>[Ge.createVNode(i,{modelValue:l.currentConfig.newestAtTop,"onUpdate:modelValue":c[5]||(c[5]=R=>l.currentConfig.newestAtTop=R),label:"Print newest to the"},{default:Ge.withCtx(()=>[Ge.createVNode(n,{label:"Top",value:!0,"data-test":"history-component-settings-newest-top"}),Ge.createVNode(n,{label:"Bottom",value:!1,"data-test":"history-component-settings-newest-bottom"})]),_:1},8,["modelValue"])]),_:1}),Ge.createVNode(x,null,{default:Ge.withCtx(()=>[Ge.createVNode(v,{modelValue:l.currentConfig.history,"onUpdate:modelValue":c[6]||(c[6]=R=>l.currentConfig.history=R),label:"History Buffer",type:"number",min:"1","persistent-hint":"",rules:[l.rules.required,l.rules.min],"data-test":"history-component-settings-history"},null,8,["modelValue","rules"]),l.hasRaw?(Ge.openBlock(),Ge.createBlock(v,{key:0,modelValue:l.currentConfig.bytesPerLine,"onUpdate:modelValue":c[7]||(c[7]=R=>l.currentConfig.bytesPerLine=R),label:"Bytes per line",type:"number",min:"1",rules:[l.rules.required,l.rules.min],"data-test":"history-component-settings-num-bytes"},null,8,["modelValue","rules"])):Ge.createCommentVNode("",!0),Ge.createVNode(v,{modelValue:l.currentConfig.packetsToShow,"onUpdate:modelValue":c[8]||(c[8]=R=>l.currentConfig.packetsToShow=R),label:"Entries to show",type:"number",min:"1",hint:`Maximum: ${l.currentConfig.history}`,"persistent-hint":"",rules:[l.rules.required,l.rules.min,l.rules.max],"data-test":"history-component-settings-num-packets"},null,8,["modelValue","hint","rules"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),Ge.createVNode(a,{class:"ml-2",color:"secondary",icon:"mdi-file-download",size:"small","aria-label":"Download","data-test":"history-component-download",onClick:b.download},null,8,["onClick"]),Ge.createVNode(a,{class:Ge.normalizeClass(["ml-2",{blink:l.paused}]),color:"primary",icon:l.paused?"mdi-play":"mdi-pause",size:"large","aria-label":l.paused?"Play":"Pause","data-test":"history-component-play-pause",onClick:b.togglePlayPause},null,8,["class","icon","aria-label","onClick"])])])]),_:1})]),_:1})])}const Ok=xx._export_sfc(Tk,[["render",Ik],["__scopeId","data-v-3c27986d"]]);var _c={exports:{}},Af;function Nk(){return Af||(Af=1,function(l,c){(function(){ace.require(["ace/mode/text"],function(e){l&&(l.exports=e)})})()}(_c)),_c.exports}Nk();const Dk=!0,Dn="u-",Fk="uplot",Pk=Dn+"hz",Wk=Dn+"vt",Bk=Dn+"title",Hk=Dn+"wrap",zk=Dn+"under",Uk=Dn+"over",Vk=Dn+"axis",Bo=Dn+"off",jk=Dn+"select",Kk=Dn+"cursor-x",Gk=Dn+"cursor-y",qk=Dn+"cursor-pt",Yk=Dn+"legend",Zk=Dn+"live",Qk=Dn+"inline",Jk=Dn+"series",Xk=Dn+"marker",$f=Dn+"label",eC=Dn+"value",Gs="width",qs="height",Us="top",Mf="bottom",us="left",Ac="right",Wu="#000",Tf=Wu+"0",$c="mousemove",Lf="mousedown",Mc="mouseup",Ef="mouseenter",Rf="mouseleave",If="dblclick",tC="resize",nC="scroll",Of="change",Ja="dppxchange",Bu="--",bs=typeof window<"u",wu=bs?document:null,ds=bs?window:null,iC=bs?navigator:null;let Ft,Va;function bu(){let l=devicePixelRatio;Ft!=l&&(Ft=l,Va&&Su(Of,Va,bu),Va=matchMedia(`(min-resolution: ${Ft-.001}dppx) and (max-resolution: ${Ft+.001}dppx)`),Uo(Of,Va,bu),ds.dispatchEvent(new CustomEvent(Ja)))}function Oi(l,c){if(c!=null){let e=l.classList;!e.contains(c)&&e.add(c)}}function xu(l,c){let e=l.classList;e.contains(c)&&e.remove(c)}function en(l,c,e){l.style[c]=e+"px"}function ur(l,c,e,u){let $=wu.createElement(l);return c!=null&&Oi($,c),e!=null&&e.insertBefore($,u),$}function Zi(l,c){return ur("div",l,c)}const Nf=new WeakMap;function _r(l,c,e,u,$){let b="translate("+c+"px,"+e+"px)",v=Nf.get(l);b!=v&&(l.style.transform=b,Nf.set(l,b),c<0||e<0||c>u||e>$?Oi(l,Bo):xu(l,Bo))}const Df=new WeakMap;function Ff(l,c,e){let u=c+e,$=Df.get(l);u!=$&&(Df.set(l,u),l.style.background=c,l.style.borderColor=e)}const Pf=new WeakMap;function Wf(l,c,e,u){let $=c+""+e,b=Pf.get(l);$!=b&&(Pf.set(l,$),l.style.height=e+"px",l.style.width=c+"px",l.style.marginLeft=u?-c/2+"px":0,l.style.marginTop=u?-e/2+"px":0)}const Hu={passive:!0},rC={...Hu,capture:!0};function Uo(l,c,e,u){c.addEventListener(l,e,u?rC:Hu)}function Su(l,c,e,u){c.removeEventListener(l,e,Hu)}bs&&bu();function dr(l,c,e,u){let $;e=e||0,u=u||c.length-1;let b=u<=2147483647;for(;u-e>1;)$=b?e+u>>1:Ni((e+u)/2),c[$]<l?e=$:u=$;return l-c[e]<=c[u]-l?e:u}function Mg(l){return(e,u,$)=>{let b=-1,v=-1;for(let x=u;x<=$;x++)if(l(e[x])){b=x;break}for(let x=$;x>=u;x--)if(l(e[x])){v=x;break}return[b,v]}}const Tg=l=>l!=null,Lg=l=>l!=null&&l>0,cl=Mg(Tg),oC=Mg(Lg);function sC(l,c,e,u=0,$=!1){let b=$?oC:cl,v=$?Lg:Tg;[c,e]=b(l,c,e);let x=l[c],p=l[c];if(c>-1)if(u==1)x=l[c],p=l[e];else if(u==-1)x=l[e],p=l[c];else for(let d=c;d<=e;d++){let o=l[d];v(o)&&(o<x?x=o:o>p&&(p=o))}return[x??Yt,p??-Yt]}function ul(l,c,e,u){let $=zf(l),b=zf(c);l==c&&($==-1?(l*=e,c/=e):(l/=e,c*=e));let v=e==10?qr:Eg,x=$==1?Ni:Qi,p=b==1?Qi:Ni,d=x(v(Nn(l))),o=p(v(Nn(c))),a=ps(e,d),s=ps(e,o);return e==10&&(d<0&&(a=Zt(a,-d)),o<0&&(s=Zt(s,-o))),u||e==2?(l=a*$,c=s*b):(l=Ng(l,a),c=hl(c,s)),[l,c]}function zu(l,c,e,u){let $=ul(l,c,e,u);return l==0&&($[0]=0),c==0&&($[1]=0),$}const Uu=.1,Bf={mode:3,pad:Uu},Zs={pad:0,soft:null,mode:0},aC={min:Zs,max:Zs};function Xa(l,c,e,u){return dl(e)?Hf(l,c,e):(Zs.pad=e,Zs.soft=u?0:null,Zs.mode=u?3:0,Hf(l,c,aC))}function It(l,c){return l??c}function lC(l,c,e){for(c=It(c,0),e=It(e,l.length-1);c<=e;){if(l[c]!=null)return!0;c++}return!1}function Hf(l,c,e){let u=e.min,$=e.max,b=It(u.pad,0),v=It($.pad,0),x=It(u.hard,-Yt),p=It($.hard,Yt),d=It(u.soft,Yt),o=It($.soft,-Yt),a=It(u.mode,0),s=It($.mode,0),r=c-l,n=qr(r),i=di(Nn(l),Nn(c)),h=qr(i),m=Nn(h-n);(r<1e-24||m>10)&&(r=0,(l==0||c==0)&&(r=1e-24,a==2&&d!=Yt&&(b=0),s==2&&o!=-Yt&&(v=0)));let y=r||i||1e3,R=qr(y),T=ps(10,Ni(R)),C=y*(r==0?l==0?.1:1:b),w=Zt(Ng(l-C,T/10),24),E=l>=d&&(a==1||a==3&&w<=d||a==2&&w>=d)?d:Yt,D=di(x,w<E&&l>=E?E:fr(E,w)),I=y*(r==0?c==0?.1:1:v),L=Zt(hl(c+I,T/10),24),z=c<=o&&(s==1||s==3&&L>=o||s==2&&L<=o)?o:-Yt,F=fr(p,L>z&&c<=z?z:di(z,L));return D==F&&D==0&&(F=100),[D,F]}const cC=new Intl.NumberFormat(bs?iC.language:"en-US"),Vu=l=>cC.format(l),Di=Math,Za=Di.PI,Nn=Di.abs,Ni=Di.floor,On=Di.round,Qi=Di.ceil,fr=Di.min,di=Di.max,ps=Di.pow,zf=Di.sign,qr=Di.log10,Eg=Di.log2,uC=(l,c=1)=>Di.sinh(l)*c,Tc=(l,c=1)=>Di.asinh(l/c),Yt=1/0;function Uf(l){return(qr((l^l>>31)-(l>>31))|0)+1}function ku(l,c,e){return fr(di(l,c),e)}function Rg(l){return typeof l=="function"}function Mt(l){return Rg(l)?l:()=>l}const hC=()=>{},Ig=l=>l,Og=(l,c)=>c,dC=l=>null,Vf=l=>!0,jf=(l,c)=>l==c,fC=/\.\d*?(?=9{6,}|0{6,})/gm,jo=l=>{if(Fg(l)||vo.has(l))return l;const c=`${l}`,e=c.match(fC);if(e==null)return l;let u=e[0].length-1;if(c.indexOf("e-")!=-1){let[$,b]=c.split("e");return+`${jo($)}e${b}`}return Zt(l,u)};function Po(l,c){return jo(Zt(jo(l/c))*c)}function hl(l,c){return jo(Qi(jo(l/c))*c)}function Ng(l,c){return jo(Ni(jo(l/c))*c)}function Zt(l,c=0){if(Fg(l))return l;let e=10**c,u=l*e*(1+Number.EPSILON);return On(u)/e}const vo=new Map;function Dg(l){return((""+l).split(".")[1]||"").length}function Xs(l,c,e,u){let $=[],b=u.map(Dg);for(let v=c;v<e;v++){let x=Nn(v),p=Zt(ps(l,v),x);for(let d=0;d<u.length;d++){let o=l==10?+`${u[d]}e${v}`:u[d]*p,a=(v>=0?0:x)+(v>=b[d]?0:b[d]),s=l==10?o:Zt(o,a);$.push(s),vo.set(s,a)}}return $}const Qs={},ju=[],gs=[null,null],go=Array.isArray,Fg=Number.isInteger,pC=l=>l===void 0;function Kf(l){return typeof l=="string"}function dl(l){let c=!1;if(l!=null){let e=l.constructor;c=e==null||e==Object}return c}function gC(l){return l!=null&&typeof l=="object"}const mC=Object.getPrototypeOf(Uint8Array),Pg="__proto__";function ms(l,c=dl){let e;if(go(l)){let u=l.find($=>$!=null);if(go(u)||c(u)){e=Array(l.length);for(let $=0;$<l.length;$++)e[$]=ms(l[$],c)}else e=l.slice()}else if(l instanceof mC)e=l.slice();else if(c(l)){e={};for(let u in l)u!=Pg&&(e[u]=ms(l[u],c))}else e=l;return e}function Mn(l){let c=arguments;for(let e=1;e<c.length;e++){let u=c[e];for(let $ in u)$!=Pg&&(dl(l[$])?Mn(l[$],ms(u[$])):l[$]=ms(u[$]))}return l}const vC=0,yC=1,wC=2;function bC(l,c,e){for(let u=0,$,b=-1;u<c.length;u++){let v=c[u];if(v>b){for($=v-1;$>=0&&l[$]==null;)l[$--]=null;for($=v+1;$<e&&l[$]==null;)l[b=$++]=null}}}function xC(l,c){if(CC(l)){let v=l[0].slice();for(let x=1;x<l.length;x++)v.push(...l[x].slice(1));return _C(v[0])||(v=kC(v)),v}let e=new Set;for(let v=0;v<l.length;v++){let p=l[v][0],d=p.length;for(let o=0;o<d;o++)e.add(p[o])}let u=[Array.from(e).sort((v,x)=>v-x)],$=u[0].length,b=new Map;for(let v=0;v<$;v++)b.set(u[0][v],v);for(let v=0;v<l.length;v++){let x=l[v],p=x[0];for(let d=1;d<x.length;d++){let o=x[d],a=Array($).fill(void 0),s=c?c[v][d]:yC,r=[];for(let n=0;n<o.length;n++){let i=o[n],h=b.get(p[n]);i===null?s!=vC&&(a[h]=i,s==wC&&r.push(h)):a[h]=i}bC(a,r,$),u.push(a)}}return u}const SC=typeof queueMicrotask>"u"?l=>Promise.resolve().then(l):queueMicrotask;function kC(l){let c=l[0],e=c.length,u=Array(e);for(let b=0;b<u.length;b++)u[b]=b;u.sort((b,v)=>c[b]-c[v]);let $=[];for(let b=0;b<l.length;b++){let v=l[b],x=Array(e);for(let p=0;p<e;p++)x[p]=v[u[p]];$.push(x)}return $}function CC(l){let c=l[0][0],e=c.length;for(let u=1;u<l.length;u++){let $=l[u][0];if($.length!=e)return!1;if($!=c){for(let b=0;b<e;b++)if($[b]!=c[b])return!1}}return!0}function _C(l,c=100){const e=l.length;if(e<=1)return!0;let u=0,$=e-1;for(;u<=$&&l[u]==null;)u++;for(;$>=u&&l[$]==null;)$--;if($<=u)return!0;const b=di(1,Ni(($-u+1)/c));for(let v=l[u],x=u+b;x<=$;x+=b){const p=l[x];if(p!=null){if(p<=v)return!1;v=p}}return!0}const Wg=["January","February","March","April","May","June","July","August","September","October","November","December"],Bg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Hg(l){return l.slice(0,3)}const AC=Bg.map(Hg),$C=Wg.map(Hg),MC={MMMM:Wg,MMM:$C,WWWW:Bg,WWW:AC};function Vs(l){return(l<10?"0":"")+l}function TC(l){return(l<10?"00":l<100?"0":"")+l}const LC={YYYY:l=>l.getFullYear(),YY:l=>(l.getFullYear()+"").slice(2),MMMM:(l,c)=>c.MMMM[l.getMonth()],MMM:(l,c)=>c.MMM[l.getMonth()],MM:l=>Vs(l.getMonth()+1),M:l=>l.getMonth()+1,DD:l=>Vs(l.getDate()),D:l=>l.getDate(),WWWW:(l,c)=>c.WWWW[l.getDay()],WWW:(l,c)=>c.WWW[l.getDay()],HH:l=>Vs(l.getHours()),H:l=>l.getHours(),h:l=>{let c=l.getHours();return c==0?12:c>12?c-12:c},AA:l=>l.getHours()>=12?"PM":"AM",aa:l=>l.getHours()>=12?"pm":"am",a:l=>l.getHours()>=12?"p":"a",mm:l=>Vs(l.getMinutes()),m:l=>l.getMinutes(),ss:l=>Vs(l.getSeconds()),s:l=>l.getSeconds(),fff:l=>TC(l.getMilliseconds())};function Ku(l,c){c=c||MC;let e=[],u=/\{([a-z]+)\}|[^{]+/gi,$;for(;$=u.exec(l);)e.push($[0][0]=="{"?LC[$[1]]:$[0]);return b=>{let v="";for(let x=0;x<e.length;x++)v+=typeof e[x]=="string"?e[x]:e[x](b,c);return v}}const EC=new Intl.DateTimeFormat().resolvedOptions().timeZone;function RC(l,c){let e;return c=="UTC"||c=="Etc/UTC"?e=new Date(+l+l.getTimezoneOffset()*6e4):c==EC?e=l:(e=new Date(l.toLocaleString("en-US",{timeZone:c})),e.setMilliseconds(l.getMilliseconds())),e}const zg=l=>l%1==0,el=[1,2,2.5,5],IC=Xs(10,-32,0,el),Ug=Xs(10,0,32,el),OC=Ug.filter(zg),Wo=IC.concat(Ug),Gu=`
|
|
1496
|
-
`,Vg="{YYYY}",Gf=Gu+Vg,jg="{M}/{D}",Ys=Gu+jg,ja=Ys+"/{YY}",Kg="{aa}",NC="{h}:{mm}",hs=NC+Kg,qf=Gu+hs,Yf=":{ss}",Bt=null;function Gg(l){let c=l*1e3,e=c*60,u=e*60,$=u*24,b=$*30,v=$*365,p=(l==1?Xs(10,0,3,el).filter(zg):Xs(10,-3,0,el)).concat([c,c*5,c*10,c*15,c*30,e,e*5,e*10,e*15,e*30,u,u*2,u*3,u*4,u*6,u*8,u*12,$,$*2,$*3,$*4,$*5,$*6,$*7,$*8,$*9,$*10,$*15,b,b*2,b*3,b*4,b*6,v,v*2,v*5,v*10,v*25,v*50,v*100]);const d=[[v,Vg,Bt,Bt,Bt,Bt,Bt,Bt,1],[$*28,"{MMM}",Gf,Bt,Bt,Bt,Bt,Bt,1],[$,jg,Gf,Bt,Bt,Bt,Bt,Bt,1],[u,"{h}"+Kg,ja,Bt,Ys,Bt,Bt,Bt,1],[e,hs,ja,Bt,Ys,Bt,Bt,Bt,1],[c,Yf,ja+" "+hs,Bt,Ys+" "+hs,Bt,qf,Bt,1],[l,Yf+".{fff}",ja+" "+hs,Bt,Ys+" "+hs,Bt,qf,Bt,1]];function o(a){return(s,r,n,i,h,m)=>{let y=[],R=h>=v,T=h>=b&&h<v,C=a(n),w=Zt(C*l,3),E=Lc(C.getFullYear(),R?0:C.getMonth(),T||R?1:C.getDate()),D=Zt(E*l,3);if(T||R){let I=T?h/b:0,L=R?h/v:0,z=w==D?w:Zt(Lc(E.getFullYear()+L,E.getMonth()+I,1)*l,3),F=new Date(On(z/l)),O=F.getFullYear(),A=F.getMonth();for(let S=0;z<=i;S++){let N=Lc(O+L*S,A+I*S,1),B=N-a(Zt(N*l,3));z=Zt((+N+B)*l,3),z<=i&&y.push(z)}}else{let I=h>=$?$:h,L=Ni(n)-Ni(w),z=D+L+hl(w-D,I);y.push(z);let F=a(z),O=F.getHours()+F.getMinutes()/e+F.getSeconds()/u,A=h/u,S=s.axes[r]._space,N=m/S;for(;z=Zt(z+h,l==1?0:3),!(z>i);)if(A>1){let B=Ni(Zt(O+A,6))%24,Z=a(z).getHours()-B;Z>1&&(Z=-1),z-=Z*u,O=(O+A)%24;let ee=y[y.length-1];Zt((z-ee)/h,3)*N>=.7&&y.push(z)}else y.push(z)}return y}}return[p,d,o]}const[DC,FC,PC]=Gg(1),[WC,BC,HC]=Gg(.001);Xs(2,-53,53,[1]);function Zf(l,c){return l.map(e=>e.map((u,$)=>$==0||$==8||u==null?u:c($==1||e[8]==0?u:e[1]+u)))}function Qf(l,c){return(e,u,$,b,v)=>{let x=c.find(n=>v>=n[0])||c[c.length-1],p,d,o,a,s,r;return u.map(n=>{let i=l(n),h=i.getFullYear(),m=i.getMonth(),y=i.getDate(),R=i.getHours(),T=i.getMinutes(),C=i.getSeconds(),w=h!=p&&x[2]||m!=d&&x[3]||y!=o&&x[4]||R!=a&&x[5]||T!=s&&x[6]||C!=r&&x[7]||x[1];return p=h,d=m,o=y,a=R,s=T,r=C,w(i)})}}function zC(l,c){let e=Ku(c);return(u,$,b,v,x)=>$.map(p=>e(l(p)))}function Lc(l,c,e){return new Date(l,c,e)}function Jf(l,c){return c(l)}const UC="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Xf(l,c){return(e,u,$,b)=>b==null?Bu:c(l(u))}function VC(l,c){let e=l.series[c];return e.width?e.stroke(l,c):e.points.width?e.points.stroke(l,c):null}function jC(l,c){return l.series[c].fill(l,c)}const KC={show:!0,live:!0,isolate:!1,mount:hC,markers:{show:!0,width:2,stroke:VC,fill:jC,dash:"solid"},idx:null,idxs:null,values:[]};function GC(l,c){let e=l.cursor.points,u=Zi(),$=e.size(l,c);en(u,Gs,$),en(u,qs,$);let b=$/-2;en(u,"marginLeft",b),en(u,"marginTop",b);let v=e.width(l,c,$);return v&&en(u,"borderWidth",v),u}function qC(l,c){let e=l.series[c].points;return e._fill||e._stroke}function YC(l,c){let e=l.series[c].points;return e._stroke||e._fill}function ZC(l,c){return l.series[c].points.size}const Ec=[0,0];function QC(l,c,e){return Ec[0]=c,Ec[1]=e,Ec}function Ka(l,c,e,u=!0){return $=>{$.button==0&&(!u||$.target==c)&&e($)}}function Rc(l,c,e,u=!0){return $=>{(!u||$.target==c)&&e($)}}const JC={show:!0,x:!0,y:!0,lock:!1,move:QC,points:{one:!1,show:GC,size:ZC,width:0,stroke:YC,fill:qC},bind:{mousedown:Ka,mouseup:Ka,click:Ka,dblclick:Ka,mousemove:Rc,mouseleave:Rc,mouseenter:Rc},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(l,c)=>{c.stopPropagation(),c.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(l,c,e,u,$)=>u-$,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},qg={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},qu=Mn({},qg,{filter:Og}),Yg=Mn({},qu,{size:10}),Zg=Mn({},qg,{show:!1}),Yu='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Qg="bold "+Yu,Jg=1.5,ep={show:!0,scale:"x",stroke:Wu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Qg,side:2,grid:qu,ticks:Yg,border:Zg,font:Yu,lineGap:Jg,rotate:0},XC="Value",e_="Time",tp={show:!0,scale:"x",auto:!1,sorted:1,min:Yt,max:-Yt,idxs:[]};function t_(l,c,e,u,$){return c.map(b=>b==null?"":Vu(b))}function n_(l,c,e,u,$,b,v){let x=[],p=vo.get($)||0;e=v?e:Zt(hl(e,$),p);for(let d=e;d<=u;d=Zt(d+$,p))x.push(Object.is(d,-0)?0:d);return x}function Cu(l,c,e,u,$,b,v){const x=[],p=l.scales[l.axes[c].scale].log,d=p==10?qr:Eg,o=Ni(d(e));$=ps(p,o),p==10&&($=Wo[dr($,Wo)]);let a=e,s=$*p;p==10&&(s=Wo[dr(s,Wo)]);do x.push(a),a=a+$,p==10&&!vo.has(a)&&(a=Zt(a,vo.get($))),a>=s&&($=a,s=$*p,p==10&&(s=Wo[dr(s,Wo)]));while(a<=u);return x}function i_(l,c,e,u,$,b,v){let p=l.scales[l.axes[c].scale].asinh,d=u>p?Cu(l,c,di(p,e),u,$):[p],o=u>=0&&e<=0?[0]:[];return(e<-p?Cu(l,c,di(p,-u),-e,$):[p]).reverse().map(s=>-s).concat(o,d)}const Xg=/./,r_=/[12357]/,o_=/[125]/,np=/1/,_u=(l,c,e,u)=>l.map(($,b)=>c==4&&$==0||b%u==0&&e.test($.toExponential()[$<0?1:0])?$:null);function s_(l,c,e,u,$){let b=l.axes[e],v=b.scale,x=l.scales[v],p=l.valToPos,d=b._space,o=p(10,v),a=p(9,v)-o>=d?Xg:p(7,v)-o>=d?r_:p(5,v)-o>=d?o_:np;if(a==np){let s=Nn(p(1,v)-o);if(s<d)return _u(c.slice().reverse(),x.distr,a,Qi(d/s)).reverse()}return _u(c,x.distr,a,1)}function a_(l,c,e,u,$){let b=l.axes[e],v=b.scale,x=b._space,p=l.valToPos,d=Nn(p(1,v)-p(2,v));return d<x?_u(c.slice().reverse(),3,Xg,Qi(x/d)).reverse():c}function l_(l,c,e,u){return u==null?Bu:c==null?"":Vu(c)}const ip={show:!0,scale:"y",stroke:Wu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Qg,side:3,grid:qu,ticks:Yg,border:Zg,font:Yu,lineGap:Jg,rotate:0};function c_(l,c){let e=3+(l||1)*2;return Zt(e*c,3)}function u_(l,c){let{scale:e,idxs:u}=l.series[0],$=l._data[0],b=l.valToPos($[u[0]],e,!0),v=l.valToPos($[u[1]],e,!0),x=Nn(v-b),p=l.series[c],d=x/(p.points.space*Ft);return u[1]-u[0]<=d}const rp={scale:null,auto:!0,sorted:0,min:Yt,max:-Yt},em=(l,c,e,u,$)=>$,op={show:!0,auto:!0,sorted:0,gaps:em,alpha:1,facets:[Mn({},rp,{scale:"x"}),Mn({},rp,{scale:"y"})]},sp={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:em,alpha:1,points:{show:u_,filter:null},values:null,min:Yt,max:-Yt,idxs:[],path:null,clip:null};function h_(l,c,e,u,$){return e/10}const tm={time:Dk,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},d_=Mn({},tm,{time:!1,ori:1}),ap={};function nm(l,c){let e=ap[l];return e||(e={key:l,plots:[],sub(u){e.plots.push(u)},unsub(u){e.plots=e.plots.filter($=>$!=u)},pub(u,$,b,v,x,p,d){for(let o=0;o<e.plots.length;o++)e.plots[o]!=$&&e.plots[o].pub(u,$,b,v,x,p,d)}},l!=null&&(ap[l]=e)),e}const vs=1,Au=2;function Ko(l,c,e){const u=l.mode,$=l.series[c],b=u==2?l._data[c]:l._data,v=l.scales,x=l.bbox;let p=b[0],d=u==2?b[1]:b[c],o=u==2?v[$.facets[0].scale]:v[l.series[0].scale],a=u==2?v[$.facets[1].scale]:v[$.scale],s=x.left,r=x.top,n=x.width,i=x.height,h=l.valToPosH,m=l.valToPosV;return o.ori==0?e($,p,d,o,a,h,m,s,r,n,i,pl,xs,ml,rm,sm):e($,p,d,o,a,m,h,r,s,i,n,gl,Ss,Ju,om,am)}function Zu(l,c){let e=0,u=0,$=It(l.bands,ju);for(let b=0;b<$.length;b++){let v=$[b];v.series[0]==c?e=v.dir:v.series[1]==c&&(v.dir==1?u|=1:u|=2)}return[e,u==1?-1:u==2?1:u==3?2:0]}function f_(l,c,e,u,$){let b=l.mode,v=l.series[c],x=b==2?v.facets[1].scale:v.scale,p=l.scales[x];return $==-1?p.min:$==1?p.max:p.distr==3?p.dir==1?p.min:p.max:0}function Yr(l,c,e,u,$,b){return Ko(l,c,(v,x,p,d,o,a,s,r,n,i,h)=>{let m=v.pxRound;const y=d.dir*(d.ori==0?1:-1),R=d.ori==0?xs:Ss;let T,C;y==1?(T=e,C=u):(T=u,C=e);let w=m(a(x[T],d,i,r)),E=m(s(p[T],o,h,n)),D=m(a(x[C],d,i,r)),I=m(s(b==1?o.max:o.min,o,h,n)),L=new Path2D($);return R(L,D,I),R(L,w,I),R(L,w,E),L})}function fl(l,c,e,u,$,b){let v=null;if(l.length>0){v=new Path2D;const x=c==0?ml:Ju;let p=e;for(let a=0;a<l.length;a++){let s=l[a];if(s[1]>s[0]){let r=s[0]-p;r>0&&x(v,p,u,r,u+b),p=s[1]}}let d=e+$-p,o=10;d>0&&x(v,p,u-o/2,d,u+b+o)}return v}function p_(l,c,e){let u=l[l.length-1];u&&u[0]==c?u[1]=e:l.push([c,e])}function Qu(l,c,e,u,$,b,v){let x=[],p=l.length;for(let d=$==1?e:u;d>=e&&d<=u;d+=$)if(c[d]===null){let a=d,s=d;if($==1)for(;++d<=u&&c[d]===null;)s=d;else for(;--d>=e&&c[d]===null;)s=d;let r=b(l[a]),n=s==a?r:b(l[s]),i=a-$;r=v<=0&&i>=0&&i<p?b(l[i]):r;let m=s+$;n=v>=0&&m>=0&&m<p?b(l[m]):n,n>=r&&x.push([r,n])}return x}function lp(l){return l==0?Ig:l==1?On:c=>Po(c,l)}function im(l){let c=l==0?pl:gl,e=l==0?($,b,v,x,p,d)=>{$.arcTo(b,v,x,p,d)}:($,b,v,x,p,d)=>{$.arcTo(v,b,p,x,d)},u=l==0?($,b,v,x,p)=>{$.rect(b,v,x,p)}:($,b,v,x,p)=>{$.rect(v,b,p,x)};return($,b,v,x,p,d=0,o=0)=>{d==0&&o==0?u($,b,v,x,p):(d=fr(d,x/2,p/2),o=fr(o,x/2,p/2),c($,b+d,v),e($,b+x,v,b+x,v+p,d),e($,b+x,v+p,b,v+p,o),e($,b,v+p,b,v,o),e($,b,v,b+x,v,d),$.closePath())}}const pl=(l,c,e)=>{l.moveTo(c,e)},gl=(l,c,e)=>{l.moveTo(e,c)},xs=(l,c,e)=>{l.lineTo(c,e)},Ss=(l,c,e)=>{l.lineTo(e,c)},ml=im(0),Ju=im(1),rm=(l,c,e,u,$,b)=>{l.arc(c,e,u,$,b)},om=(l,c,e,u,$,b)=>{l.arc(e,c,u,$,b)},sm=(l,c,e,u,$,b,v)=>{l.bezierCurveTo(c,e,u,$,b,v)},am=(l,c,e,u,$,b,v)=>{l.bezierCurveTo(e,c,$,u,v,b)};function lm(l){return(c,e,u,$,b)=>Ko(c,e,(v,x,p,d,o,a,s,r,n,i,h)=>{let{pxRound:m,points:y}=v,R,T;d.ori==0?(R=pl,T=rm):(R=gl,T=om);const C=Zt(y.width*Ft,3);let w=(y.size-y.width)/2*Ft,E=Zt(w*2,3),D=new Path2D,I=new Path2D,{left:L,top:z,width:F,height:O}=c.bbox;ml(I,L-E,z-E,F+E*2,O+E*2);const A=S=>{if(p[S]!=null){let N=m(a(x[S],d,i,r)),B=m(s(p[S],o,h,n));R(D,N+w,B),T(D,N,B,w,0,Za*2)}};if(b)b.forEach(A);else for(let S=u;S<=$;S++)A(S);return{stroke:C>0?D:null,fill:D,clip:I,flags:vs|Au}})}function cm(l){return(c,e,u,$,b,v)=>{u!=$&&(b!=u&&v!=u&&l(c,e,u),b!=$&&v!=$&&l(c,e,$),l(c,e,v))}}const g_=cm(xs),m_=cm(Ss);function um(l){const c=It(l==null?void 0:l.alignGaps,0);return(e,u,$,b)=>Ko(e,u,(v,x,p,d,o,a,s,r,n,i,h)=>{[$,b]=cl(p,$,b);let m=v.pxRound,y=O=>m(a(O,d,i,r)),R=O=>m(s(O,o,h,n)),T,C;d.ori==0?(T=xs,C=g_):(T=Ss,C=m_);const w=d.dir*(d.ori==0?1:-1),E={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:vs},D=E.stroke;let I=!1;if(b-$>=i*4){let O=ne=>e.posToVal(ne,d.key,!0),A=null,S=null,N,B,V,G=y(x[w==1?$:b]),Z=y(x[$]),ee=y(x[b]),ce=O(w==1?Z+1:ee-1);for(let ne=w==1?$:b;ne>=$&&ne<=b;ne+=w){let he=x[ne],le=(w==1?he<ce:he>ce)?G:y(he),me=p[ne];le==G?me!=null?(B=me,A==null?(T(D,le,R(B)),N=A=S=B):B<A?A=B:B>S&&(S=B)):me===null&&(I=!0):(A!=null&&C(D,G,R(A),R(S),R(N),R(B)),me!=null?(B=me,T(D,le,R(B)),A=S=N=B):(A=S=null,me===null&&(I=!0)),G=le,ce=O(G+w))}A!=null&&A!=S&&V!=G&&C(D,G,R(A),R(S),R(N),R(B))}else for(let O=w==1?$:b;O>=$&&O<=b;O+=w){let A=p[O];A===null?I=!0:A!=null&&T(D,y(x[O]),R(A))}let[z,F]=Zu(e,u);if(v.fill!=null||z!=0){let O=E.fill=new Path2D(D),A=v.fillTo(e,u,v.min,v.max,z),S=R(A),N=y(x[$]),B=y(x[b]);w==-1&&([B,N]=[N,B]),T(O,B,S),T(O,N,S)}if(!v.spanGaps){let O=[];I&&O.push(...Qu(x,p,$,b,w,y,c)),E.gaps=O=v.gaps(e,u,$,b,O),E.clip=fl(O,d.ori,r,n,i,h)}return F!=0&&(E.band=F==2?[Yr(e,u,$,b,D,-1),Yr(e,u,$,b,D,1)]:Yr(e,u,$,b,D,F)),E})}function v_(l){const c=It(l.align,1),e=It(l.ascDesc,!1),u=It(l.alignGaps,0),$=It(l.extend,!1);return(b,v,x,p)=>Ko(b,v,(d,o,a,s,r,n,i,h,m,y,R)=>{[x,p]=cl(a,x,p);let T=d.pxRound,{left:C,width:w}=b.bbox,E=Z=>T(n(Z,s,y,h)),D=Z=>T(i(Z,r,R,m)),I=s.ori==0?xs:Ss;const L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:vs},z=L.stroke,F=s.dir*(s.ori==0?1:-1);let O=D(a[F==1?x:p]),A=E(o[F==1?x:p]),S=A,N=A;$&&c==-1&&(N=C,I(z,N,O)),I(z,A,O);for(let Z=F==1?x:p;Z>=x&&Z<=p;Z+=F){let ee=a[Z];if(ee==null)continue;let ce=E(o[Z]),ne=D(ee);c==1?I(z,ce,O):I(z,S,ne),I(z,ce,ne),O=ne,S=ce}let B=S;$&&c==1&&(B=C+w,I(z,B,O));let[V,G]=Zu(b,v);if(d.fill!=null||V!=0){let Z=L.fill=new Path2D(z),ee=d.fillTo(b,v,d.min,d.max,V),ce=D(ee);I(Z,B,ce),I(Z,N,ce)}if(!d.spanGaps){let Z=[];Z.push(...Qu(o,a,x,p,F,E,u));let ee=d.width*Ft/2,ce=e||c==1?ee:-ee,ne=e||c==-1?-ee:ee;Z.forEach(he=>{he[0]+=ce,he[1]+=ne}),L.gaps=Z=d.gaps(b,v,x,p,Z),L.clip=fl(Z,s.ori,h,m,y,R)}return G!=0&&(L.band=G==2?[Yr(b,v,x,p,z,-1),Yr(b,v,x,p,z,1)]:Yr(b,v,x,p,z,G)),L})}function cp(l,c,e,u,$,b,v=Yt){if(l.length>1){let x=null;for(let p=0,d=1/0;p<l.length;p++)if(c[p]!==void 0){if(x!=null){let o=Nn(l[p]-l[x]);o<d&&(d=o,v=Nn(e(l[p],u,$,b)-e(l[x],u,$,b)))}x=p}}return v}function y_(l){l=l||Qs;const c=It(l.size,[.6,Yt,1]),e=l.align||0,u=l.gap||0;let $=l.radius;$=$==null?[0,0]:typeof $=="number"?[$,0]:$;const b=Mt($),v=1-c[0],x=It(c[1],Yt),p=It(c[2],1),d=It(l.disp,Qs),o=It(l.each,r=>{}),{fill:a,stroke:s}=d;return(r,n,i,h)=>Ko(r,n,(m,y,R,T,C,w,E,D,I,L,z)=>{let F=m.pxRound,O=e,A=u*Ft,S=x*Ft,N=p*Ft,B,V;T.ori==0?[B,V]=b(r,n):[V,B]=b(r,n);const G=T.dir*(T.ori==0?1:-1);let Z=T.ori==0?ml:Ju,ee=T.ori==0?o:(ze,Ot,Gt,_n,oi,qn,sn)=>{o(ze,Ot,Gt,oi,_n,sn,qn)},ce=It(r.bands,ju).find(ze=>ze.series[0]==n),ne=ce!=null?ce.dir:0,he=m.fillTo(r,n,m.min,m.max,ne),ue=F(E(he,C,z,I)),le,me,_e,Ae=L,Me=F(m.width*Ft),qe=!1,Ve=null,ot=null,Je=null,lt=null;a!=null&&(Me==0||s!=null)&&(qe=!0,Ve=a.values(r,n,i,h),ot=new Map,new Set(Ve).forEach(ze=>{ze!=null&&ot.set(ze,new Path2D)}),Me>0&&(Je=s.values(r,n,i,h),lt=new Map,new Set(Je).forEach(ze=>{ze!=null&<.set(ze,new Path2D)})));let{x0:Ht,size:vn}=d;if(Ht!=null&&vn!=null){O=1,y=Ht.values(r,n,i,h),Ht.unit==2&&(y=y.map(Gt=>r.posToVal(D+Gt*L,T.key,!0)));let ze=vn.values(r,n,i,h);vn.unit==2?me=ze[0]*L:me=w(ze[0],T,L,D)-w(0,T,L,D),Ae=cp(y,R,w,T,L,D,Ae),_e=Ae-me+A}else Ae=cp(y,R,w,T,L,D,Ae),_e=Ae*v+A,me=Ae-_e;_e<1&&(_e=0),Me>=me/2&&(Me=0),_e<5&&(F=Ig);let Pt=_e>0,Si=Ae-_e-(Pt?Me:0);me=F(ku(Si,N,S)),le=(O==0?me/2:O==G?0:me)-O*G*((O==0?A/2:0)+(Pt?Me/2:0));const on={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Cn=qe?null:new Path2D;let Fn=null;if(ce!=null)Fn=r.data[ce.series[1]];else{let{y0:ze,y1:Ot}=d;ze!=null&&Ot!=null&&(R=Ot.values(r,n,i,h),Fn=ze.values(r,n,i,h))}let ri=B*me,dt=V*me;for(let ze=G==1?i:h;ze>=i&&ze<=h;ze+=G){let Ot=R[ze];if(Ot==null)continue;if(Fn!=null){let zt=Fn[ze]??0;if(Ot-zt==0)continue;ue=E(zt,C,z,I)}let Gt=T.distr!=2||d!=null?y[ze]:ze,_n=w(Gt,T,L,D),oi=E(It(Ot,he),C,z,I),qn=F(_n-le),sn=F(di(oi,ue)),Tn=F(fr(oi,ue)),Pn=sn-Tn;if(Ot!=null){let zt=Ot<0?dt:ri,Ln=Ot<0?ri:dt;qe?(Me>0&&Je[ze]!=null&&Z(lt.get(Je[ze]),qn,Tn+Ni(Me/2),me,di(0,Pn-Me),zt,Ln),Ve[ze]!=null&&Z(ot.get(Ve[ze]),qn,Tn+Ni(Me/2),me,di(0,Pn-Me),zt,Ln)):Z(Cn,qn,Tn+Ni(Me/2),me,di(0,Pn-Me),zt,Ln),ee(r,n,ze,qn-Me/2,Tn,me+Me,Pn)}}return Me>0?on.stroke=qe?lt:Cn:qe||(on._fill=m.width==0?m._fill:m._stroke??m._fill,on.width=0),on.fill=qe?ot:Cn,on})}function w_(l,c){const e=It(c==null?void 0:c.alignGaps,0);return(u,$,b,v)=>Ko(u,$,(x,p,d,o,a,s,r,n,i,h,m)=>{[b,v]=cl(d,b,v);let y=x.pxRound,R=B=>y(s(B,o,h,n)),T=B=>y(r(B,a,m,i)),C,w,E;o.ori==0?(C=pl,E=xs,w=sm):(C=gl,E=Ss,w=am);const D=o.dir*(o.ori==0?1:-1);let I=R(p[D==1?b:v]),L=I,z=[],F=[];for(let B=D==1?b:v;B>=b&&B<=v;B+=D)if(d[B]!=null){let G=p[B],Z=R(G);z.push(L=Z),F.push(T(d[B]))}const O={stroke:l(z,F,C,E,w,y),fill:null,clip:null,band:null,gaps:null,flags:vs},A=O.stroke;let[S,N]=Zu(u,$);if(x.fill!=null||S!=0){let B=O.fill=new Path2D(A),V=x.fillTo(u,$,x.min,x.max,S),G=T(V);E(B,L,G),E(B,I,G)}if(!x.spanGaps){let B=[];B.push(...Qu(p,d,b,v,D,R,e)),O.gaps=B=x.gaps(u,$,b,v,B),O.clip=fl(B,o.ori,n,i,h,m)}return N!=0&&(O.band=N==2?[Yr(u,$,b,v,A,-1),Yr(u,$,b,v,A,1)]:Yr(u,$,b,v,A,N)),O})}function b_(l){return w_(x_,l)}function x_(l,c,e,u,$,b){const v=l.length;if(v<2)return null;const x=new Path2D;if(e(x,l[0],c[0]),v==2)u(x,l[1],c[1]);else{let p=Array(v),d=Array(v-1),o=Array(v-1),a=Array(v-1);for(let s=0;s<v-1;s++)o[s]=c[s+1]-c[s],a[s]=l[s+1]-l[s],d[s]=o[s]/a[s];p[0]=d[0];for(let s=1;s<v-1;s++)d[s]===0||d[s-1]===0||d[s-1]>0!=d[s]>0?p[s]=0:(p[s]=3*(a[s-1]+a[s])/((2*a[s]+a[s-1])/d[s-1]+(a[s]+2*a[s-1])/d[s]),isFinite(p[s])||(p[s]=0));p[v-1]=d[v-2];for(let s=0;s<v-1;s++)$(x,l[s]+a[s]/3,c[s]+p[s]*a[s]/3,l[s+1]-a[s]/3,c[s+1]-p[s+1]*a[s]/3,l[s+1],c[s+1])}return x}const $u=new Set;function up(){for(let l of $u)l.syncRect(!0)}bs&&(Uo(tC,ds,up),Uo(nC,ds,up,!0),Uo(Ja,ds,()=>{ii.pxRatio=Ft}));const S_=um(),k_=lm();function hp(l,c,e,u){return(u?[l[0],l[1]].concat(l.slice(2)):[l[0]].concat(l.slice(1))).map((b,v)=>Mu(b,v,c,e))}function C_(l,c){return l.map((e,u)=>u==0?{}:Mn({},c,e))}function Mu(l,c,e,u){return Mn({},c==0?e:u,l)}function hm(l,c,e){return c==null?gs:[c,e]}const __=hm;function A_(l,c,e){return c==null?gs:Xa(c,e,Uu,!0)}function dm(l,c,e,u){return c==null?gs:ul(c,e,l.scales[u].log,!1)}const $_=dm;function fm(l,c,e,u){return c==null?gs:zu(c,e,l.scales[u].log,!1)}const M_=fm;function T_(l,c,e,u,$){let b=di(Uf(l),Uf(c)),v=c-l,x=dr($/u*v,e);do{let p=e[x],d=u*p/v;if(d>=$&&b+(p<5?vo.get(p):0)<=17)return[p,d]}while(++x<e.length);return[0,0]}function dp(l){let c,e;return l=l.replace(/(\d+)px/,(u,$)=>(c=On((e=+$)*Ft))+"px"),[l,c,e]}function L_(l){l.show&&[l.font,l.labelFont].forEach(c=>{let e=Zt(c[2]*Ft,1);c[0]=c[0].replace(/[0-9.]+px/,e+"px"),c[1]=e})}function ii(l,c,e){const u={mode:It(l.mode,1)},$=u.mode;function b(j,Q,re,oe){let ge=Q.valToPct(j);return oe+re*(Q.dir==-1?1-ge:ge)}function v(j,Q,re,oe){let ge=Q.valToPct(j);return oe+re*(Q.dir==-1?ge:1-ge)}function x(j,Q,re,oe){return Q.ori==0?b(j,Q,re,oe):v(j,Q,re,oe)}u.valToPosH=b,u.valToPosV=v;let p=!1;u.status=0;const d=u.root=Zi(Fk);if(l.id!=null&&(d.id=l.id),Oi(d,l.class),l.title){let j=Zi(Bk,d);j.textContent=l.title}const o=ur("canvas"),a=u.ctx=o.getContext("2d"),s=Zi(Hk,d);Uo("click",s,j=>{j.target===n&&(Dt!=Bi||At!=br)&&hn.click(u,j)},!0);const r=u.under=Zi(zk,s);s.appendChild(o);const n=u.over=Zi(Uk,s);l=ms(l);const i=+It(l.pxAlign,1),h=lp(i);(l.plugins||[]).forEach(j=>{j.opts&&(l=j.opts(u,l)||l)});const m=l.ms||.001,y=u.series=$==1?hp(l.series||[],tp,sp,!1):C_(l.series||[null],op),R=u.axes=hp(l.axes||[],ep,ip,!0),T=u.scales={},C=u.bands=l.bands||[];C.forEach(j=>{j.fill=Mt(j.fill||null),j.dir=It(j.dir,-1)});const w=$==2?y[1].facets[0].scale:y[0].scale,E={axes:Ir,series:Zo},D=(l.drawOrder||["axes","series"]).map(j=>E[j]);function I(j){const Q=j.distr==3?re=>qr(re>0?re:j.clamp(u,re,j.min,j.max,j.key)):j.distr==4?re=>Tc(re,j.asinh):j.distr==100?re=>j.fwd(re):re=>re;return re=>{let oe=Q(re),{_min:ge,_max:be}=j,$e=be-ge;return(oe-ge)/$e}}function L(j){let Q=T[j];if(Q==null){let re=(l.scales||Qs)[j]||Qs;if(re.from!=null){L(re.from);let oe=Mn({},T[re.from],re,{key:j});oe.valToPct=I(oe),T[j]=oe}else{Q=T[j]=Mn({},j==w?tm:d_,re),Q.key=j;let oe=Q.time,ge=Q.range,be=go(ge);if((j!=w||$==2&&!oe)&&(be&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?Bf:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?Bf:{mode:1,hard:ge[1],soft:ge[1]}},be=!1),!be&&dl(ge))){let $e=ge;ge=(Ne,Fe,He)=>Fe==null?gs:Xa(Fe,He,$e)}Q.range=Mt(ge||(oe?__:j==w?Q.distr==3?$_:Q.distr==4?M_:hm:Q.distr==3?dm:Q.distr==4?fm:A_)),Q.auto=Mt(be?!1:Q.auto),Q.clamp=Mt(Q.clamp||h_),Q._min=Q._max=null,Q.valToPct=I(Q)}}}L("x"),L("y"),$==1&&y.forEach(j=>{L(j.scale)}),R.forEach(j=>{L(j.scale)});for(let j in l.scales)L(j);const z=T[w],F=z.distr;let O,A;z.ori==0?(Oi(d,Pk),O=b,A=v):(Oi(d,Wk),O=v,A=b);const S={};for(let j in T){let Q=T[j];(Q.min!=null||Q.max!=null)&&(S[j]={min:Q.min,max:Q.max},Q.min=Q.max=null)}const N=l.tzDate||(j=>new Date(On(j/m))),B=l.fmtDate||Ku,V=m==1?PC(N):HC(N),G=Qf(N,Zf(m==1?FC:BC,B)),Z=Xf(N,Jf(UC,B)),ee=[],ce=u.legend=Mn({},KC,l.legend),ne=u.cursor=Mn({},JC,{drag:{y:$==2}},l.cursor),he=ce.show,ue=ne.show,le=ce.markers;ce.idxs=ee,le.width=Mt(le.width),le.dash=Mt(le.dash),le.stroke=Mt(le.stroke),le.fill=Mt(le.fill);let me,_e,Ae,Me=[],qe=[],Ve,ot=!1,Je={};if(ce.live){const j=y[1]?y[1].values:null;ot=j!=null,Ve=ot?j(u,1,0):{_:0};for(let Q in Ve)Je[Q]=Bu}if(he)if(me=ur("table",Yk,d),Ae=ur("tbody",null,me),ce.mount(u,me),ot){_e=ur("thead",null,me,Ae);let j=ur("tr",null,_e);ur("th",null,j);for(var lt in Ve)ur("th",$f,j).textContent=lt}else Oi(me,Qk),ce.live&&Oi(me,Zk);const Ht={show:!0},vn={show:!1};function Pt(j,Q){if(Q==0&&(ot||!ce.live||$==2))return gs;let re=[],oe=ur("tr",Jk,Ae,Ae.childNodes[Q]);Oi(oe,j.class),j.show||Oi(oe,Bo);let ge=ur("th",null,oe);if(le.show){let Ne=Zi(Xk,ge);if(Q>0){let Fe=le.width(u,Q);Fe&&(Ne.style.border=Fe+"px "+le.dash(u,Q)+" "+le.stroke(u,Q)),Ne.style.background=le.fill(u,Q)}}let be=Zi($f,ge);j.label instanceof HTMLElement?be.appendChild(j.label):be.textContent=j.label,Q>0&&(le.show||(be.style.color=j.width>0?le.stroke(u,Q):le.fill(u,Q)),on("click",ge,Ne=>{if(ne._lock)return;tr(Ne);let Fe=y.indexOf(j);if((Ne.ctrlKey||Ne.metaKey)!=ce.isolate){let He=y.some((je,Ye)=>Ye>0&&Ye!=Fe&&je.show);y.forEach((je,Ye)=>{Ye>0&&ai(Ye,He?Ye==Fe?Ht:vn:Ht,!0,tt.setSeries)})}else ai(Fe,{show:!j.show},!0,tt.setSeries)},!1),nr&&on(Ef,ge,Ne=>{ne._lock||(tr(Ne),ai(y.indexOf(j),Ui,!0,tt.setSeries))},!1));for(var $e in Ve){let Ne=ur("td",eC,oe);Ne.textContent="--",re.push(Ne)}return[oe,re]}const Si=new Map;function on(j,Q,re,oe=!0){const ge=Si.get(Q)||{},be=ne.bind[j](u,Q,re,oe);be&&(Uo(j,Q,ge[j]=be),Si.set(Q,ge))}function Cn(j,Q,re){const oe=Si.get(Q)||{};for(let ge in oe)(j==null||ge==j)&&(Su(ge,Q,oe[ge]),delete oe[ge]);j==null&&Si.delete(Q)}let Fn=0,ri=0,dt=0,ze=0,Ot=0,Gt=0,_n=Ot,oi=Gt,qn=dt,sn=ze,Tn=0,Pn=0,zt=0,Ln=0;u.bbox={};let $r=!1,Ji=!1,Xi=!1,er=!1,Mr=!1,Vn=!1;function Tr(j,Q,re){(re||j!=u.width||Q!=u.height)&&Zr(j,Q),sr(!1),Xi=!0,Ji=!0,wr()}function Zr(j,Q){u.width=Fn=dt=j,u.height=ri=ze=Q,Ot=Gt=0,yo(),Go();let re=u.bbox;Tn=re.left=Po(Ot*Ft,.5),Pn=re.top=Po(Gt*Ft,.5),zt=re.width=Po(dt*Ft,.5),Ln=re.height=Po(ze*Ft,.5)}const ks=3;function ki(){let j=!1,Q=0;for(;!j;){Q++;let re=Qo(Q),oe=$s(Q);j=Q==ks||re&&oe,j||(Zr(u.width,u.height),Ji=!0)}}function Cs({width:j,height:Q}){Tr(j,Q)}u.setSize=Cs;function yo(){let j=!1,Q=!1,re=!1,oe=!1;R.forEach((ge,be)=>{if(ge.show&&ge._show){let{side:$e,_size:Ne}=ge,Fe=$e%2,He=ge.label!=null?ge.labelSize:0,je=Ne+He;je>0&&(Fe?(dt-=je,$e==3?(Ot+=je,oe=!0):re=!0):(ze-=je,$e==0?(Gt+=je,j=!0):Q=!0))}}),rr[0]=j,rr[1]=re,rr[2]=Q,rr[3]=oe,dt-=Qn[1]+Qn[3],Ot+=Qn[3],ze-=Qn[2]+Qn[0],Gt+=Qn[0]}function Go(){let j=Ot+dt,Q=Gt+ze,re=Ot,oe=Gt;function ge(be,$e){switch(be){case 1:return j+=$e,j-$e;case 2:return Q+=$e,Q-$e;case 3:return re-=$e,re+$e;case 0:return oe-=$e,oe+$e}}R.forEach((be,$e)=>{if(be.show&&be._show){let Ne=be.side;be._pos=ge(Ne,be._size),be.label!=null&&(be._lpos=ge(Ne,be.labelSize))}})}if(ne.dataIdx==null){let j=ne.hover,Q=j.skip=new Set(j.skip??[]);Q.add(void 0);let re=j.prox=Mt(j.prox),oe=j.bias??(j.bias=0);ne.dataIdx=(ge,be,$e,Ne)=>{if(be==0)return $e;let Fe=$e,He=re(ge,be,$e,Ne)??Yt,je=He>=0&&He<Yt,Ye=z.ori==0?dt:ze,ht=ne.left,kt=c[0],ft=c[be];if(Q.has(ft[$e])){Fe=null;let yt=null,it=null,et;if(oe==0||oe==-1)for(et=$e;yt==null&&et-- >0;)Q.has(ft[et])||(yt=et);if(oe==0||oe==1)for(et=$e;it==null&&et++<ft.length;)Q.has(ft[et])||(it=et);if(yt!=null||it!=null)if(je){let qt=yt==null?-1/0:O(kt[yt],z,Ye,0),rn=it==null?1/0:O(kt[it],z,Ye,0),$n=ht-qt,Tt=rn-ht;$n<=Tt?$n<=He&&(Fe=yt):Tt<=He&&(Fe=it)}else Fe=it==null?yt:yt==null?it:$e-yt<=it-$e?yt:it}else je&&Nn(ht-O(kt[$e],z,Ye,0))>He&&(Fe=null);return Fe}}const tr=j=>{ne.event=j};ne.idxs=ee,ne._lock=!1;let yn=ne.points;yn.show=Mt(yn.show),yn.size=Mt(yn.size),yn.stroke=Mt(yn.stroke),yn.width=Mt(yn.width),yn.fill=Mt(yn.fill);const Yn=u.focus=Mn({},l.focus||{alpha:.3},ne.focus),nr=Yn.prox>=0,an=nr&&yn.one;let Zn=[],gr=[],ir=[];function wo(j,Q){let re=yn.show(u,Q);if(re instanceof HTMLElement)return Oi(re,qk),Oi(re,j.class),_r(re,-10,-10,dt,ze),n.insertBefore(re,Zn[Q]),re}function qo(j,Q){if($==1||Q>0){let re=$==1&&T[j.scale].time,oe=j.value;j.value=re?Kf(oe)?Xf(N,Jf(oe,B)):oe||Z:oe||l_,j.label=j.label||(re?e_:XC)}if(an||Q>0){j.width=j.width==null?1:j.width,j.paths=j.paths||S_||dC,j.fillTo=Mt(j.fillTo||f_),j.pxAlign=+It(j.pxAlign,i),j.pxRound=lp(j.pxAlign),j.stroke=Mt(j.stroke||null),j.fill=Mt(j.fill||null),j._stroke=j._fill=j._paths=j._focus=null;let re=c_(di(1,j.width),1),oe=j.points=Mn({},{size:re,width:di(1,re*.2),stroke:j.stroke,space:re*2,paths:k_,_stroke:null,_fill:null},j.points);oe.show=Mt(oe.show),oe.filter=Mt(oe.filter),oe.fill=Mt(oe.fill),oe.stroke=Mt(oe.stroke),oe.paths=Mt(oe.paths),oe.pxAlign=j.pxAlign}if(he){let re=Pt(j,Q);Me.splice(Q,0,re[0]),qe.splice(Q,0,re[1]),ce.values.push(null)}if(ue){ee.splice(Q,0,null);let re=null;an?Q==0&&(re=wo(j,Q)):Q>0&&(re=wo(j,Q)),Zn.splice(Q,0,re),gr.splice(Q,0,0),ir.splice(Q,0,0)}Ke("addSeries",Q)}function _s(j,Q){Q=Q??y.length,j=$==1?Mu(j,Q,tp,sp):Mu(j,Q,{},op),y.splice(Q,0,j),qo(y[Q],Q)}u.addSeries=_s;function As(j){if(y.splice(j,1),he){ce.values.splice(j,1),qe.splice(j,1);let Q=Me.splice(j,1)[0];Cn(null,Q.firstChild),Q.remove()}ue&&(ee.splice(j,1),Zn.splice(j,1)[0].remove(),gr.splice(j,1),ir.splice(j,1)),Ke("delSeries",j)}u.delSeries=As;const rr=[!1,!1,!1,!1];function Ci(j,Q){if(j._show=j.show,j.show){let re=j.side%2,oe=T[j.scale];oe==null&&(j.scale=re?y[1].scale:w,oe=T[j.scale]);let ge=oe.time;j.size=Mt(j.size),j.space=Mt(j.space),j.rotate=Mt(j.rotate),go(j.incrs)&&j.incrs.forEach($e=>{!vo.has($e)&&vo.set($e,Dg($e))}),j.incrs=Mt(j.incrs||(oe.distr==2?OC:ge?m==1?DC:WC:Wo)),j.splits=Mt(j.splits||(ge&&oe.distr==1?V:oe.distr==3?Cu:oe.distr==4?i_:n_)),j.stroke=Mt(j.stroke),j.grid.stroke=Mt(j.grid.stroke),j.ticks.stroke=Mt(j.ticks.stroke),j.border.stroke=Mt(j.border.stroke);let be=j.values;j.values=go(be)&&!go(be[0])?Mt(be):ge?go(be)?Qf(N,Zf(be,B)):Kf(be)?zC(N,be):be||G:be||t_,j.filter=Mt(j.filter||(oe.distr>=3&&oe.log==10?s_:oe.distr==3&&oe.log==2?a_:Og)),j.font=dp(j.font),j.labelFont=dp(j.labelFont),j._size=j.size(u,null,Q,0),j._space=j._rotate=j._incrs=j._found=j._splits=j._values=null,j._size>0&&(rr[Q]=!0,j._el=Zi(Vk,s))}}function _t(j,Q,re,oe){let[ge,be,$e,Ne]=re,Fe=Q%2,He=0;return Fe==0&&(Ne||be)&&(He=Q==0&&!ge||Q==2&&!$e?On(ep.size/3):0),Fe==1&&(ge||$e)&&(He=Q==1&&!be||Q==3&&!Ne?On(ip.size/2):0),He}const Yo=u.padding=(l.padding||[_t,_t,_t,_t]).map(j=>Mt(It(j,_t))),Qn=u._padding=Yo.map((j,Q)=>j(u,Q,rr,0));let wn,Qt=null,un=null;const Fi=$==1?y[0].idxs:null;let Jn=null,Pi=!1;function Qr(j,Q){if(c=j??[],u.data=u._data=c,$==2){wn=0;for(let re=1;re<y.length;re++)wn+=c[re][0].length}else{c.length==0&&(u.data=u._data=c=[[]]),Jn=c[0],wn=Jn.length;let re=c;if(F==2){re=c.slice();let oe=re[0]=Array(wn);for(let ge=0;ge<wn;ge++)oe[ge]=ge}u._data=c=re}if(sr(!0),Ke("setData"),F==2&&(Xi=!0),Q!==!1){let re=z;re.auto(u,Pi)?bo():An(w,re.min,re.max),er=er||ne.left>=0,Vn=!0,wr()}}u.setData=Qr;function bo(){Pi=!0;let j,Q;$==1&&(wn>0?(Qt=Fi[0]=0,un=Fi[1]=wn-1,j=c[0][Qt],Q=c[0][un],F==2?(j=Qt,Q=un):j==Q&&(F==3?[j,Q]=ul(j,j,z.log,!1):F==4?[j,Q]=zu(j,j,z.log,!1):z.time?Q=j+On(86400/m):[j,Q]=Xa(j,Q,Uu,!0))):(Qt=Fi[0]=j=null,un=Fi[1]=Q=null)),An(w,j,Q)}let mr,fi,Lr,Jr,pi,Xr,xo,So,eo,En;function ko(j,Q,re,oe,ge,be){j??(j=Tf),re??(re=ju),oe??(oe="butt"),ge??(ge=Tf),be??(be="round"),j!=mr&&(a.strokeStyle=mr=j),ge!=fi&&(a.fillStyle=fi=ge),Q!=Lr&&(a.lineWidth=Lr=Q),be!=pi&&(a.lineJoin=pi=be),oe!=Xr&&(a.lineCap=Xr=oe),re!=Jr&&a.setLineDash(Jr=re)}function Er(j,Q,re,oe){Q!=fi&&(a.fillStyle=fi=Q),j!=xo&&(a.font=xo=j),re!=So&&(a.textAlign=So=re),oe!=eo&&(a.textBaseline=eo=oe)}function to(j,Q,re,oe,ge=0){if(oe.length>0&&j.auto(u,Pi)&&(Q==null||Q.min==null)){let be=It(Qt,0),$e=It(un,oe.length-1),Ne=re.min==null?sC(oe,be,$e,ge,j.distr==3):[re.min,re.max];j.min=fr(j.min,re.min=Ne[0]),j.max=di(j.max,re.max=Ne[1])}}const no={min:null,max:null};function vr(){for(let oe in T){let ge=T[oe];S[oe]==null&&(ge.min==null||S[w]!=null&&ge.auto(u,Pi))&&(S[oe]=no)}for(let oe in T){let ge=T[oe];S[oe]==null&&ge.from!=null&&S[ge.from]!=null&&(S[oe]=no)}S[w]!=null&&sr(!0);let j={};for(let oe in S){let ge=S[oe];if(ge!=null){let be=j[oe]=ms(T[oe],gC);if(ge.min!=null)Mn(be,ge);else if(oe!=w||$==2)if(wn==0&&be.from==null){let $e=be.range(u,null,null,oe);be.min=$e[0],be.max=$e[1]}else be.min=Yt,be.max=-Yt}}if(wn>0){y.forEach((oe,ge)=>{if($==1){let be=oe.scale,$e=S[be];if($e==null)return;let Ne=j[be];if(ge==0){let Fe=Ne.range(u,Ne.min,Ne.max,be);Ne.min=Fe[0],Ne.max=Fe[1],Qt=dr(Ne.min,c[0]),un=dr(Ne.max,c[0]),un-Qt>1&&(c[0][Qt]<Ne.min&&Qt++,c[0][un]>Ne.max&&un--),oe.min=Jn[Qt],oe.max=Jn[un]}else oe.show&&oe.auto&&to(Ne,$e,oe,c[ge],oe.sorted);oe.idxs[0]=Qt,oe.idxs[1]=un}else if(ge>0&&oe.show&&oe.auto){let[be,$e]=oe.facets,Ne=be.scale,Fe=$e.scale,[He,je]=c[ge],Ye=j[Ne],ht=j[Fe];Ye!=null&&to(Ye,S[Ne],be,He,be.sorted),ht!=null&&to(ht,S[Fe],$e,je,$e.sorted),oe.min=$e.min,oe.max=$e.max}});for(let oe in j){let ge=j[oe],be=S[oe];if(ge.from==null&&(be==null||be.min==null)){let $e=ge.range(u,ge.min==Yt?null:ge.min,ge.max==-Yt?null:ge.max,oe);ge.min=$e[0],ge.max=$e[1]}}}for(let oe in j){let ge=j[oe];if(ge.from!=null){let be=j[ge.from];if(be.min==null)ge.min=ge.max=null;else{let $e=ge.range(u,be.min,be.max,oe);ge.min=$e[0],ge.max=$e[1]}}}let Q={},re=!1;for(let oe in j){let ge=j[oe],be=T[oe];if(be.min!=ge.min||be.max!=ge.max){be.min=ge.min,be.max=ge.max;let $e=be.distr;be._min=$e==3?qr(be.min):$e==4?Tc(be.min,be.asinh):$e==100?be.fwd(be.min):be.min,be._max=$e==3?qr(be.max):$e==4?Tc(be.max,be.asinh):$e==100?be.fwd(be.max):be.max,Q[oe]=re=!0}}if(re){y.forEach((oe,ge)=>{$==2?ge>0&&Q.y&&(oe._paths=null):Q[oe.scale]&&(oe._paths=null)});for(let oe in Q)Xi=!0,Ke("setScale",oe);ue&&ne.left>=0&&(er=Vn=!0)}for(let oe in S)S[oe]=null}function Co(j){let Q=ku(Qt-1,0,wn-1),re=ku(un+1,0,wn-1);for(;j[Q]==null&&Q>0;)Q--;for(;j[re]==null&&re<wn-1;)re++;return[Q,re]}function Zo(){if(wn>0){let j=y.some(Q=>Q._focus)&&En!=Yn.alpha;j&&(a.globalAlpha=En=Yn.alpha),y.forEach((Q,re)=>{if(re>0&&Q.show&&(io(re,!1),io(re,!0),Q._paths==null)){let oe=En;En!=Q.alpha&&(a.globalAlpha=En=Q.alpha);let ge=$==2?[0,c[re][0].length-1]:Co(c[re]);Q._paths=Q.paths(u,re,ge[0],ge[1]),En!=oe&&(a.globalAlpha=En=oe)}}),y.forEach((Q,re)=>{if(re>0&&Q.show){let oe=En;En!=Q.alpha&&(a.globalAlpha=En=Q.alpha),Q._paths!=null&&ro(re,!1);{let ge=Q._paths!=null?Q._paths.gaps:null,be=Q.points.show(u,re,Qt,un,ge),$e=Q.points.filter(u,re,be,ge);(be||$e)&&(Q.points._paths=Q.points.paths(u,re,Qt,un,$e),ro(re,!0))}En!=oe&&(a.globalAlpha=En=oe),Ke("drawSeries",re)}}),j&&(a.globalAlpha=En=1)}}function io(j,Q){let re=Q?y[j].points:y[j];re._stroke=re.stroke(u,j),re._fill=re.fill(u,j)}function ro(j,Q){let re=Q?y[j].points:y[j],{stroke:oe,fill:ge,clip:be,flags:$e,_stroke:Ne=re._stroke,_fill:Fe=re._fill,_width:He=re.width}=re._paths;He=Zt(He*Ft,3);let je=null,Ye=He%2/2;Q&&Fe==null&&(Fe=He>0?"#fff":Ne);let ht=re.pxAlign==1&&Ye>0;if(ht&&a.translate(Ye,Ye),!Q){let kt=Tn-He/2,ft=Pn-He/2,yt=zt+He,it=Ln+He;je=new Path2D,je.rect(kt,ft,yt,it)}Q?Rr(Ne,He,re.dash,re.cap,Fe,oe,ge,$e,be):_o(j,Ne,He,re.dash,re.cap,Fe,oe,ge,$e,je,be),ht&&a.translate(-Ye,-Ye)}function _o(j,Q,re,oe,ge,be,$e,Ne,Fe,He,je){let Ye=!1;Fe!=0&&C.forEach((ht,kt)=>{if(ht.series[0]==j){let ft=y[ht.series[1]],yt=c[ht.series[1]],it=(ft._paths||Qs).band;go(it)&&(it=ht.dir==1?it[0]:it[1]);let et,qt=null;ft.show&&it&&lC(yt,Qt,un)?(qt=ht.fill(u,kt)||be,et=ft._paths.clip):it=null,Rr(Q,re,oe,ge,qt,$e,Ne,Fe,He,je,et,it),Ye=!0}}),Ye||Rr(Q,re,oe,ge,be,$e,Ne,Fe,He,je)}const oo=vs|Au;function Rr(j,Q,re,oe,ge,be,$e,Ne,Fe,He,je,Ye){ko(j,Q,re,oe,ge),(Fe||He||Ye)&&(a.save(),Fe&&a.clip(Fe),He&&a.clip(He)),Ye?(Ne&oo)==oo?(a.clip(Ye),je&&a.clip(je),Rn(ge,$e),Wi(j,be,Q)):Ne&Au?(Rn(ge,$e),a.clip(Ye),Wi(j,be,Q)):Ne&vs&&(a.save(),a.clip(Ye),je&&a.clip(je),Rn(ge,$e),a.restore(),Wi(j,be,Q)):(Rn(ge,$e),Wi(j,be,Q)),(Fe||He||Ye)&&a.restore()}function Wi(j,Q,re){re>0&&(Q instanceof Map?Q.forEach((oe,ge)=>{a.strokeStyle=mr=ge,a.stroke(oe)}):Q!=null&&j&&a.stroke(Q))}function Rn(j,Q){Q instanceof Map?Q.forEach((re,oe)=>{a.fillStyle=fi=oe,a.fill(re)}):Q!=null&&j&&a.fill(Q)}function yr(j,Q,re,oe){let ge=R[j],be;if(oe<=0)be=[0,0];else{let $e=ge._space=ge.space(u,j,Q,re,oe),Ne=ge._incrs=ge.incrs(u,j,Q,re,oe,$e);be=T_(Q,re,Ne,oe,$e)}return ge._found=be}function or(j,Q,re,oe,ge,be,$e,Ne,Fe,He){let je=$e%2/2;i==1&&a.translate(je,je),ko(Ne,$e,Fe,He,Ne),a.beginPath();let Ye,ht,kt,ft,yt=ge+(oe==0||oe==3?-be:be);re==0?(ht=ge,ft=yt):(Ye=ge,kt=yt);for(let it=0;it<j.length;it++)Q[it]!=null&&(re==0?Ye=kt=j[it]:ht=ft=j[it],a.moveTo(Ye,ht),a.lineTo(kt,ft));a.stroke(),i==1&&a.translate(-je,-je)}function Qo(j){let Q=!0;return R.forEach((re,oe)=>{if(!re.show)return;let ge=T[re.scale];if(ge.min==null){re._show&&(Q=!1,re._show=!1,sr(!1));return}else re._show||(Q=!1,re._show=!0,sr(!1));let be=re.side,$e=be%2,{min:Ne,max:Fe}=ge,[He,je]=yr(oe,Ne,Fe,$e==0?dt:ze);if(je==0)return;let Ye=ge.distr==2,ht=re._splits=re.splits(u,oe,Ne,Fe,He,je,Ye),kt=ge.distr==2?ht.map(et=>Jn[et]):ht,ft=ge.distr==2?Jn[ht[1]]-Jn[ht[0]]:He,yt=re._values=re.values(u,re.filter(u,kt,oe,je,ft),oe,je,ft);re._rotate=be==2?re.rotate(u,yt,oe,je):0;let it=re._size;re._size=Qi(re.size(u,yt,oe,j)),it!=null&&re._size!=it&&(Q=!1)}),Q}function $s(j){let Q=!0;return Yo.forEach((re,oe)=>{let ge=re(u,oe,rr,j);ge!=Qn[oe]&&(Q=!1),Qn[oe]=ge}),Q}function Ir(){for(let j=0;j<R.length;j++){let Q=R[j];if(!Q.show||!Q._show)continue;let re=Q.side,oe=re%2,ge,be,$e=Q.stroke(u,j),Ne=re==0||re==3?-1:1,[Fe,He]=Q._found;if(Q.label!=null){let Kt=Q.labelGap*Ne,zn=On((Q._lpos+Kt)*Ft);Er(Q.labelFont[0],$e,"center",re==2?Us:Mf),a.save(),oe==1?(ge=be=0,a.translate(zn,On(Pn+Ln/2)),a.rotate((re==3?-Za:Za)/2)):(ge=On(Tn+zt/2),be=zn);let Pr=Rg(Q.label)?Q.label(u,j,Fe,He):Q.label;a.fillText(Pr,ge,be),a.restore()}if(He==0)continue;let je=T[Q.scale],Ye=oe==0?zt:Ln,ht=oe==0?Tn:Pn,kt=Q._splits,ft=je.distr==2?kt.map(Kt=>Jn[Kt]):kt,yt=je.distr==2?Jn[kt[1]]-Jn[kt[0]]:Fe,it=Q.ticks,et=Q.border,qt=it.show?it.size:0,rn=On(qt*Ft),$n=On((Q.alignTo==2?Q._size-qt-Q.gap:Q.gap)*Ft),Tt=Q._rotate*-Za/180,pe=h(Q._pos*Ft),Ce=(rn+$n)*Ne,xe=pe+Ce;be=oe==0?xe:0,ge=oe==1?xe:0;let Be=Q.font[0],nt=Q.align==1?us:Q.align==2?Ac:Tt>0?us:Tt<0?Ac:oe==0?"center":re==3?Ac:us,gt=Tt||oe==1?"middle":re==2?Us:Mf;Er(Be,$e,nt,gt);let Et=Q.font[1]*Q.lineGap,wt=kt.map(Kt=>h(x(Kt,je,Ye,ht))),li=Q._values;for(let Kt=0;Kt<li.length;Kt++){let zn=li[Kt];if(zn!=null){oe==0?ge=wt[Kt]:be=wt[Kt],zn=""+zn;let Pr=zn.indexOf(`
|
|
1497
|
-
`)==-1?[zn]:zn.split(/\n/gm);for(let gn=0;gn<Pr.length;gn++){let $o=Pr[gn];Tt?(a.save(),a.translate(ge,be+gn*Et),a.rotate(Tt),a.fillText($o,0,0),a.restore()):a.fillText($o,ge,be+gn*Et)}}}it.show&&or(wt,it.filter(u,ft,j,He,yt),oe,re,pe,rn,Zt(it.width*Ft,3),it.stroke(u,j),it.dash,it.cap);let Vi=Q.grid;Vi.show&&or(wt,Vi.filter(u,ft,j,He,yt),oe,oe==0?2:1,oe==0?Pn:Tn,oe==0?Ln:zt,Zt(Vi.width*Ft,3),Vi.stroke(u,j),Vi.dash,Vi.cap),et.show&&or([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?Pn:Tn,oe==1?Ln:zt,Zt(et.width*Ft,3),et.stroke(u,j),et.dash,et.cap)}Ke("drawAxes")}function sr(j){y.forEach((Q,re)=>{re>0&&(Q._paths=null,j&&($==1?(Q.min=null,Q.max=null):Q.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let Or=!1,so=!1,Nr=[];function Jo(){so=!1;for(let j=0;j<Nr.length;j++)Ke(...Nr[j]);Nr.length=0}function wr(){Or||(SC(Xo),Or=!0)}function De(j,Q=!1){Or=!0,so=Q,j(u),Xo(),Q&&Nr.length>0&&queueMicrotask(Jo)}u.batch=De;function Xo(){if($r&&(vr(),$r=!1),Xi&&(ki(),Xi=!1),Ji){if(en(r,us,Ot),en(r,Us,Gt),en(r,Gs,dt),en(r,qs,ze),en(n,us,Ot),en(n,Us,Gt),en(n,Gs,dt),en(n,qs,ze),en(s,Gs,Fn),en(s,qs,ri),o.width=On(Fn*Ft),o.height=On(ri*Ft),R.forEach(({_el:j,_show:Q,_size:re,_pos:oe,side:ge})=>{if(j!=null)if(Q){let be=ge===3||ge===0?re:0,$e=ge%2==1;en(j,$e?"left":"top",oe-be),en(j,$e?"width":"height",re),en(j,$e?"top":"left",$e?Gt:Ot),en(j,$e?"height":"width",$e?ze:dt),xu(j,Bo)}else Oi(j,Bo)}),mr=fi=Lr=pi=Xr=xo=So=eo=Jr=null,En=1,W(!0),Ot!=_n||Gt!=oi||dt!=qn||ze!=sn){sr(!1);let j=dt/qn,Q=ze/sn;if(ue&&!er&&ne.left>=0){ne.left*=j,ne.top*=Q,_i&&_r(_i,On(ne.left),0,dt,ze),bn&&_r(bn,0,On(ne.top),dt,ze);for(let re=0;re<Zn.length;re++){let oe=Zn[re];oe!=null&&(gr[re]*=j,ir[re]*=Q,_r(oe,Qi(gr[re]),Qi(ir[re]),dt,ze))}}if(ct.show&&!Mr&&ct.left>=0&&ct.width>0){ct.left*=j,ct.width*=j,ct.top*=Q,ct.height*=Q;for(let re in Y)en(si,re,ct[re])}_n=Ot,oi=Gt,qn=dt,sn=ze}Ke("setSize"),Ji=!1}Fn>0&&ri>0&&(a.clearRect(0,0,o.width,o.height),Ke("drawClear"),D.forEach(j=>j()),Ke("draw")),ct.show&&Mr&&(Vt(ct),Mr=!1),ue&&er&&(k(null,!0,!1),er=!1),ce.show&&ce.live&&Vn&&(g(),Vn=!1),p||(p=!0,u.status=1,Ke("ready")),Pi=!1,Or=!1}u.redraw=(j,Q)=>{Xi=Q||!1,j!==!1?An(w,z.min,z.max):wr()};function Ie(j,Q){let re=T[j];if(re.from==null){if(wn==0){let oe=re.range(u,Q.min,Q.max,j);Q.min=oe[0],Q.max=oe[1]}if(Q.min>Q.max){let oe=Q.min;Q.min=Q.max,Q.max=oe}if(wn>1&&Q.min!=null&&Q.max!=null&&Q.max-Q.min<1e-16)return;j==w&&re.distr==2&&wn>0&&(Q.min=dr(Q.min,c[0]),Q.max=dr(Q.max,c[0]),Q.min==Q.max&&Q.max++),S[j]=Q,$r=!0,wr()}}u.setScale=Ie;let ln,Dr,_i,bn,es,Fr,Bi,br,Nt,Rt,Dt,At,Hi=!1;const hn=ne.drag;let Pe=hn.x,Jt=hn.y;ue&&(ne.x&&(ln=Zi(Kk,n)),ne.y&&(Dr=Zi(Gk,n)),z.ori==0?(_i=ln,bn=Dr):(_i=Dr,bn=ln),Dt=ne.left,At=ne.top);const ct=u.select=Mn({show:!0,over:!0,left:0,width:0,top:0,height:0},l.select),si=ct.show?Zi(jk,ct.over?n:r):null;function Vt(j,Q){if(ct.show){for(let re in j)ct[re]=j[re],re in Y&&en(si,re,j[re]);Q!==!1&&Ke("setSelect")}}u.setSelect=Vt;function Xt(j){if(y[j].show)he&&xu(Me[j],Bo);else if(he&&Oi(Me[j],Bo),ue){let re=an?Zn[0]:Zn[j];re!=null&&_r(re,-10,-10,dt,ze)}}function An(j,Q,re){Ie(j,{min:Q,max:re})}function ai(j,Q,re,oe){Q.focus!=null&&Wn(j),Q.show!=null&&y.forEach((ge,be)=>{be>0&&(j==be||j==null)&&(ge.show=Q.show,Xt(be),$==2?(An(ge.facets[0].scale,null,null),An(ge.facets[1].scale,null,null)):An(ge.scale,null,null),wr())}),re!==!1&&Ke("setSeries",j,Q),oe&&ut("setSeries",u,j,Q)}u.setSeries=ai;function zi(j,Q){Mn(C[j],Q)}function dn(j,Q){j.fill=Mt(j.fill||null),j.dir=It(j.dir,-1),Q=Q??C.length,C.splice(Q,0,j)}function gi(j){j==null?C.length=0:C.splice(j,1)}u.addBand=dn,u.setBand=zi,u.delBand=gi;function ao(j,Q){y[j].alpha=Q,ue&&Zn[j]!=null&&(Zn[j].style.opacity=Q),he&&Me[j]&&(Me[j].style.opacity=Q)}let fn,Ai,$i;const Ui={focus:!0};function Wn(j){if(j!=$i){let Q=j==null,re=Yn.alpha!=1;y.forEach((oe,ge)=>{if($==1||ge>0){let be=Q||ge==0||ge==j;oe._focus=Q?null:be,re&&ao(ge,be?1:Yn.alpha)}}),$i=j,re&&wr()}}he&&nr&&on(Rf,me,j=>{ne._lock||(tr(j),$i!=null&&ai(null,Ui,!0,tt.setSeries))});function Bn(j,Q,re){let oe=T[Q];re&&(j=j/Ft-(oe.ori==1?Gt:Ot));let ge=dt;oe.ori==1&&(ge=ze,j=ge-j),oe.dir==-1&&(j=ge-j);let be=oe._min,$e=oe._max,Ne=j/ge,Fe=be+($e-be)*Ne,He=oe.distr;return He==3?ps(10,Fe):He==4?uC(Fe,oe.asinh):He==100?oe.bwd(Fe):Fe}function jn(j,Q){let re=Bn(j,w,Q);return dr(re,c[0],Qt,un)}u.valToIdx=j=>dr(j,c[0]),u.posToIdx=jn,u.posToVal=Bn,u.valToPos=(j,Q,re)=>T[Q].ori==0?b(j,T[Q],re?zt:dt,re?Tn:0):v(j,T[Q],re?Ln:ze,re?Pn:0),u.setCursor=(j,Q,re)=>{Dt=j.left,At=j.top,k(null,Q,re)};function Ao(j,Q){en(si,us,ct.left=j),en(si,Gs,ct.width=Q)}function Kn(j,Q){en(si,Us,ct.top=j),en(si,qs,ct.height=Q)}let Xn=z.ori==0?Ao:Kn,Mi=z.ori==1?Ao:Kn;function Ti(){if(he&&ce.live)for(let j=$==2?1:0;j<y.length;j++){if(j==0&&ot)continue;let Q=ce.values[j],re=0;for(let oe in Q)qe[j][re++].firstChild.nodeValue=Q[oe]}}function g(j,Q){if(j!=null&&(j.idxs?j.idxs.forEach((re,oe)=>{ee[oe]=re}):pC(j.idx)||ee.fill(j.idx),ce.idx=ee[0]),he&&ce.live){for(let re=0;re<y.length;re++)(re>0||$==1&&!ot)&&_(re,ee[re]);Ti()}Vn=!1,Q!==!1&&Ke("setLegend")}u.setLegend=g;function _(j,Q){let re=y[j],oe=j==0&&F==2?Jn:c[j],ge;ot?ge=re.values(u,j,Q)??Je:(ge=re.value(u,Q==null?null:oe[Q],j,Q),ge=ge==null?Je:{_:ge}),ce.values[j]=ge}function k(j,Q,re){Nt=Dt,Rt=At,[Dt,At]=ne.move(u,Dt,At),ne.left=Dt,ne.top=At,ue&&(_i&&_r(_i,On(Dt),0,dt,ze),bn&&_r(bn,0,On(At),dt,ze));let oe,ge=Qt>un;fn=Yt,Ai=null;let be=z.ori==0?dt:ze,$e=z.ori==1?dt:ze;if(Dt<0||wn==0||ge){oe=ne.idx=null;for(let Ne=0;Ne<y.length;Ne++){let Fe=Zn[Ne];Fe!=null&&_r(Fe,-10,-10,dt,ze)}nr&&ai(null,Ui,!0,j==null&&tt.setSeries),ce.live&&(ee.fill(oe),Vn=!0)}else{let Ne,Fe,He;$==1&&(Ne=z.ori==0?Dt:At,Fe=Bn(Ne,w),oe=ne.idx=dr(Fe,c[0],Qt,un),He=O(c[0][oe],z,be,0));let je=-10,Ye=-10,ht=0,kt=0,ft=!0,yt="",it="";for(let et=$==2?1:0;et<y.length;et++){let qt=y[et],rn=ee[et],$n=rn==null?null:$==1?c[et][rn]:c[et][1][rn],Tt=ne.dataIdx(u,et,oe,Fe),pe=Tt==null?null:$==1?c[et][Tt]:c[et][1][Tt];if(Vn=Vn||pe!=$n||Tt!=rn,ee[et]=Tt,et>0&&qt.show){let Ce=Tt==null?-10:Tt==oe?He:O($==1?c[0][Tt]:c[et][0][Tt],z,be,0),xe=pe==null?-10:A(pe,$==1?T[qt.scale]:T[qt.facets[1].scale],$e,0);if(nr&&pe!=null){let Be=z.ori==1?Dt:At,nt=Nn(Yn.dist(u,et,Tt,xe,Be));if(nt<fn){let gt=Yn.bias;if(gt!=0){let Et=Bn(Be,qt.scale),wt=pe>=0?1:-1,li=Et>=0?1:-1;li==wt&&(li==1?gt==1?pe>=Et:pe<=Et:gt==1?pe<=Et:pe>=Et)&&(fn=nt,Ai=et)}else fn=nt,Ai=et}}if(Vn||an){let Be,nt;z.ori==0?(Be=Ce,nt=xe):(Be=xe,nt=Ce);let gt,Et,wt,li,Vi,Kt,zn=!0,Pr=yn.bbox;if(Pr!=null){zn=!1;let gn=Pr(u,et);wt=gn.left,li=gn.top,gt=gn.width,Et=gn.height}else wt=Be,li=nt,gt=Et=yn.size(u,et);if(Kt=yn.fill(u,et),Vi=yn.stroke(u,et),an)et==Ai&&fn<=Yn.prox&&(je=wt,Ye=li,ht=gt,kt=Et,ft=zn,yt=Kt,it=Vi);else{let gn=Zn[et];gn!=null&&(gr[et]=wt,ir[et]=li,Wf(gn,gt,Et,zn),Ff(gn,Kt,Vi),_r(gn,Qi(wt),Qi(li),dt,ze))}}}}if(an){let et=Yn.prox,qt=$i==null?fn<=et:fn>et||Ai!=$i;if(Vn||qt){let rn=Zn[0];rn!=null&&(gr[0]=je,ir[0]=Ye,Wf(rn,ht,kt,ft),Ff(rn,yt,it),_r(rn,Qi(je),Qi(Ye),dt,ze))}}}if(ct.show&&Hi)if(j!=null){let[Ne,Fe]=tt.scales,[He,je]=tt.match,[Ye,ht]=j.cursor.sync.scales,kt=j.cursor.drag;if(Pe=kt._x,Jt=kt._y,Pe||Jt){let{left:ft,top:yt,width:it,height:et}=j.select,qt=j.scales[Ye].ori,rn=j.posToVal,$n,Tt,pe,Ce,xe,Be=Ne!=null&&He(Ne,Ye),nt=Fe!=null&&je(Fe,ht);Be&&Pe?(qt==0?($n=ft,Tt=it):($n=yt,Tt=et),pe=T[Ne],Ce=O(rn($n,Ye),pe,be,0),xe=O(rn($n+Tt,Ye),pe,be,0),Xn(fr(Ce,xe),Nn(xe-Ce))):Xn(0,be),nt&&Jt?(qt==1?($n=ft,Tt=it):($n=yt,Tt=et),pe=T[Fe],Ce=A(rn($n,ht),pe,$e,0),xe=A(rn($n+Tt,ht),pe,$e,0),Mi(fr(Ce,xe),Nn(xe-Ce))):Mi(0,$e)}else J()}else{let Ne=Nn(Nt-es),Fe=Nn(Rt-Fr);if(z.ori==1){let ht=Ne;Ne=Fe,Fe=ht}Pe=hn.x&&Ne>=hn.dist,Jt=hn.y&&Fe>=hn.dist;let He=hn.uni;He!=null?Pe&&Jt&&(Pe=Ne>=He,Jt=Fe>=He,!Pe&&!Jt&&(Fe>Ne?Jt=!0:Pe=!0)):hn.x&&hn.y&&(Pe||Jt)&&(Pe=Jt=!0);let je,Ye;Pe&&(z.ori==0?(je=Bi,Ye=Dt):(je=br,Ye=At),Xn(fr(je,Ye),Nn(Ye-je)),Jt||Mi(0,$e)),Jt&&(z.ori==1?(je=Bi,Ye=Dt):(je=br,Ye=At),Mi(fr(je,Ye),Nn(Ye-je)),Pe||Xn(0,be)),!Pe&&!Jt&&(Xn(0,0),Mi(0,0))}if(hn._x=Pe,hn._y=Jt,j==null){if(re){if(tn!=null){let[Ne,Fe]=tt.scales;tt.values[0]=Ne!=null?Bn(z.ori==0?Dt:At,Ne):null,tt.values[1]=Fe!=null?Bn(z.ori==1?Dt:At,Fe):null}ut($c,u,Dt,At,dt,ze,oe)}if(nr){let Ne=re&&tt.setSeries,Fe=Yn.prox;$i==null?fn<=Fe&&ai(Ai,Ui,!0,Ne):fn>Fe?ai(null,Ui,!0,Ne):Ai!=$i&&ai(Ai,Ui,!0,Ne)}}Vn&&(ce.idx=oe,g()),Q!==!1&&Ke("setCursor")}let P=null;Object.defineProperty(u,"rect",{get(){return P==null&&W(!1),P}});function W(j=!1){j?P=null:(P=n.getBoundingClientRect(),Ke("syncRect",P))}function H(j,Q,re,oe,ge,be,$e){ne._lock||Hi&&j!=null&&j.movementX==0&&j.movementY==0||(K(j,Q,re,oe,ge,be,$e,!1,j!=null),j!=null?k(null,!0,!0):k(Q,!0,!1))}function K(j,Q,re,oe,ge,be,$e,Ne,Fe){if(P==null&&W(!1),tr(j),j!=null)re=j.clientX-P.left,oe=j.clientY-P.top;else{if(re<0||oe<0){Dt=-10,At=-10;return}let[He,je]=tt.scales,Ye=Q.cursor.sync,[ht,kt]=Ye.values,[ft,yt]=Ye.scales,[it,et]=tt.match,qt=Q.axes[0].side%2==1,rn=z.ori==0?dt:ze,$n=z.ori==1?dt:ze,Tt=qt?be:ge,pe=qt?ge:be,Ce=qt?oe:re,xe=qt?re:oe;if(ft!=null?re=it(He,ft)?x(ht,T[He],rn,0):-10:re=rn*(Ce/Tt),yt!=null?oe=et(je,yt)?x(kt,T[je],$n,0):-10:oe=$n*(xe/pe),z.ori==1){let Be=re;re=oe,oe=Be}}Fe&&(Q==null||Q.cursor.event.type==$c)&&((re<=1||re>=dt-1)&&(re=Po(re,dt)),(oe<=1||oe>=ze-1)&&(oe=Po(oe,ze))),Ne?(es=re,Fr=oe,[Bi,br]=ne.move(u,re,oe)):(Dt=re,At=oe)}const Y={width:0,height:0,left:0,top:0};function J(){Vt(Y,!1)}let ie,se,ye,Se;function de(j,Q,re,oe,ge,be,$e){Hi=!0,Pe=Jt=hn._x=hn._y=!1,K(j,Q,re,oe,ge,be,$e,!0,!1),j!=null&&(on(Mc,wu,we,!1),ut(Lf,u,Bi,br,dt,ze,null));let{left:Ne,top:Fe,width:He,height:je}=ct;ie=Ne,se=Fe,ye=He,Se=je}function we(j,Q,re,oe,ge,be,$e){Hi=hn._x=hn._y=!1,K(j,Q,re,oe,ge,be,$e,!1,!0);let{left:Ne,top:Fe,width:He,height:je}=ct,Ye=He>0||je>0,ht=ie!=Ne||se!=Fe||ye!=He||Se!=je;if(Ye&&ht&&Vt(ct),hn.setScale&&Ye&&ht){let kt=Ne,ft=He,yt=Fe,it=je;if(z.ori==1&&(kt=Fe,ft=je,yt=Ne,it=He),Pe&&An(w,Bn(kt,w),Bn(kt+ft,w)),Jt)for(let et in T){let qt=T[et];et!=w&&qt.from==null&&qt.min!=Yt&&An(et,Bn(yt+it,et),Bn(yt,et))}J()}else ne.lock&&(ne._lock=!ne._lock,k(Q,!0,j!=null));j!=null&&(Cn(Mc,wu),ut(Mc,u,Dt,At,dt,ze,null))}function Re(j,Q,re,oe,ge,be,$e){if(ne._lock)return;tr(j);let Ne=Hi;if(Hi){let Fe=!0,He=!0,je=10,Ye,ht;z.ori==0?(Ye=Pe,ht=Jt):(Ye=Jt,ht=Pe),Ye&&ht&&(Fe=Dt<=je||Dt>=dt-je,He=At<=je||At>=ze-je),Ye&&Fe&&(Dt=Dt<Bi?0:dt),ht&&He&&(At=At<br?0:ze),k(null,!0,!0),Hi=!1}Dt=-10,At=-10,ee.fill(null),k(null,!0,!0),Ne&&(Hi=Ne)}function Le(j,Q,re,oe,ge,be,$e){ne._lock||(tr(j),bo(),J(),j!=null&&ut(If,u,Dt,At,dt,ze,null))}function We(){R.forEach(L_),Tr(u.width,u.height,!0)}Uo(Ja,ds,We);const Xe={};Xe.mousedown=de,Xe.mousemove=H,Xe.mouseup=we,Xe.dblclick=Le,Xe.setSeries=(j,Q,re,oe)=>{let ge=tt.match[2];re=ge(u,Q,re),re!=-1&&ai(re,oe,!0,!1)},ue&&(on(Lf,n,de),on($c,n,H),on(Ef,n,j=>{tr(j),W(!1)}),on(Rf,n,Re),on(If,n,Le),$u.add(u),u.syncRect=W);const Ze=u.hooks=l.hooks||{};function Ke(j,Q,re){so?Nr.push([j,Q,re]):j in Ze&&Ze[j].forEach(oe=>{oe.call(null,u,Q,re)})}(l.plugins||[]).forEach(j=>{for(let Q in j.hooks)Ze[Q]=(Ze[Q]||[]).concat(j.hooks[Q])});const jt=(j,Q,re)=>re,tt=Mn({key:null,setSeries:!1,filters:{pub:Vf,sub:Vf},scales:[w,y[1]?y[1].scale:null],match:[jf,jf,jt],values:[null,null]},ne.sync);tt.match.length==2&&tt.match.push(jt),ne.sync=tt;const tn=tt.key,xt=nm(tn);function ut(j,Q,re,oe,ge,be,$e){tt.filters.pub(j,Q,re,oe,ge,be,$e)&&xt.pub(j,Q,re,oe,ge,be,$e)}xt.sub(u);function pn(j,Q,re,oe,ge,be,$e){tt.filters.sub(j,Q,re,oe,ge,be,$e)&&Xe[j](null,Q,re,oe,ge,be,$e)}u.pub=pn;function Hn(){xt.unsub(u),$u.delete(u),Si.clear(),Su(Ja,ds,We),d.remove(),me==null||me.remove(),Ke("destroy")}u.destroy=Hn;function nn(){Ke("init",l,c),Qr(c||l.data,!1),S[w]?Ie(w,S[w]):bo(),Mr=ct.show&&(ct.width>0||ct.height>0),er=Vn=!0,Tr(l.width,l.height)}return y.forEach(qo),R.forEach(Ci),e?e instanceof HTMLElement?(e.appendChild(d),nn()):e(u,nn):nn(),u}ii.assign=Mn;ii.fmtNum=Vu;ii.rangeNum=Xa;ii.rangeLog=ul;ii.rangeAsinh=zu;ii.orient=Ko;ii.pxRatio=Ft;ii.join=xC;ii.fmtDate=Ku,ii.tzDate=RC;ii.sync=nm;{ii.addGap=p_,ii.clipGaps=fl;let l=ii.paths={points:lm};l.linear=um,l.stepped=v_,l.bars=y_,l.spline=b_}var Ic,fp;function E_(){return fp||(fp=1,Ic=function(l,c,e,u,$){var b,v;if(u===void 0)u=0;else if(u=u|0,u<0||u>=l.length)throw new RangeError("invalid lower bound");if($===void 0)$=l.length-1;else if($=$|0,$<u||$>=l.length)throw new RangeError("invalid upper bound");for(;u<=$;)if(b=u+($-u>>>1),v=+e(l[b],c,b,l),v<0)u=b+1;else if(v>0)$=b-1;else return b;return~u}),Ic}var R_=E_();const I_=tl(R_);var Oc,pp;function O_(){if(pp)return Oc;pp=1;function l(c,e,u){var $=-1,b=c.length;e<0&&(e=-e>b?0:b+e),u=u>b?b:u,u<0&&(u+=b),b=e>u?0:u-e>>>0,e>>>=0;for(var v=Array(b);++$<b;)v[$]=c[$+e];return v}return Oc=l,Oc}var Nc,gp;function N_(){if(gp)return Nc;gp=1;var l=O_();function c(e,u,$){var b=e.length;return $=$===void 0?b:$,!u&&$>=b?e:l(e,u,$)}return Nc=c,Nc}var Dc,mp;function pm(){if(mp)return Dc;mp=1;var l="\\ud800-\\udfff",c="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",u="\\u20d0-\\u20ff",$=c+e+u,b="\\ufe0e\\ufe0f",v="\\u200d",x=RegExp("["+v+l+$+b+"]");function p(d){return x.test(d)}return Dc=p,Dc}var Fc,vp;function D_(){if(vp)return Fc;vp=1;function l(c){return c.split("")}return Fc=l,Fc}var Pc,yp;function F_(){if(yp)return Pc;yp=1;var l="\\ud800-\\udfff",c="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",u="\\u20d0-\\u20ff",$=c+e+u,b="\\ufe0e\\ufe0f",v="["+l+"]",x="["+$+"]",p="\\ud83c[\\udffb-\\udfff]",d="(?:"+x+"|"+p+")",o="[^"+l+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",r="\\u200d",n=d+"?",i="["+b+"]?",h="(?:"+r+"(?:"+[o,a,s].join("|")+")"+i+n+")*",m=i+n+h,y="(?:"+[o+x+"?",x,a,s,v].join("|")+")",R=RegExp(p+"(?="+p+")|"+y+m,"g");function T(C){return C.match(R)||[]}return Pc=T,Pc}var Wc,wp;function P_(){if(wp)return Wc;wp=1;var l=D_(),c=pm(),e=F_();function u($){return c($)?e($):l($)}return Wc=u,Wc}var Bc,bp;function W_(){if(bp)return Bc;bp=1;var l=typeof mo=="object"&&mo&&mo.Object===Object&&mo;return Bc=l,Bc}var Hc,xp;function B_(){if(xp)return Hc;xp=1;var l=W_(),c=typeof self=="object"&&self&&self.Object===Object&&self,e=l||c||Function("return this")();return Hc=e,Hc}var zc,Sp;function Xu(){if(Sp)return zc;Sp=1;var l=B_(),c=l.Symbol;return zc=c,zc}var Uc,kp;function H_(){if(kp)return Uc;kp=1;function l(c,e){for(var u=-1,$=c==null?0:c.length,b=Array($);++u<$;)b[u]=e(c[u],u,c);return b}return Uc=l,Uc}var Vc,Cp;function z_(){if(Cp)return Vc;Cp=1;var l=Array.isArray;return Vc=l,Vc}var jc,_p;function U_(){if(_p)return jc;_p=1;var l=Xu(),c=Object.prototype,e=c.hasOwnProperty,u=c.toString,$=l?l.toStringTag:void 0;function b(v){var x=e.call(v,$),p=v[$];try{v[$]=void 0;var d=!0}catch{}var o=u.call(v);return d&&(x?v[$]=p:delete v[$]),o}return jc=b,jc}var Kc,Ap;function V_(){if(Ap)return Kc;Ap=1;var l=Object.prototype,c=l.toString;function e(u){return c.call(u)}return Kc=e,Kc}var Gc,$p;function j_(){if($p)return Gc;$p=1;var l=Xu(),c=U_(),e=V_(),u="[object Null]",$="[object Undefined]",b=l?l.toStringTag:void 0;function v(x){return x==null?x===void 0?$:u:b&&b in Object(x)?c(x):e(x)}return Gc=v,Gc}var qc,Mp;function K_(){if(Mp)return qc;Mp=1;function l(c){return c!=null&&typeof c=="object"}return qc=l,qc}var Yc,Tp;function G_(){if(Tp)return Yc;Tp=1;var l=j_(),c=K_(),e="[object Symbol]";function u($){return typeof $=="symbol"||c($)&&l($)==e}return Yc=u,Yc}var Zc,Lp;function q_(){if(Lp)return Zc;Lp=1;var l=Xu(),c=H_(),e=z_(),u=G_(),$=l?l.prototype:void 0,b=$?$.toString:void 0;function v(x){if(typeof x=="string")return x;if(e(x))return c(x,v)+"";if(u(x))return b?b.call(x):"";var p=x+"";return p=="0"&&1/x==-1/0?"-0":p}return Zc=v,Zc}var Qc,Ep;function vl(){if(Ep)return Qc;Ep=1;var l=q_();function c(e){return e==null?"":l(e)}return Qc=c,Qc}var Jc,Rp;function Y_(){if(Rp)return Jc;Rp=1;var l=N_(),c=pm(),e=P_(),u=vl();function $(b){return function(v){v=u(v);var x=c(v)?e(v):void 0,p=x?x[0]:v.charAt(0),d=x?l(x,1).join(""):v.slice(1);return p[b]()+d}}return Jc=$,Jc}var Xc,Ip;function gm(){if(Ip)return Xc;Ip=1;var l=Y_(),c=l("toUpperCase");return Xc=c,Xc}var Z_=gm();const Q_=tl(Z_);var eu,Op;function J_(){if(Op)return eu;Op=1;var l=vl(),c=gm();function e(u){return c(l(u).toLowerCase())}return eu=e,eu}var tu,Np;function X_(){if(Np)return tu;Np=1;function l(c,e,u,$){var b=-1,v=c==null?0:c.length;for($&&v&&(u=c[++b]);++b<v;)u=e(u,c[b],b,c);return u}return tu=l,tu}var nu,Dp;function eA(){if(Dp)return nu;Dp=1;function l(c){return function(e){return c==null?void 0:c[e]}}return nu=l,nu}var iu,Fp;function tA(){if(Fp)return iu;Fp=1;var l=eA(),c={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=l(c);return iu=e,iu}var ru,Pp;function nA(){if(Pp)return ru;Pp=1;var l=tA(),c=vl(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u="\\u0300-\\u036f",$="\\ufe20-\\ufe2f",b="\\u20d0-\\u20ff",v=u+$+b,x="["+v+"]",p=RegExp(x,"g");function d(o){return o=c(o),o&&o.replace(e,l).replace(p,"")}return ru=d,ru}var ou,Wp;function iA(){if(Wp)return ou;Wp=1;var l=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function c(e){return e.match(l)||[]}return ou=c,ou}var su,Bp;function rA(){if(Bp)return su;Bp=1;var l=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function c(e){return l.test(e)}return su=c,su}var au,Hp;function oA(){if(Hp)return au;Hp=1;var l="\\ud800-\\udfff",c="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",u="\\u20d0-\\u20ff",$=c+e+u,b="\\u2700-\\u27bf",v="a-z\\xdf-\\xf6\\xf8-\\xff",x="\\xac\\xb1\\xd7\\xf7",p="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",d="\\u2000-\\u206f",o=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",s="\\ufe0e\\ufe0f",r=x+p+d+o,n="['’]",i="["+r+"]",h="["+$+"]",m="\\d+",y="["+b+"]",R="["+v+"]",T="[^"+l+r+m+b+v+a+"]",C="\\ud83c[\\udffb-\\udfff]",w="(?:"+h+"|"+C+")",E="[^"+l+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",I="[\\ud800-\\udbff][\\udc00-\\udfff]",L="["+a+"]",z="\\u200d",F="(?:"+R+"|"+T+")",O="(?:"+L+"|"+T+")",A="(?:"+n+"(?:d|ll|m|re|s|t|ve))?",S="(?:"+n+"(?:D|LL|M|RE|S|T|VE))?",N=w+"?",B="["+s+"]?",V="(?:"+z+"(?:"+[E,D,I].join("|")+")"+B+N+")*",G="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ee=B+N+V,ce="(?:"+[y,D,I].join("|")+")"+ee,ne=RegExp([L+"?"+R+"+"+A+"(?="+[i,L,"$"].join("|")+")",O+"+"+S+"(?="+[i,L+F,"$"].join("|")+")",L+"?"+F+"+"+A,L+"+"+S,Z,G,m,ce].join("|"),"g");function he(ue){return ue.match(ne)||[]}return au=he,au}var lu,zp;function sA(){if(zp)return lu;zp=1;var l=iA(),c=rA(),e=vl(),u=oA();function $(b,v,x){return b=e(b),v=x?void 0:v,v===void 0?c(b)?u(b):l(b):b.match(v)||[]}return lu=$,lu}var cu,Up;function aA(){if(Up)return cu;Up=1;var l=X_(),c=nA(),e=sA(),u="['’]",$=RegExp(u,"g");function b(v){return function(x){return l(e(c(x).replace($,"")),v,"")}}return cu=b,cu}var uu,Vp;function lA(){if(Vp)return uu;Vp=1;var l=J_(),c=aA(),e=c(function(u,$,b){return $=$.toLowerCase(),u+(b?l($):$)});return uu=e,uu}var cA=lA();const uA=tl(cA),hA=Object.assign({"./ArrayWidget.vue":()=>Promise.resolve().then(()=>require("./ArrayWidget-DvCX-1Om.cjs")),"./ArrayplotWidget.vue":()=>Promise.resolve().then(()=>require("./ArrayplotWidget-DA4SCxEg.cjs")),"./BlockWidget.vue":()=>Promise.resolve().then(()=>require("./BlockWidget-C33RBqR2.cjs")),"./ButtonWidget.vue":()=>Promise.resolve().then(()=>require("./ButtonWidget-DV33-G5z.cjs")),"./CanvasWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasWidget-CO5Ql5FM.cjs")),"./CanvasdotWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasdotWidget-v73CXaR2.cjs")),"./CanvasimageWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasimageWidget-CCwRuLep.cjs")),"./CanvasimagevalueWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasimagevalueWidget-NZYl_3mA.cjs")),"./CanvaslabelWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslabelWidget-XfEANCQ-.cjs")),"./CanvaslabelvalueWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslabelvalueWidget-CJCZdHId.cjs")),"./CanvaslineWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslineWidget-DycxDsyJ.cjs")),"./CanvaslinevalueWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslinevalueWidget-bChpy38C.cjs")),"./CheckbuttonWidget.vue":()=>Promise.resolve().then(()=>require("./CheckbuttonWidget-BwDttJTf.cjs")),"./ComboboxWidget.vue":()=>Promise.resolve().then(()=>require("./ComboboxWidget-DkBtLQ41.cjs")),"./DateWidget.vue":()=>Promise.resolve().then(()=>require("./DateWidget-CRFiLyxD.cjs")),"./DynamicWidget.vue":()=>Promise.resolve().then(()=>require("./DynamicWidget-BNfJRfR5.cjs")),"./FormatvalueWidget.vue":()=>Promise.resolve().then(()=>require("./FormatvalueWidget-AXH-VW-A.cjs")),"./HorizontalWidget.vue":()=>Promise.resolve().then(()=>require("./HorizontalWidget-D2lXnQqQ.cjs")),"./HorizontalboxWidget.vue":()=>Promise.resolve().then(()=>require("./HorizontalboxWidget-BGzl7-Rt.cjs")),"./HorizontallineWidget.vue":()=>Promise.resolve().then(()=>require("./HorizontallineWidget-x2u6MQNz.cjs")),"./IframeWidget.vue":()=>Promise.resolve().then(()=>require("./IframeWidget-B5simCWn.cjs")),"./ImageviewerWidget.vue":()=>Promise.resolve().then(()=>require("./ImageviewerWidget-BtuiORhN.cjs")),"./LabelWidget.vue":()=>Promise.resolve().then(()=>require("./LabelWidget-X4cBbl5N.cjs")),"./LabelledWidget.vue":()=>Promise.resolve().then(()=>require("./LabelledWidget-DaHqSURc.cjs")),"./LabelprogressbarWidget.vue":()=>Promise.resolve().then(()=>require("./LabelprogressbarWidget-Cz3nXacL.cjs")),"./LabelsparklineWidget.vue":()=>Promise.resolve().then(()=>require("./LabelsparklineWidget-Bns8kwBj.cjs")),"./LabelvalueWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvalueWidget-D-sncwem.cjs")),"./LabelvaluedescWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluedescWidget-DmqG8dzJ.cjs")),"./LabelvaluelimitsbarWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluelimitsbarWidget-_l7xjrX9.cjs")),"./LabelvaluelimitscolumnWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluelimitscolumnWidget-D0WEVZMc.cjs")),"./LabelvaluerangebarWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluerangebarWidget-BZTEfPQh.cjs")),"./LedWidget.vue":()=>Promise.resolve().then(()=>require("./LedWidget-MAyRDM2n.cjs")),"./LimitsbarWidget.vue":()=>Promise.resolve().then(()=>require("./LimitsbarWidget-ytyfCphX.cjs")),"./LimitscolorWidget.vue":()=>Promise.resolve().then(()=>require("./LimitscolorWidget-CeZYYSQn.cjs")),"./LimitscolumnWidget.vue":()=>Promise.resolve().then(()=>require("./LimitscolumnWidget-CXzLYznR.cjs")),"./LinegraphWidget.vue":()=>Promise.resolve().then(()=>require("./LinegraphWidget-WVSJOuTE.cjs")),"./MatrixbycolumnsWidget.vue":()=>Promise.resolve().then(()=>require("./MatrixbycolumnsWidget-COWMt_-r.cjs")),"./ProgressbarWidget.vue":()=>Promise.resolve().then(()=>require("./ProgressbarWidget-BUSOhcZ3.cjs")),"./RadiobuttonWidget.vue":()=>Promise.resolve().then(()=>require("./RadiobuttonWidget-D4Fka1eN.cjs")),"./RadiogroupWidget.vue":()=>Promise.resolve().then(()=>require("./RadiogroupWidget-DU9G6qLq.cjs")),"./RangebarWidget.vue":()=>Promise.resolve().then(()=>require("./RangebarWidget-DlMJo2o3.cjs")),"./RollupWidget.vue":()=>Promise.resolve().then(()=>require("./RollupWidget-D-Dx6Dkx.cjs")),"./ScrollwindowWidget.vue":()=>Promise.resolve().then(()=>require("./ScrollwindowWidget-0UcfntpY.cjs")),"./SignalWidget.vue":()=>Promise.resolve().then(()=>require("./SignalWidget-DhS8nGJu.cjs")),"./SpacerWidget.vue":()=>Promise.resolve().then(()=>require("./SpacerWidget-CUrYZDLP.cjs")),"./SparklineWidget.vue":()=>Promise.resolve().then(()=>require("./SparklineWidget-BOnHnJOh.cjs")),"./TabbookWidget.vue":()=>Promise.resolve().then(()=>require("./TabbookWidget-BTvyYn7i.cjs")),"./TextboxWidget.vue":()=>Promise.resolve().then(()=>require("./TextboxWidget-CPmQEhMm.cjs")),"./TextfieldWidget.vue":()=>Promise.resolve().then(()=>require("./TextfieldWidget-BzaNs7J4.cjs")),"./TimeWidget.vue":()=>Promise.resolve().then(()=>require("./TimeWidget-DksEVe5c.cjs")),"./TitleWidget.vue":()=>Promise.resolve().then(()=>require("./TitleWidget-C7_pj0lU.cjs")),"./ValueWidget.vue":()=>Promise.resolve().then(()=>require("./ValueWidget-C2qn7lVq.cjs")),"./ValuelimitsbarWidget.vue":()=>Promise.resolve().then(()=>require("./ValuelimitsbarWidget-_lEKCmQl.cjs")),"./ValuelimitscolumnWidget.vue":()=>Promise.resolve().then(()=>require("./ValuelimitscolumnWidget-0urjo-hR.cjs")),"./ValuerangebarWidget.vue":()=>Promise.resolve().then(()=>require("./ValuerangebarWidget-lXHRe4YZ.cjs")),"./VerticalWidget.vue":()=>Promise.resolve().then(()=>require("./VerticalWidget-XBSrdA2c.cjs")),"./VerticalboxWidget.vue":()=>Promise.resolve().then(()=>require("./VerticalboxWidget-1FHkgmf0.cjs"))}),dA=Object.entries(hA).reduce((l,[c,e])=>{c=c.split("/").pop();const u=Q_(uA(c.replace(/\.\w+$/,"")));return{...l,[u]:Ge.defineAsyncComponent(e)}},{}),fA={components:dA};exports.DataViewerComponent=_g;exports.DataViewerHistoryComponent=Ok;exports.WidgetComponents=fA;exports._=$g;exports.aceExports=Cx;exports.bi=US;exports.bs=I_;exports.fi=cS;exports.gi=zS;exports.lodashExports=Ag;exports.uPlot=ii;exports.yi=Ck;exports.yt=vu;
|
|
1498
|
-
//# sourceMappingURL=UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-
|
|
1495
|
+
`)},download:function(){const l=new Blob([this.displayText],{type:"text/plain"}),c=document.createElement("a");let e=URL.createObjectURL(l);c.href=e,c.setAttribute("download",`${Sx.format(new Date,"yyyy_MM_dd_HH_mm_ss")}.txt`),c.click(),window.URL.revokeObjectURL(e)},pause:function(){this.paused=!0},togglePlayPause:function(){this.paused=!this.paused},stepBackward:function(){this.pause(),this.pauseOffset--},stepForward:function(){this.pause(),this.pauseOffset++}}},Lk={class:"pa-2"},Ek={class:"text-area-container"},Rk={class:"floating-buttons"};function Ik(l,c,e,u,$,b){const v=Ge.resolveComponent("v-text-field"),x=Ge.resolveComponent("v-col"),p=Ge.resolveComponent("v-slider"),d=Ge.resolveComponent("v-row"),o=Ge.resolveComponent("v-textarea"),a=Ge.resolveComponent("v-btn"),s=Ge.resolveComponent("v-card-title"),r=Ge.resolveComponent("v-switch"),n=Ge.resolveComponent("v-radio"),i=Ge.resolveComponent("v-radio-group"),h=Ge.resolveComponent("v-card-text"),m=Ge.resolveComponent("v-card"),y=Ge.resolveComponent("v-menu");return Ge.openBlock(),Ge.createElementBlock("div",Lk,[Ge.createVNode(d,{dense:"",class:"mb-2"},{default:Ge.withCtx(()=>[Ge.createVNode(x,{cols:"4"},{default:Ge.withCtx(()=>[Ge.createVNode(v,{modelValue:l.filterText,"onUpdate:modelValue":c[0]||(c[0]=R=>l.filterText=R),label:"Search",class:"search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"","data-test":"history-component-search"},null,8,["modelValue"])]),_:1}),Ge.createVNode(x,{cols:"8",class:"mt-1"},{default:Ge.withCtx(()=>[Ge.createVNode(p,{modelValue:l.pauseOffset,"onUpdate:modelValue":c[1]||(c[1]=R=>l.pauseOffset=R),"prepend-icon":"mdi-step-backward","append-icon":"mdi-step-forward",min:1-l.currentConfig.history,max:0,"hide-details":"",onMousedown:b.pause,"onClick:prepend":b.stepBackward,"onClick:append":b.stepForward},null,8,["modelValue","min","onMousedown","onClick:prepend","onClick:append"])]),_:1})]),_:1}),Ge.createVNode(d,{dense:"","no-gutters":""},{default:Ge.withCtx(()=>[Ge.createVNode(x,null,{default:Ge.withCtx(()=>[Ge.createElementVNode("div",Ek,[Ge.createVNode(o,{"model-value":l.displayText,rows:l.rows,"no-resize":"",readonly:"",variant:"solo",flat:"","hide-details":"","data-test":"history-component-text-area"},null,8,["model-value","rows"]),Ge.createElementVNode("div",Rk,[Ge.createVNode(y,{"close-on-content-click":!1,"min-width":700},{activator:Ge.withCtx(({props:R})=>[Ge.createVNode(a,Ge.mergeProps({class:"ml-2",color:"secondary"},R,{icon:"astro:settings",size:"small","aria-label":"Settings","data-test":"history-component-open-settings"}),null,16)]),default:Ge.withCtx(()=>[Ge.createVNode(m,null,{default:Ge.withCtx(()=>[Ge.createVNode(s,{"data-test":"display-settings-card"},{default:Ge.withCtx(()=>[...c[9]||(c[9]=[Ge.createTextVNode(" Display settings ",-1)])]),_:1}),Ge.createVNode(h,null,{default:Ge.withCtx(()=>[Ge.createVNode(d,null,{default:Ge.withCtx(()=>[Ge.createVNode(x,null,{default:Ge.withCtx(()=>[Ge.createVNode(r,{modelValue:l.currentConfig.showTimestamp,"onUpdate:modelValue":c[2]||(c[2]=R=>l.currentConfig.showTimestamp=R),label:"Show timestamp",density:"compact",color:"primary","hide-details":"","data-test":"history-component-settings-show-timestamp"},null,8,["modelValue"]),l.hasRaw?(Ge.openBlock(),Ge.createBlock(r,{key:0,modelValue:l.currentConfig.showAscii,"onUpdate:modelValue":c[3]||(c[3]=R=>l.currentConfig.showAscii=R),label:"Show ASCII",density:"compact",color:"primary","hide-details":"","data-test":"history-component-settings-show-ascii"},null,8,["modelValue"])):Ge.createCommentVNode("",!0),l.hasRaw?(Ge.openBlock(),Ge.createBlock(r,{key:1,modelValue:l.currentConfig.showLineAddress,"onUpdate:modelValue":c[4]||(c[4]=R=>l.currentConfig.showLineAddress=R),label:"Show line address",density:"compact",color:"primary","hide-details":"","data-test":"history-component-settings-show-address"},null,8,["modelValue"])):Ge.createCommentVNode("",!0)]),_:1}),Ge.createVNode(x,null,{default:Ge.withCtx(()=>[Ge.createVNode(i,{modelValue:l.currentConfig.newestAtTop,"onUpdate:modelValue":c[5]||(c[5]=R=>l.currentConfig.newestAtTop=R),label:"Print newest to the"},{default:Ge.withCtx(()=>[Ge.createVNode(n,{label:"Top",value:!0,"data-test":"history-component-settings-newest-top"}),Ge.createVNode(n,{label:"Bottom",value:!1,"data-test":"history-component-settings-newest-bottom"})]),_:1},8,["modelValue"])]),_:1}),Ge.createVNode(x,null,{default:Ge.withCtx(()=>[Ge.createVNode(v,{modelValue:l.currentConfig.history,"onUpdate:modelValue":c[6]||(c[6]=R=>l.currentConfig.history=R),label:"History Buffer",type:"number",min:"1","persistent-hint":"",rules:[l.rules.required,l.rules.min],"data-test":"history-component-settings-history"},null,8,["modelValue","rules"]),l.hasRaw?(Ge.openBlock(),Ge.createBlock(v,{key:0,modelValue:l.currentConfig.bytesPerLine,"onUpdate:modelValue":c[7]||(c[7]=R=>l.currentConfig.bytesPerLine=R),label:"Bytes per line",type:"number",min:"1",rules:[l.rules.required,l.rules.min],"data-test":"history-component-settings-num-bytes"},null,8,["modelValue","rules"])):Ge.createCommentVNode("",!0),Ge.createVNode(v,{modelValue:l.currentConfig.packetsToShow,"onUpdate:modelValue":c[8]||(c[8]=R=>l.currentConfig.packetsToShow=R),label:"Entries to show",type:"number",min:"1",hint:`Maximum: ${l.currentConfig.history}`,"persistent-hint":"",rules:[l.rules.required,l.rules.min,l.rules.max],"data-test":"history-component-settings-num-packets"},null,8,["modelValue","hint","rules"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),Ge.createVNode(a,{class:"ml-2",color:"secondary",icon:"mdi-file-download",size:"small","aria-label":"Download","data-test":"history-component-download",onClick:b.download},null,8,["onClick"]),Ge.createVNode(a,{class:Ge.normalizeClass(["ml-2",{blink:l.paused}]),color:"primary",icon:l.paused?"mdi-play":"mdi-pause",size:"large","aria-label":l.paused?"Play":"Pause","data-test":"history-component-play-pause",onClick:b.togglePlayPause},null,8,["class","icon","aria-label","onClick"])])])]),_:1})]),_:1})])}const Ok=xx._export_sfc(Tk,[["render",Ik],["__scopeId","data-v-3c27986d"]]);var _c={exports:{}},Af;function Nk(){return Af||(Af=1,function(l,c){(function(){ace.require(["ace/mode/text"],function(e){l&&(l.exports=e)})})()}(_c)),_c.exports}Nk();const Dk=!0,Dn="u-",Fk="uplot",Pk=Dn+"hz",Bk=Dn+"vt",Wk=Dn+"title",Hk=Dn+"wrap",zk=Dn+"under",Uk=Dn+"over",Vk=Dn+"axis",Wo=Dn+"off",jk=Dn+"select",Kk=Dn+"cursor-x",Gk=Dn+"cursor-y",qk=Dn+"cursor-pt",Yk=Dn+"legend",Zk=Dn+"live",Qk=Dn+"inline",Jk=Dn+"series",Xk=Dn+"marker",$f=Dn+"label",eC=Dn+"value",Gs="width",qs="height",Us="top",Mf="bottom",us="left",Ac="right",Bu="#000",Tf=Bu+"0",$c="mousemove",Lf="mousedown",Mc="mouseup",Ef="mouseenter",Rf="mouseleave",If="dblclick",tC="resize",nC="scroll",Of="change",Ja="dppxchange",Wu="--",bs=typeof window<"u",wu=bs?document:null,ds=bs?window:null,iC=bs?navigator:null;let Ft,Va;function bu(){let l=devicePixelRatio;Ft!=l&&(Ft=l,Va&&Su(Of,Va,bu),Va=matchMedia(`(min-resolution: ${Ft-.001}dppx) and (max-resolution: ${Ft+.001}dppx)`),Uo(Of,Va,bu),ds.dispatchEvent(new CustomEvent(Ja)))}function Oi(l,c){if(c!=null){let e=l.classList;!e.contains(c)&&e.add(c)}}function xu(l,c){let e=l.classList;e.contains(c)&&e.remove(c)}function en(l,c,e){l.style[c]=e+"px"}function ur(l,c,e,u){let $=wu.createElement(l);return c!=null&&Oi($,c),e!=null&&e.insertBefore($,u),$}function Zi(l,c){return ur("div",l,c)}const Nf=new WeakMap;function _r(l,c,e,u,$){let b="translate("+c+"px,"+e+"px)",v=Nf.get(l);b!=v&&(l.style.transform=b,Nf.set(l,b),c<0||e<0||c>u||e>$?Oi(l,Wo):xu(l,Wo))}const Df=new WeakMap;function Ff(l,c,e){let u=c+e,$=Df.get(l);u!=$&&(Df.set(l,u),l.style.background=c,l.style.borderColor=e)}const Pf=new WeakMap;function Bf(l,c,e,u){let $=c+""+e,b=Pf.get(l);$!=b&&(Pf.set(l,$),l.style.height=e+"px",l.style.width=c+"px",l.style.marginLeft=u?-c/2+"px":0,l.style.marginTop=u?-e/2+"px":0)}const Hu={passive:!0},rC={...Hu,capture:!0};function Uo(l,c,e,u){c.addEventListener(l,e,u?rC:Hu)}function Su(l,c,e,u){c.removeEventListener(l,e,Hu)}bs&&bu();function dr(l,c,e,u){let $;e=e||0,u=u||c.length-1;let b=u<=2147483647;for(;u-e>1;)$=b?e+u>>1:Ni((e+u)/2),c[$]<l?e=$:u=$;return l-c[e]<=c[u]-l?e:u}function Mg(l){return(e,u,$)=>{let b=-1,v=-1;for(let x=u;x<=$;x++)if(l(e[x])){b=x;break}for(let x=$;x>=u;x--)if(l(e[x])){v=x;break}return[b,v]}}const Tg=l=>l!=null,Lg=l=>l!=null&&l>0,cl=Mg(Tg),oC=Mg(Lg);function sC(l,c,e,u=0,$=!1){let b=$?oC:cl,v=$?Lg:Tg;[c,e]=b(l,c,e);let x=l[c],p=l[c];if(c>-1)if(u==1)x=l[c],p=l[e];else if(u==-1)x=l[e],p=l[c];else for(let d=c;d<=e;d++){let o=l[d];v(o)&&(o<x?x=o:o>p&&(p=o))}return[x??Yt,p??-Yt]}function ul(l,c,e,u){let $=zf(l),b=zf(c);l==c&&($==-1?(l*=e,c/=e):(l/=e,c*=e));let v=e==10?qr:Eg,x=$==1?Ni:Qi,p=b==1?Qi:Ni,d=x(v(Nn(l))),o=p(v(Nn(c))),a=ps(e,d),s=ps(e,o);return e==10&&(d<0&&(a=Zt(a,-d)),o<0&&(s=Zt(s,-o))),u||e==2?(l=a*$,c=s*b):(l=Ng(l,a),c=hl(c,s)),[l,c]}function zu(l,c,e,u){let $=ul(l,c,e,u);return l==0&&($[0]=0),c==0&&($[1]=0),$}const Uu=.1,Wf={mode:3,pad:Uu},Zs={pad:0,soft:null,mode:0},aC={min:Zs,max:Zs};function Xa(l,c,e,u){return dl(e)?Hf(l,c,e):(Zs.pad=e,Zs.soft=u?0:null,Zs.mode=u?3:0,Hf(l,c,aC))}function It(l,c){return l??c}function lC(l,c,e){for(c=It(c,0),e=It(e,l.length-1);c<=e;){if(l[c]!=null)return!0;c++}return!1}function Hf(l,c,e){let u=e.min,$=e.max,b=It(u.pad,0),v=It($.pad,0),x=It(u.hard,-Yt),p=It($.hard,Yt),d=It(u.soft,Yt),o=It($.soft,-Yt),a=It(u.mode,0),s=It($.mode,0),r=c-l,n=qr(r),i=di(Nn(l),Nn(c)),h=qr(i),m=Nn(h-n);(r<1e-24||m>10)&&(r=0,(l==0||c==0)&&(r=1e-24,a==2&&d!=Yt&&(b=0),s==2&&o!=-Yt&&(v=0)));let y=r||i||1e3,R=qr(y),T=ps(10,Ni(R)),C=y*(r==0?l==0?.1:1:b),w=Zt(Ng(l-C,T/10),24),E=l>=d&&(a==1||a==3&&w<=d||a==2&&w>=d)?d:Yt,D=di(x,w<E&&l>=E?E:fr(E,w)),I=y*(r==0?c==0?.1:1:v),L=Zt(hl(c+I,T/10),24),z=c<=o&&(s==1||s==3&&L>=o||s==2&&L<=o)?o:-Yt,F=fr(p,L>z&&c<=z?z:di(z,L));return D==F&&D==0&&(F=100),[D,F]}const cC=new Intl.NumberFormat(bs?iC.language:"en-US"),Vu=l=>cC.format(l),Di=Math,Za=Di.PI,Nn=Di.abs,Ni=Di.floor,On=Di.round,Qi=Di.ceil,fr=Di.min,di=Di.max,ps=Di.pow,zf=Di.sign,qr=Di.log10,Eg=Di.log2,uC=(l,c=1)=>Di.sinh(l)*c,Tc=(l,c=1)=>Di.asinh(l/c),Yt=1/0;function Uf(l){return(qr((l^l>>31)-(l>>31))|0)+1}function ku(l,c,e){return fr(di(l,c),e)}function Rg(l){return typeof l=="function"}function Mt(l){return Rg(l)?l:()=>l}const hC=()=>{},Ig=l=>l,Og=(l,c)=>c,dC=l=>null,Vf=l=>!0,jf=(l,c)=>l==c,fC=/\.\d*?(?=9{6,}|0{6,})/gm,jo=l=>{if(Fg(l)||vo.has(l))return l;const c=`${l}`,e=c.match(fC);if(e==null)return l;let u=e[0].length-1;if(c.indexOf("e-")!=-1){let[$,b]=c.split("e");return+`${jo($)}e${b}`}return Zt(l,u)};function Po(l,c){return jo(Zt(jo(l/c))*c)}function hl(l,c){return jo(Qi(jo(l/c))*c)}function Ng(l,c){return jo(Ni(jo(l/c))*c)}function Zt(l,c=0){if(Fg(l))return l;let e=10**c,u=l*e*(1+Number.EPSILON);return On(u)/e}const vo=new Map;function Dg(l){return((""+l).split(".")[1]||"").length}function Xs(l,c,e,u){let $=[],b=u.map(Dg);for(let v=c;v<e;v++){let x=Nn(v),p=Zt(ps(l,v),x);for(let d=0;d<u.length;d++){let o=l==10?+`${u[d]}e${v}`:u[d]*p,a=(v>=0?0:x)+(v>=b[d]?0:b[d]),s=l==10?o:Zt(o,a);$.push(s),vo.set(s,a)}}return $}const Qs={},ju=[],gs=[null,null],go=Array.isArray,Fg=Number.isInteger,pC=l=>l===void 0;function Kf(l){return typeof l=="string"}function dl(l){let c=!1;if(l!=null){let e=l.constructor;c=e==null||e==Object}return c}function gC(l){return l!=null&&typeof l=="object"}const mC=Object.getPrototypeOf(Uint8Array),Pg="__proto__";function ms(l,c=dl){let e;if(go(l)){let u=l.find($=>$!=null);if(go(u)||c(u)){e=Array(l.length);for(let $=0;$<l.length;$++)e[$]=ms(l[$],c)}else e=l.slice()}else if(l instanceof mC)e=l.slice();else if(c(l)){e={};for(let u in l)u!=Pg&&(e[u]=ms(l[u],c))}else e=l;return e}function Mn(l){let c=arguments;for(let e=1;e<c.length;e++){let u=c[e];for(let $ in u)$!=Pg&&(dl(l[$])?Mn(l[$],ms(u[$])):l[$]=ms(u[$]))}return l}const vC=0,yC=1,wC=2;function bC(l,c,e){for(let u=0,$,b=-1;u<c.length;u++){let v=c[u];if(v>b){for($=v-1;$>=0&&l[$]==null;)l[$--]=null;for($=v+1;$<e&&l[$]==null;)l[b=$++]=null}}}function xC(l,c){if(CC(l)){let v=l[0].slice();for(let x=1;x<l.length;x++)v.push(...l[x].slice(1));return _C(v[0])||(v=kC(v)),v}let e=new Set;for(let v=0;v<l.length;v++){let p=l[v][0],d=p.length;for(let o=0;o<d;o++)e.add(p[o])}let u=[Array.from(e).sort((v,x)=>v-x)],$=u[0].length,b=new Map;for(let v=0;v<$;v++)b.set(u[0][v],v);for(let v=0;v<l.length;v++){let x=l[v],p=x[0];for(let d=1;d<x.length;d++){let o=x[d],a=Array($).fill(void 0),s=c?c[v][d]:yC,r=[];for(let n=0;n<o.length;n++){let i=o[n],h=b.get(p[n]);i===null?s!=vC&&(a[h]=i,s==wC&&r.push(h)):a[h]=i}bC(a,r,$),u.push(a)}}return u}const SC=typeof queueMicrotask>"u"?l=>Promise.resolve().then(l):queueMicrotask;function kC(l){let c=l[0],e=c.length,u=Array(e);for(let b=0;b<u.length;b++)u[b]=b;u.sort((b,v)=>c[b]-c[v]);let $=[];for(let b=0;b<l.length;b++){let v=l[b],x=Array(e);for(let p=0;p<e;p++)x[p]=v[u[p]];$.push(x)}return $}function CC(l){let c=l[0][0],e=c.length;for(let u=1;u<l.length;u++){let $=l[u][0];if($.length!=e)return!1;if($!=c){for(let b=0;b<e;b++)if($[b]!=c[b])return!1}}return!0}function _C(l,c=100){const e=l.length;if(e<=1)return!0;let u=0,$=e-1;for(;u<=$&&l[u]==null;)u++;for(;$>=u&&l[$]==null;)$--;if($<=u)return!0;const b=di(1,Ni(($-u+1)/c));for(let v=l[u],x=u+b;x<=$;x+=b){const p=l[x];if(p!=null){if(p<=v)return!1;v=p}}return!0}const Bg=["January","February","March","April","May","June","July","August","September","October","November","December"],Wg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Hg(l){return l.slice(0,3)}const AC=Wg.map(Hg),$C=Bg.map(Hg),MC={MMMM:Bg,MMM:$C,WWWW:Wg,WWW:AC};function Vs(l){return(l<10?"0":"")+l}function TC(l){return(l<10?"00":l<100?"0":"")+l}const LC={YYYY:l=>l.getFullYear(),YY:l=>(l.getFullYear()+"").slice(2),MMMM:(l,c)=>c.MMMM[l.getMonth()],MMM:(l,c)=>c.MMM[l.getMonth()],MM:l=>Vs(l.getMonth()+1),M:l=>l.getMonth()+1,DD:l=>Vs(l.getDate()),D:l=>l.getDate(),WWWW:(l,c)=>c.WWWW[l.getDay()],WWW:(l,c)=>c.WWW[l.getDay()],HH:l=>Vs(l.getHours()),H:l=>l.getHours(),h:l=>{let c=l.getHours();return c==0?12:c>12?c-12:c},AA:l=>l.getHours()>=12?"PM":"AM",aa:l=>l.getHours()>=12?"pm":"am",a:l=>l.getHours()>=12?"p":"a",mm:l=>Vs(l.getMinutes()),m:l=>l.getMinutes(),ss:l=>Vs(l.getSeconds()),s:l=>l.getSeconds(),fff:l=>TC(l.getMilliseconds())};function Ku(l,c){c=c||MC;let e=[],u=/\{([a-z]+)\}|[^{]+/gi,$;for(;$=u.exec(l);)e.push($[0][0]=="{"?LC[$[1]]:$[0]);return b=>{let v="";for(let x=0;x<e.length;x++)v+=typeof e[x]=="string"?e[x]:e[x](b,c);return v}}const EC=new Intl.DateTimeFormat().resolvedOptions().timeZone;function RC(l,c){let e;return c=="UTC"||c=="Etc/UTC"?e=new Date(+l+l.getTimezoneOffset()*6e4):c==EC?e=l:(e=new Date(l.toLocaleString("en-US",{timeZone:c})),e.setMilliseconds(l.getMilliseconds())),e}const zg=l=>l%1==0,el=[1,2,2.5,5],IC=Xs(10,-32,0,el),Ug=Xs(10,0,32,el),OC=Ug.filter(zg),Bo=IC.concat(Ug),Gu=`
|
|
1496
|
+
`,Vg="{YYYY}",Gf=Gu+Vg,jg="{M}/{D}",Ys=Gu+jg,ja=Ys+"/{YY}",Kg="{aa}",NC="{h}:{mm}",hs=NC+Kg,qf=Gu+hs,Yf=":{ss}",Wt=null;function Gg(l){let c=l*1e3,e=c*60,u=e*60,$=u*24,b=$*30,v=$*365,p=(l==1?Xs(10,0,3,el).filter(zg):Xs(10,-3,0,el)).concat([c,c*5,c*10,c*15,c*30,e,e*5,e*10,e*15,e*30,u,u*2,u*3,u*4,u*6,u*8,u*12,$,$*2,$*3,$*4,$*5,$*6,$*7,$*8,$*9,$*10,$*15,b,b*2,b*3,b*4,b*6,v,v*2,v*5,v*10,v*25,v*50,v*100]);const d=[[v,Vg,Wt,Wt,Wt,Wt,Wt,Wt,1],[$*28,"{MMM}",Gf,Wt,Wt,Wt,Wt,Wt,1],[$,jg,Gf,Wt,Wt,Wt,Wt,Wt,1],[u,"{h}"+Kg,ja,Wt,Ys,Wt,Wt,Wt,1],[e,hs,ja,Wt,Ys,Wt,Wt,Wt,1],[c,Yf,ja+" "+hs,Wt,Ys+" "+hs,Wt,qf,Wt,1],[l,Yf+".{fff}",ja+" "+hs,Wt,Ys+" "+hs,Wt,qf,Wt,1]];function o(a){return(s,r,n,i,h,m)=>{let y=[],R=h>=v,T=h>=b&&h<v,C=a(n),w=Zt(C*l,3),E=Lc(C.getFullYear(),R?0:C.getMonth(),T||R?1:C.getDate()),D=Zt(E*l,3);if(T||R){let I=T?h/b:0,L=R?h/v:0,z=w==D?w:Zt(Lc(E.getFullYear()+L,E.getMonth()+I,1)*l,3),F=new Date(On(z/l)),O=F.getFullYear(),A=F.getMonth();for(let S=0;z<=i;S++){let N=Lc(O+L*S,A+I*S,1),W=N-a(Zt(N*l,3));z=Zt((+N+W)*l,3),z<=i&&y.push(z)}}else{let I=h>=$?$:h,L=Ni(n)-Ni(w),z=D+L+hl(w-D,I);y.push(z);let F=a(z),O=F.getHours()+F.getMinutes()/e+F.getSeconds()/u,A=h/u,S=s.axes[r]._space,N=m/S;for(;z=Zt(z+h,l==1?0:3),!(z>i);)if(A>1){let W=Ni(Zt(O+A,6))%24,Z=a(z).getHours()-W;Z>1&&(Z=-1),z-=Z*u,O=(O+A)%24;let ee=y[y.length-1];Zt((z-ee)/h,3)*N>=.7&&y.push(z)}else y.push(z)}return y}}return[p,d,o]}const[DC,FC,PC]=Gg(1),[BC,WC,HC]=Gg(.001);Xs(2,-53,53,[1]);function Zf(l,c){return l.map(e=>e.map((u,$)=>$==0||$==8||u==null?u:c($==1||e[8]==0?u:e[1]+u)))}function Qf(l,c){return(e,u,$,b,v)=>{let x=c.find(n=>v>=n[0])||c[c.length-1],p,d,o,a,s,r;return u.map(n=>{let i=l(n),h=i.getFullYear(),m=i.getMonth(),y=i.getDate(),R=i.getHours(),T=i.getMinutes(),C=i.getSeconds(),w=h!=p&&x[2]||m!=d&&x[3]||y!=o&&x[4]||R!=a&&x[5]||T!=s&&x[6]||C!=r&&x[7]||x[1];return p=h,d=m,o=y,a=R,s=T,r=C,w(i)})}}function zC(l,c){let e=Ku(c);return(u,$,b,v,x)=>$.map(p=>e(l(p)))}function Lc(l,c,e){return new Date(l,c,e)}function Jf(l,c){return c(l)}const UC="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Xf(l,c){return(e,u,$,b)=>b==null?Wu:c(l(u))}function VC(l,c){let e=l.series[c];return e.width?e.stroke(l,c):e.points.width?e.points.stroke(l,c):null}function jC(l,c){return l.series[c].fill(l,c)}const KC={show:!0,live:!0,isolate:!1,mount:hC,markers:{show:!0,width:2,stroke:VC,fill:jC,dash:"solid"},idx:null,idxs:null,values:[]};function GC(l,c){let e=l.cursor.points,u=Zi(),$=e.size(l,c);en(u,Gs,$),en(u,qs,$);let b=$/-2;en(u,"marginLeft",b),en(u,"marginTop",b);let v=e.width(l,c,$);return v&&en(u,"borderWidth",v),u}function qC(l,c){let e=l.series[c].points;return e._fill||e._stroke}function YC(l,c){let e=l.series[c].points;return e._stroke||e._fill}function ZC(l,c){return l.series[c].points.size}const Ec=[0,0];function QC(l,c,e){return Ec[0]=c,Ec[1]=e,Ec}function Ka(l,c,e,u=!0){return $=>{$.button==0&&(!u||$.target==c)&&e($)}}function Rc(l,c,e,u=!0){return $=>{(!u||$.target==c)&&e($)}}const JC={show:!0,x:!0,y:!0,lock:!1,move:QC,points:{one:!1,show:GC,size:ZC,width:0,stroke:YC,fill:qC},bind:{mousedown:Ka,mouseup:Ka,click:Ka,dblclick:Ka,mousemove:Rc,mouseleave:Rc,mouseenter:Rc},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(l,c)=>{c.stopPropagation(),c.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(l,c,e,u,$)=>u-$,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},qg={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},qu=Mn({},qg,{filter:Og}),Yg=Mn({},qu,{size:10}),Zg=Mn({},qg,{show:!1}),Yu='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Qg="bold "+Yu,Jg=1.5,ep={show:!0,scale:"x",stroke:Bu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Qg,side:2,grid:qu,ticks:Yg,border:Zg,font:Yu,lineGap:Jg,rotate:0},XC="Value",e_="Time",tp={show:!0,scale:"x",auto:!1,sorted:1,min:Yt,max:-Yt,idxs:[]};function t_(l,c,e,u,$){return c.map(b=>b==null?"":Vu(b))}function n_(l,c,e,u,$,b,v){let x=[],p=vo.get($)||0;e=v?e:Zt(hl(e,$),p);for(let d=e;d<=u;d=Zt(d+$,p))x.push(Object.is(d,-0)?0:d);return x}function Cu(l,c,e,u,$,b,v){const x=[],p=l.scales[l.axes[c].scale].log,d=p==10?qr:Eg,o=Ni(d(e));$=ps(p,o),p==10&&($=Bo[dr($,Bo)]);let a=e,s=$*p;p==10&&(s=Bo[dr(s,Bo)]);do x.push(a),a=a+$,p==10&&!vo.has(a)&&(a=Zt(a,vo.get($))),a>=s&&($=a,s=$*p,p==10&&(s=Bo[dr(s,Bo)]));while(a<=u);return x}function i_(l,c,e,u,$,b,v){let p=l.scales[l.axes[c].scale].asinh,d=u>p?Cu(l,c,di(p,e),u,$):[p],o=u>=0&&e<=0?[0]:[];return(e<-p?Cu(l,c,di(p,-u),-e,$):[p]).reverse().map(s=>-s).concat(o,d)}const Xg=/./,r_=/[12357]/,o_=/[125]/,np=/1/,_u=(l,c,e,u)=>l.map(($,b)=>c==4&&$==0||b%u==0&&e.test($.toExponential()[$<0?1:0])?$:null);function s_(l,c,e,u,$){let b=l.axes[e],v=b.scale,x=l.scales[v],p=l.valToPos,d=b._space,o=p(10,v),a=p(9,v)-o>=d?Xg:p(7,v)-o>=d?r_:p(5,v)-o>=d?o_:np;if(a==np){let s=Nn(p(1,v)-o);if(s<d)return _u(c.slice().reverse(),x.distr,a,Qi(d/s)).reverse()}return _u(c,x.distr,a,1)}function a_(l,c,e,u,$){let b=l.axes[e],v=b.scale,x=b._space,p=l.valToPos,d=Nn(p(1,v)-p(2,v));return d<x?_u(c.slice().reverse(),3,Xg,Qi(x/d)).reverse():c}function l_(l,c,e,u){return u==null?Wu:c==null?"":Vu(c)}const ip={show:!0,scale:"y",stroke:Bu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Qg,side:3,grid:qu,ticks:Yg,border:Zg,font:Yu,lineGap:Jg,rotate:0};function c_(l,c){let e=3+(l||1)*2;return Zt(e*c,3)}function u_(l,c){let{scale:e,idxs:u}=l.series[0],$=l._data[0],b=l.valToPos($[u[0]],e,!0),v=l.valToPos($[u[1]],e,!0),x=Nn(v-b),p=l.series[c],d=x/(p.points.space*Ft);return u[1]-u[0]<=d}const rp={scale:null,auto:!0,sorted:0,min:Yt,max:-Yt},em=(l,c,e,u,$)=>$,op={show:!0,auto:!0,sorted:0,gaps:em,alpha:1,facets:[Mn({},rp,{scale:"x"}),Mn({},rp,{scale:"y"})]},sp={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:em,alpha:1,points:{show:u_,filter:null},values:null,min:Yt,max:-Yt,idxs:[],path:null,clip:null};function h_(l,c,e,u,$){return e/10}const tm={time:Dk,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},d_=Mn({},tm,{time:!1,ori:1}),ap={};function nm(l,c){let e=ap[l];return e||(e={key:l,plots:[],sub(u){e.plots.push(u)},unsub(u){e.plots=e.plots.filter($=>$!=u)},pub(u,$,b,v,x,p,d){for(let o=0;o<e.plots.length;o++)e.plots[o]!=$&&e.plots[o].pub(u,$,b,v,x,p,d)}},l!=null&&(ap[l]=e)),e}const vs=1,Au=2;function Ko(l,c,e){const u=l.mode,$=l.series[c],b=u==2?l._data[c]:l._data,v=l.scales,x=l.bbox;let p=b[0],d=u==2?b[1]:b[c],o=u==2?v[$.facets[0].scale]:v[l.series[0].scale],a=u==2?v[$.facets[1].scale]:v[$.scale],s=x.left,r=x.top,n=x.width,i=x.height,h=l.valToPosH,m=l.valToPosV;return o.ori==0?e($,p,d,o,a,h,m,s,r,n,i,pl,xs,ml,rm,sm):e($,p,d,o,a,m,h,r,s,i,n,gl,Ss,Ju,om,am)}function Zu(l,c){let e=0,u=0,$=It(l.bands,ju);for(let b=0;b<$.length;b++){let v=$[b];v.series[0]==c?e=v.dir:v.series[1]==c&&(v.dir==1?u|=1:u|=2)}return[e,u==1?-1:u==2?1:u==3?2:0]}function f_(l,c,e,u,$){let b=l.mode,v=l.series[c],x=b==2?v.facets[1].scale:v.scale,p=l.scales[x];return $==-1?p.min:$==1?p.max:p.distr==3?p.dir==1?p.min:p.max:0}function Yr(l,c,e,u,$,b){return Ko(l,c,(v,x,p,d,o,a,s,r,n,i,h)=>{let m=v.pxRound;const y=d.dir*(d.ori==0?1:-1),R=d.ori==0?xs:Ss;let T,C;y==1?(T=e,C=u):(T=u,C=e);let w=m(a(x[T],d,i,r)),E=m(s(p[T],o,h,n)),D=m(a(x[C],d,i,r)),I=m(s(b==1?o.max:o.min,o,h,n)),L=new Path2D($);return R(L,D,I),R(L,w,I),R(L,w,E),L})}function fl(l,c,e,u,$,b){let v=null;if(l.length>0){v=new Path2D;const x=c==0?ml:Ju;let p=e;for(let a=0;a<l.length;a++){let s=l[a];if(s[1]>s[0]){let r=s[0]-p;r>0&&x(v,p,u,r,u+b),p=s[1]}}let d=e+$-p,o=10;d>0&&x(v,p,u-o/2,d,u+b+o)}return v}function p_(l,c,e){let u=l[l.length-1];u&&u[0]==c?u[1]=e:l.push([c,e])}function Qu(l,c,e,u,$,b,v){let x=[],p=l.length;for(let d=$==1?e:u;d>=e&&d<=u;d+=$)if(c[d]===null){let a=d,s=d;if($==1)for(;++d<=u&&c[d]===null;)s=d;else for(;--d>=e&&c[d]===null;)s=d;let r=b(l[a]),n=s==a?r:b(l[s]),i=a-$;r=v<=0&&i>=0&&i<p?b(l[i]):r;let m=s+$;n=v>=0&&m>=0&&m<p?b(l[m]):n,n>=r&&x.push([r,n])}return x}function lp(l){return l==0?Ig:l==1?On:c=>Po(c,l)}function im(l){let c=l==0?pl:gl,e=l==0?($,b,v,x,p,d)=>{$.arcTo(b,v,x,p,d)}:($,b,v,x,p,d)=>{$.arcTo(v,b,p,x,d)},u=l==0?($,b,v,x,p)=>{$.rect(b,v,x,p)}:($,b,v,x,p)=>{$.rect(v,b,p,x)};return($,b,v,x,p,d=0,o=0)=>{d==0&&o==0?u($,b,v,x,p):(d=fr(d,x/2,p/2),o=fr(o,x/2,p/2),c($,b+d,v),e($,b+x,v,b+x,v+p,d),e($,b+x,v+p,b,v+p,o),e($,b,v+p,b,v,o),e($,b,v,b+x,v,d),$.closePath())}}const pl=(l,c,e)=>{l.moveTo(c,e)},gl=(l,c,e)=>{l.moveTo(e,c)},xs=(l,c,e)=>{l.lineTo(c,e)},Ss=(l,c,e)=>{l.lineTo(e,c)},ml=im(0),Ju=im(1),rm=(l,c,e,u,$,b)=>{l.arc(c,e,u,$,b)},om=(l,c,e,u,$,b)=>{l.arc(e,c,u,$,b)},sm=(l,c,e,u,$,b,v)=>{l.bezierCurveTo(c,e,u,$,b,v)},am=(l,c,e,u,$,b,v)=>{l.bezierCurveTo(e,c,$,u,v,b)};function lm(l){return(c,e,u,$,b)=>Ko(c,e,(v,x,p,d,o,a,s,r,n,i,h)=>{let{pxRound:m,points:y}=v,R,T;d.ori==0?(R=pl,T=rm):(R=gl,T=om);const C=Zt(y.width*Ft,3);let w=(y.size-y.width)/2*Ft,E=Zt(w*2,3),D=new Path2D,I=new Path2D,{left:L,top:z,width:F,height:O}=c.bbox;ml(I,L-E,z-E,F+E*2,O+E*2);const A=S=>{if(p[S]!=null){let N=m(a(x[S],d,i,r)),W=m(s(p[S],o,h,n));R(D,N+w,W),T(D,N,W,w,0,Za*2)}};if(b)b.forEach(A);else for(let S=u;S<=$;S++)A(S);return{stroke:C>0?D:null,fill:D,clip:I,flags:vs|Au}})}function cm(l){return(c,e,u,$,b,v)=>{u!=$&&(b!=u&&v!=u&&l(c,e,u),b!=$&&v!=$&&l(c,e,$),l(c,e,v))}}const g_=cm(xs),m_=cm(Ss);function um(l){const c=It(l==null?void 0:l.alignGaps,0);return(e,u,$,b)=>Ko(e,u,(v,x,p,d,o,a,s,r,n,i,h)=>{[$,b]=cl(p,$,b);let m=v.pxRound,y=O=>m(a(O,d,i,r)),R=O=>m(s(O,o,h,n)),T,C;d.ori==0?(T=xs,C=g_):(T=Ss,C=m_);const w=d.dir*(d.ori==0?1:-1),E={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:vs},D=E.stroke;let I=!1;if(b-$>=i*4){let O=ne=>e.posToVal(ne,d.key,!0),A=null,S=null,N,W,V,G=y(x[w==1?$:b]),Z=y(x[$]),ee=y(x[b]),ce=O(w==1?Z+1:ee-1);for(let ne=w==1?$:b;ne>=$&&ne<=b;ne+=w){let he=x[ne],le=(w==1?he<ce:he>ce)?G:y(he),me=p[ne];le==G?me!=null?(W=me,A==null?(T(D,le,R(W)),N=A=S=W):W<A?A=W:W>S&&(S=W)):me===null&&(I=!0):(A!=null&&C(D,G,R(A),R(S),R(N),R(W)),me!=null?(W=me,T(D,le,R(W)),A=S=N=W):(A=S=null,me===null&&(I=!0)),G=le,ce=O(G+w))}A!=null&&A!=S&&V!=G&&C(D,G,R(A),R(S),R(N),R(W))}else for(let O=w==1?$:b;O>=$&&O<=b;O+=w){let A=p[O];A===null?I=!0:A!=null&&T(D,y(x[O]),R(A))}let[z,F]=Zu(e,u);if(v.fill!=null||z!=0){let O=E.fill=new Path2D(D),A=v.fillTo(e,u,v.min,v.max,z),S=R(A),N=y(x[$]),W=y(x[b]);w==-1&&([W,N]=[N,W]),T(O,W,S),T(O,N,S)}if(!v.spanGaps){let O=[];I&&O.push(...Qu(x,p,$,b,w,y,c)),E.gaps=O=v.gaps(e,u,$,b,O),E.clip=fl(O,d.ori,r,n,i,h)}return F!=0&&(E.band=F==2?[Yr(e,u,$,b,D,-1),Yr(e,u,$,b,D,1)]:Yr(e,u,$,b,D,F)),E})}function v_(l){const c=It(l.align,1),e=It(l.ascDesc,!1),u=It(l.alignGaps,0),$=It(l.extend,!1);return(b,v,x,p)=>Ko(b,v,(d,o,a,s,r,n,i,h,m,y,R)=>{[x,p]=cl(a,x,p);let T=d.pxRound,{left:C,width:w}=b.bbox,E=Z=>T(n(Z,s,y,h)),D=Z=>T(i(Z,r,R,m)),I=s.ori==0?xs:Ss;const L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:vs},z=L.stroke,F=s.dir*(s.ori==0?1:-1);let O=D(a[F==1?x:p]),A=E(o[F==1?x:p]),S=A,N=A;$&&c==-1&&(N=C,I(z,N,O)),I(z,A,O);for(let Z=F==1?x:p;Z>=x&&Z<=p;Z+=F){let ee=a[Z];if(ee==null)continue;let ce=E(o[Z]),ne=D(ee);c==1?I(z,ce,O):I(z,S,ne),I(z,ce,ne),O=ne,S=ce}let W=S;$&&c==1&&(W=C+w,I(z,W,O));let[V,G]=Zu(b,v);if(d.fill!=null||V!=0){let Z=L.fill=new Path2D(z),ee=d.fillTo(b,v,d.min,d.max,V),ce=D(ee);I(Z,W,ce),I(Z,N,ce)}if(!d.spanGaps){let Z=[];Z.push(...Qu(o,a,x,p,F,E,u));let ee=d.width*Ft/2,ce=e||c==1?ee:-ee,ne=e||c==-1?-ee:ee;Z.forEach(he=>{he[0]+=ce,he[1]+=ne}),L.gaps=Z=d.gaps(b,v,x,p,Z),L.clip=fl(Z,s.ori,h,m,y,R)}return G!=0&&(L.band=G==2?[Yr(b,v,x,p,z,-1),Yr(b,v,x,p,z,1)]:Yr(b,v,x,p,z,G)),L})}function cp(l,c,e,u,$,b,v=Yt){if(l.length>1){let x=null;for(let p=0,d=1/0;p<l.length;p++)if(c[p]!==void 0){if(x!=null){let o=Nn(l[p]-l[x]);o<d&&(d=o,v=Nn(e(l[p],u,$,b)-e(l[x],u,$,b)))}x=p}}return v}function y_(l){l=l||Qs;const c=It(l.size,[.6,Yt,1]),e=l.align||0,u=l.gap||0;let $=l.radius;$=$==null?[0,0]:typeof $=="number"?[$,0]:$;const b=Mt($),v=1-c[0],x=It(c[1],Yt),p=It(c[2],1),d=It(l.disp,Qs),o=It(l.each,r=>{}),{fill:a,stroke:s}=d;return(r,n,i,h)=>Ko(r,n,(m,y,R,T,C,w,E,D,I,L,z)=>{let F=m.pxRound,O=e,A=u*Ft,S=x*Ft,N=p*Ft,W,V;T.ori==0?[W,V]=b(r,n):[V,W]=b(r,n);const G=T.dir*(T.ori==0?1:-1);let Z=T.ori==0?ml:Ju,ee=T.ori==0?o:(ze,Ot,Gt,_n,oi,qn,sn)=>{o(ze,Ot,Gt,oi,_n,sn,qn)},ce=It(r.bands,ju).find(ze=>ze.series[0]==n),ne=ce!=null?ce.dir:0,he=m.fillTo(r,n,m.min,m.max,ne),ue=F(E(he,C,z,I)),le,me,_e,Ae=L,Me=F(m.width*Ft),qe=!1,Ve=null,ot=null,Je=null,lt=null;a!=null&&(Me==0||s!=null)&&(qe=!0,Ve=a.values(r,n,i,h),ot=new Map,new Set(Ve).forEach(ze=>{ze!=null&&ot.set(ze,new Path2D)}),Me>0&&(Je=s.values(r,n,i,h),lt=new Map,new Set(Je).forEach(ze=>{ze!=null&<.set(ze,new Path2D)})));let{x0:Ht,size:vn}=d;if(Ht!=null&&vn!=null){O=1,y=Ht.values(r,n,i,h),Ht.unit==2&&(y=y.map(Gt=>r.posToVal(D+Gt*L,T.key,!0)));let ze=vn.values(r,n,i,h);vn.unit==2?me=ze[0]*L:me=w(ze[0],T,L,D)-w(0,T,L,D),Ae=cp(y,R,w,T,L,D,Ae),_e=Ae-me+A}else Ae=cp(y,R,w,T,L,D,Ae),_e=Ae*v+A,me=Ae-_e;_e<1&&(_e=0),Me>=me/2&&(Me=0),_e<5&&(F=Ig);let Pt=_e>0,Si=Ae-_e-(Pt?Me:0);me=F(ku(Si,N,S)),le=(O==0?me/2:O==G?0:me)-O*G*((O==0?A/2:0)+(Pt?Me/2:0));const on={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Cn=qe?null:new Path2D;let Fn=null;if(ce!=null)Fn=r.data[ce.series[1]];else{let{y0:ze,y1:Ot}=d;ze!=null&&Ot!=null&&(R=Ot.values(r,n,i,h),Fn=ze.values(r,n,i,h))}let ri=W*me,dt=V*me;for(let ze=G==1?i:h;ze>=i&&ze<=h;ze+=G){let Ot=R[ze];if(Ot==null)continue;if(Fn!=null){let zt=Fn[ze]??0;if(Ot-zt==0)continue;ue=E(zt,C,z,I)}let Gt=T.distr!=2||d!=null?y[ze]:ze,_n=w(Gt,T,L,D),oi=E(It(Ot,he),C,z,I),qn=F(_n-le),sn=F(di(oi,ue)),Tn=F(fr(oi,ue)),Pn=sn-Tn;if(Ot!=null){let zt=Ot<0?dt:ri,Ln=Ot<0?ri:dt;qe?(Me>0&&Je[ze]!=null&&Z(lt.get(Je[ze]),qn,Tn+Ni(Me/2),me,di(0,Pn-Me),zt,Ln),Ve[ze]!=null&&Z(ot.get(Ve[ze]),qn,Tn+Ni(Me/2),me,di(0,Pn-Me),zt,Ln)):Z(Cn,qn,Tn+Ni(Me/2),me,di(0,Pn-Me),zt,Ln),ee(r,n,ze,qn-Me/2,Tn,me+Me,Pn)}}return Me>0?on.stroke=qe?lt:Cn:qe||(on._fill=m.width==0?m._fill:m._stroke??m._fill,on.width=0),on.fill=qe?ot:Cn,on})}function w_(l,c){const e=It(c==null?void 0:c.alignGaps,0);return(u,$,b,v)=>Ko(u,$,(x,p,d,o,a,s,r,n,i,h,m)=>{[b,v]=cl(d,b,v);let y=x.pxRound,R=W=>y(s(W,o,h,n)),T=W=>y(r(W,a,m,i)),C,w,E;o.ori==0?(C=pl,E=xs,w=sm):(C=gl,E=Ss,w=am);const D=o.dir*(o.ori==0?1:-1);let I=R(p[D==1?b:v]),L=I,z=[],F=[];for(let W=D==1?b:v;W>=b&&W<=v;W+=D)if(d[W]!=null){let G=p[W],Z=R(G);z.push(L=Z),F.push(T(d[W]))}const O={stroke:l(z,F,C,E,w,y),fill:null,clip:null,band:null,gaps:null,flags:vs},A=O.stroke;let[S,N]=Zu(u,$);if(x.fill!=null||S!=0){let W=O.fill=new Path2D(A),V=x.fillTo(u,$,x.min,x.max,S),G=T(V);E(W,L,G),E(W,I,G)}if(!x.spanGaps){let W=[];W.push(...Qu(p,d,b,v,D,R,e)),O.gaps=W=x.gaps(u,$,b,v,W),O.clip=fl(W,o.ori,n,i,h,m)}return N!=0&&(O.band=N==2?[Yr(u,$,b,v,A,-1),Yr(u,$,b,v,A,1)]:Yr(u,$,b,v,A,N)),O})}function b_(l){return w_(x_,l)}function x_(l,c,e,u,$,b){const v=l.length;if(v<2)return null;const x=new Path2D;if(e(x,l[0],c[0]),v==2)u(x,l[1],c[1]);else{let p=Array(v),d=Array(v-1),o=Array(v-1),a=Array(v-1);for(let s=0;s<v-1;s++)o[s]=c[s+1]-c[s],a[s]=l[s+1]-l[s],d[s]=o[s]/a[s];p[0]=d[0];for(let s=1;s<v-1;s++)d[s]===0||d[s-1]===0||d[s-1]>0!=d[s]>0?p[s]=0:(p[s]=3*(a[s-1]+a[s])/((2*a[s]+a[s-1])/d[s-1]+(a[s]+2*a[s-1])/d[s]),isFinite(p[s])||(p[s]=0));p[v-1]=d[v-2];for(let s=0;s<v-1;s++)$(x,l[s]+a[s]/3,c[s]+p[s]*a[s]/3,l[s+1]-a[s]/3,c[s+1]-p[s+1]*a[s]/3,l[s+1],c[s+1])}return x}const $u=new Set;function up(){for(let l of $u)l.syncRect(!0)}bs&&(Uo(tC,ds,up),Uo(nC,ds,up,!0),Uo(Ja,ds,()=>{ii.pxRatio=Ft}));const S_=um(),k_=lm();function hp(l,c,e,u){return(u?[l[0],l[1]].concat(l.slice(2)):[l[0]].concat(l.slice(1))).map((b,v)=>Mu(b,v,c,e))}function C_(l,c){return l.map((e,u)=>u==0?{}:Mn({},c,e))}function Mu(l,c,e,u){return Mn({},c==0?e:u,l)}function hm(l,c,e){return c==null?gs:[c,e]}const __=hm;function A_(l,c,e){return c==null?gs:Xa(c,e,Uu,!0)}function dm(l,c,e,u){return c==null?gs:ul(c,e,l.scales[u].log,!1)}const $_=dm;function fm(l,c,e,u){return c==null?gs:zu(c,e,l.scales[u].log,!1)}const M_=fm;function T_(l,c,e,u,$){let b=di(Uf(l),Uf(c)),v=c-l,x=dr($/u*v,e);do{let p=e[x],d=u*p/v;if(d>=$&&b+(p<5?vo.get(p):0)<=17)return[p,d]}while(++x<e.length);return[0,0]}function dp(l){let c,e;return l=l.replace(/(\d+)px/,(u,$)=>(c=On((e=+$)*Ft))+"px"),[l,c,e]}function L_(l){l.show&&[l.font,l.labelFont].forEach(c=>{let e=Zt(c[2]*Ft,1);c[0]=c[0].replace(/[0-9.]+px/,e+"px"),c[1]=e})}function ii(l,c,e){const u={mode:It(l.mode,1)},$=u.mode;function b(j,Q,re,oe){let ge=Q.valToPct(j);return oe+re*(Q.dir==-1?1-ge:ge)}function v(j,Q,re,oe){let ge=Q.valToPct(j);return oe+re*(Q.dir==-1?ge:1-ge)}function x(j,Q,re,oe){return Q.ori==0?b(j,Q,re,oe):v(j,Q,re,oe)}u.valToPosH=b,u.valToPosV=v;let p=!1;u.status=0;const d=u.root=Zi(Fk);if(l.id!=null&&(d.id=l.id),Oi(d,l.class),l.title){let j=Zi(Wk,d);j.textContent=l.title}const o=ur("canvas"),a=u.ctx=o.getContext("2d"),s=Zi(Hk,d);Uo("click",s,j=>{j.target===n&&(Dt!=Wi||At!=br)&&hn.click(u,j)},!0);const r=u.under=Zi(zk,s);s.appendChild(o);const n=u.over=Zi(Uk,s);l=ms(l);const i=+It(l.pxAlign,1),h=lp(i);(l.plugins||[]).forEach(j=>{j.opts&&(l=j.opts(u,l)||l)});const m=l.ms||.001,y=u.series=$==1?hp(l.series||[],tp,sp,!1):C_(l.series||[null],op),R=u.axes=hp(l.axes||[],ep,ip,!0),T=u.scales={},C=u.bands=l.bands||[];C.forEach(j=>{j.fill=Mt(j.fill||null),j.dir=It(j.dir,-1)});const w=$==2?y[1].facets[0].scale:y[0].scale,E={axes:Ir,series:Zo},D=(l.drawOrder||["axes","series"]).map(j=>E[j]);function I(j){const Q=j.distr==3?re=>qr(re>0?re:j.clamp(u,re,j.min,j.max,j.key)):j.distr==4?re=>Tc(re,j.asinh):j.distr==100?re=>j.fwd(re):re=>re;return re=>{let oe=Q(re),{_min:ge,_max:be}=j,$e=be-ge;return(oe-ge)/$e}}function L(j){let Q=T[j];if(Q==null){let re=(l.scales||Qs)[j]||Qs;if(re.from!=null){L(re.from);let oe=Mn({},T[re.from],re,{key:j});oe.valToPct=I(oe),T[j]=oe}else{Q=T[j]=Mn({},j==w?tm:d_,re),Q.key=j;let oe=Q.time,ge=Q.range,be=go(ge);if((j!=w||$==2&&!oe)&&(be&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?Wf:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?Wf:{mode:1,hard:ge[1],soft:ge[1]}},be=!1),!be&&dl(ge))){let $e=ge;ge=(Ne,Fe,He)=>Fe==null?gs:Xa(Fe,He,$e)}Q.range=Mt(ge||(oe?__:j==w?Q.distr==3?$_:Q.distr==4?M_:hm:Q.distr==3?dm:Q.distr==4?fm:A_)),Q.auto=Mt(be?!1:Q.auto),Q.clamp=Mt(Q.clamp||h_),Q._min=Q._max=null,Q.valToPct=I(Q)}}}L("x"),L("y"),$==1&&y.forEach(j=>{L(j.scale)}),R.forEach(j=>{L(j.scale)});for(let j in l.scales)L(j);const z=T[w],F=z.distr;let O,A;z.ori==0?(Oi(d,Pk),O=b,A=v):(Oi(d,Bk),O=v,A=b);const S={};for(let j in T){let Q=T[j];(Q.min!=null||Q.max!=null)&&(S[j]={min:Q.min,max:Q.max},Q.min=Q.max=null)}const N=l.tzDate||(j=>new Date(On(j/m))),W=l.fmtDate||Ku,V=m==1?PC(N):HC(N),G=Qf(N,Zf(m==1?FC:WC,W)),Z=Xf(N,Jf(UC,W)),ee=[],ce=u.legend=Mn({},KC,l.legend),ne=u.cursor=Mn({},JC,{drag:{y:$==2}},l.cursor),he=ce.show,ue=ne.show,le=ce.markers;ce.idxs=ee,le.width=Mt(le.width),le.dash=Mt(le.dash),le.stroke=Mt(le.stroke),le.fill=Mt(le.fill);let me,_e,Ae,Me=[],qe=[],Ve,ot=!1,Je={};if(ce.live){const j=y[1]?y[1].values:null;ot=j!=null,Ve=ot?j(u,1,0):{_:0};for(let Q in Ve)Je[Q]=Wu}if(he)if(me=ur("table",Yk,d),Ae=ur("tbody",null,me),ce.mount(u,me),ot){_e=ur("thead",null,me,Ae);let j=ur("tr",null,_e);ur("th",null,j);for(var lt in Ve)ur("th",$f,j).textContent=lt}else Oi(me,Qk),ce.live&&Oi(me,Zk);const Ht={show:!0},vn={show:!1};function Pt(j,Q){if(Q==0&&(ot||!ce.live||$==2))return gs;let re=[],oe=ur("tr",Jk,Ae,Ae.childNodes[Q]);Oi(oe,j.class),j.show||Oi(oe,Wo);let ge=ur("th",null,oe);if(le.show){let Ne=Zi(Xk,ge);if(Q>0){let Fe=le.width(u,Q);Fe&&(Ne.style.border=Fe+"px "+le.dash(u,Q)+" "+le.stroke(u,Q)),Ne.style.background=le.fill(u,Q)}}let be=Zi($f,ge);j.label instanceof HTMLElement?be.appendChild(j.label):be.textContent=j.label,Q>0&&(le.show||(be.style.color=j.width>0?le.stroke(u,Q):le.fill(u,Q)),on("click",ge,Ne=>{if(ne._lock)return;tr(Ne);let Fe=y.indexOf(j);if((Ne.ctrlKey||Ne.metaKey)!=ce.isolate){let He=y.some((je,Ye)=>Ye>0&&Ye!=Fe&&je.show);y.forEach((je,Ye)=>{Ye>0&&ai(Ye,He?Ye==Fe?Ht:vn:Ht,!0,tt.setSeries)})}else ai(Fe,{show:!j.show},!0,tt.setSeries)},!1),nr&&on(Ef,ge,Ne=>{ne._lock||(tr(Ne),ai(y.indexOf(j),Ui,!0,tt.setSeries))},!1));for(var $e in Ve){let Ne=ur("td",eC,oe);Ne.textContent="--",re.push(Ne)}return[oe,re]}const Si=new Map;function on(j,Q,re,oe=!0){const ge=Si.get(Q)||{},be=ne.bind[j](u,Q,re,oe);be&&(Uo(j,Q,ge[j]=be),Si.set(Q,ge))}function Cn(j,Q,re){const oe=Si.get(Q)||{};for(let ge in oe)(j==null||ge==j)&&(Su(ge,Q,oe[ge]),delete oe[ge]);j==null&&Si.delete(Q)}let Fn=0,ri=0,dt=0,ze=0,Ot=0,Gt=0,_n=Ot,oi=Gt,qn=dt,sn=ze,Tn=0,Pn=0,zt=0,Ln=0;u.bbox={};let $r=!1,Ji=!1,Xi=!1,er=!1,Mr=!1,Vn=!1;function Tr(j,Q,re){(re||j!=u.width||Q!=u.height)&&Zr(j,Q),sr(!1),Xi=!0,Ji=!0,wr()}function Zr(j,Q){u.width=Fn=dt=j,u.height=ri=ze=Q,Ot=Gt=0,yo(),Go();let re=u.bbox;Tn=re.left=Po(Ot*Ft,.5),Pn=re.top=Po(Gt*Ft,.5),zt=re.width=Po(dt*Ft,.5),Ln=re.height=Po(ze*Ft,.5)}const ks=3;function ki(){let j=!1,Q=0;for(;!j;){Q++;let re=Qo(Q),oe=$s(Q);j=Q==ks||re&&oe,j||(Zr(u.width,u.height),Ji=!0)}}function Cs({width:j,height:Q}){Tr(j,Q)}u.setSize=Cs;function yo(){let j=!1,Q=!1,re=!1,oe=!1;R.forEach((ge,be)=>{if(ge.show&&ge._show){let{side:$e,_size:Ne}=ge,Fe=$e%2,He=ge.label!=null?ge.labelSize:0,je=Ne+He;je>0&&(Fe?(dt-=je,$e==3?(Ot+=je,oe=!0):re=!0):(ze-=je,$e==0?(Gt+=je,j=!0):Q=!0))}}),rr[0]=j,rr[1]=re,rr[2]=Q,rr[3]=oe,dt-=Qn[1]+Qn[3],Ot+=Qn[3],ze-=Qn[2]+Qn[0],Gt+=Qn[0]}function Go(){let j=Ot+dt,Q=Gt+ze,re=Ot,oe=Gt;function ge(be,$e){switch(be){case 1:return j+=$e,j-$e;case 2:return Q+=$e,Q-$e;case 3:return re-=$e,re+$e;case 0:return oe-=$e,oe+$e}}R.forEach((be,$e)=>{if(be.show&&be._show){let Ne=be.side;be._pos=ge(Ne,be._size),be.label!=null&&(be._lpos=ge(Ne,be.labelSize))}})}if(ne.dataIdx==null){let j=ne.hover,Q=j.skip=new Set(j.skip??[]);Q.add(void 0);let re=j.prox=Mt(j.prox),oe=j.bias??(j.bias=0);ne.dataIdx=(ge,be,$e,Ne)=>{if(be==0)return $e;let Fe=$e,He=re(ge,be,$e,Ne)??Yt,je=He>=0&&He<Yt,Ye=z.ori==0?dt:ze,ht=ne.left,kt=c[0],ft=c[be];if(Q.has(ft[$e])){Fe=null;let yt=null,it=null,et;if(oe==0||oe==-1)for(et=$e;yt==null&&et-- >0;)Q.has(ft[et])||(yt=et);if(oe==0||oe==1)for(et=$e;it==null&&et++<ft.length;)Q.has(ft[et])||(it=et);if(yt!=null||it!=null)if(je){let qt=yt==null?-1/0:O(kt[yt],z,Ye,0),rn=it==null?1/0:O(kt[it],z,Ye,0),$n=ht-qt,Tt=rn-ht;$n<=Tt?$n<=He&&(Fe=yt):Tt<=He&&(Fe=it)}else Fe=it==null?yt:yt==null?it:$e-yt<=it-$e?yt:it}else je&&Nn(ht-O(kt[$e],z,Ye,0))>He&&(Fe=null);return Fe}}const tr=j=>{ne.event=j};ne.idxs=ee,ne._lock=!1;let yn=ne.points;yn.show=Mt(yn.show),yn.size=Mt(yn.size),yn.stroke=Mt(yn.stroke),yn.width=Mt(yn.width),yn.fill=Mt(yn.fill);const Yn=u.focus=Mn({},l.focus||{alpha:.3},ne.focus),nr=Yn.prox>=0,an=nr&&yn.one;let Zn=[],gr=[],ir=[];function wo(j,Q){let re=yn.show(u,Q);if(re instanceof HTMLElement)return Oi(re,qk),Oi(re,j.class),_r(re,-10,-10,dt,ze),n.insertBefore(re,Zn[Q]),re}function qo(j,Q){if($==1||Q>0){let re=$==1&&T[j.scale].time,oe=j.value;j.value=re?Kf(oe)?Xf(N,Jf(oe,W)):oe||Z:oe||l_,j.label=j.label||(re?e_:XC)}if(an||Q>0){j.width=j.width==null?1:j.width,j.paths=j.paths||S_||dC,j.fillTo=Mt(j.fillTo||f_),j.pxAlign=+It(j.pxAlign,i),j.pxRound=lp(j.pxAlign),j.stroke=Mt(j.stroke||null),j.fill=Mt(j.fill||null),j._stroke=j._fill=j._paths=j._focus=null;let re=c_(di(1,j.width),1),oe=j.points=Mn({},{size:re,width:di(1,re*.2),stroke:j.stroke,space:re*2,paths:k_,_stroke:null,_fill:null},j.points);oe.show=Mt(oe.show),oe.filter=Mt(oe.filter),oe.fill=Mt(oe.fill),oe.stroke=Mt(oe.stroke),oe.paths=Mt(oe.paths),oe.pxAlign=j.pxAlign}if(he){let re=Pt(j,Q);Me.splice(Q,0,re[0]),qe.splice(Q,0,re[1]),ce.values.push(null)}if(ue){ee.splice(Q,0,null);let re=null;an?Q==0&&(re=wo(j,Q)):Q>0&&(re=wo(j,Q)),Zn.splice(Q,0,re),gr.splice(Q,0,0),ir.splice(Q,0,0)}Ke("addSeries",Q)}function _s(j,Q){Q=Q??y.length,j=$==1?Mu(j,Q,tp,sp):Mu(j,Q,{},op),y.splice(Q,0,j),qo(y[Q],Q)}u.addSeries=_s;function As(j){if(y.splice(j,1),he){ce.values.splice(j,1),qe.splice(j,1);let Q=Me.splice(j,1)[0];Cn(null,Q.firstChild),Q.remove()}ue&&(ee.splice(j,1),Zn.splice(j,1)[0].remove(),gr.splice(j,1),ir.splice(j,1)),Ke("delSeries",j)}u.delSeries=As;const rr=[!1,!1,!1,!1];function Ci(j,Q){if(j._show=j.show,j.show){let re=j.side%2,oe=T[j.scale];oe==null&&(j.scale=re?y[1].scale:w,oe=T[j.scale]);let ge=oe.time;j.size=Mt(j.size),j.space=Mt(j.space),j.rotate=Mt(j.rotate),go(j.incrs)&&j.incrs.forEach($e=>{!vo.has($e)&&vo.set($e,Dg($e))}),j.incrs=Mt(j.incrs||(oe.distr==2?OC:ge?m==1?DC:BC:Bo)),j.splits=Mt(j.splits||(ge&&oe.distr==1?V:oe.distr==3?Cu:oe.distr==4?i_:n_)),j.stroke=Mt(j.stroke),j.grid.stroke=Mt(j.grid.stroke),j.ticks.stroke=Mt(j.ticks.stroke),j.border.stroke=Mt(j.border.stroke);let be=j.values;j.values=go(be)&&!go(be[0])?Mt(be):ge?go(be)?Qf(N,Zf(be,W)):Kf(be)?zC(N,be):be||G:be||t_,j.filter=Mt(j.filter||(oe.distr>=3&&oe.log==10?s_:oe.distr==3&&oe.log==2?a_:Og)),j.font=dp(j.font),j.labelFont=dp(j.labelFont),j._size=j.size(u,null,Q,0),j._space=j._rotate=j._incrs=j._found=j._splits=j._values=null,j._size>0&&(rr[Q]=!0,j._el=Zi(Vk,s))}}function _t(j,Q,re,oe){let[ge,be,$e,Ne]=re,Fe=Q%2,He=0;return Fe==0&&(Ne||be)&&(He=Q==0&&!ge||Q==2&&!$e?On(ep.size/3):0),Fe==1&&(ge||$e)&&(He=Q==1&&!be||Q==3&&!Ne?On(ip.size/2):0),He}const Yo=u.padding=(l.padding||[_t,_t,_t,_t]).map(j=>Mt(It(j,_t))),Qn=u._padding=Yo.map((j,Q)=>j(u,Q,rr,0));let wn,Qt=null,un=null;const Fi=$==1?y[0].idxs:null;let Jn=null,Pi=!1;function Qr(j,Q){if(c=j??[],u.data=u._data=c,$==2){wn=0;for(let re=1;re<y.length;re++)wn+=c[re][0].length}else{c.length==0&&(u.data=u._data=c=[[]]),Jn=c[0],wn=Jn.length;let re=c;if(F==2){re=c.slice();let oe=re[0]=Array(wn);for(let ge=0;ge<wn;ge++)oe[ge]=ge}u._data=c=re}if(sr(!0),Ke("setData"),F==2&&(Xi=!0),Q!==!1){let re=z;re.auto(u,Pi)?bo():An(w,re.min,re.max),er=er||ne.left>=0,Vn=!0,wr()}}u.setData=Qr;function bo(){Pi=!0;let j,Q;$==1&&(wn>0?(Qt=Fi[0]=0,un=Fi[1]=wn-1,j=c[0][Qt],Q=c[0][un],F==2?(j=Qt,Q=un):j==Q&&(F==3?[j,Q]=ul(j,j,z.log,!1):F==4?[j,Q]=zu(j,j,z.log,!1):z.time?Q=j+On(86400/m):[j,Q]=Xa(j,Q,Uu,!0))):(Qt=Fi[0]=j=null,un=Fi[1]=Q=null)),An(w,j,Q)}let mr,fi,Lr,Jr,pi,Xr,xo,So,eo,En;function ko(j,Q,re,oe,ge,be){j??(j=Tf),re??(re=ju),oe??(oe="butt"),ge??(ge=Tf),be??(be="round"),j!=mr&&(a.strokeStyle=mr=j),ge!=fi&&(a.fillStyle=fi=ge),Q!=Lr&&(a.lineWidth=Lr=Q),be!=pi&&(a.lineJoin=pi=be),oe!=Xr&&(a.lineCap=Xr=oe),re!=Jr&&a.setLineDash(Jr=re)}function Er(j,Q,re,oe){Q!=fi&&(a.fillStyle=fi=Q),j!=xo&&(a.font=xo=j),re!=So&&(a.textAlign=So=re),oe!=eo&&(a.textBaseline=eo=oe)}function to(j,Q,re,oe,ge=0){if(oe.length>0&&j.auto(u,Pi)&&(Q==null||Q.min==null)){let be=It(Qt,0),$e=It(un,oe.length-1),Ne=re.min==null?sC(oe,be,$e,ge,j.distr==3):[re.min,re.max];j.min=fr(j.min,re.min=Ne[0]),j.max=di(j.max,re.max=Ne[1])}}const no={min:null,max:null};function vr(){for(let oe in T){let ge=T[oe];S[oe]==null&&(ge.min==null||S[w]!=null&&ge.auto(u,Pi))&&(S[oe]=no)}for(let oe in T){let ge=T[oe];S[oe]==null&&ge.from!=null&&S[ge.from]!=null&&(S[oe]=no)}S[w]!=null&&sr(!0);let j={};for(let oe in S){let ge=S[oe];if(ge!=null){let be=j[oe]=ms(T[oe],gC);if(ge.min!=null)Mn(be,ge);else if(oe!=w||$==2)if(wn==0&&be.from==null){let $e=be.range(u,null,null,oe);be.min=$e[0],be.max=$e[1]}else be.min=Yt,be.max=-Yt}}if(wn>0){y.forEach((oe,ge)=>{if($==1){let be=oe.scale,$e=S[be];if($e==null)return;let Ne=j[be];if(ge==0){let Fe=Ne.range(u,Ne.min,Ne.max,be);Ne.min=Fe[0],Ne.max=Fe[1],Qt=dr(Ne.min,c[0]),un=dr(Ne.max,c[0]),un-Qt>1&&(c[0][Qt]<Ne.min&&Qt++,c[0][un]>Ne.max&&un--),oe.min=Jn[Qt],oe.max=Jn[un]}else oe.show&&oe.auto&&to(Ne,$e,oe,c[ge],oe.sorted);oe.idxs[0]=Qt,oe.idxs[1]=un}else if(ge>0&&oe.show&&oe.auto){let[be,$e]=oe.facets,Ne=be.scale,Fe=$e.scale,[He,je]=c[ge],Ye=j[Ne],ht=j[Fe];Ye!=null&&to(Ye,S[Ne],be,He,be.sorted),ht!=null&&to(ht,S[Fe],$e,je,$e.sorted),oe.min=$e.min,oe.max=$e.max}});for(let oe in j){let ge=j[oe],be=S[oe];if(ge.from==null&&(be==null||be.min==null)){let $e=ge.range(u,ge.min==Yt?null:ge.min,ge.max==-Yt?null:ge.max,oe);ge.min=$e[0],ge.max=$e[1]}}}for(let oe in j){let ge=j[oe];if(ge.from!=null){let be=j[ge.from];if(be.min==null)ge.min=ge.max=null;else{let $e=ge.range(u,be.min,be.max,oe);ge.min=$e[0],ge.max=$e[1]}}}let Q={},re=!1;for(let oe in j){let ge=j[oe],be=T[oe];if(be.min!=ge.min||be.max!=ge.max){be.min=ge.min,be.max=ge.max;let $e=be.distr;be._min=$e==3?qr(be.min):$e==4?Tc(be.min,be.asinh):$e==100?be.fwd(be.min):be.min,be._max=$e==3?qr(be.max):$e==4?Tc(be.max,be.asinh):$e==100?be.fwd(be.max):be.max,Q[oe]=re=!0}}if(re){y.forEach((oe,ge)=>{$==2?ge>0&&Q.y&&(oe._paths=null):Q[oe.scale]&&(oe._paths=null)});for(let oe in Q)Xi=!0,Ke("setScale",oe);ue&&ne.left>=0&&(er=Vn=!0)}for(let oe in S)S[oe]=null}function Co(j){let Q=ku(Qt-1,0,wn-1),re=ku(un+1,0,wn-1);for(;j[Q]==null&&Q>0;)Q--;for(;j[re]==null&&re<wn-1;)re++;return[Q,re]}function Zo(){if(wn>0){let j=y.some(Q=>Q._focus)&&En!=Yn.alpha;j&&(a.globalAlpha=En=Yn.alpha),y.forEach((Q,re)=>{if(re>0&&Q.show&&(io(re,!1),io(re,!0),Q._paths==null)){let oe=En;En!=Q.alpha&&(a.globalAlpha=En=Q.alpha);let ge=$==2?[0,c[re][0].length-1]:Co(c[re]);Q._paths=Q.paths(u,re,ge[0],ge[1]),En!=oe&&(a.globalAlpha=En=oe)}}),y.forEach((Q,re)=>{if(re>0&&Q.show){let oe=En;En!=Q.alpha&&(a.globalAlpha=En=Q.alpha),Q._paths!=null&&ro(re,!1);{let ge=Q._paths!=null?Q._paths.gaps:null,be=Q.points.show(u,re,Qt,un,ge),$e=Q.points.filter(u,re,be,ge);(be||$e)&&(Q.points._paths=Q.points.paths(u,re,Qt,un,$e),ro(re,!0))}En!=oe&&(a.globalAlpha=En=oe),Ke("drawSeries",re)}}),j&&(a.globalAlpha=En=1)}}function io(j,Q){let re=Q?y[j].points:y[j];re._stroke=re.stroke(u,j),re._fill=re.fill(u,j)}function ro(j,Q){let re=Q?y[j].points:y[j],{stroke:oe,fill:ge,clip:be,flags:$e,_stroke:Ne=re._stroke,_fill:Fe=re._fill,_width:He=re.width}=re._paths;He=Zt(He*Ft,3);let je=null,Ye=He%2/2;Q&&Fe==null&&(Fe=He>0?"#fff":Ne);let ht=re.pxAlign==1&&Ye>0;if(ht&&a.translate(Ye,Ye),!Q){let kt=Tn-He/2,ft=Pn-He/2,yt=zt+He,it=Ln+He;je=new Path2D,je.rect(kt,ft,yt,it)}Q?Rr(Ne,He,re.dash,re.cap,Fe,oe,ge,$e,be):_o(j,Ne,He,re.dash,re.cap,Fe,oe,ge,$e,je,be),ht&&a.translate(-Ye,-Ye)}function _o(j,Q,re,oe,ge,be,$e,Ne,Fe,He,je){let Ye=!1;Fe!=0&&C.forEach((ht,kt)=>{if(ht.series[0]==j){let ft=y[ht.series[1]],yt=c[ht.series[1]],it=(ft._paths||Qs).band;go(it)&&(it=ht.dir==1?it[0]:it[1]);let et,qt=null;ft.show&&it&&lC(yt,Qt,un)?(qt=ht.fill(u,kt)||be,et=ft._paths.clip):it=null,Rr(Q,re,oe,ge,qt,$e,Ne,Fe,He,je,et,it),Ye=!0}}),Ye||Rr(Q,re,oe,ge,be,$e,Ne,Fe,He,je)}const oo=vs|Au;function Rr(j,Q,re,oe,ge,be,$e,Ne,Fe,He,je,Ye){ko(j,Q,re,oe,ge),(Fe||He||Ye)&&(a.save(),Fe&&a.clip(Fe),He&&a.clip(He)),Ye?(Ne&oo)==oo?(a.clip(Ye),je&&a.clip(je),Rn(ge,$e),Bi(j,be,Q)):Ne&Au?(Rn(ge,$e),a.clip(Ye),Bi(j,be,Q)):Ne&vs&&(a.save(),a.clip(Ye),je&&a.clip(je),Rn(ge,$e),a.restore(),Bi(j,be,Q)):(Rn(ge,$e),Bi(j,be,Q)),(Fe||He||Ye)&&a.restore()}function Bi(j,Q,re){re>0&&(Q instanceof Map?Q.forEach((oe,ge)=>{a.strokeStyle=mr=ge,a.stroke(oe)}):Q!=null&&j&&a.stroke(Q))}function Rn(j,Q){Q instanceof Map?Q.forEach((re,oe)=>{a.fillStyle=fi=oe,a.fill(re)}):Q!=null&&j&&a.fill(Q)}function yr(j,Q,re,oe){let ge=R[j],be;if(oe<=0)be=[0,0];else{let $e=ge._space=ge.space(u,j,Q,re,oe),Ne=ge._incrs=ge.incrs(u,j,Q,re,oe,$e);be=T_(Q,re,Ne,oe,$e)}return ge._found=be}function or(j,Q,re,oe,ge,be,$e,Ne,Fe,He){let je=$e%2/2;i==1&&a.translate(je,je),ko(Ne,$e,Fe,He,Ne),a.beginPath();let Ye,ht,kt,ft,yt=ge+(oe==0||oe==3?-be:be);re==0?(ht=ge,ft=yt):(Ye=ge,kt=yt);for(let it=0;it<j.length;it++)Q[it]!=null&&(re==0?Ye=kt=j[it]:ht=ft=j[it],a.moveTo(Ye,ht),a.lineTo(kt,ft));a.stroke(),i==1&&a.translate(-je,-je)}function Qo(j){let Q=!0;return R.forEach((re,oe)=>{if(!re.show)return;let ge=T[re.scale];if(ge.min==null){re._show&&(Q=!1,re._show=!1,sr(!1));return}else re._show||(Q=!1,re._show=!0,sr(!1));let be=re.side,$e=be%2,{min:Ne,max:Fe}=ge,[He,je]=yr(oe,Ne,Fe,$e==0?dt:ze);if(je==0)return;let Ye=ge.distr==2,ht=re._splits=re.splits(u,oe,Ne,Fe,He,je,Ye),kt=ge.distr==2?ht.map(et=>Jn[et]):ht,ft=ge.distr==2?Jn[ht[1]]-Jn[ht[0]]:He,yt=re._values=re.values(u,re.filter(u,kt,oe,je,ft),oe,je,ft);re._rotate=be==2?re.rotate(u,yt,oe,je):0;let it=re._size;re._size=Qi(re.size(u,yt,oe,j)),it!=null&&re._size!=it&&(Q=!1)}),Q}function $s(j){let Q=!0;return Yo.forEach((re,oe)=>{let ge=re(u,oe,rr,j);ge!=Qn[oe]&&(Q=!1),Qn[oe]=ge}),Q}function Ir(){for(let j=0;j<R.length;j++){let Q=R[j];if(!Q.show||!Q._show)continue;let re=Q.side,oe=re%2,ge,be,$e=Q.stroke(u,j),Ne=re==0||re==3?-1:1,[Fe,He]=Q._found;if(Q.label!=null){let Kt=Q.labelGap*Ne,zn=On((Q._lpos+Kt)*Ft);Er(Q.labelFont[0],$e,"center",re==2?Us:Mf),a.save(),oe==1?(ge=be=0,a.translate(zn,On(Pn+Ln/2)),a.rotate((re==3?-Za:Za)/2)):(ge=On(Tn+zt/2),be=zn);let Pr=Rg(Q.label)?Q.label(u,j,Fe,He):Q.label;a.fillText(Pr,ge,be),a.restore()}if(He==0)continue;let je=T[Q.scale],Ye=oe==0?zt:Ln,ht=oe==0?Tn:Pn,kt=Q._splits,ft=je.distr==2?kt.map(Kt=>Jn[Kt]):kt,yt=je.distr==2?Jn[kt[1]]-Jn[kt[0]]:Fe,it=Q.ticks,et=Q.border,qt=it.show?it.size:0,rn=On(qt*Ft),$n=On((Q.alignTo==2?Q._size-qt-Q.gap:Q.gap)*Ft),Tt=Q._rotate*-Za/180,pe=h(Q._pos*Ft),Ce=(rn+$n)*Ne,xe=pe+Ce;be=oe==0?xe:0,ge=oe==1?xe:0;let We=Q.font[0],nt=Q.align==1?us:Q.align==2?Ac:Tt>0?us:Tt<0?Ac:oe==0?"center":re==3?Ac:us,gt=Tt||oe==1?"middle":re==2?Us:Mf;Er(We,$e,nt,gt);let Et=Q.font[1]*Q.lineGap,wt=kt.map(Kt=>h(x(Kt,je,Ye,ht))),li=Q._values;for(let Kt=0;Kt<li.length;Kt++){let zn=li[Kt];if(zn!=null){oe==0?ge=wt[Kt]:be=wt[Kt],zn=""+zn;let Pr=zn.indexOf(`
|
|
1497
|
+
`)==-1?[zn]:zn.split(/\n/gm);for(let gn=0;gn<Pr.length;gn++){let $o=Pr[gn];Tt?(a.save(),a.translate(ge,be+gn*Et),a.rotate(Tt),a.fillText($o,0,0),a.restore()):a.fillText($o,ge,be+gn*Et)}}}it.show&&or(wt,it.filter(u,ft,j,He,yt),oe,re,pe,rn,Zt(it.width*Ft,3),it.stroke(u,j),it.dash,it.cap);let Vi=Q.grid;Vi.show&&or(wt,Vi.filter(u,ft,j,He,yt),oe,oe==0?2:1,oe==0?Pn:Tn,oe==0?Ln:zt,Zt(Vi.width*Ft,3),Vi.stroke(u,j),Vi.dash,Vi.cap),et.show&&or([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?Pn:Tn,oe==1?Ln:zt,Zt(et.width*Ft,3),et.stroke(u,j),et.dash,et.cap)}Ke("drawAxes")}function sr(j){y.forEach((Q,re)=>{re>0&&(Q._paths=null,j&&($==1?(Q.min=null,Q.max=null):Q.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let Or=!1,so=!1,Nr=[];function Jo(){so=!1;for(let j=0;j<Nr.length;j++)Ke(...Nr[j]);Nr.length=0}function wr(){Or||(SC(Xo),Or=!0)}function De(j,Q=!1){Or=!0,so=Q,j(u),Xo(),Q&&Nr.length>0&&queueMicrotask(Jo)}u.batch=De;function Xo(){if($r&&(vr(),$r=!1),Xi&&(ki(),Xi=!1),Ji){if(en(r,us,Ot),en(r,Us,Gt),en(r,Gs,dt),en(r,qs,ze),en(n,us,Ot),en(n,Us,Gt),en(n,Gs,dt),en(n,qs,ze),en(s,Gs,Fn),en(s,qs,ri),o.width=On(Fn*Ft),o.height=On(ri*Ft),R.forEach(({_el:j,_show:Q,_size:re,_pos:oe,side:ge})=>{if(j!=null)if(Q){let be=ge===3||ge===0?re:0,$e=ge%2==1;en(j,$e?"left":"top",oe-be),en(j,$e?"width":"height",re),en(j,$e?"top":"left",$e?Gt:Ot),en(j,$e?"height":"width",$e?ze:dt),xu(j,Wo)}else Oi(j,Wo)}),mr=fi=Lr=pi=Xr=xo=So=eo=Jr=null,En=1,B(!0),Ot!=_n||Gt!=oi||dt!=qn||ze!=sn){sr(!1);let j=dt/qn,Q=ze/sn;if(ue&&!er&&ne.left>=0){ne.left*=j,ne.top*=Q,_i&&_r(_i,On(ne.left),0,dt,ze),bn&&_r(bn,0,On(ne.top),dt,ze);for(let re=0;re<Zn.length;re++){let oe=Zn[re];oe!=null&&(gr[re]*=j,ir[re]*=Q,_r(oe,Qi(gr[re]),Qi(ir[re]),dt,ze))}}if(ct.show&&!Mr&&ct.left>=0&&ct.width>0){ct.left*=j,ct.width*=j,ct.top*=Q,ct.height*=Q;for(let re in Y)en(si,re,ct[re])}_n=Ot,oi=Gt,qn=dt,sn=ze}Ke("setSize"),Ji=!1}Fn>0&&ri>0&&(a.clearRect(0,0,o.width,o.height),Ke("drawClear"),D.forEach(j=>j()),Ke("draw")),ct.show&&Mr&&(Vt(ct),Mr=!1),ue&&er&&(k(null,!0,!1),er=!1),ce.show&&ce.live&&Vn&&(g(),Vn=!1),p||(p=!0,u.status=1,Ke("ready")),Pi=!1,Or=!1}u.redraw=(j,Q)=>{Xi=Q||!1,j!==!1?An(w,z.min,z.max):wr()};function Ie(j,Q){let re=T[j];if(re.from==null){if(wn==0){let oe=re.range(u,Q.min,Q.max,j);Q.min=oe[0],Q.max=oe[1]}if(Q.min>Q.max){let oe=Q.min;Q.min=Q.max,Q.max=oe}if(wn>1&&Q.min!=null&&Q.max!=null&&Q.max-Q.min<1e-16)return;j==w&&re.distr==2&&wn>0&&(Q.min=dr(Q.min,c[0]),Q.max=dr(Q.max,c[0]),Q.min==Q.max&&Q.max++),S[j]=Q,$r=!0,wr()}}u.setScale=Ie;let ln,Dr,_i,bn,es,Fr,Wi,br,Nt,Rt,Dt,At,Hi=!1;const hn=ne.drag;let Pe=hn.x,Jt=hn.y;ue&&(ne.x&&(ln=Zi(Kk,n)),ne.y&&(Dr=Zi(Gk,n)),z.ori==0?(_i=ln,bn=Dr):(_i=Dr,bn=ln),Dt=ne.left,At=ne.top);const ct=u.select=Mn({show:!0,over:!0,left:0,width:0,top:0,height:0},l.select),si=ct.show?Zi(jk,ct.over?n:r):null;function Vt(j,Q){if(ct.show){for(let re in j)ct[re]=j[re],re in Y&&en(si,re,j[re]);Q!==!1&&Ke("setSelect")}}u.setSelect=Vt;function Xt(j){if(y[j].show)he&&xu(Me[j],Wo);else if(he&&Oi(Me[j],Wo),ue){let re=an?Zn[0]:Zn[j];re!=null&&_r(re,-10,-10,dt,ze)}}function An(j,Q,re){Ie(j,{min:Q,max:re})}function ai(j,Q,re,oe){Q.focus!=null&&Bn(j),Q.show!=null&&y.forEach((ge,be)=>{be>0&&(j==be||j==null)&&(ge.show=Q.show,Xt(be),$==2?(An(ge.facets[0].scale,null,null),An(ge.facets[1].scale,null,null)):An(ge.scale,null,null),wr())}),re!==!1&&Ke("setSeries",j,Q),oe&&ut("setSeries",u,j,Q)}u.setSeries=ai;function zi(j,Q){Mn(C[j],Q)}function dn(j,Q){j.fill=Mt(j.fill||null),j.dir=It(j.dir,-1),Q=Q??C.length,C.splice(Q,0,j)}function gi(j){j==null?C.length=0:C.splice(j,1)}u.addBand=dn,u.setBand=zi,u.delBand=gi;function ao(j,Q){y[j].alpha=Q,ue&&Zn[j]!=null&&(Zn[j].style.opacity=Q),he&&Me[j]&&(Me[j].style.opacity=Q)}let fn,Ai,$i;const Ui={focus:!0};function Bn(j){if(j!=$i){let Q=j==null,re=Yn.alpha!=1;y.forEach((oe,ge)=>{if($==1||ge>0){let be=Q||ge==0||ge==j;oe._focus=Q?null:be,re&&ao(ge,be?1:Yn.alpha)}}),$i=j,re&&wr()}}he&&nr&&on(Rf,me,j=>{ne._lock||(tr(j),$i!=null&&ai(null,Ui,!0,tt.setSeries))});function Wn(j,Q,re){let oe=T[Q];re&&(j=j/Ft-(oe.ori==1?Gt:Ot));let ge=dt;oe.ori==1&&(ge=ze,j=ge-j),oe.dir==-1&&(j=ge-j);let be=oe._min,$e=oe._max,Ne=j/ge,Fe=be+($e-be)*Ne,He=oe.distr;return He==3?ps(10,Fe):He==4?uC(Fe,oe.asinh):He==100?oe.bwd(Fe):Fe}function jn(j,Q){let re=Wn(j,w,Q);return dr(re,c[0],Qt,un)}u.valToIdx=j=>dr(j,c[0]),u.posToIdx=jn,u.posToVal=Wn,u.valToPos=(j,Q,re)=>T[Q].ori==0?b(j,T[Q],re?zt:dt,re?Tn:0):v(j,T[Q],re?Ln:ze,re?Pn:0),u.setCursor=(j,Q,re)=>{Dt=j.left,At=j.top,k(null,Q,re)};function Ao(j,Q){en(si,us,ct.left=j),en(si,Gs,ct.width=Q)}function Kn(j,Q){en(si,Us,ct.top=j),en(si,qs,ct.height=Q)}let Xn=z.ori==0?Ao:Kn,Mi=z.ori==1?Ao:Kn;function Ti(){if(he&&ce.live)for(let j=$==2?1:0;j<y.length;j++){if(j==0&&ot)continue;let Q=ce.values[j],re=0;for(let oe in Q)qe[j][re++].firstChild.nodeValue=Q[oe]}}function g(j,Q){if(j!=null&&(j.idxs?j.idxs.forEach((re,oe)=>{ee[oe]=re}):pC(j.idx)||ee.fill(j.idx),ce.idx=ee[0]),he&&ce.live){for(let re=0;re<y.length;re++)(re>0||$==1&&!ot)&&_(re,ee[re]);Ti()}Vn=!1,Q!==!1&&Ke("setLegend")}u.setLegend=g;function _(j,Q){let re=y[j],oe=j==0&&F==2?Jn:c[j],ge;ot?ge=re.values(u,j,Q)??Je:(ge=re.value(u,Q==null?null:oe[Q],j,Q),ge=ge==null?Je:{_:ge}),ce.values[j]=ge}function k(j,Q,re){Nt=Dt,Rt=At,[Dt,At]=ne.move(u,Dt,At),ne.left=Dt,ne.top=At,ue&&(_i&&_r(_i,On(Dt),0,dt,ze),bn&&_r(bn,0,On(At),dt,ze));let oe,ge=Qt>un;fn=Yt,Ai=null;let be=z.ori==0?dt:ze,$e=z.ori==1?dt:ze;if(Dt<0||wn==0||ge){oe=ne.idx=null;for(let Ne=0;Ne<y.length;Ne++){let Fe=Zn[Ne];Fe!=null&&_r(Fe,-10,-10,dt,ze)}nr&&ai(null,Ui,!0,j==null&&tt.setSeries),ce.live&&(ee.fill(oe),Vn=!0)}else{let Ne,Fe,He;$==1&&(Ne=z.ori==0?Dt:At,Fe=Wn(Ne,w),oe=ne.idx=dr(Fe,c[0],Qt,un),He=O(c[0][oe],z,be,0));let je=-10,Ye=-10,ht=0,kt=0,ft=!0,yt="",it="";for(let et=$==2?1:0;et<y.length;et++){let qt=y[et],rn=ee[et],$n=rn==null?null:$==1?c[et][rn]:c[et][1][rn],Tt=ne.dataIdx(u,et,oe,Fe),pe=Tt==null?null:$==1?c[et][Tt]:c[et][1][Tt];if(Vn=Vn||pe!=$n||Tt!=rn,ee[et]=Tt,et>0&&qt.show){let Ce=Tt==null?-10:Tt==oe?He:O($==1?c[0][Tt]:c[et][0][Tt],z,be,0),xe=pe==null?-10:A(pe,$==1?T[qt.scale]:T[qt.facets[1].scale],$e,0);if(nr&&pe!=null){let We=z.ori==1?Dt:At,nt=Nn(Yn.dist(u,et,Tt,xe,We));if(nt<fn){let gt=Yn.bias;if(gt!=0){let Et=Wn(We,qt.scale),wt=pe>=0?1:-1,li=Et>=0?1:-1;li==wt&&(li==1?gt==1?pe>=Et:pe<=Et:gt==1?pe<=Et:pe>=Et)&&(fn=nt,Ai=et)}else fn=nt,Ai=et}}if(Vn||an){let We,nt;z.ori==0?(We=Ce,nt=xe):(We=xe,nt=Ce);let gt,Et,wt,li,Vi,Kt,zn=!0,Pr=yn.bbox;if(Pr!=null){zn=!1;let gn=Pr(u,et);wt=gn.left,li=gn.top,gt=gn.width,Et=gn.height}else wt=We,li=nt,gt=Et=yn.size(u,et);if(Kt=yn.fill(u,et),Vi=yn.stroke(u,et),an)et==Ai&&fn<=Yn.prox&&(je=wt,Ye=li,ht=gt,kt=Et,ft=zn,yt=Kt,it=Vi);else{let gn=Zn[et];gn!=null&&(gr[et]=wt,ir[et]=li,Bf(gn,gt,Et,zn),Ff(gn,Kt,Vi),_r(gn,Qi(wt),Qi(li),dt,ze))}}}}if(an){let et=Yn.prox,qt=$i==null?fn<=et:fn>et||Ai!=$i;if(Vn||qt){let rn=Zn[0];rn!=null&&(gr[0]=je,ir[0]=Ye,Bf(rn,ht,kt,ft),Ff(rn,yt,it),_r(rn,Qi(je),Qi(Ye),dt,ze))}}}if(ct.show&&Hi)if(j!=null){let[Ne,Fe]=tt.scales,[He,je]=tt.match,[Ye,ht]=j.cursor.sync.scales,kt=j.cursor.drag;if(Pe=kt._x,Jt=kt._y,Pe||Jt){let{left:ft,top:yt,width:it,height:et}=j.select,qt=j.scales[Ye].ori,rn=j.posToVal,$n,Tt,pe,Ce,xe,We=Ne!=null&&He(Ne,Ye),nt=Fe!=null&&je(Fe,ht);We&&Pe?(qt==0?($n=ft,Tt=it):($n=yt,Tt=et),pe=T[Ne],Ce=O(rn($n,Ye),pe,be,0),xe=O(rn($n+Tt,Ye),pe,be,0),Xn(fr(Ce,xe),Nn(xe-Ce))):Xn(0,be),nt&&Jt?(qt==1?($n=ft,Tt=it):($n=yt,Tt=et),pe=T[Fe],Ce=A(rn($n,ht),pe,$e,0),xe=A(rn($n+Tt,ht),pe,$e,0),Mi(fr(Ce,xe),Nn(xe-Ce))):Mi(0,$e)}else J()}else{let Ne=Nn(Nt-es),Fe=Nn(Rt-Fr);if(z.ori==1){let ht=Ne;Ne=Fe,Fe=ht}Pe=hn.x&&Ne>=hn.dist,Jt=hn.y&&Fe>=hn.dist;let He=hn.uni;He!=null?Pe&&Jt&&(Pe=Ne>=He,Jt=Fe>=He,!Pe&&!Jt&&(Fe>Ne?Jt=!0:Pe=!0)):hn.x&&hn.y&&(Pe||Jt)&&(Pe=Jt=!0);let je,Ye;Pe&&(z.ori==0?(je=Wi,Ye=Dt):(je=br,Ye=At),Xn(fr(je,Ye),Nn(Ye-je)),Jt||Mi(0,$e)),Jt&&(z.ori==1?(je=Wi,Ye=Dt):(je=br,Ye=At),Mi(fr(je,Ye),Nn(Ye-je)),Pe||Xn(0,be)),!Pe&&!Jt&&(Xn(0,0),Mi(0,0))}if(hn._x=Pe,hn._y=Jt,j==null){if(re){if(tn!=null){let[Ne,Fe]=tt.scales;tt.values[0]=Ne!=null?Wn(z.ori==0?Dt:At,Ne):null,tt.values[1]=Fe!=null?Wn(z.ori==1?Dt:At,Fe):null}ut($c,u,Dt,At,dt,ze,oe)}if(nr){let Ne=re&&tt.setSeries,Fe=Yn.prox;$i==null?fn<=Fe&&ai(Ai,Ui,!0,Ne):fn>Fe?ai(null,Ui,!0,Ne):Ai!=$i&&ai(Ai,Ui,!0,Ne)}}Vn&&(ce.idx=oe,g()),Q!==!1&&Ke("setCursor")}let P=null;Object.defineProperty(u,"rect",{get(){return P==null&&B(!1),P}});function B(j=!1){j?P=null:(P=n.getBoundingClientRect(),Ke("syncRect",P))}function H(j,Q,re,oe,ge,be,$e){ne._lock||Hi&&j!=null&&j.movementX==0&&j.movementY==0||(K(j,Q,re,oe,ge,be,$e,!1,j!=null),j!=null?k(null,!0,!0):k(Q,!0,!1))}function K(j,Q,re,oe,ge,be,$e,Ne,Fe){if(P==null&&B(!1),tr(j),j!=null)re=j.clientX-P.left,oe=j.clientY-P.top;else{if(re<0||oe<0){Dt=-10,At=-10;return}let[He,je]=tt.scales,Ye=Q.cursor.sync,[ht,kt]=Ye.values,[ft,yt]=Ye.scales,[it,et]=tt.match,qt=Q.axes[0].side%2==1,rn=z.ori==0?dt:ze,$n=z.ori==1?dt:ze,Tt=qt?be:ge,pe=qt?ge:be,Ce=qt?oe:re,xe=qt?re:oe;if(ft!=null?re=it(He,ft)?x(ht,T[He],rn,0):-10:re=rn*(Ce/Tt),yt!=null?oe=et(je,yt)?x(kt,T[je],$n,0):-10:oe=$n*(xe/pe),z.ori==1){let We=re;re=oe,oe=We}}Fe&&(Q==null||Q.cursor.event.type==$c)&&((re<=1||re>=dt-1)&&(re=Po(re,dt)),(oe<=1||oe>=ze-1)&&(oe=Po(oe,ze))),Ne?(es=re,Fr=oe,[Wi,br]=ne.move(u,re,oe)):(Dt=re,At=oe)}const Y={width:0,height:0,left:0,top:0};function J(){Vt(Y,!1)}let ie,se,ye,Se;function de(j,Q,re,oe,ge,be,$e){Hi=!0,Pe=Jt=hn._x=hn._y=!1,K(j,Q,re,oe,ge,be,$e,!0,!1),j!=null&&(on(Mc,wu,we,!1),ut(Lf,u,Wi,br,dt,ze,null));let{left:Ne,top:Fe,width:He,height:je}=ct;ie=Ne,se=Fe,ye=He,Se=je}function we(j,Q,re,oe,ge,be,$e){Hi=hn._x=hn._y=!1,K(j,Q,re,oe,ge,be,$e,!1,!0);let{left:Ne,top:Fe,width:He,height:je}=ct,Ye=He>0||je>0,ht=ie!=Ne||se!=Fe||ye!=He||Se!=je;if(Ye&&ht&&Vt(ct),hn.setScale&&Ye&&ht){let kt=Ne,ft=He,yt=Fe,it=je;if(z.ori==1&&(kt=Fe,ft=je,yt=Ne,it=He),Pe&&An(w,Wn(kt,w),Wn(kt+ft,w)),Jt)for(let et in T){let qt=T[et];et!=w&&qt.from==null&&qt.min!=Yt&&An(et,Wn(yt+it,et),Wn(yt,et))}J()}else ne.lock&&(ne._lock=!ne._lock,k(Q,!0,j!=null));j!=null&&(Cn(Mc,wu),ut(Mc,u,Dt,At,dt,ze,null))}function Re(j,Q,re,oe,ge,be,$e){if(ne._lock)return;tr(j);let Ne=Hi;if(Hi){let Fe=!0,He=!0,je=10,Ye,ht;z.ori==0?(Ye=Pe,ht=Jt):(Ye=Jt,ht=Pe),Ye&&ht&&(Fe=Dt<=je||Dt>=dt-je,He=At<=je||At>=ze-je),Ye&&Fe&&(Dt=Dt<Wi?0:dt),ht&&He&&(At=At<br?0:ze),k(null,!0,!0),Hi=!1}Dt=-10,At=-10,ee.fill(null),k(null,!0,!0),Ne&&(Hi=Ne)}function Le(j,Q,re,oe,ge,be,$e){ne._lock||(tr(j),bo(),J(),j!=null&&ut(If,u,Dt,At,dt,ze,null))}function Be(){R.forEach(L_),Tr(u.width,u.height,!0)}Uo(Ja,ds,Be);const Xe={};Xe.mousedown=de,Xe.mousemove=H,Xe.mouseup=we,Xe.dblclick=Le,Xe.setSeries=(j,Q,re,oe)=>{let ge=tt.match[2];re=ge(u,Q,re),re!=-1&&ai(re,oe,!0,!1)},ue&&(on(Lf,n,de),on($c,n,H),on(Ef,n,j=>{tr(j),B(!1)}),on(Rf,n,Re),on(If,n,Le),$u.add(u),u.syncRect=B);const Ze=u.hooks=l.hooks||{};function Ke(j,Q,re){so?Nr.push([j,Q,re]):j in Ze&&Ze[j].forEach(oe=>{oe.call(null,u,Q,re)})}(l.plugins||[]).forEach(j=>{for(let Q in j.hooks)Ze[Q]=(Ze[Q]||[]).concat(j.hooks[Q])});const jt=(j,Q,re)=>re,tt=Mn({key:null,setSeries:!1,filters:{pub:Vf,sub:Vf},scales:[w,y[1]?y[1].scale:null],match:[jf,jf,jt],values:[null,null]},ne.sync);tt.match.length==2&&tt.match.push(jt),ne.sync=tt;const tn=tt.key,xt=nm(tn);function ut(j,Q,re,oe,ge,be,$e){tt.filters.pub(j,Q,re,oe,ge,be,$e)&&xt.pub(j,Q,re,oe,ge,be,$e)}xt.sub(u);function pn(j,Q,re,oe,ge,be,$e){tt.filters.sub(j,Q,re,oe,ge,be,$e)&&Xe[j](null,Q,re,oe,ge,be,$e)}u.pub=pn;function Hn(){xt.unsub(u),$u.delete(u),Si.clear(),Su(Ja,ds,Be),d.remove(),me==null||me.remove(),Ke("destroy")}u.destroy=Hn;function nn(){Ke("init",l,c),Qr(c||l.data,!1),S[w]?Ie(w,S[w]):bo(),Mr=ct.show&&(ct.width>0||ct.height>0),er=Vn=!0,Tr(l.width,l.height)}return y.forEach(qo),R.forEach(Ci),e?e instanceof HTMLElement?(e.appendChild(d),nn()):e(u,nn):nn(),u}ii.assign=Mn;ii.fmtNum=Vu;ii.rangeNum=Xa;ii.rangeLog=ul;ii.rangeAsinh=zu;ii.orient=Ko;ii.pxRatio=Ft;ii.join=xC;ii.fmtDate=Ku,ii.tzDate=RC;ii.sync=nm;{ii.addGap=p_,ii.clipGaps=fl;let l=ii.paths={points:lm};l.linear=um,l.stepped=v_,l.bars=y_,l.spline=b_}var Ic,fp;function E_(){return fp||(fp=1,Ic=function(l,c,e,u,$){var b,v;if(u===void 0)u=0;else if(u=u|0,u<0||u>=l.length)throw new RangeError("invalid lower bound");if($===void 0)$=l.length-1;else if($=$|0,$<u||$>=l.length)throw new RangeError("invalid upper bound");for(;u<=$;)if(b=u+($-u>>>1),v=+e(l[b],c,b,l),v<0)u=b+1;else if(v>0)$=b-1;else return b;return~u}),Ic}var R_=E_();const I_=tl(R_);var Oc,pp;function O_(){if(pp)return Oc;pp=1;function l(c,e,u){var $=-1,b=c.length;e<0&&(e=-e>b?0:b+e),u=u>b?b:u,u<0&&(u+=b),b=e>u?0:u-e>>>0,e>>>=0;for(var v=Array(b);++$<b;)v[$]=c[$+e];return v}return Oc=l,Oc}var Nc,gp;function N_(){if(gp)return Nc;gp=1;var l=O_();function c(e,u,$){var b=e.length;return $=$===void 0?b:$,!u&&$>=b?e:l(e,u,$)}return Nc=c,Nc}var Dc,mp;function pm(){if(mp)return Dc;mp=1;var l="\\ud800-\\udfff",c="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",u="\\u20d0-\\u20ff",$=c+e+u,b="\\ufe0e\\ufe0f",v="\\u200d",x=RegExp("["+v+l+$+b+"]");function p(d){return x.test(d)}return Dc=p,Dc}var Fc,vp;function D_(){if(vp)return Fc;vp=1;function l(c){return c.split("")}return Fc=l,Fc}var Pc,yp;function F_(){if(yp)return Pc;yp=1;var l="\\ud800-\\udfff",c="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",u="\\u20d0-\\u20ff",$=c+e+u,b="\\ufe0e\\ufe0f",v="["+l+"]",x="["+$+"]",p="\\ud83c[\\udffb-\\udfff]",d="(?:"+x+"|"+p+")",o="[^"+l+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",r="\\u200d",n=d+"?",i="["+b+"]?",h="(?:"+r+"(?:"+[o,a,s].join("|")+")"+i+n+")*",m=i+n+h,y="(?:"+[o+x+"?",x,a,s,v].join("|")+")",R=RegExp(p+"(?="+p+")|"+y+m,"g");function T(C){return C.match(R)||[]}return Pc=T,Pc}var Bc,wp;function P_(){if(wp)return Bc;wp=1;var l=D_(),c=pm(),e=F_();function u($){return c($)?e($):l($)}return Bc=u,Bc}var Wc,bp;function B_(){if(bp)return Wc;bp=1;var l=typeof mo=="object"&&mo&&mo.Object===Object&&mo;return Wc=l,Wc}var Hc,xp;function W_(){if(xp)return Hc;xp=1;var l=B_(),c=typeof self=="object"&&self&&self.Object===Object&&self,e=l||c||Function("return this")();return Hc=e,Hc}var zc,Sp;function Xu(){if(Sp)return zc;Sp=1;var l=W_(),c=l.Symbol;return zc=c,zc}var Uc,kp;function H_(){if(kp)return Uc;kp=1;function l(c,e){for(var u=-1,$=c==null?0:c.length,b=Array($);++u<$;)b[u]=e(c[u],u,c);return b}return Uc=l,Uc}var Vc,Cp;function z_(){if(Cp)return Vc;Cp=1;var l=Array.isArray;return Vc=l,Vc}var jc,_p;function U_(){if(_p)return jc;_p=1;var l=Xu(),c=Object.prototype,e=c.hasOwnProperty,u=c.toString,$=l?l.toStringTag:void 0;function b(v){var x=e.call(v,$),p=v[$];try{v[$]=void 0;var d=!0}catch{}var o=u.call(v);return d&&(x?v[$]=p:delete v[$]),o}return jc=b,jc}var Kc,Ap;function V_(){if(Ap)return Kc;Ap=1;var l=Object.prototype,c=l.toString;function e(u){return c.call(u)}return Kc=e,Kc}var Gc,$p;function j_(){if($p)return Gc;$p=1;var l=Xu(),c=U_(),e=V_(),u="[object Null]",$="[object Undefined]",b=l?l.toStringTag:void 0;function v(x){return x==null?x===void 0?$:u:b&&b in Object(x)?c(x):e(x)}return Gc=v,Gc}var qc,Mp;function K_(){if(Mp)return qc;Mp=1;function l(c){return c!=null&&typeof c=="object"}return qc=l,qc}var Yc,Tp;function G_(){if(Tp)return Yc;Tp=1;var l=j_(),c=K_(),e="[object Symbol]";function u($){return typeof $=="symbol"||c($)&&l($)==e}return Yc=u,Yc}var Zc,Lp;function q_(){if(Lp)return Zc;Lp=1;var l=Xu(),c=H_(),e=z_(),u=G_(),$=l?l.prototype:void 0,b=$?$.toString:void 0;function v(x){if(typeof x=="string")return x;if(e(x))return c(x,v)+"";if(u(x))return b?b.call(x):"";var p=x+"";return p=="0"&&1/x==-1/0?"-0":p}return Zc=v,Zc}var Qc,Ep;function vl(){if(Ep)return Qc;Ep=1;var l=q_();function c(e){return e==null?"":l(e)}return Qc=c,Qc}var Jc,Rp;function Y_(){if(Rp)return Jc;Rp=1;var l=N_(),c=pm(),e=P_(),u=vl();function $(b){return function(v){v=u(v);var x=c(v)?e(v):void 0,p=x?x[0]:v.charAt(0),d=x?l(x,1).join(""):v.slice(1);return p[b]()+d}}return Jc=$,Jc}var Xc,Ip;function gm(){if(Ip)return Xc;Ip=1;var l=Y_(),c=l("toUpperCase");return Xc=c,Xc}var Z_=gm();const Q_=tl(Z_);var eu,Op;function J_(){if(Op)return eu;Op=1;var l=vl(),c=gm();function e(u){return c(l(u).toLowerCase())}return eu=e,eu}var tu,Np;function X_(){if(Np)return tu;Np=1;function l(c,e,u,$){var b=-1,v=c==null?0:c.length;for($&&v&&(u=c[++b]);++b<v;)u=e(u,c[b],b,c);return u}return tu=l,tu}var nu,Dp;function eA(){if(Dp)return nu;Dp=1;function l(c){return function(e){return c==null?void 0:c[e]}}return nu=l,nu}var iu,Fp;function tA(){if(Fp)return iu;Fp=1;var l=eA(),c={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=l(c);return iu=e,iu}var ru,Pp;function nA(){if(Pp)return ru;Pp=1;var l=tA(),c=vl(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u="\\u0300-\\u036f",$="\\ufe20-\\ufe2f",b="\\u20d0-\\u20ff",v=u+$+b,x="["+v+"]",p=RegExp(x,"g");function d(o){return o=c(o),o&&o.replace(e,l).replace(p,"")}return ru=d,ru}var ou,Bp;function iA(){if(Bp)return ou;Bp=1;var l=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function c(e){return e.match(l)||[]}return ou=c,ou}var su,Wp;function rA(){if(Wp)return su;Wp=1;var l=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function c(e){return l.test(e)}return su=c,su}var au,Hp;function oA(){if(Hp)return au;Hp=1;var l="\\ud800-\\udfff",c="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",u="\\u20d0-\\u20ff",$=c+e+u,b="\\u2700-\\u27bf",v="a-z\\xdf-\\xf6\\xf8-\\xff",x="\\xac\\xb1\\xd7\\xf7",p="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",d="\\u2000-\\u206f",o=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",s="\\ufe0e\\ufe0f",r=x+p+d+o,n="['’]",i="["+r+"]",h="["+$+"]",m="\\d+",y="["+b+"]",R="["+v+"]",T="[^"+l+r+m+b+v+a+"]",C="\\ud83c[\\udffb-\\udfff]",w="(?:"+h+"|"+C+")",E="[^"+l+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",I="[\\ud800-\\udbff][\\udc00-\\udfff]",L="["+a+"]",z="\\u200d",F="(?:"+R+"|"+T+")",O="(?:"+L+"|"+T+")",A="(?:"+n+"(?:d|ll|m|re|s|t|ve))?",S="(?:"+n+"(?:D|LL|M|RE|S|T|VE))?",N=w+"?",W="["+s+"]?",V="(?:"+z+"(?:"+[E,D,I].join("|")+")"+W+N+")*",G="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ee=W+N+V,ce="(?:"+[y,D,I].join("|")+")"+ee,ne=RegExp([L+"?"+R+"+"+A+"(?="+[i,L,"$"].join("|")+")",O+"+"+S+"(?="+[i,L+F,"$"].join("|")+")",L+"?"+F+"+"+A,L+"+"+S,Z,G,m,ce].join("|"),"g");function he(ue){return ue.match(ne)||[]}return au=he,au}var lu,zp;function sA(){if(zp)return lu;zp=1;var l=iA(),c=rA(),e=vl(),u=oA();function $(b,v,x){return b=e(b),v=x?void 0:v,v===void 0?c(b)?u(b):l(b):b.match(v)||[]}return lu=$,lu}var cu,Up;function aA(){if(Up)return cu;Up=1;var l=X_(),c=nA(),e=sA(),u="['’]",$=RegExp(u,"g");function b(v){return function(x){return l(e(c(x).replace($,"")),v,"")}}return cu=b,cu}var uu,Vp;function lA(){if(Vp)return uu;Vp=1;var l=J_(),c=aA(),e=c(function(u,$,b){return $=$.toLowerCase(),u+(b?l($):$)});return uu=e,uu}var cA=lA();const uA=tl(cA),hA=Object.assign({"./ArrayWidget.vue":()=>Promise.resolve().then(()=>require("./ArrayWidget-ByKRAWXn.cjs")),"./ArrayplotWidget.vue":()=>Promise.resolve().then(()=>require("./ArrayplotWidget-Cty7KQ_h.cjs")),"./BlockWidget.vue":()=>Promise.resolve().then(()=>require("./BlockWidget-BDzoqpxO.cjs")),"./ButtonWidget.vue":()=>Promise.resolve().then(()=>require("./ButtonWidget-BBMDS_YF.cjs")),"./CanvasWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasWidget-CFNpgqfW.cjs")),"./CanvasdotWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasdotWidget-BZ9TrTvw.cjs")),"./CanvasimageWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasimageWidget-Dk15uRRu.cjs")),"./CanvasimagevalueWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasimagevalueWidget-BQHjJCuq.cjs")),"./CanvaslabelWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslabelWidget-Dw1YmiY0.cjs")),"./CanvaslabelvalueWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslabelvalueWidget-BYmsu9r_.cjs")),"./CanvaslineWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslineWidget-tm194dw1.cjs")),"./CanvaslinevalueWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslinevalueWidget-DM5c-ciY.cjs")),"./CheckbuttonWidget.vue":()=>Promise.resolve().then(()=>require("./CheckbuttonWidget-BSvTWD3x.cjs")),"./ComboboxWidget.vue":()=>Promise.resolve().then(()=>require("./ComboboxWidget-B_KAnIVB.cjs")),"./DateWidget.vue":()=>Promise.resolve().then(()=>require("./DateWidget-kTJBAHVp.cjs")),"./DynamicWidget.vue":()=>Promise.resolve().then(()=>require("./DynamicWidget-BNfJRfR5.cjs")),"./FormatvalueWidget.vue":()=>Promise.resolve().then(()=>require("./FormatvalueWidget-CVoJgFJA.cjs")),"./HorizontalWidget.vue":()=>Promise.resolve().then(()=>require("./HorizontalWidget-CN6goWHY.cjs")),"./HorizontalboxWidget.vue":()=>Promise.resolve().then(()=>require("./HorizontalboxWidget-ysq7slso.cjs")),"./HorizontallineWidget.vue":()=>Promise.resolve().then(()=>require("./HorizontallineWidget-BgXZZymr.cjs")),"./IframeWidget.vue":()=>Promise.resolve().then(()=>require("./IframeWidget-fV9e-Nm1.cjs")),"./ImageviewerWidget.vue":()=>Promise.resolve().then(()=>require("./ImageviewerWidget-CULuNsiD.cjs")),"./LabelWidget.vue":()=>Promise.resolve().then(()=>require("./LabelWidget-DdZz2NWv.cjs")),"./LabelledWidget.vue":()=>Promise.resolve().then(()=>require("./LabelledWidget-BZ319slb.cjs")),"./LabelprogressbarWidget.vue":()=>Promise.resolve().then(()=>require("./LabelprogressbarWidget-LyevJNuz.cjs")),"./LabelsparklineWidget.vue":()=>Promise.resolve().then(()=>require("./LabelsparklineWidget-Cbug97Ne.cjs")),"./LabelvalueWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvalueWidget-DSHwAKma.cjs")),"./LabelvaluedescWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluedescWidget-3lwQxkKj.cjs")),"./LabelvaluelimitsbarWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluelimitsbarWidget-DbO_Q5ex.cjs")),"./LabelvaluelimitscolumnWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluelimitscolumnWidget-BMSwK1Ys.cjs")),"./LabelvaluerangebarWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluerangebarWidget-B6_alHq4.cjs")),"./LedWidget.vue":()=>Promise.resolve().then(()=>require("./LedWidget-Cif7vC7q.cjs")),"./LimitsbarWidget.vue":()=>Promise.resolve().then(()=>require("./LimitsbarWidget-BodNPbuH.cjs")),"./LimitscolorWidget.vue":()=>Promise.resolve().then(()=>require("./LimitscolorWidget-DPhymKgB.cjs")),"./LimitscolumnWidget.vue":()=>Promise.resolve().then(()=>require("./LimitscolumnWidget-C5yozwf0.cjs")),"./LinegraphWidget.vue":()=>Promise.resolve().then(()=>require("./LinegraphWidget-dO_B0T3E.cjs")),"./MatrixbycolumnsWidget.vue":()=>Promise.resolve().then(()=>require("./MatrixbycolumnsWidget-BLkwvpMk.cjs")),"./ProgressbarWidget.vue":()=>Promise.resolve().then(()=>require("./ProgressbarWidget-D2NHSJny.cjs")),"./RadiobuttonWidget.vue":()=>Promise.resolve().then(()=>require("./RadiobuttonWidget-DkG9GtAy.cjs")),"./RadiogroupWidget.vue":()=>Promise.resolve().then(()=>require("./RadiogroupWidget-BnUjXU28.cjs")),"./RangebarWidget.vue":()=>Promise.resolve().then(()=>require("./RangebarWidget-CJgtAk5z.cjs")),"./RollupWidget.vue":()=>Promise.resolve().then(()=>require("./RollupWidget-B2pGGoET.cjs")),"./ScrollwindowWidget.vue":()=>Promise.resolve().then(()=>require("./ScrollwindowWidget-ByJRy528.cjs")),"./SignalWidget.vue":()=>Promise.resolve().then(()=>require("./SignalWidget-CEmQymzQ.cjs")),"./SpacerWidget.vue":()=>Promise.resolve().then(()=>require("./SpacerWidget-BJpqoaeP.cjs")),"./SparklineWidget.vue":()=>Promise.resolve().then(()=>require("./SparklineWidget-CIkMm4O-.cjs")),"./TabbookWidget.vue":()=>Promise.resolve().then(()=>require("./TabbookWidget-DqcScWwW.cjs")),"./TextboxWidget.vue":()=>Promise.resolve().then(()=>require("./TextboxWidget-BcRfHcF6.cjs")),"./TextfieldWidget.vue":()=>Promise.resolve().then(()=>require("./TextfieldWidget-Ct1hZr2M.cjs")),"./TimeWidget.vue":()=>Promise.resolve().then(()=>require("./TimeWidget-3M7CQ893.cjs")),"./TitleWidget.vue":()=>Promise.resolve().then(()=>require("./TitleWidget-C1qzja9l.cjs")),"./ValueWidget.vue":()=>Promise.resolve().then(()=>require("./ValueWidget-yuZ8tPzG.cjs")),"./ValuelimitsbarWidget.vue":()=>Promise.resolve().then(()=>require("./ValuelimitsbarWidget-KsFz7ipK.cjs")),"./ValuelimitscolumnWidget.vue":()=>Promise.resolve().then(()=>require("./ValuelimitscolumnWidget-B0HGnyS5.cjs")),"./ValuerangebarWidget.vue":()=>Promise.resolve().then(()=>require("./ValuerangebarWidget-CDJeamPr.cjs")),"./VerticalWidget.vue":()=>Promise.resolve().then(()=>require("./VerticalWidget-wuRCrd7Q.cjs")),"./VerticalboxWidget.vue":()=>Promise.resolve().then(()=>require("./VerticalboxWidget-D-3H1PYU.cjs"))}),dA=Object.entries(hA).reduce((l,[c,e])=>{c=c.split("/").pop();const u=Q_(uA(c.replace(/\.\w+$/,"")));return{...l,[u]:Ge.defineAsyncComponent(e)}},{}),fA={components:dA};exports.DataViewerComponent=_g;exports.DataViewerHistoryComponent=Ok;exports.WidgetComponents=fA;exports._=$g;exports.aceExports=Cx;exports.bi=US;exports.bs=I_;exports.fi=cS;exports.gi=zS;exports.lodashExports=Ag;exports.uPlot=ii;exports.yi=Ck;exports.yt=vu;
|
|
1498
|
+
//# sourceMappingURL=UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-CP8T5W6m.cjs.map
|