drizzle-cube 0.5.5 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{server/dist-DxegvyZF.cjs → adapters/dist-BOdf-GQO.cjs} +1 -1
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +4 -4
- package/dist/adapters/fastify/index.cjs +2 -2
- package/dist/adapters/fastify/index.js +4 -4
- package/dist/adapters/{google-CT4kgmBf.js → google-CFYljAOF.js} +1 -1
- package/dist/adapters/{google-Dgo9-Kb5.cjs → google-DUlXeeDA.cjs} +1 -1
- package/dist/adapters/{handler-C1Qs8JMY.cjs → handler-C63rJUUK.cjs} +3 -3
- package/dist/adapters/{handler-CoaNnZyf.js → handler-Dz1F4iwf.js} +7 -4
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +4 -4
- package/dist/adapters/{locale-CTuvUGBs.cjs → locale-CTNwPVZI.cjs} +6 -6
- package/dist/adapters/{locale-wMBdZ3Ks.js → locale-gU_d1Wja.js} +19 -2
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +2 -2
- package/dist/adapters/mcp-transport-C4J4SAcn.cjs +40 -0
- package/dist/adapters/mcp-transport-CVUiifEc.js +579 -0
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +4 -4
- package/dist/adapters/{openai-BjLV_Wjx.cjs → openai-6wrBvAnv.cjs} +1 -1
- package/dist/adapters/openai-BDwb2u7y.cjs +17 -0
- package/dist/{server/openai-CLWSwD-D.js → adapters/openai-DiVskd89.js} +1 -1
- package/dist/{server/openai-zpXlGbbF.js → adapters/openai-y7GhJNdn.js} +2062 -928
- package/dist/adapters/{utils-CIRA5_JO.cjs → utils-CkEkU8Bo.cjs} +4 -4
- package/dist/adapters/{utils-hC7Z8V39.js → utils-DosuoabY.js} +33 -19
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.js +1 -1
- package/dist/client/charts.js +13 -13
- package/dist/client/chunks/{DashboardEditModal-DayTXEH0.js → DashboardEditModal-6KRE36mm.js} +6232 -3454
- package/dist/client/chunks/DashboardEditModal-6KRE36mm.js.map +1 -0
- package/dist/client/chunks/{RetentionCombinedChart-D3dRmoos.js → RetentionCombinedChart-CCpu0C-s.js} +4 -4
- package/dist/client/chunks/{RetentionCombinedChart-D3dRmoos.js.map → RetentionCombinedChart-CCpu0C-s.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-DHPnn0qH.js → RetentionHeatmap-B24PiIfr.js} +3 -3
- package/dist/client/chunks/{RetentionHeatmap-DHPnn0qH.js.map → RetentionHeatmap-B24PiIfr.js.map} +1 -1
- package/dist/client/chunks/{af-ZA-BtTNqvHF.js → af-ZA-BTaChuqI.js} +3 -1
- package/dist/client/chunks/af-ZA-BTaChuqI.js.map +1 -0
- package/dist/client/chunks/{analysis-builder-shared-6BRZcEnu.js → analysis-builder-shared-x576-O5p.js} +289 -289
- package/dist/client/chunks/{analysis-builder-shared-6BRZcEnu.js.map → analysis-builder-shared-x576-O5p.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-lcGl099d.js → analysis-builder-zd48FVJO.js} +244 -244
- package/dist/client/chunks/{analysis-builder-lcGl099d.js.map → analysis-builder-zd48FVJO.js.map} +1 -1
- package/dist/client/chunks/{chart-activity-grid-BnY-jaoa.js → chart-activity-grid-CiHrLH6Y.js} +8 -6
- package/dist/client/chunks/chart-activity-grid-CiHrLH6Y.js.map +1 -0
- package/dist/client/chunks/{chart-area-G3OvLLK4.js → chart-area-CXFK-Grv.js} +39 -38
- package/dist/client/chunks/chart-area-CXFK-Grv.js.map +1 -0
- package/dist/client/chunks/{chart-bar-MLIWiLrc.js → chart-bar-DKXfLoGG.js} +53 -52
- package/dist/client/chunks/chart-bar-DKXfLoGG.js.map +1 -0
- package/dist/client/chunks/{chart-box-plot-c2XqKTWq.js → chart-box-plot-Bu9hy-17.js} +3 -3
- package/dist/client/chunks/{chart-box-plot-c2XqKTWq.js.map → chart-box-plot-Bu9hy-17.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-CAGvnYb1.js → chart-bubble-DGkTQlxM.js} +3 -3
- package/dist/client/chunks/{chart-bubble-CAGvnYb1.js.map → chart-bubble-DGkTQlxM.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-oSPk-KQp.js → chart-candlestick-Dau5AF4E.js} +3 -3
- package/dist/client/chunks/{chart-candlestick-oSPk-KQp.js.map → chart-candlestick-Dau5AF4E.js.map} +1 -1
- package/dist/client/chunks/{chart-config-activity-grid-Dssynumw.js → chart-config-activity-grid-D_UX4NHC.js} +2 -2
- package/dist/client/chunks/{chart-config-activity-grid-Dssynumw.js.map → chart-config-activity-grid-D_UX4NHC.js.map} +1 -1
- package/dist/client/chunks/{chart-config-area-40fbx2Ah.js → chart-config-area-Bq_UsW3x.js} +3 -2
- package/dist/client/chunks/chart-config-area-Bq_UsW3x.js.map +1 -0
- package/dist/client/chunks/{chart-config-bar-CUWHwOPN.js → chart-config-bar-_JEGZnAu.js} +3 -2
- package/dist/client/chunks/chart-config-bar-_JEGZnAu.js.map +1 -0
- package/dist/client/chunks/{chart-config-box-plot-D3Y0ien3.js → chart-config-box-plot-DJ-dWWXA.js} +2 -2
- package/dist/client/chunks/{chart-config-box-plot-D3Y0ien3.js.map → chart-config-box-plot-DJ-dWWXA.js.map} +1 -1
- package/dist/client/chunks/{chart-config-bubble-BXSTKLn-.js → chart-config-bubble-gIoqVyjZ.js} +2 -2
- package/dist/client/chunks/{chart-config-bubble-BXSTKLn-.js.map → chart-config-bubble-gIoqVyjZ.js.map} +1 -1
- package/dist/client/chunks/{chart-config-candlestick-DEuD2Av0.js → chart-config-candlestick-N6DchAA3.js} +2 -2
- package/dist/client/chunks/{chart-config-candlestick-DEuD2Av0.js.map → chart-config-candlestick-N6DchAA3.js.map} +1 -1
- package/dist/client/chunks/{chart-config-data-table-BQXSn4b_.js → chart-config-data-table-d7VBY-y_.js} +2 -2
- package/dist/client/chunks/{chart-config-data-table-BQXSn4b_.js.map → chart-config-data-table-d7VBY-y_.js.map} +1 -1
- package/dist/client/chunks/{chart-config-funnel-BzEsHmjR.js → chart-config-funnel-DEYMcxsD.js} +2 -2
- package/dist/client/chunks/{chart-config-funnel-BzEsHmjR.js.map → chart-config-funnel-DEYMcxsD.js.map} +1 -1
- package/dist/client/chunks/{chart-config-gauge-CCva3FfA.js → chart-config-gauge-DSwC04l0.js} +2 -2
- package/dist/client/chunks/{chart-config-gauge-CCva3FfA.js.map → chart-config-gauge-DSwC04l0.js.map} +1 -1
- package/dist/client/chunks/{chart-config-heat-map-Db4Z8UUn.js → chart-config-heat-map-CfRnRNcw.js} +2 -2
- package/dist/client/chunks/{chart-config-heat-map-Db4Z8UUn.js.map → chart-config-heat-map-CfRnRNcw.js.map} +1 -1
- package/dist/client/chunks/{chart-config-kpi-delta-BfLf3iyi.js → chart-config-kpi-delta-D6BIkHL3.js} +2 -2
- package/dist/client/chunks/{chart-config-kpi-delta-BfLf3iyi.js.map → chart-config-kpi-delta-D6BIkHL3.js.map} +1 -1
- package/dist/client/chunks/{chart-config-kpi-number-DWKFc9PX.js → chart-config-kpi-number-Bx-V9a62.js} +2 -2
- package/dist/client/chunks/{chart-config-kpi-number-DWKFc9PX.js.map → chart-config-kpi-number-Bx-V9a62.js.map} +1 -1
- package/dist/client/chunks/{chart-config-kpi-text-Dr4OG6cY.js → chart-config-kpi-text-CcqC1u-8.js} +2 -2
- package/dist/client/chunks/{chart-config-kpi-text-Dr4OG6cY.js.map → chart-config-kpi-text-CcqC1u-8.js.map} +1 -1
- package/dist/client/chunks/{chart-config-line-DGYYdDw9.js → chart-config-line-Db3jDsWc.js} +3 -2
- package/dist/client/chunks/chart-config-line-Db3jDsWc.js.map +1 -0
- package/dist/client/chunks/{chart-config-markdown-C-_g_8te.js → chart-config-markdown-BtRIe8JN.js} +2 -2
- package/dist/client/chunks/{chart-config-markdown-C-_g_8te.js.map → chart-config-markdown-BtRIe8JN.js.map} +1 -1
- package/dist/client/chunks/{chart-config-measure-profile-sB3n_Azv.js → chart-config-measure-profile-DxRGa-zf.js} +2 -2
- package/dist/client/chunks/{chart-config-measure-profile-sB3n_Azv.js.map → chart-config-measure-profile-DxRGa-zf.js.map} +1 -1
- package/dist/client/chunks/{chart-config-pie-kte7OXa9.js → chart-config-pie-DD4SmRTF.js} +2 -2
- package/dist/client/chunks/{chart-config-pie-kte7OXa9.js.map → chart-config-pie-DD4SmRTF.js.map} +1 -1
- package/dist/client/chunks/{chart-config-radar-C9IxP5tc.js → chart-config-radar-CC2XAaGr.js} +2 -2
- package/dist/client/chunks/{chart-config-radar-C9IxP5tc.js.map → chart-config-radar-CC2XAaGr.js.map} +1 -1
- package/dist/client/chunks/{chart-config-radial-bar-C3WJ8Uhm.js → chart-config-radial-bar-DmxKx1R0.js} +2 -2
- package/dist/client/chunks/{chart-config-radial-bar-C3WJ8Uhm.js.map → chart-config-radial-bar-DmxKx1R0.js.map} +1 -1
- package/dist/client/chunks/{chart-config-sankey-DGAThN9i.js → chart-config-sankey-BTnWA7EW.js} +2 -2
- package/dist/client/chunks/{chart-config-sankey-DGAThN9i.js.map → chart-config-sankey-BTnWA7EW.js.map} +1 -1
- package/dist/client/chunks/{chart-config-scatter-BVN_29G5.js → chart-config-scatter-DSYTjwRb.js} +2 -2
- package/dist/client/chunks/{chart-config-scatter-BVN_29G5.js.map → chart-config-scatter-DSYTjwRb.js.map} +1 -1
- package/dist/client/chunks/{chart-config-sunburst-utejM2YS.js → chart-config-sunburst-Bwjtdf7X.js} +2 -2
- package/dist/client/chunks/{chart-config-sunburst-utejM2YS.js.map → chart-config-sunburst-Bwjtdf7X.js.map} +1 -1
- package/dist/client/chunks/{chart-config-tree-map-meeJEDi8.js → chart-config-tree-map-BI-oQStO.js} +2 -2
- package/dist/client/chunks/{chart-config-tree-map-meeJEDi8.js.map → chart-config-tree-map-BI-oQStO.js.map} +1 -1
- package/dist/client/chunks/{chart-config-waterfall-CaPeWZMl.js → chart-config-waterfall-DSnyixbI.js} +2 -2
- package/dist/client/chunks/{chart-config-waterfall-CaPeWZMl.js.map → chart-config-waterfall-DSnyixbI.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-BRXHT2H-.js → chart-data-table-Cm5jrpaw.js} +853 -843
- package/dist/client/chunks/chart-data-table-Cm5jrpaw.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-aQ7G_CqU.js → chart-funnel-Eke8IPtG.js} +3 -3
- package/dist/client/chunks/{chart-funnel-aQ7G_CqU.js.map → chart-funnel-Eke8IPtG.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-DqbDKr9E.js → chart-gauge-DeRZNsyl.js} +3 -3
- package/dist/client/chunks/{chart-gauge-DqbDKr9E.js.map → chart-gauge-DeRZNsyl.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map--6QnhUM8.js → chart-heat-map-C86thSJ4.js} +3 -3
- package/dist/client/chunks/{chart-heat-map--6QnhUM8.js.map → chart-heat-map-C86thSJ4.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-DOSpRjfs.js → chart-kpi-delta-CxOYD2f1.js} +74 -72
- package/dist/client/chunks/{chart-kpi-delta-DOSpRjfs.js.map → chart-kpi-delta-CxOYD2f1.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-BcMjeKm8.js → chart-kpi-number-C6gWz-x4.js} +65 -64
- package/dist/client/chunks/{chart-kpi-number-BcMjeKm8.js.map → chart-kpi-number-C6gWz-x4.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-BI9isc2i.js → chart-kpi-text-dDONrhS-.js} +27 -26
- package/dist/client/chunks/{chart-kpi-text-BI9isc2i.js.map → chart-kpi-text-dDONrhS-.js.map} +1 -1
- package/dist/client/chunks/{chart-line-C0IHQteu.js → chart-line-r4iWevKZ.js} +119 -118
- package/dist/client/chunks/chart-line-r4iWevKZ.js.map +1 -0
- package/dist/client/chunks/{chart-markdown-BmgSMqPg.js → chart-markdown-BPW-EAm9.js} +940 -943
- package/dist/client/chunks/chart-markdown-BPW-EAm9.js.map +1 -0
- package/dist/client/chunks/{chart-measure-profile-DEyLW1fd.js → chart-measure-profile-BI3kADCp.js} +4 -4
- package/dist/client/chunks/{chart-measure-profile-DEyLW1fd.js.map → chart-measure-profile-BI3kADCp.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-DSIekr7p.js → chart-pie-yqH2YVEI.js} +4 -4
- package/dist/client/chunks/{chart-pie-DSIekr7p.js.map → chart-pie-yqH2YVEI.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-SGl62hK8.js → chart-radar-B-_3v-rE.js} +4 -4
- package/dist/client/chunks/{chart-radar-SGl62hK8.js.map → chart-radar-B-_3v-rE.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-C42EykOa.js → chart-radial-bar-C0EgzfAF.js} +4 -4
- package/dist/client/chunks/{chart-radial-bar-C42EykOa.js.map → chart-radial-bar-C0EgzfAF.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-DguImp0W.js → chart-sankey-CFzjGvZX.js} +3 -3
- package/dist/client/chunks/{chart-sankey-DguImp0W.js.map → chart-sankey-CFzjGvZX.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-Doeox4OP.js → chart-scatter-DZPirzwX.js} +4 -4
- package/dist/client/chunks/{chart-scatter-Doeox4OP.js.map → chart-scatter-DZPirzwX.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-F3tgCpL-.js → chart-sunburst-91Q2tzaB.js} +4 -4
- package/dist/client/chunks/{chart-sunburst-F3tgCpL-.js.map → chart-sunburst-91Q2tzaB.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-DvuSCIc8.js → chart-tree-map-Bi4axCvh.js} +4 -4
- package/dist/client/chunks/{chart-tree-map-DvuSCIc8.js.map → chart-tree-map-Bi4axCvh.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-Be5duXlO.js → chart-waterfall-DcHbbPaG.js} +4 -4
- package/dist/client/chunks/{chart-waterfall-Be5duXlO.js.map → chart-waterfall-DcHbbPaG.js.map} +1 -1
- package/dist/client/chunks/{charts-core-XlOwoP_r.js → charts-core-CrBDYN6N.js} +2 -2
- package/dist/client/chunks/{charts-core-XlOwoP_r.js.map → charts-core-CrBDYN6N.js.map} +1 -1
- package/dist/client/chunks/{core-Dk6z6kC0.js → core-DsAWNRRv.js} +87 -85
- package/dist/client/chunks/{core-Dk6z6kC0.js.map → core-DsAWNRRv.js.map} +1 -1
- package/dist/client/chunks/{dist-eZurnOde.js → dist-zPWyTBdU.js} +38 -32
- package/dist/client/chunks/dist-zPWyTBdU.js.map +1 -0
- package/dist/client/chunks/{en-US-5xPTdCXg.js → en-US-BE6VoG0o.js} +1 -1
- package/dist/client/chunks/{en-US-5xPTdCXg.js.map → en-US-BE6VoG0o.js.map} +1 -1
- package/dist/client/chunks/{exceljs.min-DaJsLlWM.js → exceljs.min-CIqBqwTW.js} +71 -45
- package/dist/client/chunks/{exceljs.min-DaJsLlWM.js.map → exceljs.min-CIqBqwTW.js.map} +1 -1
- package/dist/client/chunks/{javascript-DFvvCuoP.js → javascript-DFnKaHmQ.js} +3 -3
- package/dist/client/chunks/{javascript-DFvvCuoP.js.map → javascript-DFnKaHmQ.js.map} +1 -1
- package/dist/client/chunks/{json-BBm9TlrA.js → json-Cu6rbgWf.js} +1 -1
- package/dist/client/chunks/{json-BBm9TlrA.js.map → json-Cu6rbgWf.js.map} +1 -1
- package/dist/client/chunks/{nl-NL-BLDeSy_P.js → nl-NL-oyr2wENY.js} +3 -1
- package/dist/client/chunks/nl-NL-oyr2wENY.js.map +1 -0
- package/dist/client/chunks/{providers-DX3Vw5kc.js → providers-DwQCKdGW.js} +1 -1
- package/dist/client/chunks/{providers-DX3Vw5kc.js.map → providers-DwQCKdGW.js.map} +1 -1
- package/dist/client/chunks/{retention-YhT1Oohi.js → retention-ChW9jYdy.js} +1 -1
- package/dist/client/chunks/{retention-YhT1Oohi.js.map → retention-ChW9jYdy.js.map} +1 -1
- package/dist/client/chunks/{rolldown-runtime-CCl2IeXn.js → rolldown-runtime-CWhphoD1.js} +1 -1
- package/dist/client/chunks/{schema-visualization-CM5ikSWB.js → schema-visualization-BszcrmZX.js} +294 -290
- package/dist/client/chunks/{schema-visualization-CM5ikSWB.js.map → schema-visualization-BszcrmZX.js.map} +1 -1
- package/dist/client/chunks/{sql-k0GA6oZ_.js → sql-CmVzGP4w.js} +1 -1
- package/dist/client/chunks/{sql-k0GA6oZ_.js.map → sql-CmVzGP4w.js.map} +1 -1
- package/dist/client/chunks/{useDebounce-NEZQbfxN.js → useDirtyStateTracking-B5wCDJSj.js} +99 -37
- package/dist/client/chunks/useDirtyStateTracking-B5wCDJSj.js.map +1 -0
- package/dist/client/chunks/{useExplainAI-DivfI0dW.js → useExplainAI-CCeCYzDm.js} +19 -19
- package/dist/client/chunks/{useExplainAI-DivfI0dW.js.map → useExplainAI-CCeCYzDm.js.map} +1 -1
- package/dist/client/chunks/{useNotebookLayout-DKkMenhj.js → useNotebookLayout-Ck3Z3uzg.js} +2 -2
- package/dist/client/chunks/{useNotebookLayout-DKkMenhj.js.map → useNotebookLayout-Ck3Z3uzg.js.map} +1 -1
- package/dist/client/chunks/{utils-Ctl_cVNR.js → utils-kqa-JIMg.js} +40 -13
- package/dist/client/chunks/utils-kqa-JIMg.js.map +1 -0
- package/dist/client/chunks/{vendor-BcLQ6iVZ.js → vendor-0hJNlZXQ.js} +102 -97
- package/dist/client/chunks/vendor-0hJNlZXQ.js.map +1 -0
- package/dist/client/components/DashboardGrid.d.ts +3 -1
- package/dist/client/components/dashboard/DashboardContext.d.ts +113 -0
- package/dist/client/components/dashboard/DashboardCoordinator.d.ts +2 -0
- package/dist/client/components/dashboard/DashboardFilterBar.d.ts +8 -0
- package/dist/client/components/dashboard/DashboardGridSurface.d.ts +8 -0
- package/dist/client/components/dashboard/DashboardModals.d.ts +8 -0
- package/dist/client/components/dashboard/DashboardProvider.d.ts +2 -0
- package/dist/client/components/dashboard/DashboardToolbar.d.ts +11 -0
- package/dist/client/components/dashboard/dashboardGridUtils.d.ts +17 -0
- package/dist/client/components/dashboard/index.d.ts +13 -0
- package/dist/client/components.d.ts +2 -0
- package/dist/client/components.js +3 -4
- package/dist/client/hooks.js +5 -6
- package/dist/client/icons.js +2 -2
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +161 -163
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers.js +3 -3
- package/dist/client/schema.js +1 -1
- package/dist/client/types.d.ts +1 -0
- package/dist/client/utils.js +6 -7
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +77 -51
- package/dist/{adapters/dist-Boc63-1q.cjs → server/dist-BOdf-GQO.cjs} +1 -1
- package/dist/server/{google-BXwMolCu.js → google-CFYljAOF.js} +1 -1
- package/dist/server/{google-DzQWXFwF.cjs → google-DUlXeeDA.cjs} +1 -1
- package/dist/server/index.cjs +9 -9
- package/dist/server/index.js +57 -23
- package/dist/server/{openai-BfiZU0rG.cjs → openai-6wrBvAnv.cjs} +1 -1
- package/dist/server/openai-BDwb2u7y.cjs +17 -0
- package/dist/{adapters/openai-DQawCWQb.js → server/openai-DiVskd89.js} +1 -1
- package/dist/{adapters/openai-CuUGrKaK.js → server/openai-y7GhJNdn.js} +2062 -928
- package/package.json +3 -3
- package/dist/adapters/mcp-transport-B_HoB1HQ.js +0 -579
- package/dist/adapters/mcp-transport-bQzyrBPI.cjs +0 -40
- package/dist/adapters/openai-Bgri5TJc.cjs +0 -16
- package/dist/client/chunks/DashboardEditModal-DayTXEH0.js.map +0 -1
- package/dist/client/chunks/FieldSearchModal-B7Mr8UNT.js +0 -2644
- package/dist/client/chunks/FieldSearchModal-B7Mr8UNT.js.map +0 -1
- package/dist/client/chunks/KpiDelta-C-hZ1x01.js +0 -2
- package/dist/client/chunks/KpiNumber-Beo8CK0a.js +0 -2
- package/dist/client/chunks/KpiText-ytYiRTRO.js +0 -2
- package/dist/client/chunks/SchemaVisualization-DbYZBTyi.js +0 -2
- package/dist/client/chunks/SchemaVisualizationLazy-BGo-1S3q.js +0 -2
- package/dist/client/chunks/af-ZA-BtTNqvHF.js.map +0 -1
- package/dist/client/chunks/chart-activity-grid-BnY-jaoa.js.map +0 -1
- package/dist/client/chunks/chart-area-G3OvLLK4.js.map +0 -1
- package/dist/client/chunks/chart-bar-MLIWiLrc.js.map +0 -1
- package/dist/client/chunks/chart-config-area-40fbx2Ah.js.map +0 -1
- package/dist/client/chunks/chart-config-bar-CUWHwOPN.js.map +0 -1
- package/dist/client/chunks/chart-config-line-DGYYdDw9.js.map +0 -1
- package/dist/client/chunks/chart-data-table-BRXHT2H-.js.map +0 -1
- package/dist/client/chunks/chart-line-C0IHQteu.js.map +0 -1
- package/dist/client/chunks/chart-markdown-BmgSMqPg.js.map +0 -1
- package/dist/client/chunks/dist-eZurnOde.js.map +0 -1
- package/dist/client/chunks/nl-NL-BLDeSy_P.js.map +0 -1
- package/dist/client/chunks/syntaxHighlighting-D8J6Yt9j.js +0 -30
- package/dist/client/chunks/syntaxHighlighting-D8J6Yt9j.js.map +0 -1
- package/dist/client/chunks/useDebounce-NEZQbfxN.js.map +0 -1
- package/dist/client/chunks/useDirtyStateTracking-KAjwj1Ht.js +0 -66
- package/dist/client/chunks/useDirtyStateTracking-KAjwj1Ht.js.map +0 -1
- package/dist/client/chunks/utils-Ctl_cVNR.js.map +0 -1
- package/dist/client/chunks/vendor-BcLQ6iVZ.js.map +0 -1
- package/dist/server/openai-BwsBio1K.cjs +0 -16
- /package/dist/adapters/{anthropic-B_rg0BhK.js → anthropic-CZh4hB-m.js} +0 -0
- /package/dist/adapters/{anthropic-BIva8k1r.cjs → anthropic-DG4r1LSm.cjs} +0 -0
- /package/dist/adapters/{dist-De5fzUEM.js → dist-CH3hwAUk.js} +0 -0
- /package/dist/server/{anthropic-BsNspi1r.js → anthropic-CZh4hB-m.js} +0 -0
- /package/dist/server/{anthropic-DsCEX6Fm.cjs → anthropic-DG4r1LSm.cjs} +0 -0
- /package/dist/server/{dist-CMWZC51B.js → dist-CH3hwAUk.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-
|
|
2
|
-
import { k as t } from "./chart-activity-grid-
|
|
1
|
+
import { n as e } from "./rolldown-runtime-CWhphoD1.js";
|
|
2
|
+
import { k as t } from "./chart-activity-grid-CiHrLH6Y.js";
|
|
3
3
|
import * as n from "react";
|
|
4
4
|
import r, { useMemo as i } from "react";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
@@ -15,7 +15,7 @@ function c(e) {
|
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region node_modules/markdown-to-jsx/dist/index.js
|
|
18
|
-
var l = 32, u = 9, d = 13, f = 10, p = 96, m = 126, h = 91, g = 94, _ = 62, v = 35, y = 37, b = 45, x = 61, S = 92, C = 42, w = 95, T = 60, E = 64, D = 93, O = 33, k = 38, A = 58, j = 70, M = 102, N = 104, P = 119, F = 116, I = 112, ee = 115, L = 160, R = 12, te = 44, ne = 59, re = 63,
|
|
18
|
+
var l = 32, u = 9, d = 13, f = 10, p = 96, m = 126, h = 91, g = 94, _ = 62, v = 35, y = 37, b = 45, x = 61, S = 92, C = 42, w = 95, T = 60, E = 64, D = 93, O = 33, k = 38, A = 58, j = 70, M = 102, N = 104, P = 119, F = 116, I = 112, ee = 115, L = 160, R = 12, te = 44, ne = 59, re = 63, z = 46, ie = 47, B = 39, ae = 34, oe = 43, V = 124, se = 123, ce = 125, le = 40, ue = 41, de = 30, fe = 31, H = 48, U = 57, W = 65, G = 90, K = 97, pe = 122, me = 128, he = 32, q = {
|
|
19
19
|
blockQuote: 0,
|
|
20
20
|
breakLine: 1,
|
|
21
21
|
breakThematic: 2,
|
|
@@ -40,7 +40,7 @@ var l = 32, u = 9, d = 13, f = 10, p = 96, m = 126, h = 91, g = 94, _ = 62, v =
|
|
|
40
40
|
textFormatted: 21,
|
|
41
41
|
unorderedList: 22
|
|
42
42
|
};
|
|
43
|
-
function
|
|
43
|
+
function ge(e) {
|
|
44
44
|
if (!we(e, "---")) return null;
|
|
45
45
|
let t = 3;
|
|
46
46
|
for (; t < e.length && (e[t] === " " || e[t] === " ");) t++;
|
|
@@ -60,8 +60,8 @@ function _e(e) {
|
|
|
60
60
|
let t = He(e, r, i);
|
|
61
61
|
if (t < i) {
|
|
62
62
|
let r = e.charCodeAt(t);
|
|
63
|
-
if (r >=
|
|
64
|
-
for (t++; t < i && (r = e.charCodeAt(t), r >=
|
|
63
|
+
if (r >= K && r <= pe || r >= W && r <= G || r >= H && r <= U || r === w) {
|
|
64
|
+
for (t++; t < i && (r = e.charCodeAt(t), r >= K && r <= pe || r >= W && r <= G || r >= H && r <= U || r === w || r === b || r === z);) t++;
|
|
65
65
|
t < i && e.charCodeAt(t) === A && (t++, t >= i ? n = !0 : (r = e.charCodeAt(t), (r === l || r === u) && (n = !0)));
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -69,7 +69,7 @@ function _e(e) {
|
|
|
69
69
|
}
|
|
70
70
|
return null;
|
|
71
71
|
}
|
|
72
|
-
var
|
|
72
|
+
var _e = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, J = {
|
|
73
73
|
class: "className",
|
|
74
74
|
for: "htmlFor",
|
|
75
75
|
allowfullscreen: "allowFullScreen",
|
|
@@ -113,10 +113,10 @@ var ve = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, q = {
|
|
|
113
113
|
usemap: "useMap",
|
|
114
114
|
viewbox: "viewBox"
|
|
115
115
|
};
|
|
116
|
-
function
|
|
116
|
+
function Y(e) {
|
|
117
117
|
var t = {};
|
|
118
118
|
for (var n in e) {
|
|
119
|
-
var r =
|
|
119
|
+
var r = J[n.toLowerCase()];
|
|
120
120
|
if (r) t[r] = e[n];
|
|
121
121
|
else {
|
|
122
122
|
var i = n.indexOf(":");
|
|
@@ -125,9 +125,9 @@ function J(e) {
|
|
|
125
125
|
}
|
|
126
126
|
return t;
|
|
127
127
|
}
|
|
128
|
-
var
|
|
129
|
-
function
|
|
130
|
-
return e.indexOf("&") === -1 ? e : e.replace(
|
|
128
|
+
var ve = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;
|
|
129
|
+
function ye(e) {
|
|
130
|
+
return e.indexOf("&") === -1 ? e : e.replace(_e, (e, t) => {
|
|
131
131
|
var n = c(t);
|
|
132
132
|
if (n) return n;
|
|
133
133
|
if (t[0] === "#") {
|
|
@@ -137,19 +137,19 @@ function be(e) {
|
|
|
137
137
|
return e;
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
|
-
var
|
|
141
|
-
function
|
|
142
|
-
if (
|
|
140
|
+
var be = /(javascript|vbscript|data(?!:image)):/i;
|
|
141
|
+
function xe(e) {
|
|
142
|
+
if (be.test(e)) return null;
|
|
143
143
|
if (e.indexOf("%") === -1) return e;
|
|
144
144
|
try {
|
|
145
145
|
let t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
|
|
146
|
-
if (
|
|
146
|
+
if (be.test(t)) return null;
|
|
147
147
|
} catch {
|
|
148
148
|
return null;
|
|
149
149
|
}
|
|
150
150
|
return e;
|
|
151
151
|
}
|
|
152
|
-
var
|
|
152
|
+
var Se = {}, Ce, X;
|
|
153
153
|
for (Ce = [
|
|
154
154
|
192,
|
|
155
155
|
193,
|
|
@@ -165,8 +165,8 @@ for (Ce = [
|
|
|
165
165
|
229,
|
|
166
166
|
230,
|
|
167
167
|
198
|
|
168
|
-
], X = 0; X < Ce.length; X++)
|
|
169
|
-
for (
|
|
168
|
+
], X = 0; X < Ce.length; X++) Se[Ce[X]] = "a";
|
|
169
|
+
for (Se[231] = Se[199] = "c", Se[240] = Se[208] = "d", Ce = [
|
|
170
170
|
200,
|
|
171
171
|
201,
|
|
172
172
|
202,
|
|
@@ -175,7 +175,7 @@ for (Y[231] = Y[199] = "c", Y[240] = Y[208] = "d", Ce = [
|
|
|
175
175
|
232,
|
|
176
176
|
234,
|
|
177
177
|
235
|
|
178
|
-
], X = 0; X < Ce.length; X++)
|
|
178
|
+
], X = 0; X < Ce.length; X++) Se[Ce[X]] = "e";
|
|
179
179
|
for (Ce = [
|
|
180
180
|
207,
|
|
181
181
|
239,
|
|
@@ -185,8 +185,8 @@ for (Ce = [
|
|
|
185
185
|
237,
|
|
186
186
|
204,
|
|
187
187
|
236
|
|
188
|
-
], X = 0; X < Ce.length; X++)
|
|
189
|
-
for (
|
|
188
|
+
], X = 0; X < Ce.length; X++) Se[Ce[X]] = "i";
|
|
189
|
+
for (Se[209] = Se[241] = "n", Ce = [
|
|
190
190
|
248,
|
|
191
191
|
216,
|
|
192
192
|
339,
|
|
@@ -199,7 +199,7 @@ for (Y[209] = Y[241] = "n", Ce = [
|
|
|
199
199
|
243,
|
|
200
200
|
210,
|
|
201
201
|
242
|
|
202
|
-
], X = 0; X < Ce.length; X++)
|
|
202
|
+
], X = 0; X < Ce.length; X++) Se[Ce[X]] = "o";
|
|
203
203
|
for (Ce = [
|
|
204
204
|
220,
|
|
205
205
|
252,
|
|
@@ -209,17 +209,17 @@ for (Ce = [
|
|
|
209
209
|
250,
|
|
210
210
|
217,
|
|
211
211
|
249
|
|
212
|
-
], X = 0; X < Ce.length; X++)
|
|
213
|
-
|
|
212
|
+
], X = 0; X < Ce.length; X++) Se[Ce[X]] = "u";
|
|
213
|
+
Se[376] = Se[255] = Se[221] = Se[253] = "y";
|
|
214
214
|
function Z(e) {
|
|
215
215
|
for (var t = "", n = -1, r = e.length, i = 0; i < r; i++) {
|
|
216
216
|
var a = e.charCodeAt(i);
|
|
217
|
-
if (a >=
|
|
217
|
+
if (a >= K && a <= pe || a >= H && a <= U) {
|
|
218
218
|
n < 0 && (n = i);
|
|
219
219
|
continue;
|
|
220
220
|
}
|
|
221
|
-
if (a >=
|
|
222
|
-
n >= 0 && (t += e.slice(n, i), n = -1), t += String.fromCharCode(a +
|
|
221
|
+
if (a >= W && a <= G) {
|
|
222
|
+
n >= 0 && (t += e.slice(n, i), n = -1), t += String.fromCharCode(a + he);
|
|
223
223
|
continue;
|
|
224
224
|
}
|
|
225
225
|
if (a === l || a === b) {
|
|
@@ -227,7 +227,7 @@ function Z(e) {
|
|
|
227
227
|
continue;
|
|
228
228
|
}
|
|
229
229
|
n >= 0 && (t += e.slice(n, i), n = -1);
|
|
230
|
-
var o =
|
|
230
|
+
var o = Se[a];
|
|
231
231
|
o && (t += o);
|
|
232
232
|
}
|
|
233
233
|
return n >= 0 && (t += e.slice(n)), t;
|
|
@@ -270,13 +270,13 @@ function Te(e) {
|
|
|
270
270
|
}
|
|
271
271
|
var Ee = 1, De = 2, Oe = 4, ke = 8, Ae = 16, je = 32, Me = 64, Ne = 1, Pe = 2, Fe = 3, Ie = 4, Le = (function() {
|
|
272
272
|
var e = new Uint8Array(128), t;
|
|
273
|
-
for (e[u] = Ee, e[f] = Ee | De, e[R] = Ee, e[d] = Ee | De, e[l] = Ee, t = O; t <=
|
|
273
|
+
for (e[u] = Ee, e[f] = Ee | De, e[R] = Ee, e[d] = Ee | De, e[l] = Ee, t = O; t <= ie; t++) e[t] = Oe;
|
|
274
274
|
for (t = A; t <= E; t++) e[t] = Oe;
|
|
275
275
|
for (t = h; t <= p; t++) e[t] = Oe;
|
|
276
|
-
for (t =
|
|
277
|
-
for (t =
|
|
278
|
-
for (t =
|
|
279
|
-
for (t =
|
|
276
|
+
for (t = se; t <= m; t++) e[t] = Oe;
|
|
277
|
+
for (t = H; t <= U; t++) e[t] = Ae;
|
|
278
|
+
for (t = W; t <= G; t++) e[t] = ke;
|
|
279
|
+
for (t = K; t <= pe; t++) e[t] = ke;
|
|
280
280
|
return e;
|
|
281
281
|
})();
|
|
282
282
|
(function() {
|
|
@@ -301,14 +301,40 @@ function He(e, t, n) {
|
|
|
301
301
|
for (; t < r && (e[t] === " " || e[t] === " ");) t++;
|
|
302
302
|
return t;
|
|
303
303
|
}
|
|
304
|
-
function Ue(e
|
|
304
|
+
function Ue(e) {
|
|
305
|
+
if (!e) return !1;
|
|
306
|
+
for (var t in e) return !0;
|
|
307
|
+
return !1;
|
|
308
|
+
}
|
|
309
|
+
function We(e) {
|
|
310
|
+
return {
|
|
311
|
+
attrs: {},
|
|
312
|
+
children: [{
|
|
313
|
+
type: q.text,
|
|
314
|
+
text: e
|
|
315
|
+
}],
|
|
316
|
+
c: !0,
|
|
317
|
+
type: q.htmlBlock,
|
|
318
|
+
tag: "header"
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
function Ge(e) {
|
|
322
|
+
var t = [];
|
|
323
|
+
if (!e) return t;
|
|
324
|
+
for (var n in e) n.charCodeAt(0) === 94 && t.push({
|
|
325
|
+
identifier: n,
|
|
326
|
+
footnote: e[n].target
|
|
327
|
+
});
|
|
328
|
+
return t;
|
|
329
|
+
}
|
|
330
|
+
function Ke(e, t, n) {
|
|
305
331
|
for (var r = e, i = t.split("."), a = 0; a < i.length && (r = r?.[i[a]], r !== void 0);) a++;
|
|
306
332
|
return r || n;
|
|
307
333
|
}
|
|
308
|
-
function
|
|
334
|
+
function qe(e) {
|
|
309
335
|
for (var t = !1, n = 0; n < e.length; n++) {
|
|
310
336
|
var r = e.charCodeAt(n);
|
|
311
|
-
if (r <= l || r ===
|
|
337
|
+
if (r <= l || r === ae || r === y || r === T || r === _ || r === h || r === S || r === D || r === g || r === p || r >= 123) {
|
|
312
338
|
t = !0;
|
|
313
339
|
break;
|
|
314
340
|
}
|
|
@@ -318,7 +344,7 @@ function We(e) {
|
|
|
318
344
|
var r = e.charCodeAt(n);
|
|
319
345
|
if (r === y && n + 2 < e.length) {
|
|
320
346
|
var a = e.charCodeAt(n + 1), o = e.charCodeAt(n + 2);
|
|
321
|
-
if ((a >=
|
|
347
|
+
if ((a >= H && a <= U || a >= W && a <= j || a >= K && a <= M) && (o >= H && o <= U || o >= W && o <= j || o >= K && o <= M)) {
|
|
322
348
|
i += e[n] + e[n + 1] + e[n + 2], n += 2;
|
|
323
349
|
continue;
|
|
324
350
|
}
|
|
@@ -327,10 +353,10 @@ function We(e) {
|
|
|
327
353
|
}
|
|
328
354
|
return i;
|
|
329
355
|
}
|
|
330
|
-
function
|
|
356
|
+
function Je(...e) {
|
|
331
357
|
return e.filter(Boolean).join(" ");
|
|
332
358
|
}
|
|
333
|
-
var
|
|
359
|
+
var Ye = new Set([
|
|
334
360
|
"title",
|
|
335
361
|
"textarea",
|
|
336
362
|
"style",
|
|
@@ -340,24 +366,24 @@ var Ke = new Set([
|
|
|
340
366
|
"noframes",
|
|
341
367
|
"script",
|
|
342
368
|
"plaintext"
|
|
343
|
-
]),
|
|
344
|
-
function
|
|
345
|
-
return
|
|
369
|
+
]), Xe = /<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;
|
|
370
|
+
function Ze(e) {
|
|
371
|
+
return Ye.has(e.toLowerCase());
|
|
346
372
|
}
|
|
347
|
-
function
|
|
348
|
-
return
|
|
373
|
+
function Qe(e) {
|
|
374
|
+
return Xe.lastIndex = 0, Xe.test(e);
|
|
349
375
|
}
|
|
350
|
-
function
|
|
351
|
-
return
|
|
376
|
+
function $e(e) {
|
|
377
|
+
return Xe.lastIndex = 0, e.replace(Xe, function(e, t, n, r) {
|
|
352
378
|
return "<" + t + n + r;
|
|
353
379
|
});
|
|
354
380
|
}
|
|
355
|
-
var
|
|
381
|
+
var et = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, tt = /^<[A-Z]/, nt = [
|
|
356
382
|
"script",
|
|
357
383
|
"pre",
|
|
358
384
|
"style",
|
|
359
385
|
"textarea"
|
|
360
|
-
],
|
|
386
|
+
], rt = new Set(nt), it = /<(?:pre|script|style|textarea)\b/i, at = /<(?:pre|script|style|textarea)\b/iy, ot = /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m, st = /^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im, ct = new Uint8Array(128);
|
|
361
387
|
(function() {
|
|
362
388
|
for (var e = [
|
|
363
389
|
p,
|
|
@@ -369,45 +395,45 @@ var Ze = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, Qe = /^<[A-Z]/, $e = [
|
|
|
369
395
|
O,
|
|
370
396
|
T,
|
|
371
397
|
S,
|
|
372
|
-
|
|
398
|
+
fe,
|
|
373
399
|
N,
|
|
374
400
|
P,
|
|
375
401
|
M
|
|
376
|
-
], t = 0; t < e.length; t++)
|
|
402
|
+
], t = 0; t < e.length; t++) ct[e[t]] = 1;
|
|
377
403
|
})();
|
|
378
|
-
var
|
|
379
|
-
function
|
|
380
|
-
return
|
|
404
|
+
var lt = /([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;
|
|
405
|
+
function ut(e) {
|
|
406
|
+
return rt.has(e);
|
|
381
407
|
}
|
|
382
|
-
function
|
|
383
|
-
return
|
|
408
|
+
function dt(e) {
|
|
409
|
+
return it.test(e);
|
|
384
410
|
}
|
|
385
|
-
function
|
|
411
|
+
function ft(e, t, n) {
|
|
386
412
|
for (var r = t, i = n; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
|
|
387
413
|
if (r >= i) return !1;
|
|
388
|
-
e.charCodeAt(r) ===
|
|
414
|
+
e.charCodeAt(r) === V && r++;
|
|
389
415
|
for (var a = 0; r < i;) {
|
|
390
416
|
for (; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
|
|
391
417
|
if (r >= i) break;
|
|
392
|
-
if (e.charCodeAt(r) ===
|
|
418
|
+
if (e.charCodeAt(r) === V && a > 0) {
|
|
393
419
|
for (var o = r + 1; o < i && (e.charCodeAt(o) === l || e.charCodeAt(o) === u);) o++;
|
|
394
420
|
if (o >= i) return !0;
|
|
395
421
|
}
|
|
396
422
|
if (e.charCodeAt(r) === A && r++, r >= i || e.charCodeAt(r) !== b) return !1;
|
|
397
423
|
for (; r < i && e.charCodeAt(r) === b;) r++;
|
|
398
424
|
for (r < i && e.charCodeAt(r) === A && r++, a++; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
|
|
399
|
-
if (r < i) if (e.charCodeAt(r) ===
|
|
425
|
+
if (r < i) if (e.charCodeAt(r) === V) r++;
|
|
400
426
|
else return !1;
|
|
401
427
|
}
|
|
402
428
|
return a > 0;
|
|
403
429
|
}
|
|
404
|
-
function
|
|
430
|
+
function pt(e, t) {
|
|
405
431
|
if (e.charCodeAt(t) !== T) return null;
|
|
406
432
|
let n = t + 1, r = e.length, i = !1;
|
|
407
|
-
e.charCodeAt(n) ===
|
|
433
|
+
e.charCodeAt(n) === ie && (n++, i = !0);
|
|
408
434
|
let a = n, o = e.charCodeAt(n);
|
|
409
|
-
if (!(o >=
|
|
410
|
-
for (; n < r && (e.charCodeAt(n) >=
|
|
435
|
+
if (!(o >= K && o <= pe || o >= W && o <= G)) return null;
|
|
436
|
+
for (; n < r && (e.charCodeAt(n) >= K && e.charCodeAt(n) <= pe || e.charCodeAt(n) >= W && e.charCodeAt(n) <= G || e.charCodeAt(n) >= H && e.charCodeAt(n) <= U || e.charCodeAt(n) === b);) n++;
|
|
411
437
|
let s = e.slice(a, n);
|
|
412
438
|
if (!s) return null;
|
|
413
439
|
let c = n;
|
|
@@ -415,7 +441,7 @@ function ut(e, t) {
|
|
|
415
441
|
let d = e.slice(c, n);
|
|
416
442
|
if (n === c && n < r) {
|
|
417
443
|
var m = e.charCodeAt(n);
|
|
418
|
-
if (m !== _ && m !==
|
|
444
|
+
if (m !== _ && m !== ie) return null;
|
|
419
445
|
}
|
|
420
446
|
let h = n, g = {}, v = !1;
|
|
421
447
|
for (; n < r;) {
|
|
@@ -437,7 +463,7 @@ function ut(e, t) {
|
|
|
437
463
|
n++;
|
|
438
464
|
continue;
|
|
439
465
|
}
|
|
440
|
-
if (t ===
|
|
466
|
+
if (t === ie && n + 1 < r && e.charCodeAt(n + 1) === _) {
|
|
441
467
|
let t = e.slice(h, n);
|
|
442
468
|
return v = n > h && e.charCodeAt(n - 1) === l, {
|
|
443
469
|
tag: s,
|
|
@@ -451,10 +477,10 @@ function ut(e, t) {
|
|
|
451
477
|
};
|
|
452
478
|
}
|
|
453
479
|
var y = n, S = e.charCodeAt(n);
|
|
454
|
-
if (!(S >=
|
|
480
|
+
if (!(S >= K && S <= pe || S >= W && S <= G || S === w || S === A)) return null;
|
|
455
481
|
for (n++; n < r;) {
|
|
456
482
|
var C = e.charCodeAt(n);
|
|
457
|
-
if (C >=
|
|
483
|
+
if (C >= K && C <= pe || C >= W && C <= G || C >= H && C <= U || C === w || C === z || C === A || C === b) n++;
|
|
458
484
|
else break;
|
|
459
485
|
}
|
|
460
486
|
for (var E = e.slice(y, n); n < r && (e.charCodeAt(n) === l || e.charCodeAt(n) === u);) n++;
|
|
@@ -464,25 +490,25 @@ function ut(e, t) {
|
|
|
464
490
|
}
|
|
465
491
|
for (n++; n < r && (e.charCodeAt(n) === l || e.charCodeAt(n) === u);) n++;
|
|
466
492
|
var D = e.charCodeAt(n);
|
|
467
|
-
if (D ===
|
|
493
|
+
if (D === ae || D === B) {
|
|
468
494
|
n++;
|
|
469
495
|
for (var O = n; n < r && e.charCodeAt(n) !== D;) n++;
|
|
470
496
|
if (n >= r) return null;
|
|
471
497
|
if (g[E] = e.slice(O, n), n++, n < r) {
|
|
472
498
|
var k = e.charCodeAt(n);
|
|
473
|
-
if (k !== l && k !== u && k !== f && k !== _ && k !==
|
|
499
|
+
if (k !== l && k !== u && k !== f && k !== _ && k !== ie) return null;
|
|
474
500
|
}
|
|
475
|
-
} else if (D ===
|
|
501
|
+
} else if (D === se) {
|
|
476
502
|
var j = 1, O = n;
|
|
477
503
|
for (n++; n < r && j > 0;) {
|
|
478
504
|
var C = e.charCodeAt(n);
|
|
479
|
-
C ===
|
|
505
|
+
C === se ? j++ : C === ce && j--, n++;
|
|
480
506
|
}
|
|
481
507
|
g[E] = e.slice(O, n);
|
|
482
508
|
} else {
|
|
483
509
|
for (var O = n; n < r;) {
|
|
484
510
|
var M = e.charCodeAt(n);
|
|
485
|
-
if (M === l || M === u || M === _ || M === f || M ===
|
|
511
|
+
if (M === l || M === u || M === _ || M === f || M === ae || M === B || M === x || M === T || M === p) break;
|
|
486
512
|
n++;
|
|
487
513
|
}
|
|
488
514
|
if (n === O) return null;
|
|
@@ -491,8 +517,8 @@ function ut(e, t) {
|
|
|
491
517
|
}
|
|
492
518
|
return null;
|
|
493
519
|
}
|
|
494
|
-
function
|
|
495
|
-
if (!n.
|
|
520
|
+
function mt(e, t, n) {
|
|
521
|
+
if (!n.optimizeForStreaming && e.indexOf("[") === -1) return !1;
|
|
496
522
|
for (var r = 0, i = e.length, a = !1, o = !1; r < i;) {
|
|
497
523
|
for (var s = e.indexOf("\n", r), c = s < 0 ? i : s, d = r, y = 0; d < c && y < 4;) if (e.charCodeAt(d) === l) y++, d++;
|
|
498
524
|
else if (e.charCodeAt(d) === u) y += 4, d++;
|
|
@@ -550,7 +576,7 @@ function dt(e, t, n) {
|
|
|
550
576
|
a = !1;
|
|
551
577
|
}
|
|
552
578
|
if (!a && y < 4 && P < c && e.charCodeAt(P) === h && !(P + 1 < i && e.charCodeAt(P + 1) === g)) {
|
|
553
|
-
var I =
|
|
579
|
+
var I = ht(e, P, t);
|
|
554
580
|
if (I) {
|
|
555
581
|
r = I, a = !1;
|
|
556
582
|
continue;
|
|
@@ -571,7 +597,7 @@ function dt(e, t, n) {
|
|
|
571
597
|
}
|
|
572
598
|
return o;
|
|
573
599
|
}
|
|
574
|
-
function
|
|
600
|
+
function ht(e, t, n) {
|
|
575
601
|
let r = e.length;
|
|
576
602
|
if (e.charCodeAt(t) !== h) return null;
|
|
577
603
|
let i = t + 1 < r && e.charCodeAt(t + 1) === g, a = t + 1;
|
|
@@ -587,7 +613,7 @@ function ft(e, t, n) {
|
|
|
587
613
|
if (a > r || e.charCodeAt(a - 1) !== D) return null;
|
|
588
614
|
let s = e.slice(t + 1, a - 1);
|
|
589
615
|
if (s.length > 999) return null;
|
|
590
|
-
let c =
|
|
616
|
+
let c = yt(s);
|
|
591
617
|
if (!c || a >= r || e.charCodeAt(a) !== A) return null;
|
|
592
618
|
a++;
|
|
593
619
|
let d = !1;
|
|
@@ -614,13 +640,13 @@ function ft(e, t, n) {
|
|
|
614
640
|
if (b < y) {
|
|
615
641
|
if (b === a) return null;
|
|
616
642
|
var x = e.charCodeAt(b);
|
|
617
|
-
if (x !==
|
|
643
|
+
if (x !== ae && x !== B && x !== le) return null;
|
|
618
644
|
}
|
|
619
645
|
} else {
|
|
620
646
|
for (var m = a, C = 0; a < r;) {
|
|
621
647
|
var o = e.charCodeAt(a);
|
|
622
|
-
if (o ===
|
|
623
|
-
else if (o ===
|
|
648
|
+
if (o === le) C++;
|
|
649
|
+
else if (o === ue) {
|
|
624
650
|
if (C === 0) break;
|
|
625
651
|
C--;
|
|
626
652
|
} else {
|
|
@@ -636,8 +662,8 @@ function ft(e, t, n) {
|
|
|
636
662
|
if (a === E && a < r) for (M = a + 1; M < r && (e.charCodeAt(M) === l || e.charCodeAt(M) === u);) M++;
|
|
637
663
|
if (M < r) {
|
|
638
664
|
var N = e.charCodeAt(M);
|
|
639
|
-
if (N ===
|
|
640
|
-
for (var P = N ===
|
|
665
|
+
if (N === ae || N === B || N === le) {
|
|
666
|
+
for (var P = N === le ? 41 : N, F = M + 1, I = F; F < r;) {
|
|
641
667
|
var ee = e.charCodeAt(F);
|
|
642
668
|
if (ee === P) {
|
|
643
669
|
for (var L = F + 1; L < r && (e.charCodeAt(L) === l || e.charCodeAt(L) === u);) L++;
|
|
@@ -655,19 +681,19 @@ function ft(e, t, n) {
|
|
|
655
681
|
}
|
|
656
682
|
}
|
|
657
683
|
if (k) return n[c] || (n[c] = {
|
|
658
|
-
target:
|
|
659
|
-
title: O === void 0 ? O :
|
|
684
|
+
target: xt(p),
|
|
685
|
+
title: O === void 0 ? O : ye(xt(O))
|
|
660
686
|
}), j;
|
|
661
687
|
for (; a < E && (e.charCodeAt(a) === l || e.charCodeAt(a) === u);) a++;
|
|
662
688
|
return a < E ? null : (n[c] || (n[c] = {
|
|
663
|
-
target:
|
|
689
|
+
target: xt(p),
|
|
664
690
|
title: O
|
|
665
691
|
}), w < 0 ? r : w + 1);
|
|
666
692
|
}
|
|
667
|
-
var
|
|
668
|
-
for (
|
|
669
|
-
var
|
|
670
|
-
function
|
|
693
|
+
var gt = new Uint8Array(Le);
|
|
694
|
+
for (gt[fe] = Ee, gt[v] |= je, gt[_] |= je, gt[b] |= je | Me, gt[oe] |= je, gt[C] |= je | Me, gt[w] |= je | Me, gt[p] |= je | Me, gt[m] |= je | Me, gt[T] |= je | Me, gt[h] |= Me, gt[O] |= Me, gt[V] |= je, _t = H; _t <= U; _t++) gt[_t] |= je;
|
|
695
|
+
var _t;
|
|
696
|
+
function vt(e) {
|
|
671
697
|
if (e.indexOf("[") < 0 && e.indexOf("]") < 0) return !1;
|
|
672
698
|
for (var t = 0; t < e.length; t++) {
|
|
673
699
|
if (e.charCodeAt(t) === S) {
|
|
@@ -678,27 +704,27 @@ function ht(e) {
|
|
|
678
704
|
}
|
|
679
705
|
return !1;
|
|
680
706
|
}
|
|
681
|
-
function
|
|
707
|
+
function yt(e) {
|
|
682
708
|
var t = e.replace(/\s+/g, " ").trim();
|
|
683
709
|
return t.indexOf("ẞ") === -1 ? t.toLowerCase() : t.replace(/\u1E9E/g, "ss").toLowerCase();
|
|
684
710
|
}
|
|
685
|
-
function
|
|
686
|
-
return e <
|
|
711
|
+
function bt(e) {
|
|
712
|
+
return e < me ? gt[e] : e === L ? Ee : 0;
|
|
687
713
|
}
|
|
688
|
-
function
|
|
689
|
-
return e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, "$1");
|
|
714
|
+
function xt(e) {
|
|
715
|
+
return e.indexOf("\\") === -1 ? e : e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, "$1");
|
|
690
716
|
}
|
|
691
|
-
var
|
|
692
|
-
function
|
|
693
|
-
if (t ===
|
|
717
|
+
var St = null, Ct = -1, wt = -1;
|
|
718
|
+
function Tt(e, t) {
|
|
719
|
+
if (t === Ct && e === St) return wt;
|
|
694
720
|
var n = e.indexOf("\n", t);
|
|
695
721
|
return n < 0 ? e.length : n;
|
|
696
722
|
}
|
|
697
723
|
function $(e, t) {
|
|
698
|
-
let n =
|
|
724
|
+
let n = Tt(e, t);
|
|
699
725
|
return n < e.length ? n + 1 : n;
|
|
700
726
|
}
|
|
701
|
-
function
|
|
727
|
+
function Et(e, t, n) {
|
|
702
728
|
for (; t < n;) {
|
|
703
729
|
let n = e.charCodeAt(t);
|
|
704
730
|
if (n !== l && n !== u) break;
|
|
@@ -706,49 +732,49 @@ function Ct(e, t, n) {
|
|
|
706
732
|
}
|
|
707
733
|
return t;
|
|
708
734
|
}
|
|
709
|
-
function
|
|
735
|
+
function Dt(e, t) {
|
|
710
736
|
let n = $(e, t);
|
|
711
737
|
for (; n < e.length;) {
|
|
712
|
-
let t =
|
|
713
|
-
if (
|
|
738
|
+
let t = Tt(e, n);
|
|
739
|
+
if (Mt(e, n, t)) return n;
|
|
714
740
|
n = $(e, n);
|
|
715
741
|
}
|
|
716
742
|
return e.length;
|
|
717
743
|
}
|
|
718
|
-
function
|
|
744
|
+
function Ot(e, t, n, r) {
|
|
719
745
|
let i = 0;
|
|
720
746
|
for (; t + i < n && e.charCodeAt(t + i) === r;) i++;
|
|
721
747
|
return i;
|
|
722
748
|
}
|
|
723
|
-
var
|
|
724
|
-
function
|
|
725
|
-
for (
|
|
726
|
-
let n = e.charCodeAt(t +
|
|
727
|
-
if (n === u)
|
|
728
|
-
else if (n === l)
|
|
749
|
+
var kt = 0, At = 0;
|
|
750
|
+
function jt(e, t, n) {
|
|
751
|
+
for (kt = 0, At = 0; t + At < n;) {
|
|
752
|
+
let n = e.charCodeAt(t + At);
|
|
753
|
+
if (n === u) kt += 4 - kt % 4;
|
|
754
|
+
else if (n === l) kt++;
|
|
729
755
|
else break;
|
|
730
|
-
|
|
756
|
+
At++;
|
|
731
757
|
}
|
|
732
758
|
}
|
|
733
|
-
function
|
|
734
|
-
return
|
|
759
|
+
function Mt(e, t, n) {
|
|
760
|
+
return Et(e, t, n) >= n;
|
|
735
761
|
}
|
|
736
|
-
function
|
|
737
|
-
let i =
|
|
738
|
-
if (
|
|
739
|
-
let a = t +
|
|
762
|
+
function Nt(e, t, n, r) {
|
|
763
|
+
let i = Tt(e, t);
|
|
764
|
+
if (jt(e, t, i), kt > 3) return null;
|
|
765
|
+
let a = t + At;
|
|
740
766
|
if (e.charCodeAt(a) !== v) return null;
|
|
741
|
-
let o =
|
|
767
|
+
let o = Ot(e, a, i, 35);
|
|
742
768
|
if (o < 1 || o > 6 || (a += o, a < i && e.charCodeAt(a) !== l && e.charCodeAt(a) !== u)) return null;
|
|
743
|
-
a =
|
|
769
|
+
a = Et(e, a, i);
|
|
744
770
|
for (var s = i; s > a && e.charCodeAt(s - 1) === l;) s--;
|
|
745
771
|
for (var c = s; s > a && e.charCodeAt(s - 1) === v;) s--;
|
|
746
772
|
if (s < c) if (s === a || e.charCodeAt(s - 1) === l) for (; s > a && e.charCodeAt(s - 1) === l;) s--;
|
|
747
773
|
else s = c;
|
|
748
|
-
let d = e.slice(a, s), f =
|
|
774
|
+
let d = e.slice(a, s), f = Tn(d, 0, d.length, n, r), p = (r?.slugify || Z)(d);
|
|
749
775
|
return {
|
|
750
776
|
node: {
|
|
751
|
-
type:
|
|
777
|
+
type: q.heading,
|
|
752
778
|
level: o,
|
|
753
779
|
children: f,
|
|
754
780
|
id: p
|
|
@@ -756,17 +782,17 @@ function At(e, t, n, r) {
|
|
|
756
782
|
end: $(e, i)
|
|
757
783
|
};
|
|
758
784
|
}
|
|
759
|
-
function
|
|
785
|
+
function Pt(e, t, n) {
|
|
760
786
|
var r = e.charCodeAt(t);
|
|
761
787
|
if (r !== x && r !== b) return !1;
|
|
762
788
|
for (var i = t; i < n && e.charCodeAt(i) === r;) i++;
|
|
763
789
|
for (; i < n && (e.charCodeAt(i) === l || e.charCodeAt(i) === u);) i++;
|
|
764
790
|
return i >= n;
|
|
765
791
|
}
|
|
766
|
-
function
|
|
767
|
-
let n =
|
|
768
|
-
if (
|
|
769
|
-
let r = t +
|
|
792
|
+
function Ft(e, t) {
|
|
793
|
+
let n = Tt(e, t);
|
|
794
|
+
if (jt(e, t, n), kt > 3) return null;
|
|
795
|
+
let r = t + At, i = e.charCodeAt(r);
|
|
770
796
|
if (i !== b && i !== C && i !== w) return null;
|
|
771
797
|
let a = 0;
|
|
772
798
|
for (; r < n;) {
|
|
@@ -776,37 +802,37 @@ function Mt(e, t) {
|
|
|
776
802
|
r++;
|
|
777
803
|
}
|
|
778
804
|
return a < 3 ? null : {
|
|
779
|
-
node: { type:
|
|
805
|
+
node: { type: q.breakThematic },
|
|
780
806
|
end: $(e, n)
|
|
781
807
|
};
|
|
782
808
|
}
|
|
783
|
-
function
|
|
784
|
-
let r =
|
|
785
|
-
if (
|
|
786
|
-
let i =
|
|
809
|
+
function It(e, t, n) {
|
|
810
|
+
let r = Tt(e, t);
|
|
811
|
+
if (jt(e, t, r), kt > 3) return null;
|
|
812
|
+
let i = kt, a = t + At, o = e.charCodeAt(a);
|
|
787
813
|
if (o !== p && o !== m) return null;
|
|
788
|
-
let s =
|
|
814
|
+
let s = Ot(e, a, r, o);
|
|
789
815
|
if (s < 3) return null;
|
|
790
816
|
a += s;
|
|
791
|
-
let c =
|
|
817
|
+
let c = Et(e, a, r), d = r;
|
|
792
818
|
if (o === p) {
|
|
793
819
|
for (let t = c; t < r; t++) if (e.charCodeAt(t) === p) return null;
|
|
794
820
|
}
|
|
795
821
|
for (; d > c && (e.charCodeAt(d - 1) === l || e.charCodeAt(d - 1) === u);) d--;
|
|
796
822
|
let h = e.slice(c, d), g = "", _ = "", v = h.indexOf(" ");
|
|
797
|
-
v === -1 ? g = h : (g = h.slice(0, v), _ = h.slice(v + 1).trim()), g =
|
|
823
|
+
v === -1 ? g = h : (g = h.slice(0, v), _ = h.slice(v + 1).trim()), g = xt(g);
|
|
798
824
|
var y = void 0;
|
|
799
825
|
if (_) {
|
|
800
|
-
|
|
801
|
-
for (var b; (b =
|
|
826
|
+
lt.lastIndex = 0;
|
|
827
|
+
for (var b; (b = lt.exec(_)) !== null;) y ||= {}, y[b[1]] = b[2] === void 0 ? b[3] : b[2];
|
|
802
828
|
}
|
|
803
829
|
let x = $(e, r), S = x, C = e.length;
|
|
804
830
|
for (; S < e.length;) {
|
|
805
|
-
let t =
|
|
806
|
-
if (
|
|
807
|
-
let n = S +
|
|
808
|
-
var w =
|
|
809
|
-
if (w >= s &&
|
|
831
|
+
let t = Tt(e, S);
|
|
832
|
+
if (jt(e, S, t), kt < 4) {
|
|
833
|
+
let n = S + At;
|
|
834
|
+
var w = Ot(e, n, t, o);
|
|
835
|
+
if (w >= s && Mt(e, n + w, t)) {
|
|
810
836
|
C = $(e, t);
|
|
811
837
|
break;
|
|
812
838
|
}
|
|
@@ -818,14 +844,14 @@ function Nt(e, t, n) {
|
|
|
818
844
|
else {
|
|
819
845
|
T = "";
|
|
820
846
|
for (var E = x; E < S;) {
|
|
821
|
-
var D =
|
|
822
|
-
|
|
847
|
+
var D = Tt(e, E);
|
|
848
|
+
jt(e, E, D), T += e.slice(E + Math.min(At, i), D) + "\n", E = $(e, D);
|
|
823
849
|
}
|
|
824
850
|
T.length > 0 && T.charCodeAt(T.length - 1) === f && (T = T.slice(0, -1));
|
|
825
851
|
}
|
|
826
852
|
return {
|
|
827
853
|
node: {
|
|
828
|
-
type:
|
|
854
|
+
type: q.codeBlock,
|
|
829
855
|
lang: g || void 0,
|
|
830
856
|
text: T,
|
|
831
857
|
infoString: _ || void 0,
|
|
@@ -834,19 +860,19 @@ function Nt(e, t, n) {
|
|
|
834
860
|
end: C
|
|
835
861
|
};
|
|
836
862
|
}
|
|
837
|
-
function
|
|
838
|
-
if (
|
|
863
|
+
function Lt(e, t) {
|
|
864
|
+
if (jt(e, t, Tt(e, t)), kt < 4) return null;
|
|
839
865
|
let n = "", r = t;
|
|
840
866
|
for (; r < e.length;) {
|
|
841
|
-
let t =
|
|
842
|
-
if (
|
|
867
|
+
let t = Tt(e, r);
|
|
868
|
+
if (jt(e, r, t), Mt(e, r, t)) {
|
|
843
869
|
for (var i = 0, a = $(e, t); a < e.length;) {
|
|
844
|
-
var o =
|
|
845
|
-
if (
|
|
870
|
+
var o = Tt(e, a);
|
|
871
|
+
if (Mt(e, a, o)) {
|
|
846
872
|
i++, a = $(e, o);
|
|
847
873
|
continue;
|
|
848
874
|
}
|
|
849
|
-
if (
|
|
875
|
+
if (jt(e, a, o), kt >= 4) {
|
|
850
876
|
for (var s = 0; s <= i; s++) n += "\n";
|
|
851
877
|
r = a;
|
|
852
878
|
break;
|
|
@@ -856,7 +882,7 @@ function Pt(e, t) {
|
|
|
856
882
|
if (r !== a) break;
|
|
857
883
|
continue;
|
|
858
884
|
}
|
|
859
|
-
if (
|
|
885
|
+
if (kt < 4) break;
|
|
860
886
|
let f = 0, m = 0;
|
|
861
887
|
var c = 0;
|
|
862
888
|
for (let n = r; n < t && m < 4; n++) {
|
|
@@ -874,7 +900,7 @@ function Pt(e, t) {
|
|
|
874
900
|
for (; n.length > 0 && n.charCodeAt(n.length - 1) === f;) n = n.slice(0, -1);
|
|
875
901
|
return n ? {
|
|
876
902
|
node: {
|
|
877
|
-
type:
|
|
903
|
+
type: q.codeBlock,
|
|
878
904
|
lang: void 0,
|
|
879
905
|
text: n,
|
|
880
906
|
infoString: void 0,
|
|
@@ -883,18 +909,18 @@ function Pt(e, t) {
|
|
|
883
909
|
end: r
|
|
884
910
|
} : null;
|
|
885
911
|
}
|
|
886
|
-
function
|
|
887
|
-
if (
|
|
888
|
-
let i = t +
|
|
912
|
+
function Rt(e, t, n, r) {
|
|
913
|
+
if (jt(e, t, Tt(e, t)), kt > 3) return null;
|
|
914
|
+
let i = t + At;
|
|
889
915
|
if (e.charCodeAt(i) !== _) return null;
|
|
890
916
|
let a = "", o = t, s, c = !1, d = !1, f = !1;
|
|
891
917
|
for (; o < e.length;) {
|
|
892
|
-
let t =
|
|
893
|
-
|
|
894
|
-
let n = o +
|
|
918
|
+
let t = Tt(e, o);
|
|
919
|
+
jt(e, o, t);
|
|
920
|
+
let n = o + At;
|
|
895
921
|
if (e.charCodeAt(n) === _) {
|
|
896
922
|
let r = n + 1;
|
|
897
|
-
var h =
|
|
923
|
+
var h = kt + 1, g = !1;
|
|
898
924
|
if (r < t) {
|
|
899
925
|
var y = e.charCodeAt(r);
|
|
900
926
|
y === l ? (r++, h++, g = !0) : y === u && (g = !0);
|
|
@@ -924,13 +950,13 @@ function Ft(e, t, n, r) {
|
|
|
924
950
|
a += x + "\n";
|
|
925
951
|
var N = x.trimStart();
|
|
926
952
|
N.startsWith("```") || N.startsWith("~~~") ? f = !f : x.startsWith(" ") || x.startsWith(" ") ? f = !0 : N.length > 0 && !f && (f = !1), d = N.length > 0, o = $(e, t);
|
|
927
|
-
} else if (a && !
|
|
928
|
-
if (
|
|
929
|
-
var P = o +
|
|
930
|
-
if (F === v || F === _ || F === p || F === m || F === T || (F === b || F === C || F === w) &&
|
|
931
|
-
if (F >=
|
|
932
|
-
for (var I = P; I < t && e.charCodeAt(I) >=
|
|
933
|
-
if (I < t && (e.charCodeAt(I) ===
|
|
953
|
+
} else if (a && !Mt(e, o, t) && d) {
|
|
954
|
+
if (kt < 4) {
|
|
955
|
+
var P = o + At, F = P < t ? e.charCodeAt(P) : 0;
|
|
956
|
+
if (F === v || F === _ || F === p || F === m || F === T || (F === b || F === C || F === w) && Ft(e, o) || (F === b || F === C || F === oe) && P + 1 < t && (e.charCodeAt(P + 1) === l || e.charCodeAt(P + 1) === u)) break;
|
|
957
|
+
if (F >= H && F <= U) {
|
|
958
|
+
for (var I = P; I < t && e.charCodeAt(I) >= H && e.charCodeAt(I) <= U;) I++;
|
|
959
|
+
if (I < t && (e.charCodeAt(I) === z || e.charCodeAt(I) === ue)) break;
|
|
934
960
|
}
|
|
935
961
|
}
|
|
936
962
|
if (f) break;
|
|
@@ -940,45 +966,45 @@ function Ft(e, t, n, r) {
|
|
|
940
966
|
if (!a && !s) return null;
|
|
941
967
|
var { inBlockQuote: ee, g: L } = n;
|
|
942
968
|
n.inBlockQuote = !0, c && (n.g = !0);
|
|
943
|
-
let R =
|
|
969
|
+
let R = Dn(a || "", n, r);
|
|
944
970
|
return n.inBlockQuote = ee, n.g = L, {
|
|
945
971
|
node: {
|
|
946
|
-
type:
|
|
972
|
+
type: q.blockQuote,
|
|
947
973
|
children: R,
|
|
948
974
|
alert: s || void 0
|
|
949
975
|
},
|
|
950
976
|
end: o
|
|
951
977
|
};
|
|
952
978
|
}
|
|
953
|
-
function
|
|
979
|
+
function zt(e, t, n) {
|
|
954
980
|
for (var r = 0, i = t; i < n; i++) e.charCodeAt(i) === u ? r += 4 - r % 4 : r++;
|
|
955
981
|
return r;
|
|
956
982
|
}
|
|
957
|
-
function
|
|
958
|
-
if (
|
|
959
|
-
var r = t +
|
|
983
|
+
function Bt(e, t, n) {
|
|
984
|
+
if (jt(e, t, n), kt > 3) return null;
|
|
985
|
+
var r = t + At;
|
|
960
986
|
if (r >= n) return null;
|
|
961
|
-
var i = e.charCodeAt(r), a =
|
|
987
|
+
var i = e.charCodeAt(r), a = kt, o = r;
|
|
962
988
|
if (i === b || i === C || i === oe) {
|
|
963
989
|
if (o = r + 1, o < n && e.charCodeAt(o) !== l && e.charCodeAt(o) !== u && e.charCodeAt(o) !== f) return null;
|
|
964
|
-
} else if (i >=
|
|
990
|
+
} else if (i >= H && i <= U) {
|
|
965
991
|
for (var s = r; s < n && s - r < 9;) {
|
|
966
992
|
var c = e.charCodeAt(s);
|
|
967
|
-
if (c <
|
|
993
|
+
if (c < H || c > U) break;
|
|
968
994
|
s++;
|
|
969
995
|
}
|
|
970
996
|
if (s > r && s < n) {
|
|
971
997
|
var d = e.charCodeAt(s);
|
|
972
|
-
if (d ===
|
|
998
|
+
if (d === z || d === ue) {
|
|
973
999
|
if (o = s + 1, o < n && e.charCodeAt(o) !== l && e.charCodeAt(o) !== u && e.charCodeAt(o) !== f) return null;
|
|
974
1000
|
} else return null;
|
|
975
1001
|
} else return null;
|
|
976
1002
|
} else return null;
|
|
977
|
-
var p = o, m =
|
|
1003
|
+
var p = o, m = zt(e, t, o), h = 0, g = p, _ = m;
|
|
978
1004
|
if (p >= n) return {
|
|
979
|
-
ordered: i >=
|
|
980
|
-
marker: i >=
|
|
981
|
-
start: i >=
|
|
1005
|
+
ordered: i >= H && i <= U,
|
|
1006
|
+
marker: i >= H && i <= U ? e[s] : e[r],
|
|
1007
|
+
start: i >= H && i <= U ? parseInt(e.slice(r, s), 10) : void 0,
|
|
982
1008
|
contentStart: p,
|
|
983
1009
|
contentCol: m + 1,
|
|
984
1010
|
markerCol: a,
|
|
@@ -993,24 +1019,24 @@ function Lt(e, t, n) {
|
|
|
993
1019
|
}
|
|
994
1020
|
var y = g >= n, x = _ - m;
|
|
995
1021
|
return y || x > 4 ? (_ = m + 1, g = p + 1, h = 1) : h === 0 && (_ = m + 1, g = p, h = 1), {
|
|
996
|
-
ordered: i >=
|
|
997
|
-
marker: i >=
|
|
998
|
-
start: i >=
|
|
1022
|
+
ordered: i >= H && i <= U,
|
|
1023
|
+
marker: i >= H && i <= U ? e[s] : e[r],
|
|
1024
|
+
start: i >= H && i <= U ? parseInt(e.slice(r, s), 10) : void 0,
|
|
999
1025
|
contentStart: g,
|
|
1000
1026
|
contentCol: _,
|
|
1001
1027
|
markerCol: a,
|
|
1002
1028
|
isEmpty: y
|
|
1003
1029
|
};
|
|
1004
1030
|
}
|
|
1005
|
-
var
|
|
1006
|
-
function
|
|
1031
|
+
var Vt = 0;
|
|
1032
|
+
function Ht(e, t, n, r) {
|
|
1007
1033
|
var i = 0, a = t;
|
|
1008
|
-
for (
|
|
1034
|
+
for (Vt = 0; a < n && i < r;) {
|
|
1009
1035
|
var o = e.charCodeAt(a);
|
|
1010
1036
|
if (o === u) {
|
|
1011
1037
|
var s = 4 - i % 4;
|
|
1012
1038
|
if (i + s > r) {
|
|
1013
|
-
|
|
1039
|
+
Vt = i + s - r, a++, i = r;
|
|
1014
1040
|
break;
|
|
1015
1041
|
}
|
|
1016
1042
|
i += s;
|
|
@@ -1020,8 +1046,8 @@ function zt(e, t, n, r) {
|
|
|
1020
1046
|
}
|
|
1021
1047
|
return a;
|
|
1022
1048
|
}
|
|
1023
|
-
function
|
|
1024
|
-
var i =
|
|
1049
|
+
function Ut(e, t, n, r) {
|
|
1050
|
+
var i = Tt(e, t), a = Bt(e, t, i);
|
|
1025
1051
|
if (!a) return null;
|
|
1026
1052
|
var o = [], s = t, c = a.contentCol, g = "", y = a.isEmpty, x = !1, S = !1;
|
|
1027
1053
|
if (!a.isEmpty) {
|
|
@@ -1030,7 +1056,7 @@ function Bt(e, t, n, r) {
|
|
|
1030
1056
|
break;
|
|
1031
1057
|
}
|
|
1032
1058
|
if (E) {
|
|
1033
|
-
var k = "", A =
|
|
1059
|
+
var k = "", A = zt(e, t, a.contentStart), j = A - a.contentCol;
|
|
1034
1060
|
if (j > 0) for (var M = 0; M < j; M++) k += " ";
|
|
1035
1061
|
for (var N = a.contentStart; N < i; N++) if (e.charCodeAt(N) === u) {
|
|
1036
1062
|
for (var P = 4 - A % 4, F = 0; F < P; F++) k += " ";
|
|
@@ -1040,11 +1066,11 @@ function Bt(e, t, n, r) {
|
|
|
1040
1066
|
} else g = e.slice(a.contentStart, i) + "\n";
|
|
1041
1067
|
}
|
|
1042
1068
|
for (s = $(e, i); s < e.length;) {
|
|
1043
|
-
var I =
|
|
1044
|
-
|
|
1045
|
-
var ee = e.charCodeAt(s +
|
|
1046
|
-
if (
|
|
1047
|
-
var L =
|
|
1069
|
+
var I = Tt(e, s);
|
|
1070
|
+
jt(e, s, I);
|
|
1071
|
+
var ee = e.charCodeAt(s + At);
|
|
1072
|
+
if (kt < c && (ee === b || ee === C || ee === w) && kt <= 3 && Ft(e, s)) break;
|
|
1073
|
+
var L = Bt(e, s, I);
|
|
1048
1074
|
if (L && L.ordered === a.ordered && L.marker === a.marker && L.markerCol < c) {
|
|
1049
1075
|
o.push({
|
|
1050
1076
|
contentCol: c,
|
|
@@ -1054,7 +1080,7 @@ function Bt(e, t, n, r) {
|
|
|
1054
1080
|
}), x && (S = !0), c = L.contentCol, y = L.isEmpty, x = !1, g = L.isEmpty ? "" : e.slice(L.contentStart, I) + "\n", s = $(e, I);
|
|
1055
1081
|
continue;
|
|
1056
1082
|
}
|
|
1057
|
-
if (
|
|
1083
|
+
if (Mt(e, s, I)) {
|
|
1058
1084
|
g += "\n", s = $(e, I);
|
|
1059
1085
|
for (var R = !1, te = 0; te < g.length; te++) {
|
|
1060
1086
|
var ne = g.charCodeAt(te);
|
|
@@ -1064,48 +1090,48 @@ function Bt(e, t, n, r) {
|
|
|
1064
1090
|
}
|
|
1065
1091
|
}
|
|
1066
1092
|
if (y && !R) if (s < e.length) {
|
|
1067
|
-
var re =
|
|
1068
|
-
if (!
|
|
1093
|
+
var re = Tt(e, s), z = Bt(e, s, re);
|
|
1094
|
+
if (!z || z.ordered !== a.ordered || z.marker !== a.marker) break;
|
|
1069
1095
|
x = !0;
|
|
1070
1096
|
} else break;
|
|
1071
1097
|
if (s < e.length) {
|
|
1072
|
-
var
|
|
1073
|
-
|
|
1074
|
-
var
|
|
1075
|
-
if ((
|
|
1076
|
-
var
|
|
1077
|
-
if (
|
|
1098
|
+
var ie = Tt(e, s);
|
|
1099
|
+
jt(e, s, ie);
|
|
1100
|
+
var B = e.charCodeAt(s + At);
|
|
1101
|
+
if ((B === b || B === C || B === w) && kt <= 3 && Ft(e, s)) break;
|
|
1102
|
+
var ae = Bt(e, s, ie);
|
|
1103
|
+
if (ae && ae.ordered === a.ordered && ae.marker === a.marker && ae.markerCol < c) {
|
|
1078
1104
|
x = !0;
|
|
1079
1105
|
continue;
|
|
1080
1106
|
}
|
|
1081
|
-
if (!
|
|
1107
|
+
if (!Mt(e, s, ie) && kt < c) break;
|
|
1082
1108
|
}
|
|
1083
1109
|
continue;
|
|
1084
1110
|
}
|
|
1085
|
-
if (
|
|
1086
|
-
var
|
|
1087
|
-
if (
|
|
1088
|
-
for (var
|
|
1089
|
-
for (var
|
|
1090
|
-
for (var
|
|
1091
|
-
|
|
1092
|
-
} else
|
|
1093
|
-
g +=
|
|
1094
|
-
} else g += e.slice(
|
|
1111
|
+
if (kt >= c) {
|
|
1112
|
+
var V = Ht(e, s, I, c);
|
|
1113
|
+
if (Vt > 0) {
|
|
1114
|
+
for (var se = "", ce = c, le = 0; le < Vt; le++) se += " ", ce++;
|
|
1115
|
+
for (var ue = V; ue < I; ue++) if (e.charCodeAt(ue) === u) {
|
|
1116
|
+
for (var de = 4 - ce % 4, fe = 0; fe < de; fe++) se += " ";
|
|
1117
|
+
ce += de;
|
|
1118
|
+
} else se += e[ue], ce++;
|
|
1119
|
+
g += se + "\n";
|
|
1120
|
+
} else g += e.slice(V, I) + "\n";
|
|
1095
1121
|
s = $(e, I);
|
|
1096
1122
|
continue;
|
|
1097
1123
|
}
|
|
1098
|
-
for (var
|
|
1099
|
-
var
|
|
1100
|
-
if (
|
|
1101
|
-
|
|
1124
|
+
for (var W = !1, G = 0; G < g.length; G++) {
|
|
1125
|
+
var K = g.charCodeAt(G);
|
|
1126
|
+
if (K !== f && K !== d && K !== l && K !== u) {
|
|
1127
|
+
W = !0;
|
|
1102
1128
|
break;
|
|
1103
1129
|
}
|
|
1104
1130
|
}
|
|
1105
|
-
if (!x &&
|
|
1106
|
-
var
|
|
1107
|
-
if (!(
|
|
1108
|
-
g += "" + e.slice(
|
|
1131
|
+
if (!x && W && !y) {
|
|
1132
|
+
var pe = s + At, me = e.charCodeAt(pe);
|
|
1133
|
+
if (!(me === v || me === _ || me === T || me === p || me === m || (me === b || me === C || me === w || me === oe) && (Ft(e, s) !== null || Bt(e, s, I) !== null) || me >= H && me <= U && Bt(e, s, I) !== null)) {
|
|
1134
|
+
g += "" + e.slice(pe, I) + "\n", s = $(e, I);
|
|
1109
1135
|
continue;
|
|
1110
1136
|
}
|
|
1111
1137
|
}
|
|
@@ -1117,69 +1143,69 @@ function Bt(e, t, n, r) {
|
|
|
1117
1143
|
hasBlankAfter: x,
|
|
1118
1144
|
isEmpty: y
|
|
1119
1145
|
}), o.length === 0) return null;
|
|
1120
|
-
var
|
|
1121
|
-
if (!
|
|
1122
|
-
if (o[
|
|
1123
|
-
|
|
1146
|
+
var he = S;
|
|
1147
|
+
if (!he) for (var ge = 0; ge < o.length; ge++) {
|
|
1148
|
+
if (o[ge].hasBlankAfter && ge < o.length - 1) {
|
|
1149
|
+
he = !0;
|
|
1124
1150
|
break;
|
|
1125
1151
|
}
|
|
1126
|
-
if (!o[
|
|
1127
|
-
for (var
|
|
1128
|
-
var Z =
|
|
1129
|
-
if (Z < 0 && (Z =
|
|
1130
|
-
|
|
1131
|
-
for (var we =
|
|
1132
|
-
Q >= Ce && we.slice(Q).trim() === "" && (
|
|
1152
|
+
if (!o[ge].isEmpty) {
|
|
1153
|
+
for (var _e = o[ge].raw, J = _e.length, Y = 0, ve = !1, ye = !1, be = !1, xe = !1, Se = 0, Ce = 0, X = -1; Y < J;) {
|
|
1154
|
+
var Z = _e.indexOf("\n", Y);
|
|
1155
|
+
if (Z < 0 && (Z = J), xe) {
|
|
1156
|
+
jt(_e, Y, Z);
|
|
1157
|
+
for (var we = _e.slice(Y + At, Z), Q = 0; Q < we.length && we.charCodeAt(Q) === Se;) Q++;
|
|
1158
|
+
Q >= Ce && we.slice(Q).trim() === "" && (xe = !1), Y = Z < J ? Z + 1 : J;
|
|
1133
1159
|
continue;
|
|
1134
1160
|
}
|
|
1135
|
-
if (
|
|
1136
|
-
X >= 0 ?
|
|
1161
|
+
if (Mt(_e, Y, Z)) {
|
|
1162
|
+
X >= 0 ? be = !0 : ve && (ye = !0), Y = Z < J ? Z + 1 : J;
|
|
1137
1163
|
continue;
|
|
1138
1164
|
}
|
|
1139
|
-
if (
|
|
1140
|
-
if (
|
|
1141
|
-
|
|
1165
|
+
if (jt(_e, Y, Z), X >= 0) {
|
|
1166
|
+
if (kt >= X) {
|
|
1167
|
+
Y = Z < J ? Z + 1 : J;
|
|
1142
1168
|
continue;
|
|
1143
1169
|
}
|
|
1144
|
-
var Te =
|
|
1170
|
+
var Te = Bt(_e, Y, Z);
|
|
1145
1171
|
if (Te && Te.markerCol < X && Te.contentCol <= X) {
|
|
1146
|
-
|
|
1172
|
+
Y = Z < J ? Z + 1 : J;
|
|
1147
1173
|
continue;
|
|
1148
1174
|
}
|
|
1149
1175
|
if (Te) {
|
|
1150
|
-
|
|
1176
|
+
Y = Z < J ? Z + 1 : J;
|
|
1151
1177
|
continue;
|
|
1152
1178
|
}
|
|
1153
|
-
X = -1,
|
|
1179
|
+
X = -1, be &&= (ye = !0, !1);
|
|
1154
1180
|
}
|
|
1155
|
-
var Ee =
|
|
1156
|
-
if ((De === p || De === m) &&
|
|
1181
|
+
var Ee = _e.slice(Y + At, Z), De = Ee.charCodeAt(0);
|
|
1182
|
+
if ((De === p || De === m) && kt <= 3) {
|
|
1157
1183
|
for (var Oe = 0; Oe < Ee.length && Ee.charCodeAt(Oe) === De;) Oe++;
|
|
1158
1184
|
if (Oe >= 3) {
|
|
1159
|
-
if (
|
|
1160
|
-
|
|
1185
|
+
if (ye && ve) {
|
|
1186
|
+
he = !0;
|
|
1161
1187
|
break;
|
|
1162
1188
|
}
|
|
1163
|
-
|
|
1189
|
+
xe = !0, Se = De, Ce = Oe, ve = !0, Y = Z < J ? Z + 1 : J;
|
|
1164
1190
|
continue;
|
|
1165
1191
|
}
|
|
1166
1192
|
}
|
|
1167
|
-
var ke =
|
|
1168
|
-
if (ke &&
|
|
1169
|
-
if (
|
|
1170
|
-
|
|
1193
|
+
var ke = kt <= 3 ? Bt(_e, Y, Z) : null;
|
|
1194
|
+
if (ke && ve) {
|
|
1195
|
+
if (ye) {
|
|
1196
|
+
he = !0;
|
|
1171
1197
|
break;
|
|
1172
1198
|
}
|
|
1173
|
-
X = ke.contentCol,
|
|
1199
|
+
X = ke.contentCol, be = !1, Y = Z < J ? Z + 1 : J, ve = !0;
|
|
1174
1200
|
continue;
|
|
1175
1201
|
}
|
|
1176
|
-
if (
|
|
1177
|
-
|
|
1202
|
+
if (ye) {
|
|
1203
|
+
he = !0;
|
|
1178
1204
|
break;
|
|
1179
1205
|
}
|
|
1180
|
-
|
|
1206
|
+
ve = !0, Y = Z < J ? Z + 1 : J;
|
|
1181
1207
|
}
|
|
1182
|
-
if (
|
|
1208
|
+
if (he) break;
|
|
1183
1209
|
}
|
|
1184
1210
|
}
|
|
1185
1211
|
for (var Ae = [], je = 0; je < o.length; je++) {
|
|
@@ -1188,20 +1214,20 @@ function Bt(e, t, n, r) {
|
|
|
1188
1214
|
if (Fe.length >= 3 && Fe.charCodeAt(0) === h) {
|
|
1189
1215
|
var Le = Fe[1];
|
|
1190
1216
|
(Le === " " || Le === "x" || Le === "X") && Fe.charCodeAt(2) === D && (Ie = {
|
|
1191
|
-
type:
|
|
1217
|
+
type: q.gfmTask,
|
|
1192
1218
|
completed: Le === "x" || Le === "X"
|
|
1193
1219
|
}, Fe = Fe.slice(3));
|
|
1194
1220
|
}
|
|
1195
1221
|
var Re;
|
|
1196
1222
|
if (Me.isEmpty && Fe.trim() === "") Re = [];
|
|
1197
|
-
else if (
|
|
1223
|
+
else if (he) {
|
|
1198
1224
|
var ze = n.inList;
|
|
1199
|
-
n.inList = !0, Re =
|
|
1225
|
+
n.inList = !0, Re = Dn(Fe, n, r), n.inList = ze;
|
|
1200
1226
|
} else {
|
|
1201
1227
|
var Be = n.inList;
|
|
1202
|
-
if (n.inList = !0, Re =
|
|
1228
|
+
if (n.inList = !0, Re = Dn(Fe, n, r), n.inList = Be, Re.length === 1 && Re[0].type === q.paragraph) Re = Re[0].children;
|
|
1203
1229
|
else {
|
|
1204
|
-
for (var Ve = [], He = 0; He < Re.length; He++) if (Re[He].type ===
|
|
1230
|
+
for (var Ve = [], He = 0; He < Re.length; He++) if (Re[He].type === q.paragraph) for (var Ue = Re[He].children, We = 0; We < Ue.length; We++) Ve.push(Ue[We]);
|
|
1205
1231
|
else Ve.push(Re[He]);
|
|
1206
1232
|
Re = Ve;
|
|
1207
1233
|
}
|
|
@@ -1209,7 +1235,7 @@ function Bt(e, t, n, r) {
|
|
|
1209
1235
|
Ae.push(Ie ? [
|
|
1210
1236
|
Ie,
|
|
1211
1237
|
{
|
|
1212
|
-
type:
|
|
1238
|
+
type: q.text,
|
|
1213
1239
|
text: " "
|
|
1214
1240
|
},
|
|
1215
1241
|
...Re
|
|
@@ -1217,15 +1243,15 @@ function Bt(e, t, n, r) {
|
|
|
1217
1243
|
}
|
|
1218
1244
|
return {
|
|
1219
1245
|
node: {
|
|
1220
|
-
type: a.ordered ?
|
|
1246
|
+
type: a.ordered ? q.orderedList : q.unorderedList,
|
|
1221
1247
|
start: a.ordered ? a.start : void 0,
|
|
1222
1248
|
items: Ae
|
|
1223
1249
|
},
|
|
1224
1250
|
end: s
|
|
1225
1251
|
};
|
|
1226
1252
|
}
|
|
1227
|
-
var
|
|
1228
|
-
function
|
|
1253
|
+
var Wt = new Set(/* @__PURE__ */ "address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul".split("."));
|
|
1254
|
+
function Gt(e, t, n) {
|
|
1229
1255
|
let r = {};
|
|
1230
1256
|
for (let [o, s] of Object.entries(e)) {
|
|
1231
1257
|
let e = o, c = o.toLowerCase();
|
|
@@ -1233,7 +1259,7 @@ function Ht(e, t, n) {
|
|
|
1233
1259
|
let t = {}, n = [], i = 0, a = 0;
|
|
1234
1260
|
for (let e = 0; e < s.length; e++) {
|
|
1235
1261
|
let t = s.charCodeAt(e);
|
|
1236
|
-
t ===
|
|
1262
|
+
t === le ? i++ : t === ue ? i-- : t === ne && i === 0 && (n.push(s.slice(a, e)), a = e + 1);
|
|
1237
1263
|
}
|
|
1238
1264
|
a < s.length && n.push(s.slice(a));
|
|
1239
1265
|
let o = !1;
|
|
@@ -1254,11 +1280,11 @@ function Ht(e, t, n) {
|
|
|
1254
1280
|
let i = n.sanitizer(s, t, c);
|
|
1255
1281
|
i !== null && (r[e] = i);
|
|
1256
1282
|
} else if (s === "") r[e] = !0;
|
|
1257
|
-
else if (s.length >= 2 && s.charCodeAt(0) ===
|
|
1283
|
+
else if (s.length >= 2 && s.charCodeAt(0) === se && s.charCodeAt(s.length - 1) === ce) {
|
|
1258
1284
|
var i = s.slice(1, -1);
|
|
1259
1285
|
if (i.length > 0) {
|
|
1260
1286
|
var a = i.charCodeAt(0);
|
|
1261
|
-
if (a === h || a ===
|
|
1287
|
+
if (a === h || a === se) try {
|
|
1262
1288
|
r[e] = JSON.parse(i);
|
|
1263
1289
|
continue;
|
|
1264
1290
|
} catch {}
|
|
@@ -1280,17 +1306,17 @@ function Ht(e, t, n) {
|
|
|
1280
1306
|
}
|
|
1281
1307
|
return r;
|
|
1282
1308
|
}
|
|
1283
|
-
function
|
|
1309
|
+
function Kt(e, t, n) {
|
|
1284
1310
|
let r = t.length;
|
|
1285
1311
|
if (r === 0) return n;
|
|
1286
1312
|
var i = t.charCodeAt(0);
|
|
1287
|
-
if (!(i >=
|
|
1313
|
+
if (!(i >= W && i <= G || i >= K && i <= pe)) {
|
|
1288
1314
|
for (var a = String.fromCharCode(i), o = e.length - r, s = n; s <= o;) {
|
|
1289
1315
|
var c = e.indexOf(a, s);
|
|
1290
1316
|
if (c === -1 || c > o) return -1;
|
|
1291
1317
|
for (var l = !0, u = 1; u < r; u++) {
|
|
1292
1318
|
var d = e.charCodeAt(c + u), f = t.charCodeAt(u);
|
|
1293
|
-
if (d >=
|
|
1319
|
+
if (d >= W && d <= G && (d += he), f >= W && f <= G && (f += he), d !== f) {
|
|
1294
1320
|
l = !1;
|
|
1295
1321
|
break;
|
|
1296
1322
|
}
|
|
@@ -1300,14 +1326,14 @@ function Ut(e, t, n) {
|
|
|
1300
1326
|
}
|
|
1301
1327
|
return -1;
|
|
1302
1328
|
}
|
|
1303
|
-
i >=
|
|
1329
|
+
i >= W && i <= G && (i += he);
|
|
1304
1330
|
for (let a = n; a <= e.length - r; a++) {
|
|
1305
1331
|
var p = e.charCodeAt(a);
|
|
1306
|
-
if (p >=
|
|
1332
|
+
if (p >= W && p <= G && (p += he), p !== i) continue;
|
|
1307
1333
|
let n = !0;
|
|
1308
1334
|
for (let i = 1; i < r; i++) {
|
|
1309
1335
|
let r = e.charCodeAt(a + i), o = t.charCodeAt(i);
|
|
1310
|
-
if (r >=
|
|
1336
|
+
if (r >= W && r <= G && (r += he), o >= W && o <= G && (o += he), r !== o) {
|
|
1311
1337
|
n = !1;
|
|
1312
1338
|
break;
|
|
1313
1339
|
}
|
|
@@ -1316,17 +1342,17 @@ function Ut(e, t, n) {
|
|
|
1316
1342
|
}
|
|
1317
1343
|
return -1;
|
|
1318
1344
|
}
|
|
1319
|
-
function
|
|
1345
|
+
function qt(e, t, n) {
|
|
1320
1346
|
let r = t.length;
|
|
1321
1347
|
var i = t.charCodeAt(0);
|
|
1322
|
-
i >=
|
|
1348
|
+
i >= W && i <= G && (i += he);
|
|
1323
1349
|
for (let o = Math.min(n, e.length - r); o >= 0; o--) {
|
|
1324
1350
|
var a = e.charCodeAt(o);
|
|
1325
|
-
if (a >=
|
|
1351
|
+
if (a >= W && a <= G && (a += he), a !== i) continue;
|
|
1326
1352
|
let n = !0;
|
|
1327
1353
|
for (let i = 1; i < r; i++) {
|
|
1328
1354
|
let r = e.charCodeAt(o + i), a = t.charCodeAt(i);
|
|
1329
|
-
if (r >=
|
|
1355
|
+
if (r >= W && r <= G && (r += he), a >= W && a <= G && (a += he), r !== a) {
|
|
1330
1356
|
n = !1;
|
|
1331
1357
|
break;
|
|
1332
1358
|
}
|
|
@@ -1335,19 +1361,19 @@ function Wt(e, t, n) {
|
|
|
1335
1361
|
}
|
|
1336
1362
|
return -1;
|
|
1337
1363
|
}
|
|
1338
|
-
var
|
|
1339
|
-
function
|
|
1364
|
+
var Jt = -1;
|
|
1365
|
+
function Yt(e, t, n) {
|
|
1340
1366
|
let r = n.toLowerCase(), i = "<" + r, a = "</" + r, o = 1, s = t, c = e.length;
|
|
1341
|
-
for (
|
|
1342
|
-
let t =
|
|
1367
|
+
for (Jt = -1; s < c && o > 0;) {
|
|
1368
|
+
let t = Kt(e, i, s), n = Kt(e, a, s);
|
|
1343
1369
|
if (n === -1) return -1;
|
|
1344
1370
|
if (t !== -1 && t < n) {
|
|
1345
|
-
let n =
|
|
1371
|
+
let n = pt(e, t);
|
|
1346
1372
|
n ? (n.tag.toLowerCase() === r && !n.isClosing && !n.selfClosing && !Te(n.tag) && o++, s = n.end) : s = t + 1;
|
|
1347
1373
|
} else {
|
|
1348
1374
|
var d = n + a.length, p = d < c ? e.charCodeAt(d) : 62;
|
|
1349
1375
|
if ((p === _ || p === l || p === u || p === f) && (o--, o === 0)) {
|
|
1350
|
-
|
|
1376
|
+
Jt = n;
|
|
1351
1377
|
let t = n + a.length;
|
|
1352
1378
|
for (; t < c && e.charCodeAt(t) !== _;) t++;
|
|
1353
1379
|
return t + 1;
|
|
@@ -1357,23 +1383,23 @@ function Kt(e, t, n) {
|
|
|
1357
1383
|
}
|
|
1358
1384
|
return -1;
|
|
1359
1385
|
}
|
|
1360
|
-
function
|
|
1386
|
+
function Xt(e, t, n, r) {
|
|
1361
1387
|
if (r.ignoreHTMLBlocks || r.disableParsingRawHTML) return null;
|
|
1362
|
-
var i =
|
|
1363
|
-
if (
|
|
1364
|
-
var a = t +
|
|
1388
|
+
var i = Tt(e, t);
|
|
1389
|
+
if (jt(e, t, i), kt > 3 && !n.inHTML) return null;
|
|
1390
|
+
var a = t + At;
|
|
1365
1391
|
if (e.charCodeAt(a) !== T) return null;
|
|
1366
1392
|
var o = e.indexOf(">", a + 1);
|
|
1367
1393
|
if (o !== -1 && o < i) {
|
|
1368
1394
|
var s = e.slice(a + 1, o);
|
|
1369
1395
|
if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s) || /^[^\s@]+@[^\s@]+$/.test(s)) return null;
|
|
1370
1396
|
}
|
|
1371
|
-
var c =
|
|
1397
|
+
var c = Zt(e, a);
|
|
1372
1398
|
if (c >= 1 && c <= 5) {
|
|
1373
1399
|
var d = e.length;
|
|
1374
1400
|
if (c === 1) {
|
|
1375
|
-
for (var p = e.length, m = 0; m <
|
|
1376
|
-
var h =
|
|
1401
|
+
for (var p = e.length, m = 0; m < nt.length; m++) {
|
|
1402
|
+
var h = Kt(e, "</" + nt[m] + ">", a);
|
|
1377
1403
|
h >= 0 && h < p && (p = h);
|
|
1378
1404
|
}
|
|
1379
1405
|
if (p < e.length) {
|
|
@@ -1387,19 +1413,18 @@ function qt(e, t, n, r) {
|
|
|
1387
1413
|
var b = e.slice(a, d);
|
|
1388
1414
|
if (c >= 2) return {
|
|
1389
1415
|
node: {
|
|
1390
|
-
type:
|
|
1416
|
+
type: q.htmlComment,
|
|
1391
1417
|
text: b,
|
|
1392
1418
|
h: !1,
|
|
1393
|
-
raw: !0
|
|
1394
|
-
endPos: d
|
|
1419
|
+
raw: !0
|
|
1395
1420
|
},
|
|
1396
1421
|
end: d
|
|
1397
1422
|
};
|
|
1398
1423
|
var x = "div", S = b.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);
|
|
1399
1424
|
S && (x = S[1]);
|
|
1400
|
-
var C =
|
|
1401
|
-
C && !C.isClosing && (w =
|
|
1402
|
-
var D = [], O =
|
|
1425
|
+
var C = pt(e, a), w = {}, E;
|
|
1426
|
+
C && !C.isClosing && (w = Gt(C.attrs, x, r), E = C.whitespaceBeforeAttrs + C.rawAttrs);
|
|
1427
|
+
var D = [], O = Kt(b, "</" + x.toLowerCase(), 0), k = b, A = "";
|
|
1403
1428
|
if (C && C.isClosing) for (k = b.slice(C.end - a); k.length > 0 && k.charCodeAt(k.length - 1) === f;) k = k.slice(0, -1);
|
|
1404
1429
|
else if (C && !C.isClosing) {
|
|
1405
1430
|
var j = C.end - a;
|
|
@@ -1409,7 +1434,7 @@ function qt(e, t, n, r) {
|
|
|
1409
1434
|
}
|
|
1410
1435
|
return {
|
|
1411
1436
|
node: {
|
|
1412
|
-
type:
|
|
1437
|
+
type: q.htmlBlock,
|
|
1413
1438
|
tag: x,
|
|
1414
1439
|
attrs: w,
|
|
1415
1440
|
f: E,
|
|
@@ -1417,119 +1442,113 @@ function qt(e, t, n, r) {
|
|
|
1417
1442
|
a: k,
|
|
1418
1443
|
text: A,
|
|
1419
1444
|
c: !0,
|
|
1420
|
-
b: C ? C.isClosing : !1
|
|
1421
|
-
endPos: d,
|
|
1422
|
-
e: !0
|
|
1445
|
+
b: C ? C.isClosing : !1
|
|
1423
1446
|
},
|
|
1424
1447
|
end: d
|
|
1425
1448
|
};
|
|
1426
1449
|
}
|
|
1427
1450
|
if (c === 6 || c === 7) {
|
|
1428
|
-
var M =
|
|
1451
|
+
var M = Dt(e, t), N = M < e.length ? M : e.length, P = e.slice(a, N), L = M < e.length ? $(e, M) : e.length, R = pt(e, a);
|
|
1429
1452
|
if (R) {
|
|
1430
1453
|
var te = R.tag, ne = te.toLowerCase();
|
|
1431
1454
|
if (R.isClosing) {
|
|
1432
1455
|
var re = e.slice(R.end, N);
|
|
1433
1456
|
return {
|
|
1434
1457
|
node: {
|
|
1435
|
-
type:
|
|
1458
|
+
type: q.htmlBlock,
|
|
1436
1459
|
tag: te,
|
|
1437
1460
|
attrs: {},
|
|
1438
1461
|
children: [],
|
|
1439
1462
|
a: re,
|
|
1440
1463
|
text: re,
|
|
1441
1464
|
c: !0,
|
|
1442
|
-
b: !0
|
|
1443
|
-
endPos: N,
|
|
1444
|
-
e: c === 6
|
|
1465
|
+
b: !0
|
|
1445
1466
|
},
|
|
1446
1467
|
end: L
|
|
1447
1468
|
};
|
|
1448
1469
|
}
|
|
1449
1470
|
if (R.selfClosing || Te(te)) return {
|
|
1450
1471
|
node: {
|
|
1451
|
-
type:
|
|
1472
|
+
type: q.htmlBlock,
|
|
1452
1473
|
tag: te,
|
|
1453
|
-
attrs:
|
|
1474
|
+
attrs: Gt(R.attrs, te, r),
|
|
1454
1475
|
f: R.whitespaceBeforeAttrs + R.rawAttrs,
|
|
1455
1476
|
children: [],
|
|
1456
1477
|
a: "",
|
|
1457
1478
|
text: "",
|
|
1458
1479
|
c: !1,
|
|
1459
|
-
b: !1
|
|
1460
|
-
endPos: R.end,
|
|
1461
|
-
e: c === 6
|
|
1480
|
+
b: !1
|
|
1462
1481
|
},
|
|
1463
1482
|
end: R.end < e.length && e.charCodeAt(R.end) === f ? R.end + 1 : R.end
|
|
1464
1483
|
};
|
|
1465
|
-
var
|
|
1466
|
-
if (
|
|
1467
|
-
for (var
|
|
1468
|
-
var
|
|
1469
|
-
if (
|
|
1470
|
-
if (
|
|
1471
|
-
var
|
|
1472
|
-
if (
|
|
1473
|
-
var
|
|
1474
|
-
(
|
|
1484
|
+
var z = n.d || 0, B = e.slice(a, N), ae = -1, oe = -1;
|
|
1485
|
+
if (z < 10) {
|
|
1486
|
+
for (var V = "</" + ne, se = R.end - a, ce = 1, le = se; le < B.length && ce > 0;) {
|
|
1487
|
+
var ue = Kt(B, "<" + ne, le), de = Kt(B, V, le);
|
|
1488
|
+
if (de === -1) break;
|
|
1489
|
+
if (ue !== -1 && ue < de) {
|
|
1490
|
+
var fe = ue + ne.length + 1;
|
|
1491
|
+
if (fe < B.length) {
|
|
1492
|
+
var H = B.charCodeAt(fe);
|
|
1493
|
+
(H === l || H === u || H === f || H === _ || H === ie) && ce++;
|
|
1475
1494
|
}
|
|
1476
|
-
|
|
1495
|
+
le = ue + 1;
|
|
1477
1496
|
} else {
|
|
1478
|
-
var
|
|
1479
|
-
if (
|
|
1480
|
-
var
|
|
1481
|
-
if ((
|
|
1482
|
-
|
|
1483
|
-
for (var
|
|
1484
|
-
oe =
|
|
1497
|
+
var U = de + V.length;
|
|
1498
|
+
if (U < B.length) {
|
|
1499
|
+
var K = B.charCodeAt(U);
|
|
1500
|
+
if ((K === _ || K === l || K === u || K === f) && (ce--, ce === 0)) {
|
|
1501
|
+
ae = de;
|
|
1502
|
+
for (var pe = U; pe < B.length && B.charCodeAt(pe) !== _;) pe++;
|
|
1503
|
+
oe = pe + 1;
|
|
1485
1504
|
break;
|
|
1486
1505
|
}
|
|
1487
|
-
} else if (
|
|
1488
|
-
|
|
1506
|
+
} else if (ce--, ce === 0) {
|
|
1507
|
+
ae = de, oe = B.length;
|
|
1489
1508
|
break;
|
|
1490
1509
|
}
|
|
1491
|
-
|
|
1510
|
+
le = de + 1;
|
|
1492
1511
|
}
|
|
1493
1512
|
}
|
|
1494
|
-
var
|
|
1495
|
-
if (
|
|
1496
|
-
var
|
|
1497
|
-
if (
|
|
1498
|
-
for (var
|
|
1499
|
-
var Ce = e.charCodeAt(
|
|
1500
|
-
if (Ce === f)
|
|
1501
|
-
else if (Ce === l || Ce === u)
|
|
1513
|
+
var me = !1;
|
|
1514
|
+
if (ae === -1 && c === 6 && !R.isClosing) {
|
|
1515
|
+
var he = Yt(e, R.end, ne);
|
|
1516
|
+
if (he !== -1) {
|
|
1517
|
+
for (var ge = Jt, _e = R.end, J = !1, Y = !1, ve = !1, ye = 0, be = !1, xe = !1, Se = _e; Se < ge;) {
|
|
1518
|
+
var Ce = e.charCodeAt(Se);
|
|
1519
|
+
if (Ce === f) xe && (J = !0), be || ye++, xe = !0, Se++;
|
|
1520
|
+
else if (Ce === l || Ce === u) Se++;
|
|
1502
1521
|
else {
|
|
1503
|
-
if (!
|
|
1504
|
-
|
|
1522
|
+
if (!be && (be = !0, ye >= 2 && Ce === T)) {
|
|
1523
|
+
ve = !0;
|
|
1505
1524
|
break;
|
|
1506
1525
|
}
|
|
1507
|
-
if (
|
|
1508
|
-
var X = e.charCodeAt(
|
|
1509
|
-
if ((X === I || X === ee || X === F) && (
|
|
1510
|
-
|
|
1526
|
+
if (xe = !1, Ce === T) {
|
|
1527
|
+
var X = e.charCodeAt(Se + 1) | 32;
|
|
1528
|
+
if ((X === I || X === ee || X === F) && (at.lastIndex = Se, at.test(e))) {
|
|
1529
|
+
Y = !0;
|
|
1511
1530
|
break;
|
|
1512
1531
|
}
|
|
1513
1532
|
}
|
|
1514
|
-
|
|
1533
|
+
Se++;
|
|
1515
1534
|
}
|
|
1516
1535
|
}
|
|
1517
|
-
if (
|
|
1518
|
-
var Z =
|
|
1519
|
-
N = Z, L = $(e, Z),
|
|
1536
|
+
if (J && !ve && !Y) {
|
|
1537
|
+
var Z = Tt(e, he);
|
|
1538
|
+
N = Z, L = $(e, Z), B = e.slice(a, N), P = e.slice(a, N), ae = ge - a, oe = he - a, me = !0;
|
|
1520
1539
|
}
|
|
1521
1540
|
}
|
|
1522
1541
|
}
|
|
1523
1542
|
}
|
|
1524
1543
|
var we = R.rawAttrs.indexOf("\n") !== -1 || R.whitespaceBeforeAttrs.indexOf("\n") !== -1, Q = !1;
|
|
1525
|
-
|
|
1544
|
+
ae !== -1 && (Q = B.slice(oe).trim().length === 0);
|
|
1526
1545
|
var Ee = !1, De = N, Oe = L;
|
|
1527
|
-
if (
|
|
1528
|
-
var ke = a + oe, Ae =
|
|
1546
|
+
if (ae !== -1) {
|
|
1547
|
+
var ke = a + oe, Ae = Tt(e, ke - 1);
|
|
1529
1548
|
if (ke < Ae) {
|
|
1530
1549
|
for (var je = ke; je < Ae && (e.charCodeAt(je) === l || e.charCodeAt(je) === u);) je++;
|
|
1531
1550
|
if (je < Ae && e.charCodeAt(je) === T) {
|
|
1532
|
-
var Me =
|
|
1551
|
+
var Me = pt(e, je);
|
|
1533
1552
|
Me && !Me.isClosing && (Ee = !0, De = ke, Oe = ke, Q = !0);
|
|
1534
1553
|
}
|
|
1535
1554
|
}
|
|
@@ -1537,212 +1556,202 @@ function qt(e, t, n, r) {
|
|
|
1537
1556
|
var Ne = $(e, Ae);
|
|
1538
1557
|
if (Ne < N) {
|
|
1539
1558
|
for (var Pe = Ne; Pe < N && (e.charCodeAt(Pe) === l || e.charCodeAt(Pe) === u);) Pe++;
|
|
1540
|
-
Pe < N && e.charCodeAt(Pe) === T &&
|
|
1559
|
+
Pe < N && e.charCodeAt(Pe) === T && pt(e, Pe) && (Ee = !0, De = Ae, Oe = Ne, Q = !0);
|
|
1541
1560
|
}
|
|
1542
1561
|
}
|
|
1543
1562
|
!Ee && n.inHTML && (Ee = !0, De = Ae, Oe = $(e, Ae), Q = e.slice(ke, Ae).trim().length === 0);
|
|
1544
1563
|
}
|
|
1545
1564
|
var Fe = [], Ie = "";
|
|
1546
|
-
if (
|
|
1547
|
-
Ie =
|
|
1565
|
+
if (ae !== -1) {
|
|
1566
|
+
Ie = B.slice(R.end - a, ae);
|
|
1548
1567
|
var Le = Ie.trim();
|
|
1549
1568
|
if (Le) {
|
|
1550
1569
|
var { inline: Re, inHTML: ze, d: Be } = n;
|
|
1551
|
-
if (n.inHTML = !0, n.d =
|
|
1570
|
+
if (n.inHTML = !0, n.d = z + 1, ne === "p") n.inline = !0, Fe = Tn(Le, 0, Le.length, n, r);
|
|
1552
1571
|
else {
|
|
1553
|
-
var Ve = Ie.indexOf("\n\n") !== -1, He =
|
|
1572
|
+
var Ve = Ie.indexOf("\n\n") !== -1, He = ot.test(Le), Ue = st.test(Le), We = Ve || He || n.inHTML && Ue;
|
|
1554
1573
|
Ie.length >= 2 && Ie.charCodeAt(0) === f && Ie.charCodeAt(Ie.length - 1) === f && !Ve && !He && !Ue ? Fe = [{
|
|
1555
|
-
type:
|
|
1574
|
+
type: q.text,
|
|
1556
1575
|
text: Le
|
|
1557
|
-
}] : We || Ue ? (n.inline = !1, Fe =
|
|
1576
|
+
}] : We || Ue ? (n.inline = !1, Fe = Dn(Ie, n, r)) : (n.inline = !0, Fe = Tn(Le, 0, Le.length, n, r));
|
|
1558
1577
|
}
|
|
1559
1578
|
n.inline = Re, n.inHTML = ze, n.d = Be;
|
|
1560
1579
|
}
|
|
1561
1580
|
}
|
|
1562
1581
|
var Ge = !1;
|
|
1563
|
-
if (c === 6 &&
|
|
1582
|
+
if (c === 6 && ae !== -1 && !n.inHTML && !we) {
|
|
1564
1583
|
var Ke = Ie, qe = /<[a-zA-Z][^>]*>/.test(Ke), Je = /\n\n/.test(Ke) || /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(Ke);
|
|
1565
1584
|
qe && !Je && (Ge = !0);
|
|
1566
1585
|
}
|
|
1567
|
-
if (!
|
|
1568
|
-
var Ye;
|
|
1569
|
-
if (
|
|
1570
|
-
var
|
|
1571
|
-
if (n.inHTML && oe <
|
|
1572
|
-
for (var
|
|
1573
|
-
var
|
|
1574
|
-
|
|
1586
|
+
if (!me && (n.inHTML || c === 7 || we || !Q || Ge)) {
|
|
1587
|
+
var Ye, Xe = !1;
|
|
1588
|
+
if (ae !== -1 && Ee) {
|
|
1589
|
+
var Ze = !1;
|
|
1590
|
+
if (n.inHTML && oe < B.length) {
|
|
1591
|
+
for (var Qe = oe; Qe < B.length && B.charCodeAt(Qe) !== f;) Qe++;
|
|
1592
|
+
var $e = B.slice(oe, Qe).trim();
|
|
1593
|
+
Ze = $e.length > 1 && $e.charCodeAt(0) === T && $e.charCodeAt(1) !== ie;
|
|
1575
1594
|
}
|
|
1576
|
-
Ye =
|
|
1577
|
-
} else (c === 7 || n.inHTML) &&
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
},
|
|
1595
|
+
Ye = Ze ? B.slice(R.end - a) : Ie, Xe = !0;
|
|
1596
|
+
} else (c === 7 || n.inHTML) && ae !== -1 ? (Ye = B.slice(R.end - a), Ye.charCodeAt(0) === f && (Ye = Ye.slice(1))) : Ee ? Ye = e.slice(a, De) : we ? Ye = P : (Ye = B.slice(R.end - a), Ye.charCodeAt(0) === f && (Ye = Ye.slice(1)));
|
|
1597
|
+
var et = {
|
|
1598
|
+
type: q.htmlBlock,
|
|
1599
|
+
tag: te,
|
|
1600
|
+
attrs: Gt(R.attrs, te, r),
|
|
1601
|
+
f: R.whitespaceBeforeAttrs + R.rawAttrs,
|
|
1602
|
+
children: Fe,
|
|
1603
|
+
a: Ye,
|
|
1604
|
+
text: Ye,
|
|
1605
|
+
c: !0,
|
|
1606
|
+
b: !1
|
|
1607
|
+
};
|
|
1608
|
+
return Xe && (et.k = !0), {
|
|
1609
|
+
node: et,
|
|
1592
1610
|
end: Oe
|
|
1593
1611
|
};
|
|
1594
1612
|
}
|
|
1595
1613
|
return {
|
|
1596
1614
|
node: {
|
|
1597
|
-
type:
|
|
1615
|
+
type: q.htmlBlock,
|
|
1598
1616
|
tag: te,
|
|
1599
|
-
attrs:
|
|
1617
|
+
attrs: Gt(R.attrs, te, r),
|
|
1600
1618
|
f: R.whitespaceBeforeAttrs + R.rawAttrs,
|
|
1601
1619
|
children: Fe,
|
|
1602
|
-
a:
|
|
1620
|
+
a: me ? "" : Ie,
|
|
1603
1621
|
text: Ie,
|
|
1604
1622
|
c: !1,
|
|
1605
|
-
b: !1
|
|
1606
|
-
endPos: De,
|
|
1607
|
-
e: c === 6
|
|
1623
|
+
b: !1
|
|
1608
1624
|
},
|
|
1609
1625
|
end: Oe
|
|
1610
1626
|
};
|
|
1611
1627
|
}
|
|
1612
|
-
var tt = P.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/),
|
|
1613
|
-
if (
|
|
1614
|
-
var
|
|
1615
|
-
|
|
1628
|
+
var tt = P.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/), it = tt ? tt[2] : "div", ct = tt ? tt[1] === "/" : !1, lt = P;
|
|
1629
|
+
if (ct) {
|
|
1630
|
+
var ut = P.indexOf(">");
|
|
1631
|
+
ut !== -1 && (lt = P.slice(ut + 1));
|
|
1616
1632
|
}
|
|
1617
1633
|
return {
|
|
1618
1634
|
node: {
|
|
1619
|
-
type:
|
|
1620
|
-
tag:
|
|
1635
|
+
type: q.htmlBlock,
|
|
1636
|
+
tag: it,
|
|
1621
1637
|
attrs: {},
|
|
1622
1638
|
children: [],
|
|
1623
|
-
a:
|
|
1624
|
-
text:
|
|
1639
|
+
a: lt,
|
|
1640
|
+
text: lt,
|
|
1625
1641
|
c: !0,
|
|
1626
|
-
b:
|
|
1627
|
-
endPos: N,
|
|
1628
|
-
e: c === 6
|
|
1642
|
+
b: ct
|
|
1629
1643
|
},
|
|
1630
1644
|
end: L
|
|
1631
1645
|
};
|
|
1632
1646
|
}
|
|
1633
|
-
var
|
|
1634
|
-
if (!
|
|
1635
|
-
var
|
|
1636
|
-
if (!
|
|
1637
|
-
if (
|
|
1647
|
+
var dt = pt(e, a);
|
|
1648
|
+
if (!dt) return null;
|
|
1649
|
+
var ft = dt.tag, mt = ft.toLowerCase(), ht = ft.charCodeAt(0), gt = ht >= W && ht <= G;
|
|
1650
|
+
if (!gt && !Wt.has(mt) && !rt.has(mt) && !mt.includes("-")) return null;
|
|
1651
|
+
if (dt.isClosing) return {
|
|
1638
1652
|
node: {
|
|
1639
|
-
type:
|
|
1640
|
-
tag:
|
|
1653
|
+
type: q.htmlSelfClosing,
|
|
1654
|
+
tag: ft,
|
|
1641
1655
|
attrs: {},
|
|
1642
|
-
a: e.slice(a,
|
|
1643
|
-
b: !0
|
|
1644
|
-
endPos: lt.end
|
|
1656
|
+
a: e.slice(a, dt.end),
|
|
1657
|
+
b: !0
|
|
1645
1658
|
},
|
|
1646
|
-
end:
|
|
1659
|
+
end: dt.end
|
|
1647
1660
|
};
|
|
1648
|
-
var
|
|
1649
|
-
if (
|
|
1650
|
-
var
|
|
1651
|
-
if (
|
|
1652
|
-
var
|
|
1653
|
-
n.inHTML = !0, n.d = (n.d || 0) + 1,
|
|
1654
|
-
}
|
|
1655
|
-
var
|
|
1661
|
+
var _t = Yt(e, dt.end, ft), vt = [];
|
|
1662
|
+
if (_t !== -1) {
|
|
1663
|
+
var yt = e.slice(dt.end, Jt), bt = yt.trim();
|
|
1664
|
+
if (bt) {
|
|
1665
|
+
var xt = yt.indexOf("\n\n") !== -1, St = ot.test(bt), Ct = st.test(bt), wt = n.inline, Et = n.inHTML, Ot = n.d;
|
|
1666
|
+
n.inHTML = !0, n.d = (n.d || 0) + 1, xt || St || Ct ? (n.inline = !1, vt = Dn(yt, n, r)) : (n.inline = !0, vt = Tn(bt, 0, bt.length, n, r)), n.inline = wt, n.inHTML = Et, n.d = Ot;
|
|
1667
|
+
}
|
|
1668
|
+
var Mt = Tt(e, _t), Nt = e.slice(_t, Mt).trim() ? _t : $(e, _t), Pt = gt ? e.slice(a, _t) : e.slice(a, Nt);
|
|
1656
1669
|
return {
|
|
1657
1670
|
node: {
|
|
1658
|
-
type:
|
|
1659
|
-
tag:
|
|
1660
|
-
attrs:
|
|
1661
|
-
f:
|
|
1662
|
-
children:
|
|
1663
|
-
a:
|
|
1664
|
-
text:
|
|
1671
|
+
type: q.htmlBlock,
|
|
1672
|
+
tag: ft,
|
|
1673
|
+
attrs: Gt(dt.attrs, ft, r),
|
|
1674
|
+
f: dt.whitespaceBeforeAttrs + dt.rawAttrs,
|
|
1675
|
+
children: vt,
|
|
1676
|
+
a: Pt,
|
|
1677
|
+
text: gt ? yt : Pt,
|
|
1665
1678
|
c: !0,
|
|
1666
|
-
b: !1
|
|
1667
|
-
endPos: Nt,
|
|
1668
|
-
e: !1
|
|
1679
|
+
b: !1
|
|
1669
1680
|
},
|
|
1670
|
-
end:
|
|
1681
|
+
end: Nt
|
|
1671
1682
|
};
|
|
1672
1683
|
}
|
|
1673
|
-
var
|
|
1674
|
-
if (
|
|
1675
|
-
var { inline:
|
|
1676
|
-
n.inline = !1, n.inHTML = !0, n.d = (n.d || 0) + 1,
|
|
1684
|
+
var Ft = Dt(e, dt.end), It = Ft < e.length ? $(e, Ft) : Ft, Lt = e.slice(dt.end, Ft);
|
|
1685
|
+
if (Lt.trim()) {
|
|
1686
|
+
var { inline: Rt, inHTML: zt, d: Bt } = n;
|
|
1687
|
+
n.inline = !1, n.inHTML = !0, n.d = (n.d || 0) + 1, vt = Dn(Lt, n, r), n.inline = Rt, n.inHTML = zt, n.d = Bt;
|
|
1677
1688
|
}
|
|
1678
|
-
var
|
|
1689
|
+
var Vt = e.slice(dt.end, Ft);
|
|
1679
1690
|
return {
|
|
1680
1691
|
node: {
|
|
1681
|
-
type:
|
|
1682
|
-
tag:
|
|
1683
|
-
attrs:
|
|
1684
|
-
f:
|
|
1685
|
-
children:
|
|
1686
|
-
a:
|
|
1687
|
-
text:
|
|
1692
|
+
type: q.htmlBlock,
|
|
1693
|
+
tag: ft,
|
|
1694
|
+
attrs: Gt(dt.attrs, ft, r),
|
|
1695
|
+
f: dt.whitespaceBeforeAttrs + dt.rawAttrs,
|
|
1696
|
+
children: vt,
|
|
1697
|
+
a: Vt,
|
|
1698
|
+
text: Lt,
|
|
1688
1699
|
c: !0,
|
|
1689
|
-
b: !1
|
|
1690
|
-
endPos: Pt,
|
|
1691
|
-
e: !1
|
|
1700
|
+
b: !1
|
|
1692
1701
|
},
|
|
1693
|
-
end:
|
|
1702
|
+
end: It
|
|
1694
1703
|
};
|
|
1695
1704
|
}
|
|
1696
|
-
function
|
|
1705
|
+
function Zt(e, t) {
|
|
1697
1706
|
if (e.charCodeAt(t) !== T) return 0;
|
|
1698
1707
|
var n = t + 1, r = e.length;
|
|
1699
1708
|
if (e.charCodeAt(n) === O && e.charCodeAt(n + 1) === b && e.charCodeAt(n + 2) === b) return 2;
|
|
1700
1709
|
if (e.charCodeAt(n) === re) return 3;
|
|
1701
1710
|
if (e.charCodeAt(n) === O) {
|
|
1702
1711
|
var i = e.charCodeAt(n + 1);
|
|
1703
|
-
if (i >=
|
|
1712
|
+
if (i >= W && i <= G) return 4;
|
|
1704
1713
|
if (e.slice(n + 1, n + 8) === "[CDATA[") return 5;
|
|
1705
1714
|
}
|
|
1706
|
-
for (var a = e.charCodeAt(n) ===
|
|
1715
|
+
for (var a = e.charCodeAt(n) === ie, o = a ? n + 1 : n, s = o; s < r;) {
|
|
1707
1716
|
var c = e.charCodeAt(s);
|
|
1708
|
-
if (c >=
|
|
1717
|
+
if (c >= W && c <= G || c >= K && c <= pe || c >= H && c <= U || c === b) s++;
|
|
1709
1718
|
else break;
|
|
1710
1719
|
}
|
|
1711
1720
|
if (s === o) return 0;
|
|
1712
1721
|
var d = e.slice(o, s);
|
|
1713
|
-
if (
|
|
1722
|
+
if (rt.has(d.toLowerCase())) {
|
|
1714
1723
|
if (a) return 0;
|
|
1715
1724
|
var p = e.charCodeAt(s);
|
|
1716
1725
|
return +(p === l || p === u || p === _ || p === f || s >= r);
|
|
1717
1726
|
}
|
|
1718
|
-
if (
|
|
1727
|
+
if (Wt.has(d.toLowerCase())) {
|
|
1719
1728
|
if (a) {
|
|
1720
1729
|
for (var m = s; m < r && (e.charCodeAt(m) === l || e.charCodeAt(m) === u);) m++;
|
|
1721
1730
|
return m < r && e.charCodeAt(m) === _ ? 6 : 0;
|
|
1722
1731
|
}
|
|
1723
1732
|
var h = s < r ? e.charCodeAt(s) : -1;
|
|
1724
|
-
return h === l || h === u || h === _ || h === f || h ===
|
|
1733
|
+
return h === l || h === u || h === _ || h === f || h === ie || h === -1 ? 6 : 0;
|
|
1725
1734
|
}
|
|
1726
1735
|
if (a) {
|
|
1727
1736
|
for (var g = s; g < r && (e.charCodeAt(g) === l || e.charCodeAt(g) === u);) g++;
|
|
1728
1737
|
if (g < r && e.charCodeAt(g) === _) {
|
|
1729
|
-
var v =
|
|
1738
|
+
var v = Tt(e, t);
|
|
1730
1739
|
if (e.slice(g + 1, v).trim() === "") return 7;
|
|
1731
1740
|
}
|
|
1732
1741
|
} else {
|
|
1733
|
-
var y =
|
|
1742
|
+
var y = Tt(e, t), x = pt(e, t);
|
|
1734
1743
|
if (x && x.end <= y && e.slice(x.end, y).trim() === "") return 7;
|
|
1735
1744
|
}
|
|
1736
1745
|
return 0;
|
|
1737
1746
|
}
|
|
1738
|
-
function
|
|
1747
|
+
function Qt(e, t, n) {
|
|
1739
1748
|
for (var r = 0, i = e.length; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
|
|
1740
1749
|
for (; i > r && (e.charCodeAt(i - 1) === l || e.charCodeAt(i - 1) === u);) i--;
|
|
1741
|
-
r < i && e.charCodeAt(r) ===
|
|
1750
|
+
r < i && e.charCodeAt(r) === V && r++, i > r && e.charCodeAt(i - 1) === V && (i - 2 < r || e.charCodeAt(i - 2) !== S) && i--;
|
|
1742
1751
|
for (var a = [], o = r, s = !1, c = [], d = r; d < i;) {
|
|
1743
1752
|
var f = e.charCodeAt(d);
|
|
1744
1753
|
if (f === S && d + 1 < i) {
|
|
1745
|
-
e.charCodeAt(d + 1) ===
|
|
1754
|
+
e.charCodeAt(d + 1) === V ? (s || (s = !0, c = []), c.push(e.slice(o, d)), c.push("|"), d += 2, o = d) : d += 2;
|
|
1746
1755
|
continue;
|
|
1747
1756
|
}
|
|
1748
1757
|
if (f === p) {
|
|
@@ -1753,7 +1762,7 @@ function Yt(e, t, n) {
|
|
|
1753
1762
|
}
|
|
1754
1763
|
continue;
|
|
1755
1764
|
}
|
|
1756
|
-
if (f ===
|
|
1765
|
+
if (f === V) {
|
|
1757
1766
|
var _ = s ? (c.push(e.slice(o, d)), c.join("")) : e.slice(o, d);
|
|
1758
1767
|
a.push(_.trim()), d++, o = d, s = !1, c = [];
|
|
1759
1768
|
continue;
|
|
@@ -1763,50 +1772,50 @@ function Yt(e, t, n) {
|
|
|
1763
1772
|
var v = s ? (c.push(e.slice(o, i)), c.join("")) : e.slice(o, i);
|
|
1764
1773
|
return a.push(v.trim()), a.map(function(e) {
|
|
1765
1774
|
var r = e.indexOf("\\|") === -1 ? e : e.replace(/\\\|/g, "|");
|
|
1766
|
-
return
|
|
1775
|
+
return Tn(r, 0, r.length, t, n);
|
|
1767
1776
|
});
|
|
1768
1777
|
}
|
|
1769
|
-
function
|
|
1770
|
-
let i =
|
|
1778
|
+
function $t(e, t, n, r) {
|
|
1779
|
+
let i = Tt(e, t);
|
|
1771
1780
|
var a = e.indexOf("|", t);
|
|
1772
1781
|
if (a < 0 || a >= i) return null;
|
|
1773
1782
|
let o = $(e, i);
|
|
1774
1783
|
if (o >= e.length) return null;
|
|
1775
|
-
let s =
|
|
1776
|
-
if (!
|
|
1784
|
+
let s = Tt(e, o);
|
|
1785
|
+
if (!ft(e, o, s)) return null;
|
|
1777
1786
|
let c = e.slice(t, i), d = e.slice(o, s);
|
|
1778
1787
|
for (var f = [], h = 0, g = d.length; h < g && (d.charCodeAt(h) === l || d.charCodeAt(h) === u);) h++;
|
|
1779
|
-
for (h < g && d.charCodeAt(h) ===
|
|
1788
|
+
for (h < g && d.charCodeAt(h) === V && h++; h < g;) {
|
|
1780
1789
|
for (; h < g && (d.charCodeAt(h) === l || d.charCodeAt(h) === u);) h++;
|
|
1781
|
-
if (h >= g || d.charCodeAt(h) ===
|
|
1790
|
+
if (h >= g || d.charCodeAt(h) === V) break;
|
|
1782
1791
|
var y = d.charCodeAt(h) === A;
|
|
1783
1792
|
for (y && h++; h < g && d.charCodeAt(h) === b;) h++;
|
|
1784
1793
|
var x = h < g && d.charCodeAt(h) === A;
|
|
1785
1794
|
for (x && h++, f.push(y && x ? "center" : x ? "right" : y ? "left" : null); h < g && (d.charCodeAt(h) === l || d.charCodeAt(h) === u);) h++;
|
|
1786
|
-
h < g && d.charCodeAt(h) ===
|
|
1795
|
+
h < g && d.charCodeAt(h) === V && h++;
|
|
1787
1796
|
}
|
|
1788
|
-
let S =
|
|
1797
|
+
let S = Qt(c, n, r);
|
|
1789
1798
|
if (f.length !== S.length) return null;
|
|
1790
1799
|
let T = [], E = $(e, s);
|
|
1791
1800
|
for (; E < e.length;) {
|
|
1792
|
-
let t =
|
|
1793
|
-
if (
|
|
1794
|
-
if (
|
|
1795
|
-
var D = e.charCodeAt(E +
|
|
1796
|
-
if (D === _ || D === v || (D === b || D === C || D === w) &&
|
|
1801
|
+
let t = Tt(e, E), i = e.slice(E, t);
|
|
1802
|
+
if (Mt(e, E, t)) break;
|
|
1803
|
+
if (jt(e, E, t), kt < 4) {
|
|
1804
|
+
var D = e.charCodeAt(E + At);
|
|
1805
|
+
if (D === _ || D === v || (D === b || D === C || D === w) && Ft(e, E)) break;
|
|
1797
1806
|
if (D === p || D === m) {
|
|
1798
|
-
for (var O = E +
|
|
1807
|
+
for (var O = E + At, k = 0; O < t && e.charCodeAt(O) === D;) k++, O++;
|
|
1799
1808
|
if (k >= 3) break;
|
|
1800
1809
|
}
|
|
1801
1810
|
}
|
|
1802
|
-
T.push(
|
|
1811
|
+
T.push(Qt(i, n, r)), E = $(e, t);
|
|
1803
1812
|
}
|
|
1804
|
-
if (
|
|
1813
|
+
if (r.optimizeForStreaming && T.length === 0) return null;
|
|
1805
1814
|
for (var j = S.length, M = 0; M < T.length; M++) if (T[M].length < j) for (; T[M].length < j;) T[M].push([]);
|
|
1806
1815
|
else T[M].length > j && (T[M].length = j);
|
|
1807
1816
|
return {
|
|
1808
1817
|
node: {
|
|
1809
|
-
type:
|
|
1818
|
+
type: q.table,
|
|
1810
1819
|
header: S,
|
|
1811
1820
|
cells: T,
|
|
1812
1821
|
align: f
|
|
@@ -1814,19 +1823,19 @@ function Xt(e, t, n, r) {
|
|
|
1814
1823
|
end: E
|
|
1815
1824
|
};
|
|
1816
1825
|
}
|
|
1817
|
-
function
|
|
1818
|
-
if (
|
|
1819
|
-
var r = t +
|
|
1826
|
+
function en(e, t, n) {
|
|
1827
|
+
if (jt(e, t, Tt(e, t)), kt > 3) return null;
|
|
1828
|
+
var r = t + At;
|
|
1820
1829
|
if (e.charCodeAt(r) !== h) return null;
|
|
1821
|
-
if (r + 1 < e.length && e.charCodeAt(r + 1) === g) return
|
|
1830
|
+
if (r + 1 < e.length && e.charCodeAt(r + 1) === g) return tn(e, r, n) || null;
|
|
1822
1831
|
n.refs ||= {};
|
|
1823
|
-
var i =
|
|
1832
|
+
var i = ht(e, r, n.refs);
|
|
1824
1833
|
return i === null ? null : {
|
|
1825
|
-
node: { type:
|
|
1834
|
+
node: { type: q.refCollection },
|
|
1826
1835
|
end: i
|
|
1827
1836
|
};
|
|
1828
1837
|
}
|
|
1829
|
-
function
|
|
1838
|
+
function tn(e, t, n) {
|
|
1830
1839
|
var r = e.length;
|
|
1831
1840
|
if (e.charCodeAt(t) !== h || t + 1 >= r || e.charCodeAt(t + 1) !== g) return null;
|
|
1832
1841
|
for (var i = t + 2, a = i; i < r && e.charCodeAt(i) !== D;) {
|
|
@@ -1841,11 +1850,11 @@ function Qt(e, t, n) {
|
|
|
1841
1850
|
var s = e.indexOf("\n", i);
|
|
1842
1851
|
s < 0 && (s = r);
|
|
1843
1852
|
for (var c = e.slice(i, s).trim(), d = s < r ? s + 1 : r; d < r;) {
|
|
1844
|
-
var p =
|
|
1845
|
-
if (
|
|
1846
|
-
else if (
|
|
1853
|
+
var p = Tt(e, d);
|
|
1854
|
+
if (jt(e, d, p), kt >= 2 && !Mt(e, d, p)) c += "\n" + e.slice(d, p), d = $(e, p);
|
|
1855
|
+
else if (Mt(e, d, p)) {
|
|
1847
1856
|
var m = $(e, p);
|
|
1848
|
-
if (m < r && (
|
|
1857
|
+
if (m < r && (jt(e, m, Tt(e, m)), kt >= 2)) {
|
|
1849
1858
|
c += "\n", d = $(e, p);
|
|
1850
1859
|
continue;
|
|
1851
1860
|
}
|
|
@@ -1856,19 +1865,19 @@ function Qt(e, t, n) {
|
|
|
1856
1865
|
target: c,
|
|
1857
1866
|
title: void 0
|
|
1858
1867
|
}), {
|
|
1859
|
-
node: { type:
|
|
1868
|
+
node: { type: q.footnote },
|
|
1860
1869
|
end: d
|
|
1861
1870
|
};
|
|
1862
1871
|
}
|
|
1863
|
-
function
|
|
1872
|
+
function nn(e, t, n, r) {
|
|
1864
1873
|
let i = t, a = 0, o = 0, s = -1;
|
|
1865
1874
|
for (; i < e.length;) {
|
|
1866
|
-
let t = s >= 0 ? s :
|
|
1867
|
-
if (s = -1,
|
|
1868
|
-
if (
|
|
1869
|
-
let n = e.charCodeAt(i +
|
|
1875
|
+
let t = s >= 0 ? s : Tt(e, i);
|
|
1876
|
+
if (s = -1, Mt(e, i, t)) break;
|
|
1877
|
+
if (jt(e, i, t), kt < 4 && o > 0 && !n.g) {
|
|
1878
|
+
let n = e.charCodeAt(i + At);
|
|
1870
1879
|
if (n === x || n === b) {
|
|
1871
|
-
let r = i +
|
|
1880
|
+
let r = i + At;
|
|
1872
1881
|
for (; r < t && e.charCodeAt(r) === n;) r++;
|
|
1873
1882
|
for (; r < t && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
|
|
1874
1883
|
if (r >= t) {
|
|
@@ -1880,77 +1889,77 @@ function $t(e, t, n, r) {
|
|
|
1880
1889
|
o = t;
|
|
1881
1890
|
let d = $(e, t);
|
|
1882
1891
|
if (d < e.length) {
|
|
1883
|
-
if (e.charCodeAt(d) ===
|
|
1884
|
-
var c =
|
|
1892
|
+
if (e.charCodeAt(d) === de) {
|
|
1893
|
+
var c = Tt(e, d);
|
|
1885
1894
|
i = $(e, c), o = c;
|
|
1886
1895
|
continue;
|
|
1887
1896
|
}
|
|
1888
|
-
let t =
|
|
1889
|
-
if (s = t,
|
|
1890
|
-
let a = e.charCodeAt(d +
|
|
1897
|
+
let t = Tt(e, d);
|
|
1898
|
+
if (s = t, jt(e, d, t), kt < 4) {
|
|
1899
|
+
let a = e.charCodeAt(d + At);
|
|
1891
1900
|
if (a === _) {
|
|
1892
1901
|
i = d;
|
|
1893
1902
|
break;
|
|
1894
1903
|
}
|
|
1895
|
-
if (a === v &&
|
|
1904
|
+
if (a === v && Nt(e, d, n, r)) {
|
|
1896
1905
|
i = d;
|
|
1897
1906
|
break;
|
|
1898
1907
|
}
|
|
1899
1908
|
if (a === p || a === m) {
|
|
1900
|
-
for (var h = d +
|
|
1909
|
+
for (var h = d + At, g = 0; h < t && e.charCodeAt(h) === a;) g++, h++;
|
|
1901
1910
|
if (g >= 3) {
|
|
1902
1911
|
i = d;
|
|
1903
1912
|
break;
|
|
1904
1913
|
}
|
|
1905
1914
|
}
|
|
1906
1915
|
if (a === T) {
|
|
1907
|
-
var y = d +
|
|
1908
|
-
if (!E && S ===
|
|
1909
|
-
for (var D = y + 1, k = D; k < t && (e.charCodeAt(k) >=
|
|
1910
|
-
k > D && (E =
|
|
1916
|
+
var y = d + At + 1, S = y < t ? e.charCodeAt(y) : 0, E = S === O || S === re;
|
|
1917
|
+
if (!E && S === ie) {
|
|
1918
|
+
for (var D = y + 1, k = D; k < t && (e.charCodeAt(k) >= W && e.charCodeAt(k) <= G || e.charCodeAt(k) >= K && e.charCodeAt(k) <= pe || e.charCodeAt(k) >= H && e.charCodeAt(k) <= U || e.charCodeAt(k) === b);) k++;
|
|
1919
|
+
k > D && (E = Wt.has(e.slice(D, k).toLowerCase()));
|
|
1911
1920
|
} else if (!E) {
|
|
1912
|
-
for (var A = y; A < t && (e.charCodeAt(A) >=
|
|
1921
|
+
for (var A = y; A < t && (e.charCodeAt(A) >= W && e.charCodeAt(A) <= G || e.charCodeAt(A) >= K && e.charCodeAt(A) <= pe || e.charCodeAt(A) >= H && e.charCodeAt(A) <= U || e.charCodeAt(A) === b);) A++;
|
|
1913
1922
|
if (A > y) {
|
|
1914
1923
|
var j = e.slice(y, A).toLowerCase();
|
|
1915
|
-
E =
|
|
1924
|
+
E = Wt.has(j) || rt.has(j);
|
|
1916
1925
|
}
|
|
1917
1926
|
}
|
|
1918
|
-
if (E &&
|
|
1927
|
+
if (E && Xt(e, d, n, r)) {
|
|
1919
1928
|
i = d;
|
|
1920
1929
|
break;
|
|
1921
1930
|
}
|
|
1922
1931
|
}
|
|
1923
1932
|
if (a === b || a === C || a === oe) {
|
|
1924
|
-
let n = d +
|
|
1925
|
-
if (n < t && (e.charCodeAt(n) === l || e.charCodeAt(n) === u) &&
|
|
1933
|
+
let n = d + At + 1;
|
|
1934
|
+
if (n < t && (e.charCodeAt(n) === l || e.charCodeAt(n) === u) && Et(e, n, t) < t && !Ft(e, d)) {
|
|
1926
1935
|
i = d;
|
|
1927
1936
|
break;
|
|
1928
1937
|
}
|
|
1929
1938
|
}
|
|
1930
|
-
if (a >=
|
|
1931
|
-
let n = d +
|
|
1932
|
-
for (; n < t && e.charCodeAt(n) >=
|
|
1933
|
-
if (n < t && (e.charCodeAt(n) ===
|
|
1939
|
+
if (a >= H && a <= U) {
|
|
1940
|
+
let n = d + At;
|
|
1941
|
+
for (; n < t && e.charCodeAt(n) >= H && e.charCodeAt(n) <= U;) n++;
|
|
1942
|
+
if (n < t && (e.charCodeAt(n) === z || e.charCodeAt(n) === ue) && n - (d + At) === 1 && e.charCodeAt(d + At) === 49) {
|
|
1934
1943
|
var M = n + 1;
|
|
1935
|
-
if (M < t && (e.charCodeAt(M) === l || e.charCodeAt(M) === u) &&
|
|
1944
|
+
if (M < t && (e.charCodeAt(M) === l || e.charCodeAt(M) === u) && Et(e, M, t) < t) {
|
|
1936
1945
|
i = d;
|
|
1937
1946
|
break;
|
|
1938
1947
|
}
|
|
1939
1948
|
}
|
|
1940
1949
|
}
|
|
1941
|
-
if (a ===
|
|
1950
|
+
if (a === V) {
|
|
1942
1951
|
let n = $(e, t);
|
|
1943
|
-
if (n < e.length &&
|
|
1952
|
+
if (n < e.length && ft(e, n, Tt(e, n))) {
|
|
1944
1953
|
i = d;
|
|
1945
1954
|
break;
|
|
1946
1955
|
}
|
|
1947
1956
|
}
|
|
1948
|
-
if ((a === b || a === C || a === w) &&
|
|
1957
|
+
if ((a === b || a === C || a === w) && Ft(e, d)) {
|
|
1949
1958
|
if (a !== b) {
|
|
1950
1959
|
i = d;
|
|
1951
1960
|
break;
|
|
1952
1961
|
}
|
|
1953
|
-
let n = 0, r = d +
|
|
1962
|
+
let n = 0, r = d + At;
|
|
1954
1963
|
for (; r < t && e.charCodeAt(r) === b;) n++, r++;
|
|
1955
1964
|
for (; r < t && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
|
|
1956
1965
|
if (r < t) {
|
|
@@ -1965,18 +1974,18 @@ function $t(e, t, n, r) {
|
|
|
1965
1974
|
for (var N = a ? o : i; N > t && (e.charCodeAt(N - 1) === f || e.charCodeAt(N - 1) === d || e.charCodeAt(N - 1) === l || e.charCodeAt(N - 1) === u);) N--;
|
|
1966
1975
|
for (var P = t; P < N && (e.charCodeAt(P) === l || e.charCodeAt(P) === u);) P++;
|
|
1967
1976
|
if (P >= N) return null;
|
|
1968
|
-
for (var F = !1, I = P; I < N; I++) if (e.charCodeAt(I) ===
|
|
1977
|
+
for (var F = !1, I = P; I < N; I++) if (e.charCodeAt(I) === de) {
|
|
1969
1978
|
F = !0;
|
|
1970
1979
|
break;
|
|
1971
1980
|
}
|
|
1972
1981
|
var ee = F ? e.slice(P, N).replace(/\u001E/g, "") : e.slice(P, N);
|
|
1973
1982
|
if (!ee) return null;
|
|
1974
|
-
let L =
|
|
1983
|
+
let L = rn(ee, 0, ee.length, n, r);
|
|
1975
1984
|
if (a) {
|
|
1976
1985
|
let e = (r?.slugify || Z)(ee);
|
|
1977
1986
|
return {
|
|
1978
1987
|
node: {
|
|
1979
|
-
type:
|
|
1988
|
+
type: q.heading,
|
|
1980
1989
|
level: a,
|
|
1981
1990
|
children: L,
|
|
1982
1991
|
id: e
|
|
@@ -1986,19 +1995,19 @@ function $t(e, t, n, r) {
|
|
|
1986
1995
|
}
|
|
1987
1996
|
return {
|
|
1988
1997
|
node: {
|
|
1989
|
-
type:
|
|
1998
|
+
type: q.paragraph,
|
|
1990
1999
|
children: L
|
|
1991
2000
|
},
|
|
1992
2001
|
end: i
|
|
1993
2002
|
};
|
|
1994
2003
|
}
|
|
1995
|
-
function
|
|
2004
|
+
function rn(e, t, n, r, i) {
|
|
1996
2005
|
var a = e.indexOf("\n", t);
|
|
1997
|
-
if (a < 0 || a >= n) return
|
|
2006
|
+
if (a < 0 || a >= n) return Tn(e, t, n, r, i);
|
|
1998
2007
|
for (var o = "", s = t, c = t; c < n;) {
|
|
1999
2008
|
var u = e.charCodeAt(c);
|
|
2000
2009
|
if (u === p) {
|
|
2001
|
-
var d =
|
|
2010
|
+
var d = on(e, c, n);
|
|
2002
2011
|
if (d > c) {
|
|
2003
2012
|
for (var m = !1, h = c; h < d; h++) if (e.charCodeAt(h) === f) {
|
|
2004
2013
|
m = !0;
|
|
@@ -2009,7 +2018,7 @@ function en(e, t, n, r, i) {
|
|
|
2009
2018
|
}
|
|
2010
2019
|
}
|
|
2011
2020
|
if (u === T) {
|
|
2012
|
-
var g =
|
|
2021
|
+
var g = sn(e, c, n);
|
|
2013
2022
|
if (g > c) {
|
|
2014
2023
|
c = g;
|
|
2015
2024
|
continue;
|
|
@@ -2033,20 +2042,20 @@ function en(e, t, n, r, i) {
|
|
|
2033
2042
|
}
|
|
2034
2043
|
c++;
|
|
2035
2044
|
}
|
|
2036
|
-
return s < n && (o += e.slice(s, n)),
|
|
2045
|
+
return s < n && (o += e.slice(s, n)), Tn(o, 0, o.length, r, i);
|
|
2037
2046
|
}
|
|
2038
|
-
function
|
|
2047
|
+
function an(e, t, n) {
|
|
2039
2048
|
if (e.charCodeAt(t) !== p) return null;
|
|
2040
|
-
let r =
|
|
2049
|
+
let r = Ot(e, t, n, 96), i = t + r;
|
|
2041
2050
|
for (; i < n;) {
|
|
2042
2051
|
let a = e.indexOf("`", i);
|
|
2043
2052
|
if (a < 0 || a >= n) return null;
|
|
2044
|
-
let o =
|
|
2053
|
+
let o = Ot(e, a, n, 96);
|
|
2045
2054
|
if (o === r) {
|
|
2046
2055
|
let n = e.slice(t + r, a);
|
|
2047
2056
|
return n = n.replace(/\n/g, " "), n.length > 0 && n[0] === " " && n[n.length - 1] === " " && n.trim().length > 0 && (n = n.slice(1, -1)), {
|
|
2048
2057
|
node: {
|
|
2049
|
-
type:
|
|
2058
|
+
type: q.codeInline,
|
|
2050
2059
|
text: n
|
|
2051
2060
|
},
|
|
2052
2061
|
end: a + o
|
|
@@ -2056,21 +2065,21 @@ function tn(e, t, n) {
|
|
|
2056
2065
|
}
|
|
2057
2066
|
return null;
|
|
2058
2067
|
}
|
|
2059
|
-
function
|
|
2068
|
+
function on(e, t, n) {
|
|
2060
2069
|
if (e.charCodeAt(t) !== p) return t;
|
|
2061
|
-
let r =
|
|
2070
|
+
let r = Ot(e, t, n, 96), i = t + r;
|
|
2062
2071
|
for (; i < n;) {
|
|
2063
2072
|
let a = e.indexOf("`", i);
|
|
2064
2073
|
if (a < 0 || a >= n) return t;
|
|
2065
|
-
let o =
|
|
2074
|
+
let o = Ot(e, a, n, 96);
|
|
2066
2075
|
if (o === r) return a + o;
|
|
2067
2076
|
i = a + o;
|
|
2068
2077
|
}
|
|
2069
2078
|
return t;
|
|
2070
2079
|
}
|
|
2071
|
-
function
|
|
2080
|
+
function sn(e, t, n) {
|
|
2072
2081
|
if (e.charCodeAt(t) !== T) return t;
|
|
2073
|
-
if (t + 1 < n && e.charCodeAt(t + 1) ===
|
|
2082
|
+
if (t + 1 < n && e.charCodeAt(t + 1) === ie) {
|
|
2074
2083
|
let r = t + 2;
|
|
2075
2084
|
for (; r < n && e.charCodeAt(r) !== _;) r++;
|
|
2076
2085
|
return r < n ? r + 1 : t;
|
|
@@ -2082,7 +2091,7 @@ function rn(e, t, n) {
|
|
|
2082
2091
|
let r = t + 1, i = r;
|
|
2083
2092
|
for (; r < n;) {
|
|
2084
2093
|
let t = e.charCodeAt(r);
|
|
2085
|
-
if (t >=
|
|
2094
|
+
if (t >= W && t <= G || t >= K && t <= pe || t >= H && t <= U || t === b) r++;
|
|
2086
2095
|
else break;
|
|
2087
2096
|
}
|
|
2088
2097
|
if (r === i) return t;
|
|
@@ -2093,11 +2102,11 @@ function rn(e, t, n) {
|
|
|
2093
2102
|
r++;
|
|
2094
2103
|
break;
|
|
2095
2104
|
}
|
|
2096
|
-
if (i ===
|
|
2105
|
+
if (i === ie && r + 1 < n && e.charCodeAt(r + 1) === _) {
|
|
2097
2106
|
r += 2, o = !0;
|
|
2098
2107
|
break;
|
|
2099
2108
|
}
|
|
2100
|
-
if (i ===
|
|
2109
|
+
if (i === ae || i === B) {
|
|
2101
2110
|
var s = i;
|
|
2102
2111
|
for (r++; r < n && e.charCodeAt(r) !== s;) r++;
|
|
2103
2112
|
r < n && r++;
|
|
@@ -2108,9 +2117,9 @@ function rn(e, t, n) {
|
|
|
2108
2117
|
}
|
|
2109
2118
|
if (o || Te(a)) return r;
|
|
2110
2119
|
let c = 1;
|
|
2111
|
-
for (; r < n && c > 0;) if (e.charCodeAt(r) === T) if (r + 1 < n && e.charCodeAt(r + 1) ===
|
|
2120
|
+
for (; r < n && c > 0;) if (e.charCodeAt(r) === T) if (r + 1 < n && e.charCodeAt(r + 1) === ie) {
|
|
2112
2121
|
let t = r + 2, i = t;
|
|
2113
|
-
for (; i < n && (e.charCodeAt(i) >=
|
|
2122
|
+
for (; i < n && (e.charCodeAt(i) >= W && e.charCodeAt(i) <= G || e.charCodeAt(i) >= K && e.charCodeAt(i) <= pe);) i++;
|
|
2114
2123
|
if (e.slice(t, i).toLowerCase() === a) {
|
|
2115
2124
|
for (; i < n && e.charCodeAt(i) !== _;) i++;
|
|
2116
2125
|
if (i < n && i++, c--, c === 0) return i;
|
|
@@ -2118,29 +2127,29 @@ function rn(e, t, n) {
|
|
|
2118
2127
|
r = i;
|
|
2119
2128
|
} else {
|
|
2120
2129
|
let t = r + 1, i = t;
|
|
2121
|
-
for (; i < n && (e.charCodeAt(i) >=
|
|
2130
|
+
for (; i < n && (e.charCodeAt(i) >= W && e.charCodeAt(i) <= G || e.charCodeAt(i) >= K && e.charCodeAt(i) <= pe);) i++;
|
|
2122
2131
|
e.slice(t, i).toLowerCase() === a && c++, r++;
|
|
2123
2132
|
}
|
|
2124
2133
|
else r++;
|
|
2125
2134
|
return r;
|
|
2126
2135
|
}
|
|
2127
|
-
function
|
|
2136
|
+
function cn(e, t, n, r, i) {
|
|
2128
2137
|
if (e.charCodeAt(t) !== m || t + 1 >= n || e.charCodeAt(t + 1) !== m) return null;
|
|
2129
2138
|
let a = t + 2;
|
|
2130
2139
|
for (; a + 1 < n;) {
|
|
2131
2140
|
let o = e.charCodeAt(a);
|
|
2132
2141
|
if (o === p) {
|
|
2133
|
-
let t =
|
|
2142
|
+
let t = on(e, a, n);
|
|
2134
2143
|
if (t > a) {
|
|
2135
2144
|
a = t;
|
|
2136
2145
|
continue;
|
|
2137
2146
|
}
|
|
2138
2147
|
}
|
|
2139
2148
|
if (o === m && e.charCodeAt(a + 1) === m) {
|
|
2140
|
-
let n = e.slice(t + 2, a), o =
|
|
2149
|
+
let n = e.slice(t + 2, a), o = Tn(n, 0, n.length, r, i);
|
|
2141
2150
|
return {
|
|
2142
2151
|
node: {
|
|
2143
|
-
type:
|
|
2152
|
+
type: q.textFormatted,
|
|
2144
2153
|
tag: "del",
|
|
2145
2154
|
children: o
|
|
2146
2155
|
},
|
|
@@ -2151,23 +2160,23 @@ function an(e, t, n, r, i) {
|
|
|
2151
2160
|
}
|
|
2152
2161
|
return null;
|
|
2153
2162
|
}
|
|
2154
|
-
function
|
|
2163
|
+
function ln(e, t, n, r, i) {
|
|
2155
2164
|
if (e.charCodeAt(t) !== x || t + 1 >= n || e.charCodeAt(t + 1) !== x) return null;
|
|
2156
2165
|
let a = t + 2;
|
|
2157
2166
|
for (; a + 1 < n;) {
|
|
2158
2167
|
let o = e.charCodeAt(a);
|
|
2159
2168
|
if (o === p) {
|
|
2160
|
-
let t =
|
|
2169
|
+
let t = on(e, a, n);
|
|
2161
2170
|
if (t > a) {
|
|
2162
2171
|
a = t;
|
|
2163
2172
|
continue;
|
|
2164
2173
|
}
|
|
2165
2174
|
}
|
|
2166
2175
|
if (o === x && e.charCodeAt(a + 1) === x && a > t + 2) {
|
|
2167
|
-
let n = e.slice(t + 2, a), o =
|
|
2176
|
+
let n = e.slice(t + 2, a), o = Tn(n, 0, n.length, r, i);
|
|
2168
2177
|
return {
|
|
2169
2178
|
node: {
|
|
2170
|
-
type:
|
|
2179
|
+
type: q.textFormatted,
|
|
2171
2180
|
tag: "mark",
|
|
2172
2181
|
children: o
|
|
2173
2182
|
},
|
|
@@ -2178,25 +2187,25 @@ function on(e, t, n, r, i) {
|
|
|
2178
2187
|
}
|
|
2179
2188
|
return null;
|
|
2180
2189
|
}
|
|
2181
|
-
function
|
|
2182
|
-
return e <
|
|
2190
|
+
function un(e, t, n) {
|
|
2191
|
+
return e < me ? !!(bt(e) & Oe) : Re.test(t[n]);
|
|
2183
2192
|
}
|
|
2184
|
-
function
|
|
2185
|
-
return e <
|
|
2193
|
+
function dn(e, t, n) {
|
|
2194
|
+
return e < me ? !!(bt(e) & Ee) : ze.test(t[n]);
|
|
2186
2195
|
}
|
|
2187
|
-
function
|
|
2196
|
+
function fn(e, t, n) {
|
|
2188
2197
|
var r = e.charCodeAt(t);
|
|
2189
2198
|
if (r !== C && r !== w) return null;
|
|
2190
|
-
var i =
|
|
2199
|
+
var i = Ot(e, t, n, r);
|
|
2191
2200
|
if (i === 0) return null;
|
|
2192
|
-
var a = t > 0 ? e.charCodeAt(t - 1) : 32, o = t + i < n ? e.charCodeAt(t + i) : 32, s =
|
|
2201
|
+
var a = t > 0 ? e.charCodeAt(t - 1) : 32, o = t + i < n ? e.charCodeAt(t + i) : 32, s = dn(a, e, t - 1), c = dn(o, e, t + i), l = t > 0 ? un(a, e, t - 1) : !1, u = t + i < n ? un(o, e, t + i) : !1, d = !c && (!u || s || l), f = !s && (!l || c || u), p, m;
|
|
2193
2202
|
return r === C ? (p = d, m = f) : (p = d && (!f || l), m = f && (!d || u)), {
|
|
2194
2203
|
len: i,
|
|
2195
2204
|
canOpen: p,
|
|
2196
2205
|
canClose: m
|
|
2197
2206
|
};
|
|
2198
2207
|
}
|
|
2199
|
-
function
|
|
2208
|
+
function pn(e, t, n, r) {
|
|
2200
2209
|
if (t.length !== 0) {
|
|
2201
2210
|
for (var i = [], a = 0; a < 12; a++) i[a] = -1;
|
|
2202
2211
|
for (var o = 0; o < t.length;) {
|
|
@@ -2221,7 +2230,7 @@ function un(e, t, n, r) {
|
|
|
2221
2230
|
var g = e[p.idx], _ = e[s.idx];
|
|
2222
2231
|
g.text = g.text.slice(0, g.text.length - h), _.text = _.text.slice(h);
|
|
2223
2232
|
var v = p.idx + 1, y = s.idx, b = e.slice(v, y), x = {
|
|
2224
|
-
type:
|
|
2233
|
+
type: q.textFormatted,
|
|
2225
2234
|
tag: m ? "strong" : "em",
|
|
2226
2235
|
children: b
|
|
2227
2236
|
};
|
|
@@ -2244,10 +2253,10 @@ function un(e, t, n, r) {
|
|
|
2244
2253
|
}
|
|
2245
2254
|
for (var k = 0, A = 0; A < e.length; A++) {
|
|
2246
2255
|
var j = e[A];
|
|
2247
|
-
if (j.type ===
|
|
2256
|
+
if (j.type === q.text) {
|
|
2248
2257
|
var M = j;
|
|
2249
2258
|
if (M.text === "") continue;
|
|
2250
|
-
if (k > 0 && e[k - 1].type ===
|
|
2259
|
+
if (k > 0 && e[k - 1].type === q.text) {
|
|
2251
2260
|
e[k - 1].text += M.text;
|
|
2252
2261
|
continue;
|
|
2253
2262
|
}
|
|
@@ -2257,7 +2266,7 @@ function un(e, t, n, r) {
|
|
|
2257
2266
|
e.length = k;
|
|
2258
2267
|
}
|
|
2259
2268
|
}
|
|
2260
|
-
function
|
|
2269
|
+
function mn(e, t, n, r, i) {
|
|
2261
2270
|
let a = e.charCodeAt(t) === O, o = a ? t + 1 : t;
|
|
2262
2271
|
if (e.charCodeAt(o) !== h) return null;
|
|
2263
2272
|
var s = e.indexOf("]", o + 1);
|
|
@@ -2269,19 +2278,19 @@ function dn(e, t, n, r, i) {
|
|
|
2269
2278
|
continue;
|
|
2270
2279
|
}
|
|
2271
2280
|
if (d === p) {
|
|
2272
|
-
var m =
|
|
2281
|
+
var m = on(e, c, n);
|
|
2273
2282
|
if (m > c) {
|
|
2274
2283
|
c = m;
|
|
2275
2284
|
continue;
|
|
2276
2285
|
}
|
|
2277
2286
|
}
|
|
2278
2287
|
if (d === T) {
|
|
2279
|
-
var g =
|
|
2288
|
+
var g = hn(e, c, n);
|
|
2280
2289
|
if (g) {
|
|
2281
2290
|
c = g.end;
|
|
2282
2291
|
continue;
|
|
2283
2292
|
}
|
|
2284
|
-
var v =
|
|
2293
|
+
var v = sn(e, c, n);
|
|
2285
2294
|
if (v > c) {
|
|
2286
2295
|
c = v;
|
|
2287
2296
|
continue;
|
|
@@ -2291,7 +2300,7 @@ function dn(e, t, n, r, i) {
|
|
|
2291
2300
|
}
|
|
2292
2301
|
if (u !== 0) return null;
|
|
2293
2302
|
var y = c - 1, b = e.slice(o + 1, y), x = c < n ? e.charCodeAt(c) : 0, C = !1;
|
|
2294
|
-
if (x ===
|
|
2303
|
+
if (x === le) {
|
|
2295
2304
|
var w = !0;
|
|
2296
2305
|
for (c++; c < n && (e.charCodeAt(c) === l || e.charCodeAt(c) === f);) c++;
|
|
2297
2306
|
var E = "", k = c;
|
|
@@ -2308,127 +2317,128 @@ function dn(e, t, n, r, i) {
|
|
|
2308
2317
|
k++;
|
|
2309
2318
|
}
|
|
2310
2319
|
w && (k >= n || e.charCodeAt(k) !== _) && (w = !1), w && (E = e.slice(c, k), k++);
|
|
2311
|
-
} else if (w)
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2320
|
+
} else if (w) if (r.e !== void 0 && c >= r.e) w = !1;
|
|
2321
|
+
else {
|
|
2322
|
+
for (var A = 0, j = !1; k < n;) {
|
|
2323
|
+
var M = e.charCodeAt(k);
|
|
2324
|
+
if (M === S && k + 1 < n) {
|
|
2315
2325
|
k += 2;
|
|
2316
2326
|
continue;
|
|
2317
2327
|
}
|
|
2318
|
-
if (
|
|
2319
|
-
else if (
|
|
2320
|
-
if (A === 0) break;
|
|
2328
|
+
if (M === le) A++;
|
|
2329
|
+
else if (M === ue) {
|
|
2330
|
+
if (j = !0, A === 0) break;
|
|
2321
2331
|
A--;
|
|
2322
|
-
} else if (
|
|
2332
|
+
} else if (M === l || M === f) break;
|
|
2323
2333
|
k++;
|
|
2324
2334
|
}
|
|
2325
|
-
E = e.slice(c, k);
|
|
2335
|
+
k >= n && !j && (r.e === void 0 || c < r.e) && (r.e = c), E = e.slice(c, k);
|
|
2326
2336
|
}
|
|
2327
2337
|
if (w) {
|
|
2328
2338
|
for (c = k; c < n && (e.charCodeAt(c) === l || e.charCodeAt(c) === f);) c++;
|
|
2329
|
-
var
|
|
2339
|
+
var N;
|
|
2330
2340
|
if (c < n) {
|
|
2331
|
-
var
|
|
2332
|
-
if (
|
|
2333
|
-
var
|
|
2341
|
+
var P = e.charCodeAt(c);
|
|
2342
|
+
if (P === ae || P === B || P === le) {
|
|
2343
|
+
var F = P === le ? 41 : P;
|
|
2334
2344
|
c++;
|
|
2335
|
-
for (var
|
|
2336
|
-
c >= n ? w = !1 : (
|
|
2345
|
+
for (var I = c; c < n && e.charCodeAt(c) !== F;) e.charCodeAt(c) === S && c + 1 < n && c++, c++;
|
|
2346
|
+
c >= n ? w = !1 : (N = e.slice(I, c), c++);
|
|
2337
2347
|
}
|
|
2338
2348
|
}
|
|
2339
2349
|
if (w) {
|
|
2340
2350
|
for (; c < n && (e.charCodeAt(c) === l || e.charCodeAt(c) === f);) c++;
|
|
2341
|
-
(c >= n || e.charCodeAt(c) !==
|
|
2351
|
+
(c >= n || e.charCodeAt(c) !== ue) && (w = !1);
|
|
2342
2352
|
}
|
|
2343
2353
|
}
|
|
2344
2354
|
if (w) {
|
|
2345
|
-
c++, E =
|
|
2346
|
-
var
|
|
2355
|
+
c++, E = xt(E), N !== void 0 && (N = ye(xt(N)));
|
|
2356
|
+
var ee = (i?.sanitizer || xe)(E, a ? "img" : "a", a ? "src" : "href") === null ? null : E;
|
|
2347
2357
|
if (a) {
|
|
2348
|
-
var
|
|
2358
|
+
var L = bn(Tn(b, 0, b.length, r, i));
|
|
2349
2359
|
return {
|
|
2350
2360
|
node: {
|
|
2351
|
-
type:
|
|
2352
|
-
target:
|
|
2353
|
-
alt:
|
|
2354
|
-
title:
|
|
2361
|
+
type: q.image,
|
|
2362
|
+
target: ee,
|
|
2363
|
+
alt: L,
|
|
2364
|
+
title: N
|
|
2355
2365
|
},
|
|
2356
2366
|
end: c
|
|
2357
2367
|
};
|
|
2358
2368
|
} else {
|
|
2359
|
-
var
|
|
2369
|
+
var R = r.inAnchor;
|
|
2360
2370
|
r.inAnchor = !0;
|
|
2361
|
-
var
|
|
2362
|
-
type:
|
|
2371
|
+
var te = R ? [{
|
|
2372
|
+
type: q.text,
|
|
2363
2373
|
text: b
|
|
2364
|
-
}] :
|
|
2365
|
-
return r.inAnchor =
|
|
2374
|
+
}] : Tn(b, 0, b.length, r, i);
|
|
2375
|
+
return r.inAnchor = R, !r.inAnchor && yn(te) ? null : {
|
|
2366
2376
|
node: {
|
|
2367
|
-
type:
|
|
2368
|
-
target:
|
|
2369
|
-
title:
|
|
2370
|
-
children:
|
|
2377
|
+
type: q.link,
|
|
2378
|
+
target: ee,
|
|
2379
|
+
title: N,
|
|
2380
|
+
children: te
|
|
2371
2381
|
},
|
|
2372
2382
|
end: c
|
|
2373
2383
|
};
|
|
2374
2384
|
}
|
|
2375
2385
|
} else c = y + 1, C = !0;
|
|
2376
2386
|
}
|
|
2377
|
-
var
|
|
2387
|
+
var ne = "", re = c;
|
|
2378
2388
|
if (!C && x === h) {
|
|
2379
|
-
var
|
|
2380
|
-
|
|
2381
|
-
for (var ie = !1;
|
|
2382
|
-
if (e.charCodeAt(
|
|
2383
|
-
|
|
2389
|
+
var z = c + 1;
|
|
2390
|
+
re = z;
|
|
2391
|
+
for (var ie = !1; re < n && e.charCodeAt(re) !== D;) {
|
|
2392
|
+
if (e.charCodeAt(re) === S && re + 1 < n) {
|
|
2393
|
+
re += 2;
|
|
2384
2394
|
continue;
|
|
2385
2395
|
}
|
|
2386
|
-
if (e.charCodeAt(
|
|
2396
|
+
if (e.charCodeAt(re) === h) {
|
|
2387
2397
|
ie = !0;
|
|
2388
2398
|
break;
|
|
2389
2399
|
}
|
|
2390
|
-
|
|
2400
|
+
re++;
|
|
2391
2401
|
}
|
|
2392
|
-
if (ie ||
|
|
2393
|
-
var
|
|
2394
|
-
if (
|
|
2402
|
+
if (ie || re >= n) return null;
|
|
2403
|
+
var oe = e.slice(z, re);
|
|
2404
|
+
if (oe.trim()) ne = yt(oe);
|
|
2395
2405
|
else {
|
|
2396
|
-
if (
|
|
2397
|
-
|
|
2406
|
+
if (vt(b)) return null;
|
|
2407
|
+
ne = yt(b);
|
|
2398
2408
|
}
|
|
2399
|
-
|
|
2409
|
+
re += 1;
|
|
2400
2410
|
} else {
|
|
2401
|
-
if (
|
|
2402
|
-
|
|
2411
|
+
if (vt(b)) return null;
|
|
2412
|
+
ne = yt(b);
|
|
2403
2413
|
}
|
|
2404
|
-
var
|
|
2405
|
-
if (!
|
|
2414
|
+
var V = r.refs[ne];
|
|
2415
|
+
if (!V) return null;
|
|
2406
2416
|
if (a) return {
|
|
2407
2417
|
node: {
|
|
2408
|
-
type:
|
|
2409
|
-
target:
|
|
2410
|
-
alt:
|
|
2411
|
-
title:
|
|
2418
|
+
type: q.image,
|
|
2419
|
+
target: V.target,
|
|
2420
|
+
alt: bn(Tn(b, 0, b.length, r, i)),
|
|
2421
|
+
title: V.title
|
|
2412
2422
|
},
|
|
2413
|
-
end:
|
|
2423
|
+
end: re
|
|
2414
2424
|
};
|
|
2415
2425
|
var se = r.inAnchor;
|
|
2416
2426
|
r.inAnchor = !0;
|
|
2417
|
-
var
|
|
2418
|
-
type:
|
|
2427
|
+
var te = se ? [{
|
|
2428
|
+
type: q.text,
|
|
2419
2429
|
text: b
|
|
2420
|
-
}] :
|
|
2421
|
-
return r.inAnchor = se, !r.inAnchor &&
|
|
2430
|
+
}] : Tn(b, 0, b.length, r, i);
|
|
2431
|
+
return r.inAnchor = se, !r.inAnchor && yn(te) ? null : {
|
|
2422
2432
|
node: {
|
|
2423
|
-
type:
|
|
2424
|
-
target:
|
|
2425
|
-
title:
|
|
2426
|
-
children:
|
|
2433
|
+
type: q.link,
|
|
2434
|
+
target: V.target,
|
|
2435
|
+
title: V.title,
|
|
2436
|
+
children: te
|
|
2427
2437
|
},
|
|
2428
|
-
end:
|
|
2438
|
+
end: re
|
|
2429
2439
|
};
|
|
2430
2440
|
}
|
|
2431
|
-
function
|
|
2441
|
+
function hn(e, t, n) {
|
|
2432
2442
|
if (e.charCodeAt(t) !== T) return null;
|
|
2433
2443
|
for (var r = t + 1; r < n;) {
|
|
2434
2444
|
var i = e.charCodeAt(r);
|
|
@@ -2440,29 +2450,29 @@ function fn(e, t, n) {
|
|
|
2440
2450
|
var a = e.slice(t + 1, r);
|
|
2441
2451
|
return a.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/) ? {
|
|
2442
2452
|
node: {
|
|
2443
|
-
type:
|
|
2453
|
+
type: q.link,
|
|
2444
2454
|
target: a,
|
|
2445
2455
|
title: void 0,
|
|
2446
2456
|
children: [{
|
|
2447
|
-
type:
|
|
2457
|
+
type: q.text,
|
|
2448
2458
|
text: a
|
|
2449
2459
|
}]
|
|
2450
2460
|
},
|
|
2451
2461
|
end: r + 1
|
|
2452
2462
|
} : a.indexOf("@") !== -1 && /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a) ? {
|
|
2453
2463
|
node: {
|
|
2454
|
-
type:
|
|
2464
|
+
type: q.link,
|
|
2455
2465
|
target: "mailto:" + a,
|
|
2456
2466
|
title: void 0,
|
|
2457
2467
|
children: [{
|
|
2458
|
-
type:
|
|
2468
|
+
type: q.text,
|
|
2459
2469
|
text: a
|
|
2460
2470
|
}]
|
|
2461
2471
|
},
|
|
2462
2472
|
end: r + 1
|
|
2463
2473
|
} : null;
|
|
2464
2474
|
}
|
|
2465
|
-
function
|
|
2475
|
+
function gn(e, t, n, r) {
|
|
2466
2476
|
if (e.charCodeAt(t) !== h || t + 1 >= n || e.charCodeAt(t + 1) !== g) return null;
|
|
2467
2477
|
let i = t + 2;
|
|
2468
2478
|
for (; i < n && e.charCodeAt(i) !== D && e.charCodeAt(i) !== f;) i++;
|
|
@@ -2470,17 +2480,17 @@ function pn(e, t, n, r) {
|
|
|
2470
2480
|
let a = e.slice(t + 2, i);
|
|
2471
2481
|
return a ? {
|
|
2472
2482
|
node: {
|
|
2473
|
-
type:
|
|
2483
|
+
type: q.footnoteReference,
|
|
2474
2484
|
target: "#" + Z(a),
|
|
2475
2485
|
text: a
|
|
2476
2486
|
},
|
|
2477
2487
|
end: i + 1
|
|
2478
2488
|
} : null;
|
|
2479
2489
|
}
|
|
2480
|
-
function
|
|
2490
|
+
function _n(e, t, n, r) {
|
|
2481
2491
|
if (r.disableBareUrls) return null;
|
|
2482
2492
|
var i = "", a = !1, o = e.charCodeAt(t);
|
|
2483
|
-
if (o === N || o === 72 ? t + 8 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === F && e.charCodeAt(t + 3) === I && (e.charCodeAt(t + 4) === ee && e.charCodeAt(t + 5) === A && e.charCodeAt(t + 6) ===
|
|
2493
|
+
if (o === N || o === 72 ? t + 8 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === F && e.charCodeAt(t + 3) === I && (e.charCodeAt(t + 4) === ee && e.charCodeAt(t + 5) === A && e.charCodeAt(t + 6) === ie && e.charCodeAt(t + 7) === ie ? i = "https://" : e.charCodeAt(t + 4) === A && e.charCodeAt(t + 5) === ie && e.charCodeAt(t + 6) === ie && (i = "http://")) : o === M || o === 70 ? t + 6 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === I && e.charCodeAt(t + 3) === A && e.charCodeAt(t + 4) === ie && e.charCodeAt(t + 5) === ie && (i = "ftp://") : (o === P || o === 87) && t + 4 <= n && e.charCodeAt(t + 1) === P && e.charCodeAt(t + 2) === P && e.charCodeAt(t + 3) === z && (i = "www.", a = !0), !i) return null;
|
|
2484
2494
|
let s = t + i.length;
|
|
2485
2495
|
for (; s < n;) {
|
|
2486
2496
|
let t = e.charCodeAt(s);
|
|
@@ -2489,26 +2499,26 @@ function mn(e, t, n, r) {
|
|
|
2489
2499
|
}
|
|
2490
2500
|
for (var c = 0, p = 0, h = t; h < s; h++) {
|
|
2491
2501
|
var g = e.charCodeAt(h);
|
|
2492
|
-
g ===
|
|
2502
|
+
g === le ? c++ : g === ue && p++;
|
|
2493
2503
|
}
|
|
2494
2504
|
let v = s;
|
|
2495
2505
|
for (; v > t + i.length;) {
|
|
2496
2506
|
let n = e.charCodeAt(v - 1);
|
|
2497
|
-
if (n ===
|
|
2498
|
-
if (n ===
|
|
2507
|
+
if (n === z || n === te || n === A || n === O || n === re || n === ue || n === C || n === w || n === m) {
|
|
2508
|
+
if (n === ue) {
|
|
2499
2509
|
if (c >= p) break;
|
|
2500
2510
|
p--;
|
|
2501
2511
|
}
|
|
2502
2512
|
v--;
|
|
2503
2513
|
} else if (n === ne) {
|
|
2504
|
-
for (var y = v - 2; y > t && (e.charCodeAt(y) >=
|
|
2514
|
+
for (var y = v - 2; y > t && (e.charCodeAt(y) >= W && e.charCodeAt(y) <= G || e.charCodeAt(y) >= K && e.charCodeAt(y) <= pe || e.charCodeAt(y) >= H && e.charCodeAt(y) <= U);) y--;
|
|
2505
2515
|
y >= t && e.charCodeAt(y) === k ? v = y : v--;
|
|
2506
2516
|
} else break;
|
|
2507
2517
|
}
|
|
2508
2518
|
if (v <= t + i.length) return null;
|
|
2509
2519
|
var b = t + (a ? 4 : i.length), x = e.indexOf("/", b);
|
|
2510
2520
|
if ((x < 0 || x > v) && (x = v), a && e.indexOf(".", b) === -1) return null;
|
|
2511
|
-
for (var S = -1, E = -1, D = x - 1; D >= b; D--) if (e.charCodeAt(D) ===
|
|
2521
|
+
for (var S = -1, E = -1, D = x - 1; D >= b; D--) if (e.charCodeAt(D) === z) if (S < 0) S = D;
|
|
2512
2522
|
else {
|
|
2513
2523
|
E = D;
|
|
2514
2524
|
break;
|
|
@@ -2517,45 +2527,45 @@ function mn(e, t, n, r) {
|
|
|
2517
2527
|
var j = e.slice(t, v), L = a ? "http://" + j : j;
|
|
2518
2528
|
return {
|
|
2519
2529
|
node: {
|
|
2520
|
-
type:
|
|
2530
|
+
type: q.link,
|
|
2521
2531
|
target: L,
|
|
2522
2532
|
title: void 0,
|
|
2523
2533
|
children: [{
|
|
2524
|
-
type:
|
|
2534
|
+
type: q.text,
|
|
2525
2535
|
text: j
|
|
2526
2536
|
}]
|
|
2527
2537
|
},
|
|
2528
2538
|
end: v
|
|
2529
2539
|
};
|
|
2530
2540
|
}
|
|
2531
|
-
function
|
|
2541
|
+
function vn(e, t, n, r) {
|
|
2532
2542
|
if (r.disableBareUrls) return null;
|
|
2533
2543
|
for (var i = t, a = i; i < n;) {
|
|
2534
2544
|
var o = e.charCodeAt(i);
|
|
2535
|
-
if (o >=
|
|
2545
|
+
if (o >= W && o <= G || o >= K && o <= pe || o >= H && o <= U || o === z || o === O || o === v || o === 36 || o === y || o === k || o === B || o === C || o === oe || o === ie || o === x || o === re || o === g || o === w || o === p || o === se || o === V || o === ce || o === m || o === b) i++;
|
|
2536
2546
|
else break;
|
|
2537
2547
|
}
|
|
2538
2548
|
if (i === a || i >= n || e.charCodeAt(i) !== E) return null;
|
|
2539
2549
|
i++;
|
|
2540
2550
|
for (var s = i, c = -1, l = i; i < n;) {
|
|
2541
2551
|
var o = e.charCodeAt(i);
|
|
2542
|
-
if (o >=
|
|
2552
|
+
if (o >= W && o <= G || o >= K && o <= pe || o >= H && o <= U) i++;
|
|
2543
2553
|
else if ((o === b || o === w) && i > s) i++;
|
|
2544
|
-
else if (o ===
|
|
2554
|
+
else if (o === z) {
|
|
2545
2555
|
if (i === s) break;
|
|
2546
2556
|
var u = e.charCodeAt(i - 1);
|
|
2547
2557
|
if (u === b || u === w || i - l > 63) break;
|
|
2548
2558
|
if (i + 1 < n) {
|
|
2549
2559
|
var d = e.charCodeAt(i + 1);
|
|
2550
|
-
if (d >=
|
|
2560
|
+
if (d >= W && d <= G || d >= K && d <= pe || d >= H && d <= U) c = i, l = i + 1, i++;
|
|
2551
2561
|
else break;
|
|
2552
2562
|
} else break;
|
|
2553
2563
|
} else break;
|
|
2554
2564
|
}
|
|
2555
2565
|
if (i - l > 63 || c < 0) return null;
|
|
2556
2566
|
var f = e.charCodeAt(i - 1);
|
|
2557
|
-
if (!(f >=
|
|
2558
|
-
for (var h = -1, _ = c - 1; _ >= s; _--) if (e.charCodeAt(_) ===
|
|
2567
|
+
if (!(f >= W && f <= G || f >= K && f <= pe || f >= H && f <= U) || i <= c + 1) return null;
|
|
2568
|
+
for (var h = -1, _ = c - 1; _ >= s; _--) if (e.charCodeAt(_) === z) {
|
|
2559
2569
|
h = _;
|
|
2560
2570
|
break;
|
|
2561
2571
|
}
|
|
@@ -2563,36 +2573,36 @@ function hn(e, t, n, r) {
|
|
|
2563
2573
|
var S = e.slice(t, i);
|
|
2564
2574
|
return {
|
|
2565
2575
|
node: {
|
|
2566
|
-
type:
|
|
2576
|
+
type: q.link,
|
|
2567
2577
|
target: "mailto:" + S,
|
|
2568
2578
|
title: void 0,
|
|
2569
2579
|
children: [{
|
|
2570
|
-
type:
|
|
2580
|
+
type: q.text,
|
|
2571
2581
|
text: S
|
|
2572
2582
|
}]
|
|
2573
2583
|
},
|
|
2574
2584
|
end: i
|
|
2575
2585
|
};
|
|
2576
2586
|
}
|
|
2577
|
-
function
|
|
2578
|
-
for (var t = 0; t < e.length; t++) if (e[t].type ===
|
|
2587
|
+
function yn(e) {
|
|
2588
|
+
for (var t = 0; t < e.length; t++) if (e[t].type === q.link || "children" in e[t] && Array.isArray(e[t].children) && yn(e[t].children)) return !0;
|
|
2579
2589
|
return !1;
|
|
2580
2590
|
}
|
|
2581
|
-
function
|
|
2591
|
+
function bn(e) {
|
|
2582
2592
|
for (var t = "", n = 0; n < e.length; n++) {
|
|
2583
2593
|
var r = e[n];
|
|
2584
|
-
r.type ===
|
|
2594
|
+
r.type === q.text ? t += r.text : r.type === q.breakLine ? t += " " : r.type === q.codeInline ? t += r.text : "children" in r && Array.isArray(r.children) ? t += bn(r.children) : r.type === q.image ? t += r.alt || "" : r.type === q.link && (t += bn(r.children));
|
|
2585
2595
|
}
|
|
2586
2596
|
return t;
|
|
2587
2597
|
}
|
|
2588
|
-
function
|
|
2589
|
-
let t = e.includes("&") ?
|
|
2598
|
+
function xn(e) {
|
|
2599
|
+
let t = e.includes("&") ? ye(e) : e;
|
|
2590
2600
|
return {
|
|
2591
|
-
type:
|
|
2601
|
+
type: q.text,
|
|
2592
2602
|
text: t
|
|
2593
2603
|
};
|
|
2594
2604
|
}
|
|
2595
|
-
function
|
|
2605
|
+
function Sn(e, t, n, r, i) {
|
|
2596
2606
|
if (e.charCodeAt(t) !== T) return null;
|
|
2597
2607
|
var a = t + 1;
|
|
2598
2608
|
if (a >= n) return null;
|
|
@@ -2601,7 +2611,7 @@ function yn(e, t, n, r, i) {
|
|
|
2601
2611
|
var s = a + 3;
|
|
2602
2612
|
if (s < n && e.charCodeAt(s) === _) return {
|
|
2603
2613
|
node: {
|
|
2604
|
-
type:
|
|
2614
|
+
type: q.htmlComment,
|
|
2605
2615
|
text: "",
|
|
2606
2616
|
h: !0
|
|
2607
2617
|
},
|
|
@@ -2609,7 +2619,7 @@ function yn(e, t, n, r, i) {
|
|
|
2609
2619
|
};
|
|
2610
2620
|
if (s + 1 < n && e.charCodeAt(s) === b && e.charCodeAt(s + 1) === _) return {
|
|
2611
2621
|
node: {
|
|
2612
|
-
type:
|
|
2622
|
+
type: q.htmlComment,
|
|
2613
2623
|
text: "-",
|
|
2614
2624
|
h: !0
|
|
2615
2625
|
},
|
|
@@ -2618,7 +2628,7 @@ function yn(e, t, n, r, i) {
|
|
|
2618
2628
|
var c = e.indexOf("-->", s);
|
|
2619
2629
|
return c !== -1 && c <= n - 3 ? {
|
|
2620
2630
|
node: {
|
|
2621
|
-
type:
|
|
2631
|
+
type: q.htmlComment,
|
|
2622
2632
|
text: e.slice(t + 4, c),
|
|
2623
2633
|
h: !1
|
|
2624
2634
|
},
|
|
@@ -2629,7 +2639,7 @@ function yn(e, t, n, r, i) {
|
|
|
2629
2639
|
var d = e.indexOf("?>", a + 1);
|
|
2630
2640
|
return d !== -1 && d < n ? {
|
|
2631
2641
|
node: {
|
|
2632
|
-
type:
|
|
2642
|
+
type: q.htmlSelfClosing,
|
|
2633
2643
|
tag: "?",
|
|
2634
2644
|
attrs: {},
|
|
2635
2645
|
a: e.slice(t, d + 2),
|
|
@@ -2644,7 +2654,7 @@ function yn(e, t, n, r, i) {
|
|
|
2644
2654
|
var m = e.indexOf("]]>", a + 8);
|
|
2645
2655
|
return m !== -1 && m < n ? {
|
|
2646
2656
|
node: {
|
|
2647
|
-
type:
|
|
2657
|
+
type: q.htmlSelfClosing,
|
|
2648
2658
|
tag: "![CDATA[",
|
|
2649
2659
|
attrs: {},
|
|
2650
2660
|
a: e.slice(t, m + 3),
|
|
@@ -2653,11 +2663,11 @@ function yn(e, t, n, r, i) {
|
|
|
2653
2663
|
end: m + 3
|
|
2654
2664
|
} : null;
|
|
2655
2665
|
}
|
|
2656
|
-
if (p >=
|
|
2666
|
+
if (p >= W && p <= G) {
|
|
2657
2667
|
var g = e.indexOf(">", a + 2);
|
|
2658
2668
|
return g !== -1 && g < n ? {
|
|
2659
2669
|
node: {
|
|
2660
|
-
type:
|
|
2670
|
+
type: q.htmlSelfClosing,
|
|
2661
2671
|
tag: "!" + e.slice(a + 1, g),
|
|
2662
2672
|
attrs: {},
|
|
2663
2673
|
a: e.slice(t, g + 1),
|
|
@@ -2667,14 +2677,14 @@ function yn(e, t, n, r, i) {
|
|
|
2667
2677
|
} : null;
|
|
2668
2678
|
}
|
|
2669
2679
|
}
|
|
2670
|
-
if (o ===
|
|
2680
|
+
if (o === ie) {
|
|
2671
2681
|
var v = a + 1;
|
|
2672
2682
|
if (v >= n) return null;
|
|
2673
2683
|
var y = e.charCodeAt(v);
|
|
2674
|
-
if (!(y >=
|
|
2684
|
+
if (!(y >= W && y <= G || y >= K && y <= pe)) return null;
|
|
2675
2685
|
for (v++; v < n;) {
|
|
2676
2686
|
var x = e.charCodeAt(v);
|
|
2677
|
-
if (x >=
|
|
2687
|
+
if (x >= W && x <= G || x >= K && x <= pe || x >= H && x <= U || x === b) v++;
|
|
2678
2688
|
else break;
|
|
2679
2689
|
}
|
|
2680
2690
|
for (; v < n && (e.charCodeAt(v) === l || e.charCodeAt(v) === u || e.charCodeAt(v) === f);) v++;
|
|
@@ -2682,7 +2692,7 @@ function yn(e, t, n, r, i) {
|
|
|
2682
2692
|
var S = e.slice(a + 1, v).trim();
|
|
2683
2693
|
return {
|
|
2684
2694
|
node: {
|
|
2685
|
-
type:
|
|
2695
|
+
type: q.htmlSelfClosing,
|
|
2686
2696
|
tag: S,
|
|
2687
2697
|
attrs: {},
|
|
2688
2698
|
a: e.slice(t, v + 1),
|
|
@@ -2693,68 +2703,68 @@ function yn(e, t, n, r, i) {
|
|
|
2693
2703
|
}
|
|
2694
2704
|
return null;
|
|
2695
2705
|
}
|
|
2696
|
-
if (!(o >=
|
|
2697
|
-
var C =
|
|
2706
|
+
if (!(o >= W && o <= G || o >= K && o <= pe)) return null;
|
|
2707
|
+
var C = pt(e, t);
|
|
2698
2708
|
if (!C) return null;
|
|
2699
2709
|
var w = C.tag, E = w.toLowerCase();
|
|
2700
2710
|
if (C.selfClosing || Te(w)) return {
|
|
2701
2711
|
node: {
|
|
2702
|
-
type:
|
|
2712
|
+
type: q.htmlSelfClosing,
|
|
2703
2713
|
tag: w,
|
|
2704
|
-
attrs:
|
|
2714
|
+
attrs: Gt(C.attrs, w, i),
|
|
2705
2715
|
a: e.slice(t, C.end),
|
|
2706
2716
|
b: !1
|
|
2707
2717
|
},
|
|
2708
2718
|
end: C.end
|
|
2709
2719
|
};
|
|
2710
|
-
var D =
|
|
2720
|
+
var D = rt.has(E), k = Yt(e.slice(0, n), C.end, w);
|
|
2711
2721
|
if (k === -1) return {
|
|
2712
2722
|
node: {
|
|
2713
|
-
type:
|
|
2723
|
+
type: q.htmlSelfClosing,
|
|
2714
2724
|
tag: w,
|
|
2715
|
-
attrs:
|
|
2725
|
+
attrs: Gt(C.attrs, w, i),
|
|
2716
2726
|
a: e.slice(t, C.end),
|
|
2717
2727
|
b: !1
|
|
2718
2728
|
},
|
|
2719
2729
|
end: C.end
|
|
2720
2730
|
};
|
|
2721
|
-
var A =
|
|
2731
|
+
var A = qt(e, "</" + E, k), j = e.slice(C.end, A), M = [];
|
|
2722
2732
|
if (D) j.trim() && (M = [{
|
|
2723
|
-
type:
|
|
2733
|
+
type: q.text,
|
|
2724
2734
|
text: j
|
|
2725
2735
|
}]);
|
|
2726
2736
|
else {
|
|
2727
2737
|
var N = j.trim();
|
|
2728
2738
|
if (N) {
|
|
2729
2739
|
var { inAnchor: P, inline: F } = r;
|
|
2730
|
-
E === "a" && (r.inAnchor = !0), N.indexOf("\n\n") !== -1 || /^#{1,6}\s/.test(N) ? (r.inline = !1, M =
|
|
2740
|
+
E === "a" && (r.inAnchor = !0), N.indexOf("\n\n") !== -1 || /^#{1,6}\s/.test(N) ? (r.inline = !1, M = Dn(N, r, i)) : M = Tn(N, 0, N.length, r, i), r.inAnchor = P, r.inline = F;
|
|
2731
2741
|
}
|
|
2732
2742
|
}
|
|
2733
2743
|
return {
|
|
2734
2744
|
node: {
|
|
2735
|
-
type:
|
|
2745
|
+
type: q.htmlBlock,
|
|
2736
2746
|
tag: w,
|
|
2737
|
-
attrs:
|
|
2747
|
+
attrs: Gt(C.attrs, w, i),
|
|
2738
2748
|
f: C.rawAttrs,
|
|
2739
2749
|
children: M,
|
|
2740
2750
|
a: void 0,
|
|
2741
2751
|
text: j,
|
|
2742
2752
|
c: !1,
|
|
2743
|
-
b: !1
|
|
2744
|
-
endPos: k,
|
|
2745
|
-
e: !1
|
|
2753
|
+
b: !1
|
|
2746
2754
|
},
|
|
2747
2755
|
end: k
|
|
2748
2756
|
};
|
|
2749
2757
|
}
|
|
2750
|
-
var
|
|
2751
|
-
function
|
|
2752
|
-
if (
|
|
2753
|
-
type:
|
|
2758
|
+
var Cn = 200, wn = 0;
|
|
2759
|
+
function Tn(e, t, n, r, i) {
|
|
2760
|
+
if (wn++, wn > Cn) return wn--, [{
|
|
2761
|
+
type: q.text,
|
|
2754
2762
|
text: e.slice(t, n)
|
|
2755
2763
|
}];
|
|
2756
|
-
|
|
2757
|
-
|
|
2764
|
+
var a = r.e;
|
|
2765
|
+
r.e = void 0;
|
|
2766
|
+
let o = r;
|
|
2767
|
+
if (i.optimizeForStreaming) {
|
|
2758
2768
|
let r = function(e, t) {
|
|
2759
2769
|
for (var n = 1, r = t + 1; r < e.length; r++) {
|
|
2760
2770
|
var i = e.charCodeAt(r);
|
|
@@ -2763,163 +2773,163 @@ function Sn(e, t, n, r, i) {
|
|
|
2763
2773
|
}
|
|
2764
2774
|
return -1;
|
|
2765
2775
|
}, i = e.slice(t, n), a = i;
|
|
2766
|
-
for (var
|
|
2767
|
-
var
|
|
2768
|
-
|
|
2776
|
+
for (var s = 0, c = 0, l = 0, u = 0, d = 0, f = -1, _ = -1, v = -1, y = -1, b = -1, E = 0; E < i.length; E++) {
|
|
2777
|
+
var k = i.charCodeAt(E);
|
|
2778
|
+
k === C ? E + 1 < i.length && i.charCodeAt(E + 1) === C ? (s++, f = E, E++) : (c++, _ = E) : k === w ? E + 1 < i.length && i.charCodeAt(E + 1) === w ? (l++, v = E, E++) : (u++, y = E) : k === m && E + 1 < i.length && i.charCodeAt(E + 1) === m && (d++, b = E, E++);
|
|
2769
2779
|
}
|
|
2770
|
-
var
|
|
2771
|
-
|
|
2780
|
+
var A = [];
|
|
2781
|
+
d % 2 == 1 && b >= 0 && A.push([b, 2]), l % 2 == 1 && v >= 0 && A.push([v, 2]), u % 2 == 1 && y >= 0 && A.push([y, 1]), s % 2 == 1 && f >= 0 && A.push([f, 2]), c % 2 == 1 && _ >= 0 && A.push([_, 1]), A.sort(function(e, t) {
|
|
2772
2782
|
return t[0] - e[0];
|
|
2773
2783
|
});
|
|
2774
|
-
for (var
|
|
2775
|
-
var
|
|
2776
|
-
i = i.slice(0,
|
|
2784
|
+
for (var j = 0; j < A.length; j++) {
|
|
2785
|
+
var I = A[j][0], ee = A[j][1];
|
|
2786
|
+
i = i.slice(0, I) + i.slice(I + ee);
|
|
2777
2787
|
}
|
|
2778
|
-
let
|
|
2779
|
-
for (let e = 0; e < i.length; e++) i.charCodeAt(e) === p && (
|
|
2780
|
-
if (
|
|
2788
|
+
let o = 0, g = -1;
|
|
2789
|
+
for (let e = 0; e < i.length; e++) i.charCodeAt(e) === p && (o++, g = e);
|
|
2790
|
+
if (o % 2 == 1 && g !== -1) {
|
|
2781
2791
|
let e = !1, t = -1, n = 0;
|
|
2782
2792
|
for (; n < i.length;) i.charCodeAt(n) === p && (e ? (e = !1, t = -1) : (t = n, e = !0)), n++;
|
|
2783
2793
|
e && t !== -1 && (i = i.slice(0, t));
|
|
2784
2794
|
}
|
|
2785
|
-
for (var
|
|
2786
|
-
|
|
2787
|
-
for (var
|
|
2788
|
-
var
|
|
2789
|
-
if (
|
|
2795
|
+
for (var L = !0; L;) {
|
|
2796
|
+
L = !1;
|
|
2797
|
+
for (var R = -1, te = -1, ne = -1, re = !1, z = 0; z < i.length; z++) if (i.charCodeAt(z) === h && (z === 0 || i.charCodeAt(z - 1) !== S)) {
|
|
2798
|
+
var B = z > 0 && i.charCodeAt(z - 1) === O, ae = B ? z - 1 : z, oe = r(i, z);
|
|
2799
|
+
if (oe === -1) R = ae, re = B, te = z + 1, ne = i.length;
|
|
2790
2800
|
else {
|
|
2791
|
-
var
|
|
2792
|
-
if (
|
|
2793
|
-
else if (i.charCodeAt(
|
|
2794
|
-
var se = i.indexOf(")",
|
|
2795
|
-
se === -1 ? (
|
|
2796
|
-
} else if (i.charCodeAt(
|
|
2797
|
-
var ce = i.indexOf("]",
|
|
2798
|
-
ce === -1 ? (
|
|
2799
|
-
} else
|
|
2801
|
+
var V = oe + 1;
|
|
2802
|
+
if (V >= i.length) R = ae, re = B, te = z + 1, ne = oe;
|
|
2803
|
+
else if (i.charCodeAt(V) === le) {
|
|
2804
|
+
var se = i.indexOf(")", V + 1);
|
|
2805
|
+
se === -1 ? (R = ae, re = B, te = z + 1, ne = oe, z = i.length) : z = se;
|
|
2806
|
+
} else if (i.charCodeAt(V) === h) {
|
|
2807
|
+
var ce = i.indexOf("]", V + 1);
|
|
2808
|
+
ce === -1 ? (R = ae, re = B, te = z + 1, ne = oe, z = i.length) : z = ce;
|
|
2809
|
+
} else z = oe;
|
|
2800
2810
|
}
|
|
2801
2811
|
}
|
|
2802
|
-
if (
|
|
2803
|
-
var
|
|
2804
|
-
i = i.slice(0,
|
|
2812
|
+
if (R >= 0) {
|
|
2813
|
+
var ue = re ? "" : i.slice(te, ne);
|
|
2814
|
+
i = i.slice(0, R) + ue, L = !0;
|
|
2805
2815
|
}
|
|
2806
2816
|
}
|
|
2807
|
-
let
|
|
2808
|
-
if (
|
|
2809
|
-
var de =
|
|
2810
|
-
if (!(de >= 2 &&
|
|
2811
|
-
for (var
|
|
2812
|
-
if (
|
|
2813
|
-
let e =
|
|
2814
|
-
|
|
2817
|
+
let x = i.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);
|
|
2818
|
+
if (x && x.index !== void 0) {
|
|
2819
|
+
var de = x[0].length - x[2].length;
|
|
2820
|
+
if (!(de >= 2 && x[0].charCodeAt(de - 2) === ie)) {
|
|
2821
|
+
for (var he = !1, ge = 0, _e = 0; _e < x.index; _e++) i.charCodeAt(_e) === p && ge++;
|
|
2822
|
+
if (he = ge % 2 == 1, !he) {
|
|
2823
|
+
let e = x[1];
|
|
2824
|
+
Kt(i, "</" + e, 0) === -1 && (i = i.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/, "$1"));
|
|
2815
2825
|
}
|
|
2816
2826
|
}
|
|
2817
2827
|
}
|
|
2818
2828
|
i !== a && (e = e.slice(0, t) + i, n = t + i.length);
|
|
2819
2829
|
}
|
|
2820
|
-
let
|
|
2821
|
-
var
|
|
2822
|
-
let
|
|
2823
|
-
var ye = i.disableAutoLink || i.disableBareUrls ||
|
|
2830
|
+
let J = [];
|
|
2831
|
+
var Y = [];
|
|
2832
|
+
let ve = t;
|
|
2833
|
+
var ye = i.disableAutoLink || i.disableBareUrls || o.inAnchor ? -1 : e.indexOf("@", t);
|
|
2824
2834
|
for (ye >= n && (ye = -1); t < n;) {
|
|
2825
|
-
let r = e.charCodeAt(t),
|
|
2835
|
+
let r = e.charCodeAt(t), a = null;
|
|
2826
2836
|
if (r === p) {
|
|
2827
|
-
if (
|
|
2828
|
-
var be =
|
|
2837
|
+
if (a = an(e, t, n), !a) {
|
|
2838
|
+
var be = Ot(e, t, n, p);
|
|
2829
2839
|
t += be - 1;
|
|
2830
2840
|
}
|
|
2831
2841
|
} else if (r === C || r === w) {
|
|
2832
|
-
var xe =
|
|
2842
|
+
var xe = fn(e, t, n);
|
|
2833
2843
|
if (xe) {
|
|
2834
2844
|
if (xe.canOpen || xe.canClose) {
|
|
2835
|
-
t >
|
|
2836
|
-
var Se =
|
|
2837
|
-
|
|
2838
|
-
idx:
|
|
2845
|
+
t > ve && J.push(xn(e.slice(ve, t)));
|
|
2846
|
+
var Se = xn(e.slice(t, t + xe.len));
|
|
2847
|
+
Y.push({
|
|
2848
|
+
idx: J.length,
|
|
2839
2849
|
ch: r,
|
|
2840
2850
|
len: xe.len,
|
|
2841
2851
|
canOpen: xe.canOpen,
|
|
2842
2852
|
canClose: xe.canClose,
|
|
2843
2853
|
active: !0
|
|
2844
|
-
}),
|
|
2854
|
+
}), J.push(Se), t += xe.len, ve = t;
|
|
2845
2855
|
continue;
|
|
2846
2856
|
}
|
|
2847
2857
|
t += xe.len - 1;
|
|
2848
2858
|
}
|
|
2849
|
-
} else if (r === m)
|
|
2850
|
-
else if (r === x)
|
|
2851
|
-
else if (r === h) t + 1 < n && e.charCodeAt(t + 1) === g && (
|
|
2852
|
-
else if (r === O && t + 1 < n && e.charCodeAt(t + 1) === h)
|
|
2853
|
-
else if (r === T)
|
|
2854
|
-
else if ((r === N || r === P || r === M) && !
|
|
2855
|
-
var
|
|
2856
|
-
(r === N &&
|
|
2857
|
-
}
|
|
2858
|
-
if (!
|
|
2859
|
-
t >
|
|
2859
|
+
} else if (r === m) a = cn(e, t, n, o, i);
|
|
2860
|
+
else if (r === x) a = ln(e, t, n, o, i);
|
|
2861
|
+
else if (r === h) t + 1 < n && e.charCodeAt(t + 1) === g && (a = gn(e, t, n, o)), a ||= mn(e, t, n, o, i);
|
|
2862
|
+
else if (r === O && t + 1 < n && e.charCodeAt(t + 1) === h) a = mn(e, t, n, o, i);
|
|
2863
|
+
else if (r === T) a = hn(e, t, n), !a && !i.disableParsingRawHTML && !i.ignoreHTMLBlocks && (a = Sn(e, t, n, o, i));
|
|
2864
|
+
else if ((r === N || r === P || r === M) && !o.inAnchor && !i.disableAutoLink && (t === 0 || e.charCodeAt(t - 1) !== T)) {
|
|
2865
|
+
var Ce = t + 1 < n ? e.charCodeAt(t + 1) : 0;
|
|
2866
|
+
(r === N && Ce === F || r === M && Ce === F || r === P && Ce === P) && (a = _n(e, t, n, i));
|
|
2867
|
+
}
|
|
2868
|
+
if (!a && ye >= 0 && ye - t <= 64 && !o.inAnchor && !i.disableAutoLink && !i.disableBareUrls && (r >= W && r <= G || r >= K && r <= pe || r >= H && r <= U) && (a = vn(e, t, n, i), !a && t >= ye && (ye = e.indexOf("@", t + 1), ye >= n && (ye = -1))), r === fe) {
|
|
2869
|
+
t > ve && J.push(xn(e.slice(ve, t))), J.push({ type: q.breakLine }), t++, ve = t;
|
|
2860
2870
|
continue;
|
|
2861
2871
|
}
|
|
2862
|
-
if (
|
|
2872
|
+
if (a) t > ve && J.push(xn(e.slice(ve, t))), J.push(a.node), t = a.end, ve = t;
|
|
2863
2873
|
else {
|
|
2864
|
-
if (r === S && t + 1 < n &&
|
|
2865
|
-
t >
|
|
2874
|
+
if (r === S && t + 1 < n && bt(e.charCodeAt(t + 1)) & Oe) {
|
|
2875
|
+
t > ve && J.push(xn(e.slice(ve, t))), J.push(xn(e[t + 1])), t += 2, ve = t;
|
|
2866
2876
|
continue;
|
|
2867
2877
|
}
|
|
2868
|
-
if (t++, ye < 0 || ye - t > 64) for (; t < n;) {
|
|
2869
|
-
var
|
|
2870
|
-
if (
|
|
2878
|
+
if (t++, ye < 0 || ye - t > 64) for (; t < n && !(ye >= 0 && ye - t <= 64);) {
|
|
2879
|
+
var X = e.charCodeAt(t);
|
|
2880
|
+
if (X < me && !ct[X]) t++;
|
|
2871
2881
|
else break;
|
|
2872
2882
|
}
|
|
2873
2883
|
}
|
|
2874
2884
|
}
|
|
2875
|
-
if (n >
|
|
2876
|
-
let t = e.slice(
|
|
2877
|
-
t &&
|
|
2885
|
+
if (n > ve) {
|
|
2886
|
+
let t = e.slice(ve, n);
|
|
2887
|
+
t && J.push(xn(t));
|
|
2878
2888
|
}
|
|
2879
|
-
return
|
|
2889
|
+
return Y.length > 0 && pn(J, Y, r, i), r.e = a, wn--, J;
|
|
2880
2890
|
}
|
|
2881
|
-
var
|
|
2882
|
-
function
|
|
2891
|
+
var En = 500;
|
|
2892
|
+
function Dn(e, t, n) {
|
|
2883
2893
|
var r = t.i || 0;
|
|
2884
|
-
if (r >
|
|
2885
|
-
type:
|
|
2894
|
+
if (r > En) return [{
|
|
2895
|
+
type: q.text,
|
|
2886
2896
|
text: e
|
|
2887
2897
|
}];
|
|
2888
|
-
if (t.i = r + 1,
|
|
2898
|
+
if (t.i = r + 1, n.optimizeForStreaming && !t.j) {
|
|
2889
2899
|
var i = e.length;
|
|
2890
2900
|
i > 0 && e.charCodeAt(i - 1) === f && i--;
|
|
2891
2901
|
for (var a = i; a > 0 && e.charCodeAt(a - 1) !== f;) a--;
|
|
2892
|
-
if (a > 0 && e.charCodeAt(a) ===
|
|
2902
|
+
if (a > 0 && e.charCodeAt(a) === V) {
|
|
2893
2903
|
for (var o = !0, s = a; s < i; s++) {
|
|
2894
2904
|
var c = e.charCodeAt(s);
|
|
2895
|
-
if (c !== l && c !== u && c !== b && c !== A && c !==
|
|
2905
|
+
if (c !== l && c !== u && c !== b && c !== A && c !== V) {
|
|
2896
2906
|
o = !1;
|
|
2897
2907
|
break;
|
|
2898
2908
|
}
|
|
2899
2909
|
}
|
|
2900
2910
|
if (o) {
|
|
2901
2911
|
for (var d = a - 1; d > 0 && e.charCodeAt(d - 1) !== f;) d--;
|
|
2902
|
-
e.charCodeAt(d) ===
|
|
2912
|
+
e.charCodeAt(d) === V && (e = e.slice(0, d).trimEnd());
|
|
2903
2913
|
}
|
|
2904
2914
|
}
|
|
2905
2915
|
var g = e.trim(), y = g.lastIndexOf("\n"), x = y === -1 ? g : g.slice(y + 1);
|
|
2906
|
-
if (x.length > 0 && x.charCodeAt(0) ===
|
|
2916
|
+
if (x.length > 0 && x.charCodeAt(0) === V) {
|
|
2907
2917
|
for (var S = !1, E = !1, D = 1; D < x.length; D++) {
|
|
2908
2918
|
var O = x.charCodeAt(D);
|
|
2909
|
-
O ===
|
|
2919
|
+
O === V && (S = !0), O === b && (E = !0);
|
|
2910
2920
|
}
|
|
2911
2921
|
S && E && (e = y === -1 ? "" : e.slice(0, e.lastIndexOf(x)).trimEnd());
|
|
2912
2922
|
}
|
|
2913
2923
|
for (var k = -1, j = -1, M = -1, N = e.length - 1; N >= 0; N--) if (e.charCodeAt(N) === T) {
|
|
2914
2924
|
var P = N + 1 < e.length ? e.charCodeAt(N + 1) : 0;
|
|
2915
|
-
if (P >=
|
|
2925
|
+
if (P >= W && P <= G || P >= K && P <= pe) {
|
|
2916
2926
|
for (var F = N + 2; F < e.length;) {
|
|
2917
2927
|
var I = e.charCodeAt(F);
|
|
2918
|
-
if (I >=
|
|
2928
|
+
if (I >= W && I <= G || I >= K && I <= pe || I >= H && I <= U) F++;
|
|
2919
2929
|
else break;
|
|
2920
2930
|
}
|
|
2921
2931
|
for (var ee = F; ee < e.length && e.charCodeAt(ee) !== _;) ee++;
|
|
2922
|
-
if (ee < e.length && e.charCodeAt(ee - 1) !==
|
|
2932
|
+
if (ee < e.length && e.charCodeAt(ee - 1) !== ie) {
|
|
2923
2933
|
for (var L = !1, R = ee + 1; R < e.length; R++) if (e.charCodeAt(R) === T) {
|
|
2924
2934
|
L = !0;
|
|
2925
2935
|
break;
|
|
@@ -2933,52 +2943,52 @@ function wn(e, t, n) {
|
|
|
2933
2943
|
for (var te = 0, ne = 0; ne < k; ne++) e.charCodeAt(ne) === p && te++;
|
|
2934
2944
|
if (te % 2 == 0) {
|
|
2935
2945
|
var re = e.slice(k + 1, j);
|
|
2936
|
-
|
|
2937
|
-
}
|
|
2938
|
-
}
|
|
2939
|
-
for (var
|
|
2940
|
-
if (
|
|
2941
|
-
for (var
|
|
2942
|
-
for (var
|
|
2943
|
-
if (
|
|
2944
|
-
for (var
|
|
2945
|
-
|
|
2946
|
-
}
|
|
2947
|
-
}
|
|
2948
|
-
var
|
|
2949
|
-
if (
|
|
2950
|
-
for (var
|
|
2951
|
-
if (
|
|
2952
|
-
var
|
|
2953
|
-
if (
|
|
2954
|
-
var
|
|
2955
|
-
if (
|
|
2956
|
-
for (var
|
|
2957
|
-
|
|
2946
|
+
Kt(e, "</" + re, 0) === -1 && (e = e.slice(0, k) + e.slice(M));
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
for (var B = e.length; B > 0 && e.charCodeAt(B - 1) === f;) B--;
|
|
2950
|
+
if (B > 0) {
|
|
2951
|
+
for (var ae = B; ae > 0 && e.charCodeAt(ae - 1) !== f;) ae--;
|
|
2952
|
+
for (var se = ae, ce = 0; se < B && e.charCodeAt(se) === l && ce < 3;) se++, ce++;
|
|
2953
|
+
if (ae > 0 && se < B && Pt(e, se, B)) {
|
|
2954
|
+
for (var le = ae - 1, fe = le; fe > 0 && e.charCodeAt(fe - 1) !== f;) fe--;
|
|
2955
|
+
Mt(e, fe, le) || (e = e.slice(0, ae).trimEnd());
|
|
2956
|
+
}
|
|
2957
|
+
}
|
|
2958
|
+
var me = e.length;
|
|
2959
|
+
if (me > 0) {
|
|
2960
|
+
for (var he = e.lastIndexOf("\n"), _e = he === -1 ? 0 : he + 1, J = me, Y = _e, ve = 0; Y < J && e.charCodeAt(Y) === l && ve < 3;) Y++, ve++;
|
|
2961
|
+
if (Y < J) {
|
|
2962
|
+
var ye = e.charCodeAt(Y), be = !1;
|
|
2963
|
+
if (ye === C || ye === b || ye === oe) {
|
|
2964
|
+
var xe = Y + 1;
|
|
2965
|
+
if (xe >= J || e.charCodeAt(xe) === l || e.charCodeAt(xe) === u) {
|
|
2966
|
+
for (var Se = xe; Se < J && (e.charCodeAt(Se) === l || e.charCodeAt(Se) === u);) Se++;
|
|
2967
|
+
Se >= J && (be = !0);
|
|
2958
2968
|
}
|
|
2959
|
-
} else if (
|
|
2960
|
-
for (var Ce =
|
|
2961
|
-
if (Ce <
|
|
2969
|
+
} else if (ye >= H && ye <= U) {
|
|
2970
|
+
for (var Ce = Y; Ce < J && e.charCodeAt(Ce) >= H && e.charCodeAt(Ce) <= U;) Ce++;
|
|
2971
|
+
if (Ce < J && (e.charCodeAt(Ce) === z || e.charCodeAt(Ce) === ue)) {
|
|
2962
2972
|
var X = Ce + 1;
|
|
2963
|
-
if (X >=
|
|
2964
|
-
for (var Z = X; Z <
|
|
2965
|
-
Z >=
|
|
2973
|
+
if (X >= J || e.charCodeAt(X) === l || e.charCodeAt(X) === u) {
|
|
2974
|
+
for (var Z = X; Z < J && (e.charCodeAt(Z) === l || e.charCodeAt(Z) === u);) Z++;
|
|
2975
|
+
Z >= J && (be = !0);
|
|
2966
2976
|
}
|
|
2967
2977
|
}
|
|
2968
2978
|
}
|
|
2969
|
-
|
|
2979
|
+
be && (e = e.slice(0, _e).trimEnd());
|
|
2970
2980
|
}
|
|
2971
2981
|
}
|
|
2972
2982
|
}
|
|
2973
|
-
if (t.inline) return
|
|
2983
|
+
if (t.inline) return Tn(e, 0, e.length, t, n);
|
|
2974
2984
|
let we = [], Q = 0, Te = e.length;
|
|
2975
2985
|
if (Q === 0 && !n.disableFrontmatter && e.startsWith("---")) {
|
|
2976
|
-
let t =
|
|
2986
|
+
let t = ge(e);
|
|
2977
2987
|
if (t && t.hasValidYaml) {
|
|
2978
2988
|
if (n.preserveFrontmatter !== !1) {
|
|
2979
2989
|
let n = e.slice(0, t.endPos).trimEnd();
|
|
2980
2990
|
we.push({
|
|
2981
|
-
type:
|
|
2991
|
+
type: q.frontmatter,
|
|
2982
2992
|
text: n
|
|
2983
2993
|
});
|
|
2984
2994
|
}
|
|
@@ -2986,23 +2996,23 @@ function wn(e, t, n) {
|
|
|
2986
2996
|
}
|
|
2987
2997
|
}
|
|
2988
2998
|
for (; Q < Te;) {
|
|
2989
|
-
for (var Ee = e.indexOf("\n", Q), De = Ee < 0 ? Te : Ee; Q < Te &&
|
|
2999
|
+
for (var Ee = e.indexOf("\n", Q), De = Ee < 0 ? Te : Ee; Q < Te && Mt(e, Q, De);) Q = De < Te ? De + 1 : De, Q < Te && (Ee = e.indexOf("\n", Q), De = Ee < 0 ? Te : Ee);
|
|
2990
3000
|
if (Q >= Te) break;
|
|
2991
|
-
e.charCodeAt(Q),
|
|
3001
|
+
e.charCodeAt(Q), jt(e, Q, De);
|
|
2992
3002
|
let r = null;
|
|
2993
|
-
if (
|
|
2994
|
-
else if (e.charCodeAt(Q) !==
|
|
2995
|
-
let i = Q +
|
|
2996
|
-
a === v ? r =
|
|
3003
|
+
if (St = e, Ct = Q, wt = De, e.charCodeAt(Q) !== de && kt >= 4 && !t.inHTML) r = Lt(e, Q);
|
|
3004
|
+
else if (e.charCodeAt(Q) !== de) {
|
|
3005
|
+
let i = Q + At, a = e.charCodeAt(i);
|
|
3006
|
+
a === v ? r = Nt(e, Q, t, n) : a === _ ? r = Rt(e, Q, t, n) : a === p || a === m ? r = It(e, Q, t) : a === b || a === C || a === w ? (r = Ft(e, Q), !r && (r = Ut(e, Q, t, n))) : a === oe || a >= H && a <= U ? r = Ut(e, Q, t, n) : a === T ? r = Xt(e, Q, t, n) : a === V ? r = $t(e, Q, t, n) : a === h && (r = en(e, Q, t));
|
|
2997
3007
|
}
|
|
2998
3008
|
if (!r) {
|
|
2999
|
-
for (var Oe = !1, ke = Q; ke < De; ke++) if (e.charCodeAt(ke) ===
|
|
3009
|
+
for (var Oe = !1, ke = Q; ke < De; ke++) if (e.charCodeAt(ke) === V) {
|
|
3000
3010
|
Oe = !0;
|
|
3001
3011
|
break;
|
|
3002
3012
|
}
|
|
3003
|
-
Oe && (r =
|
|
3013
|
+
Oe && (r = $t(e, Q, t, n));
|
|
3004
3014
|
}
|
|
3005
|
-
if (r ||=
|
|
3015
|
+
if (r ||= nn(e, Q, t, n), r) r.node.type !== q.refCollection && we.push(r.node), Q = r.end;
|
|
3006
3016
|
else {
|
|
3007
3017
|
var Ae = e.indexOf("\n", Q);
|
|
3008
3018
|
Q = Ae < 0 ? Te : Ae + 1;
|
|
@@ -3010,8 +3020,8 @@ function wn(e, t, n) {
|
|
|
3010
3020
|
}
|
|
3011
3021
|
return t.i = r, we;
|
|
3012
3022
|
}
|
|
3013
|
-
function
|
|
3014
|
-
var i =
|
|
3023
|
+
function On(e, t, n, r) {
|
|
3024
|
+
var i = pt(e, t);
|
|
3015
3025
|
return i ? {
|
|
3016
3026
|
tagName: i.tag,
|
|
3017
3027
|
tagLower: i.tag.toLowerCase(),
|
|
@@ -3024,23 +3034,23 @@ function Tn(e, t, n, r) {
|
|
|
3024
3034
|
endPos: i.end
|
|
3025
3035
|
} : null;
|
|
3026
3036
|
}
|
|
3027
|
-
function
|
|
3028
|
-
|
|
3029
|
-
let r =
|
|
3030
|
-
return
|
|
3031
|
-
type:
|
|
3037
|
+
function kn(e, t, n) {
|
|
3038
|
+
wn = 0, e = Ve(e), !t.refs && (t.refs = {}), t.j = mt(e, t.refs, n);
|
|
3039
|
+
let r = Dn(e, t, n);
|
|
3040
|
+
return Ue(t.refs) ? [{
|
|
3041
|
+
type: q.refCollection,
|
|
3032
3042
|
refs: t.refs
|
|
3033
3043
|
}, ...r] : r;
|
|
3034
3044
|
}
|
|
3035
|
-
var
|
|
3045
|
+
var An = /^\n+/, jn;
|
|
3036
3046
|
try {
|
|
3037
|
-
|
|
3047
|
+
jn = n.createElement("div").$$typeof;
|
|
3038
3048
|
} catch {
|
|
3039
|
-
|
|
3049
|
+
jn = Symbol.for("react.transitional.element");
|
|
3040
3050
|
}
|
|
3041
|
-
function
|
|
3051
|
+
function Mn(e, t, n) {
|
|
3042
3052
|
return {
|
|
3043
|
-
$$typeof:
|
|
3053
|
+
$$typeof: jn,
|
|
3044
3054
|
type: e,
|
|
3045
3055
|
key: n == null ? null : "" + n,
|
|
3046
3056
|
ref: null,
|
|
@@ -3051,49 +3061,40 @@ function kn(e, t, n) {
|
|
|
3051
3061
|
_debugTask: null
|
|
3052
3062
|
};
|
|
3053
3063
|
}
|
|
3054
|
-
var
|
|
3055
|
-
function
|
|
3064
|
+
var Nn = typeof n.createContext < "u" ? n.createContext(void 0) : void 0;
|
|
3065
|
+
function Pn(e, t, r, i, a, o, s, c, l) {
|
|
3056
3066
|
switch (e.type) {
|
|
3057
|
-
case
|
|
3067
|
+
case q.blockQuote: {
|
|
3058
3068
|
let n = { key: r.key };
|
|
3059
|
-
return e.alert && (n.className = "markdown-alert-" + o(e.alert.toLowerCase(), Z), e.children.unshift(
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
type: K.htmlBlock,
|
|
3067
|
-
tag: "header"
|
|
3068
|
-
})), i("blockquote", n, t(e.children, r));
|
|
3069
|
-
}
|
|
3070
|
-
case K.breakLine: return i("br", { key: r.key });
|
|
3071
|
-
case K.breakThematic: return i("hr", { key: r.key });
|
|
3072
|
-
case K.frontmatter: return c.preserveFrontmatter ? i("pre", { key: r.key }, e.text) : null;
|
|
3073
|
-
case K.codeBlock:
|
|
3074
|
-
let g = e.lang ? be(e.lang) : "";
|
|
3069
|
+
return e.alert && (n.className = "markdown-alert-" + o(e.alert.toLowerCase(), Z), e.children.unshift(We(e.alert))), i("blockquote", n, t(e.children, r));
|
|
3070
|
+
}
|
|
3071
|
+
case q.breakLine: return i("br", { key: r.key });
|
|
3072
|
+
case q.breakThematic: return i("hr", { key: r.key });
|
|
3073
|
+
case q.frontmatter: return c.preserveFrontmatter ? i("pre", { key: r.key }, e.text) : null;
|
|
3074
|
+
case q.codeBlock:
|
|
3075
|
+
let g = e.lang ? ye(e.lang) : "";
|
|
3075
3076
|
return i("pre", { key: r.key }, i("code", {
|
|
3076
|
-
...
|
|
3077
|
+
...Y(e.attrs || {}),
|
|
3077
3078
|
className: g ? `language-${g} lang-${g}` : ""
|
|
3078
3079
|
}, e.text));
|
|
3079
|
-
case
|
|
3080
|
-
case
|
|
3080
|
+
case q.codeInline: return i("code", { key: r.key }, e.text);
|
|
3081
|
+
case q.footnoteReference: return i("a", {
|
|
3081
3082
|
key: r.key,
|
|
3082
3083
|
href: a(e.target, "a", "href") || void 0
|
|
3083
3084
|
}, i("sup", { key: r.key }, e.text));
|
|
3084
|
-
case
|
|
3085
|
+
case q.gfmTask: return i("input", {
|
|
3085
3086
|
checked: e.completed,
|
|
3086
3087
|
key: r.key,
|
|
3087
3088
|
readOnly: !0,
|
|
3088
3089
|
type: "checkbox"
|
|
3089
3090
|
});
|
|
3090
|
-
case
|
|
3091
|
+
case q.heading: return i(`h${e.level}`, {
|
|
3091
3092
|
id: e.id,
|
|
3092
3093
|
key: r.key
|
|
3093
3094
|
}, t(e.children, r));
|
|
3094
|
-
case
|
|
3095
|
+
case q.htmlBlock: {
|
|
3095
3096
|
let g = e;
|
|
3096
|
-
if (c.tagfilter &&
|
|
3097
|
+
if (c.tagfilter && Ze(g.tag)) {
|
|
3097
3098
|
var u = "";
|
|
3098
3099
|
if (g.attrs) for (var d in g.attrs) {
|
|
3099
3100
|
var f = g.attrs[d];
|
|
@@ -3103,33 +3104,33 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3103
3104
|
}
|
|
3104
3105
|
if (g.a && g.c) {
|
|
3105
3106
|
let i = function(e) {
|
|
3106
|
-
if ((e.type ===
|
|
3107
|
-
if (e.type ===
|
|
3107
|
+
if ((e.type === q.htmlSelfClosing || e.type === q.htmlBlock) && e.b) return [];
|
|
3108
|
+
if (e.type === q.paragraph) {
|
|
3108
3109
|
let t = e.children;
|
|
3109
3110
|
return t ? t.flatMap(i) : [];
|
|
3110
3111
|
}
|
|
3111
|
-
return e.type ===
|
|
3112
|
+
return e.type === q.text ? e.text?.trim() ? [e] : [] : e.type === q.htmlBlock && e.children ? [{
|
|
3112
3113
|
...e,
|
|
3113
3114
|
children: e.children?.flatMap(i)
|
|
3114
3115
|
}] : [e];
|
|
3115
3116
|
}, u = function(e) {
|
|
3116
|
-
for (var t = 0; t < e.length; t++) e[t].type ===
|
|
3117
|
+
for (var t = 0; t < e.length; t++) e[t].type === q.htmlBlock && (e[t].c = !1), "children" in e[t] && e[t].children && u(e[t].children);
|
|
3117
3118
|
}, d = function(e, t) {
|
|
3118
3119
|
for (var n = 0; n < e.length; n++) {
|
|
3119
3120
|
var r = e[n];
|
|
3120
|
-
if (r.type ===
|
|
3121
|
+
if (r.type === q.paragraph && r.children) for (var i = r.children, a = 0; a < i.length; a++) {
|
|
3121
3122
|
var o = i[a];
|
|
3122
|
-
if (o.type ===
|
|
3123
|
+
if (o.type === q.htmlSelfClosing && o.b && o.tag.toLowerCase() === t) {
|
|
3123
3124
|
var s = e.slice(0, n);
|
|
3124
3125
|
a > 0 && s.push({
|
|
3125
|
-
type:
|
|
3126
|
+
type: q.paragraph,
|
|
3126
3127
|
children: i.slice(0, a)
|
|
3127
3128
|
});
|
|
3128
3129
|
var c = [];
|
|
3129
3130
|
if (a + 1 < i.length) {
|
|
3130
3131
|
var l = i.slice(a + 1);
|
|
3131
3132
|
l = l.filter(function(e) {
|
|
3132
|
-
return !(e.type ===
|
|
3133
|
+
return !(e.type === q.htmlSelfClosing && e.b);
|
|
3133
3134
|
}), l.length > 0 && (c = l);
|
|
3134
3135
|
}
|
|
3135
3136
|
return c = c.concat(e.slice(n + 1)), {
|
|
@@ -3139,7 +3140,7 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3139
3140
|
};
|
|
3140
3141
|
}
|
|
3141
3142
|
}
|
|
3142
|
-
if ((r.type ===
|
|
3143
|
+
if ((r.type === q.htmlSelfClosing || r.type === q.htmlBlock) && r.b && r.tag.toLowerCase() === t) return {
|
|
3143
3144
|
found: !0,
|
|
3144
3145
|
beforeClose: e.slice(0, n),
|
|
3145
3146
|
afterClose: e.slice(n + 1)
|
|
@@ -3150,28 +3151,28 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3150
3151
|
beforeClose: e,
|
|
3151
3152
|
afterClose: []
|
|
3152
3153
|
};
|
|
3153
|
-
}, f = g.tag.toLowerCase(), _ =
|
|
3154
|
+
}, f = g.tag.toLowerCase(), _ = ut(f), v = g.children && g.children.length > 0, y = /<[a-z][^>]{0,100}>/i.test(g.a);
|
|
3154
3155
|
if (_) {
|
|
3155
3156
|
let t = g.a.replace(RegExp("\\s*</" + f + ">\\s*$", "i"), "");
|
|
3156
|
-
return c.tagfilter && (t =
|
|
3157
|
+
return c.tagfilter && (t = $e(t)), y ? l(e.tag, {
|
|
3157
3158
|
key: r.key,
|
|
3158
|
-
...
|
|
3159
|
+
...Y(e.attrs || {}),
|
|
3159
3160
|
dangerouslySetInnerHTML: { __html: t }
|
|
3160
3161
|
}) : l(e.tag, {
|
|
3161
3162
|
key: r.key,
|
|
3162
|
-
...
|
|
3163
|
+
...Y(e.attrs || {})
|
|
3163
3164
|
}, t);
|
|
3164
3165
|
}
|
|
3165
3166
|
let b = RegExp(`^<${g.tag}(\\s|>)`, "i").test(g.a);
|
|
3166
|
-
if (v && !b && c.tagfilter &&
|
|
3167
|
+
if (v && !b && c.tagfilter && Qe(g.a)) return l(e.tag, {
|
|
3167
3168
|
key: r.key,
|
|
3168
|
-
...
|
|
3169
|
+
...Y(e.attrs || {})
|
|
3169
3170
|
}, t(g.children, r));
|
|
3170
|
-
if (
|
|
3171
|
-
let t = c.tagfilter ?
|
|
3171
|
+
if (dt(g.a)) {
|
|
3172
|
+
let t = c.tagfilter ? $e(g.a) : g.a;
|
|
3172
3173
|
return l(e.tag, {
|
|
3173
3174
|
key: r.key,
|
|
3174
|
-
...
|
|
3175
|
+
...Y(e.attrs || {}),
|
|
3175
3176
|
dangerouslySetInnerHTML: { __html: t }
|
|
3176
3177
|
});
|
|
3177
3178
|
}
|
|
@@ -3182,12 +3183,12 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3182
3183
|
}, S = g.a.replace(/>\s+</g, "><").replace(/\n+/g, " ").trim();
|
|
3183
3184
|
if (RegExp(`^<${g.tag}(\\s[^>]*)?>(\\s*</${g.tag}>)?$`, "i").test(S)) return g.children && g.children.length > 0 ? l(e.tag, {
|
|
3184
3185
|
key: r.key,
|
|
3185
|
-
...
|
|
3186
|
+
...Y(e.attrs || {})
|
|
3186
3187
|
}, t(g.children, r)) : l(e.tag, {
|
|
3187
3188
|
key: r.key,
|
|
3188
|
-
...
|
|
3189
|
+
...Y(e.attrs || {})
|
|
3189
3190
|
});
|
|
3190
|
-
let C =
|
|
3191
|
+
let C = kn(S, {
|
|
3191
3192
|
inline: !1,
|
|
3192
3193
|
refs: s,
|
|
3193
3194
|
inHTML: !1
|
|
@@ -3196,33 +3197,33 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3196
3197
|
let w = g.tag.toLowerCase(), T = "</" + w + ">", E = RegExp(`^<${g.tag}(\\s|>)`, "i").test(S), D = S.toLowerCase().trimEnd().endsWith(T), O = E && D;
|
|
3197
3198
|
if (O && v) return l(e.tag, {
|
|
3198
3199
|
key: r.key,
|
|
3199
|
-
...
|
|
3200
|
+
...Y(e.attrs || {})
|
|
3200
3201
|
}, t(g.children, r));
|
|
3201
3202
|
if (O) return t(C.flatMap(i), r);
|
|
3202
3203
|
var p = d(C, w);
|
|
3203
3204
|
if (p.found && p.afterClose.length > 0) {
|
|
3204
3205
|
var m = p.beforeClose.flatMap(i), h = p.afterClose.flatMap(i);
|
|
3205
|
-
return
|
|
3206
|
+
return Mn(n.Fragment, { children: [l(e.tag, {
|
|
3206
3207
|
key: r.key,
|
|
3207
|
-
...
|
|
3208
|
+
...Y(e.attrs || {})
|
|
3208
3209
|
}, t(m, r)), t(h, r)] }, null);
|
|
3209
3210
|
}
|
|
3210
3211
|
return l(e.tag, {
|
|
3211
3212
|
key: r.key,
|
|
3212
|
-
...
|
|
3213
|
+
...Y(e.attrs || {})
|
|
3213
3214
|
}, t(C.flatMap(i), r));
|
|
3214
3215
|
}
|
|
3215
3216
|
return Te(e.tag) ? l(e.tag, {
|
|
3216
3217
|
key: r.key,
|
|
3217
|
-
...
|
|
3218
|
+
...Y(e.attrs || {})
|
|
3218
3219
|
}) : l(e.tag, {
|
|
3219
3220
|
key: r.key,
|
|
3220
|
-
...
|
|
3221
|
+
...Y(e.attrs || {})
|
|
3221
3222
|
}, e.children ? t(e.children, r) : "");
|
|
3222
3223
|
}
|
|
3223
|
-
case
|
|
3224
|
+
case q.htmlSelfClosing: {
|
|
3224
3225
|
let t = e;
|
|
3225
|
-
if (c.tagfilter &&
|
|
3226
|
+
if (c.tagfilter && Ze(t.tag)) {
|
|
3226
3227
|
var u = "";
|
|
3227
3228
|
if (t.attrs) for (var d in t.attrs) {
|
|
3228
3229
|
var f = t.attrs[d];
|
|
@@ -3232,10 +3233,10 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3232
3233
|
}
|
|
3233
3234
|
return l(e.tag, {
|
|
3234
3235
|
key: r.key,
|
|
3235
|
-
...
|
|
3236
|
+
...Y(e.attrs || {})
|
|
3236
3237
|
});
|
|
3237
3238
|
}
|
|
3238
|
-
case
|
|
3239
|
+
case q.image: {
|
|
3239
3240
|
let t = e.target == null ? null : a(e.target, "img", "src");
|
|
3240
3241
|
return i("img", {
|
|
3241
3242
|
key: r.key,
|
|
@@ -3244,11 +3245,11 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3244
3245
|
src: t || void 0
|
|
3245
3246
|
});
|
|
3246
3247
|
}
|
|
3247
|
-
case
|
|
3248
|
+
case q.link: {
|
|
3248
3249
|
let n = { key: r.key };
|
|
3249
|
-
return e.target != null && (n.href =
|
|
3250
|
+
return e.target != null && (n.href = qe(e.target)), e.title && (n.title = e.title), i("a", n, t(e.children, r));
|
|
3250
3251
|
}
|
|
3251
|
-
case
|
|
3252
|
+
case q.table: {
|
|
3252
3253
|
let n = e;
|
|
3253
3254
|
return i("table", { key: r.key }, i("thead", { key: "thead" }, i("tr", null, n.header.map(function(e, a) {
|
|
3254
3255
|
return i("th", {
|
|
@@ -3264,21 +3265,21 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3264
3265
|
}));
|
|
3265
3266
|
})));
|
|
3266
3267
|
}
|
|
3267
|
-
case
|
|
3268
|
-
case
|
|
3269
|
-
case
|
|
3270
|
-
case
|
|
3268
|
+
case q.text: return e.text;
|
|
3269
|
+
case q.textFormatted: return i(e.tag, { key: r.key }, t(e.children, r));
|
|
3270
|
+
case q.orderedList:
|
|
3271
|
+
case q.unorderedList: return i(e.type === q.orderedList ? "ol" : "ul", {
|
|
3271
3272
|
key: r.key,
|
|
3272
|
-
start: e.type ===
|
|
3273
|
+
start: e.type === q.orderedList ? e.start : void 0
|
|
3273
3274
|
}, e.items.map(function(e, n) {
|
|
3274
3275
|
return i("li", { key: n }, t(e, r));
|
|
3275
3276
|
}));
|
|
3276
|
-
case
|
|
3277
|
-
case
|
|
3277
|
+
case q.paragraph: return i("p", { key: r.key }, t(e.children, r));
|
|
3278
|
+
case q.ref: return null;
|
|
3278
3279
|
default: return null;
|
|
3279
3280
|
}
|
|
3280
3281
|
}
|
|
3281
|
-
var
|
|
3282
|
+
var Fn = (e, t, n, r, i, a, o) => {
|
|
3282
3283
|
var s = (e) => e.map(function(e) {
|
|
3283
3284
|
return "text" in e ? e.text : "";
|
|
3284
3285
|
}), c = (l, u = {}) => {
|
|
@@ -3287,7 +3288,7 @@ var Mn = (e, t, n, r, i, a, o) => {
|
|
|
3287
3288
|
u.renderDepth = d;
|
|
3288
3289
|
for (var f = u.key, p = [], m = !1, h = 0; h < l.length; h++) {
|
|
3289
3290
|
u.key = h;
|
|
3290
|
-
var g = e ? e(
|
|
3291
|
+
var g = e ? e(Pn.bind(null, l[h], c, u, t, n, r, i, a, o), l[h], c, u) : Pn(l[h], c, u, t, n, r, i, a, o), _ = typeof g == "string";
|
|
3291
3292
|
if (_ && m) p[p.length - 1] += g;
|
|
3292
3293
|
else if (g !== null) if (Array.isArray(g)) for (var v = 0; v < g.length; v++) p.push(g[v]);
|
|
3293
3294
|
else p.push(g);
|
|
@@ -3296,21 +3297,21 @@ var Mn = (e, t, n, r, i, a, o) => {
|
|
|
3296
3297
|
return u.key = f, u.renderDepth = d - 1, p;
|
|
3297
3298
|
};
|
|
3298
3299
|
return c;
|
|
3299
|
-
},
|
|
3300
|
-
let n =
|
|
3301
|
-
return n ? typeof n == "function" || typeof n == "object" && "render" in n ? n :
|
|
3300
|
+
}, In = (e, t) => {
|
|
3301
|
+
let n = Ke(t, e, void 0);
|
|
3302
|
+
return n ? typeof n == "function" || typeof n == "object" && "render" in n ? n : Ke(t, `${e}.component`, e) : e;
|
|
3302
3303
|
};
|
|
3303
|
-
function
|
|
3304
|
+
function Ln(e, t) {
|
|
3304
3305
|
let n = { ...t || {} };
|
|
3305
3306
|
n.overrides = n.overrides || {};
|
|
3306
|
-
let r = n.slugify || Z, i = n.sanitizer ||
|
|
3307
|
+
let r = n.slugify || Z, i = n.sanitizer || xe, a = n.createElement, o = n.overrides && Object.keys(n.overrides).length > 0, s = (e) => Rn(e, {
|
|
3307
3308
|
...n,
|
|
3308
3309
|
wrapper: null
|
|
3309
3310
|
});
|
|
3310
3311
|
function c(e) {
|
|
3311
3312
|
for (var t in e) {
|
|
3312
3313
|
var n = e[t];
|
|
3313
|
-
if (typeof n == "string" && n.length > 0 && n.charCodeAt(0) === T && (
|
|
3314
|
+
if (typeof n == "string" && n.length > 0 && n.charCodeAt(0) === T && (et.test(n) || tt.test(n) || On(n, 0))) {
|
|
3314
3315
|
var r = s(n.trim());
|
|
3315
3316
|
e[t] = t === "innerHTML" && Array.isArray(r) ? r[0] : r;
|
|
3316
3317
|
}
|
|
@@ -3319,16 +3320,16 @@ function Pn(e, t) {
|
|
|
3319
3320
|
function l(e, t, ...r) {
|
|
3320
3321
|
var i = t || {}, s = e;
|
|
3321
3322
|
if (o) {
|
|
3322
|
-
var c =
|
|
3323
|
-
s =
|
|
3323
|
+
var c = Ke(n.overrides, e + ".props", {});
|
|
3324
|
+
s = In(e, n.overrides), i = {
|
|
3324
3325
|
...i,
|
|
3325
3326
|
...c,
|
|
3326
|
-
className:
|
|
3327
|
+
className: Je(i.className, c.className) || void 0
|
|
3327
3328
|
};
|
|
3328
3329
|
}
|
|
3329
3330
|
if (!a) {
|
|
3330
3331
|
var l = i.key;
|
|
3331
|
-
return l != null && delete i.key, r.length === 1 ? i.children = r[0] : r.length > 1 && (i.children = r),
|
|
3332
|
+
return l != null && delete i.key, r.length === 1 ? i.children = r[0] : r.length > 1 && (i.children = r), Mn(s, i, l);
|
|
3332
3333
|
}
|
|
3333
3334
|
return a(s, i, ...r);
|
|
3334
3335
|
}
|
|
@@ -3340,16 +3341,12 @@ function Pn(e, t) {
|
|
|
3340
3341
|
slugify: n.slugify ? (e) => n.slugify(e, Z) : Z,
|
|
3341
3342
|
sanitizer: i,
|
|
3342
3343
|
tagfilter: n.tagfilter !== !1
|
|
3343
|
-
}, f = e[0] && e[0].type ===
|
|
3344
|
+
}, f = e[0] && e[0].type === q.refCollection ? e[0].refs : {}, p = Fn(n.renderRule, l, i, r, f, n, u), m = p(e, {
|
|
3344
3345
|
inline: n.forceInline,
|
|
3345
3346
|
refs: f
|
|
3346
|
-
}), h =
|
|
3347
|
-
for (let e in f) e.charCodeAt(0) === g && h.push({
|
|
3348
|
-
identifier: e,
|
|
3349
|
-
footnote: f[e].target
|
|
3350
|
-
});
|
|
3347
|
+
}), h = Ge(f);
|
|
3351
3348
|
if (h.length && m.push(l("footer", { key: "footer" }, h.map(function(e) {
|
|
3352
|
-
let t = e.identifier.charCodeAt(0) === g ? e.identifier.slice(1) : e.identifier, n =
|
|
3349
|
+
let t = e.identifier.charCodeAt(0) === g ? e.identifier.slice(1) : e.identifier, n = kn(e.footnote, {
|
|
3353
3350
|
inline: !0,
|
|
3354
3351
|
refs: f
|
|
3355
3352
|
}, d);
|
|
@@ -3365,14 +3362,14 @@ function Pn(e, t) {
|
|
|
3365
3362
|
if (m.length > 1 || n.forceWrapper) v = m;
|
|
3366
3363
|
else return m.length === 1 ? m[0] : null;
|
|
3367
3364
|
var y = n.wrapperProps ? { ...n.wrapperProps } : {};
|
|
3368
|
-
return y.children = v,
|
|
3365
|
+
return y.children = v, Mn(_, y, "outer");
|
|
3369
3366
|
}
|
|
3370
|
-
function
|
|
3367
|
+
function Rn(e = "", t = {}) {
|
|
3371
3368
|
let n = { ...t || {} };
|
|
3372
3369
|
n.overrides = n.overrides || {};
|
|
3373
|
-
let r = n.sanitizer ||
|
|
3370
|
+
let r = n.sanitizer || xe;
|
|
3374
3371
|
function i(e) {
|
|
3375
|
-
let t = n.forceInline || !n.forceBlock && !
|
|
3372
|
+
let t = n.forceInline || !n.forceBlock && !ve.test(e), i = {
|
|
3376
3373
|
...n,
|
|
3377
3374
|
slugify: n.slugify ? (e) => n.slugify(e, Z) : Z,
|
|
3378
3375
|
sanitizer: r,
|
|
@@ -3381,7 +3378,7 @@ function Fn(e = "", t = {}) {
|
|
|
3381
3378
|
if (!t) {
|
|
3382
3379
|
let e = o.length;
|
|
3383
3380
|
for (; e > 0 && (o[e - 1] === "\n" || o[e - 1] === "\r");) e--;
|
|
3384
|
-
o = o.slice(0, e), o = `${o.replace(
|
|
3381
|
+
o = o.slice(0, e), o = `${o.replace(An, "")}
|
|
3385
3382
|
|
|
3386
3383
|
`;
|
|
3387
3384
|
}
|
|
@@ -3389,7 +3386,7 @@ function Fn(e = "", t = {}) {
|
|
|
3389
3386
|
var s = o.lastIndexOf("<");
|
|
3390
3387
|
s !== -1 && o.indexOf(">", s) === -1 && (o = o.slice(0, s)), s = e.lastIndexOf("<"), s !== -1 && e.indexOf(">", s) === -1 && (e = e.slice(0, s));
|
|
3391
3388
|
}
|
|
3392
|
-
return
|
|
3389
|
+
return Ln(kn(t ? e : o, {
|
|
3393
3390
|
inline: t,
|
|
3394
3391
|
refs: a
|
|
3395
3392
|
}, i), {
|
|
@@ -3400,8 +3397,8 @@ function Fn(e = "", t = {}) {
|
|
|
3400
3397
|
let a = {};
|
|
3401
3398
|
return i(e);
|
|
3402
3399
|
}
|
|
3403
|
-
var
|
|
3404
|
-
if (!(typeof n.useContext < "u")) return
|
|
3400
|
+
var zn = ({ children: e, options: t, ...r }) => {
|
|
3401
|
+
if (!(typeof n.useContext < "u")) return Rn(e ?? "", {
|
|
3405
3402
|
...t,
|
|
3406
3403
|
overrides: { ...t?.overrides },
|
|
3407
3404
|
wrapperProps: {
|
|
@@ -3409,7 +3406,7 @@ var In = ({ children: e, options: t, ...r }) => {
|
|
|
3409
3406
|
...r
|
|
3410
3407
|
}
|
|
3411
3408
|
});
|
|
3412
|
-
let i = n.useContext(
|
|
3409
|
+
let i = n.useContext(Nn), a = n.useMemo(() => ({
|
|
3413
3410
|
...i,
|
|
3414
3411
|
...t,
|
|
3415
3412
|
overrides: {
|
|
@@ -3426,8 +3423,8 @@ var In = ({ children: e, options: t, ...r }) => {
|
|
|
3426
3423
|
t,
|
|
3427
3424
|
r
|
|
3428
3425
|
]), o = e ?? "";
|
|
3429
|
-
return n.useMemo(() =>
|
|
3430
|
-
},
|
|
3426
|
+
return n.useMemo(() => Rn(o, a), [o, a]);
|
|
3427
|
+
}, Bn = /* @__PURE__ */ e({ default: () => Un }), Vn = {
|
|
3431
3428
|
small: {
|
|
3432
3429
|
1: "dc:text-lg",
|
|
3433
3430
|
2: "dc:text-base",
|
|
@@ -3443,11 +3440,11 @@ var In = ({ children: e, options: t, ...r }) => {
|
|
|
3443
3440
|
2: "dc:text-4xl",
|
|
3444
3441
|
3: "dc:text-3xl"
|
|
3445
3442
|
}
|
|
3446
|
-
},
|
|
3443
|
+
}, Hn = {
|
|
3447
3444
|
1: "dc:mb-4",
|
|
3448
3445
|
2: "dc:mb-3",
|
|
3449
3446
|
3: "dc:mb-2"
|
|
3450
|
-
},
|
|
3447
|
+
}, Un = r.memo(function({ displayConfig: e = {}, height: n = "100%", colorPalette: r }) {
|
|
3451
3448
|
let { t: s } = t(), c = e.content || "", l = e.accentColorIndex ?? 0, u = e.fontSize || "medium", d = e.alignment || "left", f = !!e.transparentBackground, p = e.accentBorder || "none", m = i(() => r?.colors && l < r.colors.length ? r.colors[l] : "#8884d8", [r, l]), h = {
|
|
3452
3449
|
small: "dc:text-sm",
|
|
3453
3450
|
medium: "dc:text-lg",
|
|
@@ -3458,15 +3455,15 @@ var In = ({ children: e, options: t, ...r }) => {
|
|
|
3458
3455
|
right: "dc:text-right"
|
|
3459
3456
|
}, _ = i(() => ({ overrides: {
|
|
3460
3457
|
h1: { props: {
|
|
3461
|
-
className: `dc:font-bold ${
|
|
3458
|
+
className: `dc:font-bold ${Vn[u]?.[1] || "dc:text-3xl"} ${Hn[1]}`,
|
|
3462
3459
|
style: { color: m }
|
|
3463
3460
|
} },
|
|
3464
3461
|
h2: { props: {
|
|
3465
|
-
className: `dc:font-bold ${
|
|
3462
|
+
className: `dc:font-bold ${Vn[u]?.[2] || "dc:text-2xl"} ${Hn[2]}`,
|
|
3466
3463
|
style: { color: m }
|
|
3467
3464
|
} },
|
|
3468
3465
|
h3: { props: {
|
|
3469
|
-
className: `dc:font-bold ${
|
|
3466
|
+
className: `dc:font-bold ${Vn[u]?.[3] || "dc:text-xl"} ${Hn[3]}`,
|
|
3470
3467
|
style: { color: m }
|
|
3471
3468
|
} },
|
|
3472
3469
|
p: { props: { className: "dc:mb-3 dc:leading-relaxed text-dc-text" } },
|
|
@@ -3526,13 +3523,13 @@ var In = ({ children: e, options: t, ...r }) => {
|
|
|
3526
3523
|
height: n === "100%" ? "100%" : n,
|
|
3527
3524
|
...v
|
|
3528
3525
|
},
|
|
3529
|
-
children: /* @__PURE__ */ a(
|
|
3526
|
+
children: /* @__PURE__ */ a(zn, {
|
|
3530
3527
|
options: _,
|
|
3531
3528
|
children: c
|
|
3532
3529
|
})
|
|
3533
3530
|
});
|
|
3534
3531
|
});
|
|
3535
3532
|
//#endregion
|
|
3536
|
-
export {
|
|
3533
|
+
export { Bn as n, zn as r, Un as t };
|
|
3537
3534
|
|
|
3538
|
-
//# sourceMappingURL=chart-markdown-
|
|
3535
|
+
//# sourceMappingURL=chart-markdown-BPW-EAm9.js.map
|