drizzle-cube 0.5.6 → 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-C0nUppAK.cjs → handler-C63rJUUK.cjs} +2 -2
- package/dist/adapters/{handler-Odsi9_Rd.js → handler-Dz1F4iwf.js} +4 -4
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +4 -4
- package/dist/adapters/{locale-Dv6bl_eU.cjs → locale-CTNwPVZI.cjs} +6 -6
- package/dist/adapters/{locale-Dy3LcTwN.js → locale-gU_d1Wja.js} +16 -1
- 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-DklqMBHn.cjs → utils-CkEkU8Bo.cjs} +2 -2
- package/dist/adapters/{utils-Bd5mzZfk.js → utils-DosuoabY.js} +8 -6
- 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-BiJwVv0b.js → DashboardEditModal-6KRE36mm.js} +6231 -3453
- package/dist/client/chunks/DashboardEditModal-6KRE36mm.js.map +1 -0
- package/dist/client/chunks/{RetentionCombinedChart-CivIny9P.js → RetentionCombinedChart-CCpu0C-s.js} +4 -4
- package/dist/client/chunks/{RetentionCombinedChart-CivIny9P.js.map → RetentionCombinedChart-CCpu0C-s.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-BHCgwZmB.js → RetentionHeatmap-B24PiIfr.js} +3 -3
- package/dist/client/chunks/{RetentionHeatmap-BHCgwZmB.js.map → RetentionHeatmap-B24PiIfr.js.map} +1 -1
- package/dist/client/chunks/{af-ZA-BdL6DOWy.js → af-ZA-BTaChuqI.js} +1 -1
- package/dist/client/chunks/{af-ZA-BdL6DOWy.js.map → af-ZA-BTaChuqI.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-DmyRh2O3.js → analysis-builder-shared-x576-O5p.js} +289 -289
- package/dist/client/chunks/{analysis-builder-shared-DmyRh2O3.js.map → analysis-builder-shared-x576-O5p.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-MoGvbMRe.js → analysis-builder-zd48FVJO.js} +244 -244
- package/dist/client/chunks/{analysis-builder-MoGvbMRe.js.map → analysis-builder-zd48FVJO.js.map} +1 -1
- package/dist/client/chunks/{chart-activity-grid-Bdb8U_NC.js → chart-activity-grid-CiHrLH6Y.js} +6 -6
- package/dist/client/chunks/{chart-activity-grid-Bdb8U_NC.js.map → chart-activity-grid-CiHrLH6Y.js.map} +1 -1
- package/dist/client/chunks/{chart-area-BZEnT-tf.js → chart-area-CXFK-Grv.js} +3 -3
- package/dist/client/chunks/{chart-area-BZEnT-tf.js.map → chart-area-CXFK-Grv.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-CTmdv_v0.js → chart-bar-DKXfLoGG.js} +4 -4
- package/dist/client/chunks/{chart-bar-CTmdv_v0.js.map → chart-bar-DKXfLoGG.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-CYObdFtp.js → chart-box-plot-Bu9hy-17.js} +3 -3
- package/dist/client/chunks/{chart-box-plot-CYObdFtp.js.map → chart-box-plot-Bu9hy-17.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-CjFprySz.js → chart-bubble-DGkTQlxM.js} +3 -3
- package/dist/client/chunks/{chart-bubble-CjFprySz.js.map → chart-bubble-DGkTQlxM.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-D2HoM3B5.js → chart-candlestick-Dau5AF4E.js} +3 -3
- package/dist/client/chunks/{chart-candlestick-D2HoM3B5.js.map → chart-candlestick-Dau5AF4E.js.map} +1 -1
- package/dist/client/chunks/{chart-config-activity-grid-Bom99j9m.js → chart-config-activity-grid-D_UX4NHC.js} +2 -2
- package/dist/client/chunks/{chart-config-activity-grid-Bom99j9m.js.map → chart-config-activity-grid-D_UX4NHC.js.map} +1 -1
- package/dist/client/chunks/{chart-config-area-DtYTKZxS.js → chart-config-area-Bq_UsW3x.js} +2 -2
- package/dist/client/chunks/{chart-config-area-DtYTKZxS.js.map → chart-config-area-Bq_UsW3x.js.map} +1 -1
- package/dist/client/chunks/{chart-config-bar-7v5JVY2y.js → chart-config-bar-_JEGZnAu.js} +2 -2
- package/dist/client/chunks/{chart-config-bar-7v5JVY2y.js.map → chart-config-bar-_JEGZnAu.js.map} +1 -1
- package/dist/client/chunks/{chart-config-box-plot-BHGv-wqu.js → chart-config-box-plot-DJ-dWWXA.js} +2 -2
- package/dist/client/chunks/{chart-config-box-plot-BHGv-wqu.js.map → chart-config-box-plot-DJ-dWWXA.js.map} +1 -1
- package/dist/client/chunks/{chart-config-bubble-BkHm-mfu.js → chart-config-bubble-gIoqVyjZ.js} +2 -2
- package/dist/client/chunks/{chart-config-bubble-BkHm-mfu.js.map → chart-config-bubble-gIoqVyjZ.js.map} +1 -1
- package/dist/client/chunks/{chart-config-candlestick-D1aaHvTe.js → chart-config-candlestick-N6DchAA3.js} +2 -2
- package/dist/client/chunks/{chart-config-candlestick-D1aaHvTe.js.map → chart-config-candlestick-N6DchAA3.js.map} +1 -1
- package/dist/client/chunks/{chart-config-data-table-B_Hw8w2J.js → chart-config-data-table-d7VBY-y_.js} +2 -2
- package/dist/client/chunks/{chart-config-data-table-B_Hw8w2J.js.map → chart-config-data-table-d7VBY-y_.js.map} +1 -1
- package/dist/client/chunks/{chart-config-funnel-DL8PSGuL.js → chart-config-funnel-DEYMcxsD.js} +2 -2
- package/dist/client/chunks/{chart-config-funnel-DL8PSGuL.js.map → chart-config-funnel-DEYMcxsD.js.map} +1 -1
- package/dist/client/chunks/{chart-config-gauge-BVLxuA3f.js → chart-config-gauge-DSwC04l0.js} +2 -2
- package/dist/client/chunks/{chart-config-gauge-BVLxuA3f.js.map → chart-config-gauge-DSwC04l0.js.map} +1 -1
- package/dist/client/chunks/{chart-config-heat-map-CjudGdui.js → chart-config-heat-map-CfRnRNcw.js} +2 -2
- package/dist/client/chunks/{chart-config-heat-map-CjudGdui.js.map → chart-config-heat-map-CfRnRNcw.js.map} +1 -1
- package/dist/client/chunks/{chart-config-kpi-delta-Bf47hGqD.js → chart-config-kpi-delta-D6BIkHL3.js} +2 -2
- package/dist/client/chunks/{chart-config-kpi-delta-Bf47hGqD.js.map → chart-config-kpi-delta-D6BIkHL3.js.map} +1 -1
- package/dist/client/chunks/{chart-config-kpi-number-QTQRNgOi.js → chart-config-kpi-number-Bx-V9a62.js} +2 -2
- package/dist/client/chunks/{chart-config-kpi-number-QTQRNgOi.js.map → chart-config-kpi-number-Bx-V9a62.js.map} +1 -1
- package/dist/client/chunks/{chart-config-kpi-text-BRze2eyh.js → chart-config-kpi-text-CcqC1u-8.js} +2 -2
- package/dist/client/chunks/{chart-config-kpi-text-BRze2eyh.js.map → chart-config-kpi-text-CcqC1u-8.js.map} +1 -1
- package/dist/client/chunks/{chart-config-line-BFeCqmKH.js → chart-config-line-Db3jDsWc.js} +2 -2
- package/dist/client/chunks/{chart-config-line-BFeCqmKH.js.map → chart-config-line-Db3jDsWc.js.map} +1 -1
- package/dist/client/chunks/{chart-config-markdown-EWYckwXv.js → chart-config-markdown-BtRIe8JN.js} +2 -2
- package/dist/client/chunks/{chart-config-markdown-EWYckwXv.js.map → chart-config-markdown-BtRIe8JN.js.map} +1 -1
- package/dist/client/chunks/{chart-config-measure-profile-B9nIhqKR.js → chart-config-measure-profile-DxRGa-zf.js} +2 -2
- package/dist/client/chunks/{chart-config-measure-profile-B9nIhqKR.js.map → chart-config-measure-profile-DxRGa-zf.js.map} +1 -1
- package/dist/client/chunks/{chart-config-pie-6LHtEyMM.js → chart-config-pie-DD4SmRTF.js} +2 -2
- package/dist/client/chunks/{chart-config-pie-6LHtEyMM.js.map → chart-config-pie-DD4SmRTF.js.map} +1 -1
- package/dist/client/chunks/{chart-config-radar-BuLS6Inn.js → chart-config-radar-CC2XAaGr.js} +2 -2
- package/dist/client/chunks/{chart-config-radar-BuLS6Inn.js.map → chart-config-radar-CC2XAaGr.js.map} +1 -1
- package/dist/client/chunks/{chart-config-radial-bar-BP0eMohx.js → chart-config-radial-bar-DmxKx1R0.js} +2 -2
- package/dist/client/chunks/{chart-config-radial-bar-BP0eMohx.js.map → chart-config-radial-bar-DmxKx1R0.js.map} +1 -1
- package/dist/client/chunks/{chart-config-sankey-CT8oGIGP.js → chart-config-sankey-BTnWA7EW.js} +2 -2
- package/dist/client/chunks/{chart-config-sankey-CT8oGIGP.js.map → chart-config-sankey-BTnWA7EW.js.map} +1 -1
- package/dist/client/chunks/{chart-config-scatter-DOSpN07Z.js → chart-config-scatter-DSYTjwRb.js} +2 -2
- package/dist/client/chunks/{chart-config-scatter-DOSpN07Z.js.map → chart-config-scatter-DSYTjwRb.js.map} +1 -1
- package/dist/client/chunks/{chart-config-sunburst-BSUX_YoB.js → chart-config-sunburst-Bwjtdf7X.js} +2 -2
- package/dist/client/chunks/{chart-config-sunburst-BSUX_YoB.js.map → chart-config-sunburst-Bwjtdf7X.js.map} +1 -1
- package/dist/client/chunks/{chart-config-tree-map-D8GuAgVB.js → chart-config-tree-map-BI-oQStO.js} +2 -2
- package/dist/client/chunks/{chart-config-tree-map-D8GuAgVB.js.map → chart-config-tree-map-BI-oQStO.js.map} +1 -1
- package/dist/client/chunks/{chart-config-waterfall-BDi7BoJP.js → chart-config-waterfall-DSnyixbI.js} +2 -2
- package/dist/client/chunks/{chart-config-waterfall-BDi7BoJP.js.map → chart-config-waterfall-DSnyixbI.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-DT4uBZaq.js → chart-data-table-Cm5jrpaw.js} +842 -834
- package/dist/client/chunks/chart-data-table-Cm5jrpaw.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-B9crR3b3.js → chart-funnel-Eke8IPtG.js} +3 -3
- package/dist/client/chunks/{chart-funnel-B9crR3b3.js.map → chart-funnel-Eke8IPtG.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-DAMFsicz.js → chart-gauge-DeRZNsyl.js} +3 -3
- package/dist/client/chunks/{chart-gauge-DAMFsicz.js.map → chart-gauge-DeRZNsyl.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-BxgM_X1G.js → chart-heat-map-C86thSJ4.js} +3 -3
- package/dist/client/chunks/{chart-heat-map-BxgM_X1G.js.map → chart-heat-map-C86thSJ4.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-DJKL02Ut.js → chart-kpi-delta-CxOYD2f1.js} +6 -6
- package/dist/client/chunks/{chart-kpi-delta-DJKL02Ut.js.map → chart-kpi-delta-CxOYD2f1.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-CuNEYbRx.js → chart-kpi-number-C6gWz-x4.js} +8 -8
- package/dist/client/chunks/{chart-kpi-number-CuNEYbRx.js.map → chart-kpi-number-C6gWz-x4.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-u8FJaZDQ.js → chart-kpi-text-dDONrhS-.js} +4 -4
- package/dist/client/chunks/{chart-kpi-text-u8FJaZDQ.js.map → chart-kpi-text-dDONrhS-.js.map} +1 -1
- package/dist/client/chunks/{chart-line-BZhzOjRl.js → chart-line-r4iWevKZ.js} +4 -4
- package/dist/client/chunks/{chart-line-BZhzOjRl.js.map → chart-line-r4iWevKZ.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-DEtjn8gx.js → chart-markdown-BPW-EAm9.js} +920 -924
- package/dist/client/chunks/chart-markdown-BPW-EAm9.js.map +1 -0
- package/dist/client/chunks/{chart-measure-profile-BnpIOS4Q.js → chart-measure-profile-BI3kADCp.js} +4 -4
- package/dist/client/chunks/{chart-measure-profile-BnpIOS4Q.js.map → chart-measure-profile-BI3kADCp.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-CsdzxmSK.js → chart-pie-yqH2YVEI.js} +4 -4
- package/dist/client/chunks/{chart-pie-CsdzxmSK.js.map → chart-pie-yqH2YVEI.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-C_9RwMKw.js → chart-radar-B-_3v-rE.js} +4 -4
- package/dist/client/chunks/{chart-radar-C_9RwMKw.js.map → chart-radar-B-_3v-rE.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-CewRelyQ.js → chart-radial-bar-C0EgzfAF.js} +4 -4
- package/dist/client/chunks/{chart-radial-bar-CewRelyQ.js.map → chart-radial-bar-C0EgzfAF.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-ItraHWH1.js → chart-sankey-CFzjGvZX.js} +3 -3
- package/dist/client/chunks/{chart-sankey-ItraHWH1.js.map → chart-sankey-CFzjGvZX.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-k2IJbO2Y.js → chart-scatter-DZPirzwX.js} +4 -4
- package/dist/client/chunks/{chart-scatter-k2IJbO2Y.js.map → chart-scatter-DZPirzwX.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-NsFRuqi9.js → chart-sunburst-91Q2tzaB.js} +4 -4
- package/dist/client/chunks/{chart-sunburst-NsFRuqi9.js.map → chart-sunburst-91Q2tzaB.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-Cj_ewpwJ.js → chart-tree-map-Bi4axCvh.js} +4 -4
- package/dist/client/chunks/{chart-tree-map-Cj_ewpwJ.js.map → chart-tree-map-Bi4axCvh.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-C-MTFcOz.js → chart-waterfall-DcHbbPaG.js} +4 -4
- package/dist/client/chunks/{chart-waterfall-C-MTFcOz.js.map → chart-waterfall-DcHbbPaG.js.map} +1 -1
- package/dist/client/chunks/{charts-core-vZA3zPKb.js → charts-core-CrBDYN6N.js} +2 -2
- package/dist/client/chunks/{charts-core-vZA3zPKb.js.map → charts-core-CrBDYN6N.js.map} +1 -1
- package/dist/client/chunks/{core-Su6tIYhp.js → core-DsAWNRRv.js} +84 -84
- package/dist/client/chunks/{core-Su6tIYhp.js.map → core-DsAWNRRv.js.map} +1 -1
- package/dist/client/chunks/{dist-BTq3NoG3.js → dist-zPWyTBdU.js} +1 -1
- package/dist/client/chunks/{dist-BTq3NoG3.js.map → dist-zPWyTBdU.js.map} +1 -1
- package/dist/client/chunks/{en-US-D-1JPTPv.js → en-US-BE6VoG0o.js} +1 -1
- package/dist/client/chunks/{en-US-D-1JPTPv.js.map → en-US-BE6VoG0o.js.map} +1 -1
- package/dist/client/chunks/{exceljs.min-Dc1cBQ5l.js → exceljs.min-CIqBqwTW.js} +2 -2
- package/dist/client/chunks/{exceljs.min-Dc1cBQ5l.js.map → exceljs.min-CIqBqwTW.js.map} +1 -1
- package/dist/client/chunks/{javascript-YXkoOgWa.js → javascript-DFnKaHmQ.js} +3 -3
- package/dist/client/chunks/{javascript-YXkoOgWa.js.map → javascript-DFnKaHmQ.js.map} +1 -1
- package/dist/client/chunks/{json-O7MKB_4V.js → json-Cu6rbgWf.js} +1 -1
- package/dist/client/chunks/{json-O7MKB_4V.js.map → json-Cu6rbgWf.js.map} +1 -1
- package/dist/client/chunks/{nl-NL-BErZMygi.js → nl-NL-oyr2wENY.js} +1 -1
- package/dist/client/chunks/{nl-NL-BErZMygi.js.map → nl-NL-oyr2wENY.js.map} +1 -1
- 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/{schema-visualization-BY9L2nBQ.js → schema-visualization-BszcrmZX.js} +5 -5
- package/dist/client/chunks/{schema-visualization-BY9L2nBQ.js.map → schema-visualization-BszcrmZX.js.map} +1 -1
- package/dist/client/chunks/{sql-r2a-9CCK.js → sql-CmVzGP4w.js} +1 -1
- package/dist/client/chunks/{sql-r2a-9CCK.js.map → sql-CmVzGP4w.js.map} +1 -1
- package/dist/client/chunks/{useDebounce-DGfYXtkm.js → useDirtyStateTracking-B5wCDJSj.js} +99 -37
- package/dist/client/chunks/useDirtyStateTracking-B5wCDJSj.js.map +1 -0
- package/dist/client/chunks/{useExplainAI-CD0KuKwY.js → useExplainAI-CCeCYzDm.js} +19 -19
- package/dist/client/chunks/{useExplainAI-CD0KuKwY.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-D2SCtAkZ.js → utils-kqa-JIMg.js} +40 -13
- package/dist/client/chunks/utils-kqa-JIMg.js.map +1 -0
- package/dist/client/chunks/{vendor-CfR5hJGc.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/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 +7 -7
- package/dist/server/index.js +26 -9
- 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-BCtjU0lC.cjs +0 -40
- package/dist/adapters/mcp-transport-DW_Uks-O.js +0 -579
- package/dist/adapters/openai-Bgri5TJc.cjs +0 -16
- package/dist/client/chunks/DashboardEditModal-BiJwVv0b.js.map +0 -1
- package/dist/client/chunks/FieldSearchModal-DdcbCwAi.js +0 -2660
- package/dist/client/chunks/FieldSearchModal-DdcbCwAi.js.map +0 -1
- package/dist/client/chunks/chart-data-table-DT4uBZaq.js.map +0 -1
- package/dist/client/chunks/chart-markdown-DEtjn8gx.js.map +0 -1
- package/dist/client/chunks/syntaxHighlighting-5zHcjn27.js +0 -30
- package/dist/client/chunks/syntaxHighlighting-5zHcjn27.js.map +0 -1
- package/dist/client/chunks/useDebounce-DGfYXtkm.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-D2SCtAkZ.js.map +0 -1
- package/dist/client/chunks/vendor-CfR5hJGc.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/client/chunks/{rolldown-runtime-CKnJJeip.js → rolldown-runtime-CWhphoD1.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,213 +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 (!
|
|
1586
|
+
if (!me && (n.inHTML || c === 7 || we || !Q || Ge)) {
|
|
1568
1587
|
var Ye, Xe = !1;
|
|
1569
|
-
if (
|
|
1588
|
+
if (ae !== -1 && Ee) {
|
|
1570
1589
|
var Ze = !1;
|
|
1571
|
-
if (n.inHTML && oe <
|
|
1572
|
-
for (var Qe = oe; Qe <
|
|
1573
|
-
var
|
|
1574
|
-
Ze =
|
|
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 = Ze ?
|
|
1577
|
-
} else (c === 7 || n.inHTML) &&
|
|
1578
|
-
var
|
|
1579
|
-
type:
|
|
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,
|
|
1580
1599
|
tag: te,
|
|
1581
|
-
attrs:
|
|
1600
|
+
attrs: Gt(R.attrs, te, r),
|
|
1582
1601
|
f: R.whitespaceBeforeAttrs + R.rawAttrs,
|
|
1583
1602
|
children: Fe,
|
|
1584
1603
|
a: Ye,
|
|
1585
1604
|
text: Ye,
|
|
1586
1605
|
c: !0,
|
|
1587
|
-
b: !1
|
|
1588
|
-
endPos: De,
|
|
1589
|
-
e: c === 6
|
|
1606
|
+
b: !1
|
|
1590
1607
|
};
|
|
1591
|
-
return Xe && (
|
|
1592
|
-
node:
|
|
1608
|
+
return Xe && (et.k = !0), {
|
|
1609
|
+
node: et,
|
|
1593
1610
|
end: Oe
|
|
1594
1611
|
};
|
|
1595
1612
|
}
|
|
1596
1613
|
return {
|
|
1597
1614
|
node: {
|
|
1598
|
-
type:
|
|
1615
|
+
type: q.htmlBlock,
|
|
1599
1616
|
tag: te,
|
|
1600
|
-
attrs:
|
|
1617
|
+
attrs: Gt(R.attrs, te, r),
|
|
1601
1618
|
f: R.whitespaceBeforeAttrs + R.rawAttrs,
|
|
1602
1619
|
children: Fe,
|
|
1603
|
-
a:
|
|
1620
|
+
a: me ? "" : Ie,
|
|
1604
1621
|
text: Ie,
|
|
1605
1622
|
c: !1,
|
|
1606
|
-
b: !1
|
|
1607
|
-
endPos: De,
|
|
1608
|
-
e: c === 6
|
|
1623
|
+
b: !1
|
|
1609
1624
|
},
|
|
1610
1625
|
end: Oe
|
|
1611
1626
|
};
|
|
1612
1627
|
}
|
|
1613
|
-
var
|
|
1628
|
+
var tt = P.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/), it = tt ? tt[2] : "div", ct = tt ? tt[1] === "/" : !1, lt = P;
|
|
1614
1629
|
if (ct) {
|
|
1615
|
-
var
|
|
1616
|
-
|
|
1630
|
+
var ut = P.indexOf(">");
|
|
1631
|
+
ut !== -1 && (lt = P.slice(ut + 1));
|
|
1617
1632
|
}
|
|
1618
1633
|
return {
|
|
1619
1634
|
node: {
|
|
1620
|
-
type:
|
|
1621
|
-
tag:
|
|
1635
|
+
type: q.htmlBlock,
|
|
1636
|
+
tag: it,
|
|
1622
1637
|
attrs: {},
|
|
1623
1638
|
children: [],
|
|
1624
1639
|
a: lt,
|
|
1625
1640
|
text: lt,
|
|
1626
1641
|
c: !0,
|
|
1627
|
-
b: ct
|
|
1628
|
-
endPos: N,
|
|
1629
|
-
e: c === 6
|
|
1642
|
+
b: ct
|
|
1630
1643
|
},
|
|
1631
1644
|
end: L
|
|
1632
1645
|
};
|
|
1633
1646
|
}
|
|
1634
|
-
var
|
|
1635
|
-
if (!
|
|
1636
|
-
var
|
|
1637
|
-
if (!gt && !
|
|
1638
|
-
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 {
|
|
1639
1652
|
node: {
|
|
1640
|
-
type:
|
|
1641
|
-
tag:
|
|
1653
|
+
type: q.htmlSelfClosing,
|
|
1654
|
+
tag: ft,
|
|
1642
1655
|
attrs: {},
|
|
1643
|
-
a: e.slice(a,
|
|
1644
|
-
b: !0
|
|
1645
|
-
endPos: ft.end
|
|
1656
|
+
a: e.slice(a, dt.end),
|
|
1657
|
+
b: !0
|
|
1646
1658
|
},
|
|
1647
|
-
end:
|
|
1659
|
+
end: dt.end
|
|
1648
1660
|
};
|
|
1649
|
-
var _t =
|
|
1661
|
+
var _t = Yt(e, dt.end, ft), vt = [];
|
|
1650
1662
|
if (_t !== -1) {
|
|
1651
|
-
var yt = e.slice(
|
|
1663
|
+
var yt = e.slice(dt.end, Jt), bt = yt.trim();
|
|
1652
1664
|
if (bt) {
|
|
1653
|
-
var xt = yt.indexOf("\n\n") !== -1,
|
|
1654
|
-
n.inHTML = !0, n.d = (n.d || 0) + 1, xt ||
|
|
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;
|
|
1655
1667
|
}
|
|
1656
|
-
var Mt =
|
|
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);
|
|
1657
1669
|
return {
|
|
1658
1670
|
node: {
|
|
1659
|
-
type:
|
|
1660
|
-
tag:
|
|
1661
|
-
attrs:
|
|
1662
|
-
f:
|
|
1671
|
+
type: q.htmlBlock,
|
|
1672
|
+
tag: ft,
|
|
1673
|
+
attrs: Gt(dt.attrs, ft, r),
|
|
1674
|
+
f: dt.whitespaceBeforeAttrs + dt.rawAttrs,
|
|
1663
1675
|
children: vt,
|
|
1664
1676
|
a: Pt,
|
|
1665
1677
|
text: gt ? yt : Pt,
|
|
1666
1678
|
c: !0,
|
|
1667
|
-
b: !1
|
|
1668
|
-
endPos: Ft,
|
|
1669
|
-
e: !1
|
|
1679
|
+
b: !1
|
|
1670
1680
|
},
|
|
1671
1681
|
end: Nt
|
|
1672
1682
|
};
|
|
1673
1683
|
}
|
|
1674
|
-
var
|
|
1675
|
-
if (
|
|
1676
|
-
var { inline:
|
|
1677
|
-
n.inline = !1, n.inHTML = !0, n.d = (n.d || 0) + 1, vt =
|
|
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;
|
|
1678
1688
|
}
|
|
1679
|
-
var
|
|
1689
|
+
var Vt = e.slice(dt.end, Ft);
|
|
1680
1690
|
return {
|
|
1681
1691
|
node: {
|
|
1682
|
-
type:
|
|
1683
|
-
tag:
|
|
1684
|
-
attrs:
|
|
1685
|
-
f:
|
|
1692
|
+
type: q.htmlBlock,
|
|
1693
|
+
tag: ft,
|
|
1694
|
+
attrs: Gt(dt.attrs, ft, r),
|
|
1695
|
+
f: dt.whitespaceBeforeAttrs + dt.rawAttrs,
|
|
1686
1696
|
children: vt,
|
|
1687
|
-
a:
|
|
1688
|
-
text:
|
|
1697
|
+
a: Vt,
|
|
1698
|
+
text: Lt,
|
|
1689
1699
|
c: !0,
|
|
1690
|
-
b: !1
|
|
1691
|
-
endPos: It,
|
|
1692
|
-
e: !1
|
|
1700
|
+
b: !1
|
|
1693
1701
|
},
|
|
1694
|
-
end:
|
|
1702
|
+
end: It
|
|
1695
1703
|
};
|
|
1696
1704
|
}
|
|
1697
|
-
function
|
|
1705
|
+
function Zt(e, t) {
|
|
1698
1706
|
if (e.charCodeAt(t) !== T) return 0;
|
|
1699
1707
|
var n = t + 1, r = e.length;
|
|
1700
1708
|
if (e.charCodeAt(n) === O && e.charCodeAt(n + 1) === b && e.charCodeAt(n + 2) === b) return 2;
|
|
1701
1709
|
if (e.charCodeAt(n) === re) return 3;
|
|
1702
1710
|
if (e.charCodeAt(n) === O) {
|
|
1703
1711
|
var i = e.charCodeAt(n + 1);
|
|
1704
|
-
if (i >=
|
|
1712
|
+
if (i >= W && i <= G) return 4;
|
|
1705
1713
|
if (e.slice(n + 1, n + 8) === "[CDATA[") return 5;
|
|
1706
1714
|
}
|
|
1707
|
-
for (var a = e.charCodeAt(n) ===
|
|
1715
|
+
for (var a = e.charCodeAt(n) === ie, o = a ? n + 1 : n, s = o; s < r;) {
|
|
1708
1716
|
var c = e.charCodeAt(s);
|
|
1709
|
-
if (c >=
|
|
1717
|
+
if (c >= W && c <= G || c >= K && c <= pe || c >= H && c <= U || c === b) s++;
|
|
1710
1718
|
else break;
|
|
1711
1719
|
}
|
|
1712
1720
|
if (s === o) return 0;
|
|
1713
1721
|
var d = e.slice(o, s);
|
|
1714
|
-
if (
|
|
1722
|
+
if (rt.has(d.toLowerCase())) {
|
|
1715
1723
|
if (a) return 0;
|
|
1716
1724
|
var p = e.charCodeAt(s);
|
|
1717
1725
|
return +(p === l || p === u || p === _ || p === f || s >= r);
|
|
1718
1726
|
}
|
|
1719
|
-
if (
|
|
1727
|
+
if (Wt.has(d.toLowerCase())) {
|
|
1720
1728
|
if (a) {
|
|
1721
1729
|
for (var m = s; m < r && (e.charCodeAt(m) === l || e.charCodeAt(m) === u);) m++;
|
|
1722
1730
|
return m < r && e.charCodeAt(m) === _ ? 6 : 0;
|
|
1723
1731
|
}
|
|
1724
1732
|
var h = s < r ? e.charCodeAt(s) : -1;
|
|
1725
|
-
return h === l || h === u || h === _ || h === f || h ===
|
|
1733
|
+
return h === l || h === u || h === _ || h === f || h === ie || h === -1 ? 6 : 0;
|
|
1726
1734
|
}
|
|
1727
1735
|
if (a) {
|
|
1728
1736
|
for (var g = s; g < r && (e.charCodeAt(g) === l || e.charCodeAt(g) === u);) g++;
|
|
1729
1737
|
if (g < r && e.charCodeAt(g) === _) {
|
|
1730
|
-
var v =
|
|
1738
|
+
var v = Tt(e, t);
|
|
1731
1739
|
if (e.slice(g + 1, v).trim() === "") return 7;
|
|
1732
1740
|
}
|
|
1733
1741
|
} else {
|
|
1734
|
-
var y =
|
|
1742
|
+
var y = Tt(e, t), x = pt(e, t);
|
|
1735
1743
|
if (x && x.end <= y && e.slice(x.end, y).trim() === "") return 7;
|
|
1736
1744
|
}
|
|
1737
1745
|
return 0;
|
|
1738
1746
|
}
|
|
1739
|
-
function
|
|
1747
|
+
function Qt(e, t, n) {
|
|
1740
1748
|
for (var r = 0, i = e.length; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
|
|
1741
1749
|
for (; i > r && (e.charCodeAt(i - 1) === l || e.charCodeAt(i - 1) === u);) i--;
|
|
1742
|
-
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--;
|
|
1743
1751
|
for (var a = [], o = r, s = !1, c = [], d = r; d < i;) {
|
|
1744
1752
|
var f = e.charCodeAt(d);
|
|
1745
1753
|
if (f === S && d + 1 < i) {
|
|
1746
|
-
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;
|
|
1747
1755
|
continue;
|
|
1748
1756
|
}
|
|
1749
1757
|
if (f === p) {
|
|
@@ -1754,7 +1762,7 @@ function Yt(e, t, n) {
|
|
|
1754
1762
|
}
|
|
1755
1763
|
continue;
|
|
1756
1764
|
}
|
|
1757
|
-
if (f ===
|
|
1765
|
+
if (f === V) {
|
|
1758
1766
|
var _ = s ? (c.push(e.slice(o, d)), c.join("")) : e.slice(o, d);
|
|
1759
1767
|
a.push(_.trim()), d++, o = d, s = !1, c = [];
|
|
1760
1768
|
continue;
|
|
@@ -1764,50 +1772,50 @@ function Yt(e, t, n) {
|
|
|
1764
1772
|
var v = s ? (c.push(e.slice(o, i)), c.join("")) : e.slice(o, i);
|
|
1765
1773
|
return a.push(v.trim()), a.map(function(e) {
|
|
1766
1774
|
var r = e.indexOf("\\|") === -1 ? e : e.replace(/\\\|/g, "|");
|
|
1767
|
-
return
|
|
1775
|
+
return Tn(r, 0, r.length, t, n);
|
|
1768
1776
|
});
|
|
1769
1777
|
}
|
|
1770
|
-
function
|
|
1771
|
-
let i =
|
|
1778
|
+
function $t(e, t, n, r) {
|
|
1779
|
+
let i = Tt(e, t);
|
|
1772
1780
|
var a = e.indexOf("|", t);
|
|
1773
1781
|
if (a < 0 || a >= i) return null;
|
|
1774
1782
|
let o = $(e, i);
|
|
1775
1783
|
if (o >= e.length) return null;
|
|
1776
|
-
let s =
|
|
1777
|
-
if (!
|
|
1784
|
+
let s = Tt(e, o);
|
|
1785
|
+
if (!ft(e, o, s)) return null;
|
|
1778
1786
|
let c = e.slice(t, i), d = e.slice(o, s);
|
|
1779
1787
|
for (var f = [], h = 0, g = d.length; h < g && (d.charCodeAt(h) === l || d.charCodeAt(h) === u);) h++;
|
|
1780
|
-
for (h < g && d.charCodeAt(h) ===
|
|
1788
|
+
for (h < g && d.charCodeAt(h) === V && h++; h < g;) {
|
|
1781
1789
|
for (; h < g && (d.charCodeAt(h) === l || d.charCodeAt(h) === u);) h++;
|
|
1782
|
-
if (h >= g || d.charCodeAt(h) ===
|
|
1790
|
+
if (h >= g || d.charCodeAt(h) === V) break;
|
|
1783
1791
|
var y = d.charCodeAt(h) === A;
|
|
1784
1792
|
for (y && h++; h < g && d.charCodeAt(h) === b;) h++;
|
|
1785
1793
|
var x = h < g && d.charCodeAt(h) === A;
|
|
1786
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++;
|
|
1787
|
-
h < g && d.charCodeAt(h) ===
|
|
1795
|
+
h < g && d.charCodeAt(h) === V && h++;
|
|
1788
1796
|
}
|
|
1789
|
-
let S =
|
|
1797
|
+
let S = Qt(c, n, r);
|
|
1790
1798
|
if (f.length !== S.length) return null;
|
|
1791
1799
|
let T = [], E = $(e, s);
|
|
1792
1800
|
for (; E < e.length;) {
|
|
1793
|
-
let t =
|
|
1794
|
-
if (
|
|
1795
|
-
if (
|
|
1796
|
-
var D = e.charCodeAt(E +
|
|
1797
|
-
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;
|
|
1798
1806
|
if (D === p || D === m) {
|
|
1799
|
-
for (var O = E +
|
|
1807
|
+
for (var O = E + At, k = 0; O < t && e.charCodeAt(O) === D;) k++, O++;
|
|
1800
1808
|
if (k >= 3) break;
|
|
1801
1809
|
}
|
|
1802
1810
|
}
|
|
1803
|
-
T.push(
|
|
1811
|
+
T.push(Qt(i, n, r)), E = $(e, t);
|
|
1804
1812
|
}
|
|
1805
|
-
if (
|
|
1813
|
+
if (r.optimizeForStreaming && T.length === 0) return null;
|
|
1806
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([]);
|
|
1807
1815
|
else T[M].length > j && (T[M].length = j);
|
|
1808
1816
|
return {
|
|
1809
1817
|
node: {
|
|
1810
|
-
type:
|
|
1818
|
+
type: q.table,
|
|
1811
1819
|
header: S,
|
|
1812
1820
|
cells: T,
|
|
1813
1821
|
align: f
|
|
@@ -1815,19 +1823,19 @@ function Xt(e, t, n, r) {
|
|
|
1815
1823
|
end: E
|
|
1816
1824
|
};
|
|
1817
1825
|
}
|
|
1818
|
-
function
|
|
1819
|
-
if (
|
|
1820
|
-
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;
|
|
1821
1829
|
if (e.charCodeAt(r) !== h) return null;
|
|
1822
|
-
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;
|
|
1823
1831
|
n.refs ||= {};
|
|
1824
|
-
var i =
|
|
1832
|
+
var i = ht(e, r, n.refs);
|
|
1825
1833
|
return i === null ? null : {
|
|
1826
|
-
node: { type:
|
|
1834
|
+
node: { type: q.refCollection },
|
|
1827
1835
|
end: i
|
|
1828
1836
|
};
|
|
1829
1837
|
}
|
|
1830
|
-
function
|
|
1838
|
+
function tn(e, t, n) {
|
|
1831
1839
|
var r = e.length;
|
|
1832
1840
|
if (e.charCodeAt(t) !== h || t + 1 >= r || e.charCodeAt(t + 1) !== g) return null;
|
|
1833
1841
|
for (var i = t + 2, a = i; i < r && e.charCodeAt(i) !== D;) {
|
|
@@ -1842,11 +1850,11 @@ function Qt(e, t, n) {
|
|
|
1842
1850
|
var s = e.indexOf("\n", i);
|
|
1843
1851
|
s < 0 && (s = r);
|
|
1844
1852
|
for (var c = e.slice(i, s).trim(), d = s < r ? s + 1 : r; d < r;) {
|
|
1845
|
-
var p =
|
|
1846
|
-
if (
|
|
1847
|
-
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)) {
|
|
1848
1856
|
var m = $(e, p);
|
|
1849
|
-
if (m < r && (
|
|
1857
|
+
if (m < r && (jt(e, m, Tt(e, m)), kt >= 2)) {
|
|
1850
1858
|
c += "\n", d = $(e, p);
|
|
1851
1859
|
continue;
|
|
1852
1860
|
}
|
|
@@ -1857,19 +1865,19 @@ function Qt(e, t, n) {
|
|
|
1857
1865
|
target: c,
|
|
1858
1866
|
title: void 0
|
|
1859
1867
|
}), {
|
|
1860
|
-
node: { type:
|
|
1868
|
+
node: { type: q.footnote },
|
|
1861
1869
|
end: d
|
|
1862
1870
|
};
|
|
1863
1871
|
}
|
|
1864
|
-
function
|
|
1872
|
+
function nn(e, t, n, r) {
|
|
1865
1873
|
let i = t, a = 0, o = 0, s = -1;
|
|
1866
1874
|
for (; i < e.length;) {
|
|
1867
|
-
let t = s >= 0 ? s :
|
|
1868
|
-
if (s = -1,
|
|
1869
|
-
if (
|
|
1870
|
-
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);
|
|
1871
1879
|
if (n === x || n === b) {
|
|
1872
|
-
let r = i +
|
|
1880
|
+
let r = i + At;
|
|
1873
1881
|
for (; r < t && e.charCodeAt(r) === n;) r++;
|
|
1874
1882
|
for (; r < t && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
|
|
1875
1883
|
if (r >= t) {
|
|
@@ -1881,77 +1889,77 @@ function $t(e, t, n, r) {
|
|
|
1881
1889
|
o = t;
|
|
1882
1890
|
let d = $(e, t);
|
|
1883
1891
|
if (d < e.length) {
|
|
1884
|
-
if (e.charCodeAt(d) ===
|
|
1885
|
-
var c =
|
|
1892
|
+
if (e.charCodeAt(d) === de) {
|
|
1893
|
+
var c = Tt(e, d);
|
|
1886
1894
|
i = $(e, c), o = c;
|
|
1887
1895
|
continue;
|
|
1888
1896
|
}
|
|
1889
|
-
let t =
|
|
1890
|
-
if (s = t,
|
|
1891
|
-
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);
|
|
1892
1900
|
if (a === _) {
|
|
1893
1901
|
i = d;
|
|
1894
1902
|
break;
|
|
1895
1903
|
}
|
|
1896
|
-
if (a === v &&
|
|
1904
|
+
if (a === v && Nt(e, d, n, r)) {
|
|
1897
1905
|
i = d;
|
|
1898
1906
|
break;
|
|
1899
1907
|
}
|
|
1900
1908
|
if (a === p || a === m) {
|
|
1901
|
-
for (var h = d +
|
|
1909
|
+
for (var h = d + At, g = 0; h < t && e.charCodeAt(h) === a;) g++, h++;
|
|
1902
1910
|
if (g >= 3) {
|
|
1903
1911
|
i = d;
|
|
1904
1912
|
break;
|
|
1905
1913
|
}
|
|
1906
1914
|
}
|
|
1907
1915
|
if (a === T) {
|
|
1908
|
-
var y = d +
|
|
1909
|
-
if (!E && S ===
|
|
1910
|
-
for (var D = y + 1, k = D; k < t && (e.charCodeAt(k) >=
|
|
1911
|
-
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()));
|
|
1912
1920
|
} else if (!E) {
|
|
1913
|
-
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++;
|
|
1914
1922
|
if (A > y) {
|
|
1915
1923
|
var j = e.slice(y, A).toLowerCase();
|
|
1916
|
-
E =
|
|
1924
|
+
E = Wt.has(j) || rt.has(j);
|
|
1917
1925
|
}
|
|
1918
1926
|
}
|
|
1919
|
-
if (E &&
|
|
1927
|
+
if (E && Xt(e, d, n, r)) {
|
|
1920
1928
|
i = d;
|
|
1921
1929
|
break;
|
|
1922
1930
|
}
|
|
1923
1931
|
}
|
|
1924
1932
|
if (a === b || a === C || a === oe) {
|
|
1925
|
-
let n = d +
|
|
1926
|
-
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)) {
|
|
1927
1935
|
i = d;
|
|
1928
1936
|
break;
|
|
1929
1937
|
}
|
|
1930
1938
|
}
|
|
1931
|
-
if (a >=
|
|
1932
|
-
let n = d +
|
|
1933
|
-
for (; n < t && e.charCodeAt(n) >=
|
|
1934
|
-
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) {
|
|
1935
1943
|
var M = n + 1;
|
|
1936
|
-
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) {
|
|
1937
1945
|
i = d;
|
|
1938
1946
|
break;
|
|
1939
1947
|
}
|
|
1940
1948
|
}
|
|
1941
1949
|
}
|
|
1942
|
-
if (a ===
|
|
1950
|
+
if (a === V) {
|
|
1943
1951
|
let n = $(e, t);
|
|
1944
|
-
if (n < e.length &&
|
|
1952
|
+
if (n < e.length && ft(e, n, Tt(e, n))) {
|
|
1945
1953
|
i = d;
|
|
1946
1954
|
break;
|
|
1947
1955
|
}
|
|
1948
1956
|
}
|
|
1949
|
-
if ((a === b || a === C || a === w) &&
|
|
1957
|
+
if ((a === b || a === C || a === w) && Ft(e, d)) {
|
|
1950
1958
|
if (a !== b) {
|
|
1951
1959
|
i = d;
|
|
1952
1960
|
break;
|
|
1953
1961
|
}
|
|
1954
|
-
let n = 0, r = d +
|
|
1962
|
+
let n = 0, r = d + At;
|
|
1955
1963
|
for (; r < t && e.charCodeAt(r) === b;) n++, r++;
|
|
1956
1964
|
for (; r < t && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
|
|
1957
1965
|
if (r < t) {
|
|
@@ -1966,18 +1974,18 @@ function $t(e, t, n, r) {
|
|
|
1966
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--;
|
|
1967
1975
|
for (var P = t; P < N && (e.charCodeAt(P) === l || e.charCodeAt(P) === u);) P++;
|
|
1968
1976
|
if (P >= N) return null;
|
|
1969
|
-
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) {
|
|
1970
1978
|
F = !0;
|
|
1971
1979
|
break;
|
|
1972
1980
|
}
|
|
1973
1981
|
var ee = F ? e.slice(P, N).replace(/\u001E/g, "") : e.slice(P, N);
|
|
1974
1982
|
if (!ee) return null;
|
|
1975
|
-
let L =
|
|
1983
|
+
let L = rn(ee, 0, ee.length, n, r);
|
|
1976
1984
|
if (a) {
|
|
1977
1985
|
let e = (r?.slugify || Z)(ee);
|
|
1978
1986
|
return {
|
|
1979
1987
|
node: {
|
|
1980
|
-
type:
|
|
1988
|
+
type: q.heading,
|
|
1981
1989
|
level: a,
|
|
1982
1990
|
children: L,
|
|
1983
1991
|
id: e
|
|
@@ -1987,19 +1995,19 @@ function $t(e, t, n, r) {
|
|
|
1987
1995
|
}
|
|
1988
1996
|
return {
|
|
1989
1997
|
node: {
|
|
1990
|
-
type:
|
|
1998
|
+
type: q.paragraph,
|
|
1991
1999
|
children: L
|
|
1992
2000
|
},
|
|
1993
2001
|
end: i
|
|
1994
2002
|
};
|
|
1995
2003
|
}
|
|
1996
|
-
function
|
|
2004
|
+
function rn(e, t, n, r, i) {
|
|
1997
2005
|
var a = e.indexOf("\n", t);
|
|
1998
|
-
if (a < 0 || a >= n) return
|
|
2006
|
+
if (a < 0 || a >= n) return Tn(e, t, n, r, i);
|
|
1999
2007
|
for (var o = "", s = t, c = t; c < n;) {
|
|
2000
2008
|
var u = e.charCodeAt(c);
|
|
2001
2009
|
if (u === p) {
|
|
2002
|
-
var d =
|
|
2010
|
+
var d = on(e, c, n);
|
|
2003
2011
|
if (d > c) {
|
|
2004
2012
|
for (var m = !1, h = c; h < d; h++) if (e.charCodeAt(h) === f) {
|
|
2005
2013
|
m = !0;
|
|
@@ -2010,7 +2018,7 @@ function en(e, t, n, r, i) {
|
|
|
2010
2018
|
}
|
|
2011
2019
|
}
|
|
2012
2020
|
if (u === T) {
|
|
2013
|
-
var g =
|
|
2021
|
+
var g = sn(e, c, n);
|
|
2014
2022
|
if (g > c) {
|
|
2015
2023
|
c = g;
|
|
2016
2024
|
continue;
|
|
@@ -2034,20 +2042,20 @@ function en(e, t, n, r, i) {
|
|
|
2034
2042
|
}
|
|
2035
2043
|
c++;
|
|
2036
2044
|
}
|
|
2037
|
-
return s < n && (o += e.slice(s, n)),
|
|
2045
|
+
return s < n && (o += e.slice(s, n)), Tn(o, 0, o.length, r, i);
|
|
2038
2046
|
}
|
|
2039
|
-
function
|
|
2047
|
+
function an(e, t, n) {
|
|
2040
2048
|
if (e.charCodeAt(t) !== p) return null;
|
|
2041
|
-
let r =
|
|
2049
|
+
let r = Ot(e, t, n, 96), i = t + r;
|
|
2042
2050
|
for (; i < n;) {
|
|
2043
2051
|
let a = e.indexOf("`", i);
|
|
2044
2052
|
if (a < 0 || a >= n) return null;
|
|
2045
|
-
let o =
|
|
2053
|
+
let o = Ot(e, a, n, 96);
|
|
2046
2054
|
if (o === r) {
|
|
2047
2055
|
let n = e.slice(t + r, a);
|
|
2048
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)), {
|
|
2049
2057
|
node: {
|
|
2050
|
-
type:
|
|
2058
|
+
type: q.codeInline,
|
|
2051
2059
|
text: n
|
|
2052
2060
|
},
|
|
2053
2061
|
end: a + o
|
|
@@ -2057,21 +2065,21 @@ function tn(e, t, n) {
|
|
|
2057
2065
|
}
|
|
2058
2066
|
return null;
|
|
2059
2067
|
}
|
|
2060
|
-
function
|
|
2068
|
+
function on(e, t, n) {
|
|
2061
2069
|
if (e.charCodeAt(t) !== p) return t;
|
|
2062
|
-
let r =
|
|
2070
|
+
let r = Ot(e, t, n, 96), i = t + r;
|
|
2063
2071
|
for (; i < n;) {
|
|
2064
2072
|
let a = e.indexOf("`", i);
|
|
2065
2073
|
if (a < 0 || a >= n) return t;
|
|
2066
|
-
let o =
|
|
2074
|
+
let o = Ot(e, a, n, 96);
|
|
2067
2075
|
if (o === r) return a + o;
|
|
2068
2076
|
i = a + o;
|
|
2069
2077
|
}
|
|
2070
2078
|
return t;
|
|
2071
2079
|
}
|
|
2072
|
-
function
|
|
2080
|
+
function sn(e, t, n) {
|
|
2073
2081
|
if (e.charCodeAt(t) !== T) return t;
|
|
2074
|
-
if (t + 1 < n && e.charCodeAt(t + 1) ===
|
|
2082
|
+
if (t + 1 < n && e.charCodeAt(t + 1) === ie) {
|
|
2075
2083
|
let r = t + 2;
|
|
2076
2084
|
for (; r < n && e.charCodeAt(r) !== _;) r++;
|
|
2077
2085
|
return r < n ? r + 1 : t;
|
|
@@ -2083,7 +2091,7 @@ function rn(e, t, n) {
|
|
|
2083
2091
|
let r = t + 1, i = r;
|
|
2084
2092
|
for (; r < n;) {
|
|
2085
2093
|
let t = e.charCodeAt(r);
|
|
2086
|
-
if (t >=
|
|
2094
|
+
if (t >= W && t <= G || t >= K && t <= pe || t >= H && t <= U || t === b) r++;
|
|
2087
2095
|
else break;
|
|
2088
2096
|
}
|
|
2089
2097
|
if (r === i) return t;
|
|
@@ -2094,11 +2102,11 @@ function rn(e, t, n) {
|
|
|
2094
2102
|
r++;
|
|
2095
2103
|
break;
|
|
2096
2104
|
}
|
|
2097
|
-
if (i ===
|
|
2105
|
+
if (i === ie && r + 1 < n && e.charCodeAt(r + 1) === _) {
|
|
2098
2106
|
r += 2, o = !0;
|
|
2099
2107
|
break;
|
|
2100
2108
|
}
|
|
2101
|
-
if (i ===
|
|
2109
|
+
if (i === ae || i === B) {
|
|
2102
2110
|
var s = i;
|
|
2103
2111
|
for (r++; r < n && e.charCodeAt(r) !== s;) r++;
|
|
2104
2112
|
r < n && r++;
|
|
@@ -2109,9 +2117,9 @@ function rn(e, t, n) {
|
|
|
2109
2117
|
}
|
|
2110
2118
|
if (o || Te(a)) return r;
|
|
2111
2119
|
let c = 1;
|
|
2112
|
-
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) {
|
|
2113
2121
|
let t = r + 2, i = t;
|
|
2114
|
-
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++;
|
|
2115
2123
|
if (e.slice(t, i).toLowerCase() === a) {
|
|
2116
2124
|
for (; i < n && e.charCodeAt(i) !== _;) i++;
|
|
2117
2125
|
if (i < n && i++, c--, c === 0) return i;
|
|
@@ -2119,29 +2127,29 @@ function rn(e, t, n) {
|
|
|
2119
2127
|
r = i;
|
|
2120
2128
|
} else {
|
|
2121
2129
|
let t = r + 1, i = t;
|
|
2122
|
-
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++;
|
|
2123
2131
|
e.slice(t, i).toLowerCase() === a && c++, r++;
|
|
2124
2132
|
}
|
|
2125
2133
|
else r++;
|
|
2126
2134
|
return r;
|
|
2127
2135
|
}
|
|
2128
|
-
function
|
|
2136
|
+
function cn(e, t, n, r, i) {
|
|
2129
2137
|
if (e.charCodeAt(t) !== m || t + 1 >= n || e.charCodeAt(t + 1) !== m) return null;
|
|
2130
2138
|
let a = t + 2;
|
|
2131
2139
|
for (; a + 1 < n;) {
|
|
2132
2140
|
let o = e.charCodeAt(a);
|
|
2133
2141
|
if (o === p) {
|
|
2134
|
-
let t =
|
|
2142
|
+
let t = on(e, a, n);
|
|
2135
2143
|
if (t > a) {
|
|
2136
2144
|
a = t;
|
|
2137
2145
|
continue;
|
|
2138
2146
|
}
|
|
2139
2147
|
}
|
|
2140
2148
|
if (o === m && e.charCodeAt(a + 1) === m) {
|
|
2141
|
-
let n = e.slice(t + 2, a), o =
|
|
2149
|
+
let n = e.slice(t + 2, a), o = Tn(n, 0, n.length, r, i);
|
|
2142
2150
|
return {
|
|
2143
2151
|
node: {
|
|
2144
|
-
type:
|
|
2152
|
+
type: q.textFormatted,
|
|
2145
2153
|
tag: "del",
|
|
2146
2154
|
children: o
|
|
2147
2155
|
},
|
|
@@ -2152,23 +2160,23 @@ function an(e, t, n, r, i) {
|
|
|
2152
2160
|
}
|
|
2153
2161
|
return null;
|
|
2154
2162
|
}
|
|
2155
|
-
function
|
|
2163
|
+
function ln(e, t, n, r, i) {
|
|
2156
2164
|
if (e.charCodeAt(t) !== x || t + 1 >= n || e.charCodeAt(t + 1) !== x) return null;
|
|
2157
2165
|
let a = t + 2;
|
|
2158
2166
|
for (; a + 1 < n;) {
|
|
2159
2167
|
let o = e.charCodeAt(a);
|
|
2160
2168
|
if (o === p) {
|
|
2161
|
-
let t =
|
|
2169
|
+
let t = on(e, a, n);
|
|
2162
2170
|
if (t > a) {
|
|
2163
2171
|
a = t;
|
|
2164
2172
|
continue;
|
|
2165
2173
|
}
|
|
2166
2174
|
}
|
|
2167
2175
|
if (o === x && e.charCodeAt(a + 1) === x && a > t + 2) {
|
|
2168
|
-
let n = e.slice(t + 2, a), o =
|
|
2176
|
+
let n = e.slice(t + 2, a), o = Tn(n, 0, n.length, r, i);
|
|
2169
2177
|
return {
|
|
2170
2178
|
node: {
|
|
2171
|
-
type:
|
|
2179
|
+
type: q.textFormatted,
|
|
2172
2180
|
tag: "mark",
|
|
2173
2181
|
children: o
|
|
2174
2182
|
},
|
|
@@ -2179,25 +2187,25 @@ function on(e, t, n, r, i) {
|
|
|
2179
2187
|
}
|
|
2180
2188
|
return null;
|
|
2181
2189
|
}
|
|
2182
|
-
function
|
|
2183
|
-
return e <
|
|
2190
|
+
function un(e, t, n) {
|
|
2191
|
+
return e < me ? !!(bt(e) & Oe) : Re.test(t[n]);
|
|
2184
2192
|
}
|
|
2185
|
-
function
|
|
2186
|
-
return e <
|
|
2193
|
+
function dn(e, t, n) {
|
|
2194
|
+
return e < me ? !!(bt(e) & Ee) : ze.test(t[n]);
|
|
2187
2195
|
}
|
|
2188
|
-
function
|
|
2196
|
+
function fn(e, t, n) {
|
|
2189
2197
|
var r = e.charCodeAt(t);
|
|
2190
2198
|
if (r !== C && r !== w) return null;
|
|
2191
|
-
var i =
|
|
2199
|
+
var i = Ot(e, t, n, r);
|
|
2192
2200
|
if (i === 0) return null;
|
|
2193
|
-
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;
|
|
2194
2202
|
return r === C ? (p = d, m = f) : (p = d && (!f || l), m = f && (!d || u)), {
|
|
2195
2203
|
len: i,
|
|
2196
2204
|
canOpen: p,
|
|
2197
2205
|
canClose: m
|
|
2198
2206
|
};
|
|
2199
2207
|
}
|
|
2200
|
-
function
|
|
2208
|
+
function pn(e, t, n, r) {
|
|
2201
2209
|
if (t.length !== 0) {
|
|
2202
2210
|
for (var i = [], a = 0; a < 12; a++) i[a] = -1;
|
|
2203
2211
|
for (var o = 0; o < t.length;) {
|
|
@@ -2222,7 +2230,7 @@ function un(e, t, n, r) {
|
|
|
2222
2230
|
var g = e[p.idx], _ = e[s.idx];
|
|
2223
2231
|
g.text = g.text.slice(0, g.text.length - h), _.text = _.text.slice(h);
|
|
2224
2232
|
var v = p.idx + 1, y = s.idx, b = e.slice(v, y), x = {
|
|
2225
|
-
type:
|
|
2233
|
+
type: q.textFormatted,
|
|
2226
2234
|
tag: m ? "strong" : "em",
|
|
2227
2235
|
children: b
|
|
2228
2236
|
};
|
|
@@ -2245,10 +2253,10 @@ function un(e, t, n, r) {
|
|
|
2245
2253
|
}
|
|
2246
2254
|
for (var k = 0, A = 0; A < e.length; A++) {
|
|
2247
2255
|
var j = e[A];
|
|
2248
|
-
if (j.type ===
|
|
2256
|
+
if (j.type === q.text) {
|
|
2249
2257
|
var M = j;
|
|
2250
2258
|
if (M.text === "") continue;
|
|
2251
|
-
if (k > 0 && e[k - 1].type ===
|
|
2259
|
+
if (k > 0 && e[k - 1].type === q.text) {
|
|
2252
2260
|
e[k - 1].text += M.text;
|
|
2253
2261
|
continue;
|
|
2254
2262
|
}
|
|
@@ -2258,7 +2266,7 @@ function un(e, t, n, r) {
|
|
|
2258
2266
|
e.length = k;
|
|
2259
2267
|
}
|
|
2260
2268
|
}
|
|
2261
|
-
function
|
|
2269
|
+
function mn(e, t, n, r, i) {
|
|
2262
2270
|
let a = e.charCodeAt(t) === O, o = a ? t + 1 : t;
|
|
2263
2271
|
if (e.charCodeAt(o) !== h) return null;
|
|
2264
2272
|
var s = e.indexOf("]", o + 1);
|
|
@@ -2270,19 +2278,19 @@ function dn(e, t, n, r, i) {
|
|
|
2270
2278
|
continue;
|
|
2271
2279
|
}
|
|
2272
2280
|
if (d === p) {
|
|
2273
|
-
var m =
|
|
2281
|
+
var m = on(e, c, n);
|
|
2274
2282
|
if (m > c) {
|
|
2275
2283
|
c = m;
|
|
2276
2284
|
continue;
|
|
2277
2285
|
}
|
|
2278
2286
|
}
|
|
2279
2287
|
if (d === T) {
|
|
2280
|
-
var g =
|
|
2288
|
+
var g = hn(e, c, n);
|
|
2281
2289
|
if (g) {
|
|
2282
2290
|
c = g.end;
|
|
2283
2291
|
continue;
|
|
2284
2292
|
}
|
|
2285
|
-
var v =
|
|
2293
|
+
var v = sn(e, c, n);
|
|
2286
2294
|
if (v > c) {
|
|
2287
2295
|
c = v;
|
|
2288
2296
|
continue;
|
|
@@ -2292,7 +2300,7 @@ function dn(e, t, n, r, i) {
|
|
|
2292
2300
|
}
|
|
2293
2301
|
if (u !== 0) return null;
|
|
2294
2302
|
var y = c - 1, b = e.slice(o + 1, y), x = c < n ? e.charCodeAt(c) : 0, C = !1;
|
|
2295
|
-
if (x ===
|
|
2303
|
+
if (x === le) {
|
|
2296
2304
|
var w = !0;
|
|
2297
2305
|
for (c++; c < n && (e.charCodeAt(c) === l || e.charCodeAt(c) === f);) c++;
|
|
2298
2306
|
var E = "", k = c;
|
|
@@ -2309,127 +2317,128 @@ function dn(e, t, n, r, i) {
|
|
|
2309
2317
|
k++;
|
|
2310
2318
|
}
|
|
2311
2319
|
w && (k >= n || e.charCodeAt(k) !== _) && (w = !1), w && (E = e.slice(c, k), k++);
|
|
2312
|
-
} else if (w)
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
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) {
|
|
2316
2325
|
k += 2;
|
|
2317
2326
|
continue;
|
|
2318
2327
|
}
|
|
2319
|
-
if (
|
|
2320
|
-
else if (
|
|
2321
|
-
if (A === 0) break;
|
|
2328
|
+
if (M === le) A++;
|
|
2329
|
+
else if (M === ue) {
|
|
2330
|
+
if (j = !0, A === 0) break;
|
|
2322
2331
|
A--;
|
|
2323
|
-
} else if (
|
|
2332
|
+
} else if (M === l || M === f) break;
|
|
2324
2333
|
k++;
|
|
2325
2334
|
}
|
|
2326
|
-
E = e.slice(c, k);
|
|
2335
|
+
k >= n && !j && (r.e === void 0 || c < r.e) && (r.e = c), E = e.slice(c, k);
|
|
2327
2336
|
}
|
|
2328
2337
|
if (w) {
|
|
2329
2338
|
for (c = k; c < n && (e.charCodeAt(c) === l || e.charCodeAt(c) === f);) c++;
|
|
2330
|
-
var
|
|
2339
|
+
var N;
|
|
2331
2340
|
if (c < n) {
|
|
2332
|
-
var
|
|
2333
|
-
if (
|
|
2334
|
-
var
|
|
2341
|
+
var P = e.charCodeAt(c);
|
|
2342
|
+
if (P === ae || P === B || P === le) {
|
|
2343
|
+
var F = P === le ? 41 : P;
|
|
2335
2344
|
c++;
|
|
2336
|
-
for (var
|
|
2337
|
-
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++);
|
|
2338
2347
|
}
|
|
2339
2348
|
}
|
|
2340
2349
|
if (w) {
|
|
2341
2350
|
for (; c < n && (e.charCodeAt(c) === l || e.charCodeAt(c) === f);) c++;
|
|
2342
|
-
(c >= n || e.charCodeAt(c) !==
|
|
2351
|
+
(c >= n || e.charCodeAt(c) !== ue) && (w = !1);
|
|
2343
2352
|
}
|
|
2344
2353
|
}
|
|
2345
2354
|
if (w) {
|
|
2346
|
-
c++, E =
|
|
2347
|
-
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;
|
|
2348
2357
|
if (a) {
|
|
2349
|
-
var
|
|
2358
|
+
var L = bn(Tn(b, 0, b.length, r, i));
|
|
2350
2359
|
return {
|
|
2351
2360
|
node: {
|
|
2352
|
-
type:
|
|
2353
|
-
target:
|
|
2354
|
-
alt:
|
|
2355
|
-
title:
|
|
2361
|
+
type: q.image,
|
|
2362
|
+
target: ee,
|
|
2363
|
+
alt: L,
|
|
2364
|
+
title: N
|
|
2356
2365
|
},
|
|
2357
2366
|
end: c
|
|
2358
2367
|
};
|
|
2359
2368
|
} else {
|
|
2360
|
-
var
|
|
2369
|
+
var R = r.inAnchor;
|
|
2361
2370
|
r.inAnchor = !0;
|
|
2362
|
-
var
|
|
2363
|
-
type:
|
|
2371
|
+
var te = R ? [{
|
|
2372
|
+
type: q.text,
|
|
2364
2373
|
text: b
|
|
2365
|
-
}] :
|
|
2366
|
-
return r.inAnchor =
|
|
2374
|
+
}] : Tn(b, 0, b.length, r, i);
|
|
2375
|
+
return r.inAnchor = R, !r.inAnchor && yn(te) ? null : {
|
|
2367
2376
|
node: {
|
|
2368
|
-
type:
|
|
2369
|
-
target:
|
|
2370
|
-
title:
|
|
2371
|
-
children:
|
|
2377
|
+
type: q.link,
|
|
2378
|
+
target: ee,
|
|
2379
|
+
title: N,
|
|
2380
|
+
children: te
|
|
2372
2381
|
},
|
|
2373
2382
|
end: c
|
|
2374
2383
|
};
|
|
2375
2384
|
}
|
|
2376
2385
|
} else c = y + 1, C = !0;
|
|
2377
2386
|
}
|
|
2378
|
-
var
|
|
2387
|
+
var ne = "", re = c;
|
|
2379
2388
|
if (!C && x === h) {
|
|
2380
|
-
var
|
|
2381
|
-
|
|
2382
|
-
for (var ie = !1;
|
|
2383
|
-
if (e.charCodeAt(
|
|
2384
|
-
|
|
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;
|
|
2385
2394
|
continue;
|
|
2386
2395
|
}
|
|
2387
|
-
if (e.charCodeAt(
|
|
2396
|
+
if (e.charCodeAt(re) === h) {
|
|
2388
2397
|
ie = !0;
|
|
2389
2398
|
break;
|
|
2390
2399
|
}
|
|
2391
|
-
|
|
2400
|
+
re++;
|
|
2392
2401
|
}
|
|
2393
|
-
if (ie ||
|
|
2394
|
-
var
|
|
2395
|
-
if (
|
|
2402
|
+
if (ie || re >= n) return null;
|
|
2403
|
+
var oe = e.slice(z, re);
|
|
2404
|
+
if (oe.trim()) ne = yt(oe);
|
|
2396
2405
|
else {
|
|
2397
|
-
if (
|
|
2398
|
-
|
|
2406
|
+
if (vt(b)) return null;
|
|
2407
|
+
ne = yt(b);
|
|
2399
2408
|
}
|
|
2400
|
-
|
|
2409
|
+
re += 1;
|
|
2401
2410
|
} else {
|
|
2402
|
-
if (
|
|
2403
|
-
|
|
2411
|
+
if (vt(b)) return null;
|
|
2412
|
+
ne = yt(b);
|
|
2404
2413
|
}
|
|
2405
|
-
var
|
|
2406
|
-
if (!
|
|
2414
|
+
var V = r.refs[ne];
|
|
2415
|
+
if (!V) return null;
|
|
2407
2416
|
if (a) return {
|
|
2408
2417
|
node: {
|
|
2409
|
-
type:
|
|
2410
|
-
target:
|
|
2411
|
-
alt:
|
|
2412
|
-
title:
|
|
2418
|
+
type: q.image,
|
|
2419
|
+
target: V.target,
|
|
2420
|
+
alt: bn(Tn(b, 0, b.length, r, i)),
|
|
2421
|
+
title: V.title
|
|
2413
2422
|
},
|
|
2414
|
-
end:
|
|
2423
|
+
end: re
|
|
2415
2424
|
};
|
|
2416
2425
|
var se = r.inAnchor;
|
|
2417
2426
|
r.inAnchor = !0;
|
|
2418
|
-
var
|
|
2419
|
-
type:
|
|
2427
|
+
var te = se ? [{
|
|
2428
|
+
type: q.text,
|
|
2420
2429
|
text: b
|
|
2421
|
-
}] :
|
|
2422
|
-
return r.inAnchor = se, !r.inAnchor &&
|
|
2430
|
+
}] : Tn(b, 0, b.length, r, i);
|
|
2431
|
+
return r.inAnchor = se, !r.inAnchor && yn(te) ? null : {
|
|
2423
2432
|
node: {
|
|
2424
|
-
type:
|
|
2425
|
-
target:
|
|
2426
|
-
title:
|
|
2427
|
-
children:
|
|
2433
|
+
type: q.link,
|
|
2434
|
+
target: V.target,
|
|
2435
|
+
title: V.title,
|
|
2436
|
+
children: te
|
|
2428
2437
|
},
|
|
2429
|
-
end:
|
|
2438
|
+
end: re
|
|
2430
2439
|
};
|
|
2431
2440
|
}
|
|
2432
|
-
function
|
|
2441
|
+
function hn(e, t, n) {
|
|
2433
2442
|
if (e.charCodeAt(t) !== T) return null;
|
|
2434
2443
|
for (var r = t + 1; r < n;) {
|
|
2435
2444
|
var i = e.charCodeAt(r);
|
|
@@ -2441,29 +2450,29 @@ function fn(e, t, n) {
|
|
|
2441
2450
|
var a = e.slice(t + 1, r);
|
|
2442
2451
|
return a.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/) ? {
|
|
2443
2452
|
node: {
|
|
2444
|
-
type:
|
|
2453
|
+
type: q.link,
|
|
2445
2454
|
target: a,
|
|
2446
2455
|
title: void 0,
|
|
2447
2456
|
children: [{
|
|
2448
|
-
type:
|
|
2457
|
+
type: q.text,
|
|
2449
2458
|
text: a
|
|
2450
2459
|
}]
|
|
2451
2460
|
},
|
|
2452
2461
|
end: r + 1
|
|
2453
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) ? {
|
|
2454
2463
|
node: {
|
|
2455
|
-
type:
|
|
2464
|
+
type: q.link,
|
|
2456
2465
|
target: "mailto:" + a,
|
|
2457
2466
|
title: void 0,
|
|
2458
2467
|
children: [{
|
|
2459
|
-
type:
|
|
2468
|
+
type: q.text,
|
|
2460
2469
|
text: a
|
|
2461
2470
|
}]
|
|
2462
2471
|
},
|
|
2463
2472
|
end: r + 1
|
|
2464
2473
|
} : null;
|
|
2465
2474
|
}
|
|
2466
|
-
function
|
|
2475
|
+
function gn(e, t, n, r) {
|
|
2467
2476
|
if (e.charCodeAt(t) !== h || t + 1 >= n || e.charCodeAt(t + 1) !== g) return null;
|
|
2468
2477
|
let i = t + 2;
|
|
2469
2478
|
for (; i < n && e.charCodeAt(i) !== D && e.charCodeAt(i) !== f;) i++;
|
|
@@ -2471,17 +2480,17 @@ function pn(e, t, n, r) {
|
|
|
2471
2480
|
let a = e.slice(t + 2, i);
|
|
2472
2481
|
return a ? {
|
|
2473
2482
|
node: {
|
|
2474
|
-
type:
|
|
2483
|
+
type: q.footnoteReference,
|
|
2475
2484
|
target: "#" + Z(a),
|
|
2476
2485
|
text: a
|
|
2477
2486
|
},
|
|
2478
2487
|
end: i + 1
|
|
2479
2488
|
} : null;
|
|
2480
2489
|
}
|
|
2481
|
-
function
|
|
2490
|
+
function _n(e, t, n, r) {
|
|
2482
2491
|
if (r.disableBareUrls) return null;
|
|
2483
2492
|
var i = "", a = !1, o = e.charCodeAt(t);
|
|
2484
|
-
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;
|
|
2485
2494
|
let s = t + i.length;
|
|
2486
2495
|
for (; s < n;) {
|
|
2487
2496
|
let t = e.charCodeAt(s);
|
|
@@ -2490,26 +2499,26 @@ function mn(e, t, n, r) {
|
|
|
2490
2499
|
}
|
|
2491
2500
|
for (var c = 0, p = 0, h = t; h < s; h++) {
|
|
2492
2501
|
var g = e.charCodeAt(h);
|
|
2493
|
-
g ===
|
|
2502
|
+
g === le ? c++ : g === ue && p++;
|
|
2494
2503
|
}
|
|
2495
2504
|
let v = s;
|
|
2496
2505
|
for (; v > t + i.length;) {
|
|
2497
2506
|
let n = e.charCodeAt(v - 1);
|
|
2498
|
-
if (n ===
|
|
2499
|
-
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) {
|
|
2500
2509
|
if (c >= p) break;
|
|
2501
2510
|
p--;
|
|
2502
2511
|
}
|
|
2503
2512
|
v--;
|
|
2504
2513
|
} else if (n === ne) {
|
|
2505
|
-
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--;
|
|
2506
2515
|
y >= t && e.charCodeAt(y) === k ? v = y : v--;
|
|
2507
2516
|
} else break;
|
|
2508
2517
|
}
|
|
2509
2518
|
if (v <= t + i.length) return null;
|
|
2510
2519
|
var b = t + (a ? 4 : i.length), x = e.indexOf("/", b);
|
|
2511
2520
|
if ((x < 0 || x > v) && (x = v), a && e.indexOf(".", b) === -1) return null;
|
|
2512
|
-
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;
|
|
2513
2522
|
else {
|
|
2514
2523
|
E = D;
|
|
2515
2524
|
break;
|
|
@@ -2518,45 +2527,45 @@ function mn(e, t, n, r) {
|
|
|
2518
2527
|
var j = e.slice(t, v), L = a ? "http://" + j : j;
|
|
2519
2528
|
return {
|
|
2520
2529
|
node: {
|
|
2521
|
-
type:
|
|
2530
|
+
type: q.link,
|
|
2522
2531
|
target: L,
|
|
2523
2532
|
title: void 0,
|
|
2524
2533
|
children: [{
|
|
2525
|
-
type:
|
|
2534
|
+
type: q.text,
|
|
2526
2535
|
text: j
|
|
2527
2536
|
}]
|
|
2528
2537
|
},
|
|
2529
2538
|
end: v
|
|
2530
2539
|
};
|
|
2531
2540
|
}
|
|
2532
|
-
function
|
|
2541
|
+
function vn(e, t, n, r) {
|
|
2533
2542
|
if (r.disableBareUrls) return null;
|
|
2534
2543
|
for (var i = t, a = i; i < n;) {
|
|
2535
2544
|
var o = e.charCodeAt(i);
|
|
2536
|
-
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++;
|
|
2537
2546
|
else break;
|
|
2538
2547
|
}
|
|
2539
2548
|
if (i === a || i >= n || e.charCodeAt(i) !== E) return null;
|
|
2540
2549
|
i++;
|
|
2541
2550
|
for (var s = i, c = -1, l = i; i < n;) {
|
|
2542
2551
|
var o = e.charCodeAt(i);
|
|
2543
|
-
if (o >=
|
|
2552
|
+
if (o >= W && o <= G || o >= K && o <= pe || o >= H && o <= U) i++;
|
|
2544
2553
|
else if ((o === b || o === w) && i > s) i++;
|
|
2545
|
-
else if (o ===
|
|
2554
|
+
else if (o === z) {
|
|
2546
2555
|
if (i === s) break;
|
|
2547
2556
|
var u = e.charCodeAt(i - 1);
|
|
2548
2557
|
if (u === b || u === w || i - l > 63) break;
|
|
2549
2558
|
if (i + 1 < n) {
|
|
2550
2559
|
var d = e.charCodeAt(i + 1);
|
|
2551
|
-
if (d >=
|
|
2560
|
+
if (d >= W && d <= G || d >= K && d <= pe || d >= H && d <= U) c = i, l = i + 1, i++;
|
|
2552
2561
|
else break;
|
|
2553
2562
|
} else break;
|
|
2554
2563
|
} else break;
|
|
2555
2564
|
}
|
|
2556
2565
|
if (i - l > 63 || c < 0) return null;
|
|
2557
2566
|
var f = e.charCodeAt(i - 1);
|
|
2558
|
-
if (!(f >=
|
|
2559
|
-
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) {
|
|
2560
2569
|
h = _;
|
|
2561
2570
|
break;
|
|
2562
2571
|
}
|
|
@@ -2564,36 +2573,36 @@ function hn(e, t, n, r) {
|
|
|
2564
2573
|
var S = e.slice(t, i);
|
|
2565
2574
|
return {
|
|
2566
2575
|
node: {
|
|
2567
|
-
type:
|
|
2576
|
+
type: q.link,
|
|
2568
2577
|
target: "mailto:" + S,
|
|
2569
2578
|
title: void 0,
|
|
2570
2579
|
children: [{
|
|
2571
|
-
type:
|
|
2580
|
+
type: q.text,
|
|
2572
2581
|
text: S
|
|
2573
2582
|
}]
|
|
2574
2583
|
},
|
|
2575
2584
|
end: i
|
|
2576
2585
|
};
|
|
2577
2586
|
}
|
|
2578
|
-
function
|
|
2579
|
-
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;
|
|
2580
2589
|
return !1;
|
|
2581
2590
|
}
|
|
2582
|
-
function
|
|
2591
|
+
function bn(e) {
|
|
2583
2592
|
for (var t = "", n = 0; n < e.length; n++) {
|
|
2584
2593
|
var r = e[n];
|
|
2585
|
-
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));
|
|
2586
2595
|
}
|
|
2587
2596
|
return t;
|
|
2588
2597
|
}
|
|
2589
|
-
function
|
|
2590
|
-
let t = e.includes("&") ?
|
|
2598
|
+
function xn(e) {
|
|
2599
|
+
let t = e.includes("&") ? ye(e) : e;
|
|
2591
2600
|
return {
|
|
2592
|
-
type:
|
|
2601
|
+
type: q.text,
|
|
2593
2602
|
text: t
|
|
2594
2603
|
};
|
|
2595
2604
|
}
|
|
2596
|
-
function
|
|
2605
|
+
function Sn(e, t, n, r, i) {
|
|
2597
2606
|
if (e.charCodeAt(t) !== T) return null;
|
|
2598
2607
|
var a = t + 1;
|
|
2599
2608
|
if (a >= n) return null;
|
|
@@ -2602,7 +2611,7 @@ function yn(e, t, n, r, i) {
|
|
|
2602
2611
|
var s = a + 3;
|
|
2603
2612
|
if (s < n && e.charCodeAt(s) === _) return {
|
|
2604
2613
|
node: {
|
|
2605
|
-
type:
|
|
2614
|
+
type: q.htmlComment,
|
|
2606
2615
|
text: "",
|
|
2607
2616
|
h: !0
|
|
2608
2617
|
},
|
|
@@ -2610,7 +2619,7 @@ function yn(e, t, n, r, i) {
|
|
|
2610
2619
|
};
|
|
2611
2620
|
if (s + 1 < n && e.charCodeAt(s) === b && e.charCodeAt(s + 1) === _) return {
|
|
2612
2621
|
node: {
|
|
2613
|
-
type:
|
|
2622
|
+
type: q.htmlComment,
|
|
2614
2623
|
text: "-",
|
|
2615
2624
|
h: !0
|
|
2616
2625
|
},
|
|
@@ -2619,7 +2628,7 @@ function yn(e, t, n, r, i) {
|
|
|
2619
2628
|
var c = e.indexOf("-->", s);
|
|
2620
2629
|
return c !== -1 && c <= n - 3 ? {
|
|
2621
2630
|
node: {
|
|
2622
|
-
type:
|
|
2631
|
+
type: q.htmlComment,
|
|
2623
2632
|
text: e.slice(t + 4, c),
|
|
2624
2633
|
h: !1
|
|
2625
2634
|
},
|
|
@@ -2630,7 +2639,7 @@ function yn(e, t, n, r, i) {
|
|
|
2630
2639
|
var d = e.indexOf("?>", a + 1);
|
|
2631
2640
|
return d !== -1 && d < n ? {
|
|
2632
2641
|
node: {
|
|
2633
|
-
type:
|
|
2642
|
+
type: q.htmlSelfClosing,
|
|
2634
2643
|
tag: "?",
|
|
2635
2644
|
attrs: {},
|
|
2636
2645
|
a: e.slice(t, d + 2),
|
|
@@ -2645,7 +2654,7 @@ function yn(e, t, n, r, i) {
|
|
|
2645
2654
|
var m = e.indexOf("]]>", a + 8);
|
|
2646
2655
|
return m !== -1 && m < n ? {
|
|
2647
2656
|
node: {
|
|
2648
|
-
type:
|
|
2657
|
+
type: q.htmlSelfClosing,
|
|
2649
2658
|
tag: "![CDATA[",
|
|
2650
2659
|
attrs: {},
|
|
2651
2660
|
a: e.slice(t, m + 3),
|
|
@@ -2654,11 +2663,11 @@ function yn(e, t, n, r, i) {
|
|
|
2654
2663
|
end: m + 3
|
|
2655
2664
|
} : null;
|
|
2656
2665
|
}
|
|
2657
|
-
if (p >=
|
|
2666
|
+
if (p >= W && p <= G) {
|
|
2658
2667
|
var g = e.indexOf(">", a + 2);
|
|
2659
2668
|
return g !== -1 && g < n ? {
|
|
2660
2669
|
node: {
|
|
2661
|
-
type:
|
|
2670
|
+
type: q.htmlSelfClosing,
|
|
2662
2671
|
tag: "!" + e.slice(a + 1, g),
|
|
2663
2672
|
attrs: {},
|
|
2664
2673
|
a: e.slice(t, g + 1),
|
|
@@ -2668,14 +2677,14 @@ function yn(e, t, n, r, i) {
|
|
|
2668
2677
|
} : null;
|
|
2669
2678
|
}
|
|
2670
2679
|
}
|
|
2671
|
-
if (o ===
|
|
2680
|
+
if (o === ie) {
|
|
2672
2681
|
var v = a + 1;
|
|
2673
2682
|
if (v >= n) return null;
|
|
2674
2683
|
var y = e.charCodeAt(v);
|
|
2675
|
-
if (!(y >=
|
|
2684
|
+
if (!(y >= W && y <= G || y >= K && y <= pe)) return null;
|
|
2676
2685
|
for (v++; v < n;) {
|
|
2677
2686
|
var x = e.charCodeAt(v);
|
|
2678
|
-
if (x >=
|
|
2687
|
+
if (x >= W && x <= G || x >= K && x <= pe || x >= H && x <= U || x === b) v++;
|
|
2679
2688
|
else break;
|
|
2680
2689
|
}
|
|
2681
2690
|
for (; v < n && (e.charCodeAt(v) === l || e.charCodeAt(v) === u || e.charCodeAt(v) === f);) v++;
|
|
@@ -2683,7 +2692,7 @@ function yn(e, t, n, r, i) {
|
|
|
2683
2692
|
var S = e.slice(a + 1, v).trim();
|
|
2684
2693
|
return {
|
|
2685
2694
|
node: {
|
|
2686
|
-
type:
|
|
2695
|
+
type: q.htmlSelfClosing,
|
|
2687
2696
|
tag: S,
|
|
2688
2697
|
attrs: {},
|
|
2689
2698
|
a: e.slice(t, v + 1),
|
|
@@ -2694,68 +2703,68 @@ function yn(e, t, n, r, i) {
|
|
|
2694
2703
|
}
|
|
2695
2704
|
return null;
|
|
2696
2705
|
}
|
|
2697
|
-
if (!(o >=
|
|
2698
|
-
var C =
|
|
2706
|
+
if (!(o >= W && o <= G || o >= K && o <= pe)) return null;
|
|
2707
|
+
var C = pt(e, t);
|
|
2699
2708
|
if (!C) return null;
|
|
2700
2709
|
var w = C.tag, E = w.toLowerCase();
|
|
2701
2710
|
if (C.selfClosing || Te(w)) return {
|
|
2702
2711
|
node: {
|
|
2703
|
-
type:
|
|
2712
|
+
type: q.htmlSelfClosing,
|
|
2704
2713
|
tag: w,
|
|
2705
|
-
attrs:
|
|
2714
|
+
attrs: Gt(C.attrs, w, i),
|
|
2706
2715
|
a: e.slice(t, C.end),
|
|
2707
2716
|
b: !1
|
|
2708
2717
|
},
|
|
2709
2718
|
end: C.end
|
|
2710
2719
|
};
|
|
2711
|
-
var D =
|
|
2720
|
+
var D = rt.has(E), k = Yt(e.slice(0, n), C.end, w);
|
|
2712
2721
|
if (k === -1) return {
|
|
2713
2722
|
node: {
|
|
2714
|
-
type:
|
|
2723
|
+
type: q.htmlSelfClosing,
|
|
2715
2724
|
tag: w,
|
|
2716
|
-
attrs:
|
|
2725
|
+
attrs: Gt(C.attrs, w, i),
|
|
2717
2726
|
a: e.slice(t, C.end),
|
|
2718
2727
|
b: !1
|
|
2719
2728
|
},
|
|
2720
2729
|
end: C.end
|
|
2721
2730
|
};
|
|
2722
|
-
var A =
|
|
2731
|
+
var A = qt(e, "</" + E, k), j = e.slice(C.end, A), M = [];
|
|
2723
2732
|
if (D) j.trim() && (M = [{
|
|
2724
|
-
type:
|
|
2733
|
+
type: q.text,
|
|
2725
2734
|
text: j
|
|
2726
2735
|
}]);
|
|
2727
2736
|
else {
|
|
2728
2737
|
var N = j.trim();
|
|
2729
2738
|
if (N) {
|
|
2730
2739
|
var { inAnchor: P, inline: F } = r;
|
|
2731
|
-
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;
|
|
2732
2741
|
}
|
|
2733
2742
|
}
|
|
2734
2743
|
return {
|
|
2735
2744
|
node: {
|
|
2736
|
-
type:
|
|
2745
|
+
type: q.htmlBlock,
|
|
2737
2746
|
tag: w,
|
|
2738
|
-
attrs:
|
|
2747
|
+
attrs: Gt(C.attrs, w, i),
|
|
2739
2748
|
f: C.rawAttrs,
|
|
2740
2749
|
children: M,
|
|
2741
2750
|
a: void 0,
|
|
2742
2751
|
text: j,
|
|
2743
2752
|
c: !1,
|
|
2744
|
-
b: !1
|
|
2745
|
-
endPos: k,
|
|
2746
|
-
e: !1
|
|
2753
|
+
b: !1
|
|
2747
2754
|
},
|
|
2748
2755
|
end: k
|
|
2749
2756
|
};
|
|
2750
2757
|
}
|
|
2751
|
-
var
|
|
2752
|
-
function
|
|
2753
|
-
if (
|
|
2754
|
-
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,
|
|
2755
2762
|
text: e.slice(t, n)
|
|
2756
2763
|
}];
|
|
2757
|
-
|
|
2758
|
-
|
|
2764
|
+
var a = r.e;
|
|
2765
|
+
r.e = void 0;
|
|
2766
|
+
let o = r;
|
|
2767
|
+
if (i.optimizeForStreaming) {
|
|
2759
2768
|
let r = function(e, t) {
|
|
2760
2769
|
for (var n = 1, r = t + 1; r < e.length; r++) {
|
|
2761
2770
|
var i = e.charCodeAt(r);
|
|
@@ -2764,163 +2773,163 @@ function Sn(e, t, n, r, i) {
|
|
|
2764
2773
|
}
|
|
2765
2774
|
return -1;
|
|
2766
2775
|
}, i = e.slice(t, n), a = i;
|
|
2767
|
-
for (var
|
|
2768
|
-
var
|
|
2769
|
-
|
|
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++);
|
|
2770
2779
|
}
|
|
2771
|
-
var
|
|
2772
|
-
|
|
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) {
|
|
2773
2782
|
return t[0] - e[0];
|
|
2774
2783
|
});
|
|
2775
|
-
for (var
|
|
2776
|
-
var
|
|
2777
|
-
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);
|
|
2778
2787
|
}
|
|
2779
|
-
let
|
|
2780
|
-
for (let e = 0; e < i.length; e++) i.charCodeAt(e) === p && (
|
|
2781
|
-
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) {
|
|
2782
2791
|
let e = !1, t = -1, n = 0;
|
|
2783
2792
|
for (; n < i.length;) i.charCodeAt(n) === p && (e ? (e = !1, t = -1) : (t = n, e = !0)), n++;
|
|
2784
2793
|
e && t !== -1 && (i = i.slice(0, t));
|
|
2785
2794
|
}
|
|
2786
|
-
for (var
|
|
2787
|
-
|
|
2788
|
-
for (var
|
|
2789
|
-
var
|
|
2790
|
-
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;
|
|
2791
2800
|
else {
|
|
2792
|
-
var
|
|
2793
|
-
if (
|
|
2794
|
-
else if (i.charCodeAt(
|
|
2795
|
-
var se = i.indexOf(")",
|
|
2796
|
-
se === -1 ? (
|
|
2797
|
-
} else if (i.charCodeAt(
|
|
2798
|
-
var ce = i.indexOf("]",
|
|
2799
|
-
ce === -1 ? (
|
|
2800
|
-
} 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;
|
|
2801
2810
|
}
|
|
2802
2811
|
}
|
|
2803
|
-
if (
|
|
2804
|
-
var
|
|
2805
|
-
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;
|
|
2806
2815
|
}
|
|
2807
2816
|
}
|
|
2808
|
-
let
|
|
2809
|
-
if (
|
|
2810
|
-
var de =
|
|
2811
|
-
if (!(de >= 2 &&
|
|
2812
|
-
for (var
|
|
2813
|
-
if (
|
|
2814
|
-
let e =
|
|
2815
|
-
|
|
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"));
|
|
2816
2825
|
}
|
|
2817
2826
|
}
|
|
2818
2827
|
}
|
|
2819
2828
|
i !== a && (e = e.slice(0, t) + i, n = t + i.length);
|
|
2820
2829
|
}
|
|
2821
|
-
let
|
|
2822
|
-
var
|
|
2823
|
-
let
|
|
2824
|
-
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);
|
|
2825
2834
|
for (ye >= n && (ye = -1); t < n;) {
|
|
2826
|
-
let r = e.charCodeAt(t),
|
|
2835
|
+
let r = e.charCodeAt(t), a = null;
|
|
2827
2836
|
if (r === p) {
|
|
2828
|
-
if (
|
|
2829
|
-
var be =
|
|
2837
|
+
if (a = an(e, t, n), !a) {
|
|
2838
|
+
var be = Ot(e, t, n, p);
|
|
2830
2839
|
t += be - 1;
|
|
2831
2840
|
}
|
|
2832
2841
|
} else if (r === C || r === w) {
|
|
2833
|
-
var xe =
|
|
2842
|
+
var xe = fn(e, t, n);
|
|
2834
2843
|
if (xe) {
|
|
2835
2844
|
if (xe.canOpen || xe.canClose) {
|
|
2836
|
-
t >
|
|
2837
|
-
var Se =
|
|
2838
|
-
|
|
2839
|
-
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,
|
|
2840
2849
|
ch: r,
|
|
2841
2850
|
len: xe.len,
|
|
2842
2851
|
canOpen: xe.canOpen,
|
|
2843
2852
|
canClose: xe.canClose,
|
|
2844
2853
|
active: !0
|
|
2845
|
-
}),
|
|
2854
|
+
}), J.push(Se), t += xe.len, ve = t;
|
|
2846
2855
|
continue;
|
|
2847
2856
|
}
|
|
2848
2857
|
t += xe.len - 1;
|
|
2849
2858
|
}
|
|
2850
|
-
} else if (r === m)
|
|
2851
|
-
else if (r === x)
|
|
2852
|
-
else if (r === h) t + 1 < n && e.charCodeAt(t + 1) === g && (
|
|
2853
|
-
else if (r === O && t + 1 < n && e.charCodeAt(t + 1) === h)
|
|
2854
|
-
else if (r === T)
|
|
2855
|
-
else if ((r === N || r === P || r === M) && !
|
|
2856
|
-
var
|
|
2857
|
-
(r === N &&
|
|
2858
|
-
}
|
|
2859
|
-
if (!
|
|
2860
|
-
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;
|
|
2861
2870
|
continue;
|
|
2862
2871
|
}
|
|
2863
|
-
if (
|
|
2872
|
+
if (a) t > ve && J.push(xn(e.slice(ve, t))), J.push(a.node), t = a.end, ve = t;
|
|
2864
2873
|
else {
|
|
2865
|
-
if (r === S && t + 1 < n &&
|
|
2866
|
-
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;
|
|
2867
2876
|
continue;
|
|
2868
2877
|
}
|
|
2869
|
-
if (t++, ye < 0 || ye - t > 64) for (; t < n;) {
|
|
2870
|
-
var
|
|
2871
|
-
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++;
|
|
2872
2881
|
else break;
|
|
2873
2882
|
}
|
|
2874
2883
|
}
|
|
2875
2884
|
}
|
|
2876
|
-
if (n >
|
|
2877
|
-
let t = e.slice(
|
|
2878
|
-
t &&
|
|
2885
|
+
if (n > ve) {
|
|
2886
|
+
let t = e.slice(ve, n);
|
|
2887
|
+
t && J.push(xn(t));
|
|
2879
2888
|
}
|
|
2880
|
-
return
|
|
2889
|
+
return Y.length > 0 && pn(J, Y, r, i), r.e = a, wn--, J;
|
|
2881
2890
|
}
|
|
2882
|
-
var
|
|
2883
|
-
function
|
|
2891
|
+
var En = 500;
|
|
2892
|
+
function Dn(e, t, n) {
|
|
2884
2893
|
var r = t.i || 0;
|
|
2885
|
-
if (r >
|
|
2886
|
-
type:
|
|
2894
|
+
if (r > En) return [{
|
|
2895
|
+
type: q.text,
|
|
2887
2896
|
text: e
|
|
2888
2897
|
}];
|
|
2889
|
-
if (t.i = r + 1,
|
|
2898
|
+
if (t.i = r + 1, n.optimizeForStreaming && !t.j) {
|
|
2890
2899
|
var i = e.length;
|
|
2891
2900
|
i > 0 && e.charCodeAt(i - 1) === f && i--;
|
|
2892
2901
|
for (var a = i; a > 0 && e.charCodeAt(a - 1) !== f;) a--;
|
|
2893
|
-
if (a > 0 && e.charCodeAt(a) ===
|
|
2902
|
+
if (a > 0 && e.charCodeAt(a) === V) {
|
|
2894
2903
|
for (var o = !0, s = a; s < i; s++) {
|
|
2895
2904
|
var c = e.charCodeAt(s);
|
|
2896
|
-
if (c !== l && c !== u && c !== b && c !== A && c !==
|
|
2905
|
+
if (c !== l && c !== u && c !== b && c !== A && c !== V) {
|
|
2897
2906
|
o = !1;
|
|
2898
2907
|
break;
|
|
2899
2908
|
}
|
|
2900
2909
|
}
|
|
2901
2910
|
if (o) {
|
|
2902
2911
|
for (var d = a - 1; d > 0 && e.charCodeAt(d - 1) !== f;) d--;
|
|
2903
|
-
e.charCodeAt(d) ===
|
|
2912
|
+
e.charCodeAt(d) === V && (e = e.slice(0, d).trimEnd());
|
|
2904
2913
|
}
|
|
2905
2914
|
}
|
|
2906
2915
|
var g = e.trim(), y = g.lastIndexOf("\n"), x = y === -1 ? g : g.slice(y + 1);
|
|
2907
|
-
if (x.length > 0 && x.charCodeAt(0) ===
|
|
2916
|
+
if (x.length > 0 && x.charCodeAt(0) === V) {
|
|
2908
2917
|
for (var S = !1, E = !1, D = 1; D < x.length; D++) {
|
|
2909
2918
|
var O = x.charCodeAt(D);
|
|
2910
|
-
O ===
|
|
2919
|
+
O === V && (S = !0), O === b && (E = !0);
|
|
2911
2920
|
}
|
|
2912
2921
|
S && E && (e = y === -1 ? "" : e.slice(0, e.lastIndexOf(x)).trimEnd());
|
|
2913
2922
|
}
|
|
2914
2923
|
for (var k = -1, j = -1, M = -1, N = e.length - 1; N >= 0; N--) if (e.charCodeAt(N) === T) {
|
|
2915
2924
|
var P = N + 1 < e.length ? e.charCodeAt(N + 1) : 0;
|
|
2916
|
-
if (P >=
|
|
2925
|
+
if (P >= W && P <= G || P >= K && P <= pe) {
|
|
2917
2926
|
for (var F = N + 2; F < e.length;) {
|
|
2918
2927
|
var I = e.charCodeAt(F);
|
|
2919
|
-
if (I >=
|
|
2928
|
+
if (I >= W && I <= G || I >= K && I <= pe || I >= H && I <= U) F++;
|
|
2920
2929
|
else break;
|
|
2921
2930
|
}
|
|
2922
2931
|
for (var ee = F; ee < e.length && e.charCodeAt(ee) !== _;) ee++;
|
|
2923
|
-
if (ee < e.length && e.charCodeAt(ee - 1) !==
|
|
2932
|
+
if (ee < e.length && e.charCodeAt(ee - 1) !== ie) {
|
|
2924
2933
|
for (var L = !1, R = ee + 1; R < e.length; R++) if (e.charCodeAt(R) === T) {
|
|
2925
2934
|
L = !0;
|
|
2926
2935
|
break;
|
|
@@ -2934,52 +2943,52 @@ function wn(e, t, n) {
|
|
|
2934
2943
|
for (var te = 0, ne = 0; ne < k; ne++) e.charCodeAt(ne) === p && te++;
|
|
2935
2944
|
if (te % 2 == 0) {
|
|
2936
2945
|
var re = e.slice(k + 1, j);
|
|
2937
|
-
|
|
2938
|
-
}
|
|
2939
|
-
}
|
|
2940
|
-
for (var
|
|
2941
|
-
if (
|
|
2942
|
-
for (var
|
|
2943
|
-
for (var
|
|
2944
|
-
if (
|
|
2945
|
-
for (var
|
|
2946
|
-
|
|
2947
|
-
}
|
|
2948
|
-
}
|
|
2949
|
-
var
|
|
2950
|
-
if (
|
|
2951
|
-
for (var
|
|
2952
|
-
if (
|
|
2953
|
-
var
|
|
2954
|
-
if (
|
|
2955
|
-
var
|
|
2956
|
-
if (
|
|
2957
|
-
for (var
|
|
2958
|
-
|
|
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);
|
|
2959
2968
|
}
|
|
2960
|
-
} else if (
|
|
2961
|
-
for (var Ce =
|
|
2962
|
-
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)) {
|
|
2963
2972
|
var X = Ce + 1;
|
|
2964
|
-
if (X >=
|
|
2965
|
-
for (var Z = X; Z <
|
|
2966
|
-
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);
|
|
2967
2976
|
}
|
|
2968
2977
|
}
|
|
2969
2978
|
}
|
|
2970
|
-
|
|
2979
|
+
be && (e = e.slice(0, _e).trimEnd());
|
|
2971
2980
|
}
|
|
2972
2981
|
}
|
|
2973
2982
|
}
|
|
2974
|
-
if (t.inline) return
|
|
2983
|
+
if (t.inline) return Tn(e, 0, e.length, t, n);
|
|
2975
2984
|
let we = [], Q = 0, Te = e.length;
|
|
2976
2985
|
if (Q === 0 && !n.disableFrontmatter && e.startsWith("---")) {
|
|
2977
|
-
let t =
|
|
2986
|
+
let t = ge(e);
|
|
2978
2987
|
if (t && t.hasValidYaml) {
|
|
2979
2988
|
if (n.preserveFrontmatter !== !1) {
|
|
2980
2989
|
let n = e.slice(0, t.endPos).trimEnd();
|
|
2981
2990
|
we.push({
|
|
2982
|
-
type:
|
|
2991
|
+
type: q.frontmatter,
|
|
2983
2992
|
text: n
|
|
2984
2993
|
});
|
|
2985
2994
|
}
|
|
@@ -2987,23 +2996,23 @@ function wn(e, t, n) {
|
|
|
2987
2996
|
}
|
|
2988
2997
|
}
|
|
2989
2998
|
for (; Q < Te;) {
|
|
2990
|
-
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);
|
|
2991
3000
|
if (Q >= Te) break;
|
|
2992
|
-
e.charCodeAt(Q),
|
|
3001
|
+
e.charCodeAt(Q), jt(e, Q, De);
|
|
2993
3002
|
let r = null;
|
|
2994
|
-
if (
|
|
2995
|
-
else if (e.charCodeAt(Q) !==
|
|
2996
|
-
let i = Q +
|
|
2997
|
-
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));
|
|
2998
3007
|
}
|
|
2999
3008
|
if (!r) {
|
|
3000
|
-
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) {
|
|
3001
3010
|
Oe = !0;
|
|
3002
3011
|
break;
|
|
3003
3012
|
}
|
|
3004
|
-
Oe && (r =
|
|
3013
|
+
Oe && (r = $t(e, Q, t, n));
|
|
3005
3014
|
}
|
|
3006
|
-
if (r ||=
|
|
3015
|
+
if (r ||= nn(e, Q, t, n), r) r.node.type !== q.refCollection && we.push(r.node), Q = r.end;
|
|
3007
3016
|
else {
|
|
3008
3017
|
var Ae = e.indexOf("\n", Q);
|
|
3009
3018
|
Q = Ae < 0 ? Te : Ae + 1;
|
|
@@ -3011,8 +3020,8 @@ function wn(e, t, n) {
|
|
|
3011
3020
|
}
|
|
3012
3021
|
return t.i = r, we;
|
|
3013
3022
|
}
|
|
3014
|
-
function
|
|
3015
|
-
var i =
|
|
3023
|
+
function On(e, t, n, r) {
|
|
3024
|
+
var i = pt(e, t);
|
|
3016
3025
|
return i ? {
|
|
3017
3026
|
tagName: i.tag,
|
|
3018
3027
|
tagLower: i.tag.toLowerCase(),
|
|
@@ -3025,23 +3034,23 @@ function Tn(e, t, n, r) {
|
|
|
3025
3034
|
endPos: i.end
|
|
3026
3035
|
} : null;
|
|
3027
3036
|
}
|
|
3028
|
-
function
|
|
3029
|
-
|
|
3030
|
-
let r =
|
|
3031
|
-
return
|
|
3032
|
-
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,
|
|
3033
3042
|
refs: t.refs
|
|
3034
3043
|
}, ...r] : r;
|
|
3035
3044
|
}
|
|
3036
|
-
var
|
|
3045
|
+
var An = /^\n+/, jn;
|
|
3037
3046
|
try {
|
|
3038
|
-
|
|
3047
|
+
jn = n.createElement("div").$$typeof;
|
|
3039
3048
|
} catch {
|
|
3040
|
-
|
|
3049
|
+
jn = Symbol.for("react.transitional.element");
|
|
3041
3050
|
}
|
|
3042
|
-
function
|
|
3051
|
+
function Mn(e, t, n) {
|
|
3043
3052
|
return {
|
|
3044
|
-
$$typeof:
|
|
3053
|
+
$$typeof: jn,
|
|
3045
3054
|
type: e,
|
|
3046
3055
|
key: n == null ? null : "" + n,
|
|
3047
3056
|
ref: null,
|
|
@@ -3052,49 +3061,40 @@ function kn(e, t, n) {
|
|
|
3052
3061
|
_debugTask: null
|
|
3053
3062
|
};
|
|
3054
3063
|
}
|
|
3055
|
-
var
|
|
3056
|
-
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) {
|
|
3057
3066
|
switch (e.type) {
|
|
3058
|
-
case
|
|
3067
|
+
case q.blockQuote: {
|
|
3059
3068
|
let n = { key: r.key };
|
|
3060
|
-
return e.alert && (n.className = "markdown-alert-" + o(e.alert.toLowerCase(), Z), e.children.unshift(
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
type: K.htmlBlock,
|
|
3068
|
-
tag: "header"
|
|
3069
|
-
})), i("blockquote", n, t(e.children, r));
|
|
3070
|
-
}
|
|
3071
|
-
case K.breakLine: return i("br", { key: r.key });
|
|
3072
|
-
case K.breakThematic: return i("hr", { key: r.key });
|
|
3073
|
-
case K.frontmatter: return c.preserveFrontmatter ? i("pre", { key: r.key }, e.text) : null;
|
|
3074
|
-
case K.codeBlock:
|
|
3075
|
-
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) : "";
|
|
3076
3076
|
return i("pre", { key: r.key }, i("code", {
|
|
3077
|
-
...
|
|
3077
|
+
...Y(e.attrs || {}),
|
|
3078
3078
|
className: g ? `language-${g} lang-${g}` : ""
|
|
3079
3079
|
}, e.text));
|
|
3080
|
-
case
|
|
3081
|
-
case
|
|
3080
|
+
case q.codeInline: return i("code", { key: r.key }, e.text);
|
|
3081
|
+
case q.footnoteReference: return i("a", {
|
|
3082
3082
|
key: r.key,
|
|
3083
3083
|
href: a(e.target, "a", "href") || void 0
|
|
3084
3084
|
}, i("sup", { key: r.key }, e.text));
|
|
3085
|
-
case
|
|
3085
|
+
case q.gfmTask: return i("input", {
|
|
3086
3086
|
checked: e.completed,
|
|
3087
3087
|
key: r.key,
|
|
3088
3088
|
readOnly: !0,
|
|
3089
3089
|
type: "checkbox"
|
|
3090
3090
|
});
|
|
3091
|
-
case
|
|
3091
|
+
case q.heading: return i(`h${e.level}`, {
|
|
3092
3092
|
id: e.id,
|
|
3093
3093
|
key: r.key
|
|
3094
3094
|
}, t(e.children, r));
|
|
3095
|
-
case
|
|
3095
|
+
case q.htmlBlock: {
|
|
3096
3096
|
let g = e;
|
|
3097
|
-
if (c.tagfilter &&
|
|
3097
|
+
if (c.tagfilter && Ze(g.tag)) {
|
|
3098
3098
|
var u = "";
|
|
3099
3099
|
if (g.attrs) for (var d in g.attrs) {
|
|
3100
3100
|
var f = g.attrs[d];
|
|
@@ -3104,33 +3104,33 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3104
3104
|
}
|
|
3105
3105
|
if (g.a && g.c) {
|
|
3106
3106
|
let i = function(e) {
|
|
3107
|
-
if ((e.type ===
|
|
3108
|
-
if (e.type ===
|
|
3107
|
+
if ((e.type === q.htmlSelfClosing || e.type === q.htmlBlock) && e.b) return [];
|
|
3108
|
+
if (e.type === q.paragraph) {
|
|
3109
3109
|
let t = e.children;
|
|
3110
3110
|
return t ? t.flatMap(i) : [];
|
|
3111
3111
|
}
|
|
3112
|
-
return e.type ===
|
|
3112
|
+
return e.type === q.text ? e.text?.trim() ? [e] : [] : e.type === q.htmlBlock && e.children ? [{
|
|
3113
3113
|
...e,
|
|
3114
3114
|
children: e.children?.flatMap(i)
|
|
3115
3115
|
}] : [e];
|
|
3116
3116
|
}, u = function(e) {
|
|
3117
|
-
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);
|
|
3118
3118
|
}, d = function(e, t) {
|
|
3119
3119
|
for (var n = 0; n < e.length; n++) {
|
|
3120
3120
|
var r = e[n];
|
|
3121
|
-
if (r.type ===
|
|
3121
|
+
if (r.type === q.paragraph && r.children) for (var i = r.children, a = 0; a < i.length; a++) {
|
|
3122
3122
|
var o = i[a];
|
|
3123
|
-
if (o.type ===
|
|
3123
|
+
if (o.type === q.htmlSelfClosing && o.b && o.tag.toLowerCase() === t) {
|
|
3124
3124
|
var s = e.slice(0, n);
|
|
3125
3125
|
a > 0 && s.push({
|
|
3126
|
-
type:
|
|
3126
|
+
type: q.paragraph,
|
|
3127
3127
|
children: i.slice(0, a)
|
|
3128
3128
|
});
|
|
3129
3129
|
var c = [];
|
|
3130
3130
|
if (a + 1 < i.length) {
|
|
3131
3131
|
var l = i.slice(a + 1);
|
|
3132
3132
|
l = l.filter(function(e) {
|
|
3133
|
-
return !(e.type ===
|
|
3133
|
+
return !(e.type === q.htmlSelfClosing && e.b);
|
|
3134
3134
|
}), l.length > 0 && (c = l);
|
|
3135
3135
|
}
|
|
3136
3136
|
return c = c.concat(e.slice(n + 1)), {
|
|
@@ -3140,7 +3140,7 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3140
3140
|
};
|
|
3141
3141
|
}
|
|
3142
3142
|
}
|
|
3143
|
-
if ((r.type ===
|
|
3143
|
+
if ((r.type === q.htmlSelfClosing || r.type === q.htmlBlock) && r.b && r.tag.toLowerCase() === t) return {
|
|
3144
3144
|
found: !0,
|
|
3145
3145
|
beforeClose: e.slice(0, n),
|
|
3146
3146
|
afterClose: e.slice(n + 1)
|
|
@@ -3151,28 +3151,28 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3151
3151
|
beforeClose: e,
|
|
3152
3152
|
afterClose: []
|
|
3153
3153
|
};
|
|
3154
|
-
}, 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);
|
|
3155
3155
|
if (_) {
|
|
3156
3156
|
let t = g.a.replace(RegExp("\\s*</" + f + ">\\s*$", "i"), "");
|
|
3157
|
-
return c.tagfilter && (t =
|
|
3157
|
+
return c.tagfilter && (t = $e(t)), y ? l(e.tag, {
|
|
3158
3158
|
key: r.key,
|
|
3159
|
-
...
|
|
3159
|
+
...Y(e.attrs || {}),
|
|
3160
3160
|
dangerouslySetInnerHTML: { __html: t }
|
|
3161
3161
|
}) : l(e.tag, {
|
|
3162
3162
|
key: r.key,
|
|
3163
|
-
...
|
|
3163
|
+
...Y(e.attrs || {})
|
|
3164
3164
|
}, t);
|
|
3165
3165
|
}
|
|
3166
3166
|
let b = RegExp(`^<${g.tag}(\\s|>)`, "i").test(g.a);
|
|
3167
|
-
if (v && !b && c.tagfilter &&
|
|
3167
|
+
if (v && !b && c.tagfilter && Qe(g.a)) return l(e.tag, {
|
|
3168
3168
|
key: r.key,
|
|
3169
|
-
...
|
|
3169
|
+
...Y(e.attrs || {})
|
|
3170
3170
|
}, t(g.children, r));
|
|
3171
|
-
if (
|
|
3172
|
-
let t = c.tagfilter ?
|
|
3171
|
+
if (dt(g.a)) {
|
|
3172
|
+
let t = c.tagfilter ? $e(g.a) : g.a;
|
|
3173
3173
|
return l(e.tag, {
|
|
3174
3174
|
key: r.key,
|
|
3175
|
-
...
|
|
3175
|
+
...Y(e.attrs || {}),
|
|
3176
3176
|
dangerouslySetInnerHTML: { __html: t }
|
|
3177
3177
|
});
|
|
3178
3178
|
}
|
|
@@ -3183,12 +3183,12 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3183
3183
|
}, S = g.a.replace(/>\s+</g, "><").replace(/\n+/g, " ").trim();
|
|
3184
3184
|
if (RegExp(`^<${g.tag}(\\s[^>]*)?>(\\s*</${g.tag}>)?$`, "i").test(S)) return g.children && g.children.length > 0 ? l(e.tag, {
|
|
3185
3185
|
key: r.key,
|
|
3186
|
-
...
|
|
3186
|
+
...Y(e.attrs || {})
|
|
3187
3187
|
}, t(g.children, r)) : l(e.tag, {
|
|
3188
3188
|
key: r.key,
|
|
3189
|
-
...
|
|
3189
|
+
...Y(e.attrs || {})
|
|
3190
3190
|
});
|
|
3191
|
-
let C =
|
|
3191
|
+
let C = kn(S, {
|
|
3192
3192
|
inline: !1,
|
|
3193
3193
|
refs: s,
|
|
3194
3194
|
inHTML: !1
|
|
@@ -3197,33 +3197,33 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3197
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;
|
|
3198
3198
|
if (O && v) return l(e.tag, {
|
|
3199
3199
|
key: r.key,
|
|
3200
|
-
...
|
|
3200
|
+
...Y(e.attrs || {})
|
|
3201
3201
|
}, t(g.children, r));
|
|
3202
3202
|
if (O) return t(C.flatMap(i), r);
|
|
3203
3203
|
var p = d(C, w);
|
|
3204
3204
|
if (p.found && p.afterClose.length > 0) {
|
|
3205
3205
|
var m = p.beforeClose.flatMap(i), h = p.afterClose.flatMap(i);
|
|
3206
|
-
return
|
|
3206
|
+
return Mn(n.Fragment, { children: [l(e.tag, {
|
|
3207
3207
|
key: r.key,
|
|
3208
|
-
...
|
|
3208
|
+
...Y(e.attrs || {})
|
|
3209
3209
|
}, t(m, r)), t(h, r)] }, null);
|
|
3210
3210
|
}
|
|
3211
3211
|
return l(e.tag, {
|
|
3212
3212
|
key: r.key,
|
|
3213
|
-
...
|
|
3213
|
+
...Y(e.attrs || {})
|
|
3214
3214
|
}, t(C.flatMap(i), r));
|
|
3215
3215
|
}
|
|
3216
3216
|
return Te(e.tag) ? l(e.tag, {
|
|
3217
3217
|
key: r.key,
|
|
3218
|
-
...
|
|
3218
|
+
...Y(e.attrs || {})
|
|
3219
3219
|
}) : l(e.tag, {
|
|
3220
3220
|
key: r.key,
|
|
3221
|
-
...
|
|
3221
|
+
...Y(e.attrs || {})
|
|
3222
3222
|
}, e.children ? t(e.children, r) : "");
|
|
3223
3223
|
}
|
|
3224
|
-
case
|
|
3224
|
+
case q.htmlSelfClosing: {
|
|
3225
3225
|
let t = e;
|
|
3226
|
-
if (c.tagfilter &&
|
|
3226
|
+
if (c.tagfilter && Ze(t.tag)) {
|
|
3227
3227
|
var u = "";
|
|
3228
3228
|
if (t.attrs) for (var d in t.attrs) {
|
|
3229
3229
|
var f = t.attrs[d];
|
|
@@ -3233,10 +3233,10 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3233
3233
|
}
|
|
3234
3234
|
return l(e.tag, {
|
|
3235
3235
|
key: r.key,
|
|
3236
|
-
...
|
|
3236
|
+
...Y(e.attrs || {})
|
|
3237
3237
|
});
|
|
3238
3238
|
}
|
|
3239
|
-
case
|
|
3239
|
+
case q.image: {
|
|
3240
3240
|
let t = e.target == null ? null : a(e.target, "img", "src");
|
|
3241
3241
|
return i("img", {
|
|
3242
3242
|
key: r.key,
|
|
@@ -3245,11 +3245,11 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3245
3245
|
src: t || void 0
|
|
3246
3246
|
});
|
|
3247
3247
|
}
|
|
3248
|
-
case
|
|
3248
|
+
case q.link: {
|
|
3249
3249
|
let n = { key: r.key };
|
|
3250
|
-
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));
|
|
3251
3251
|
}
|
|
3252
|
-
case
|
|
3252
|
+
case q.table: {
|
|
3253
3253
|
let n = e;
|
|
3254
3254
|
return i("table", { key: r.key }, i("thead", { key: "thead" }, i("tr", null, n.header.map(function(e, a) {
|
|
3255
3255
|
return i("th", {
|
|
@@ -3265,21 +3265,21 @@ function jn(e, t, r, i, a, o, s, c, l) {
|
|
|
3265
3265
|
}));
|
|
3266
3266
|
})));
|
|
3267
3267
|
}
|
|
3268
|
-
case
|
|
3269
|
-
case
|
|
3270
|
-
case
|
|
3271
|
-
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", {
|
|
3272
3272
|
key: r.key,
|
|
3273
|
-
start: e.type ===
|
|
3273
|
+
start: e.type === q.orderedList ? e.start : void 0
|
|
3274
3274
|
}, e.items.map(function(e, n) {
|
|
3275
3275
|
return i("li", { key: n }, t(e, r));
|
|
3276
3276
|
}));
|
|
3277
|
-
case
|
|
3278
|
-
case
|
|
3277
|
+
case q.paragraph: return i("p", { key: r.key }, t(e.children, r));
|
|
3278
|
+
case q.ref: return null;
|
|
3279
3279
|
default: return null;
|
|
3280
3280
|
}
|
|
3281
3281
|
}
|
|
3282
|
-
var
|
|
3282
|
+
var Fn = (e, t, n, r, i, a, o) => {
|
|
3283
3283
|
var s = (e) => e.map(function(e) {
|
|
3284
3284
|
return "text" in e ? e.text : "";
|
|
3285
3285
|
}), c = (l, u = {}) => {
|
|
@@ -3288,7 +3288,7 @@ var Mn = (e, t, n, r, i, a, o) => {
|
|
|
3288
3288
|
u.renderDepth = d;
|
|
3289
3289
|
for (var f = u.key, p = [], m = !1, h = 0; h < l.length; h++) {
|
|
3290
3290
|
u.key = h;
|
|
3291
|
-
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";
|
|
3292
3292
|
if (_ && m) p[p.length - 1] += g;
|
|
3293
3293
|
else if (g !== null) if (Array.isArray(g)) for (var v = 0; v < g.length; v++) p.push(g[v]);
|
|
3294
3294
|
else p.push(g);
|
|
@@ -3297,21 +3297,21 @@ var Mn = (e, t, n, r, i, a, o) => {
|
|
|
3297
3297
|
return u.key = f, u.renderDepth = d - 1, p;
|
|
3298
3298
|
};
|
|
3299
3299
|
return c;
|
|
3300
|
-
},
|
|
3301
|
-
let n =
|
|
3302
|
-
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;
|
|
3303
3303
|
};
|
|
3304
|
-
function
|
|
3304
|
+
function Ln(e, t) {
|
|
3305
3305
|
let n = { ...t || {} };
|
|
3306
3306
|
n.overrides = n.overrides || {};
|
|
3307
|
-
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, {
|
|
3308
3308
|
...n,
|
|
3309
3309
|
wrapper: null
|
|
3310
3310
|
});
|
|
3311
3311
|
function c(e) {
|
|
3312
3312
|
for (var t in e) {
|
|
3313
3313
|
var n = e[t];
|
|
3314
|
-
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))) {
|
|
3315
3315
|
var r = s(n.trim());
|
|
3316
3316
|
e[t] = t === "innerHTML" && Array.isArray(r) ? r[0] : r;
|
|
3317
3317
|
}
|
|
@@ -3320,16 +3320,16 @@ function Pn(e, t) {
|
|
|
3320
3320
|
function l(e, t, ...r) {
|
|
3321
3321
|
var i = t || {}, s = e;
|
|
3322
3322
|
if (o) {
|
|
3323
|
-
var c =
|
|
3324
|
-
s =
|
|
3323
|
+
var c = Ke(n.overrides, e + ".props", {});
|
|
3324
|
+
s = In(e, n.overrides), i = {
|
|
3325
3325
|
...i,
|
|
3326
3326
|
...c,
|
|
3327
|
-
className:
|
|
3327
|
+
className: Je(i.className, c.className) || void 0
|
|
3328
3328
|
};
|
|
3329
3329
|
}
|
|
3330
3330
|
if (!a) {
|
|
3331
3331
|
var l = i.key;
|
|
3332
|
-
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);
|
|
3333
3333
|
}
|
|
3334
3334
|
return a(s, i, ...r);
|
|
3335
3335
|
}
|
|
@@ -3341,16 +3341,12 @@ function Pn(e, t) {
|
|
|
3341
3341
|
slugify: n.slugify ? (e) => n.slugify(e, Z) : Z,
|
|
3342
3342
|
sanitizer: i,
|
|
3343
3343
|
tagfilter: n.tagfilter !== !1
|
|
3344
|
-
}, 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, {
|
|
3345
3345
|
inline: n.forceInline,
|
|
3346
3346
|
refs: f
|
|
3347
|
-
}), h =
|
|
3348
|
-
for (let e in f) e.charCodeAt(0) === g && h.push({
|
|
3349
|
-
identifier: e,
|
|
3350
|
-
footnote: f[e].target
|
|
3351
|
-
});
|
|
3347
|
+
}), h = Ge(f);
|
|
3352
3348
|
if (h.length && m.push(l("footer", { key: "footer" }, h.map(function(e) {
|
|
3353
|
-
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, {
|
|
3354
3350
|
inline: !0,
|
|
3355
3351
|
refs: f
|
|
3356
3352
|
}, d);
|
|
@@ -3366,14 +3362,14 @@ function Pn(e, t) {
|
|
|
3366
3362
|
if (m.length > 1 || n.forceWrapper) v = m;
|
|
3367
3363
|
else return m.length === 1 ? m[0] : null;
|
|
3368
3364
|
var y = n.wrapperProps ? { ...n.wrapperProps } : {};
|
|
3369
|
-
return y.children = v,
|
|
3365
|
+
return y.children = v, Mn(_, y, "outer");
|
|
3370
3366
|
}
|
|
3371
|
-
function
|
|
3367
|
+
function Rn(e = "", t = {}) {
|
|
3372
3368
|
let n = { ...t || {} };
|
|
3373
3369
|
n.overrides = n.overrides || {};
|
|
3374
|
-
let r = n.sanitizer ||
|
|
3370
|
+
let r = n.sanitizer || xe;
|
|
3375
3371
|
function i(e) {
|
|
3376
|
-
let t = n.forceInline || !n.forceBlock && !
|
|
3372
|
+
let t = n.forceInline || !n.forceBlock && !ve.test(e), i = {
|
|
3377
3373
|
...n,
|
|
3378
3374
|
slugify: n.slugify ? (e) => n.slugify(e, Z) : Z,
|
|
3379
3375
|
sanitizer: r,
|
|
@@ -3382,7 +3378,7 @@ function Fn(e = "", t = {}) {
|
|
|
3382
3378
|
if (!t) {
|
|
3383
3379
|
let e = o.length;
|
|
3384
3380
|
for (; e > 0 && (o[e - 1] === "\n" || o[e - 1] === "\r");) e--;
|
|
3385
|
-
o = o.slice(0, e), o = `${o.replace(
|
|
3381
|
+
o = o.slice(0, e), o = `${o.replace(An, "")}
|
|
3386
3382
|
|
|
3387
3383
|
`;
|
|
3388
3384
|
}
|
|
@@ -3390,7 +3386,7 @@ function Fn(e = "", t = {}) {
|
|
|
3390
3386
|
var s = o.lastIndexOf("<");
|
|
3391
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));
|
|
3392
3388
|
}
|
|
3393
|
-
return
|
|
3389
|
+
return Ln(kn(t ? e : o, {
|
|
3394
3390
|
inline: t,
|
|
3395
3391
|
refs: a
|
|
3396
3392
|
}, i), {
|
|
@@ -3401,8 +3397,8 @@ function Fn(e = "", t = {}) {
|
|
|
3401
3397
|
let a = {};
|
|
3402
3398
|
return i(e);
|
|
3403
3399
|
}
|
|
3404
|
-
var
|
|
3405
|
-
if (!(typeof n.useContext < "u")) return
|
|
3400
|
+
var zn = ({ children: e, options: t, ...r }) => {
|
|
3401
|
+
if (!(typeof n.useContext < "u")) return Rn(e ?? "", {
|
|
3406
3402
|
...t,
|
|
3407
3403
|
overrides: { ...t?.overrides },
|
|
3408
3404
|
wrapperProps: {
|
|
@@ -3410,7 +3406,7 @@ var In = ({ children: e, options: t, ...r }) => {
|
|
|
3410
3406
|
...r
|
|
3411
3407
|
}
|
|
3412
3408
|
});
|
|
3413
|
-
let i = n.useContext(
|
|
3409
|
+
let i = n.useContext(Nn), a = n.useMemo(() => ({
|
|
3414
3410
|
...i,
|
|
3415
3411
|
...t,
|
|
3416
3412
|
overrides: {
|
|
@@ -3427,8 +3423,8 @@ var In = ({ children: e, options: t, ...r }) => {
|
|
|
3427
3423
|
t,
|
|
3428
3424
|
r
|
|
3429
3425
|
]), o = e ?? "";
|
|
3430
|
-
return n.useMemo(() =>
|
|
3431
|
-
},
|
|
3426
|
+
return n.useMemo(() => Rn(o, a), [o, a]);
|
|
3427
|
+
}, Bn = /* @__PURE__ */ e({ default: () => Un }), Vn = {
|
|
3432
3428
|
small: {
|
|
3433
3429
|
1: "dc:text-lg",
|
|
3434
3430
|
2: "dc:text-base",
|
|
@@ -3444,11 +3440,11 @@ var In = ({ children: e, options: t, ...r }) => {
|
|
|
3444
3440
|
2: "dc:text-4xl",
|
|
3445
3441
|
3: "dc:text-3xl"
|
|
3446
3442
|
}
|
|
3447
|
-
},
|
|
3443
|
+
}, Hn = {
|
|
3448
3444
|
1: "dc:mb-4",
|
|
3449
3445
|
2: "dc:mb-3",
|
|
3450
3446
|
3: "dc:mb-2"
|
|
3451
|
-
},
|
|
3447
|
+
}, Un = r.memo(function({ displayConfig: e = {}, height: n = "100%", colorPalette: r }) {
|
|
3452
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 = {
|
|
3453
3449
|
small: "dc:text-sm",
|
|
3454
3450
|
medium: "dc:text-lg",
|
|
@@ -3459,15 +3455,15 @@ var In = ({ children: e, options: t, ...r }) => {
|
|
|
3459
3455
|
right: "dc:text-right"
|
|
3460
3456
|
}, _ = i(() => ({ overrides: {
|
|
3461
3457
|
h1: { props: {
|
|
3462
|
-
className: `dc:font-bold ${
|
|
3458
|
+
className: `dc:font-bold ${Vn[u]?.[1] || "dc:text-3xl"} ${Hn[1]}`,
|
|
3463
3459
|
style: { color: m }
|
|
3464
3460
|
} },
|
|
3465
3461
|
h2: { props: {
|
|
3466
|
-
className: `dc:font-bold ${
|
|
3462
|
+
className: `dc:font-bold ${Vn[u]?.[2] || "dc:text-2xl"} ${Hn[2]}`,
|
|
3467
3463
|
style: { color: m }
|
|
3468
3464
|
} },
|
|
3469
3465
|
h3: { props: {
|
|
3470
|
-
className: `dc:font-bold ${
|
|
3466
|
+
className: `dc:font-bold ${Vn[u]?.[3] || "dc:text-xl"} ${Hn[3]}`,
|
|
3471
3467
|
style: { color: m }
|
|
3472
3468
|
} },
|
|
3473
3469
|
p: { props: { className: "dc:mb-3 dc:leading-relaxed text-dc-text" } },
|
|
@@ -3527,13 +3523,13 @@ var In = ({ children: e, options: t, ...r }) => {
|
|
|
3527
3523
|
height: n === "100%" ? "100%" : n,
|
|
3528
3524
|
...v
|
|
3529
3525
|
},
|
|
3530
|
-
children: /* @__PURE__ */ a(
|
|
3526
|
+
children: /* @__PURE__ */ a(zn, {
|
|
3531
3527
|
options: _,
|
|
3532
3528
|
children: c
|
|
3533
3529
|
})
|
|
3534
3530
|
});
|
|
3535
3531
|
});
|
|
3536
3532
|
//#endregion
|
|
3537
|
-
export {
|
|
3533
|
+
export { Bn as n, zn as r, Un as t };
|
|
3538
3534
|
|
|
3539
|
-
//# sourceMappingURL=chart-markdown-
|
|
3535
|
+
//# sourceMappingURL=chart-markdown-BPW-EAm9.js.map
|